[lxc-devel] [lxc/master] Fix opening wrong file in suggest_default_idmap

johnchen902 on Github lxc-bot at linuxcontainers.org
Wed Mar 22 03:13:37 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 421 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170322/cd9405b4/attachment.bin>
-------------- next part --------------
From 6be7389a70b6dd1ecbc39a73a5b54aa584f63de6 Mon Sep 17 00:00:00 2001
From: John Chen <johnchen902 at gmail.com>
Date: Wed, 22 Mar 2017 11:03:59 +0800
Subject: [PATCH] Fix opening wrong file in suggest_default_idmap

Fixing the typo making `suggest_default_idmap` open `subuidfile`
instead of `subgidfile` to read subgid information.

Signed-off-by: Pochang Chen <johnchen902 at gmail.com>
---
 src/lxc/conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 55de873..fc80b01 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -4560,7 +4560,7 @@ void suggest_default_idmap(void)
 	}
 	fclose(f);
 
-	f = fopen(subuidfile, "r");
+	f = fopen(subgidfile, "r");
 	if (!f) {
 		ERROR("Your system is not configured with subgids");
 		free(gname);


More information about the lxc-devel mailing list