]> granicus.if.org Git - sudo/log
sudo
23 years agoChange 2 Exit() -> exit()
Todd C. Miller [Fri, 2 Nov 2001 17:52:12 +0000 (17:52 +0000)]
Change 2 Exit() -> exit()
Avoid stdio in Exit() and call _exit() if we are a signal handler.
We no longer print the signal number but the user can just check the
exit value for that.

23 years agowhen setting up pipes in child process check for case where stdin == pipe fd 0
Todd C. Miller [Tue, 16 Oct 2001 05:35:26 +0000 (05:35 +0000)]
when setting up pipes in child process check for case where stdin == pipe fd 0

23 years agoIgnore editor exit value since XPG4 says vi's exit value is the count
Todd C. Miller [Thu, 11 Oct 2001 17:20:33 +0000 (17:20 +0000)]
Ignore editor exit value since XPG4 says vi's exit value is the count
of editing errors made (failed searches, etc).

23 years agoregen
Todd C. Miller [Fri, 5 Oct 2001 20:39:13 +0000 (20:39 +0000)]
regen

23 years agosco now is identified by config.guess as *-sco-*
Todd C. Miller [Fri, 5 Oct 2001 20:39:05 +0000 (20:39 +0000)]
sco now is identified by config.guess as *-sco-*

23 years agoCheck for getspnam() in -lgen if not in -lc for UnixWare.
Todd C. Miller [Fri, 5 Oct 2001 20:24:14 +0000 (20:24 +0000)]
Check for getspnam() in -lgen if not in -lc for UnixWare.

23 years ago"upper case" -> "uppercase"
Todd C. Miller [Tue, 18 Sep 2001 01:48:48 +0000 (01:48 +0000)]
"upper case" -> "uppercase"

23 years agofix typos and grammar; pjanzen@foatdi.harvard.edu
Todd C. Miller [Tue, 18 Sep 2001 01:32:35 +0000 (01:32 +0000)]
fix typos and grammar; pjanzen@foatdi.harvard.edu

23 years agoMissing word (specify); krapht@secureops.com
Todd C. Miller [Tue, 28 Aug 2001 14:26:38 +0000 (14:26 +0000)]
Missing word (specify); krapht@secureops.com

23 years agoIf we fail to lookup a login class, apply the default one.
Todd C. Miller [Thu, 23 Aug 2001 21:43:38 +0000 (21:43 +0000)]
If we fail to lookup a login class, apply the default one.

23 years agoIn log_error() free message, not logline unconditionally, then
Todd C. Miller [Thu, 23 Aug 2001 21:42:31 +0000 (21:42 +0000)]
In log_error() free message, not logline unconditionally, then
free logline if it is not the same as message.  No function change
but this mirrors how they are allocated.

23 years agoregenerate
Todd C. Miller [Tue, 17 Jul 2001 03:33:57 +0000 (03:33 +0000)]
regenerate

23 years agoremove some backslash quotes that are unneeded
Todd C. Miller [Tue, 17 Jul 2001 03:33:48 +0000 (03:33 +0000)]
remove some backslash quotes that are unneeded

23 years agoo Tweaks to make this work with autoconf-2.50
Todd C. Miller [Tue, 17 Jul 2001 03:30:30 +0000 (03:30 +0000)]
o Tweaks to make this work with autoconf-2.50
o Use AC_LIBOBJ instead of changing LIBOBJS directly
o Use AC_REPLACE_FUNCS where we can
o Use AC_CHECK_FUNCS instead of AC_CHECK_FUNC so we don't have to
  AC_DEFINE things manually.

23 years agoUpdated from autoconf-2.50
Todd C. Miller [Tue, 17 Jul 2001 03:28:31 +0000 (03:28 +0000)]
Updated from autoconf-2.50

23 years agoUpdate mailing list section. We use mailman now, not majordomo.
Todd C. Miller [Tue, 22 May 2001 23:11:21 +0000 (23:11 +0000)]
Update mailing list section.  We use mailman now, not majordomo.

