]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
useradd: change SELinux labels for home files 439/head
authorIker Pedrosa <ipedrosa@redhat.com>
Fri, 12 Nov 2021 14:23:30 +0000 (15:23 +0100)
committerIker Pedrosa <ipedrosa@redhat.com>
Fri, 12 Nov 2021 14:27:16 +0000 (15:27 +0100)
Change SELinux labels for files copied from the skeleton directory to
the home directory.

This could cause gnome's graphical user adding to fail without copying
the full skeleton files.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2022658

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
src/useradd.c

index b463a1708e209465a42f53c04dc559ab3059c3d5..f7c979580205e411c73c380f57d412901d7dcac7 100644 (file)
@@ -2704,7 +2704,7 @@ int main (int argc, char **argv)
        if (mflg) {
                create_home ();
                if (home_added) {
-                       copy_tree (def_template, prefix_user_home, false, false,
+                       copy_tree (def_template, prefix_user_home, false, true,
                                   (uid_t)-1, user_id, (gid_t)-1, user_gid);
                } else {
                        fprintf (stderr,