From c8a6bd99227ca59b48fafa66f2a21ddb86096d9e Mon Sep 17 00:00:00 2001
From: dd
Date: Wed, 27 Feb 2002 04:45:37 +0000
Subject: Introduce a version field to `struct xucred' in place of one of the
spares (the size of the field was changed from u_short to u_int to reflect
what it really ends up being). Accordingly, change users of xucred to set
and check this field as appropriate. In the kernel, this is being done
inside the new cru2x() routine which takes a `struct ucred' and fills out a
`struct xucred' according to the former. This also has the pleasant
sideaffect of removing some duplicate code.
Reviewed by: rwatson
---
usr.sbin/mountd/mountd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'usr.sbin/mountd')
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index b3f220e..862b61b 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -211,7 +211,7 @@ struct mountlist *mlhead;
struct grouplist *grphead;
char exname[MAXPATHLEN];
struct xucred def_anon = {
- 0,
+ XUCRED_VERSION,
(uid_t)-2,
1,
{ (gid_t)-2 },
@@ -2050,6 +2050,7 @@ parsecred(namelist, cr)
struct group *gr;
int ngroups, groups[NGROUPS + 1];
+ cr->cr_version = XUCRED_VERSION;
/*
* Set up the unprivileged user.
*/
--
cgit v1.1