Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357802
b: refs/heads/master
c: bf37f79
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman committed Feb 13, 2013
1 parent 3e97334 commit bf66a33
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ddca4e1730cf1b72044ae76ddf17b29d790b4dbc
refs/heads/master: bf37f794372d5b8fda66702e1f3e70d4f07b6533
4 changes: 2 additions & 2 deletions trunk/net/sunrpc/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ rpcauth_bind_root_cred(struct rpc_task *task, int lookupflags)
{
struct rpc_auth *auth = task->tk_client->cl_auth;
struct auth_cred acred = {
.uid = 0,
.gid = 0,
.uid = GLOBAL_ROOT_UID,
.gid = GLOBAL_ROOT_GID,
};

dprintk("RPC: %5u looking up %s cred\n",
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sunrpc/auth_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# define RPCDBG_FACILITY RPCDBG_AUTH
#endif

#define RPC_MACHINE_CRED_USERID ((uid_t)0)
#define RPC_MACHINE_CRED_GROUPID ((gid_t)0)
#define RPC_MACHINE_CRED_USERID GLOBAL_ROOT_UID
#define RPC_MACHINE_CRED_GROUPID GLOBAL_ROOT_GID

struct generic_cred {
struct rpc_cred gc_base;
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/sunrpc/auth_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
cred->uc_gids[i] = gid;
}
if (i < NFS_NGROUPS)
cred->uc_gids[i] = NOGROUP;
cred->uc_gids[i] = INVALID_GID;

return &cred->uc_base;
}
Expand Down Expand Up @@ -137,7 +137,7 @@ unx_match(struct auth_cred *acred, struct rpc_cred *rcred, int flags)
return 0;
}
if (groups < NFS_NGROUPS &&
cred->uc_gids[groups] != NOGROUP)
cred->uc_gids[groups] != INVALID_GID)
return 0;
return 1;
}
Expand Down Expand Up @@ -166,7 +166,7 @@ unx_marshal(struct rpc_task *task, __be32 *p)
*p++ = htonl((u32) cred->uc_uid);
*p++ = htonl((u32) cred->uc_gid);
hold = p++;
for (i = 0; i < 16 && cred->uc_gids[i] != (gid_t) NOGROUP; i++)
for (i = 0; i < 16 && cred->uc_gids[i] != INVALID_GID; i++)
*p++ = htonl((u32) cred->uc_gids[i]);
*hold = htonl(p - hold - 1); /* gid array length */
*base = htonl((p - base - 1) << 2); /* cred length */
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sunrpc/svcauth_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,8 @@ svcauth_null_accept(struct svc_rqst *rqstp, __be32 *authp)
}

/* Signal that mapping to nobody uid/gid is required */
cred->cr_uid = (uid_t) -1;
cred->cr_gid = (gid_t) -1;
cred->cr_uid = INVALID_UID;
cred->cr_gid = INVALID_GID;
cred->cr_group_info = groups_alloc(0);
if (cred->cr_group_info == NULL)
return SVC_CLOSE; /* kmalloc failure - client must retry */
Expand Down

0 comments on commit bf66a33

Please sign in to comment.