From: Christian Brauner Date: Sat, 13 Feb 2021 20:35:45 +0000 (+0100) Subject: lsm: convert to strequal() X-Git-Tag: lxc-5.0.0~290^2~3 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=12b902608a856a042ea4500ece10ae973476dd64;p=mirror_lxc.git lsm: convert to strequal() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/lsm/apparmor.c b/src/lxc/lsm/apparmor.c index 376a15301..5c9c19905 100644 --- a/src/lxc/lsm/apparmor.c +++ b/src/lxc/lsm/apparmor.c @@ -602,7 +602,7 @@ static bool file_is_yes(const char *path) rd = lxc_read_nointr(fd, buf, sizeof(buf)); close(fd); - return rd >= 4 && strncmp(buf, "yes\n", 4) == 0; + return rd >= 4 && strnequal(buf, "yes\n", 4); } static bool apparmor_can_stack(void)