mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6426] Hardcoded tc command is not found on NixOS #3268
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#3268
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Arcterus on GitHub (Jul 31, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6426
Description
It seems that
fshaper.shhardcodes the path totc, which causes setting bandwidth to fail on NixOS given that it has neither/sbinnor/usr/sbin. I think this could resolved fairly easily by just letting users set a variable with the path totcor something like that. Alternatively, you could just allow configuring the path when building the project.Steps to Reproduce
firejail --noprofile --name=blah --net=eth0firejail --bandwidth=blah set eth0 1 1Expected behavior
The bandwidth to be set properly.
Actual behavior
An error saying that
tccould not be found.Behavior without a profile
No difference since this is an issue with the script's paths.
Additional context
This is basically the same issue as:
Environment
Checklist
/usr/bin/vlc) "fixes" it).Log
Output of
LC_ALL=C firejail --bandwidth=blah set enp5s0 1 1Output of
LC_ALL=C firejail --debug --bandwidth=blah set enp5s0 1 1@ghost commented on GitHub (Aug 1, 2024):
Thanks for reporting this. Can you try the below patch and report back if that fixes traffic shaping on NixOS?
@Arcterus commented on GitHub (Aug 1, 2024):
No, it's still broken with that patch. I messed around with it a bit, and it looks like the
PATHwhen that script executes is set to/no-such-path, so it can't findtc.@ghost commented on GitHub (Aug 1, 2024):
Thanks for testing!
Here's attempt 2:
HTH
@rusty-snake commented on GitHub (Aug 1, 2024):
Suggestion to use
PATH=/usr/sbin:/sbin:/run/current-system/sw/bin command -v tcinstead of this elif cascade.@Arcterus commented on GitHub (Aug 2, 2024):
I'll have to test it later today, but that should work given that it's basically what I did locally to get things functioning. However, I imagine the
whichcommand wouldn't be useful for anyone assumingPATHis set to/no-such-pathon other distros too.