summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2012-10-03 03:44:23 +0000
committerpfg <pfg@FreeBSD.org>2012-10-03 03:44:23 +0000
commitd142b7417c2aa871313728dddcbf50ce59f963b0 (patch)
tree5f5975b73f8cd814f6fa302acfb34a0371cc2c6f /lib
parentae42961686c0ffdabdf4432badf90120b39c253c (diff)
downloadFreeBSD-src-d142b7417c2aa871313728dddcbf50ce59f963b0.zip
FreeBSD-src-d142b7417c2aa871313728dddcbf50ce59f963b0.tar.gz
rpc: convert all uid and gid variables of the type uid_t and gid_t.
As part of the previous commit, uses of xdr_int() were replaced with xdr_u_int(). This has undesired effects as the second argument doesn't match exactly uid_t or gid_t. It also breaks assumptions in the size of the provided types. To work around those issues we revert back to the use of xdr_int() but provide proper casting so the behaviour doesn't change. While here fix a style issue in the affected lines. Reported by: bde
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/rpc/authunix_prot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/rpc/authunix_prot.c b/lib/libc/rpc/authunix_prot.c
index dd84810..437c331 100644
--- a/lib/libc/rpc/authunix_prot.c
+++ b/lib/libc/rpc/authunix_prot.c
@@ -67,11 +67,11 @@ xdr_authunix_parms(xdrs, p)
paup_gids = &p->aup_gids;
- if (xdr_u_long(xdrs, &(p->aup_time))
- && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
- && xdr_u_int(xdrs, &(p->aup_uid))
- && xdr_u_int(xdrs, &(p->aup_gid))
- && xdr_array(xdrs, (char **) paup_gids,
+ if (xdr_u_long(xdrs, &(p->aup_time)) &&
+ xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) &&
+ xdr_int(xdrs, (int *) &(p->aup_uid)) &&
+ xdr_int(xdrs, (int *) &(p->aup_gid)) &&
+ xdr_array(xdrs, (char **) paup_gids,
&(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) {
return (TRUE);
}
OpenPOWER on IntegriCloud