Commit Graph

509 Commits

Author SHA1 Message Date
Todd C. Miller
313bbae1d3 use AC_SYS_POSIX_TERMIOS instead of rolling our own 2001-12-15 15:57:03 +00:00
Todd C. Miller
7be0cd14ae o Add HAVE_STDLIB_H and HAVE_MEMORY_H
o Define HAVE_STRINGS_H even if HAVE_STRING_H is defined -- this is safe now
2001-12-15 01:44:10 +00:00
Todd C. Miller
66d801055c Use new HAVE_SIGACTION_T define 2001-12-14 23:38:31 +00:00
Todd C. Miller
47dff37185 o Update copyright year 2001-12-14 19:54:56 +00:00
Todd C. Miller
86743d987e Add checks for volatile and sig_atomic_t 2001-12-14 06:52:44 +00:00
Todd C. Miller
f66fcb464b Add check for skeyaccess(3) 2001-12-12 19:43:23 +00:00
Todd C. Miller
46be666b32 Add check for isblank and a replacement macro if it doesn't exist. 2001-12-12 00:31:07 +00:00
Todd C. Miller
e6545c86fc add back HAVE_SIGACTION 2001-12-08 19:48:03 +00:00
Todd C. Miller
241cb64cc4 Kill POSIX_SIGNALS define and old signal support now that we emulate POSIX ones
Also be sure to correctly initialize struct sigaction.
2001-12-08 19:44:30 +00:00
Todd C. Miller
5481e22892 Add check + emulation for setegid (like seteuid). 2000-12-30 21:55:21 +00:00
Todd C. Miller
998631b73a New Defaults options:
o stay_setuid - sudo will remain setuid if system has saved uids or setreuid(2)
 o env_reset - reset the environment to a sane default
 o env_keep - preserve environment variables that would otherwise be cleared

No longer use getenv/putenv/setenv functions--do environment munging by hand.
Potentially dangerous environment variables can be cleared only if they
contain '/' pr '%' characters to protect buggy programs.
Moved environment routines into env.c (new file)
2000-12-30 03:29:47 +00:00
Todd C. Miller
43905f4d7b Define HAVE_INNETGR #ifdef HAVE__INNETGR 2000-11-01 15:22:08 +00:00
Todd C. Miller
4fdb825a09 Add check for _innetgr(3) since NCR systems have that instead of
innetgr(3).
2000-11-01 15:17:25 +00:00
Todd C. Miller
0208b22686 Add support for BSD authentication. 2000-10-26 16:42:40 +00:00
Todd C. Miller
d7050d5615 Add support for using getifaddrs() to get the list of ip addr / netmask
pairs.  Currently IPv4-only.
2000-06-04 23:57:22 +00:00
Todd C. Miller
935a51e76a FreeBSD login class (login.conf) support. 2000-03-07 04:29:46 +00:00
Todd C. Miller
d9790399b3 Fix sudoers locking in visudo. We now lock the sudoers file itself, not
the temp file (since locking the temp file can foul up editors).  The
previous locking scheme didn't work because the fd was closed too early.
2000-01-19 19:07:24 +00:00
Todd C. Miller
90371b1c03 Don't need test for ftruncate() any more. 2000-01-19 18:37:51 +00:00
Todd C. Miller
ac67ced558 Add check for initgroups() since old SYSV lacks this. 1999-12-09 04:04:47 +00:00
Todd C. Miller
957fa7941d o Kill HAVE_FNMATCH_H
o Only define HAVE_FNMATCH if <fnmatch.h> exists.
1999-12-09 03:54:57 +00:00
Todd C. Miller
59666aca78 o Now use getrlimit to find the highest fd when closing all non-std fd's
o Turn off core dumps via setrlimit for the sake of paranoia
1999-11-04 19:01:11 +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
f7e23611be Use strftime() instead of ctime() if it is available. 1999-09-15 09:15:33 +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
fda4a9709f Add _GNU_SOURCE for Linux 1999-08-28 08:49:08 +00:00
Todd C. Miller
359b5be92d Kill _XOPEN_EXTENDED_SOURCE -- causes problems on some OSes 1999-08-26 21:24:50 +00:00
Todd C. Miller
ff95bb1d77 Define _XOPEN_SOURCE_EXTENDED not _XOPEN_SOURCE 1999-08-26 10:12:46 +00:00
Todd C. Miller
b13e8006ec Add check for LONG_IS_QUAD
#undef MAXINT before including hpsecurity.h to silence an HP-UX warning
Check for U?LONG_LONG_MAX in snprintf.c and use LONG_IS_QUAD
1999-08-22 09:59:28 +00:00
Todd C. Miller
ab0c1eae13 UCB-derived snprintf + asprintf support. Supports quads if the compiler
does.  No floating point yet, perhaps later...
1999-08-21 19:00:53 +00:00
Todd C. Miller
0598093e2c sudoers_lookup() now returns a bitmap instead of an int. This makes it
possible to express things like "failed to validate because user not listed
for this host".  Some thigns that were previously VALIDATE_FOO are now
FLAG_FOO.  This may change later on.

