summaryrefslogtreecommitdiff
path: root/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-04 22:50:04 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-04 22:50:04 +0200
commit8cb45bf8df4d1fab4386bce349a1437443a9b0eb (patch)
tree97090d56c6c0244e55b57df089166a986b705e08 /socket.c
parent27b14a2297d296f7a2c47dd20d7e0c6fb8acd20c (diff)
socket: when creating FIFOs, create parent dirs first, and use right access mode
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/socket.c b/socket.c
index afa001f20f..2a19e97b7b 100644
--- a/socket.c
+++ b/socket.c
@@ -267,7 +267,9 @@ static int socket_open_fds(Socket *s) {
struct stat st;
assert(p->type == SOCKET_FIFO);
- if (mkfifo(p->path, 0666 & ~s->exec_context.umask) < 0 && errno != EEXIST) {
+ mkdir_parents(p->path, s->directory_mode);
+
+ if (mkfifo(p->path, s->socket_mode) < 0 && errno != EEXIST) {
r = -errno;
goto rollback;
}