diff options
author | 2021-01-24 11:49:48 -0500 | |
---|---|---|
committer | 2021-01-24 11:49:48 -0500 | |
commit | ec29c6acad2370c5aed10c94b431d7bf6e421a90 (patch) | |
tree | b8f38ac91f99c723016d5d01c651a4cadb2d3124 /src | |
parent | Update vmware.profile (#3913) (diff) | |
download | firejail-ec29c6acad2370c5aed10c94b431d7bf6e421a90.tar.gz firejail-ec29c6acad2370c5aed10c94b431d7bf6e421a90.tar.zst firejail-ec29c6acad2370c5aed10c94b431d7bf6e421a90.zip |
profstats
Diffstat (limited to 'src')
-rw-r--r-- | src/profstats/main.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/profstats/main.c b/src/profstats/main.c index 4c1221464..1380c87f7 100644 --- a/src/profstats/main.c +++ b/src/profstats/main.c | |||
@@ -30,6 +30,8 @@ static int cnt_seccomp = 0; | |||
30 | static int cnt_caps = 0; | 30 | static int cnt_caps = 0; |
31 | static int cnt_dbus_system_none = 0; | 31 | static int cnt_dbus_system_none = 0; |
32 | static int cnt_dbus_user_none = 0; | 32 | static int cnt_dbus_user_none = 0; |
33 | static int cnt_dbus_system_filter = 0; | ||
34 | static int cnt_dbus_user_filter = 0; | ||
33 | static int cnt_dotlocal = 0; | 35 | static int cnt_dotlocal = 0; |
34 | static int cnt_globalsdotlocal = 0; | 36 | static int cnt_globalsdotlocal = 0; |
35 | static int cnt_netnone = 0; | 37 | static int cnt_netnone = 0; |
@@ -152,8 +154,12 @@ void process_file(const char *fname) { | |||
152 | cnt_privateetc++; | 154 | cnt_privateetc++; |
153 | else if (strncmp(ptr, "dbus-system none", 16) == 0) | 155 | else if (strncmp(ptr, "dbus-system none", 16) == 0) |
154 | cnt_dbus_system_none++; | 156 | cnt_dbus_system_none++; |
157 | else if (strncmp(ptr, "dbus-system", 11) == 0) | ||
158 | cnt_dbus_system_filter++; | ||
155 | else if (strncmp(ptr, "dbus-user none", 14) == 0) | 159 | else if (strncmp(ptr, "dbus-user none", 14) == 0) |
156 | cnt_dbus_user_none++; | 160 | cnt_dbus_user_none++; |
161 | else if (strncmp(ptr, "dbus-user", 9) == 0) | ||
162 | cnt_dbus_user_filter++; | ||
157 | else if (strncmp(ptr, "include ", 8) == 0) { | 163 | else if (strncmp(ptr, "include ", 8) == 0) { |
158 | // not processing .local files | 164 | // not processing .local files |
159 | if (strstr(ptr, ".local")) { | 165 | if (strstr(ptr, ".local")) { |
@@ -257,7 +263,9 @@ int main(int argc, char **argv) { | |||
257 | int whitelistrunuser = cnt_whitelistrunuser; | 263 | int whitelistrunuser = cnt_whitelistrunuser; |
258 | int whitelistusrshare = cnt_whitelistusrshare; | 264 | int whitelistusrshare = cnt_whitelistusrshare; |
259 | int dbussystemnone = cnt_dbus_system_none; | 265 | int dbussystemnone = cnt_dbus_system_none; |
266 | int dbussystemfilter = cnt_dbus_system_filter; | ||
260 | int dbususernone = cnt_dbus_user_none; | 267 | int dbususernone = cnt_dbus_user_none; |
268 | int dbususerfilter = cnt_dbus_user_filter; | ||
261 | int ssh = cnt_ssh; | 269 | int ssh = cnt_ssh; |
262 | int mdwx = cnt_mdwx; | 270 | int mdwx = cnt_mdwx; |
263 | 271 | ||
@@ -278,6 +286,16 @@ int main(int argc, char **argv) { | |||
278 | cnt_globalsdotlocal = globalsdotlocal + 1; | 286 | cnt_globalsdotlocal = globalsdotlocal + 1; |
279 | if (cnt_whitelistrunuser > (whitelistrunuser + 1)) | 287 | if (cnt_whitelistrunuser > (whitelistrunuser + 1)) |
280 | cnt_whitelistrunuser = whitelistrunuser + 1; | 288 | cnt_whitelistrunuser = whitelistrunuser + 1; |
289 | if (cnt_seccomp > (seccomp + 1)) | ||
290 | cnt_seccomp = seccomp + 1; | ||
291 | if (cnt_dbus_user_none > (dbususernone + 1)) | ||
292 | cnt_dbus_user_none = dbususernone + 1; | ||
293 | if (cnt_dbus_user_filter > (dbususerfilter + 1)) | ||
294 | cnt_dbus_user_filter = dbususerfilter + 1; | ||
295 | if (cnt_dbus_system_none > (dbussystemnone + 1)) | ||
296 | cnt_dbus_system_none = dbussystemnone + 1; | ||
297 | if (cnt_dbus_system_filter > (dbussystemfilter + 1)) | ||
298 | cnt_dbus_system_filter = dbussystemfilter + 1; | ||
281 | 299 | ||
282 | if (arg_dbus_system_none && dbussystemnone == cnt_dbus_system_none) | 300 | if (arg_dbus_system_none && dbussystemnone == cnt_dbus_system_none) |
283 | printf("No dbus-system none found in %s\n", argv[i]); | 301 | printf("No dbus-system none found in %s\n", argv[i]); |
@@ -337,7 +355,9 @@ int main(int argc, char **argv) { | |||
337 | printf(" whitelist usr/share\t\t%d (include whitelist-usr-share-common.inc\n", cnt_whitelistusrshare); | 355 | printf(" whitelist usr/share\t\t%d (include whitelist-usr-share-common.inc\n", cnt_whitelistusrshare); |
338 | printf(" net none\t\t\t%d\n", cnt_netnone); | 356 | printf(" net none\t\t\t%d\n", cnt_netnone); |
339 | printf(" dbus-user none \t\t%d\n", cnt_dbus_user_none); | 357 | printf(" dbus-user none \t\t%d\n", cnt_dbus_user_none); |
358 | printf(" dbus-user filter \t\t%d\n", cnt_dbus_user_filter); | ||
340 | printf(" dbus-system none \t\t%d\n", cnt_dbus_system_none); | 359 | printf(" dbus-system none \t\t%d\n", cnt_dbus_system_none); |
360 | printf(" dbus-system filter \t\t%d\n", cnt_dbus_system_filter); | ||
341 | printf("\n"); | 361 | printf("\n"); |
342 | return 0; | 362 | return 0; |
343 | } | 363 | } |