From 76183f345377df655cfb357a53d52aa045fa8073 Mon Sep 17 00:00:00 2001
From: Dima Dorfman
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/inetd/builtins.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'usr.sbin/inetd/builtins.c')
diff --git a/usr.sbin/inetd/builtins.c b/usr.sbin/inetd/builtins.c
index 433c645aadc3..08c3c567bbea 100644
--- a/usr.sbin/inetd/builtins.c
+++ b/usr.sbin/inetd/builtins.c
@@ -569,7 +569,7 @@ ident_stream(s, sep) /* Ident service (AKA "auth") */
getcredfail = EAFNOSUPPORT;
break;
}
- if (getcredfail != 0) {
+ if (getcredfail != 0 || uc.cr_version != XUCRED_VERSION) {
if (*idbuf == '\0')
iderror(lport, fport, s,
getcredfail == ENOENT ? ID_NOUSER : ID_UNKNOWN);
--
cgit v1.2.3