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-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b87129fde687c0f236217865b71cd7d66121c79;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 40c9aa9d7..afa451dee 100644 --- a/src/lxc/cmd/lxc_user_nic.c +++ b/src/lxc/cmd/lxc_user_nic.c @@ -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))