useradd: Set proper SELinux labels for def_usrtemplate

Fixes: 74c17c716 ("Add support for skeleton files from /usr/etc/skel")

Signed-off-by: Johannes Segitz <jsegitz@suse.com>
Cherry-picked-from: 48aa12af31c0b72872b411857d03a518a4200a3d
Link: <https://github.com/shadow-maint/shadow/pull/812>
Reviewed-by: Michael Vetter <jubalh@iodoru.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Johannes Segitz 2023-09-26 15:14:14 +02:00 committed by Alejandro Colomar
parent de50b39475
commit 909036d714
No known key found for this signature in database
GPG Key ID: 9E8C1AFBBEFFDB32

View File

@ -2787,7 +2787,7 @@ int main (int argc, char **argv)
if (home_added) {
copy_tree (def_template, prefix_user_home, false, true,
(uid_t)-1, user_id, (gid_t)-1, user_gid);
copy_tree (def_usrtemplate, prefix_user_home, false, false,
copy_tree (def_usrtemplate, prefix_user_home, false, true,
(uid_t)-1, user_id, (gid_t)-1, user_gid);
} else {
fprintf (stderr,