23 years agoUse setpwent()/endpwent() + all the shadow variants to make sure
Todd C. Miller [Thu, 10 May 2001 18:55:12 +0000 (18:55 +0000)]
Use setpwent()/endpwent() + all the shadow variants to make sure
we don't inadvertantly leak an fd to the child.  Apparently Linux's
shadow routines leave the fd open even if you don't call setspent().
Reported by mike@gistnet.com; different patch used.

23 years agos/eg./e.g./
Todd C. Miller [Fri, 13 Apr 2001 01:43:40 +0000 (01:43 +0000)]
s/eg./e.g./

23 years agoselect() may return EAGAIN. If so, continue like we do for EINTR.
Todd C. Miller [Fri, 13 Apr 2001 01:42:50 +0000 (01:42 +0000)]
select() may return EAGAIN.  If so, continue like we do for EINTR.

23 years agoFix a non-exploitable buffer overflow in the word splitting code. This
Todd C. Miller [Fri, 13 Apr 2001 01:41:57 +0000 (01:41 +0000)]
Fix a non-exploitable buffer overflow in the word splitting code.  This
should really be rewritten.

23 years agoFAQ link goes away
Todd C. Miller [Fri, 13 Apr 2001 01:41:04 +0000 (01:41 +0000)]
FAQ link goes away

23 years agoTell people to look in sample.syslog.conf for examples, not FAQ
Todd C. Miller [Fri, 13 Apr 2001 01:40:47 +0000 (01:40 +0000)]
Tell people to look in sample.syslog.conf for examples, not FAQ

23 years agoUpdate list of env vars that are cleared
Todd C. Miller [Fri, 13 Apr 2001 01:40:15 +0000 (01:40 +0000)]
Update list of env vars that are cleared

23 years agoremove struct env_table decl since that stuff has all moved to env.c
Todd C. Miller [Fri, 13 Apr 2001 01:36:59 +0000 (01:36 +0000)]
remove struct env_table decl since that stuff has all moved to env.c

23 years agoFix a pasto in flock-style unlocking and include <sys/file.h> for flock
Todd C. Miller [Wed, 4 Apr 2001 17:17:04 +0000 (17:17 +0000)]
Fix a pasto in flock-style unlocking and include <sys/file.h> for flock
on older systems; twetzel@gwdg.de

23 years agoregen to get NeXT lockf/flock fix
Todd C. Miller [Wed, 4 Apr 2001 17:14:52 +0000 (17:14 +0000)]
regen to get NeXT lockf/flock fix

23 years agoforce NeXT to use flock since lockf is broken
Todd C. Miller [Wed, 4 Apr 2001 17:14:13 +0000 (17:14 +0000)]
force NeXT to use flock since lockf is broken

23 years agoUse stashed user_gid when checking against exempt gid since sudo
Todd C. Miller [Fri, 30 Mar 2001 13:54:27 +0000 (13:54 +0000)]
Use stashed user_gid when checking against exempt gid since sudo
sets its gid to a a value that makes sudoers readable.  Previously
if you used gid 0 as the exempt group everyone would be exempt.
From Paul Kranenburg <pk@cs.few.eur.nl>

23 years agoregen
Todd C. Miller [Thu, 29 Mar 2001 18:14:55 +0000 (18:14 +0000)]
regen

23 years ago#include stdio.h in SUDO_CHECK_TYPE since IRIX 6 aparently defines some
Todd C. Miller [Thu, 29 Mar 2001 18:08:56 +0000 (18:08 +0000)]
#include stdio.h in SUDO_CHECK_TYPE since IRIX 6 aparently defines some
types (such as ssize_t) therein.

23 years agoFix negation of paths in a boolean context. Problem found by apt@UH.EDU
Todd C. Miller [Fri, 2 Mar 2001 14:09:55 +0000 (14:09 +0000)]
Fix negation of paths in a boolean context.  Problem found by apt@UH.EDU

