@@ -65,7 +65,7 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg)
6565 uint32_t time ;
6666 struct xucred * xcr ;
6767 u_int auth_len ;
68- size_t str_len , gid_len ;
68+ size_t str_len , supp_ngroups ;
6969 u_int i ;
7070
7171 xcr = rqst -> rq_clntcred ;
@@ -84,12 +84,12 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg)
8484 buf += str_len / sizeof (int32_t );
8585 xcr -> cr_uid = IXDR_GET_UINT32 (buf );
8686 xcr -> cr_gid = IXDR_GET_UINT32 (buf );
87- gid_len = (size_t )IXDR_GET_UINT32 (buf );
88- if (gid_len > NGRPS ) {
87+ supp_ngroups = (size_t )IXDR_GET_UINT32 (buf );
88+ if (supp_ngroups > NGRPS ) {
8989 stat = AUTH_BADCRED ;
9090 goto done ;
9191 }
92- for (i = 0 ; i < gid_len ; i ++ ) {
92+ for (i = 0 ; i < supp_ngroups ; i ++ ) {
9393 /*
9494 * Note that this is a `struct xucred`, which maintains
9595 * its historical layout of preserving the egid in
@@ -100,18 +100,18 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg)
100100 else
101101 buf ++ ;
102102 }
103- if (gid_len + 1 > XU_NGROUPS )
103+ if (supp_ngroups + 1 > XU_NGROUPS )
104104 xcr -> cr_ngroups = XU_NGROUPS ;
105105 else
106- xcr -> cr_ngroups = gid_len + 1 ;
106+ xcr -> cr_ngroups = supp_ngroups + 1 ;
107107
108108 /*
109109 * five is the smallest unix credentials structure -
110110 * timestamp, hostname len (0), uid, gid, and gids len (0).
111111 */
112- if ((5 + gid_len ) * BYTES_PER_XDR_UNIT + str_len > auth_len ) {
112+ if ((5 + supp_ngroups ) * BYTES_PER_XDR_UNIT + str_len > auth_len ) {
113113 (void ) printf ("bad auth_len gid %ld str %ld auth %u\n" ,
114- (long )gid_len , (long )str_len , auth_len );
114+ (long )supp_ngroups , (long )str_len , auth_len );
115115 stat = AUTH_BADCRED ;
116116 goto done ;
117117 }
0 commit comments