mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-26 07:15:36 +02:00
missing ifdef SELINUX; spotted by dtucker
This commit is contained in:
parent
e073106f37
commit
32b2502a9d
@ -471,13 +471,17 @@ hostfile_create_user_ssh_dir(const char *filename, int notify)
|
|||||||
else if (errno != ENOENT)
|
else if (errno != ENOENT)
|
||||||
error("Could not stat %s: %s", dotsshdir, strerror(errno));
|
error("Could not stat %s: %s", dotsshdir, strerror(errno));
|
||||||
else {
|
else {
|
||||||
|
#ifdef WITH_SELINUX
|
||||||
ssh_selinux_setfscreatecon(dotsshdir);
|
ssh_selinux_setfscreatecon(dotsshdir);
|
||||||
|
#endif
|
||||||
if (mkdir(dotsshdir, 0700) == -1)
|
if (mkdir(dotsshdir, 0700) == -1)
|
||||||
error("Could not create directory '%.200s' (%s).",
|
error("Could not create directory '%.200s' (%s).",
|
||||||
dotsshdir, strerror(errno));
|
dotsshdir, strerror(errno));
|
||||||
else if (notify)
|
else if (notify)
|
||||||
logit("Created directory '%s'.", dotsshdir);
|
logit("Created directory '%s'.", dotsshdir);
|
||||||
|
#ifdef WITH_SELINUX
|
||||||
ssh_selinux_setfscreatecon(NULL);
|
ssh_selinux_setfscreatecon(NULL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
free(dotsshdir);
|
free(dotsshdir);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user