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

Allow changing protocol list after initial set #4009

Merged
merged 2 commits into from
Feb 26, 2021

Conversation

Tomin1
Copy link
Contributor

@Tomin1 Tomin1 commented Feb 25, 2021

Firejail uses set-once logic for protocol list. This makes it impossible to accumulate list of allowed protocols from multiple include files. Instead of mandating that protocol is set once, allow constructing the list from multiple protocol rules.

These patches were part of Sailfish's firejail packaging. These were developed as part of implementing firejail sandboxing in Sailfish OS and just like the previous patches these were written by my colleague and previously reviewed by me or one of my other colleagues. See also #3960 for discussion.

A lot of profile options deal with manipulating strings containing
comma separated list of things, using several strains of similar but
not exactly the same code, duplicated for the purposes of processing
command line arguments and parsing configuration files.

Having utility functions available for handling such list strings can
make higher level logic shorter, cleaner and function in more uniform
manner.

Signed-off-by: Simo Piiroinen <[email protected]>
Signed-off-by: Tomi Leppänen <[email protected]>
Firejail uses set-once logic for "protocol" list. This makes it
impossible to accumulate list of allowed protocols from multiple
include files.

Use profile_list_augment() for maintaining list of protocols. This
implicitly means protocols can be added/removed via any number of
command line options / profile configuration files.

Signed-off-by: Simo Piiroinen <[email protected]>
Signed-off-by: Tomi Leppänen <[email protected]>
@netblue30
Copy link
Owner

Merged, thanks!

@netblue30 netblue30 merged commit 5d88ee8 into netblue30:master Feb 26, 2021
@glitsj16
Copy link
Collaborator

glitsj16 commented Mar 1, 2021

@Tomin1 Do we need bash_completion support for any of this?

@rusty-snake
Copy link
Collaborator

There is/was no completion of the value of --protocol.

@glitsj16
Copy link
Collaborator

glitsj16 commented Mar 1, 2021

@rusty-snake Good, that's settled thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants