aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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