From: Alexander Kriventsov Date: Mon, 29 Jul 2019 16:33:39 +0000 (+0300) Subject: try to fix search user instead of search substring X-Git-Tag: lxc-4.0.0~124^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3112%2Fhead;p=thirdparty%2Flxc.git try to fix search user instead of search substring Signed-off-by: Alexander Kriventsov --- diff --git a/src/lxc/cmd/lxc_user_nic.c b/src/lxc/cmd/lxc_user_nic.c index 84823bd5d..15d000eeb 100644 --- a/src/lxc/cmd/lxc_user_nic.c +++ b/src/lxc/cmd/lxc_user_nic.c @@ -423,7 +423,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))