diff options
Diffstat (limited to 'main/apk-tools/0001-db-handle-default-root-correctly-for-proc.patch')
-rw-r--r-- | main/apk-tools/0001-db-handle-default-root-correctly-for-proc.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/main/apk-tools/0001-db-handle-default-root-correctly-for-proc.patch b/main/apk-tools/0001-db-handle-default-root-correctly-for-proc.patch new file mode 100644 index 0000000000..44ebd8df8f --- /dev/null +++ b/main/apk-tools/0001-db-handle-default-root-correctly-for-proc.patch @@ -0,0 +1,28 @@ +From 97e4d0531f2633b54996fc08447bb46449f4a45a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Tue, 10 Oct 2017 11:38:07 +0300 +Subject: [PATCH] db: handle default root correctly for /proc + +dbopts->root may be null; use db->root instead + +fixes #7162 +--- + src/database.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/database.c b/src/database.c +index 12f1d16..a35bab2 100644 +--- a/src/database.c ++++ b/src/database.c +@@ -1581,7 +1581,7 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts) + apk_blob_to_file(db->root_fd, apk_arch_file, *db->arch, APK_BTF_ADD_EOL); + + /* mount /proc */ +- if (asprintf(&db->root_proc_dir, "%s/proc", dbopts->root) == -1) ++ if (asprintf(&db->root_proc_dir, "%s/proc", db->root) == -1) + goto ret_errno; + if (statfs(db->root_proc_dir, &stfs) != 0) { + if (errno == ENOENT) mkdir(db->root_proc_dir, 0555); +-- +2.14.2 + |