Todd C. Miller [Fri, 3 Nov 2000 05:37:44 +0000 (05:37 +0000)]
Move set_perms() to its own file and use POSIX saved uid or setreuid()
if available.
Added stay_setuid option for systems that have libraries that perform
extra paranoia checks in system libraries for setuid programs (ie:
anything with issetugid(2)).
Todd C. Miller [Fri, 3 Nov 2000 01:28:54 +0000 (01:28 +0000)]
strip more bits from the environment and add a facility for stripping
things only if they contain '/' or '%' to address printf format string
vulnerabilities in other programs.
Todd C. Miller [Thu, 7 Sep 2000 14:43:26 +0000 (14:43 +0000)]
Don't use vsyslog(3) since HP-UX (and others?) lack it. This means
that "%m" won't be expanded but we don't use that anyway since the
logging routines may splat to stderr as well.
Todd C. Miller [Thu, 31 Aug 2000 17:08:35 +0000 (17:08 +0000)]
Allow special characters (including '#') to be embedded in pathnames
if quoted by a '\\'. The quoted chars will be dealt with by fnmatch().
Unfortunately, 'sudo -l' still prints the '\\'.
Todd C. Miller [Sat, 12 Aug 2000 20:48:29 +0000 (20:48 +0000)]
The listpw and verifypw sudoers options would not take effect because
the value of the default was checked *before* sudoers was parsed.
Instead of passing in the value of PWCHECK_* to sudoers_lookup(),
pass in the arg for def_ival() so the check can be deferred until
after sudoers is parsed.
Todd C. Miller [Mon, 5 Jun 2000 02:57:10 +0000 (02:57 +0000)]
Remove extraneous call to init_defaults() and set runas_user to NULL
betweem parses so init_defaults will reset it each time, thus avoiding
a reference to free()d data.
Todd C. Miller [Wed, 10 May 2000 04:56:28 +0000 (04:56 +0000)]
If the targetpw flag is set, use target username as part of the timestamp path.
If tty tickets are in effect cat the tty and the target username with a
':' as the separator.
Todd C. Miller [Mon, 17 Apr 2000 18:01:14 +0000 (18:01 +0000)]
Bracket calls to syslog with an openlog() and closelog() since some
authentication methods (like PAM) may do their own logging via
syslog. Since we don't use syslog much (usually just once per
session) this doesn't really incur a performance penalty.
It also Fixes a SEGV with pam_kafs.
Todd C. Miller [Sat, 1 Apr 2000 21:23:28 +0000 (21:23 +0000)]
Visudo now checks for the existence of an editor and gives a sensible
error if it does not exist.
The path to the editor for visudo is now a colon-separated list of
allowable editors. If the user has $EDITOR set and it matches
one of the allowed editors that editor will be used. If not,
the first editor in the list that actually exists is used.
Todd C. Miller [Fri, 24 Mar 2000 01:23:05 +0000 (01:23 +0000)]
If there is no inet_addr but there *is* an __inet_addr that's ok since
inet_addr is probably just a macro then. The better thing to do would
be to look for the macro, but this is fine for now.
Todd C. Miller [Fri, 24 Mar 2000 00:40:55 +0000 (00:40 +0000)]
*.man lives in cwd, *.cat lives in $(srcdir), add a @mansrcdir@
configure variable so we can deal with this.
Also, only remove *.man for 'distclean' not 'clean'.
Todd C. Miller [Thu, 23 Mar 2000 19:14:03 +0000 (19:14 +0000)]
Add #ifdef __STDC__ around the rangematch function header to avoid
promotion of test to int, thus violating the prototype. Gcc handles
this gracefully but more std ANSI compilers will complain.
Todd C. Miller [Thu, 23 Mar 2000 04:38:22 +0000 (04:38 +0000)]
Fully qualified hosts w/ wildcards were not matching the FQHOST token type.
There's really no need for a separate token for fully-qualified vs.
unqualified anymore so FQHOST is now history and hostname_matches
now decides which hostname (short or long) to check based on whether
or not the pattern contains a '.'.
Todd C. Miller [Thu, 23 Mar 2000 04:38:20 +0000 (04:38 +0000)]
Fully qualified hosts w/ wildcards were not matching the FQHOST token type.
There's really no need for a separate token for fully-qualified vs.
unqualified anymore so FQHOST is now history and hostname_matches
now decides which hostname (short or long) to check based on whether
or not the pattern contains a '.'.
Todd C. Miller [Thu, 23 Mar 2000 04:38:20 +0000 (04:38 +0000)]
Fully qualified hosts w/ wildcards were not matching the FQHOST token type.
There's really no need for a separate token for fully-qualified vs.
unqualified anymore so FQHOST is now history and hostname_matches
now decides which hostname (short or long) to check based on whether
or not the pattern contains a '.'.
Todd C. Miller [Thu, 23 Mar 2000 00:35:59 +0000 (00:35 +0000)]
Add FreeBSD login.conf support (untested on BSD/OS) based on a patch from
Michael D. Marchionna.
configure now does substitution on the man pages, allowing us to
fix up the paths and set the section correctly. Based on an idea
from Michael D. Marchionna.
Todd C. Miller [Mon, 13 Mar 2000 20:52:25 +0000 (20:52 +0000)]
HP-UX adds extra info at the end for password aging so when comparing
the result of crypt to pw_passwd we only compare the first len(epass)
bytes *unless* the user entered an empty string for a password.
Todd C. Miller [Mon, 13 Mar 2000 16:05:05 +0000 (16:05 +0000)]
Get rid of grandchild hack, it was causing problems and there is really
no need for it. This fixes a bug where we spin eating up CPU when the
user runs a long-running process like a shell.