The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1736
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Christian Brauner <[email protected]>
From 127a4f044d365eb0e10748921518c7cfd9d916b4 Mon Sep 17 00:00:00 2001 From: Christian Brauner <[email protected]> Date: Tue, 8 Aug 2017 20:35:43 +0200 Subject: [PATCH 1/2] cgfsng: do not use uninitialized variable Signed-off-by: Christian Brauner <[email protected]> --- src/lxc/cgroups/cgfsng.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 5e131683f..10d8ce631 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1904,10 +1904,12 @@ static int cgfsng_set(const char *filename, const char *value, const char *name, */ static int convert_devpath(const char *invalue, char *dest) { - char *p, *path, *mode, type; + int n_parts; + char *p, *path, type; struct stat sb; unsigned long minor, major; - int n_parts, ret = -EINVAL; + int ret = -EINVAL; + char *mode = NULL; path = must_copy_string(invalue); @@ -1931,6 +1933,11 @@ static int convert_devpath(const char *invalue, char *dest) goto out; } + if (!mode) { + ERROR("Device setting is missing a mode (e.g. rwm) argument"); + goto out; + } + if (n_parts == 1) goto out; @@ -1956,8 +1963,8 @@ static int convert_devpath(const char *invalue, char *dest) minor = MINOR(sb.st_rdev); ret = snprintf(dest, 50, "%c %lu:%lu %s", type, major, minor, mode); if (ret < 0 || ret >= 50) { - ERROR("Error on configuration value \"%c %lu:%lu %s\" (max 50 chars)", - type, major, minor, mode); + ERROR("Error on configuration value \"%c %lu:%lu %s\" (max 50 " + "chars)", type, major, minor, mode); ret = -ENAMETOOLONG; goto out; } From 2c5dfdf8933ab23ec355adebfad1bc0c7709aa9b Mon Sep 17 00:00:00 2001 From: Christian Brauner <[email protected]> Date: Tue, 8 Aug 2017 20:37:43 +0200 Subject: [PATCH 2/2] storage: fix android builds Signed-off-by: Christian Brauner <[email protected]> --- src/lxc/storage/storage.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lxc/storage/storage.c b/src/lxc/storage/storage.c index fee3d8df1..52164266a 100644 --- a/src/lxc/storage/storage.c +++ b/src/lxc/storage/storage.c @@ -65,6 +65,12 @@ #define BLKGETSIZE64 _IOR(0x12, 114, size_t) #endif +#if IS_BIONIC +#include <../include/lxcmntent.h> +#else +#include <mntent.h> +#endif + lxc_log_define(storage, lxc); /* aufs */
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
