mirror of
https://github.com/troglobit/finit.git
synced 2026-10-28 12:30:44 +00:00
Fix #46: Set correct umask() before makedir() and chmod()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
d2846b805a
commit
e03b358ff0
3 files changed
+12
No files matched your search
@@ -37,6 +37,8 @@ static void setup(void *UNUSED(arg))
|
||||
#endif
|
||||
char line[LINE_SIZE];
|
||||
|
||||
umask(0);
|
||||
|
||||
makedir("/var/run/console", 01777);
|
||||
snprintf(line, sizeof(line), "/var/run/console/%s", username);
|
||||
touch(line);
|
||||
@@ -54,6 +56,8 @@ static void setup(void *UNUSED(arg))
|
||||
|
||||
if (fexist("/sbin/restorecon"))
|
||||
run("/sbin/restorecon /tmp/.ICE-unix /tmp/.X11-unix");
|
||||
|
||||
umask(022);
|
||||
}
|
||||
|
||||
static plugin_t plugin = {
|
||||
|
||||
Reference in new issue
Block a user