From fbcb22c1850c8371dffc2cf9dbda0fe83031df10 Mon Sep 17 00:00:00 2001 From: erkin Date: Fri, 9 Jun 2023 17:19:00 +0300 Subject: T3472: Print warning when commit-confirm is run as regular user --- src/helpers/commit-confirm-notify.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/helpers/commit-confirm-notify.py b/src/helpers/commit-confirm-notify.py index eb7859ffa..8d7626c78 100755 --- a/src/helpers/commit-confirm-notify.py +++ b/src/helpers/commit-confirm-notify.py @@ -17,6 +17,7 @@ def notify(interval): if __name__ == "__main__": # Must be run as root to call wall(1) without a banner. if len(sys.argv) != 2 or os.getuid() != 0: + print('This script requires superuser privileges.', file=sys.stderr) exit(1) minutes = int(sys.argv[1]) # Drop the argument from the list so that the notification -- cgit v1.2.3