mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 12:13:33 +08:00
hwdb: use path_join() to generate the hwdb_bin path (#6063)
This avoids having double slashes which can confuse selinux.
This commit is contained in:
parent
8e1589269a
commit
0aac506b64
@ -31,6 +31,7 @@
|
|||||||
#include "hwdb-util.h"
|
#include "hwdb-util.h"
|
||||||
#include "label.h"
|
#include "label.h"
|
||||||
#include "mkdir.h"
|
#include "mkdir.h"
|
||||||
|
#include "path-util.h"
|
||||||
#include "selinux-util.h"
|
#include "selinux-util.h"
|
||||||
#include "strbuf.h"
|
#include "strbuf.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
@ -670,7 +671,7 @@ static int hwdb_update(int argc, char *argv[], void *userdata) {
|
|||||||
log_debug("strings dedup'ed: %8zu bytes (%8zu)",
|
log_debug("strings dedup'ed: %8zu bytes (%8zu)",
|
||||||
trie->strings->dedup_len, trie->strings->dedup_count);
|
trie->strings->dedup_len, trie->strings->dedup_count);
|
||||||
|
|
||||||
hwdb_bin = strjoin(arg_root, "/", arg_hwdb_bin_dir, "/hwdb.bin");
|
hwdb_bin = path_join(arg_root, arg_hwdb_bin_dir, "hwdb.bin");
|
||||||
if (!hwdb_bin)
|
if (!hwdb_bin)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user