try to fix search user instead of search substring

Signed-off-by: Alexander Kriventsov <akriventsov@nic.ru>
This commit is contained in:
Alexander Kriventsov 2019-07-29 19:33:39 +03:00
parent 3e8a11cb1c
commit 9ed8c96ffb

View File

@ -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))