From 8165be2edf635535fc742cb77edc7e66f173f231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 14 Sep 2017 11:55:00 +0200 Subject: [PATCH 1/3] man: unify titling, fix description of precedence in sysusers.d(5) Fixes #6639. (This behaviour of systemd-sysusers is long established, so it's better to adjust the documentation rather than change the code. If there are any situations out there where it matters, users must have adjusted to the current behaviour.) --- man/standard-conf.xml | 1 - man/systemd-sysusers.xml | 2 +- man/sysusers.d.xml | 32 ++++++++++++++++++++++++++++---- man/tmpfiles.d.xml | 6 +++++- 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/man/standard-conf.xml b/man/standard-conf.xml index 6edbb7ff83..40764f525b 100644 --- a/man/standard-conf.xml +++ b/man/standard-conf.xml @@ -32,7 +32,6 @@ /etc/, with the same filename as the vendor configuration file. If the vendor configuration file is included in the initrd image, the image has to be regenerated. - diff --git a/man/systemd-sysusers.xml b/man/systemd-sysusers.xml index 4892caad12..990b935cf2 100644 --- a/man/systemd-sysusers.xml +++ b/man/systemd-sysusers.xml @@ -74,7 +74,7 @@ specified in sysusers.d5 are searched for a matching file. If the string - - is specified as filename, entries from the + - is specified instead of a filename, entries from the standard input of the process are read. diff --git a/man/sysusers.d.xml b/man/sysusers.d.xml index 2b87385d9c..c8f4c9cee7 100644 --- a/man/sysusers.d.xml +++ b/man/sysusers.d.xml @@ -63,7 +63,7 @@ - Configuration Format + Configuration Directories and Precedence Each configuration file shall be named in the style of package.conf or @@ -71,6 +71,33 @@ The second variant should be used when it is desirable to make it easy to override just this part of configuration. + Files in /etc/sysusers.d override files + with the same name in /usr/lib/sysusers.d and + /run/sysusers.d. Files in + /run/sysusers.d override files with the same + name in /usr/lib/sysusers.d. Packages should + install their configuration files in + /usr/lib/sysusers.d. Files in + /etc/sysusers.d are reserved for the local + administrator, who may use this logic to override the + configuration files installed by vendor packages. All + configuration files are sorted by their filename in lexicographic + order, regardless of which of the directories they reside in. If + multiple files specify the same path, the entry in the file with + the lexicographically earliest name will be applied. All later + entries for the same user and group names will be logged as warnings. + + + If the administrator wants to disable a configuration file + supplied by the vendor, the recommended way is to place a symlink + to /dev/null in + /etc/sysusers.d/ bearing the same filename. + + + + + Configuration File Format + The file format is one line per user or group containing name, ID, GECOS field description and home directory: @@ -198,11 +225,8 @@ u root 0 "Superuser" /root should otherwise be left unset, or be set to -. - - - Idempotence diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index 29f8553196..a5c2b59e7e 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -76,7 +76,7 @@ - Configuration Format + Configuration Directories and Precedence Each configuration file shall be named in the style of package.conf or @@ -112,6 +112,10 @@ to /dev/null in /etc/tmpfiles.d/ bearing the same filename. + + + + Configuration File Format The configuration format is one line per path containing type, path, mode, ownership, age, and argument fields: From 07970eecbfb64e2e68f3e6ad210085198f3d9ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 14 Sep 2017 11:55:34 +0200 Subject: [PATCH 2/3] man: reformat table in sysusers.d(5) I think it's quite a bit easier to read in this way. --- man/sysusers.d.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/man/sysusers.d.xml b/man/sysusers.d.xml index c8f4c9cee7..fbe97544d7 100644 --- a/man/sysusers.d.xml +++ b/man/sysusers.d.xml @@ -101,12 +101,12 @@ The file format is one line per user or group containing name, ID, GECOS field description and home directory: - # Type Name ID GECOS -u httpd 440 "HTTP User" -u authd /usr/bin/authd "Authorization user" -g input - - -m authd input -u root 0 "Superuser" /root + #Type Name ID GECOS Home directory +u httpd 440 "HTTP User" +u authd /usr/bin/authd "Authorization user" +g input - - +m authd input +u root 0 "Superuser" /root Empty lines and lines beginning with the # character are ignored, and may be used for commenting. From 1b934761ae366d84feb4b601382fa11b5d775633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 14 Sep 2017 12:13:31 +0200 Subject: [PATCH 3/3] man: add a note about Name=eth0 being bad Fixes #2657. --- man/systemd.link.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/man/systemd.link.xml b/man/systemd.link.xml index 1a13a22877..066bed126b 100644 --- a/man/systemd.link.xml +++ b/man/systemd.link.xml @@ -79,7 +79,7 @@ how the device should be configured. The first (in lexical order) of the link files that matches a given device is applied. Note that a default file 99-default.link is - shipped by the system, any user-supplied + shipped by the system. Any user-supplied .link should hence have a lexically earlier name to be considered at all. @@ -332,6 +332,16 @@ NamePolicy= fail, or in case NamePolicy= is missing or disabled. + + Note that specifying a name that the kernel might use for another + interface (for example eth0) is dangerous because the + name assignment done by udev will race with the assignment done by the + kernel, and only one interface may use the name. Depending on the order of + operations, either udev or the kernel will win, making the naming + unpredictable. It is best to use some different prefix, for example + internal0/external0 or + lan0/lan1/lan3. +