Commit Graph

29 Commits

Author SHA1 Message Date
Todd C. Miller
840acbd3ac Update copyright years. 2008-11-09 14:13:13 +00:00
Todd C. Miller
ff175f7f0a No longer treat an empty password at the prompt as special. To
quit out of sudo you now need to hit ^C at the password prompt.
2008-11-07 17:45:52 +00:00
Todd C. Miller
778d587063 Update copyright years. 2005-02-12 22:56:07 +00:00
Todd C. Miller
3b8b88407f Add __unused to rcsids 2005-01-27 15:42:30 +00:00
Todd C. Miller
2c2daa8eca Use: #include <config.h>
Not: #include "config.h"
That way we get the correct config.h when build dir != src dir
2004-11-19 18:39:14 +00:00
Todd C. Miller
a414762c4e Add local error/warning functions like err/warn but that call an additional
cleanup routine in the error case.  This means we no longer need to compile
a special version of alloc.o for visudo.
2004-11-19 17:24:20 +00:00
Todd C. Miller
1a1009c060 More to a less restrictive, ISC-style license. 2004-02-13 21:36:47 +00:00
Todd C. Miller
ae1a984afc Add support for chalnecho and display server responses used by fwtk >= 2.0 2004-01-15 20:13:47 +00:00
Todd C. Miller
3944237480 Add a zero_bytes() function to do the equivalent of bzero in such a
way that will heopfully not be optimized away by sneaky compilers.
2003-12-31 22:46:10 +00:00
Todd C. Miller
6ad252765b Create def_* macros for each defaults value so we no longer need
the def_{flag,ival,str,list,mode} macros (which have been removed).
This is a step toward more flexible data types in def_data.in.
2003-12-30 22:20:21 +00:00
Todd C. Miller
94567681a7 add DARPA credit on affected files 2003-04-16 00:42:10 +00:00
Todd C. Miller
dcf1a5acce Use warn/err and getprogname() throughout. The main exception is
openlog().  Since the admin may be filtering logs based on the
program name in the log files, hard code this to "sudo".
2003-04-02 18:25:30 +00:00
Todd C. Miller
d6a9e16d95 update copyright year 2003-03-15 20:37:44 +00:00
Todd C. Miller
abb4e1ad35 Sprinkle some volatile qualifiers to prevent over-enthusiastic
optimizers from removing memset() calls.
2002-11-22 19:41:13 +00:00
Todd C. Miller
0ebe32423f The user's password was not zeroed after use when AIX authentication,
BSD authentication, FWTK or PAM was in use.
2002-01-21 22:25:14 +00:00
Todd C. Miller
65fad4df35 o Reorder some headers and use STDC_HEADERS define properly
o Update copyright year
2001-12-14 19:52:54 +00:00
Todd C. Miller
88951a3b9d Be carefule now that tgetpass() can return NULL (user hit ^C).
PAM version needs testing.
Set SIGTSTP to SIG_DFL during password entry so user can suspend us.
2001-12-09 05:17:00 +00:00
Todd C. Miller
16e6a3b84a Some defaults I_ defines got renamed. 2000-12-31 01:39:06 +00:00
Todd C. Miller
2ec9c6a45d When prompting for a response to a challenge, if the user just hits return
then reprompt with echo turned on.
2000-10-30 03:45:11 +00:00
Todd C. Miller
54fbe08545 Added -S flag (read passwd from stdin) and tgetpass_flags global
that holds flags to be passed in to tgetpass().  Change echo_off
param to tgetpass() into a flags field.  There are currently 2
possible flags for tgetpass(): TGP_ECHO and TGP_STDIN.  In tgetpass(),
abstract the echo set/clear via macros and if (flags & TGP_ECHO)
but echo is not set on the terminal, but sure to set it.
2000-02-27 03:49:07 +00:00
Todd C. Miller
b8d230f467 include <auth.h> to get function prototypes. 1999-10-12 00:53:41 +00:00
Todd C. Miller
7769bf6a32 o Change defaults stuff to put the value right in the struct.
o Implement mailer_flags
o Store syslog stuff both in int and string form.  Setting the string
  form magically updates the int version.
o Add boolean attribute to strings where it makes sense to say !foo
1999-10-07 21:21:08 +00:00
Todd C. Miller
13bf42675d Add support for "Defaults" line in sudoers to make configuration variables
changable at runtime (and on a global, per-host and per-user basis).
Both the names and the internal representation are still subject to change.
It was necessary to make sudo_user.runas but a char ** instead of a
char * since this value can be changed by a Defaults line.  There is a
similar (but more complicated) issue with sudo_user.prompt but it
is handled differently at the moment.

Add a "-L" flag to list the name of options with their descriptions.  This
may only be temporary.

Move some prototypes to parse.h

Be much less restrictive on what is allowed for a username.
1999-09-08 08:06:28 +00:00
Todd C. Miller
c5fc921211 _cleanup() function returns an int. 1999-08-27 14:54:52 +00:00
Todd C. Miller
d40947c0b0 In struct sudo_auth, turn need_root and configured into flags and
add a flag to specify an auth method is running alone (the only
one).  Pass auth methods their sudo_auth pointer, not the data
pointer.  This allows us to get at the flags and tell if we are the
only auth method.  That, in turn, allows the method to be able to
decide what should/should not be a fatal error.  Currently only
rfc1938 uses it this way, which allows us to kill the OTP_ONLY
define and te hackery that went with it.  With access to the
sudo_auth struct, methods can also get at a string holding their
cannonical name (useful in error messages).
1999-08-14 15:36:47 +00:00
Todd C. Miller
0d732401f4 add 4th term to license similar to term 5 in the apache license 1999-07-31 16:19:50 +00:00
Todd C. Miller
a1e0a8180a auth API change. There is now an init method that gets run before
the main loop.  This allows auth routines to differentiate between
initialization that happens once vs. setup that needs to run each time
through the loop.
1999-07-22 19:48:27 +00:00
Todd C. Miller
5d0a0e44e3 Use snprintf() where it makes sense and add a BSD-style copyright 1999-07-22 11:02:24 +00:00
Todd C. Miller
169d85ac9e New authentication API and methods 1999-07-11 00:32:11 +00:00