Commit Graph

58 Commits

Author SHA1 Message Date
Todd C. Miller
22bb6197d4 Wrap script execution w/ /bin/sh for the benefit of ctm 1999-11-25 00:43:44 +00:00
Todd C. Miller
701c55c08c regen 1999-11-08 23:59:53 +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
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
f7e23611be Use strftime() instead of ctime() if it is available. 1999-09-15 09:15:33 +00:00
Todd C. Miller
c1f71dcd85 add --without-sendmail to help output 1999-09-14 08:01:25 +00:00
Todd C. Miller
bb635cab49 enforce an otctal arg for --with-suoders-mode 1999-09-14 07:42:16 +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
92e5ebd9f1 Define _XOPEN_EXTENDED_SOURCE on AIX and __USE_FIXED_PROTOTYPES__ on SunOS4 w/ gcc 1999-08-28 09:36:32 +00:00
Todd C. Miller
fda4a9709f Add _GNU_SOURCE for Linux 1999-08-28 08:49:08 +00:00
Todd C. Miller
df15b27a09 aix_auth.o not authenticate.o 1999-08-28 08:10: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
3118b7f865 Kill VISUDO_LIBS and VISUDO_LDFLAGS. Add LIBS, NET_LIBS, and LDFLAGS.
Common libs go in LIBS, commong ld flags go in LDFLAGS and network libs
like -lsocket, -lnsl go in NET_LIBS.  This allows testsudoers to build
on Solaris and is a bit cleaner in general.
1999-08-26 13:16:06 +00:00
Todd C. Miller
ff95bb1d77 Define _XOPEN_SOURCE_EXTENDED not _XOPEN_SOURCE 1999-08-26 10:12:46 +00:00
Todd C. Miller
0d38bef9a7 include strcasecmp() for those without it 1999-08-24 17:37:38 +00:00
Todd C. Miller
ba358d6d51 define _XOPEN_SOURCE to get at crypt() proto on some systems 1999-08-23 16:47:42 +00:00
Todd C. Miller
084b426b3b Better test for working long long support. Ultrix compiler supports
basic long long but not all operations on them.
1999-08-22 11:22:06 +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
3ad8fe164a Add testsudoers to default build target if --with-devel
Don't clean generated parser files unless "distclean".
1999-08-17 14:29:28 +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
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
d2dcea30cb regen 1999-08-09 14:08:19 +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
61dc1ddf61 aix_auth.o not authenticate.o 1999-08-05 14:56:07 +00:00
Todd C. Miller
d47ddf6a9d Add --with-goodpri and --with-badpri configure options to specify the
syslog priority to use.
1999-08-05 14:30:57 +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
1a4ebcf2f5 Solais pam doesn't require anye xtra setup 1999-08-04 14:54:34 +00:00
Todd C. Miller
5a51e05e63 Sudo, not CU Sudo 1999-07-31 16:31:27 +00:00
Todd C. Miller
0368b9e612 Fix getprpwnam() checking on SCO. Need to link with "-lprot -lx" when
linking test program, not just -lprot.  Also add check for getspnam().
The SCO docs indicate that /etc/shadow can be used but this may be a lie.
1999-07-28 09:17:14 +00:00
Todd C. Miller
4c7239fd97 regen 1999-07-22 13:11:16 +00:00
Todd C. Miller
0f648f1069 kludge around cross-compiler false positives 1999-07-05 20:15:44 +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
c4cb29099d regen 1999-06-03 16:06:20 +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
07b9914ed0 regen 1999-03-26 18:10:25 +00:00
Todd C. Miller
3e14f7237a add missing case statement so --without-sendmail works 1999-02-24 00:43:51 +00:00
Todd C. Miller
6bf7f60c2d only search for -lsun in irix <= 4.x 1999-02-22 20:10:51 +00:00
Todd C. Miller
89bdafdc36 back out last configure.in change now that I've hacked autoconf to fix the real problem and add a missing newline 1999-02-22 20:01:47 +00:00
Todd C. Miller
d3730e35f1 When falling back to checking for socket() when linking with "-lsocket -lnsl" check for main() instead since autoconf has already cached the results of checking for socket() in -lsocket. This is really an autoconf bug as it should use the extra libs as part of the cache variable name. 1999-02-22 15:58:11 +00:00
Todd C. Miller
6993389719 define for_BSD_TYPES irix 1999-02-09 18:11:51 +00:00
Todd C. Miller
97d36a72d4 When linking with both -lsocket and -lnsl be sure to do so in that order. Also, when we can't find socket() or inet_addr() and have to try linking with both libs, issue a warning. 1999-02-01 00:46:13 +00:00
Todd C. Miller
4633962703 fix and correctly document --with-umask; problem noted by adap@adap.org 1999-01-22 18:13:16 +00:00