Todd C. Miller [Tue, 11 Dec 2001 23:06:52 +0000 (23:06 +0000)]
o Add a new token, DEFVAR, to indicate a Defaults variable name
o Add support for "+=" and "-=" list operators
o replace some 1 and 0 with TRUE and FALSE for greater legibility.
Todd C. Miller [Tue, 11 Dec 2001 23:05:44 +0000 (23:05 +0000)]
o Use exclusive start conditions to remove some ambiguity in the
lexer. Also reorder some things for clarity.
o Add support for "+=" and "-=" list operators.
o Use the new DEFVAR token to denote a Defaults variable name.
Todd C. Miller [Tue, 11 Dec 2001 23:02:51 +0000 (23:02 +0000)]
o Convert environment handling to use lists instead of strings.
This greatly simplifies routines that need to do "foreach" type
operations.
o Add new init_envtables() function to set env_check and env_delete
defaults based on initial_badenv_table and initial_checkenv_table
(formerly sudo_badenv_table).
Todd C. Miller [Tue, 11 Dec 2001 23:00:34 +0000 (23:00 +0000)]
o Add a new LIST type and functions to manipulate it.
o This is for use with environment handling variables.
o Call new init_envtables() routine inside init_defaults() to
initialize the environment lists.
Todd C. Miller [Sun, 9 Dec 2001 05:17:00 +0000 (05:17 +0000)]
Be carefule now that tgetpass() can return NULL (user hit ^C).
PAM version needs testing.
Set SIGTSTP to SIG_DFL during password entry so user can suspend us.
Todd C. Miller [Fri, 2 Nov 2001 20:56:20 +0000 (20:56 +0000)]
Add new T_UINT type that most things use instead of T_INT
If timestamp_timeout is < 0 then treat the ticket as never expiring
(to be expired manually by the user).
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.
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.
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.
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.
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>
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()).
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)