]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
try to fix search user instead of search substring
authorAlexander Kriventsov <akriventsov@nic.ru>
Mon, 29 Jul 2019 16:33:39 +0000 (19:33 +0300)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 2 Dec 2019 12:58:52 +0000 (13:58 +0100)
Signed-off-by: Alexander Kriventsov <akriventsov@nic.ru>
src/lxc/cmd/lxc_user_nic.c

index 40c9aa9d704329e688189d60e7242628f019a198..afa451deecc4be5d1adb675c0778e29f6ba9852d 100644 (file)
@@ -444,7 +444,8 @@ static char *find_line(char *buf_start, char *buf_end, char *name,
                if (strncmp(buf_start, name, strlen(name)))
                        *found = false;
                else
-                       *owner = true;
+                       if (strlen(name) == (size_t)(end_of_word - buf_start))
+                               *owner = true;
 
                buf_start = end_of_word + 1;
                while ((buf_start < buf_end) && isblank(*buf_start))