aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svcauth_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/svcauth_unix.c')
-rw-r--r--net/sunrpc/svcauth_unix.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
index 71ec8530ec8c..2777fa896645 100644
--- a/net/sunrpc/svcauth_unix.c
+++ b/net/sunrpc/svcauth_unix.c
@@ -347,17 +347,12 @@ static inline int ip_map_update(struct net *net, struct ip_map *ipm,
347 return __ip_map_update(sn->ip_map_cache, ipm, udom, expiry); 347 return __ip_map_update(sn->ip_map_cache, ipm, udom, expiry);
348} 348}
349 349
350 350void svcauth_unix_purge(struct net *net)
351void svcauth_unix_purge(void)
352{ 351{
353 struct net *net; 352 struct sunrpc_net *sn;
354
355 for_each_net(net) {
356 struct sunrpc_net *sn;
357 353
358 sn = net_generic(net, sunrpc_net_id); 354 sn = net_generic(net, sunrpc_net_id);
359 cache_purge(sn->ip_map_cache); 355 cache_purge(sn->ip_map_cache);
360 }
361} 356}
362EXPORT_SYMBOL_GPL(svcauth_unix_purge); 357EXPORT_SYMBOL_GPL(svcauth_unix_purge);
363 358
@@ -751,6 +746,7 @@ svcauth_null_accept(struct svc_rqst *rqstp, __be32 *authp)
751 struct svc_cred *cred = &rqstp->rq_cred; 746 struct svc_cred *cred = &rqstp->rq_cred;
752 747
753 cred->cr_group_info = NULL; 748 cred->cr_group_info = NULL;
749 cred->cr_principal = NULL;
754 rqstp->rq_client = NULL; 750 rqstp->rq_client = NULL;
755 751
756 if (argv->iov_len < 3*4) 752 if (argv->iov_len < 3*4)
@@ -778,7 +774,7 @@ svcauth_null_accept(struct svc_rqst *rqstp, __be32 *authp)
778 svc_putnl(resv, RPC_AUTH_NULL); 774 svc_putnl(resv, RPC_AUTH_NULL);
779 svc_putnl(resv, 0); 775 svc_putnl(resv, 0);
780 776
781 rqstp->rq_flavor = RPC_AUTH_NULL; 777 rqstp->rq_cred.cr_flavor = RPC_AUTH_NULL;
782 return SVC_OK; 778 return SVC_OK;
783} 779}
784 780
@@ -816,6 +812,7 @@ svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp)
816 int len = argv->iov_len; 812 int len = argv->iov_len;
817 813
818 cred->cr_group_info = NULL; 814 cred->cr_group_info = NULL;
815 cred->cr_principal = NULL;
819 rqstp->rq_client = NULL; 816 rqstp->rq_client = NULL;
820 817
821 if ((len -= 3*4) < 0) 818 if ((len -= 3*4) < 0)
@@ -852,7 +849,7 @@ svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp)
852 svc_putnl(resv, RPC_AUTH_NULL); 849 svc_putnl(resv, RPC_AUTH_NULL);
853 svc_putnl(resv, 0); 850 svc_putnl(resv, 0);
854 851
855 rqstp->rq_flavor = RPC_AUTH_UNIX; 852 rqstp->rq_cred.cr_flavor = RPC_AUTH_UNIX;
856 return SVC_OK; 853 return SVC_OK;
857 854
858badcred: 855badcred: