mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
udevadm: explicitly relabel /etc/udev/hwdb.bin after rename (#3686)
This is basically the same change as ea68351.
This commit is contained in:
parent
224d3d8266
commit
905c37e60e
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user