]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
missing ifdef SELINUX; spotted by dtucker
authorDamien Miller <djm@mindrot.org>
Fri, 26 Jun 2020 05:30:06 +0000 (15:30 +1000)
committerDamien Miller <djm@mindrot.org>
Fri, 26 Jun 2020 05:30:06 +0000 (15:30 +1000)
hostfile.c

index 4b39def043447ce631114d719f2dc8df0622648b..1cc4dba9270acfba44933f95f1928673fcc6da45 100644 (file)
@@ -471,13 +471,17 @@ hostfile_create_user_ssh_dir(const char *filename, int notify)
        else if (errno != ENOENT)
                error("Could not stat %s: %s", dotsshdir, strerror(errno));
        else {
+#ifdef WITH_SELINUX
                ssh_selinux_setfscreatecon(dotsshdir);
+#endif
                if (mkdir(dotsshdir, 0700) == -1)
                        error("Could not create directory '%.200s' (%s).",
                            dotsshdir, strerror(errno));
                else if (notify)
                        logit("Created directory '%s'.", dotsshdir);
+#ifdef WITH_SELINUX
                ssh_selinux_setfscreatecon(NULL);
+#endif
        }
        free(dotsshdir);
 }