diff options
author | Jeff Layton <[email protected]> | 2024-07-19 14:55:53 -0400 |
---|---|---|
committer | Chuck Lever <[email protected]> | 2024-07-22 09:47:39 -0400 |
commit | 91da337e5d506f2c065d20529d105ca40090e320 (patch) | |
tree | 726c04d66654e0f04e298d3aec007e6930663705 | |
parent | 785280973472dbdee2c31cb740633c4b6460a8ee (diff) |
nfsd: don't set SVC_SOCK_ANONYMOUS when creating nfsd sockets
When creating nfsd sockets via the netlink interface, we do want to
register with the portmapper. Don't set SVC_SOCK_ANONYMOUS.
Reported-by: Steve Dickson <[email protected]>
Fixes: 16a471177496 ("NFSD: add listener-{set,get} netlink command")
Cc: Lorenzo Bianconi <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
-rw-r--r-- | fs/nfsd/nfsctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 9e0ea6fc2aa3..34eb2c2cbcde 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -2069,8 +2069,7 @@ int nfsd_nl_listener_set_doit(struct sk_buff *skb, struct genl_info *info) continue; } - ret = svc_xprt_create_from_sa(serv, xcl_name, net, sa, - SVC_SOCK_ANONYMOUS, + ret = svc_xprt_create_from_sa(serv, xcl_name, net, sa, 0, get_current_cred()); /* always save the latest error */ if (ret < 0) |