Commit b4528762ca92261c6ed3f03e76adeb1dc587aacb
1 parent
1d2e88e73e
Exists in
master
and in
39 other branches
SUNRPC: AUTH_SYS "machine creds" shouldn't use negative valued uid/gid
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>
Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff
net/sunrpc/auth_generic.c
... | ... | @@ -17,8 +17,8 @@ |
17 | 17 | # define RPCDBG_FACILITY RPCDBG_AUTH |
18 | 18 | #endif |
19 | 19 | |
20 | -#define RPC_ANONYMOUS_USERID ((uid_t)-2) | |
21 | -#define RPC_ANONYMOUS_GROUPID ((gid_t)-2) | |
20 | +#define RPC_MACHINE_CRED_USERID ((uid_t)0) | |
21 | +#define RPC_MACHINE_CRED_GROUPID ((gid_t)0) | |
22 | 22 | |
23 | 23 | struct generic_cred { |
24 | 24 | struct rpc_cred gc_base; |
... | ... | @@ -44,8 +44,8 @@ |
44 | 44 | struct rpc_cred *rpc_lookup_machine_cred(void) |
45 | 45 | { |
46 | 46 | struct auth_cred acred = { |
47 | - .uid = RPC_ANONYMOUS_USERID, | |
48 | - .gid = RPC_ANONYMOUS_GROUPID, | |
47 | + .uid = RPC_MACHINE_CRED_USERID, | |
48 | + .gid = RPC_MACHINE_CRED_GROUPID, | |
49 | 49 | .machine_cred = 1, |
50 | 50 | }; |
51 | 51 |