24 years agopasto
Todd C. Miller [Fri, 23 Feb 2001 18:03:46 +0000 (18:03 +0000)]
pasto

24 years agoSA_RESETHAND means the opposite of what I was thinking--oops
Todd C. Miller [Sat, 17 Feb 2001 21:11:41 +0000 (21:11 +0000)]
SA_RESETHAND means the opposite of what I was thinking--oops
To block all signals in old-style signals use ~0, not 0xffffffff

24 years agocoerce difference of pointers to int when used in a string length printf
Todd C. Miller [Sun, 4 Feb 2001 16:16:20 +0000 (16:16 +0000)]
coerce difference of pointers to int when used in a string length printf
format; deraadt@openbsd.org

24 years agoBlock all signals in Exit() to avoid a signal race. There is still a
Todd C. Miller [Wed, 17 Jan 2001 16:34:36 +0000 (16:34 +0000)]
Block all signals in Exit() to avoid a signal race.  There is still a
tiny window but I'm not going to worry about it.

24 years agoglibc uses the LANGUAGE env var so clear that too; Solar Designer
Todd C. Miller [Sun, 7 Jan 2001 18:57:23 +0000 (18:57 +0000)]
glibc uses the LANGUAGE env var so clear that too; Solar Designer

24 years agoRegenerate with a fix to flex.skl that preserves errno from clobbering
Todd C. Miller [Sun, 7 Jan 2001 18:55:32 +0000 (18:55 +0000)]
Regenerate with a fix to flex.skl that preserves errno from clobbering
by isatty().

24 years agoSome defaults I_ defines got renamed.
Todd C. Miller [Sun, 31 Dec 2000 01:39:06 +0000 (01:39 +0000)]
Some defaults I_ defines got renamed.

24 years agoMove defaults info into its own files from which we generate
Todd C. Miller [Sun, 31 Dec 2000 01:38:37 +0000 (01:38 +0000)]
Move defaults info into its own files from which we generate
.h and .c files.  This makes adding or rearranging variables
much simpler.

24 years agofix typo in last commit
Todd C. Miller [Sat, 30 Dec 2000 21:58:11 +0000 (21:58 +0000)]
fix typo in last commit

24 years agoAdd check + emulation for setegid (like seteuid).
Todd C. Miller [Sat, 30 Dec 2000 21:55:21 +0000 (21:55 +0000)]
Add check + emulation for setegid (like seteuid).

24 years agoMake env_keep override badenv_table as documented
Todd C. Miller [Sat, 30 Dec 2000 21:22:08 +0000 (21:22 +0000)]
Make env_keep override badenv_table as documented
Fix traversal of badenv_table (broken in last commit)

24 years agoDon't try and build saved uid version of set_perms on systems w/o them.
Todd C. Miller [Sat, 30 Dec 2000 03:59:40 +0000 (03:59 +0000)]
Don't try and build saved uid version of set_perms on systems w/o them.
Rename set_perms_saved_uid() -> set_perms_posix()
Make set_perms_setreuid simply be set_perms_fallback() and simply include
  the appropriate function at compile time (setreuid() vs. setuid()).

24 years agoPATH is also preserved when env_reset is in effect
Todd C. Miller [Sat, 30 Dec 2000 03:45:31 +0000 (03:45 +0000)]
PATH is also preserved when env_reset is in effect

24 years agoNew Defaults options:
Todd C. Miller [Sat, 30 Dec 2000 03:29:47 +0000 (03:29 +0000)]
New Defaults options:
 o stay_setuid - sudo will remain setuid if system has saved uids or setreuid(2)
 o env_reset - reset the environment to a sane default
 o env_keep - preserve environment variables that would otherwise be cleared

No longer use getenv/putenv/setenv functions--do environment munging by hand.
Potentially dangerous environment variables can be cleared only if they
contain '/' pr '%' characters to protect buggy programs.
Moved environment routines into env.c (new file)

