cr_gid is already used by Darwin
[openafs.git] / src / afs / LINUX / osi_nfssrv.c
index edfa61f..f30ea1f 100644 (file)
@@ -120,8 +120,8 @@ svcauth_afs_accept(struct svc_rqst *rqstp, u32 *authp)
     ns->code           = EACCES;
     ns->client_addr    = *addr;
     ns->client_addrlen = rqstp->rq_addrlen;
-    ns->client_uid     = cr_uid(&rqstp->rq_cred);
-    ns->client_gid     = cr_gid(&rqstp->rq_cred);
+    ns->client_uid     = afs_cr_uid(&rqstp->rq_cred);
+    ns->client_gid     = afs_cr_gid(&rqstp->rq_cred);
     if (cr_group_info(&rqstp->rq_cred)->ngroups > 0)
        ns->client_g0   = GROUP_AT(cr_group_info(&rqstp->rq_cred), 0);
     else
@@ -138,15 +138,15 @@ svcauth_afs_accept(struct svc_rqst *rqstp, u32 *authp)
     }
 
     credp = crget();
-    set_cr_uid(credp, cr_uid(&rqstp->rq_cred));
-    set_cr_gid(credp, cr_gid(&rqstp->rq_cred));
+    afs_set_cr_uid(credp, afs_cr_uid(&rqstp->rq_cred));
+    afs_set_cr_gid(credp, afs_cr_gid(&rqstp->rq_cred));
     get_group_info(cr_group_info(&rqstp->rq_cred));
     set_cr_group_info(credp, cr_group_info(&rqstp->rq_cred));
 
     /* avoid creating wildcard entries by mapping anonymous
      * clients to afs_nobody */
-    if (cr_uid(credp) == -1)
-       set_cr_uid(credp, -2);
+    if (afs_cr_uid(credp) == -1)
+       afs_set_cr_uid(credp, -2);
     code = afs_nfsclient_reqhandler(0, &credp, addr->sin_addr.s_addr,
                                    &ns->uid, &outexp);
     if (!code && outexp) EXP_RELE(outexp);
@@ -191,7 +191,7 @@ int osi_linux_nfs_initreq(struct vrequest *av, afs_ucred_t *cr, int *code)
 
     *code = ns->code;
     if (!ns->code) {
-       cr_ruid(cr) = NFSXLATOR_CRED;
+       afs_cr_ruid(cr) = NFSXLATOR_CRED;
        av->uid = ns->uid;
     }
     return 1;