redirect: We might return NULL here.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
Ikey Doherty
2017-12-24 18:33:22 +00:00
parent 5c809fdc07
commit 62bd3dffb7
+4
View File
@@ -363,6 +363,10 @@ _nica_public_ struct passwd *getpwuid(uid_t uid)
* let us override the home directory to be correct.
*/
ret = lsi_table.getpwuid(uid);
if (!ret) {
return NULL;
}
if (uid == getuid() && snap_root && *snap_root) {
ret->pw_dir = (char *)snap_root;
}