24 years agoClear up --without-passwd description
Todd C. Miller [Sat, 30 Dec 2000 03:17:58 +0000 (03:17 +0000)]
Clear up --without-passwd description

24 years agoWe now build up a new environment from scratch and assign it to "environ".
Todd C. Miller [Sat, 30 Dec 2000 00:39:36 +0000 (00:39 +0000)]
We now build up a new environment from scratch and assign it to "environ".

24 years agoGrammatical fixes from Paul Janzen
Todd C. Miller [Tue, 19 Dec 2000 03:35:07 +0000 (03:35 +0000)]
Grammatical fixes from Paul Janzen

24 years agoIf there was a syntax error and the user just wants to quit, unlink
Todd C. Miller [Fri, 15 Dec 2000 04:19:24 +0000 (04:19 +0000)]
If there was a syntax error and the user just wants to quit, unlink
sudoers if it is zero length.

24 years ago'Q' means ignore parse error, not 'q'
Todd C. Miller [Fri, 15 Dec 2000 04:10:54 +0000 (04:10 +0000)]
'Q' means ignore parse error, not 'q'

24 years agoOpen sudoers for writing with mode SUDOERS_MODE
Todd C. Miller [Fri, 15 Dec 2000 03:57:53 +0000 (03:57 +0000)]
Open sudoers for writing with mode SUDOERS_MODE
From Dimitry Andric <dim@xs4all.nl>

24 years agoAdd missing #ifdef HAVE_LOGIN_CAP_H; ayamura@ayamura.org
Todd C. Miller [Wed, 13 Dec 2000 17:23:07 +0000 (17:23 +0000)]
Add missing #ifdef HAVE_LOGIN_CAP_H; ayamura@ayamura.org

24 years agoDarwin / Mac OS X support from Wilfredo Sanchez <wsanchez@apple.com>
Todd C. Miller [Sat, 9 Dec 2000 16:46:19 +0000 (16:46 +0000)]
Darwin / Mac OS X support from Wilfredo Sanchez <wsanchez@apple.com>

24 years agoUse exit(127), not exit(-1)
Todd C. Miller [Fri, 3 Nov 2000 14:36:32 +0000 (14:36 +0000)]
Use exit(127), not exit(-1)

24 years agoMove set_perms() to its own file and use POSIX saved uid or setreuid()
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)).

24 years agostrip more bits from the environment and add a facility for stripping
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.

24 years agoregen
Todd C. Miller [Thu, 2 Nov 2000 17:55:13 +0000 (17:55 +0000)]
regen

24 years agoFor NCR, add -lc89 to LIBS, not SUDO_LIBS and cache the existence
Todd C. Miller [Thu, 2 Nov 2000 17:55:06 +0000 (17:55 +0000)]
For NCR, add -lc89 to LIBS, not SUDO_LIBS and cache the existence
of strcasecmp().

24 years agoregen
Todd C. Miller [Thu, 2 Nov 2000 17:46:39 +0000 (17:46 +0000)]
regen

24 years agoCheck for strcasecmp(3) in -lc89 for NCR Unix
Todd C. Miller [Thu, 2 Nov 2000 17:46:29 +0000 (17:46 +0000)]
Check for strcasecmp(3) in -lc89 for NCR Unix

24 years agoDefine HAVE_INNETGR #ifdef HAVE__INNETGR
Todd C. Miller [Wed, 1 Nov 2000 15:22:08 +0000 (15:22 +0000)]
Define HAVE_INNETGR #ifdef HAVE__INNETGR

24 years agoregen
Todd C. Miller [Wed, 1 Nov 2000 15:17:36 +0000 (15:17 +0000)]
regen

24 years agoAdd check for _innetgr(3) since NCR systems have that instead of
Todd C. Miller [Wed, 1 Nov 2000 15:17:25 +0000 (15:17 +0000)]
Add check for _innetgr(3) since NCR systems have that instead of
innetgr(3).

