diff options
author | Michal Sekletar <msekletar@users.noreply.github.com> | 2016-07-08 17:43:05 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-07-08 17:43:05 +0200 |
commit | 905c37e60ef653557d0354c2afa94546c31efe50 (patch) | |
tree | ce8676606a4cca19fafa7bc140eb07da99998e61 /src | |
parent | 224d3d826690152dfb4bc20b7efd06d69f5d9b17 (diff) |
udevadm: explicitly relabel /etc/udev/hwdb.bin after rename (#3686)
This is basically the same change as ea68351.
Diffstat (limited to 'src')
-rw-r--r-- | src/udev/udevadm-hwdb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index 948ad0f5a5..1bffe8e8ab 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -28,6 +28,8 @@ #include "fs-util.h" #include "hwdb-internal.h" #include "hwdb-util.h" +#include "label.h" +#include "mkdir.h" #include "strbuf.h" #include "string-util.h" #include "udev.h" @@ -656,12 +658,16 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { rc = EXIT_FAILURE; goto out; } - mkdir_parents(hwdb_bin, 0755); + + mkdir_parents_label(hwdb_bin, 0755); + err = trie_store(trie, hwdb_bin); if (err < 0) { log_error_errno(err, "Failure writing database %s: %m", hwdb_bin); rc = EXIT_FAILURE; } + + label_fix(hwdb_bin, false, false); } if (test) { |