Commit Graph

6968 Commits

Author SHA1 Message Date
Todd C. Miller
1624e8987a French translation for sudo from translationproject.org. 2013-08-18 14:25:04 -06:00
Todd C. Miller
0f091f478b Add __printflike to audit_failure. 2013-08-18 14:21:29 -06:00
Todd C. Miller
5caa61d687 Use __nonnull__ attribute in __printflike. 2013-08-18 14:18:55 -06:00
Todd C. Miller
7a76844d98 When merging the PAM environment, allow environment variables set
in PAM to override ones set by sudo as long as they do not match
the env_keep or env_check lists.
2013-08-17 06:34:09 -06:00
Todd C. Miller
f72f47aa1d Call pam_getenvlist() after we've opened the session to get the
session-specific environment variables.
2013-08-17 06:22:46 -06:00
Todd C. Miller
1a652757c2 option not flag 2013-08-16 14:56:59 -06:00
Todd C. Miller
3c2a9b9948 Don't redefine opterr, optind, optopt, optarg in getopt_long.c.
Add a check for optreset which is a BSD extension and provide a
definition in getopt_long.c if it is not present.
2013-08-16 13:50:48 -06:00
Todd C. Miller
082c73338a regen 2013-08-16 10:18:34 -06:00
Todd C. Miller
acac6ae2a8 Use lower case for the long option arguments to match the manual.
This is inconsistent with GNU but it is better to match the sudo
documentation.
2013-08-16 10:17:47 -06:00
Todd C. Miller
752418ffed Sudo 1.8.8 2013-08-16 10:14:45 -06:00
Todd C. Miller
a5b64a1d2e Use lower card for the long option arguments to match the manual.
This is inconsistent with GNU but it is better to match the sudo
documentation.
2013-08-16 09:41:46 -06:00
Todd C. Miller
87ec2dd6e1 Describe how remote command execution can be implemented. 2013-08-16 09:31:46 -06:00
Todd C. Miller
f76bd772ed Bump version. 2013-08-16 09:30:50 -06:00
Todd C. Miller
d40b302843 Make it a fatal error if the plugin returns invalid or out of range
command info.
2013-08-15 16:39:47 -06:00
Todd C. Miller
b8d539984f Use strtol() instead of atoi() and perform error checking
of parameters passed from the sudo front-end.
2013-08-15 16:20:15 -06:00
Todd C. Miller
91ec1c476c It is not possible for auth to be NULL here. 2013-08-15 15:22:50 -06:00
Todd C. Miller
ea65c82b66 Initialize user_runhost and user_srunhost to user_host and user_shost
in visudo and testsudoers.
2013-08-15 14:26:51 -06:00
Todd C. Miller
99352d6738 Rename error.h -> fatal.h now that there is no error() function. 2013-08-15 14:24:29 -06:00
Todd C. Miller
bec394dc11 Add support to the debug subsystem for zero-length strings. This
can happen for things like warning(NULL) or fatal(NULL) where we
just want to log the errno string.
2013-08-15 14:09:53 -06:00
Todd C. Miller
a44d827636 Add __printflike for vfatal, vfatalx, vwarning and vwarningx. 2013-08-15 14:08:40 -06:00
Todd C. Miller
1b39c3758d Need to include gettext.h for BSM audit. 2013-08-15 13:36:25 -06:00
Todd C. Miller
85fc5792d4 Change some fatalx(NULL) that should be fatal(NULL). 2013-08-15 13:06:49 -06:00
Todd C. Miller
4928c8c72e Use __printf0like for warning() and fatal() since the fmt string
may be NULL.
2013-08-15 12:58:24 -06:00
Todd C. Miller
e5f0e1f752 Quiet a gcc "used uninitialized in this function" false positive. 2013-08-15 10:49:06 -06:00
Todd C. Miller
e34fe030b9 Enable bsm audit on Mac OS X and Solaris >= 11. 2013-08-15 10:41:48 -06:00
Todd C. Miller
2f251caf47 Fix compilation on Solaris 11. 2013-08-15 10:39:40 -06:00
Todd C. Miller
251c79a77b Add missing missing.h 2013-08-15 10:08:27 -06:00
Todd C. Miller
c376c71618 Move the -C (user_closefrom) check until after set_cmnd() so that
closefrom_override can be used in a command-specific Defaults line.
Fixes bug #610 from Mengtao Sun.
2013-08-15 09:56:17 -06:00
Todd C. Miller
299a881fe2 If not using a pty and the child process gets SIGTTOU or SIGTTIN
and sudo is the foreground process, make the child the foreground
process and continue it.
2013-08-14 16:36:41 -06:00
Todd C. Miller
c909f61004 If sudo is not setuid and was not invoked with a full path, look
in the user's PATH for the sudo binary to give a better error
message.
2013-08-14 14:22:16 -06:00
Todd C. Miller
d0e3867587 Add limited support for "sudo -l -h other_host". Since group lookups
are done on the local host, rules that use group membership may be
incorrect if the group database is not synchronized between hosts.
2013-08-14 13:49:14 -06:00
Todd C. Miller
79104ce751 Fix parsing of "-h host" when used in conjunction with the -l flag. 2013-08-14 13:41:47 -06:00
Todd C. Miller
8b1d645534 Simplify usage messages a bit and make --help output more closely
resemble GNU usage wrt long options.  Sync usage and man page
SYNOPSYS sections and improve long options in the manual pages.
Now that we have long options we don't need to give the mnemonic
for the single-character options in the description.
2013-08-14 10:30:51 -06:00
Todd C. Miller
91e66c481f Fix setting of mailer argv[0] to basename of mailerpath.
No need to strdup() mailerpath as it is not modified.
2013-08-13 14:53:55 -06:00
Todd C. Miller
04b290e385 Make sure the mailer exists and is a regular file before trying
to exec it.
2013-08-13 14:48:24 -06:00
Todd C. Miller
39d630f2f2 If tty_tickets are enabled but there is no tty, use a ticket file
based on the parent pid.
2013-08-13 12:55:17 -06:00
Todd C. Miller
d9fd6281e4 Allow default plugin dir to be configured in sudo.conf. 2013-08-13 12:24:28 -06:00
Todd C. Miller
d10641cdbb UTF8 for Ruusamae, Elan; from Tae Wong 2013-08-13 10:37:52 -06:00
Todd C. Miller
9b2fb418ca Don't allow max_groups to be set to zero, it just complicates things
needlessly.  Fixes an assertion in visudo when there is a group-based
Defaults entry.
2013-08-12 09:14:38 -06:00
Todd C. Miller
8b4fbc5cc0 Refactor code to parse list of gids into its own function that is
shared by the sudo front-end and the sudoers module.
Make uid/gid parse error be fatal, not just a warning.
2013-08-08 11:40:36 -06:00
Todd C. Miller
6126c08f7d Add function comment block. 2013-08-08 11:38:39 -06:00
Todd C. Miller
141f91e777 Default text domain is now sudo, not sudoers. 2013-08-08 10:37:25 -06:00
Todd C. Miller
5556a0f211 Update dependency for atoid.lo 2013-08-08 08:39:58 -06:00
Todd C. Miller
fe23e7c038 Add endpointer and separator args to atoid() 2013-08-08 06:11:52 -06:00
Todd C. Miller
39cbfcd406 Use private version of atoid() to avoid a dependency on libcommon.a
(since that already depends on libreplace.a).
2013-08-07 16:52:50 -06:00
Todd C. Miller
03fc668e5a More UTF8 in names; from Tae Wong 2013-08-07 16:07:14 -06:00
Todd C. Miller
dde7331a0f Use atoid() in more places. 2013-08-07 15:49:03 -06:00
Todd C. Miller
40cb480f07 Move atoid() to common so it can be used in src and compat too. 2013-08-07 15:10:45 -06:00
Todd C. Miller
2c6e68df0e Avoid a crash on Mac OS X 10.8 (at least) when we close libdispatch's
fds out from under it before executing the command.  Switch to just
setting the close on exec flag instead.
2013-08-07 15:04:58 -06:00
Todd C. Miller
30adf33eaf Convert to last, first for easier sorting and use UTF8 (including a
BOM).
2013-08-07 14:14:05 -06:00