kernel: make groups_sort calling a responsibility group_info allocators
[pandora-kernel.git] / net / sunrpc / svcauth_unix.c
index ce13632..26d5f0d 100644 (file)
@@ -539,6 +539,7 @@ static int unix_gid_parse(struct cache_detail *cd,
                GROUP_AT(ug.gi, i) = gid;
        }
 
+       groups_sort(ug.gi);
        ugp = unix_gid_lookup(uid);
        if (ugp) {
                struct cache_head *ch;
@@ -806,6 +807,7 @@ svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp)
                return SVC_CLOSE;
        for (i = 0; i < slen; i++)
                GROUP_AT(cred->cr_group_info, i) = svc_getnl(argv);
+       groups_sort(cred->cr_group_info);
        if (svc_getu32(argv) != htonl(RPC_AUTH_NULL) || svc_getu32(argv) != 0) {
                *authp = rpc_autherr_badverf;
                return SVC_DENIED;