-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modif: drop deprecated 'shell' option references #5894
Conversation
46a1dc8
to
8c86fae
Compare
I fixed the tests and removed a few more references, as I had a branch with But note that it is still referenced in more places: $ git grep -In 'shell.none' -- src test
src/firejail/cmdline.c:140: // index == -1 could happen if we have --shell=none and no program was specified
src/firejail/cmdline.c:167: // index == -1 could happen if we have --shell=none and no program was specified
src/firejail/fs_lib.c:434:// if (!arg_shell_none) {
src/firejail/join.c:416:// if (!arg_shell_none)
src/firejail/main.c:2967: fprintf(stderr, "Error: command must be specified when --shell=none used.\n");
src/firejail/profile.c:374: else if (strcmp(ptr, "shell none") == 0) {
src/firejail/profile.c:375: fprintf(stderr, "Warning: \"shell none\" command in the profile file is done by default; the command will be deprecated\n");
src/firejail/sandbox.c:416:// we are here because of --shell=none
src/firejail/sandbox.c:551: fprintf(stderr, "Error: --shell=none configured, but no program specified\n");
test/environment/shell-none.profile:1:shell none
test/profiles/ignore.profile:3:shell none
test/profiles/ignore2.profile:5:shell none
test/profiles/ignore3.profile:4:shell none I'm not sure about the source code and the tests should probably be changed to |
@@ -160,8 +160,6 @@ _firejail_args=( | |||
'*--seccomp.32.keep=-[enable seccomp filter, and whitelist the 32 bit syscalls specified by the command]: :' | |||
# FIXME: Add errnos | |||
'--seccomp-error-action=-[change error code, kill process or log the attempt]: :(kill log)' | |||
'--shell=none[run the program directly without a user shell]' | |||
'--shell=-[set default user shell]: :_values $(cat /etc/shells)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was shell removed too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was shell removed too?
Yes:
$ firejail --quiet --shell=/bin/sh true; echo $?
Warning: --shell feature has been deprecated
1
$ cat test.profile
shell none
shell /bin/sh
$ firejail --quiet --profile=./test.profile true
Warning: "shell none" command in the profile file is done by default; the command will be deprecated
Error: line 2 in ./test.profile is invalid
(The first warning is actually an error)
26b5aca
to
7714a5b
Compare
a2b4d62
to
a6d6a39
Compare
(Rebased to master to fix conflicts with #5898 and improved the error messages) |
a6d6a39
to
72746f9
Compare
The `shell` option has been removed. Remove stale references. This does NOT remove `shell none`-related code comments in: - src/firejail/fs_lib.c (L433-L441) - src/firejail/join.c (L415-L417) Relates to netblue30#5196. Suggested by netblue30#5891.
72746f9
to
d8ab6d9
Compare
@kmk3 A big thank you for doing the additional work on this! |
The
shell
option has been removed. Remove stale references.This does NOT remove
shell none
-related code comments in:Relates to #5196.
Suggested by #5891.