diff --git a/man/less-variables.xml b/man/less-variables.xml index 03e4b353883..08e513c99f8 100644 --- a/man/less-variables.xml +++ b/man/less-variables.xml @@ -73,6 +73,17 @@ + + $SYSTEMD_URLIFY diff --git a/man/systemctl.xml b/man/systemctl.xml index fb0ca466202..3d86f7dffa8 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -2161,6 +2161,8 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err + + diff --git a/man/systemd.nspawn.xml b/man/systemd.nspawn.xml index 787d5fd699d..8f5590c73ad 100644 --- a/man/systemd.nspawn.xml +++ b/man/systemd.nspawn.xml @@ -32,58 +32,32 @@ Description - An nspawn container settings file (suffix - .nspawn) encodes additional runtime - information about a local container, and is searched, read and - used by - systemd-nspawn1 - when starting a container. Files of this type are named after the - containers they define settings for. They are optional, and only - required for containers whose execution environment shall differ - from the defaults. Files of this type mostly contain settings that - may also be set on the systemd-nspawn command - line, and make it easier to persistently attach specific settings - to specific containers. The syntax of these files is inspired by - .desktop files following the XDG - Desktop Entry Specification, which in turn are inspired by - Microsoft Windows .ini files. - - Boolean arguments used in these settings files can be - written in various formats. For positive settings, the strings - , , - and are equivalent. For negative settings, the - strings , , - and are - equivalent. - - Empty lines and lines starting with # or ; are - ignored. This may be used for commenting. Lines ending - in a backslash are concatenated with the following - line while reading and the backslash is replaced by a - space character. This may be used to wrap long lines. - + An nspawn container settings file (suffix .nspawn) contains runtime + configuration for a local container, and is used used by + systemd-nspawn1. + Files of this type are named after the containers they define settings for. They are optional, and only + required for containers whose execution environment shall differ from the defaults. Files of this type + mostly contain settings that may also be set on the systemd-nspawn command line, and + make it easier to persistently attach specific settings to specific containers. The syntax of these files + is inspired by .desktop files, similarly to other configuration files supported by + the systemd project. See + systemd.syntax7 for an + overview. <filename>.nspawn</filename> File Discovery - Files are searched by appending the - .nspawn suffix to the machine name of the - container, as specified with the - switch of systemd-nspawn, or derived from the - directory or image file name. This file is first searched in - /etc/systemd/nspawn/ and - /run/systemd/nspawn/. If found in these - directories, its settings are read and all of them take full effect - (but are possibly overridden by corresponding command line - arguments). If not found, the file will then be searched next to - the image file or in the immediate parent of the root directory of - the container. If the file is found there, only a subset of the - settings will take effect however. All settings that possibly - elevate privileges or grant additional access to resources of the - host (such as files or directories) are ignored. To which options - this applies is documented below. + Files are searched for by appending the .nspawn suffix to the machine name of + the container, as specified with the switch of + systemd-nspawn, or derived from the directory or image file name. This file is first + searched for in /etc/systemd/nspawn/ and + /run/systemd/nspawn/. If found there, the settings are read and all of them take + full effect (but may still be overridden by corresponding command line arguments). Otherwise, the file + will then be searched for next to the image file or in the immediate parent of the root directory of the + container. If the file is found there, only a subset of the settings will take effect however. All + settings that possibly elevate privileges or grant additional access to resources of the host (such as + files or directories) are ignored. To which options this applies is documented below. Persistent settings files created and maintained by the administrator (and thus trusted) should be placed in diff --git a/man/systemd.syntax.xml b/man/systemd.syntax.xml index 3b58e452803..05786cc534a 100644 --- a/man/systemd.syntax.xml +++ b/man/systemd.syntax.xml @@ -42,7 +42,9 @@ systemd.path5, systemd.timer5, systemd.slice5, - systemd.scope5 + systemd.scope5, + systemd.nspawn5 + daemon config files, see systemd-system.conf5, diff --git a/man/systemd.xml b/man/systemd.xml index 9b2d5ac2805..bde79d56fd8 100644 --- a/man/systemd.xml +++ b/man/systemd.xml @@ -669,8 +669,11 @@ script runlevel link farms. - - + + + + + $LISTEN_PID diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c index 98c3ff04ef2..511734cbbb8 100644 --- a/src/basic/terminal-util.c +++ b/src/basic/terminal-util.c @@ -1206,6 +1206,11 @@ bool colors_enabled(void) { val = getenv_bool("SYSTEMD_COLORS"); if (val >= 0) cached_colors_enabled = val; + + else if (getenv("NO_COLOR")) + /* We only check for the presence of the variable; value is ignored. */ + cached_colors_enabled = false; + else if (getpid_cached() == 1) /* PID1 outputs to the console without holding it open all the time */ cached_colors_enabled = !getenv_terminal_is_dumb(); @@ -1231,6 +1236,9 @@ bool dev_console_colors_enabled(void) { if (b >= 0) return b; + if (getenv("NO_COLOR")) + return false; + if (getenv_for_pid(1, "TERM", &s) <= 0) (void) proc_cmdline_get_key("TERM", 0, &s); diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 index 42fc4eaac9d..de08f7d0676 100644 --- a/src/core/load-fragment-gperf.gperf.m4 +++ b/src/core/load-fragment-gperf.gperf.m4 @@ -166,6 +166,8 @@ $1.WatchdogSignal, config_parse_signal, 0, )m4_dnl m4_define(`CGROUP_CONTEXT_CONFIG_ITEMS', `$1.Slice, config_parse_unit_slice, 0, 0 +$1.AllowedCPUs, config_parse_allowed_cpus, 0, offsetof($1, cgroup_context) +$1.AllowedMemoryNodes, config_parse_allowed_mems, 0, offsetof($1, cgroup_context) $1.CPUAccounting, config_parse_bool, 0, offsetof($1, cgroup_context.cpu_accounting) $1.CPUWeight, config_parse_cg_weight, 0, offsetof($1, cgroup_context.cpu_weight) $1.StartupCPUWeight, config_parse_cg_weight, 0, offsetof($1, cgroup_context.startup_cpu_weight) @@ -173,8 +175,6 @@ $1.CPUShares, config_parse_cpu_shares, 0, $1.StartupCPUShares, config_parse_cpu_shares, 0, offsetof($1, cgroup_context.startup_cpu_shares) $1.CPUQuota, config_parse_cpu_quota, 0, offsetof($1, cgroup_context) $1.CPUQuotaPeriodSec, config_parse_sec_def_infinity, 0, offsetof($1, cgroup_context.cpu_quota_period_usec) -$1.CPUSetCpus, config_parse_cpuset_cpus, 0, offsetof($1, cgroup_context) -$1.CPUSetMems, config_parse_cpuset_mems, 0, offsetof($1, cgroup_context) $1.MemoryAccounting, config_parse_bool, 0, offsetof($1, cgroup_context.memory_accounting) $1.MemoryMin, config_parse_memory_limit, 0, offsetof($1, cgroup_context) $1.DefaultMemoryMin, config_parse_memory_limit, 0, offsetof($1, cgroup_context) diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 0631ea5ce20..54c71d3579d 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -3146,7 +3146,7 @@ int config_parse_cpu_quota( return 0; } -int config_parse_cpuset_cpus( +int config_parse_allowed_cpus( const char *unit, const char *filename, unsigned line, @@ -3165,7 +3165,7 @@ int config_parse_cpuset_cpus( return 0; } -int config_parse_cpuset_mems( +int config_parse_allowed_mems( const char *unit, const char *filename, unsigned line, diff --git a/src/core/load-fragment.h b/src/core/load-fragment.h index f369c4dc4f6..b81887d5104 100644 --- a/src/core/load-fragment.h +++ b/src/core/load-fragment.h @@ -90,8 +90,8 @@ 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_cpu_quota); -CONFIG_PARSER_PROTOTYPE(config_parse_cpuset_cpus); -CONFIG_PARSER_PROTOTYPE(config_parse_cpuset_mems); +CONFIG_PARSER_PROTOTYPE(config_parse_allowed_cpus); +CONFIG_PARSER_PROTOTYPE(config_parse_allowed_mems); CONFIG_PARSER_PROTOTYPE(config_parse_protect_home); CONFIG_PARSER_PROTOTYPE(config_parse_protect_system); CONFIG_PARSER_PROTOTYPE(config_parse_bus_name); diff --git a/test/fuzz/fuzz-unit-file/directives.service b/test/fuzz/fuzz-unit-file/directives.service index 068f4398b9b..31a45043dac 100644 --- a/test/fuzz/fuzz-unit-file/directives.service +++ b/test/fuzz/fuzz-unit-file/directives.service @@ -3,6 +3,8 @@ Accept= AccuracySec= After= Alias= +AllowedCPUs= +AllowedMemoryNodes= AllowIsolate= Also= AmbientCapabilities=