Todd C. Miller [Mon, 1 Nov 1999 04:14:09 +0000 (04:14 +0000)]
Fix compilation problem when --with-logging=file was specified. This
means that syslog is now required to build sudo but that should not
be a problem. If it is it can be fixed trivially with a configure
check for syslog() or syslog.h.
Todd C. Miller [Mon, 1 Nov 1999 04:00:57 +0000 (04:00 +0000)]
Make this work again for things like "sudo echo hi | more" where the tty
gets put into character at a time mode. We read until we read end of
line or we run out of space (similar to fgets(3)).
Todd C. Miller [Sat, 16 Oct 1999 17:56:31 +0000 (17:56 +0000)]
Error out if syslog parameters are given without a value. For Ultrix or
4.2BSD "syslog" is allowed without a value since there are no facilities
in the 4.2BSD syslog.
Todd C. Miller [Sun, 10 Oct 1999 17:56:02 +0000 (17:56 +0000)]
o Add T_PATH flag to allow simple sanity checks for default values that
are supposed to be pathnames.
o Fix a duplicate free when visudo finds an error.
Todd C. Miller [Thu, 7 Oct 1999 21:21:08 +0000 (21:21 +0000)]
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
Todd C. Miller [Wed, 8 Sep 1999 08:06:28 +0000 (08:06 +0000)]
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.
Todd C. Miller [Fri, 27 Aug 1999 21:02:24 +0000 (21:02 +0000)]
Only block SIGINT, SIGQUIT, SIGTSTP (which can be generated from
the keyboard). Since we run with ruid/euid == 0 the user can't
really signal us in nasty ways.
Todd C. Miller [Fri, 27 Aug 1999 21:01:06 +0000 (21:01 +0000)]
Don't need to worry about catching too many signals since we do locking
on the tmp file. If a lockfile is really stale, it will be detected
and overwritten.
Todd C. Miller [Thu, 26 Aug 1999 13:16:06 +0000 (13:16 +0000)]
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.
Todd C. Miller [Tue, 24 Aug 1999 15:58:39 +0000 (15:58 +0000)]
In "sudo -l" mode, the type of the stored (expanded) alias was not
stored with the contents. This could lead to incorrect output
if the sudoers file had different alias types with the same name.
Normal parsing (ie: not in '-l' mode) is unaffected.
Todd C. Miller [Sun, 22 Aug 1999 09:59:28 +0000 (09:59 +0000)]
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
Todd C. Miller [Fri, 20 Aug 1999 20:37:16 +0000 (20:37 +0000)]
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.
Todd C. Miller [Thu, 19 Aug 1999 17:45:36 +0000 (17:45 +0000)]
Don't wait for child to finish in log_error(), let the signal handler
get it if we are still running, else let init reap it for us. The extra
time it takes to wait lets the user know that mail is being sent.
Install SIGCHLD handler in main() and for POSIX signals, block everything
*except* SIGCHLD.