diff options
author | netblue30 <netblue30@yahoo.com> | 2015-11-14 13:20:47 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-11-14 13:20:47 -0500 |
commit | d3cbab9b3cf9bdfc0af94830fa2b7b373f7f66de (patch) | |
tree | 15f63a41ca510caea6dbf1951f74c1e9c209b9db | |
parent | firefox profile (diff) | |
download | firejail-d3cbab9b3cf9bdfc0af94830fa2b7b373f7f66de.tar.gz firejail-d3cbab9b3cf9bdfc0af94830fa2b7b373f7f66de.tar.zst firejail-d3cbab9b3cf9bdfc0af94830fa2b7b373f7f66de.zip |
fixed sysconfdir
-rw-r--r-- | Makefile.in | 92 | ||||
-rwxr-xr-x | configure | 8 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rwxr-xr-x | mketc.sh | 18 | ||||
-rw-r--r-- | src/firejail/Makefile.in | 4 | ||||
-rw-r--r-- | src/firejail/main.c | 4 | ||||
-rw-r--r-- | src/firejail/profile.c | 2 | ||||
-rw-r--r-- | src/firejail/restricted_shell.c | 6 |
8 files changed, 91 insertions, 51 deletions
diff --git a/Makefile.in b/Makefile.in index bcf9d613f..65f43884b 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -8,9 +8,7 @@ bindir=@bindir@ | |||
8 | libdir=@libdir@ | 8 | libdir=@libdir@ |
9 | datarootdir=@datarootdir@ | 9 | datarootdir=@datarootdir@ |
10 | mandir=@mandir@ | 10 | mandir=@mandir@ |
11 | # todo: fix sysconfdir | 11 | sysconfdir=@sysconfdir@ |
12 | # sysconfdir=@sysconfdir@ | ||
13 | sysconfdir=/etc | ||
14 | 12 | ||
15 | VERSION=@PACKAGE_VERSION@ | 13 | VERSION=@PACKAGE_VERSION@ |
16 | NAME=@PACKAGE_NAME@ | 14 | NAME=@PACKAGE_NAME@ |
@@ -72,51 +70,53 @@ realinstall: | |||
72 | install -c -m 0644 README $(DESTDIR)/$(DOCDIR)/. | 70 | install -c -m 0644 README $(DESTDIR)/$(DOCDIR)/. |
73 | install -c -m 0644 RELNOTES $(DESTDIR)/$(DOCDIR)/. | 71 | install -c -m 0644 RELNOTES $(DESTDIR)/$(DOCDIR)/. |
74 | # etc files | 72 | # etc files |
73 | ./mketc.sh $(sysconfdir) | ||
75 | mkdir -p $(DESTDIR)/$(sysconfdir)/firejail | 74 | mkdir -p $(DESTDIR)/$(sysconfdir)/firejail |
76 | install -c -m 0644 etc/audacious.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 75 | install -c -m 0644 .etc/audacious.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
77 | install -c -m 0644 etc/clementine.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 76 | install -c -m 0644 .etc/clementine.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
78 | install -c -m 0644 etc/gnome-mplayer.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 77 | install -c -m 0644 .etc/gnome-mplayer.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
79 | install -c -m 0644 etc/rhythmbox.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 78 | install -c -m 0644 .etc/rhythmbox.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
80 | install -c -m 0644 etc/totem.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 79 | install -c -m 0644 .etc/totem.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
81 | install -c -m 0644 etc/firefox.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 80 | install -c -m 0644 .etc/firefox.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
82 | install -c -m 0644 etc/icedove.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 81 | install -c -m 0644 .etc/icedove.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
83 | install -c -m 0644 etc/iceweasel.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 82 | install -c -m 0644 .etc/iceweasel.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
84 | install -c -m 0644 etc/midori.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 83 | install -c -m 0644 .etc/midori.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
85 | install -c -m 0644 etc/evince.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 84 | install -c -m 0644 .etc/evince.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
86 | install -c -m 0644 etc/chromium-browser.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 85 | install -c -m 0644 .etc/chromium-browser.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
87 | install -c -m 0644 etc/chromium.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 86 | install -c -m 0644 .etc/chromium.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
88 | install -c -m 0644 etc/google-chrome.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 87 | install -c -m 0644 .etc/google-chrome.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
89 | install -c -m 0644 etc/disable-mgmt.inc $(DESTDIR)/$(sysconfdir)/firejail/. | 88 | install -c -m 0644 .etc/disable-mgmt.inc $(DESTDIR)/$(sysconfdir)/firejail/. |
90 | install -c -m 0644 etc/disable-secret.inc $(DESTDIR)/$(sysconfdir)/firejail/. | 89 | install -c -m 0644 .etc/disable-secret.inc $(DESTDIR)/$(sysconfdir)/firejail/. |
91 | install -c -m 0644 etc/disable-common.inc $(DESTDIR)/$(sysconfdir)/firejail/. | 90 | install -c -m 0644 .etc/disable-common.inc $(DESTDIR)/$(sysconfdir)/firejail/. |
92 | install -c -m 0644 etc/dropbox.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 91 | install -c -m 0644 .etc/dropbox.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
93 | install -c -m 0644 etc/opera.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 92 | install -c -m 0644 .etc/opera.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
94 | install -c -m 0644 etc/thunderbird.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 93 | install -c -m 0644 .etc/thunderbird.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
95 | install -c -m 0644 etc/transmission-gtk.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 94 | install -c -m 0644 .etc/transmission-gtk.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
96 | install -c -m 0644 etc/transmission-qt.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 95 | install -c -m 0644 .etc/transmission-qt.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
97 | install -c -m 0644 etc/vlc.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 96 | install -c -m 0644 .etc/vlc.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
98 | install -c -m 0644 etc/deluge.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 97 | install -c -m 0644 .etc/deluge.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
99 | install -c -m 0644 etc/qbittorrent.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 98 | install -c -m 0644 .etc/qbittorrent.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
100 | install -c -m 0644 etc/generic.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 99 | install -c -m 0644 .etc/generic.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
101 | install -c -m 0644 etc/pidgin.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 100 | install -c -m 0644 .etc/pidgin.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
102 | install -c -m 0644 etc/xchat.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 101 | install -c -m 0644 .etc/xchat.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
103 | install -c -m 0644 etc/empathy.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 102 | install -c -m 0644 .etc/empathy.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
104 | install -c -m 0644 etc/server.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 103 | install -c -m 0644 .etc/server.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
105 | install -c -m 0644 etc/icecat.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 104 | install -c -m 0644 .etc/icecat.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
106 | install -c -m 0644 etc/quassel.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 105 | install -c -m 0644 .etc/quassel.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
107 | install -c -m 0644 etc/deadbeef.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 106 | install -c -m 0644 .etc/deadbeef.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
108 | install -c -m 0644 etc/filezilla.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 107 | install -c -m 0644 .etc/filezilla.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
109 | install -c -m 0644 etc/fbreader.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 108 | install -c -m 0644 .etc/fbreader.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
110 | install -c -m 0644 etc/spotify.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 109 | install -c -m 0644 .etc/spotify.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
111 | install -c -m 0644 etc/steam.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 110 | install -c -m 0644 .etc/steam.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
112 | install -c -m 0644 etc/skype.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 111 | install -c -m 0644 .etc/skype.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
113 | install -c -m 0644 etc/wine.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 112 | install -c -m 0644 .etc/wine.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
114 | install -c -m 0644 etc/disable-devel.inc $(DESTDIR)/$(sysconfdir)/firejail/. | 113 | install -c -m 0644 .etc/disable-devel.inc $(DESTDIR)/$(sysconfdir)/firejail/. |
115 | install -c -m 0644 etc/conkeror.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 114 | install -c -m 0644 .etc/conkeror.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
116 | install -c -m 0644 etc/unbound.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 115 | install -c -m 0644 .etc/unbound.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
117 | install -c -m 0644 etc/dnscrypt-proxy.profile $(DESTDIR)/$(sysconfdir)/firejail/. | 116 | install -c -m 0644 .etc/dnscrypt-proxy.profile $(DESTDIR)/$(sysconfdir)/firejail/. |
118 | install -c -m 0644 etc/whitelist-common.inc $(DESTDIR)/$(sysconfdir)/firejail/. | 117 | install -c -m 0644 .etc/whitelist-common.inc $(DESTDIR)/$(sysconfdir)/firejail/. |
119 | bash -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;" | 118 | bash -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;" |
119 | rm -fr .etc | ||
120 | # man pages | 120 | # man pages |
121 | rm -f firejail.1.gz | 121 | rm -f firejail.1.gz |
122 | gzip -9n firejail.1 | 122 | gzip -9n firejail.1 |
@@ -3558,6 +3558,11 @@ fi | |||
3558 | 3558 | ||
3559 | 3559 | ||
3560 | 3560 | ||
3561 | # set sysconfdir | ||
3562 | if test "$prefix" = /usr; then | ||
3563 | sysconfdir="/etc" | ||
3564 | fi | ||
3565 | |||
3561 | ac_config_files="$ac_config_files Makefile src/lib/Makefile src/firejail/Makefile src/firemon/Makefile src/libtrace/Makefile src/ftee/Makefile" | 3566 | ac_config_files="$ac_config_files Makefile src/lib/Makefile src/firejail/Makefile src/firemon/Makefile src/libtrace/Makefile src/ftee/Makefile" |
3562 | 3567 | ||
3563 | cat >confcache <<\_ACEOF | 3568 | cat >confcache <<\_ACEOF |
@@ -4731,9 +4736,12 @@ fi | |||
4731 | echo | 4736 | echo |
4732 | echo "Configuration options:" | 4737 | echo "Configuration options:" |
4733 | echo " prefix: $prefix" | 4738 | echo " prefix: $prefix" |
4739 | echo " sysconfdir: $sysconfdir" | ||
4734 | echo " seccomp: $HAVE_SECCOMP" | 4740 | echo " seccomp: $HAVE_SECCOMP" |
4735 | echo " <linux/seccomp.h>: $HAVE_SECCOMP_H" | 4741 | echo " <linux/seccomp.h>: $HAVE_SECCOMP_H" |
4736 | echo " chroot: $HAVE_CHROOT" | 4742 | echo " chroot: $HAVE_CHROOT" |
4737 | echo " bind: $HAVE_BIND" | 4743 | echo " bind: $HAVE_BIND" |
4738 | echo " fatal warnings: $HAVE_FATAL_WARNINGS" | 4744 | echo " fatal warnings: $HAVE_FATAL_WARNINGS" |
4739 | echo | 4745 | echo |
4746 | |||
4747 | |||
diff --git a/configure.ac b/configure.ac index 589451cab..f7db96ee7 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -47,14 +47,22 @@ AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed | |||
47 | AC_CHECK_HEADER([linux/seccomp.h], HAVE_SECCOMP_H="-DHAVE_SECCOMP_H", HAVE_SECCOMP_H="") | 47 | AC_CHECK_HEADER([linux/seccomp.h], HAVE_SECCOMP_H="-DHAVE_SECCOMP_H", HAVE_SECCOMP_H="") |
48 | AC_SUBST(HAVE_SECCOMP_H) | 48 | AC_SUBST(HAVE_SECCOMP_H) |
49 | 49 | ||
50 | # set sysconfdir | ||
51 | if test "$prefix" = /usr; then | ||
52 | sysconfdir="/etc" | ||
53 | fi | ||
54 | |||
50 | AC_OUTPUT(Makefile src/lib/Makefile src/firejail/Makefile src/firemon/Makefile src/libtrace/Makefile src/ftee/Makefile) | 55 | AC_OUTPUT(Makefile src/lib/Makefile src/firejail/Makefile src/firemon/Makefile src/libtrace/Makefile src/ftee/Makefile) |
51 | 56 | ||
52 | echo | 57 | echo |
53 | echo "Configuration options:" | 58 | echo "Configuration options:" |
54 | echo " prefix: $prefix" | 59 | echo " prefix: $prefix" |
60 | echo " sysconfdir: $sysconfdir" | ||
55 | echo " seccomp: $HAVE_SECCOMP" | 61 | echo " seccomp: $HAVE_SECCOMP" |
56 | echo " <linux/seccomp.h>: $HAVE_SECCOMP_H" | 62 | echo " <linux/seccomp.h>: $HAVE_SECCOMP_H" |
57 | echo " chroot: $HAVE_CHROOT" | 63 | echo " chroot: $HAVE_CHROOT" |
58 | echo " bind: $HAVE_BIND" | 64 | echo " bind: $HAVE_BIND" |
59 | echo " fatal warnings: $HAVE_FATAL_WARNINGS" | 65 | echo " fatal warnings: $HAVE_FATAL_WARNINGS" |
60 | echo | 66 | echo |
67 | |||
68 | |||
diff --git a/mketc.sh b/mketc.sh new file mode 100755 index 000000000..7b86a69e4 --- /dev/null +++ b/mketc.sh | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/bash | ||
2 | rm -fr .etc | ||
3 | mkdir .etc | ||
4 | |||
5 | result=$(echo $1 | sed 's/\//\\\//g') | ||
6 | echo $result | ||
7 | |||
8 | FILES=`ls etc/*.profile` | ||
9 | for file in $FILES | ||
10 | do | ||
11 | sed "s/\/etc/$result/g" $file > .$file | ||
12 | done | ||
13 | |||
14 | FILES=`ls etc/*.inc` | ||
15 | for file in $FILES | ||
16 | do | ||
17 | sed "s/\/etc/$result/g" $file > .$file | ||
18 | done | ||
diff --git a/src/firejail/Makefile.in b/src/firejail/Makefile.in index 255784ac7..c2663f1a9 100644 --- a/src/firejail/Makefile.in +++ b/src/firejail/Makefile.in | |||
@@ -3,6 +3,7 @@ all: firejail | |||
3 | prefix=@prefix@ | 3 | prefix=@prefix@ |
4 | exec_prefix=@exec_prefix@ | 4 | exec_prefix=@exec_prefix@ |
5 | libdir=@libdir@ | 5 | libdir=@libdir@ |
6 | sysconfdir=@sysconfdir@ | ||
6 | 7 | ||
7 | VERSION=@PACKAGE_VERSION@ | 8 | VERSION=@PACKAGE_VERSION@ |
8 | NAME=@PACKAGE_NAME@ | 9 | NAME=@PACKAGE_NAME@ |
@@ -12,11 +13,12 @@ HAVE_CHROOT=@HAVE_CHROOT@ | |||
12 | HAVE_BIND=@HAVE_BIND@ | 13 | HAVE_BIND=@HAVE_BIND@ |
13 | HAVE_FATAL_WARNINGS=@HAVE_FATAL_WARNINGS@ | 14 | HAVE_FATAL_WARNINGS=@HAVE_FATAL_WARNINGS@ |
14 | 15 | ||
16 | |||
15 | H_FILE_LIST = $(wildcard *.[h]) | 17 | H_FILE_LIST = $(wildcard *.[h]) |
16 | C_FILE_LIST = $(wildcard *.c) | 18 | C_FILE_LIST = $(wildcard *.c) |
17 | OBJS = $(C_FILE_LIST:.c=.o) | 19 | OBJS = $(C_FILE_LIST:.c=.o) |
18 | BINOBJS = $(foreach file, $(OBJS), $file) | 20 | BINOBJS = $(foreach file, $(OBJS), $file) |
19 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' -DPREFIX='"$(prefix)"' -DLIBDIR='"$(libdir)"' $(HAVE_SECCOMP) $(HAVE_SECCOMP_H) $(HAVE_CHROOT) $(HAVE_BIND) -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -pie -Wformat -Wformat-security | 21 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' $(HAVE_SECCOMP) $(HAVE_SECCOMP_H) $(HAVE_CHROOT) $(HAVE_BIND) -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -pie -Wformat -Wformat-security |
20 | LDFLAGS += -pie -Wl,-z,relro -Wl,-z,now -lpthread | 22 | LDFLAGS += -pie -Wl,-z,relro -Wl,-z,now -lpthread |
21 | 23 | ||
22 | %.o : %.c $(H_FILE_LIST) | 24 | %.o : %.c $(H_FILE_LIST) |
diff --git a/src/firejail/main.c b/src/firejail/main.c index 601999db5..3a2da0852 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -1222,7 +1222,7 @@ int main(int argc, char **argv) { | |||
1222 | } | 1222 | } |
1223 | if (!custom_profile) { | 1223 | if (!custom_profile) { |
1224 | // look for a user profile in /etc/firejail directory | 1224 | // look for a user profile in /etc/firejail directory |
1225 | int rv = profile_find(cfg.command_name, "/etc/firejail"); | 1225 | int rv = profile_find(cfg.command_name, SYSCONFDIR); |
1226 | custom_profile = rv; | 1226 | custom_profile = rv; |
1227 | } | 1227 | } |
1228 | } | 1228 | } |
@@ -1252,7 +1252,7 @@ int main(int argc, char **argv) { | |||
1252 | 1252 | ||
1253 | if (!custom_profile) { | 1253 | if (!custom_profile) { |
1254 | // look for the profile in /etc/firejail directory | 1254 | // look for the profile in /etc/firejail directory |
1255 | custom_profile = profile_find(profile_name, "/etc/firejail"); | 1255 | custom_profile = profile_find(profile_name, SYSCONFDIR); |
1256 | } | 1256 | } |
1257 | 1257 | ||
1258 | if (custom_profile && !arg_quiet) | 1258 | if (custom_profile && !arg_quiet) |
diff --git a/src/firejail/profile.c b/src/firejail/profile.c index 5ab6bc776..de89cf40f 100644 --- a/src/firejail/profile.c +++ b/src/firejail/profile.c | |||
@@ -429,7 +429,7 @@ void profile_read(const char *fname) { | |||
429 | // open profile file: | 429 | // open profile file: |
430 | FILE *fp = fopen(fname, "r"); | 430 | FILE *fp = fopen(fname, "r"); |
431 | if (fp == NULL) { | 431 | if (fp == NULL) { |
432 | fprintf(stderr, "Error: cannot open profile file\n"); | 432 | fprintf(stderr, "Error: cannot open profile file %s\n", fname); |
433 | exit(1); | 433 | exit(1); |
434 | } | 434 | } |
435 | 435 | ||
diff --git a/src/firejail/restricted_shell.c b/src/firejail/restricted_shell.c index 72354d71b..5b1ce12e0 100644 --- a/src/firejail/restricted_shell.c +++ b/src/firejail/restricted_shell.c | |||
@@ -27,7 +27,11 @@ int restricted_shell(const char *user) { | |||
27 | assert(user); | 27 | assert(user); |
28 | 28 | ||
29 | // open profile file: | 29 | // open profile file: |
30 | FILE *fp = fopen("/etc/firejail/login.users", "r"); | 30 | char *fname; |
31 | if (asprintf(&fname, "%s/login.users", SYSCONFDIR) == -1) | ||
32 | errExit("asprintf"); | ||
33 | FILE *fp = fopen(fname, "r"); | ||
34 | free(fname); | ||
31 | if (fp == NULL) | 35 | if (fp == NULL) |
32 | return 0; | 36 | return 0; |
33 | 37 | ||