Todd C. Miller
dc883f2454
We require ANSI C so stop using the obsolete STDC_HEADERS.
2015-06-19 14:29:27 -06:00
Todd C. Miller
138aa2ccd1
Remove BROKEN_SYSLOG define which was for obsolete versions of HP-UX.
...
Remove last remnants of 4.2BSD syslog support.
2015-06-18 17:53:49 -06:00
Todd C. Miller
d004b02fc6
Use non-exiting allocatings in the sudoers plugin.
2015-06-17 06:49:59 -06:00
Todd C. Miller
59ab26dbcc
Go back to a 2 args debug_decl and just use the "default" instance,
...
now renamed "active".
2015-02-01 08:24:49 -07:00
Todd C. Miller
e9914a91b1
The sudoers plugin now defines its own list of debugging subsystem names
...
and defines.
2014-10-22 13:30:52 -06:00
Todd C. Miller
866cfc4fc3
Add support for multiple Debug lines per program. Callers may
...
register arbitrary debug facilities or use built-in defaults. We
now use separate Debug statements for plugins and programs.
2014-10-22 13:23:05 -06:00
Todd C. Miller
36a5767e3e
efree -> sudo_efree for consistency
2014-07-10 15:35:04 -06:00
Todd C. Miller
a8fa112a53
atobool -> sudo_strtobool
...
atoid-> sudo_strtoid
atomode -> sudo_strtomode
2014-06-27 14:53:54 -06:00
Todd C. Miller
2d61d38c23
Add sudo_ prefix to alloc.c functions and rename alloc.h -> sudo_alloc.h
2014-06-27 10:48:31 -06:00
Todd C. Miller
aecef4aa1d
Rename warning/fatal -> sudo_warn/sudo_fatal to avoid namespace
...
pollution in libsudo_util.so.
2014-06-27 09:30:52 -06:00
Todd C. Miller
278a8ba391
pam_setcred should default to true; from Gary Winiger
...
Bug #642
2014-04-15 07:11:29 -06:00
Todd C. Miller
8287e21d36
Add use_netgroups sudoers option. For LDAP-based sudoers, netgroup
...
support requires an expensive substring match on the server. If
netgroups are not needed, this option can be disabled to reduce the
load on the LDAP server.
2014-02-07 14:58:48 -07:00
Todd C. Miller
659b1f0e34
Switch to new time stamp file format. Each user now has a single
...
file which may contain multiple records when per-tty time stamps
are in use (the default). The time stamps use a monotonic timer
where available and are once again stored in /var/run/sudo. The
lecture status is now stored separately from the time stamps in a
different directory.
2014-01-30 15:50:40 -07:00
Todd C. Miller
ef2cff1d33
Now that we have proper number parsing functions we should store
...
T_UINT defaults values as unsigned int, not int.
2013-12-11 14:43:04 -07:00
Todd C. Miller
3e4f5c5848
Don't use int where we really mean enum def_tuple. When this code
...
was written it was assumed that we may have multiple tuple types.
However, that hasn't happened and probably never will.
2013-12-11 14:31:50 -07:00
Todd C. Miller
cbf41b8b96
The OpenBSD strtonum() uses very short error strings that can't
...
be translated usefully. Convert them to longer strings on error.
Also use the longer strings for atomode() and atoid().
2013-12-11 13:43:10 -07:00
Todd C. Miller
d83bfb9fe6
Add atomode() function for parsing a file mode.
2013-12-10 16:56:54 -07:00
Todd C. Miller
8f9ce7249a
Use strtonum() instead of atoi(), strtol() or strtoul() where possible.
2013-12-10 16:23:21 -07:00
Todd C. Miller
96eb2c4f8f
Add warning_gettext() wrapper function that changes to the user locale,
...
then calls gettext().
Add U_ macro that calls warning_gettext() instead of gettext().
Rename warning2()/error2() back to warning_nodebug()/error_nodebug().
2013-11-18 08:59:57 -07:00
Todd C. Miller
6c71ad5c15
Add debug_return_const_str and debug_return_const_ptr for returning
...
a const string or pointer. Using const for the normal versions
produces warnings with the Tru64 compiler.
2013-11-17 16:11:39 -07:00
Todd C. Miller
798e82bd61
Fix newly introduced use after frees found by llvm checker.
2013-10-22 10:43:15 -06:00
Todd C. Miller
b38d253e98
Add "headless" tail queues and use them in place of the semi-circular
...
lists in sudoers. Once the headless tail queue is built up it is
converted to a normal TAILQ. This removes the last consumer of
list.c and list.h so those can now be removed.
2013-10-22 09:08:38 -06:00
Todd C. Miller
f85106ea67
Use SLIST and STAILQ macros instead of doing headless singly linked
...
lists manually. As a bonus we now use a tail queue for ldap.c and
sudoreplay.c.
2013-10-22 09:08:09 -06:00
Todd C. Miller
52954481e1
Add pam_service and pam_login_service sudoers settings to control
...
the service name passed to pam_start.
2013-08-06 11:01:36 -06:00
Todd C. Miller
1f3ea50afd
Implement memset_s() and use it instead of zero_bytes().
...
A new constant, SUDO_CONV_REPL_MAX, is defined by the plugin
API as the max conversation reply length. This constant can be
used as a max value for memset_s() when clearing passwords
filled in by the conversation function.
2013-08-03 08:30:06 -06:00
Todd C. Miller
d6282d154a
Update copyright years.
2013-04-24 09:35:02 -04:00
Todd C. Miller
59692ad282
Add pam_session sudoers option.
2013-02-24 06:15:37 -05:00
Todd C. Miller
1d7072fe09
Don't include <sys/param.h>. We only needed it for MAXPATHLEN,
...
MAXHOSTNAMELEN and the MIN/MAX macros. We now use PATH_MAX and
HOST_NAME_MAX throughout without falling back on MAXPATHLEN or
MAXHOSTNAMELEN and define our own MIN/MAX macros as needed.
2012-12-04 10:40:47 -05:00
Todd C. Miller
7b3d268687
Call gettext() on parameters for warning()/warningx() instead of
...
having warning() do it for us.
2012-11-25 09:34:04 -05:00
Todd C. Miller
cac7ca6a69
Expand def_mailsub in the sudoers locale, not the user's.
2012-11-08 16:39:44 -05:00
Todd C. Miller
595d3b2651
Display warning/error messages in the user's locale.
2012-11-08 15:37:44 -05:00
Todd C. Miller
0fa33ccf0f
Split off timestamp functions into their own source file.
2012-09-27 10:21:13 -04:00
Todd C. Miller
7aeadbd5b3
Add new check_defaults() function to check (but not update) the
...
Defaults entries. Visudo can now use this instead of update_defaults
to check all the defaults regardless instead of just the global
Defaults entries.
2012-08-14 10:45:55 -04:00
Todd C. Miller
57699c5531
If a command matches using an empty Runas_List (i.e. Runas_List is
...
present but empty) and the -u option was not specified, set runas_pw
to user_pw instead of using runas_default. This is intended to be
used in conjunction with the Solaris Privilege Set support for rules
that grant privileges without changing the user.
2012-08-02 14:37:32 -04:00
Todd C. Miller
55d1a1a79d
Use ecalloc() when allocating structs.
2012-03-19 11:24:24 -04:00
Todd C. Miller
f6fdc909b4
The "op" parameter to set_default() must be int, not bool since it is
...
set to '+' or '-' for list add and subtract.
2012-02-21 05:13:13 -05:00
Todd C. Miller
21a2f95821
Use stdbool.h instead of rolling our own TRUE/FALSE macros.
2011-12-02 11:27:33 -05:00
Todd C. Miller
09beba8259
Revert 003bdb078a15. We need to #include <gram.h> not "gram.h" and
...
<def_data.h> and not "def_data.h" when generating the parser in a
build dir.
2011-11-12 12:18:44 -05:00
Todd C. Miller
0bf68d2103
#include "gram.h" not <gram.h> and "def_data.h" and not <def_data.h>.
2011-11-08 14:09:48 -05:00
Todd C. Miller
839919566e
Add debug_decl/debug_return (almost) everywhere.
...
Remove old sudo_debug() and convert users to sudo_debug_printf().
2011-10-22 14:40:21 -04:00
Todd C. Miller
cab1968da2
Remove list_options() function that is no longer used now that "sudo
...
-L" is gone.
2011-09-16 09:05:17 -04:00
Todd C. Miller
4810662e98
Mark defaults descriptions for translation
2011-05-17 12:52:20 -04:00
Todd C. Miller
b643b190a7
Prepare sudoers module messages for translation.
2011-05-16 16:32:05 -04:00
Todd C. Miller
3506f01077
Add support for controlling whether utmp is updated and which user is
...
listed in the entry.
2011-03-15 15:53:49 -04:00
Todd C. Miller
7debf44742
Move noexec path into sudo.conf now that sudo itself handles noexec.
...
Currently can be configured in sudoers too but is now undocumented
and will be removed in a future release.
2011-03-10 16:12:33 -05:00
Todd C. Miller
ed8e30cf6e
Add --disable-env-reset configure option.
2011-01-28 16:52:25 -05:00
Todd C. Miller
ae2f7638f5
standardize on "return foo;" rather than "return(foo);" or "return (foo);"
2011-01-24 15:15:18 -05:00
Todd C. Miller
f7f8b6867e
Update copyright year to 2011
2011-01-20 16:46:56 -05:00
Todd C. Miller
fba58fa3f7
Allow sudoers to specify the iolog file in addition to the iolog dir.
...
Add escape sequence support to iolog file and dir: sequence number,
user, group, runas_user, runas_group, hostname and command in
addition to any escape sequence recognized by strftime(3).
2010-12-27 12:18:32 -05:00
Todd C. Miller
b2a6984606
Make I/O log dir configurable.
2010-12-10 14:14:35 -05:00