diff options
| author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-08 23:05:05 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-08 23:05:05 -0500 | 
| commit | fc6149a6ce7a5560ae239a317b7f43039a3f80fd (patch) | |
| tree | d6411b7b1fe425234524e8baea3c297fdd22202f /src/shared/bus-unit-util.c | |
| parent | 52a4aafb4dd178afae5ce8ceadd852233cac10f3 (diff) | |
| parent | ef3116b5d4b9f12ae9f0fc25c8b40a04712c6d56 (diff) | |
Merge pull request #4962 from poettering/root-directory-2
Add new MountAPIVFS= boolean unit file setting + RootImage=
Diffstat (limited to 'src/shared/bus-unit-util.c')
| -rw-r--r-- | src/shared/bus-unit-util.c | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index 829be2c6da..20c1085697 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -208,7 +208,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen                                "PrivateTmp", "PrivateDevices", "PrivateNetwork", "PrivateUsers", "NoNewPrivileges",                                "SyslogLevelPrefix", "Delegate", "RemainAfterElapse", "MemoryDenyWriteExecute",                                "RestrictRealtime", "DynamicUser", "RemoveIPC", "ProtectKernelTunables", -                              "ProtectKernelModules", "ProtectControlGroups")) { +                              "ProtectKernelModules", "ProtectControlGroups", "MountAPIVFS")) {                  r = parse_boolean(eq);                  if (r < 0) @@ -266,7 +266,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen                                "StandardInput", "StandardOutput", "StandardError",                                "Description", "Slice", "Type", "WorkingDirectory",                                "RootDirectory", "SyslogIdentifier", "ProtectSystem", -                              "ProtectHome", "SELinuxContext", "Restart")) +                              "ProtectHome", "SELinuxContext", "Restart", "RootImage"))                  r = sd_bus_message_append(m, "v", "s", eq);          else if (streq(field, "SyslogLevel")) { @@ -484,7 +484,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen                  for (p = eq;;) {                          _cleanup_free_ char *word = NULL; -                        int offset; +                        size_t offset;                          r = extract_first_word(&p, &word, NULL, EXTRACT_QUOTES);                          if (r < 0) { @@ -500,6 +500,8 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen                          }                          offset = word[0] == '-'; +                        offset += word[offset] == '+'; +                          if (!path_is_absolute(word + offset)) {                                  log_error("Failed to parse %s value %s", field, eq);                                  return -EINVAL; | 
