Skip to content

Commit

Permalink
SUNRPC: AUTH_SYS "machine creds" shouldn't use negative valued uid/gid
Browse files Browse the repository at this point in the history
Apparently this causes Solaris 10 servers to refuse our NFSv4 SETCLIENTID
calls. Fall back to root creds for now, since most servers that care are
very likely to have root squashing enabled.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 18, 2008
1 parent 1d2e88e commit b452876
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/sunrpc/auth_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# define RPCDBG_FACILITY RPCDBG_AUTH
#endif

#define RPC_ANONYMOUS_USERID ((uid_t)-2)
#define RPC_ANONYMOUS_GROUPID ((gid_t)-2)
#define RPC_MACHINE_CRED_USERID ((uid_t)0)
#define RPC_MACHINE_CRED_GROUPID ((gid_t)0)

struct generic_cred {
struct rpc_cred gc_base;
Expand All @@ -44,8 +44,8 @@ EXPORT_SYMBOL_GPL(rpc_lookup_cred);
struct rpc_cred *rpc_lookup_machine_cred(void)
{
struct auth_cred acred = {
.uid = RPC_ANONYMOUS_USERID,
.gid = RPC_ANONYMOUS_GROUPID,
.uid = RPC_MACHINE_CRED_USERID,
.gid = RPC_MACHINE_CRED_GROUPID,
.machine_cred = 1,
};

Expand Down

0 comments on commit b452876

Please sign in to comment.