From e6450bd5010e59453f4326cc0c8f23913a584717 Mon Sep 17 00:00:00 2001
From: GarfieldHan <2652609017@qq.com>
Date: Tue, 11 Jun 2024 20:51:08 +0800
Subject: [PATCH] supercall: Fix super key authentication

Signed-off-by: GarfieldHan <2652609017@qq.com>
---
 kernel/patch/common/supercall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/patch/common/supercall.c b/kernel/patch/common/supercall.c
index d512fd09..c5a686b3 100644
--- a/kernel/patch/common/supercall.c
+++ b/kernel/patch/common/supercall.c
@@ -346,7 +346,7 @@ static void before(hook_fargs6_t *args, void *udata)
 
     int is_key_auth = 0;
 
-    if (auth_superkey(key)) {
+    if (!auth_superkey(key)) {
         is_key_auth = 1;
     } else if (!strcmp("su", key)) {
         uid_t uid = current_uid();