X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fload-fragment.c;h=259323bd5cd035a76d1b0fbf27af07f93e5c9f4f;hb=2822da4fb7f891;hp=786737da94bb7991e0fdc0704c72f686e8c1dc95;hpb=a2c0e528b8b5ba370527db279605e4e4135689c1;p=elogind.git diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 786737da9..259323bd5 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -59,12 +59,12 @@ #include "bus-error.h" #include "errno-list.h" #include "af-list.h" +#include "cap-list.h" #ifdef HAVE_SECCOMP #include "seccomp-util.h" #endif -#if !defined(HAVE_SYSV_COMPAT) || !defined(HAVE_SECCOMP) || !defined(HAVE_PAM) || !defined(HAVE_SELINUX) || !defined(HAVE_SMACK) || !defined(HAVE_APPARMOR) int config_parse_warn_compat( const char *unit, const char *filename, @@ -83,6 +83,10 @@ int config_parse_warn_compat( log_syntax(unit, LOG_DEBUG, filename, line, EINVAL, "Support for option %s= has been disabled at compile time and it is ignored", lvalue); break; + case DISABLED_LEGACY: + log_syntax(unit, LOG_INFO, filename, line, EINVAL, + "Support for option %s= has been removed and it is ignored", lvalue); + break; case DISABLED_EXPERIMENTAL: log_syntax(unit, LOG_INFO, filename, line, EINVAL, "Support for option %s= has not yet been enabled and it is ignored", lvalue); @@ -91,7 +95,6 @@ int config_parse_warn_compat( return 0; } -#endif int config_parse_unit_deps(const char *unit, const char *filename, @@ -1038,17 +1041,15 @@ int config_parse_bounding_set(const char *unit, FOREACH_WORD_QUOTED(word, l, rvalue, state) { _cleanup_free_ char *t = NULL; - int r; - cap_value_t cap; + int cap; t = strndup(word, l); if (!t) return log_oom(); - r = cap_from_name(t, &cap); - if (r < 0) { - log_syntax(unit, LOG_ERR, filename, line, errno, - "Failed to parse capability in bounding set, ignoring: %s", t); + cap = capability_from_name(t); + if (cap < 0) { + log_syntax(unit, LOG_ERR, filename, line, errno, "Failed to parse capability in bounding set, ignoring: %s", t); continue; }