|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
From 4f7c12c0147e9467a4adb76c5587cc2fe9bb627a Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
From: Michael Biebl <mbiebl@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
Date: Thu, 1 Jun 2017 03:21:11 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
Subject: [PATCH] hwdb: use path_join() to generate the hwdb_bin path (#6063)
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
This avoids having double slashes which can confuse selinux.
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
(cherry picked from commit 0aac506b64dd6102374635290ca979b080d1192f)
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
src/hwdb/hwdb.c | 3 ++-
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
index a23b614791..df79fbc275 100644
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
--- a/src/hwdb/hwdb.c
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
+++ b/src/hwdb/hwdb.c
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
@@ -31,6 +31,7 @@
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
#include "hwdb-util.h"
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
#include "label.h"
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
#include "mkdir.h"
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
+#include "path-util.h"
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
#include "selinux-util.h"
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
#include "strbuf.h"
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
#include "string-util.h"
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
@@ -670,7 +671,7 @@ static int hwdb_update(int argc, char *argv[], void *userdata) {
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
log_debug("strings dedup'ed: %8zu bytes (%8zu)",
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
trie->strings->dedup_len, trie->strings->dedup_count);
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
- hwdb_bin = strjoin(arg_root, "/", arg_hwdb_bin_dir, "/hwdb.bin");
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
+ hwdb_bin = path_join(arg_root, arg_hwdb_bin_dir, "hwdb.bin");
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
if (!hwdb_bin)
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
return -ENOMEM;
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
|