Fix #46: Set correct umask() before makedir() and chmod()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-10-02 11:42:40 +02:00
parent d2846b805a
commit e03b358ff0
3 changed files with 12 additions and 0 deletions
+4
View File
@@ -43,6 +43,8 @@ static void setup(void *UNUSED(arg))
{
int gid;
umask(0);
_d("Setting up FHS structure in /var ...");
makedir("/var/cache", 0755);
makedir("/var/games", 0755);
@@ -104,6 +106,8 @@ static void setup(void *UNUSED(arg))
makedir("/var/run/sshd", 01755); /* OpenSSH */
makefifo("/dev/xconsole", 0640); /* sysklogd */
chown("/dev/xconsole", 0, getgroup("tty"));
umask(022);
}
static plugin_t plugin = {