1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-25 18:50:18 +03:00

socket: when creating FIFOs, create parent dirs first, and use right access mode

This commit is contained in:
Lennart Poettering 2010-04-04 22:50:04 +02:00
parent 27b14a2297
commit 8cb45bf8df

View File

@ -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;
}