shadow-utils/shadow-4.14.0-useradd-def-usrtemplate-selinux-label.patch
Iker Pedrosa b2b4416387 useradd: Set proper SELinux labels for def_usrtemplate
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2023-10-03 09:59:47 +02:00

29 lines
955 B
Diff

From 48aa12af31c0b72872b411857d03a518a4200a3d Mon Sep 17 00:00:00 2001
From: Johannes Segitz <jsegitz@suse.de>
Date: Tue, 26 Sep 2023 15:14:14 +0200
Subject: [PATCH] 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>
---
src/useradd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/useradd.c b/src/useradd.c
index 76a4d649..fe62a051 100644
--- a/src/useradd.c
+++ b/src/useradd.c
@@ -2788,7 +2788,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,
--
2.41.0