summaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-28 23:39:29 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-28 23:39:29 +0200
commit189583d7e4e0a74e96df12f00013eef8543ac96f (patch)
tree34ddd591d65d4d2c4d726f784c5c202d0eaa8769 /src/socket.c
parentd605b2fd41b671f93ae5cb67488978846427dda9 (diff)
label: generalize label_get_socket_label_from_exe() a bit
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/socket.c b/src/socket.c
index 64d1028d4f..4405155481 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -892,11 +892,14 @@ static int socket_open_fds(Socket *s) {
if ((r = socket_instantiate_service(s)) < 0)
return r;
- if (s->service && s->service->exec_command[SERVICE_EXEC_START])
- if ((r = label_get_socket_label_from_exe(s->service->exec_command[SERVICE_EXEC_START]->path, &label)) < 0) {
+ if (s->service && s->service->exec_command[SERVICE_EXEC_START]) {
+ r = label_get_create_label_from_exe(s->service->exec_command[SERVICE_EXEC_START]->path, &label);
+
+ if (r < 0) {
if (r != -EPERM)
return r;
}
+ }
know_label = true;
}