Commit Graph

6010 Commits

Author SHA1 Message Date
Todd C. Miller
ae43a19ad6 Enable debugging via sudo.conf. 2012-01-06 13:13:04 -05:00
Todd C. Miller
38526ca149 Enable debugging via sudo.conf. 2012-01-06 10:58:13 -05:00
Todd C. Miller
baa9273dd5 Allow "visudo -c" to work when we only have read-only access to the
sudoers include files.
2012-01-06 10:54:30 -05:00
Todd C. Miller
37fe423cd4 Mention the CONTRIBUTORS file, not HISTORY in AUTHOR section. Add
HISTORY section in sudo that points to HISTORY file.
2012-01-06 10:05:47 -05:00
Todd C. Miller
45e1623b5d Document Debug setting in sudo.conf and debug_flags in plugin. 2012-01-06 09:44:41 -05:00
Todd C. Miller
c4ba511613 Do not include GLOB_MARK in the flags we pass to glob(3). Fixes a
bug where a pattern like "/usr/*" include /usr/bin/ in the results,
which would be incorrectly be interpreted as if the sudoers file
had specified a directory.  From Vitezslav Cizek.
2012-01-05 15:54:00 -05:00
Todd C. Miller
241b1db873 Add --enable-kerb5-instance configure option to allow people using
Kerberos V authentication to use a custom instance.  Adapted from
a diff by Michael E Burr.
2012-01-05 15:39:05 -05:00
Todd C. Miller
72a4e0943e Remove -D debug_level option. 2012-01-05 11:48:24 -05:00
Todd C. Miller
9c27e91b51 Update copyright year. 2012-01-05 11:47:22 -05:00
Todd C. Miller
47bcaf57bc parse_error is now bool, not int 2012-01-04 15:45:27 -05:00
Todd C. Miller
0f5eaa17fd Print a more sensible error if yyparse() returns non-zero but
yyerror() was not called.
2012-01-04 15:45:03 -05:00
Todd C. Miller
a1815e17ca Replace y.tab.c with the correct filename in #line directives. 2012-01-04 15:35:49 -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
fa1f781a0e 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:55:13 -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
4aa0ccb22b Don't dump interfaces if there are none. 2011-12-20 08:39:01 -05:00
Todd C. Miller
91839036db Add missing %s printf escape to the group_plugin, iolog_dir and
iolog_file descriptions.
2011-12-20 08:38:47 -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
27616d1f3e If srcdir is "." just use the basename of the yacc/lex file when
generating the C version.  This matches the generated files currently
in the repo.
2011-12-08 13:41:35 -05:00
Todd C. Miller
31c08fca3e Clean up the DEVEL noise 2011-12-08 12:53:10 -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
edd32aa8df Mention how to configure pam_hpsec on HP-UX to play nicely with sudo. 2011-12-08 09:10:07 -05:00
Todd C. Miller
666d8d6359 Escape values in the search expression as per RFC 4515. 2011-12-07 15:12:22 -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
faa10aa827 ignore src/sesh 2011-12-05 11:25:30 -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
62011b6772 Restore PACKAGE_TARNAME, it is used in docdir 2011-12-02 16:11:50 -05:00
Todd C. Miller
feaad3aff4 SunPro C Compiler also has a _Bool builtin.
Also add stdbool.h to the MANIFEST
2011-12-02 15:34:01 -05:00
Todd C. Miller
0e26e43b99 Remove duplicate return statements. 2011-12-02 15:23:42 -05:00
Todd C. Miller
db3fd558be Remove inaccurate comment 2011-12-02 14:41:32 -05:00
Todd C. Miller
199eeb38d4 Fetch the login class for the user we authenticate specifically when
using BSD authentication.  That user may have a different login class
than what we will use to run the command.  When setting the login
class for the command, use the target user's struct passwd, not
the invoking user's.  Fixes bug 526
2011-12-02 14:29:54 -05:00
Todd C. Miller
01147eda3a Replace @DEV@ prefix with DEVEL variable so we can do "make DEVEL=1" 2011-12-02 13:43:02 -05:00
Todd C. Miller
b58c1ff6ec Fix "make check" fallout from the sudo_conv changes in sudo_debug. 2011-12-02 11:35:22 -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
86c86183ab Add stdbool.h for systems without it. 2011-12-01 13:49:46 -05:00
Todd C. Miller
e54fc4eb34 No longer need SUDO_CHECK_TYPE and SUDO_TYPE_* now that the default
includes have unistd.h in them.  Add check for socklen_t for upcoming
getaddrinfo compat.
2011-12-01 11:27:57 -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
21a1460d4c Fix mode on sudoers as needed when the -f option is not specified. 2011-11-30 15:33:26 -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
13514ec03e Build PIE executables for newer Debian and Ubuntu 2011-11-30 13:51:41 -05:00
Todd C. Miller
8fa6ab0372 Include time.h for ctime() prototype. 2011-11-30 09:14:11 -05:00