-
Notifications
You must be signed in to change notification settings - Fork 570
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
Relocate firecfg.config to /etc/firejail/ #4669
Conversation
N.B. my testing and initial patch was actually against release 0.9.66, but I think this does the right things. |
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.
There are a few more places to change:
diff --git a/src/firecfg/main.c b/src/firecfg/main.c
index b8fdbcda0..1a05efd29 100644
--- a/src/firecfg/main.c
+++ b/src/firecfg/main.c
@@ -181,7 +181,7 @@ static void set_links_firecfg(void) {
if (asprintf(&firejail_exec, "%s/bin/firejail", PREFIX) == -1)
errExit("asprintf");
- // parse /usr/lib/firejail/firecfg.cfg file
+ // parse /etc/firejail/firecfg.config file
FILE *fp = fopen(cfgfile, "r");
if (!fp) {
perror("fopen");
@@ -440,7 +440,7 @@ int main(int argc, char **argv) {
// clear all symlinks
clean();
- // set new symlinks based on /usr/lib/firejail/firecfg.cfg
+ // set new symlinks based on /etc/firejail/firecfg.config
set_links_firecfg();
if (getuid() == 0) {
Misc: The filename is misspelled in these comments as well.
src/firecfg/main.c
Outdated
@@ -171,10 +171,10 @@ static void set_file(const char *name, const char *firejail_exec) { | |||
free(fname); | |||
} | |||
|
|||
// parse /usr/lib/firejail/firecfg.cfg file | |||
// parse /etc/firejail/firecfg.cfg file |
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.
// parse /etc/firejail/firecfg.cfg file | |
// parse /etc/firejail/firecfg.config file |
The filename is currently misspelled.
Misc: I noticed it by searching with git grep -F 'firecfg.'
.
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.
Aha, good catch, I will clean up these misspellings of firecfg.config
and update their paths 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.
Aha, good catch, I will clean up these misspellings of
firecfg.config
and update their paths too.
Done, I think.
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.
Aha, good catch, I will clean up these misspellings of
firecfg.config
and
update their paths too.
Thanks.
From the new commit message:
Also fixed some firecfg.cfg -> firecfg.config references.
One minor non-blocking nitpick: I'd s/fixed/fix/
to make it more similar to
this:
This should make it easier for users, and distributions, to customize which programs they want firejail to wrap. Also fixed some firecfg.cfg -> firecfg.config references. Signed-off-by: Hank Leininger <[email protected]> Closes: netblue30#408 Bug: netblue30#2097 Bug: netblue30#2829 Bug: netblue30#3665
bf244a2
to
cbbe9ab
Compare
This reminds me that Firejails should support this kind of administrative hierarchy:
Finally, users can override their own config files and other configs with command line switches and environment variables, again when allowed. In theory, there could be another element for dynamic config generation in |
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.
LGTM.
Thanks! |
Note: This could be considered a breaking change and is probably relevant to By the way, on the note I included the PR number to make it easier to find. |
This should make it easier for users, and distributions, to customize
which programs they want firejail to wrap.
Signed-off-by: Hank Leininger [email protected]
Closes: #408
Bug: #2097
Bug: #2829
Bug: #3665