]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
load-fragment: drop config_parse_no_new_privileges() and use config_parse_bool()...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 25 May 2018 03:52:12 +0000 (12:52 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 31 May 2018 02:09:41 +0000 (11:09 +0900)
src/core/load-fragment-gperf.gperf.m4
src/core/load-fragment.c
src/core/load-fragment.h

index e676811874ad992a7bd6c5a829a7c1fa229e8a71..712839d4c296ab6e672a8633a0d7348e7993d969 100644 (file)
@@ -63,7 +63,7 @@ $1.SecureBits,                   config_parse_exec_secure_bits,      0,
 $1.CapabilityBoundingSet,        config_parse_capability_set,        0,                             offsetof($1, exec_context.capability_bounding_set)
 $1.AmbientCapabilities,          config_parse_capability_set,        0,                             offsetof($1, exec_context.capability_ambient_set)
 $1.TimerSlackNSec,               config_parse_nsec,                  0,                             offsetof($1, exec_context.timer_slack_nsec)
-$1.NoNewPrivileges,              config_parse_no_new_privileges,     0,                             offsetof($1, exec_context)
+$1.NoNewPrivileges,              config_parse_bool,                  0,                             offsetof($1, exec_context.no_new_privileges)
 $1.KeyringMode,                  config_parse_exec_keyring_mode,     0,                             offsetof($1, exec_context.keyring_mode)
 m4_ifdef(`HAVE_SECCOMP',
 `$1.SystemCallFilter,            config_parse_syscall_filter,        0,                             offsetof($1, exec_context)
index 5bee13119115e505da7101d7dbb59462bc0ae1a7..b9b7cd1122eabdc6dd22bcdc7997697582db4892 100644 (file)
@@ -4358,37 +4358,6 @@ int config_parse_bind_paths(
         return 0;
 }
 
-int config_parse_no_new_privileges(
-                const char* unit,
-                const char *filename,
-                unsigned line,
-                const char *section,
-                unsigned section_line,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
-
-        ExecContext *c = data;
-        int r;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        r = parse_boolean(rvalue);
-        if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse boolean value, ignoring: %s", rvalue);
-                return 0;
-        }
-
-        c->no_new_privileges = r;
-
-        return 0;
-}
-
 int config_parse_protect_home(
                 const char* unit,
                 const char *filename,
index 3f8849422c5cb711f57cbd57ee88f3ea5948d118..1fc471a44fcc8f81c81eecb16ca0c91d0a12d38c 100644 (file)
@@ -92,7 +92,6 @@ CONFIG_PARSER_PROTOTYPE(config_parse_exec_directories);
 CONFIG_PARSER_PROTOTYPE(config_parse_set_status);
 CONFIG_PARSER_PROTOTYPE(config_parse_namespace_path_strv);
 CONFIG_PARSER_PROTOTYPE(config_parse_temporary_filesystems);
-CONFIG_PARSER_PROTOTYPE(config_parse_no_new_privileges);
 CONFIG_PARSER_PROTOTYPE(config_parse_cpu_quota);
 CONFIG_PARSER_PROTOTYPE(config_parse_protect_home);
 CONFIG_PARSER_PROTOTYPE(config_parse_protect_system);