diff options
author | Franck Bui <fbui@suse.com> | 2018-01-10 23:28:44 +0100 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2018-01-13 12:19:22 -0500 |
commit | dd1377a031febc440b70e0a7efb643882957aaff (patch) | |
tree | 581058cecdcd63d08d012595031f5da790c50880 /src | |
parent | util-lib: save/restore errno in cleanup calls (diff) | |
download | systemd-dd1377a031febc440b70e0a7efb643882957aaff.tar.gz systemd-dd1377a031febc440b70e0a7efb643882957aaff.tar.bz2 systemd-dd1377a031febc440b70e0a7efb643882957aaff.zip |
tmpfiles: consider /etc uninitialized also when /etc/machine-id is present but empty (#7849)
(cherry picked from commit d8dab75789ec1ffd53fc06f5f370220ae7b31d9d)
Diffstat (limited to 'src')
-rw-r--r-- | src/tmpfiles/tmpfiles.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index a7ce1a804..fad3f7461 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -199,12 +199,12 @@ static const Specifier specifier_table[] = { static int specifier_machine_id_safe(char specifier, void *data, void *userdata, char **ret) { int r; - /* If /etc/machine_id is missing (e.g. in a chroot environment), returns - * a recognizable error so that the caller can skip the rule + /* If /etc/machine_id is missing or empty (e.g. in a chroot environment) + * return a recognizable error so that the caller can skip the rule * gracefully. */ r = specifier_machine_id(specifier, data, userdata, ret); - if (r == -ENOENT) + if (IN_SET(r, -ENOENT, -ENOMEDIUM)) return -ENXIO; return r; |