Skip to content

Commit

Permalink
Remove unnecessary linux/limits.h include
Browse files Browse the repository at this point in the history
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 4f003da
("prevent leaking user information by modifying /home directory,
/etc/passwd and /etc/group") and for every other file, it's on commit
1379851 ("Baseline firejail 0.9.28").

Relates to netblue30#4578.
  • Loading branch information
kmk3 committed Sep 28, 2021
1 parent 2d6ea74 commit ac78207
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/firejail/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <sys/wait.h>
#include <linux/limits.h>
#include <fnmatch.h>
#include <glob.h>
#include <dirent.h>
Expand Down
1 change: 0 additions & 1 deletion src/firejail/fs_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "firejail.h"
#include <sys/mount.h>
#include <sys/stat.h>
#include <linux/limits.h>
#include <glob.h>
#include <dirent.h>
#include <fcntl.h>
Expand Down
1 change: 0 additions & 1 deletion src/firejail/fs_home.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
#include "firejail.h"
#include <sys/mount.h>
#include <linux/limits.h>
#include <dirent.h>
#include <errno.h>
#include <sys/stat.h>
Expand Down
1 change: 0 additions & 1 deletion src/firejail/fs_hostname.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "firejail.h"
#include <sys/mount.h>
#include <sys/stat.h>
#include <linux/limits.h>
#include <glob.h>
#include <dirent.h>
#include <fcntl.h>
Expand Down
1 change: 0 additions & 1 deletion src/firejail/fs_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "firejail.h"
#include <sys/mount.h>
#include <sys/stat.h>
#include <linux/limits.h>
#include <glob.h>
#include <dirent.h>
#include <fcntl.h>
Expand Down
1 change: 0 additions & 1 deletion src/firejail/fs_var.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "firejail.h"
#include <sys/mount.h>
#include <sys/stat.h>
#include <linux/limits.h>
#include <glob.h>
#include <dirent.h>
#include <fcntl.h>
Expand Down
1 change: 0 additions & 1 deletion src/firejail/restrict_users.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "../include/firejail_user.h"
#include <sys/mount.h>
#include <sys/stat.h>
#include <linux/limits.h>
#include <fnmatch.h>
#include <glob.h>
#include <dirent.h>
Expand Down

0 comments on commit ac78207

Please sign in to comment.