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>
This commit is contained in:
Vitaly Lipatov 2018-07-12 22:02:18 +03:00 committed by Amar Tumballi
parent 1718f9c6cb
commit c688bc0197

View File

@ -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);