diff options
Diffstat (limited to 'net/sunrpc/auth_gss/svcauth_gss.c')
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index f7d34e7b6f81..5ead60550895 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -447,17 +447,21 @@ static int rsc_parse(struct cache_detail *cd, | |||
447 | else { | 447 | else { |
448 | int N, i; | 448 | int N, i; |
449 | 449 | ||
450 | /* | ||
451 | * NOTE: we skip uid_valid()/gid_valid() checks here: | ||
452 | * instead, * -1 id's are later mapped to the | ||
453 | * (export-specific) anonymous id by nfsd_setuser. | ||
454 | * | ||
455 | * (But supplementary gid's get no such special | ||
456 | * treatment so are checked for validity here.) | ||
457 | */ | ||
450 | /* uid */ | 458 | /* uid */ |
451 | rsci.cred.cr_uid = make_kuid(&init_user_ns, id); | 459 | rsci.cred.cr_uid = make_kuid(&init_user_ns, id); |
452 | if (!uid_valid(rsci.cred.cr_uid)) | ||
453 | goto out; | ||
454 | 460 | ||
455 | /* gid */ | 461 | /* gid */ |
456 | if (get_int(&mesg, &id)) | 462 | if (get_int(&mesg, &id)) |
457 | goto out; | 463 | goto out; |
458 | rsci.cred.cr_gid = make_kgid(&init_user_ns, id); | 464 | rsci.cred.cr_gid = make_kgid(&init_user_ns, id); |
459 | if (!gid_valid(rsci.cred.cr_gid)) | ||
460 | goto out; | ||
461 | 465 | ||
462 | /* number of additional gid's */ | 466 | /* number of additional gid's */ |
463 | if (get_int(&mesg, &N)) | 467 | if (get_int(&mesg, &N)) |