aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2025-10-07 17:10:12 +0000
committerColin Percival <cperciva@FreeBSD.org>2025-10-16 18:48:21 +0000
commit2dda215652e315f12e2db2dd1b1d04af5899c1fb (patch)
treee124dac699847e4707843ac0256f81bf601ab5a0
parent082e48e81bd10237e534c9ba88d270abb9351a36 (diff)
sys/rpc: UNIX auth: Style: Remove unnecessary headers, minor changes
Approved by: re (cperciva) MFC after: 2 days Sponsored by: The FreeBSD Foundation (cherry picked from commit a4105a5d4e179aa1ef661ee45d6008e83fefd2a7) (cherry picked from commit d06658b8066d1c3af400db33896a493be2ebdfab)
-rw-r--r--sys/rpc/authunix_prot.c10
-rw-r--r--sys/rpc/svc_auth_unix.c4
2 files changed, 4 insertions, 10 deletions
diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c
index 0274a713ff2b..ff4c12c3f52e 100644
--- a/sys/rpc/authunix_prot.c
+++ b/sys/rpc/authunix_prot.c
@@ -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);
/*
diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c
index 4d5535a4fee2..9e4b0b8483b5 100644
--- a/sys/rpc/svc_auth_unix.c
+++ b/sys/rpc/svc_auth_unix.c
@@ -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;