Todd C. Miller
fe23e7c038
Add endpointer and separator args to atoid()
2013-08-08 06:11:52 -06:00
Todd C. Miller
dde7331a0f
Use atoid() in more places.
2013-08-07 15:49:03 -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
235d32c994
Update dependencies now that sudo_usage.h is always included from
...
the build dir.
2013-08-01 10:50:05 -06:00
Todd C. Miller
3582ad3409
Instead of setting RLIMIT_NPROC to unlimited when sudo initializes,
...
just save RLIMIT_NPROC in exec_setup() before the final setuid()
and restore it immediately after. We don't need to modify RLIMIT_NPROC
for simple euid changes, just for changing the real (and saved)
uids before we exec. This also means we no longer need to worry
about _SC_CHILD_MAX returning -1. Bug #565
2013-07-29 15:34:49 -06:00
Todd C. Miller
b1c8f0575b
Now that the ldap code runs with the real and effective uid set to
...
0, it is not possible for the gssapi libs to find the user's krb5
credential cache file. To work around this, we make a temporary
copy of the user's credential cache specified by KRB5CCNAME (opened
with the user's effective uid) and point gssapi to it. To set the
credential cache file name, we dynamically look up gss_krb5_ccache_name()
and use it if available, otherwise fall back to setting KRB5CCNAME.
2013-07-28 17:06:43 -06:00
Todd C. Miller
6e56e6d8c8
Add support for long options and fix inclusion of sudo_usage.h with
...
modern gcc broken in 8597:1fcb7ba13018.
2013-07-18 16:51:56 -06:00
Todd C. Miller
fbfd0ad630
Add rule to rebuild sudo_usage.h when the .in file changes.
2013-07-18 14:29:30 -06:00
Todd C. Miller
deb3844959
Add make rules for building getopt_long.c
2013-07-18 10:07:41 -06:00
Todd C. Miller
db05b9ae0d
Make "-h hostname" work. Optional args in GNU getopt() only work
...
when there is no space between the option flag and the argument.
2013-07-18 10:02:43 -06:00
Todd C. Miller
9309c9eab7
Use getopt_long() so we can make the -h flag take an optional argument.
...
Includes a version for those without it.
2013-07-17 17:00:55 -06:00
Todd C. Miller
c2860cce57
Overload -h option to specify an optional hostname for remote access.
...
This is future-proofing; no policy plugins currently support this.
2013-07-16 16:31:05 -06:00
Todd C. Miller
b4e1f7c446
Do not error out if arg to -U option cannot be resolved, that is for
...
the plugin to decide.
There is no need for runas_user and runas_group to be global, make
them local to parse_args() instead.
2013-07-16 14:04:23 -06:00
Todd C. Miller
e53e80187d
Sync with translationproject.org
2013-07-16 07:32:57 -06:00
Todd C. Miller
f32a1c7edc
Remove unused variable.
2013-07-11 17:47:39 -04:00
Todd C. Miller
8b44c5d42d
Regen .mo files that were out of date.
2013-06-04 05:47:19 -04:00
Todd C. Miller
5869916533
Clarify a comment.
2013-05-18 04:38:26 -04:00
Todd C. Miller
5549e44cd8
Handle d_type == DT_UNKNOWN when resolving the device to a name and
...
sprinkle some more debugging.
2013-05-16 10:18:13 -04:00
Todd C. Miller
f6e8fb8b1c
Quiet a few -Wunused-result compiler warnings.
2013-05-01 11:02:09 -04:00
Todd C. Miller
368a6558ca
Change some error/errorx -> fatal/fatalx in comments and xgettext
...
flags.
2013-04-26 16:06:05 -04:00
Todd C. Miller
d6282d154a
Update copyright years.
2013-04-24 09:35:02 -04:00
Todd C. Miller
2b1b9ae72d
Don't check the tty of the parent process. Now that we get the
...
controlling tty device number from the kernel there is no need. If
the process has really disassociated from the tty then reporting
"unknown" is appropriate.
2013-04-21 10:35:52 -04:00
Todd C. Miller
8b0c6c5081
Change remaining errorx -> fatalx
2013-04-20 15:09:47 -04:00
Todd C. Miller
39acd2fcba
Rename error/errorx -> fatal/fatalx and remove the exit value as
...
it was always 1.
2013-04-18 14:07:59 -04:00
Todd C. Miller
904428dd54
Sync with translationproject.org
2013-04-18 09:41:11 -04:00
Todd C. Miller
6c9c2b2429
Fix logic bug when checking tty via ttyname().
2013-04-17 21:16:30 -04:00
Todd C. Miller
42313adc0d
AIX may have a 64-bit pr_ttydev that we need to convert to 32-bit
...
before we try to match it against st_rdev.
2013-04-10 12:30:16 -04:00
Todd C. Miller
54f092c3e6
Break out of the loop if sudo_ttyname_scan() returns non-NULL.
...
Fixes a problem finding the tty name when it is not in /dev/pts.
2013-04-10 12:11:12 -04:00
Todd C. Miller
ec32194152
Add ttyname test.
2013-04-10 09:39:49 -04:00
Todd C. Miller
c3b9c94e87
Sync with translationproject.org
2013-04-09 14:39:44 -04:00
Todd C. Miller
382640839e
regen
2013-04-02 10:40:16 -04:00
Todd C. Miller
b507f0a854
New Dutch translation for sudo and sudoers
...
New Turkish translation for sudo
From translationproject.org
2013-03-23 08:45:51 -04:00
Todd C. Miller
ce502e2ae2
Fix compilation in dynamic mode.
2013-03-18 15:26:08 -04:00
Todd C. Miller
e78381e7c2
Ubreak static build.
2013-03-18 09:55:01 -04:00
Todd C. Miller
5cda642eb9
Bump I/O buffer size 32K
2013-03-15 11:31:58 -04:00
Todd C. Miller
eb2259bc12
Move exec_cmnd to exec.c to fix a compilation issue with sesh.c
2013-03-14 19:59:07 -04:00
Todd C. Miller
7f32d1ca4c
Make sesh path configurable in sudo.conf
2013-03-14 16:49:42 -04:00
Todd C. Miller
9722784e1c
Always install plugins with a .so extension regardless of what
...
extension the system uses for shared libraries. That way the
group_plugin sudoers setting can be shared between heterogenous
systems.
2013-03-06 17:08:10 -05:00
Todd C. Miller
19f37400d6
When running the command in a pty, defer the call to exec_setup()
...
until just before we exec the command. This is consistent with the
non-pty path. As a side effect, the monitor process runs as root
and not the runas user.
2013-03-05 06:56:57 -05:00
Todd C. Miller
e30b0bd121
Use pstat() on HP-UX to determine the tty device.
2013-02-28 09:01:08 -05:00
Todd C. Miller
5cb928c512
If the policy plugin does not provide a close function, there is
...
no command timeout and no pty is required, skip the event loop and
just exec the command directly.
2013-02-23 14:19:07 -05:00
Todd C. Miller
5e674a790b
Do not crash if the plugin close and version functions are not
...
defined. If there is no policy close function, simply print a
warning that the command was not found.
2013-02-23 13:53:48 -05:00
Todd C. Miller
af4d3489f9
Pass the default plugin directory to the plugin via the settings list.
...
Could be used by a stacking plugin.
2013-02-21 15:05:51 -05:00
Todd C. Miller
0c40e82c16
Add simple regress tests for sudo.conf parsing.
2013-02-15 14:42:10 -05:00
Todd C. Miller
790304789e
Always display the I/O plugin version as long as its open functions
...
doesn't return an error. Previously it was only displayed if the
plugin open returned 1.
2013-02-15 12:31:49 -05:00
Todd C. Miller
2d9da65881
#include "sudo_usage.h" not <sudo_usage.h> so we get the one in the
...
build directory and not the src dir when using a separate build
directory.
2013-02-15 08:57:21 -05:00
Todd C. Miller
d837700341
Use max_groups in front-end and plugin.
2013-02-14 15:52:27 -05:00
Todd C. Miller
35548ae4e3
Pass max_groups to plugin in settings list.
2013-02-14 15:18:10 -05:00
Todd C. Miller
af0bb55283
Move tzset() call from sudoers plugin to sudo front end.
2013-02-07 14:31:48 -05:00
Todd C. Miller
6b09c76a20
Sudo now stores its libexec files in a "sudo" subdirectory instead
...
of in libexec itself. For backwards compatibility, if the plugin
is not found in the default plugin directory, sudo will check the
parent directory default directory ends in "/sudo".
2013-02-06 14:06:51 -05:00