]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: don't check for permissions
authorKarel Zak <kzak@redhat.com>
Fri, 9 Dec 2016 08:47:33 +0000 (09:47 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 9 Dec 2016 08:47:33 +0000 (09:47 +0100)
The right place to verify user permissions is kernel. The current
situation is too strict (due to previous attempts to use hwclock as
suid that has never been supported).

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/hwclock.c

index 21caeb21b47f38e7c569b45d5959df51f1531ed4..d36c9c9b89672ef789c55f0bc4bffea620831382 100644 (file)
@@ -1859,11 +1859,6 @@ int main(int argc, char **argv)
        argc -= optind;
        argv += optind;
 
-       if (getuid() != 0) {
-               warnx(_("Sorry, only the superuser can use the Hardware Clock."));
-               hwclock_exit(EX_NOPERM);
-       }
-
 #ifdef HAVE_LIBAUDIT
        if (testing != TRUE) {
                if (adjust == TRUE || hctosys == TRUE || systohc == TRUE ||