24 years agocheck return value of creadcfg()
Todd C. Miller [Tue, 31 Oct 2000 19:16:52 +0000 (19:16 +0000)]
check return value of creadcfg()
call sd_close() after sd_auth()
store username in sd->username so we don't rely on the USER env variable

24 years agodocument --with-bsdauth
Todd C. Miller [Mon, 30 Oct 2000 04:00:29 +0000 (04:00 +0000)]
document --with-bsdauth

24 years agoregen
Todd C. Miller [Mon, 30 Oct 2000 03:57:04 +0000 (03:57 +0000)]
regen

24 years ago--with-bsdauth assumes --with-logincap
Todd C. Miller [Mon, 30 Oct 2000 03:56:54 +0000 (03:56 +0000)]
--with-bsdauth assumes --with-logincap

24 years agoWhen prompting for a response to a challenge, if the user just hits return
Todd C. Miller [Mon, 30 Oct 2000 03:45:11 +0000 (03:45 +0000)]
When prompting for a response to a challenge, if the user just hits return
then reprompt with echo turned on.

24 years agoRemove debugging code that should not have been committed, oops.
Todd C. Miller [Sun, 29 Oct 2000 22:31:42 +0000 (22:31 +0000)]
Remove debugging code that should not have been committed, oops.

24 years agoUse lower-level routines and get the password ourselves.
Todd C. Miller [Sun, 29 Oct 2000 22:31:13 +0000 (22:31 +0000)]
Use lower-level routines and get the password ourselves.
Checks for a challenge and if there is one echo is not turned off.

24 years agominor housekeeping, no real code changes
Todd C. Miller [Sun, 29 Oct 2000 22:30:22 +0000 (22:30 +0000)]
minor housekeeping, no real code changes

24 years agoFix a coredump in the logging functions if gethostname(2) fails
Todd C. Miller [Fri, 27 Oct 2000 22:41:48 +0000 (22:41 +0000)]
Fix a coredump in the logging functions if gethostname(2) fails
by deferring the call to log_error() until things are better setup.

Fix return value of set_loginclass() in non-BSD-auth case.

Hard-code 'sudo' in the usage message so we can fit more options on a line

24 years agoFix errant ';' (typo) that broken MSG_ONLY
Todd C. Miller [Fri, 27 Oct 2000 22:35:42 +0000 (22:35 +0000)]
Fix errant ';' (typo) that broken MSG_ONLY

24 years agoregen
Todd C. Miller [Thu, 26 Oct 2000 17:03:55 +0000 (17:03 +0000)]
regen

24 years agoDocument -a flag
Todd C. Miller [Thu, 26 Oct 2000 17:01:50 +0000 (17:01 +0000)]
Document -a flag

24 years agoAdd support for BSD authentication.
Todd C. Miller [Thu, 26 Oct 2000 16:42:40 +0000 (16:42 +0000)]
Add support for BSD authentication.

24 years agoFix typo; from sato@complex.eng.hokudai.ac.jp
Todd C. Miller [Thu, 19 Oct 2000 14:09:07 +0000 (14:09 +0000)]
Fix typo; from sato@complex.eng.hokudai.ac.jp

24 years agoMention negating umask
Todd C. Miller [Thu, 12 Oct 2000 13:49:45 +0000 (13:49 +0000)]
Mention negating umask

24 years agoAllow user to specify umask of 0777 (same as !umask)
Todd C. Miller [Thu, 12 Oct 2000 05:30:30 +0000 (05:30 +0000)]
Allow user to specify umask of 0777 (same as !umask)

24 years agoFix a typo and give a URL for the sudo history.
Todd C. Miller [Mon, 9 Oct 2000 01:46:55 +0000 (01:46 +0000)]
Fix a typo and give a URL for the sudo history.

