]> git.proxmox.com Git - mirror_lxc.git/commitdiff
lsm: convert to strequal()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 13 Feb 2021 20:35:45 +0000 (21:35 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 13 Feb 2021 20:41:25 +0000 (21:41 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lsm/apparmor.c

index 376a153014c89297fbfb13d99265087b61eb05cf..5c9c19905e917fc14e8082e3cebe869f6ef48cd1 100644 (file)
@@ -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)