Revert "libsemanage/genhomedircon: check usepasswd"

This reverts commit ce46daab7c.

The behavior described in the reverted commit is correct. `useradd -Z`
creates new mapping between new created user and *unconfined_u*,
`genhomedircon` then uses this new mapping, not /etc/passwd entries, for
generating new homedir contexts.

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
Petr Lautrbach 2020-12-18 13:54:31 +01:00 committed by Nicolas Iooss
parent edae9275f6
commit 5b05e829da
No known key found for this signature in database
GPG Key ID: C191415F340DAAA0

View File

@ -1332,7 +1332,7 @@ static int write_context_file(genhomedircon_settings_t * s, FILE * out)
s->fallback->home = NULL;
}
}
if ((s->usepasswd) && (user_context_tpl || username_context_tpl)) {
if (user_context_tpl || username_context_tpl) {
if (write_username_context(s, out, username_context_tpl,
s->fallback) != STATUS_SUCCESS) {
retval = STATUS_ERR;