24 years agofix typos; pepper@reppep.com
Todd C. Miller [Sun, 8 Oct 2000 16:25:58 +0000 (16:25 +0000)]
fix typos; pepper@reppep.com

24 years agosudo_setenv() now exits on memory alloc failure instead of returning -1.
Todd C. Miller [Thu, 14 Sep 2000 20:48:58 +0000 (20:48 +0000)]
sudo_setenv() now exits on memory alloc failure instead of returning -1.

24 years agoStrip out NLSPATH and PATH_LOCALE from the environment for FreeBSD
Todd C. Miller [Thu, 7 Sep 2000 21:41:16 +0000 (21:41 +0000)]
Strip out NLSPATH and PATH_LOCALE from the environment for FreeBSD
and possibly others.

24 years agoDon't use vsyslog(3) since HP-UX (and others?) lack it. This means
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.

24 years agoAdd always_set_home variable
Todd C. Miller [Thu, 7 Sep 2000 01:35:39 +0000 (01:35 +0000)]
Add always_set_home variable

24 years agoHave to hard code default values in help since the defaults
Todd C. Miller [Thu, 7 Sep 2000 01:24:45 +0000 (01:24 +0000)]
Have to hard code default values in help since the defaults
are set _after_ the help stuff.

24 years agoAllow special characters (including '#') to be embedded in pathnames
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 '\\'.

24 years agoBetter path searching for programs we need.
Todd C. Miller [Sun, 13 Aug 2000 21:10:49 +0000 (21:10 +0000)]
Better path searching for programs we need.

24 years agoAdd section on "C compiler cannot create executables" errors.
Todd C. Miller [Sun, 13 Aug 2000 21:10:28 +0000 (21:10 +0000)]
Add section on "C compiler cannot create executables" errors.

24 years agoCrank version
Todd C. Miller [Sun, 13 Aug 2000 21:10:00 +0000 (21:10 +0000)]
Crank version

24 years agoSubstitute values from configure into man pages.
Todd C. Miller [Sun, 13 Aug 2000 21:09:22 +0000 (21:09 +0000)]
Substitute values from configure into man pages.

24 years agoThe listpw and verifypw sudoers options would not take effect because
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.

24 years agoWhen writing prompt, no need to write the NUL as well; hag@linnaean.org
Todd C. Miller [Fri, 11 Aug 2000 19:41:28 +0000 (19:41 +0000)]
When writing prompt, no need to write the NUL as well; hag@linnaean.org

24 years agoWhen looking for chown, check in /sbin too
Todd C. Miller [Fri, 9 Jun 2000 16:25:26 +0000 (16:25 +0000)]
When looking for chown, check in /sbin too

24 years agoRemove extraneous call to init_defaults() and set runas_user to NULL
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.

24 years agoAdd support for using getifaddrs() to get the list of ip addr / netmask
Todd C. Miller [Sun, 4 Jun 2000 23:57:22 +0000 (23:57 +0000)]
Add support for using getifaddrs() to get the list of ip addr / netmask
pairs.  Currently IPv4-only.

24 years agoAdd a missing check for UserEditor == NULL
Todd C. Miller [Sun, 4 Jun 2000 23:51:05 +0000 (23:51 +0000)]
Add a missing check for UserEditor == NULL
Add missing '+' before line number when invoking editor to fix a syntax error

24 years agoCall clean_env very early in main() for paranoia's sake. Idea from
Todd C. Miller [Fri, 12 May 2000 20:55:35 +0000 (20:55 +0000)]
Call clean_env very early in main() for paranoia's sake.  Idea from
Marc Esipovich.

24 years agoUpdate proto for evasprintf and easprintf
Todd C. Miller [Wed, 10 May 2000 05:11:36 +0000 (05:11 +0000)]
Update proto for evasprintf and easprintf

24 years agoMake easprintf() and evasprintf() return an int.
Todd C. Miller [Wed, 10 May 2000 05:10:33 +0000 (05:10 +0000)]
Make easprintf() and evasprintf() return an int.