Todd C. Miller
f7b04c32ae
Add debug warning if KERN_PROC sysctl fails or devname() can't
...
resolve the tty device to a name.
2012-01-11 14:09:16 -05:00
Todd C. Miller
528258aff5
Add support for determining tty via sysctl on other BSD variants.
2012-01-10 16:49:24 -05:00
Todd C. Miller
832c4c9d57
For FreeBSD, try the KERN_PROC_PID sysctl() first, falling back on
...
ttyname() of std{in,out,err}.
2012-01-10 13:02:41 -05:00
Todd C. Miller
974e50dcf0
On newer FreeBSD we can get the parent's tty name via sysctl().
2012-01-09 16:08:58 -05:00
Todd C. Miller
c142a52f5b
Silence a gcc warning.
2012-01-09 15:33:51 -05:00
Todd C. Miller
0771c981de
Update copyright year.
2012-01-06 14:23:55 -05:00
Todd C. Miller
6021ad08cc
regen pot files
2012-01-06 13:49:16 -05:00
Todd C. Miller
72a4e0943e
Remove -D debug_level option.
2012-01-05 11:48:24 -05:00
Todd C. Miller
4da65677bd
When trying to determine the tty, fall back on /proc/ppid/fd/{0,1,2}
...
if the main process's fds 0-2 are not hooked up to a tty. Adapted
from a diff by Zdenek Behan.
2012-01-03 10:47:33 -05:00
Todd C. Miller
5bc0756406
When not logging I/O, put command in its own pgrp and make that the
...
controlling pgrp if the command is in the foreground. Fixes a race
in the non-I/O logging path where the command may receive two
keyboard-generated signals; one from the kernel and one from the
sudo process.
2012-01-03 10:06:07 -05:00
Todd C. Miller
7799d01cfa
Quiet a bogus gcc warning.
2011-12-20 13:50:48 -05:00
Todd C. Miller
089ee42228
Fix warnings related to sudo.conf accessors.
2011-12-20 13:39:19 -05:00
Todd C. Miller
1c3965f534
Separate sudo.conf parsing from plugin loading and move the parse
...
functions into the common lib so that visudo, etc. can use them.
2011-12-20 08:50:07 -05:00
Todd C. Miller
fb3c9f2ca5
Remove support for noexec_file in sudoers and the plugin API
2011-12-20 08:40:55 -05:00
Todd C. Miller
1f97735fbb
Fix typo in visiblepw description; from Joel Pickett
2011-12-18 14:20:56 -05:00
Todd C. Miller
a24d86b32c
When running a login shell with a login_class specified, use
...
LOGIN_SETENV instead of rolling our own login.conf setenv support
since FreeBSD's login.conf has more than just setenv capabilities.
This requires us to swap the plugin-provided envp for the global
environ before calling setusercontext() and then stash the resulting
environ pointer back into the command details, which is kind of a
hack.
2011-12-08 17:17:25 -05:00
Todd C. Miller
98c77b5b96
Handle different Unix domain socket (actually socketpair) semantics
...
in BSD vs. Linux. In BSD if one end of the socketpair goes away
select() returns the fd as readable and the read will fail with
ECONNRESET. This doesn't appear to happen on Linux so if we notice
that the monitor process has died when I/O logging is enabled,
behave like the command has exited. This means we log the wait
status of the monitor, not the command, but there is nothing else
we can do at that point. This should only be an issue if SIGKILL
is sent to the monitor process.
2011-12-08 11:18:38 -05:00
Todd C. Miller
6bcf470fe9
Catch common signals in the monitor process so they get passed to
...
the command. Fixes a problem when the entire login session is
killed when ssh is disconnected or the terminal window is closed.
Previously, the monitor would exit and plugin's close method would
not be called.
2011-12-08 11:15:53 -05:00
Todd C. Miller
1cec1f4777
No need for install target to depend explicitly on install-dirs,
...
the install-foo targets all depend on it.
2011-12-07 14:33:25 -05:00
Todd C. Miller
9f0abb4692
Add support for setenv entries in login.conf. We can't use LOGIN_SETENV
...
since the plugin sets up the envp the command is executed with.
Also regen the Makefile.in files while here. Fixes bug #527
2011-12-05 10:43:44 -05:00
Todd C. Miller
38a4990e4a
Add getaddrinfo() for those without it, written by Russ Allbery
2011-12-02 17:28:50 -05:00
Todd C. Miller
0e26e43b99
Remove duplicate return statements.
2011-12-02 15:23:42 -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
51e45647ae
Use HAVE_STRUCT_TIMESPEC and HAVE_STRUCT_IN6_ADDR instead of
...
HAVE_TIMESPEC and HAVE_IN6_ADDR respectively.
2011-12-01 11:07:17 -05:00
Todd C. Miller
3f4b68dd18
No longer need to include time.h here as missing.h does not use
...
time_t.
2011-12-01 10:47:23 -05:00
Todd C. Miller
f7925b5889
Add Serbian translation for sudo from translationproject.org
2011-11-30 14:57:45 -05:00
Todd C. Miller
ab887a6fb0
No longer pass debug_file to plugin, plugins must now use CONV_DEBUG_MSG
2011-11-30 14:56:41 -05:00
Todd C. Miller
a64f1eaea8
Do not close error pipe or debug fd via closefrom() as we need them
...
to report an exec error should one occur.
2011-11-29 19:51:24 -05:00
Todd C. Miller
55166914c4
regen
2011-11-21 16:43:46 -05:00
Todd C. Miller
f689afb5ee
Fix non-dynamic (no dlopen) sudo build.
2011-11-13 21:24:54 -05:00
Todd C. Miller
65b781a2ef
Use SUDO_CONV_DEBUG_MSG in the plugin instead of writing
...
directly to the debug file.
2011-11-13 13:55:19 -05:00
Todd C. Miller
e58b232740
Change Debug sudo.conf setting to take a program name as the first
...
argument. In the future, this will allow visudo and sudoreplay to
use their own Debug entries.
2011-11-08 08:24:45 -05:00
Todd C. Miller
5d2c01e3d3
fix sudo_debug_printf priority
2011-11-08 08:22:48 -05:00
Todd C. Miller
3ee9cef0da
Fold SUDO_DEBUG_PROGERR and SUDO_DEBUG_SYSERR into SUDO_DEBUG_ERROR
2011-11-07 16:33:49 -05:00
Todd C. Miller
ab75dd2e30
Get rid of done: label. If the child exits we still need to close
...
the pty, update utmp and restore the SELinux tty context.
2011-10-24 11:14:20 -04: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
9923464d96
Wrap error/errorx and warning/warningx functions with debug statements.
...
Disable wrapping for standalone sudoers programs as well as memory
allocation functions (to avoid infinite recursion).
2011-10-22 14:28:33 -04:00
Todd C. Miller
53e3ad11b5
New debug framework for sudo and plugins using /etc/sudo.conf that
...
also supports function call tracing.
2011-10-22 14:00:52 -04:00
Todd C. Miller
dd3902e115
Add Italian translation for sudo from translationproject.org
2011-10-10 11:00:09 -04:00
Todd C. Miller
82dd8f65fd
Japanese translation for sudo and sudoers from translationproject.org
2011-10-10 06:45:28 -04:00
Todd C. Miller
de684e5d2c
regen pot files
2011-09-27 14:07:18 -04:00
Todd C. Miller
7304bc744e
Add check for old being NULL in utmp_setid(); from Steven McDonald
2011-09-27 09:30:59 -04:00
Todd C. Miller
6028afae83
Add Italian translation for sudo from translationproject.org
...
Regen .mo files
2011-09-22 14:56:43 -04:00
Todd C. Miller
4724e313e0
FreeBSD has libutil.h not util.h
2011-09-21 09:52:33 -04:00
Todd C. Miller
f730cb7873
Assume all modern systems support fstat(2).
2011-08-31 11:19:10 -04:00
Todd C. Miller
47af0fc2b8
Add configure test for missing errno declaration and only
...
declare it ourselves if it is missing.
2011-08-30 10:05:30 -04:00
Todd C. Miller
d81c14005f
Silence compiler warnings on Solaris with gcc 3.4.3
2011-08-23 16:42:18 -04:00
Todd C. Miller
8fb53f5e4b
Add new Esperanto translation from translationproject.org
2011-08-22 08:26:50 -04:00
Todd C. Miller
a6224a7342
Regen pot files
2011-08-17 11:40:14 -04:00
Todd C. Miller
aaaa5d05d9
Update Finish, Polish, Russian and Ukrainian translations from
...
translationproject.org.
2011-08-09 14:57:57 -04:00