Commit Graph

35 Commits

Author SHA1 Message Date
Todd C. Miller
3bb69ffe81 Remove CVS $Sudo$ tags. 2010-01-17 19:51:28 -05:00
Todd C. Miller
186d836ebc Add support for floating point timeout values (e.g. 2.5 minutes). 2009-12-08 21:49:53 +00:00
Todd C. Miller
840acbd3ac Update copyright years. 2008-11-09 14:13:13 +00:00
Todd C. Miller
8ba6fa2ae3 Defer setting runas defaults until after runaspw/gr is setup. 2008-11-01 13:20:01 +00:00
Todd C. Miller
778d587063 Update copyright years. 2005-02-12 22:56:07 +00:00
Todd C. Miller
fe869025c4 Add support for command-specific Defaults entries. E.g.
Defaults!/usr/bin/vi noexec
2004-11-19 21:35:12 +00:00
Todd C. Miller
9c14a99988 Add prototype for update_defaults() 2004-10-26 22:16:26 +00:00
Todd C. Miller
3be828f784 More to a less restrictive, ISC-style license. 2004-02-13 21:36:43 +00:00
Todd C. Miller
fb65156a72 Add callback support 2004-01-16 23:03:02 +00:00
Todd C. Miller
02f37dc2da 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.
2003-12-30 22:31:30 +00:00
Todd C. Miller
6ad252765b 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.
2003-12-30 22:20:21 +00:00
Todd C. Miller
34479303ad add DARPA credit on affected files 2003-04-16 00:42:09 +00:00
Todd C. Miller
47dff37185 o Update copyright year 2001-12-14 19:54:56 +00:00
Todd C. Miller
2f818e2c32 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.
2001-12-11 23:00:34 +00:00
Todd C. Miller
3550d52a90 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).
2001-11-02 20:56:20 +00:00
Todd C. Miller
d956d77528 Move defaults info into its own files from which we generate
.h and .c files.  This makes adding or rearranging variables
much simpler.
2000-12-31 01:38:37 +00:00
Todd C. Miller
998631b73a 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)
2000-12-30 03:29:47 +00:00
Todd C. Miller
7ea65e54bd 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)).
2000-11-03 05:37:44 +00:00
Todd C. Miller
ed7827decc Add always_set_home variable 2000-09-07 01:35:39 +00:00
Todd C. Miller
f7ed0b0df3 Add set_logname option so users can turn off setting of LOGNAME/USER
environment variables.
2000-03-22 23:40:09 +00:00
Todd C. Miller
935a51e76a FreeBSD login class (login.conf) support. 2000-03-07 04:29:46 +00:00
Todd C. Miller
09b23e7b41 Add rootpw, runaspw, and targetpw options. 2000-02-18 17:56:28 +00:00
Todd C. Miller
020125336c 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.
2000-02-16 00:03:44 +00:00
Todd C. Miller
9e0bae9fc6 update copyright year on changed files 2000-01-17 23:46:26 +00:00
Todd C. Miller
ccb808da31 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.
2000-01-17 17:25:10 +00:00
Todd C. Miller
f68cc2f628 Add "listpw" and "verifypw" options. 2000-01-17 04:05:18 +00:00
Todd C. Miller
b1a9b1e672 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.
2000-01-14 17:29:35 +00:00
Todd C. Miller
449f67f776 o Kill shell_noargs option, it cannot work since the command needs to
be set before sudoers is parsed.
o Fix the "set_home" sudoers option (only worked at compile time).
o Fix "fqdn" sudoers option.  We now set host/shost via set_fqdn which
  gets called when the "fqdn" option is set in sudoers.
o Move the openlog() to store_syslogfac() so this gets overridden
  correctly from the sudoers file.
1999-12-02 20:31:25 +00:00
Todd C. Miller
bd99c35457 #undef T_FOO to avoid conflicts with system defines (like on ULTRIX). 1999-10-11 16:24:02 +00:00
Todd C. Miller
deb02f9b36 o Add T_PATH flag to allow simple sanity checks for default values that
are supposed to be pathnames.
o Fix a duplicate free when visudo finds an error.
1999-10-10 17:56:02 +00:00
Todd C. Miller
deab20a57f mail_if_foo -> mail_foo 1999-10-09 05:01:48 +00:00
Todd C. Miller
2c4fefde5a o Add requiretty option
o Move O_NOCTTY to compat.h
1999-10-08 01:12:50 +00:00
Todd C. Miller
7769bf6a32 o Change defaults stuff to put the value right in the struct.
o Implement mailer_flags
o Store syslog stuff both in int and string form.  Setting the string
  form magically updates the int version.
o Add boolean attribute to strings where it makes sense to say !foo
1999-10-07 21:21:08 +00:00
Todd C. Miller
80ac47fb07 add log_year option 1999-09-14 16:56:32 +00:00
Todd C. Miller
13bf42675d Add support for "Defaults" line in sudoers to make configuration variables
changable at runtime (and on a global, per-host and per-user basis).
Both the names and the internal representation are still subject to change.
It was necessary to make sudo_user.runas but a char ** instead of a
char * since this value can be changed by a Defaults line.  There is a
similar (but more complicated) issue with sudo_user.prompt but it
is handled differently at the moment.

Add a "-L" flag to list the name of options with their descriptions.  This
may only be temporary.

Move some prototypes to parse.h

Be much less restrictive on what is allowed for a username.
1999-09-08 08:06:28 +00:00