]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Merge pull request #327 from squat/bugfix_relative_prefix_path
authorSerge Hallyn <serge@hallyn.com>
Sat, 29 May 2021 19:16:46 +0000 (14:16 -0500)
committerGitHub <noreply@github.com>
Sat, 29 May 2021 19:16:46 +0000 (14:16 -0500)
fix: create relative home path correctly

1  2 
src/useradd.c

diff --cc src/useradd.c
index 9862ae5571e48fb0783a51c23350d48518457bf0,b8beadd8fcec586bfb53bd72b7beabd26169c4b7..4248b62cb7ad4ea4b4910ec96cd8657db81d1508
@@@ -2175,10 -2171,9 +2175,9 @@@ static void create_home (void
                                                        Prog, user_home);
                        fail_exit (E_HOMEDIR);
                }
-               ++bhome;
  
  #ifdef WITH_SELINUX
 -              if (set_selinux_file_context (prefix_user_home) != 0) {
 +              if (set_selinux_file_context (prefix_user_home, S_IFDIR) != 0) {
                        fprintf (stderr,
                                 _("%s: cannot set SELinux context for home directory %s\n"),
                                 Prog, user_home);