diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-12-29 10:42:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-29 10:42:22 +0100 |
commit | 2a4e5c629e24f2f3a62c567b57b22ed7d6c75019 (patch) | |
tree | 9fee725f5c8321fa8c52d36e63f432a10277f1c4 /src/nss-mymachines/nss-mymachines.c | |
parent | 4d1fe20a585caadce57ef2d6a631a0d8029d2518 (diff) | |
parent | d6c575e303520ffdcee1590a4181410024d5f917 (diff) |
Merge pull request #4989 from poettering/nss-einval
nss user/group name validation fixes
Diffstat (limited to 'src/nss-mymachines/nss-mymachines.c')
-rw-r--r-- | src/nss-mymachines/nss-mymachines.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c index 895f61c462..fac37faea5 100644 --- a/src/nss-mymachines/nss-mymachines.c +++ b/src/nss-mymachines/nss-mymachines.c @@ -512,10 +512,8 @@ enum nss_status _nss_mymachines_getpwuid_r( BLOCK_SIGNALS(NSS_SIGNALS_BLOCK); - if (!uid_is_valid(uid)) { - r = -EINVAL; - goto fail; - } + if (!uid_is_valid(uid)) + goto not_found; /* We consider all uids < 65536 host uids */ if (uid < HOST_UID_LIMIT) @@ -686,10 +684,8 @@ enum nss_status _nss_mymachines_getgrgid_r( BLOCK_SIGNALS(NSS_SIGNALS_BLOCK); - if (!gid_is_valid(gid)) { - r = -EINVAL; - goto fail; - } + if (!gid_is_valid(gid)) + goto not_found; /* We consider all gids < 65536 host gids */ if (gid < HOST_GID_LIMIT) |