summaryrefslogtreecommitdiff
path: root/usr.bin/sudo/auth/sudo_auth.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-03-15 21:23:55 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-03-15 21:23:55 +0000
commitbbb8ce99718ff8e96e3ab9f63e060f51d45a353f (patch)
treeb9192dd905951043df796920ee782c06c3768f0f /usr.bin/sudo/auth/sudo_auth.c
parentf2636e6fcc8e9592b1ec53c4ca27c6187d03761f (diff)
update to what will soon be sudo 1.6.7
Diffstat (limited to 'usr.bin/sudo/auth/sudo_auth.c')
-rw-r--r--usr.bin/sudo/auth/sudo_auth.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/sudo/auth/sudo_auth.c b/usr.bin/sudo/auth/sudo_auth.c
index eb4c3c4f9a9..c02fd2e51a3 100644
--- a/usr.bin/sudo/auth/sudo_auth.c
+++ b/usr.bin/sudo/auth/sudo_auth.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999-2001 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2002 Todd C. Miller <Todd.Miller@courtesan.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -67,7 +67,7 @@
#include "insults.h"
#ifndef lint
-static const char rcsid[] = "$Sudo: sudo_auth.c,v 1.25 2001/12/14 19:52:54 millert Exp $";
+static const char rcsid[] = "$Sudo: sudo_auth.c,v 1.28 2003/03/15 20:37:44 millert Exp $";
#endif /* lint */
sudo_auth auth_switch[] = {
@@ -113,7 +113,7 @@ verify_user(pw, prompt)
int success = AUTH_FAILURE;
int status;
int flags;
- char *p;
+ volatile char *p;
sudo_auth *auth;
sigaction_t sa, osa;
@@ -138,7 +138,7 @@ verify_user(pw, prompt)
for (auth = auth_switch; auth->name; auth++) {
if (auth->init && IS_CONFIGURED(auth)) {
if (NEEDS_USER(auth))
- set_perms(PERM_USER, 0);
+ set_perms(PERM_USER);
status = (auth->init)(pw, &prompt, auth);
if (status == AUTH_FAILURE)
@@ -147,7 +147,7 @@ verify_user(pw, prompt)
exit(1); /* assume error msg already printed */
if (NEEDS_USER(auth))
- set_perms(PERM_ROOT, 0);
+ set_perms(PERM_ROOT);
}
}
@@ -156,7 +156,7 @@ verify_user(pw, prompt)
for (auth = auth_switch; auth->name; auth++) {
if (auth->setup && IS_CONFIGURED(auth)) {
if (NEEDS_USER(auth))
- set_perms(PERM_USER, 0);
+ set_perms(PERM_USER);
status = (auth->setup)(pw, &prompt, auth);
if (status == AUTH_FAILURE)
@@ -165,7 +165,7 @@ verify_user(pw, prompt)
exit(1); /* assume error msg already printed */
if (NEEDS_USER(auth))
- set_perms(PERM_ROOT, 0);
+ set_perms(PERM_ROOT);
}
}
@@ -186,12 +186,12 @@ verify_user(pw, prompt)
continue;
if (NEEDS_USER(auth))
- set_perms(PERM_USER, 0);
+ set_perms(PERM_USER);
- success = auth->status = (auth->verify)(pw, p, auth);
+ success = auth->status = (auth->verify)(pw, (char *)p, auth);
if (NEEDS_USER(auth))
- set_perms(PERM_ROOT, 0);
+ set_perms(PERM_ROOT);
if (auth->status != AUTH_FAILURE)
goto cleanup;
@@ -217,14 +217,14 @@ cleanup:
for (auth = auth_switch; auth->name; auth++) {
if (auth->cleanup && IS_CONFIGURED(auth)) {
if (NEEDS_USER(auth))
- set_perms(PERM_USER, 0);
+ set_perms(PERM_USER);
status = (auth->cleanup)(pw, auth);
if (status == AUTH_FATAL) /* XXX log */
exit(1); /* assume error msg already printed */
if (NEEDS_USER(auth))
- set_perms(PERM_ROOT, 0);
+ set_perms(PERM_ROOT);
}
}