diff options
Diffstat (limited to 'net/sunrpc/rpcb_clnt.c')
-rw-r--r-- | net/sunrpc/rpcb_clnt.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index 44d0732ba874..d550d0b967db 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c | |||
@@ -63,9 +63,16 @@ enum { | |||
63 | * r_owner | 63 | * r_owner |
64 | * | 64 | * |
65 | * The "owner" is allowed to unset a service in the rpcbind database. | 65 | * The "owner" is allowed to unset a service in the rpcbind database. |
66 | * We always use the following (arbitrary) fixed string. | 66 | * |
67 | * For AF_LOCAL SET/UNSET requests, rpcbind treats this string as a | ||
68 | * UID which it maps to a local user name via a password lookup. | ||
69 | * In all other cases it is ignored. | ||
70 | * | ||
71 | * For SET/UNSET requests, user space provides a value, even for | ||
72 | * network requests, and GETADDR uses an empty string. We follow | ||
73 | * those precedents here. | ||
67 | */ | 74 | */ |
68 | #define RPCB_OWNER_STRING "rpcb" | 75 | #define RPCB_OWNER_STRING "0" |
69 | #define RPCB_MAXOWNERLEN sizeof(RPCB_OWNER_STRING) | 76 | #define RPCB_MAXOWNERLEN sizeof(RPCB_OWNER_STRING) |
70 | 77 | ||
71 | static void rpcb_getport_done(struct rpc_task *, void *); | 78 | static void rpcb_getport_done(struct rpc_task *, void *); |
@@ -566,7 +573,7 @@ void rpcb_getport_async(struct rpc_task *task) | |||
566 | map->r_xprt = xprt_get(xprt); | 573 | map->r_xprt = xprt_get(xprt); |
567 | map->r_netid = rpc_peeraddr2str(clnt, RPC_DISPLAY_NETID); | 574 | map->r_netid = rpc_peeraddr2str(clnt, RPC_DISPLAY_NETID); |
568 | map->r_addr = rpc_peeraddr2str(rpcb_clnt, RPC_DISPLAY_UNIVERSAL_ADDR); | 575 | map->r_addr = rpc_peeraddr2str(rpcb_clnt, RPC_DISPLAY_UNIVERSAL_ADDR); |
569 | map->r_owner = RPCB_OWNER_STRING; /* ignored for GETADDR */ | 576 | map->r_owner = ""; |
570 | map->r_status = -EIO; | 577 | map->r_status = -EIO; |
571 | 578 | ||
572 | child = rpcb_call_async(rpcb_clnt, map, proc); | 579 | child = rpcb_call_async(rpcb_clnt, map, proc); |