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.
Todd C. Miller [Fri, 3 Mar 2000 23:04:50 +0000 (23:04 +0000)]
Truncate unencrypted password to 8 chars if encrypted password is exactly
13 characters (indicateing standard a DES password). Many versions
of crypt() do this for you, but not all (like HP-UX's).
Todd C. Miller [Sun, 27 Feb 2000 03:49:07 +0000 (03:49 +0000)]
Added -S flag (read passwd from stdin) and tgetpass_flags global
that holds flags to be passed in to tgetpass(). Change echo_off
param to tgetpass() into a flags field. There are currently 2
possible flags for tgetpass(): TGP_ECHO and TGP_STDIN. In tgetpass(),
abstract the echo set/clear via macros and if (flags & TGP_ECHO)
but echo is not set on the terminal, but sure to set it.
Todd C. Miller [Wed, 16 Feb 2000 00:03:44 +0000 (00:03 +0000)]
Add 'editor' and 'enveditor' sudoers defaults and make visudo honor them.
This means that visudo will now parse the sudoers file *before* it is
edited so a bogus sudoers file will cause a warning to go to stderr.
Also, visudo checks the variables once--it does not check them after
each editor run since that could be confusing.
Todd C. Miller [Wed, 19 Jan 2000 19:07:24 +0000 (19:07 +0000)]
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.
Todd C. Miller [Mon, 17 Jan 2000 17:25:10 +0000 (17:25 +0000)]
Add 'shell_noargs' runtime option back in. We have to defer checking
until after the sudoers file has been parsed but since there are now
other options that operate that way this one can too. Based on a patch
from bguillory@email.com.
Todd C. Miller [Fri, 14 Jan 2000 17:29:35 +0000 (17:29 +0000)]
In struct sudo_defs_types, move the union to the end and don't initialize
the union member since that only works with an ANSI compiler. We set
the value of the union by hand in init_defaults() anyway. This allows
sudo to compile on a K&R compiler again.
Todd C. Miller [Mon, 3 Jan 2000 04:53:35 +0000 (04:53 +0000)]
Update statbuf.st_mode based on SUDOERS_MODE when we are chaning from
0400 to whatever SUDOERS_MODE is (converting from the old sudoers mode).
Assumes that SUDOERS_MODE is less restrictive than 0400 which should
always be the case.
Todd C. Miller [Mon, 3 Jan 2000 04:43:33 +0000 (04:43 +0000)]
Make treatment of -l and -v sane wrt NOPASSWD flags. Now allow -l w/o a passwd
if there is *any* entry for the user on the host with a NOPASSWD flag.
For -v, only allow w/o a passwd if *all* entries for the user on the host
w/ the specified runas user have the NOPASSWD flag set.
Todd C. Miller [Sun, 5 Dec 1999 19:06:09 +0000 (19:06 +0000)]
fix parsing of runas lists:
o oprunasuser and runaslist now return a value
o in a runasspec, if a runaslist does not return TRUE, set runas_matches to
FALSE. Normally, a runaslist only returns FALSE for explicitly denied
users.
o since runaslist does not modify the stack there is no need for a push/pop
in runasalias.