diff options
-rw-r--r-- | recipes-containers/lxc/files/lxc-0.9.0-always-strdup-rootfs-mount.patch | 27 | ||||
-rw-r--r-- | recipes-containers/lxc/lxc_0.9.0.bb | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/lxc-0.9.0-always-strdup-rootfs-mount.patch b/recipes-containers/lxc/files/lxc-0.9.0-always-strdup-rootfs-mount.patch new file mode 100644 index 00000000..3e299d2f --- /dev/null +++ b/recipes-containers/lxc/files/lxc-0.9.0-always-strdup-rootfs-mount.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | diff --git a/src/lxc/conf.c b/src/lxc/conf.c | ||
2 | index 6b3f318..2f8b9e6 100644 | ||
3 | --- a/src/lxc/conf.c | ||
4 | +++ b/src/lxc/conf.c | ||
5 | @@ -2072,7 +2072,12 @@ struct lxc_conf *lxc_conf_init(void) | ||
6 | new->console.slave = -1; | ||
7 | new->console.name[0] = '\0'; | ||
8 | new->maincmd_fd = -1; | ||
9 | - new->rootfs.mount = default_rootfs_mount; | ||
10 | + new->rootfs.mount = strdup(default_rootfs_mount); | ||
11 | + if (!new->rootfs.mount) { | ||
12 | + ERROR("lxc_conf_init : %m"); | ||
13 | + free(new); | ||
14 | + return NULL; | ||
15 | + } | ||
16 | new->kmsg = 1; | ||
17 | lxc_list_init(&new->cgroup); | ||
18 | lxc_list_init(&new->network); | ||
19 | @@ -3084,7 +3089,7 @@ void lxc_conf_free(struct lxc_conf *conf) | ||
20 | return; | ||
21 | if (conf->console.path) | ||
22 | free(conf->console.path); | ||
23 | - if (conf->rootfs.mount != default_rootfs_mount) | ||
24 | + if (conf->rootfs.mount) | ||
25 | free(conf->rootfs.mount); | ||
26 | if (conf->rootfs.path) | ||
27 | free(conf->rootfs.path); | ||
diff --git a/recipes-containers/lxc/lxc_0.9.0.bb b/recipes-containers/lxc/lxc_0.9.0.bb index 8f7736b7..fceefffd 100644 --- a/recipes-containers/lxc/lxc_0.9.0.bb +++ b/recipes-containers/lxc/lxc_0.9.0.bb | |||
@@ -26,6 +26,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${PN}-${PV}.tar.gz \ | |||
26 | file://lxc-0.9.0-enable-chroot-chpasswd-functionality-for-busybox-hosts.patch \ | 26 | file://lxc-0.9.0-enable-chroot-chpasswd-functionality-for-busybox-hosts.patch \ |
27 | file://lxc-0.9.0-check-when-bind-mounting-libdirs.patch \ | 27 | file://lxc-0.9.0-check-when-bind-mounting-libdirs.patch \ |
28 | file://lxc-0.9.0-don-t-let-LXC_PATH-end-in-failure.patch \ | 28 | file://lxc-0.9.0-don-t-let-LXC_PATH-end-in-failure.patch \ |
29 | file://lxc-0.9.0-always-strdup-rootfs-mount.patch \ | ||
29 | " | 30 | " |
30 | SRC_URI[md5sum] = "8552a4479090616f4bc04d8473765fc9" | 31 | SRC_URI[md5sum] = "8552a4479090616f4bc04d8473765fc9" |
31 | SRC_URI[sha256sum] = "1e1767eae6cc5fbf892c0e193d25da420ba19f2db203716c38f7cdea3b654120" | 32 | SRC_URI[sha256sum] = "1e1767eae6cc5fbf892c0e193d25da420ba19f2db203716c38f7cdea3b654120" |