aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar iiotx <iiotx@member.fsf.org>2015-08-27 06:52:57 -0400
committerLibravatar iiotx <iiotx@member.fsf.org>2015-08-27 06:52:57 -0400
commit7ced6a935c25c4bb184514817349e84bd91f428a (patch)
tree2b74d4445395ae095e3fe3911175599953cc18f5
parentUse generic.profile by default (diff)
downloadfirejail-7ced6a935c25c4bb184514817349e84bd91f428a.tar.gz
firejail-7ced6a935c25c4bb184514817349e84bd91f428a.tar.zst
firejail-7ced6a935c25c4bb184514817349e84bd91f428a.zip
Use generic.profile by default: fixes
-rw-r--r--src/firejail/main.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c
index f7191c981..7db18181d 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -1089,20 +1089,18 @@ int main(int argc, char **argv) {
1089 // use generic.profile as the default 1089 // use generic.profile as the default
1090 if (!custom_profile && !arg_noprofile) { 1090 if (!custom_profile && !arg_noprofile) {
1091 if (arg_debug) 1091 if (arg_debug)
1092 printf("Attempting to find generic.profile..."); 1092 printf("Attempting to find %s.profile...",GENERIC_PROFILE_NAME);
1093 1093
1094 // look for the profile in ~/.config/firejail directory 1094 // look for the profile in ~/.config/firejail directory
1095 char *usercfgdir; 1095 char *usercfgdir;
1096 if (asprintf(&usercfgdir, "%s/.config/firejail", cfg.homedir) == -1) 1096 if (asprintf(&usercfgdir, "%s/.config/firejail", cfg.homedir) == -1)
1097 errExit("asprintf"); 1097 errExit("asprintf");
1098 int rv = profile_find(GENERIC_PROFILE_NAME, usercfgdir); 1098 custom_profile = profile_find(GENERIC_PROFILE_NAME, usercfgdir);
1099 free(usercfgdir); 1099 free(usercfgdir);
1100 custom_profile = rv;
1101 1100
1102 if (!custom_profile) { 1101 if (!custom_profile) {
1103 // look for the profile in /etc/firejail directory 1102 // look for the profile in /etc/firejail directory
1104 int rv = profile_find(GENERIC_PROFILE_NAME, "/etc/firejail"); 1103 custom_profile = profile_find(GENERIC_PROFILE_NAME, "/etc/firejail");
1105 custom_profile = rv;
1106 } 1104 }
1107 } 1105 }
1108 1106