diff options
author | 2021-09-27 23:42:43 -0300 | |
---|---|---|
committer | 2021-09-28 09:47:57 -0300 | |
commit | ac78207f7c578cb1464bf7abcf9f605a675a7164 (patch) | |
tree | 963894598c1a0eed2b31796111705960559efa0f | |
parent | main.c: remove unnecessary limits.h include (diff) | |
download | firejail-ac78207f7c578cb1464bf7abcf9f605a675a7164.tar.gz firejail-ac78207f7c578cb1464bf7abcf9f605a675a7164.tar.zst firejail-ac78207f7c578cb1464bf7abcf9f605a675a7164.zip |
Remove unnecessary linux/limits.h include
None of the files affected use any macros from linux/limits.h:
$ git grep -Fl 'NGROUPS_MAX
ARG_MAX
LINK_MAX
MAX_CANON
MAX_INPUT
NAME_MAX
PATH_MAX
PIPE_BUF
XATTR_NAME_MAX
XATTR_SIZE_MAX
XATTR_LIST_MAX
RTSIG_MAX' -- src
src/firejail/cmdline.c
src/firejail/firejail.h
src/libtrace/libtrace.c
src/libtracelog/libtracelog.c
Environment:
$ grep '^NAME' /etc/os-release
NAME="Artix Linux"
$ pacman -Qo /usr/include/linux/limits.h
/usr/include/linux/limits.h is owned by linux-api-headers 5.12.3-1
Note: This include has been present on all of the affected files since
their inception. For restrict_users.c, that's on commit 4f003daec
("prevent leaking user information by modifying /home directory,
/etc/passwd and /etc/group") and for every other file, it's on commit
137985136 ("Baseline firejail 0.9.28").
Relates to #4578.
-rw-r--r-- | src/firejail/fs.c | 1 | ||||
-rw-r--r-- | src/firejail/fs_dev.c | 1 | ||||
-rw-r--r-- | src/firejail/fs_home.c | 1 | ||||
-rw-r--r-- | src/firejail/fs_hostname.c | 1 | ||||
-rw-r--r-- | src/firejail/fs_trace.c | 1 | ||||
-rw-r--r-- | src/firejail/fs_var.c | 1 | ||||
-rw-r--r-- | src/firejail/restrict_users.c | 1 |
7 files changed, 0 insertions, 7 deletions
diff --git a/src/firejail/fs.c b/src/firejail/fs.c index dd4c2139d..7e0a6e347 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <sys/stat.h> | 23 | #include <sys/stat.h> |
24 | #include <sys/statvfs.h> | 24 | #include <sys/statvfs.h> |
25 | #include <sys/wait.h> | 25 | #include <sys/wait.h> |
26 | #include <linux/limits.h> | ||
27 | #include <fnmatch.h> | 26 | #include <fnmatch.h> |
28 | #include <glob.h> | 27 | #include <glob.h> |
29 | #include <dirent.h> | 28 | #include <dirent.h> |
diff --git a/src/firejail/fs_dev.c b/src/firejail/fs_dev.c index 8cc3ecc62..d8bb1aded 100644 --- a/src/firejail/fs_dev.c +++ b/src/firejail/fs_dev.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include "firejail.h" | 20 | #include "firejail.h" |
21 | #include <sys/mount.h> | 21 | #include <sys/mount.h> |
22 | #include <sys/stat.h> | 22 | #include <sys/stat.h> |
23 | #include <linux/limits.h> | ||
24 | #include <glob.h> | 23 | #include <glob.h> |
25 | #include <dirent.h> | 24 | #include <dirent.h> |
26 | #include <fcntl.h> | 25 | #include <fcntl.h> |
diff --git a/src/firejail/fs_home.c b/src/firejail/fs_home.c index 0ed476063..45889b27f 100644 --- a/src/firejail/fs_home.c +++ b/src/firejail/fs_home.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | #include "firejail.h" | 20 | #include "firejail.h" |
21 | #include <sys/mount.h> | 21 | #include <sys/mount.h> |
22 | #include <linux/limits.h> | ||
23 | #include <dirent.h> | 22 | #include <dirent.h> |
24 | #include <errno.h> | 23 | #include <errno.h> |
25 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
diff --git a/src/firejail/fs_hostname.c b/src/firejail/fs_hostname.c index 7d320e90b..f7ce8c18f 100644 --- a/src/firejail/fs_hostname.c +++ b/src/firejail/fs_hostname.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include "firejail.h" | 20 | #include "firejail.h" |
21 | #include <sys/mount.h> | 21 | #include <sys/mount.h> |
22 | #include <sys/stat.h> | 22 | #include <sys/stat.h> |
23 | #include <linux/limits.h> | ||
24 | #include <glob.h> | 23 | #include <glob.h> |
25 | #include <dirent.h> | 24 | #include <dirent.h> |
26 | #include <fcntl.h> | 25 | #include <fcntl.h> |
diff --git a/src/firejail/fs_trace.c b/src/firejail/fs_trace.c index 475a391ec..9463fbcd0 100644 --- a/src/firejail/fs_trace.c +++ b/src/firejail/fs_trace.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include "firejail.h" | 20 | #include "firejail.h" |
21 | #include <sys/mount.h> | 21 | #include <sys/mount.h> |
22 | #include <sys/stat.h> | 22 | #include <sys/stat.h> |
23 | #include <linux/limits.h> | ||
24 | #include <glob.h> | 23 | #include <glob.h> |
25 | #include <dirent.h> | 24 | #include <dirent.h> |
26 | #include <fcntl.h> | 25 | #include <fcntl.h> |
diff --git a/src/firejail/fs_var.c b/src/firejail/fs_var.c index 20e262d80..5ba38d46c 100644 --- a/src/firejail/fs_var.c +++ b/src/firejail/fs_var.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include "firejail.h" | 20 | #include "firejail.h" |
21 | #include <sys/mount.h> | 21 | #include <sys/mount.h> |
22 | #include <sys/stat.h> | 22 | #include <sys/stat.h> |
23 | #include <linux/limits.h> | ||
24 | #include <glob.h> | 23 | #include <glob.h> |
25 | #include <dirent.h> | 24 | #include <dirent.h> |
26 | #include <fcntl.h> | 25 | #include <fcntl.h> |
diff --git a/src/firejail/restrict_users.c b/src/firejail/restrict_users.c index 6f17231a4..59077dada 100644 --- a/src/firejail/restrict_users.c +++ b/src/firejail/restrict_users.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include "../include/firejail_user.h" | 21 | #include "../include/firejail_user.h" |
22 | #include <sys/mount.h> | 22 | #include <sys/mount.h> |
23 | #include <sys/stat.h> | 23 | #include <sys/stat.h> |
24 | #include <linux/limits.h> | ||
25 | #include <fnmatch.h> | 24 | #include <fnmatch.h> |
26 | #include <glob.h> | 25 | #include <glob.h> |
27 | #include <dirent.h> | 26 | #include <dirent.h> |