aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linprocfs/linprocfs.c
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2020-10-23 11:57:55 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2020-10-23 11:57:55 +0000
commit7135ca98d23b23ea817dadcdfb4425e878a2bc03 (patch)
tree847d949406e79a0537149caf109b80c769d1c2f4 /sys/compat/linprocfs/linprocfs.c
parentc77b04884c194674fd1118df3ede99b3524556f5 (diff)
Add /proc/sys/kernel/ngroups_max to linprocfs(4). The id(1) command
seems to use it - it works fine without it, but still. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26898
Notes
Notes: svn path=/head/; revision=366966
Diffstat (limited to 'sys/compat/linprocfs/linprocfs.c')
-rw-r--r--sys/compat/linprocfs/linprocfs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index c95661d52940..b346fe84f7ce 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -1453,6 +1453,19 @@ linprocfs_domsgmnb(PFS_FILL_ARGS)
}
/*
+ * Filler function for proc/sys/kernel/ngroups_max
+ *
+ * Note that in Linux it defaults to 65536, not 1023.
+ */
+static int
+linprocfs_dongroups_max(PFS_FILL_ARGS)
+{
+
+ sbuf_printf(sb, "%d\n", ngroups_max);
+ return (0);
+}
+
+/*
* Filler function for proc/sys/kernel/pid_max
*/
static int
@@ -1922,6 +1935,8 @@ linprocfs_init(PFS_INIT_ARGS)
NULL, NULL, NULL, PFS_RD);
pfs_create_file(dir, "msgmnb", &linprocfs_domsgmnb,
NULL, NULL, NULL, PFS_RD);
+ pfs_create_file(dir, "ngroups_max", &linprocfs_dongroups_max,
+ NULL, NULL, NULL, PFS_RD);
pfs_create_file(dir, "pid_max", &linprocfs_dopid_max,
NULL, NULL, NULL, PFS_RD);
pfs_create_file(dir, "sem", &linprocfs_dosem,