Todd C. Miller [Fri, 9 Jan 2004 06:15:34 +0000 (06:15 +0000)]
o No need to check for sed, libtool config does that for us
o move check for --with-noexec until after libtool magic is run so we
can use $can_build_shared and $shrext
Todd C. Miller [Mon, 5 Jan 2004 02:48:09 +0000 (02:48 +0000)]
Add support for preloading a shared object containing a dummy execve()
function that just sets error and returns -1. This adds a
"noexec_file" option to load the filename as well as a "noexec" flag
to enable it unconditionally. There is also a NOEXEC tag that can
be attached to specific commands and an EXEC tag to disable it.
Todd C. Miller [Tue, 30 Dec 2003 22:31:30 +0000 (22:31 +0000)]
Add support for tuples in def_data.in; these are implemented as an
enum type. Currently there is only a single tuple enum but in the
future we may have one tuple enum per T_TUPLE entry in def_data.in.
Currently listpw, verifypw and lecture are tuples. This avoids the
need to have two entries (one ival, one str) for pwflags and syslog
values.
lecture is now a tuple with the following values: never, once, always
We no longer use both an int and string entry for syslog facilities
and priorities. Instead, there are logfac2str() and logpri2str()
functions that get used when we need to print the string values.
Todd C. Miller [Tue, 30 Dec 2003 22:20:21 +0000 (22:20 +0000)]
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.
Todd C. Miller [Tue, 23 Dec 2003 02:18:13 +0000 (02:18 +0000)]
If we are in -k/-K mode, just spew to stderr. It is not unusual for
users to place "sudo -k" in a .logout file which can cause sudo to
be run during reboot after the YP/NIS/NIS+/LDAP/etc daemon has died.
Previously, this would result in useless mail and logging.
Todd C. Miller [Sun, 29 Jun 2003 01:31:55 +0000 (01:31 +0000)]
Fix a core dump on Solaris by preserving the pam_handle_t we used
during authentication for pam_prep_user(). If we didn't authenticate
(ie: ticket still valid), we call pam_init() from pam_prep_user().
This is something of a hack; it may be better to change the auth
API and add an auth_final() function that acts like pam_prep_user().
Todd C. Miller [Mon, 9 Jun 2003 20:07:56 +0000 (20:07 +0000)]
Also exit waitpid() loop when pid == 0. Fixes a problem where the sudo
process would spin eating up CPU until sendmail finished when it has
to send mail.
Todd C. Miller [Thu, 22 May 2003 01:53:01 +0000 (01:53 +0000)]
Don't assume that getgrnam() calls don't modify contents of
struct passwd returned by getpwnam(). On FreeBSD w/ NIS this
can happen. Based on a patch from Kirk Webb.
Todd C. Miller [Mon, 14 Apr 2003 20:49:27 +0000 (20:49 +0000)]
Use krb5_princ_component() instead of krb5_princ_realm() for MIT Kerberos
like we did before I messed things up ;-)
Use krb5_principal_get_comp_string() to do the same thing w/ Heimdal.
I'm not sure if the component should be 0 or 1 in this case.
#define ENCTYPE_DES_CBC_MD5 ETYPE_DES_CBC_MD5 for Heimdal since
older versions lack ENCTYPE_DES_CBC_MD5. This is gross and there
should be a configure check for this I guess.
Todd C. Miller [Wed, 9 Apr 2003 20:13:04 +0000 (20:13 +0000)]
Don't change rl.rlim_max for RLIMIT_CORE. We need only set rl.rlim_cur
to 0 to turn off core dumps. This may be needed for the RLIMIT_CORE
restoration on some OSes.
Todd C. Miller [Fri, 4 Apr 2003 03:04:09 +0000 (03:04 +0000)]
Replace ETYPE_DES_CBC_MD5 with ENCTYPE_DES_CBC_MD5. The former
is no longer defined by MIT kerb5 (though it used to be and indeed
remains so in Heimdal).
Todd C. Miller [Thu, 3 Apr 2003 15:16:22 +0000 (15:16 +0000)]
Remove newer stuff that passes multiple (possibly duplicate)
directories to "mkdir -p" since that seems to break on Tru64 Unix
at least. This basically brings back what shipped with sudo 1.6.6.
Todd C. Miller [Wed, 2 Apr 2003 18:25:30 +0000 (18:25 +0000)]
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".
Todd C. Miller [Tue, 1 Apr 2003 14:58:55 +0000 (14:58 +0000)]
oflow detection in expand_prompt() was faulty (false positives).
The count was based on strlcat() return value which includes the
length of the entire string.