Commit Graph

26 Commits

Author SHA1 Message Date
Todd C. Miller
c289159953 g/c second arg to set_perms--it is no longer used 2002-05-05 00:43:38 +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
e299dee342 Add support for skeyaccess(3) if it is present in libskey. 2001-12-14 06:15:08 +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
de9d655ea6 Add mail_badpass option
Also modify mail_always behavior to also send mail when the password is wrong
2001-11-12 18:13:03 +00:00
Todd C. Miller
16e6a3b84a Some defaults I_ defines got renamed. 2000-12-31 01:39:06 +00:00
Todd C. Miller
165bd7fafb Fix root, runas, and target authentication for non-passwd file auth
methods.
2000-05-09 15:42:38 +00:00
Todd C. Miller
4ea67119ea HAVE_SECUREWARE -> HAVE_GETPRPWNAM; fixes secureware support 2000-03-06 19:42:21 +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
8446da40fb Don't allow insults to be enabled if the insults[] array is empty.
Otherwise there would be division by zero.
1999-12-06 06:47:19 +00:00
Todd C. Miller
c85a0b9bc4 Honor insults flag. 1999-12-06 06:23:29 +00:00
Todd C. Miller
3acdd5b02f New krb5 code from Frank Cusack <fcusack@iconnet.net>. 1999-10-13 02:34:55 +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
ba31293c29 add check for case where there are no auth methods 1999-08-28 09:50:27 +00:00
Todd C. Miller
e026a2c24c move memset() of plaintext pw outside of verify loop and only do the
memset if we are *not* in standalone mode.
1999-08-27 20:09:15 +00:00
Todd C. Miller
017a9a0ad6 DCE is not a standalone method 1999-08-27 17:46:54 +00:00
Todd C. Miller
275c2fc980 Run most of the code as root, not the invoking user. It doesn't really
gain us anything to run as the user since an attacker can just have
an setuid(0) in their egg.  Running as root solves potential problems
wrt signalling.
1999-08-20 20:37:16 +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
d7ebfe06d1 o Digital UNIX needs to check for *snprintf() before -ldb is added to LIBS
since -ldb includes a bogus snprintf().
o Add forward refs for struct mbuf and struct rtentry for Digital UNIX.
o Reorder some functions in snprintf.c to fix -Wall
o Add missing includes to fix more -Wall
1999-08-12 16:24:10 +00:00
Todd C. Miller
2386dc1b45 o Add a "pedentic" flag to the parser. This makes sudo warn in cases
where an alias may be used before it is defined.  Only turned on for visudo
and testsudoers.
o Add --disable-authentication option that makes sudo not require
authentication by default.  The PASSWD tag can be used to require
authentication for an entry.  We no longer overload --without-passwd.
1999-08-12 14:37:27 +00:00
Todd C. Miller
5e72465522 Missed a prompt -> user_prompt conversion 1999-08-05 09:21:38 +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
c47edcb887 o BSD-style copyright
o Add support for NO_PASSWD/WITHOUT_PASSWD options.
o skey/opie replaced by rfc1938 code
o new struct sudo_user global
1999-07-22 12:28:08 +00:00
Todd C. Miller
169d85ac9e New authentication API and methods 1999-07-11 00:32:11 +00:00