diff options
author | 2022-03-13 21:09:05 +0100 | |
---|---|---|
committer | 2022-03-13 21:09:42 +0100 | |
commit | 676d928bc6ba61cc3776f2a82d49ea1243bb6d76 (patch) | |
tree | da6ff393930c021fd4d848b113b56b819fab3bb9 /src/fbuilder/build_fs.c | |
parent | minor cleanups, no functional changes (#5040) (diff) | |
download | firejail-676d928bc6ba61cc3776f2a82d49ea1243bb6d76.tar.gz firejail-676d928bc6ba61cc3776f2a82d49ea1243bb6d76.tar.zst firejail-676d928bc6ba61cc3776f2a82d49ea1243bb6d76.zip |
fbuilder: consider unix sockets
Diffstat (limited to 'src/fbuilder/build_fs.c')
-rw-r--r-- | src/fbuilder/build_fs.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/fbuilder/build_fs.c b/src/fbuilder/build_fs.c index ede96c9b4..f7cf840c2 100644 --- a/src/fbuilder/build_fs.c +++ b/src/fbuilder/build_fs.c | |||
@@ -68,8 +68,23 @@ static void process_file(const char *fname, const char *dir, void (*callback)(ch | |||
68 | ptr += 7; | 68 | ptr += 7; |
69 | else if (strncmp(ptr, "open ", 5) == 0) | 69 | else if (strncmp(ptr, "open ", 5) == 0) |
70 | ptr += 5; | 70 | ptr += 5; |
71 | else if (strncmp(ptr, "opendir ", 8) == 0) | ||
72 | ptr += 8; | ||
73 | else if (strncmp(ptr, "connect ", 8) == 0) { | ||
74 | ptr += 8; | ||
75 | // file descriptor argument | ||
76 | if (!isdigit(*ptr)) | ||
77 | continue; | ||
78 | while (isdigit(*ptr)) | ||
79 | ptr++; | ||
80 | if (*ptr++ != ' ') | ||
81 | continue; | ||
82 | if (*ptr != '/') | ||
83 | continue; | ||
84 | } | ||
71 | else | 85 | else |
72 | continue; | 86 | continue; |
87 | |||
73 | if (strncmp(ptr, dir, dir_len) != 0) | 88 | if (strncmp(ptr, dir, dir_len) != 0) |
74 | continue; | 89 | continue; |
75 | 90 | ||