]> granicus.if.org Git - sudo/commitdiff
Don't ask for a password if invoking user == target user.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 10 Jun 2004 20:19:38 +0000 (20:19 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 10 Jun 2004 20:19:38 +0000 (20:19 +0000)
check.c

diff --git a/check.c b/check.c
index 6ca53b71299f5560cb4cd9b46bb6aee6dbcee712..fed8bd0812f4acf7eb74f7249c5a5b06f0b09c11 100644 (file)
--- a/check.c
+++ b/check.c
@@ -89,7 +89,7 @@ check_user(override)
     char *prompt;
     int status;
 
-    if (user_uid == 0 || user_is_exempt())
+    if (user_uid == 0 || user_uid == runas_pw->pw_uid || user_is_exempt())
        return;
 
     build_timestamp(&timestampdir, &timestampfile);