diff options
author | Rick Macklem <rmacklem@FreeBSD.org> | 2020-06-16 02:35:30 +0000 |
---|---|---|
committer | Rick Macklem <rmacklem@FreeBSD.org> | 2020-06-16 02:35:30 +0000 |
commit | 3e2d36ffa6c58c0f4e3ef57bbe85a9e8e403a1f0 (patch) | |
tree | 9591dfce9545229af8e598fd9ae28ceffd965242 /usr.sbin/mountd | |
parent | 2ed5e42378c913c806dfec93998d9fcb8b15191b (diff) | |
download | src-3e2d36ffa6c58c0f4e3ef57bbe85a9e8e403a1f0.tar.gz src-3e2d36ffa6c58c0f4e3ef57bbe85a9e8e403a1f0.zip |
Make use of the UID_NOBODY and GID_NOGROUP definitions in sys/conf.h.
r362214 exposed UID_NOBODY and GID_NOGROUP to userspace, so use them
instead of the numbers.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D25281
Notes
Notes:
svn path=/head/; revision=362215
Diffstat (limited to 'usr.sbin/mountd')
-rw-r--r-- | usr.sbin/mountd/mountd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index c03d6fbd1735..ce059ca81f4e 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; __FBSDID("$FreeBSD$"); #include <sys/param.h> +#include <sys/conf.h> #include <sys/fcntl.h> #include <sys/fnv_hash.h> #include <sys/linker.h> @@ -1525,9 +1526,9 @@ get_exportlist_one(int passno) * Set defaults. */ has_host = FALSE; - anon.cr_uid = 65534; + anon.cr_uid = UID_NOBODY; anon.cr_ngroups = 1; - anon.cr_groups[0] = 65533; + anon.cr_groups[0] = GID_NOGROUP; exflags = MNT_EXPORTED; got_nondir = 0; opt_flags = 0; @@ -3456,8 +3457,8 @@ parsecred(char *namelist, struct expcred *cr) /* * Set up the unprivileged user. */ - cr->cr_uid = 65534; - cr->cr_groups[0] = 65533; + cr->cr_uid = UID_NOBODY; + cr->cr_groups[0] = GID_NOGROUP; cr->cr_ngroups = 1; /* * Get the user's password table entry. |