Skip to content

Commit 0aac506

Browse files
mbieblkeszybz
authored andcommitted
hwdb: use path_join() to generate the hwdb_bin path (systemd#6063)
This avoids having double slashes which can confuse selinux.
1 parent 8e15892 commit 0aac506

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hwdb/hwdb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "hwdb-util.h"
3232
#include "label.h"
3333
#include "mkdir.h"
34+
#include "path-util.h"
3435
#include "selinux-util.h"
3536
#include "strbuf.h"
3637
#include "string-util.h"
@@ -670,7 +671,7 @@ static int hwdb_update(int argc, char *argv[], void *userdata) {
670671
log_debug("strings dedup'ed: %8zu bytes (%8zu)",
671672
trie->strings->dedup_len, trie->strings->dedup_count);
672673

673-
hwdb_bin = strjoin(arg_root, "/", arg_hwdb_bin_dir, "/hwdb.bin");
674+
hwdb_bin = path_join(arg_root, arg_hwdb_bin_dir, "hwdb.bin");
674675
if (!hwdb_bin)
675676
return -ENOMEM;
676677

0 commit comments

Comments
 (0)