sys/rpc: UNIX auth: Style: Remove unnecessary headers, minor changes

MFC after:      2 days
Sponsored by:   The FreeBSD Foundation
This commit is contained in:
Olivier Certner
2025-10-07 19:10:12 +02:00
parent 4ae70c3ea4
commit a4105a5d4e
2 changed files with 4 additions and 10 deletions
+3 -7
View File
@@ -30,7 +30,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* authunix_prot.c
* XDR for UNIX style authentication parameters for RPC
@@ -40,8 +39,7 @@
#include <sys/param.h>
#include <sys/jail.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/libkern.h>
#include <sys/ucred.h>
#include <rpc/types.h>
@@ -70,12 +68,10 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred)
namelen = strlen(hostbuf);
if (namelen > AUTH_SYS_MAX_HOSTNAME)
namelen = AUTH_SYS_MAX_HOSTNAME;
} else {
} else
namelen = 0;
}
if (!xdr_uint32_t(xdrs, time)
|| !xdr_uint32_t(xdrs, &namelen))
if (!xdr_uint32_t(xdrs, time) || !xdr_uint32_t(xdrs, &namelen))
return (FALSE);
/*
+1 -3
View File
@@ -41,8 +41,6 @@
*/
#include <sys/param.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/systm.h>
#include <sys/ucred.h>
@@ -131,7 +129,7 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg)
buf++;
}
xcr->cr_ngroups = MIN(supp_ngroups + 1, XU_NGROUPS);
} else if (! xdr_authunix_parms(&xdrs, &time, xcr))
} else if (!xdr_authunix_parms(&xdrs, &time, xcr))
goto badcred;
rqst->rq_verf = _null_auth;