From c27ea96f7f21edcefae21ce00e11c92edfd51932 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Graber?= Date: Tue, 3 Jan 2023 18:02:44 -0500 Subject: [PATCH] checkconfig: Fix filesystem capability check MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- src/lxc/cmd/lxc-checkconfig.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lxc/cmd/lxc-checkconfig.in b/src/lxc/cmd/lxc-checkconfig.in index ccddfe4b3..85333e5e1 100755 --- a/src/lxc/cmd/lxc-checkconfig.in +++ b/src/lxc/cmd/lxc-checkconfig.in @@ -271,15 +271,15 @@ echo -n "CONFIG_PACKET_DIAG: " && is_enabled CONFIG_PACKET_DIAG echo echo -n "CONFIG_NETLINK_DIAG: " && is_enabled CONFIG_NETLINK_DIAG echo -echo -n "File capabilities: " && \ - ( [ "${KVER_MAJOR}" = 2 ] && [ ${KVER_MINOR} -lt 33 ] && \ - is_enabled CONFIG_SECURITY_FILE_CAPABILITIES; echo ) || \ - ( ( [ "${KVER_MAJOR}" = "2" ] && [ ${KVER_MINOR} -gt 32 ] ) || \ - [ ${KVER_MAJOR} -gt 2 ] && $SETCOLOR_SUCCESS && \ - echo "enabled" && $SETCOLOR_NORMAL ) +echo -n "File capabilities: " +if [ "${KVER_MAJOR}" = 2 ] && [ ${KVER_MINOR} -lt 33 ]; then + is_enabled CONFIG_SECURITY_FILE_CAPABILITIES + echo +else + $SETCOLOR_SUCCESS && echo "enabled" && $SETCOLOR_NORMAL +fi echo echo "Note : Before booting a new kernel, you can check its configuration" echo "usage : CONFIG=/path/to/config $0" echo - -- 2.47.2