Reorganized code in log_auth() and sudo.c to deal with above changes.

Safer versions of push/pushcp with in the do { ... } while (0) style

parse.yacc now saves info on the stack to allow parse.c to determine
if a user was listed, but not for the host he/she tried to run on.

Added --with-mail-if-no-host option
1999-08-19 16:30:09 +00:00
Todd C. Miller
3a8b0be635 o --with-otp deprecated, use --without-passwd instead
o real dependencies in the Makefile
o --with-devel option to enable yacc, lex, and -Wall
o style -- "foo -> bar" becomes "foo->bar"
o ALL goes back to being a token, not a string but don't leak memory
o rename hsotspec -> host in parse.yacc
1999-08-14 15:34:55 +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
76148d5316 o Move lock_file() and touch() into fileops.c so visudo can use them
o Visudo now locks the sudoers temp file instead of bailing when
the temp file already exists.  This fixes the problem of stale
temp files but it does *require* that you not try to put the
temp file in a world-writable directory.  This shoud not be
an issue as the temp file should live in the same dir as sudoers.
o Visudo now only installs the temp file as sudoers if it changed.
1999-08-07 09:59:43 +00:00
Todd C. Miller
925f4eabc2 Lock the log file. 1999-08-06 13:33:03 +00:00
Todd C. Miller
7c53b74961 o Kill *_MESSAGE and replace with NO_LECTURE
o Add more things to root sudo -V config reporting
1999-08-05 21:38:19 +00:00
Todd C. Miller
ae96a4f1ad Add --with-goodpri and --with-badpri configure options to specify the
syslog priority to use.
1999-08-05 14:48:35 +00:00
Todd C. Miller
e966a6b3e0 Add check for syslog facilities and priorities tables in syslog.h 1999-08-05 10:21:28 +00:00
Todd C. Miller
ca8eb6f2aa add 4th term to license similar to term 5 in the apache license 1999-07-31 16:19:45 +00:00
Todd C. Miller
be18d643e1 BSD-style copyright. Remove USE_GETPASS and HAVE_UTIME_NULL. Add HAVE_FWTK, HAVE_STRERROR, HAVE_SNPRINTF, HAVE_VSNPRINTF, HAVE_ASPRINTF, HAVE_VASPRINTF, WITHOUT_PASSWD and NO_PASSWD 1999-07-22 12:43:42 +00:00
Todd C. Miller
8e30e833f5 for kerberos V < version, fall back on old kerb4 auth code 1999-06-22 13:30:25 +00:00
Todd C. Miller
0d67007d1b In estrdup(), do the malloc ourselves so we don't need to rely on the
system strdup(3) which may or may not exist.  There is now no need to
provide strdup() for those w/o it.  Also, the prototype for estrdup()
was wrong, it returns char * and its param is const.
1999-04-06 17:55:01 +00:00
Todd C. Miller
e6deacb6c4 Crank version to 1.6 and combine copyright statements 1999-04-05 20:57:25 +00:00
Todd C. Miller
79c46d1c81 ++version 1999-03-29 04:05:15 +00:00
Todd C. Miller
bd76c13333 Simplify PAM code and fix a PAM-related warning on Linux 1999-03-28 18:50:25 +00:00
Todd C. Miller
2a5776995a only include strings.h if there is no string.h 1999-03-19 19:43:28 +00:00
Todd C. Miller
52916f16ac add explicate copyright 1999-02-03 04:32:19 +00:00
Todd C. Miller
826fe213f2 add sudo tags 1999-01-17 23:16:20 +00:00
Todd C. Miller
d3aaf52283 crank version and regen files 1999-01-17 22:40:55 +00:00
Todd C. Miller
3983a7a651 kerb5 support from fcusack@iconnet.net 1999-01-17 22:08:55 +00:00
Todd C. Miller
38e1085877 add missing NO_ROOT_SUDO
noted by drno@tsd.edu
1998-11-21 22:54:31 +00:00