Skip to content
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

Revert "allow/deny help and man pages" #4502

Merged
merged 2 commits into from
Sep 21, 2021

Conversation

kmk3
Copy link
Collaborator

@kmk3 kmk3 commented Sep 2, 2021

This reverts commit a11707e.

The man pages currently direct users to use the aliases instead of the
commands, which some users of firejail-git may end up doing. Example:

#4496

So revert the man page changes as well to avoid confusion.

Note: This is not a full revert. The commit in question also contains
some string formatting fixes on src/firejail/usage.c (related to dbus
and netmask), which are left intact.

Relates to #4410.

This reverts commit a11707e.

The man pages currently direct users to use the aliases instead of the
commands, which some users of firejail-git may end up doing.  Example:

netblue30#4496

So revert the man page changes as well to avoid confusion.

Note: This is not a full revert.  The commit in question also contains
some string formatting fixes on src/firejail/usage.c (related to dbus
and netmask), which are left intact.

Relates to netblue30#4410.
@kmk3 kmk3 requested a review from netblue30 September 2, 2021 23:49
@kmk3
Copy link
Collaborator Author

kmk3 commented Sep 3, 2021

Note: This is not a full revert. The commit in question also contains some
string formatting fixes on src/firejail/usage.c (related to dbus and
netmask), which are left intact.

Since there is a lot of code that is moved around on commit a11707e (which
makes sense given that it's about renaming things), it's hard to tell tell if
there are more changes that are not directly related to the renaming. Let me
know if I missed anything.

@rusty-snake
Copy link
Collaborator

IMHO we do not need to revert blacklist-to-deny for options like seccomp or caps.drop.

Using --blacklist/--whitelist in the manpage for now (until this gets more progress) sounds reasonable.

@kmk3
Copy link
Collaborator Author

kmk3 commented Sep 4, 2021

@rusty-snake commented on Sep 3:

IMHO we do not need to revert blacklist-to-deny for options like seccomp or
caps.drop.

I assume that you're talking about these hunks:

-	"    --caps.drop=capability,capability - drop capabilities.\n"
-	"    --caps.keep=capability,capability - allow capabilities.\n"
+	"    --caps.drop=capability,capability - blacklist capabilities filter.\n"
+	"    --caps.keep=capability,capability - whitelist capabilities filter.\n"
-	"    --seccomp - enable seccomp filter and drop the default syscalls.\n"
-	"    --seccomp=syscall,syscall,syscall - enable seccomp filter, drop the\n"
+	"    --seccomp - enable seccomp filter and apply the default blacklist.\n"
+	"    --seccomp=syscall,syscall,syscall - enable seccomp filter, blacklist the\n"
 	"\tdefault syscall list and the syscalls specified by the command.\n"
 	"    --seccomp.block-secondary - build only the native architecture filters.\n"
 	"    --seccomp.drop=syscall,syscall,syscall - enable seccomp filter, and\n"
-	"\tdrop the syscalls specified by the command.\n"
+	"\tblacklist the syscalls specified by the command.\n"
 	"    --seccomp.keep=syscall,syscall,syscall - enable seccomp filter, and\n"
-	"\tallow the syscalls specified by the command.\n"
+	"\twhitelist the syscalls specified by the command.\n"

While I like the short naming of .drop/.keep (considering that they are
subcommands), I'd say that by themselves (i.e.: without further elaboration)
they may be confusing for users unfamiliar with firejail/seccomp. Thus, I
think that making it explicit that e.g.: "drop open,close" means "blacklist
open,close" and that "keep open,close" means "whitelist open,close" may help
clarify things. I mean, personally, knowing about the concept of "privdrop", I
could likely infer that "drop" means "blacklist", but I don't find "keep" to be
synonymous with "whitelist". It could also have meant "nodrop", in the same
sense that noblacklist is the opposite of blacklist. Considering that
"allow capabilities" is used above to describe caps.keep, this is similar to
the question of whether an allow command would make more sense as meaning
noblacklist, whitelist, neither, both or something else entirely, but I
digress.

Anyway, if you really want I can remove the above, as the other changes are the
main ones. Either way, I'll leave this open for a few more days for any more
feedback, and then make all changes at once (if any), to avoid spamming #4410
with timeline events.

Using --blacklist/--whitelist in the manpage for now (until this gets more
progress) sounds reasonable.

👍

@kmk3
Copy link
Collaborator Author

kmk3 commented Sep 20, 2021

@rusty-snake ping

Thoughts on the above?

@rusty-snake
Copy link
Collaborator

No, if you think reverting them is better then do it.

And I agreed that drop and blacklist are mostly interchangeable while keep can be a bit confusing

$ firejail --quiet --noprofile --caps.keep=sys_admin --caps.drop=sys_admin --caps.keep=sys_admin cat /proc/self/status | grep CapBnd 
CapBnd:	0000000000000000

@kmk3 kmk3 merged commit 6006ee5 into netblue30:master Sep 21, 2021
@kmk3 kmk3 deleted the revert-allow-deny-man branch September 21, 2021 12:04
@a1346054 a1346054 mentioned this pull request Sep 22, 2021
kmk3 added a commit to kmk3/firejail that referenced this pull request Oct 5, 2021
This reverts commit 4438f14.

Also, partially revert related commit e4307b4 ("fix whitelist/allow in
make test-utils") to keep tests working.

The profiles are being generated using aliases, which are not documented
nor used on the profiles in the repository.  So generate them using the
normal commands for consistency.  See also commit dd13595 ("Revert
"allow/deny help and man pages"") / PR netblue30#4502.

Relates to netblue30#4410.

Misc: I noticed this on issue netblue30#4592.
kmk3 added a commit to kmk3/firejail that referenced this pull request Oct 6, 2021
This reverts commit 4438f14.

Also, partially revert related commit e4307b4 ("fix whitelist/allow in
make test-utils") to keep the tests working.

The profiles are being generated using aliases, which are not used on
the profiles in the repository.  So generate them using the normal
commands for consistency.  See also commit dd13595 ("Revert
"allow/deny help and man pages"") / PR netblue30#4502.

Relates to netblue30#4410.

Misc: I noticed this on issue netblue30#4592.
@kmk3 kmk3 added this to Done (RELNOTES N/A) in Release 0.9.68 Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Release 0.9.68
  
Done (RELNOTES N/A)
Development

Successfully merging this pull request may close these issues.

None yet

2 participants