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
Todd C. Miller
48d7c78330
Cast isblank argument to unsigned char.
2010-09-16 10:39:08 -04:00
Todd C. Miller
b51afe6249
Implement --with-umask-override configure flag.
2010-09-14 17:18:55 -04:00
Todd C. Miller
2675524c32
The tty_tickets option is now on by default.
2010-07-20 13:20:53 -04:00
Todd C. Miller
f7f65cfb95
Check return value of setdefs() but don't stop setting defaults if
...
we hit an unknown one.
2010-07-19 12:53:25 -04:00
Todd C. Miller
30fe4a067c
Set usrinfo for AIX
...
Set adminstrative domain for the process when looking up user's
password or group info and when preparing for execve().
Include strings.h even if string.h exists since they may define
different things. Fixes warnings on AIX and others.
2010-06-29 13:08:05 -04:00
Todd C. Miller
d1bf11db33
Call set_fqdn() after sudoers has parsed instead of inline as a callback.
2010-06-18 17:47:55 -04:00
Todd C. Miller
ebc152ce8f
Check for zlib.h in addition to libz.
2010-06-16 16:51:46 -04:00
Todd C. Miller
b72a530fd0
Update copyright year
2010-06-14 12:19:49 -04:00
Todd C. Miller
eec336115a
Move askpass path specification from sudoers to sudo.conf.
2010-06-09 17:40:44 -04:00
Todd C. Miller
2dd29bf64d
Break sudoers transcript feature up into log_input and log_output.
2010-05-30 10:31:38 -04:00
Todd C. Miller
34e1a06767
Use sudo_printf to display verbose version information.
2010-05-28 12:01:06 -04:00
Todd C. Miller
05ae3ea6cb
Convert to ANSI C function declarations
2010-04-22 18:09:53 -04:00
Todd C. Miller
d5ae4c7d87
Kill __P in sudoers
2010-03-17 19:56:27 -04:00
Todd C. Miller
9b0205846b
Initial bits of sudoers plugin; still needs work.
2010-03-14 19:58:47 -04:00
Todd C. Miller
e90fa482f9
Rework source layout in preparation for modular sudo.
2010-02-20 09:14:01 -05:00