aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2021-01-24 19:01:33 -0500
committerLibravatar netblue30 <netblue30@protonmail.com>2021-01-24 19:01:33 -0500
commit43aa71f8c608ec5bd92fd2c7323c603fa37f6d30 (patch)
treea8c7f46f1d530ac9c3e3cbccb6d9bdd6345ad3be /src
parentprofstats (diff)
downloadfirejail-43aa71f8c608ec5bd92fd2c7323c603fa37f6d30.tar.gz
firejail-43aa71f8c608ec5bd92fd2c7323c603fa37f6d30.tar.zst
firejail-43aa71f8c608ec5bd92fd2c7323c603fa37f6d30.zip
fix #3914
Diffstat (limited to 'src')
-rw-r--r--src/profstats/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/profstats/main.c b/src/profstats/main.c
index 1380c87f7..68f62831b 100644
--- a/src/profstats/main.c
+++ b/src/profstats/main.c
@@ -109,6 +109,7 @@ void process_file(const char *fname) {
109 return; 109 return;
110 } 110 }
111 111
112 int have_include_local = 0;
112 char buf[MAXBUF]; 113 char buf[MAXBUF];
113 while (fgets(buf, MAXBUF, fp)) { 114 while (fgets(buf, MAXBUF, fp)) {
114 char *ptr = strchr(buf, '\n'); 115 char *ptr = strchr(buf, '\n');
@@ -163,6 +164,7 @@ void process_file(const char *fname) {
163 else if (strncmp(ptr, "include ", 8) == 0) { 164 else if (strncmp(ptr, "include ", 8) == 0) {
164 // not processing .local files 165 // not processing .local files
165 if (strstr(ptr, ".local")) { 166 if (strstr(ptr, ".local")) {
167 have_include_local = 1;
166//printf("dotlocal %d, level %d - #%s#, redirect #%s#\n", cnt_dotlocal, level, fname, buf + 8); 168//printf("dotlocal %d, level %d - #%s#, redirect #%s#\n", cnt_dotlocal, level, fname, buf + 8);
167 if (strstr(ptr, "globals.local")) 169 if (strstr(ptr, "globals.local"))
168 cnt_globalsdotlocal++; 170 cnt_globalsdotlocal++;
@@ -180,6 +182,8 @@ void process_file(const char *fname) {
180 } 182 }
181 183
182 fclose(fp); 184 fclose(fp);
185 if (!have_include_local)
186 printf("No include .local found in %s\n", fname);
183 level--; 187 level--;
184} 188}
185 189