aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/firejail/main.c5
-rw-r--r--src/man/firejail.txt2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c
index 4cb87aaa6..4eb92658c 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -1495,7 +1495,8 @@ int main(int argc, char **argv) {
1495 if (!ppath) 1495 if (!ppath)
1496 errExit("strdup"); 1496 errExit("strdup");
1497 1497
1498 if (access(ppath, R_OK)) { 1498 if (*ppath == ':' || access(ppath, R_OK) || is_dir(ppath)) {
1499 int has_colon = (*ppath == ':');
1499 char *ptr = ppath; 1500 char *ptr = ppath;
1500 while (*ptr != '/' && *ptr != '.' && *ptr != '\0') 1501 while (*ptr != '/' && *ptr != '.' && *ptr != '\0')
1501 ptr++; 1502 ptr++;
@@ -1508,7 +1509,7 @@ int main(int argc, char **argv) {
1508 1509
1509 // profile was not read in previously, try to see if 1510 // profile was not read in previously, try to see if
1510 // we were given a profile name. 1511 // we were given a profile name.
1511 if (!profile_find_firejail(ppath, 1)) { 1512 if (!profile_find_firejail(ppath + has_colon, 1)) {
1512 // do not fall through to default profile, 1513 // do not fall through to default profile,
1513 // because the user should be notified that 1514 // because the user should be notified that
1514 // given profile arg could not be used. 1515 // given profile arg could not be used.
diff --git a/src/man/firejail.txt b/src/man/firejail.txt
index 9eb290fef..e7917737e 100644
--- a/src/man/firejail.txt
+++ b/src/man/firejail.txt
@@ -2718,7 +2718,7 @@ The owner of the sandbox.
2718Several command line options can be passed to the program using 2718Several command line options can be passed to the program using
2719profile files. Firejail chooses the profile file as follows: 2719profile files. Firejail chooses the profile file as follows:
2720 2720
27211. If a profile file is provided by the user with --profile option, the profile file is loaded. If a profile name is given, it is searched for first in the ~/.config/firejail directory and if not found then in /etc/firejail directory. Profile names do not include the .profile suffix. 27211. If a profile file is provided by the user with --profile=FILE option, the profile FILE is loaded. If a profile name is given, it is searched for first in the ~/.config/firejail directory and if not found then in /etc/firejail directory. Profile names do not include the .profile suffix. If there is a file with the same name as the given profile name, it will be used instead of doing the profile search. To force a profile search, prefix the profile name with a colon (:), eg. --profile=:PROFILE_NAME.
2722Example: 2722Example:
2723.PP 2723.PP
2724.RS 2724.RS