summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc/files/open_without_symlink-Account-when-prefix-is-empty-st.patch
diff options
context:
space:
mode:
authorBogdan Purcareata <bogdan.purcareata@nxp.com>2016-02-29 15:27:59 +0000
committerBruce Ashfield <bruce.ashfield@windriver.com>2016-03-07 11:30:37 -0500
commitf3e598729639546303e4bf041989417efe23613d (patch)
treed191404c75ea54437ff0597faaa876842b4b4d78 /recipes-containers/lxc/files/open_without_symlink-Account-when-prefix-is-empty-st.patch
parent5ea2664dc06b4f0240d5939c164fb6c0b0620e2e (diff)
downloadmeta-virtualization-f3e598729639546303e4bf041989417efe23613d.tar.gz
lxc: upstream fixes for lxc-execute
These patches address some warnings that LXC throws when running an application container. They are currently applied in the official repository. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/lxc/files/open_without_symlink-Account-when-prefix-is-empty-st.patch')
-rw-r--r--recipes-containers/lxc/files/open_without_symlink-Account-when-prefix-is-empty-st.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/open_without_symlink-Account-when-prefix-is-empty-st.patch b/recipes-containers/lxc/files/open_without_symlink-Account-when-prefix-is-empty-st.patch
new file mode 100644
index 00000000..28f9889b
--- /dev/null
+++ b/recipes-containers/lxc/files/open_without_symlink-Account-when-prefix-is-empty-st.patch
@@ -0,0 +1,37 @@
1From 01074e5b34719537cef474c6b81d4f55e6427639 Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@nxp.com>
3Date: Fri, 8 Jan 2016 15:38:35 +0000
4Subject: [PATCH] open_without_symlink: Account when prefix is empty string
5
6In the current implementation, the open_without_symlink function
7will default to opening the root mount only if the passed rootfs
8prefix is null. It doesn't account for the case where this prefix
9is passed as an empty string.
10
11Properly handle this second case as well.
12
13Upstream-Status: Accepted
14[https://github.com/lxc/lxc/commit/01074e5b34719537cef474c6b81d4f55e6427639]
15
16Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
17Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
18---
19 src/lxc/utils.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/src/lxc/utils.c b/src/lxc/utils.c
23index ed8c4c4..4e96a50 100644
24--- a/src/lxc/utils.c
25+++ b/src/lxc/utils.c
26@@ -1575,7 +1575,7 @@ static int open_without_symlink(const char *target, const char *prefix_skip)
27 fulllen = strlen(target);
28
29 /* make sure prefix-skip makes sense */
30- if (prefix_skip) {
31+ if (prefix_skip && strlen(prefix_skip) > 0) {
32 curlen = strlen(prefix_skip);
33 if (!is_subdir(target, prefix_skip, curlen)) {
34 ERROR("WHOA there - target '%s' didn't start with prefix '%s'",
35--
361.9.1
37