From 40bc309c4f174a00ffa930204ced871219263c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Groenvall?= Date: Tue, 3 Oct 1995 10:07:37 +0000 Subject: [PATCH] Also check for effective uid (paranoia). git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@140 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/xnlock/xnlock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appl/xnlock/xnlock.c b/appl/xnlock/xnlock.c index a43b3696b..12e67b889 100644 --- a/appl/xnlock/xnlock.c +++ b/appl/xnlock/xnlock.c @@ -542,7 +542,8 @@ GetPasswd(Widget w, XEvent *_event, String *_s, Cardinal *_n) /* * Password that log out user */ - if (getuid() != 0 + if ( getuid() != 0 + && geteuid() != 0 && (time(0) - locked_at) > ALLOW_LOGOUT && strncmp(passwd, LOGOUT_PASSWD, sizeof(LOGOUT_PASSWD)) == 0) kill(-1, SIGHUP);