summaryrefslogtreecommitdiff
path: root/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-02-14 22:43:08 +0100
committerLennart Poettering <lennart@poettering.net>2010-02-14 22:43:08 +0100
commit81a2b7ceda7100fbc0dd8ce423b9599e03656851 (patch)
tree4478e9ee682e0aa945aae68d40fd81b3918de99f /load-fragment.c
parente14140036227901bd64833559bab70c111c651a5 (diff)
execute: implement privilige dropping properly
Diffstat (limited to 'load-fragment.c')
-rw-r--r--load-fragment.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/load-fragment.c b/load-fragment.c
index e002bf5ad1..1e98004c39 100644
--- a/load-fragment.c
+++ b/load-fragment.c
@@ -1094,6 +1094,8 @@ static int load_from_path(Unit *u, const char *path) {
{ "TimeoutSec", config_parse_usec, &u->service.timeout_usec, "Service" },
{ "Type", config_parse_service_type, &u->service, "Service" },
{ "Restart", config_parse_service_restart, &u->service, "Service" },
+ { "PermissionsStartOnly", config_parse_bool, &u->service.permissions_start_only, "Service" },
+ { "RootDirectoryStartOnly", config_parse_bool, &u->service.root_directory_start_only, "Service" },
EXEC_CONTEXT_CONFIG_ITEMS(u->service.exec_context, "Service"),
{ "ListenStream", config_parse_listen, &u->socket, "Socket" },
@@ -1250,7 +1252,9 @@ int unit_load_fragment(Unit *u) {
else
c = NULL;
- if (c && (c->output == EXEC_OUTPUT_KERNEL || c->output == EXEC_OUTPUT_SYSLOG)) {
+ if (c &&
+ (c->output == EXEC_OUTPUT_KERNEL || c->output == EXEC_OUTPUT_SYSLOG) &&
+ u->meta.manager->running_as != MANAGER_SESSION) {
int k;
/* If syslog or kernel logging is requested, make sure