Message ID | 20241125111840.63845-3-cgoettsche@seltendoof.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2,1/9] libsemanage: set O_CLOEXEC flag for file descriptors | expand |
diff --git a/libsemanage/src/genhomedircon.c b/libsemanage/src/genhomedircon.c index 53673645..c38d284b 100644 --- a/libsemanage/src/genhomedircon.c +++ b/libsemanage/src/genhomedircon.c @@ -228,7 +228,7 @@ static semanage_list_t *get_shell_list(void) free(temp); semanage_list_destroy(&list); fclose(shells); - return default_shell_list(); + return NULL; } } } @@ -333,7 +333,10 @@ static semanage_list_t *get_home_dirs(genhomedircon_settings_t * s) return homedir_list; shells = get_shell_list(); - assert(shells); + if (!shells) { + ERR(s->h_semanage, "Allocation failure!"); + goto fail; + } path = semanage_findval(PATH_ETC_LOGIN_DEFS, "UID_MIN", NULL); if (path && *path) {