summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-27 20:23:18 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-27 20:28:48 +0100
commit613b411c947635136637f8cdd66b94512f761eab (patch)
tree5e0713345af39de99409d2193be93ae9e760e1d2 /src/core/load-fragment.c
parentdf41776d66b5b7467a5cf9c719b97b66d6534c8c (diff)
service: add the ability for units to join other unit's PrivateNetwork= and PrivateTmp= namespaces
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index d9dd6faaeb..8a42e739be 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -1350,15 +1350,17 @@ int config_parse_socket_service(const char *unit,
assert(data);
r = unit_name_printf(UNIT(s), rvalue, &p);
- if (r < 0)
+ if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to resolve specifiers, ignoring: %s", rvalue);
+ return 0;
+ }
- if (!endswith(p ?: rvalue, ".service")) {
+ if (!endswith(p, ".service")) {
log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Unit must be of type service, ignoring: %s", rvalue);
return 0;
}
- r = manager_load_unit(UNIT(s)->manager, p ?: rvalue, NULL, &error, &x);
+ r = manager_load_unit(UNIT(s)->manager, p, NULL, &error, &x);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to load unit %s, ignoring: %s", rvalue, bus_error_message(&error, r));
return 0;