]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ctrlaltdel: remove unnecessary uid check
authorJJ-Meng <472537476@qq.com>
Fri, 19 Jan 2024 12:08:55 +0000 (20:08 +0800)
committerJJ-Meng <472537476@qq.com>
Fri, 19 Jan 2024 12:08:55 +0000 (20:08 +0800)
sys-utils/ctrlaltdel.c

index e9739860546899478bfab6b19e8b82e3a357b9f0..1601154f858f7f3a5c3f67d1d4fe5f526c03789b 100644 (file)
@@ -68,10 +68,6 @@ static int set_cad(const char *arg)
 {
        unsigned int cmd;
 
-       if (geteuid()) {
-               warnx(_("You must be root to set the Ctrl-Alt-Del behavior"));
-               return EXIT_FAILURE;
-       }
        if (!strcmp("hard", arg))
                cmd = LINUX_REBOOT_CMD_CAD_ON;
        else if (!strcmp("soft", arg))