diff options
-rw-r--r-- | src/firejail/firejail.h | 4 | ||||
-rw-r--r-- | src/firejail/fs_home.c | 5 | ||||
-rw-r--r-- | src/firejail/main.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/firejail/firejail.h b/src/firejail/firejail.h index 02a4966bc..333cd92f4 100644 --- a/src/firejail/firejail.h +++ b/src/firejail/firejail.h | |||
@@ -213,6 +213,7 @@ static inline int any_interface_configured(void) { | |||
213 | void clear_run_files(pid_t pid); | 213 | void clear_run_files(pid_t pid); |
214 | 214 | ||
215 | extern int arg_private; // mount private /home | 215 | extern int arg_private; // mount private /home |
216 | extern int arg_private_template; // private /home template | ||
216 | extern int arg_debug; // print debug messages | 217 | extern int arg_debug; // print debug messages |
217 | extern int arg_debug_check_filename; // print debug messages for filename checking | 218 | extern int arg_debug_check_filename; // print debug messages for filename checking |
218 | extern int arg_debug_blacklists; // print debug messages for blacklists | 219 | extern int arg_debug_blacklists; // print debug messages for blacklists |
@@ -328,9 +329,6 @@ void fs_chroot(const char *rootdir); | |||
328 | int fs_check_chroot_dir(const char *rootdir); | 329 | int fs_check_chroot_dir(const char *rootdir); |
329 | void fs_private_tmp(void); | 330 | void fs_private_tmp(void); |
330 | 331 | ||
331 | // copy all (normal) files and directory recursively | ||
332 | int fs_copydir(const char *path, const struct stat *st, int ftype, struct FTW *sftw); | ||
333 | |||
334 | // profile.c | 332 | // profile.c |
335 | // find and read the profile specified by name from dir directory | 333 | // find and read the profile specified by name from dir directory |
336 | int profile_find(const char *name, const char *dir); | 334 | int profile_find(const char *name, const char *dir); |
diff --git a/src/firejail/fs_home.c b/src/firejail/fs_home.c index 76f99cead..3cb410569 100644 --- a/src/firejail/fs_home.c +++ b/src/firejail/fs_home.c | |||
@@ -335,6 +335,9 @@ void fs_private(void) { | |||
335 | 335 | ||
336 | } | 336 | } |
337 | 337 | ||
338 | int fs_copydir(const char *path, const struct stat *st, int ftype, struct FTW *sftw); | ||
339 | |||
340 | |||
338 | int fs_copydir(const char *path, const struct stat *st, int ftype, struct FTW *sftw) | 341 | int fs_copydir(const char *path, const struct stat *st, int ftype, struct FTW *sftw) |
339 | { | 342 | { |
340 | 343 | ||
@@ -357,7 +360,7 @@ int fs_copydir(const char *path, const struct stat *st, int ftype, struct FTW *s | |||
357 | if (copy_file(path, dest) == 0) { | 360 | if (copy_file(path, dest) == 0) { |
358 | if (chown(dest, u, g) == -1) | 361 | if (chown(dest, u, g) == -1) |
359 | errExit("chown"); | 362 | errExit("chown"); |
360 | fs_logger("clone %s", path); | 363 | fs_logger2("clone", path); |
361 | } | 364 | } |
362 | } | 365 | } |
363 | free(dest); | 366 | free(dest); |
diff --git a/src/firejail/main.c b/src/firejail/main.c index b6b97c98c..a6c96f956 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -1361,7 +1361,7 @@ int main(int argc, char **argv) { | |||
1361 | fs_check_private_dir(); | 1361 | fs_check_private_dir(); |
1362 | arg_private = 1; | 1362 | arg_private = 1; |
1363 | } | 1363 | } |
1364 | else if (strcmp(argv[i], "--private-template=", 19) == 0) { | 1364 | else if (strncmp(argv[i], "--private-template=", 19) == 0) { |
1365 | cfg.private_template = argv[i] + 14; | 1365 | cfg.private_template = argv[i] + 14; |
1366 | if (arg_private) { | 1366 | if (arg_private) { |
1367 | fprintf(stderr, "Error: --private and --private-template are mutually exclusive\n"); | 1367 | fprintf(stderr, "Error: --private and --private-template are mutually exclusive\n"); |