From b21763636adc4edd63b7991908fffcdb84a048c6 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sat, 10 Mar 2018 16:59:29 -0500 Subject: [PATCH] fix private-dev --- src/firejail/fs_dev.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/firejail/fs_dev.c b/src/firejail/fs_dev.c index 09fb596d5..c1a7be9a8 100644 --- a/src/firejail/fs_dev.c +++ b/src/firejail/fs_dev.c @@ -141,16 +141,15 @@ errexit: } static void create_link(const char *oldpath, const char *newpath) { - if (symlink(oldpath, newpath) == -1) - goto errexit; - if (chown(newpath, 0, 0) < 0) - goto errexit; + if (symlink(oldpath, newpath) == -1) { + fprintf(stderr, "Error: cannot create %s device\n", newpath); + exit(1); + } + + if (chown(newpath, 0, 0) < 0); + fs_logger2("create", newpath); return; - -errexit: - fprintf(stderr, "Error: cannot create %s device\n", newpath); - exit(1); } static void empty_dev_shm(void) {