diff options
author | Vitaly Lipatov <lav@etersoft.ru> | 2018-07-12 22:02:18 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-07-13 13:03:30 +0000 |
commit | c688bc0197940f47bd180e2c2ab9740e3e14b71c (patch) | |
tree | be14748149696168c88835da3a84abaf5ed145f4 | |
parent | 1718f9c6cb3bc856265ff996babef97119a716bd (diff) |
add check if no matching password record was found with getpwuid_r(uid)
Change-Id: Iae712828ee656008faf5fe2bc4e6f96fa12ea4cb
fixes: bz#1600687
Signed-off-by: Vitaly Lipatov <lav@etersoft.ru>
-rw-r--r-- | xlators/mount/fuse/src/fuse-helpers.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c index c2d4d0cc9d8..cb3e081e62e 100644 --- a/xlators/mount/fuse/src/fuse-helpers.c +++ b/xlators/mount/fuse/src/fuse-helpers.c @@ -174,6 +174,11 @@ frame_fill_groups (call_frame_t *frame) "failed", frame->root->uid); return; } + if (result == 0) { + gf_log (this->name, GF_LOG_ERROR, "getpwuid_r(%u): " + "no matching record", frame->root->uid); + return; + } ngroups = gf_getgrouplist (result->pw_name, frame->root->gid, &mygroups); |