diff options
author | 2022-03-14 00:09:34 +0100 | |
---|---|---|
committer | 2022-03-14 00:09:34 +0100 | |
commit | 932a13ab28c7a6fe91f207ca18faaca55d748f3e (patch) | |
tree | d7bca42c7b9a8abd9cc5fef361d43f5cc861517b /src | |
parent | fbuilder: update man page (diff) | |
download | firejail-932a13ab28c7a6fe91f207ca18faaca55d748f3e.tar.gz firejail-932a13ab28c7a6fe91f207ca18faaca55d748f3e.tar.zst firejail-932a13ab28c7a6fe91f207ca18faaca55d748f3e.zip |
fbuilder: fix private-etc
Diffstat (limited to 'src')
-rw-r--r-- | src/fbuilder/build_fs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fbuilder/build_fs.c b/src/fbuilder/build_fs.c index ce01648e1..88b5eaad3 100644 --- a/src/fbuilder/build_fs.c +++ b/src/fbuilder/build_fs.c | |||
@@ -134,18 +134,18 @@ static void etc_callback(char *ptr) { | |||
134 | 134 | ||
135 | // extract the directory: | 135 | // extract the directory: |
136 | assert(strncmp(ptr, "/etc", 4) == 0); | 136 | assert(strncmp(ptr, "/etc", 4) == 0); |
137 | char *p1 = ptr + 4; | 137 | ptr += 4; |
138 | if (*p1 != '/') | 138 | if (*ptr != '/') |
139 | return; | 139 | return; |
140 | p1++; | 140 | ptr++; |
141 | 141 | ||
142 | if (*p1 == '/') // double '/' | 142 | if (*ptr == '/') // double '/' |
143 | p1++; | 143 | ptr++; |
144 | if (*p1 == '\0') | 144 | if (*ptr == '\0') |
145 | return; | 145 | return; |
146 | 146 | ||
147 | // add only top files and directories | 147 | // add only top files and directories |
148 | char *end = strchr(p1, '/'); | 148 | char *end = strchr(ptr, '/'); |
149 | if (end) | 149 | if (end) |
150 | *end = '\0'; | 150 | *end = '\0'; |
151 | etc_out = filedb_add(etc_out, ptr); | 151 | etc_out = filedb_add(etc_out, ptr); |