Commit Graph

6546 Commits

Author SHA1 Message Date
Todd C. Miller
883e0ec3cc Split out implementation-specific back end code out of pwutil.c
into pwutil_impl.c.  This will allow the main pwutil code to be
used for lookup methods other than getpw* and getgr*.
2012-09-21 16:25:01 -04:00
Todd C. Miller
a7ce1909fe sudo 1.8.6p3 2012-09-18 09:41:58 -04:00
Todd C. Miller
4446e22a9e Don't use embedded newline when matching, use \n. This got expanded
at some point.  Bug #573
2012-09-17 22:09:00 -04:00
Todd C. Miller
7f36643a66 Rename yyerror() to sudoerserror() to match yacc prefix changes.
Not really needed due to the #defines that yacc makes but it is
less confusing this way as the lexer calls sudoerserror().
2012-09-17 17:03:17 -04:00
Todd C. Miller
1d90c0ad71 No need to translate "unable to allocate memory" when we can just
use the system translation via strerror().
2012-09-17 16:59:26 -04:00
Todd C. Miller
f808fead0a Fall back on lstat(2) if d_type in struct dirent is DT_UNKNOWN.
Not all file systems support d_type.  Bug #572
2012-09-17 13:20:30 -04:00
Todd C. Miller
37d70a999c Avoid calling fclose(NULL) in the error path when we cannot open an
I/O log file.
2012-09-17 10:53:46 -04:00
Todd C. Miller
0c94a95ef3 Sudo 1.8.6p2 2012-09-16 21:04:33 -04:00
Todd C. Miller
885b6e7cda When setting the signal handler for SIGTSTP to the default value
in non-I/O log mode, store the old handler value for when we restore
it after resume.
2012-09-16 18:40:39 -04:00
Todd C. Miller
faf112c53b Replace the guts of sudo_setenv_nodebug() with our old setenv.c
which supports non-standard BSD and glibc semantics.
sudo_setenv() now simply calls sudo_setenv2().
2012-09-16 15:18:58 -04:00
Todd C. Miller
3c34c0a4b8 Document non-Unix group support in LDAP sudoers. 2012-09-15 14:00:30 -04:00
Todd C. Miller
bdf93e8d3e Enable non-Unix group support for LDAP sudoers. We now check for
non-Unix groups and netgroups with the same query in the second
pass.  Bug #571
2012-09-15 13:41:24 -04:00
Todd C. Miller
5276ab3a5f Set yacc prefix to "sudoers" to avoid conflicts other yacc parsers. 2012-09-14 16:19:25 -04:00
Todd C. Miller
0c9083b141 Mention support for SUCCESS=return in /etc/nsswitch.conf 2012-09-12 15:13:49 -04:00
Todd C. Miller
824092b883 sudo 1.8.6p1 2012-09-12 14:37:27 -04:00
Todd C. Miller
40d0492a42 Avoid setting LOGNAME, USER and USERNAME variables twice when
set_logname is enabled.
2012-09-11 10:24:20 -04:00
Todd C. Miller
6beab19148 Fix duplicate detection in sudo_putenv(), do not prune out the
variable we just set when overwriting an existing instance.
Fixes bug #570
2012-09-11 10:22:37 -04:00
Todd C. Miller
d2a46c0f81 Add some debuggging 2012-09-11 10:21:32 -04:00
Todd C. Miller
3af7a0daf5 Disable word wrap in list mode when stdout is a pipe to make "sudo
-l | grep ..." more useful.  Adapted from a diff by Daniel Kopecek.
2012-09-04 10:44:34 -04:00
Todd C. Miller
e5257d48d7 Print a trailing newline in lbuf_print() when there is not enough
space to do word wrapping and the lbuf does not end with a newline.
2012-09-04 10:42:09 -04:00
Todd C. Miller
d787df3c1d Add support for [SUCCESS=return] in nsswitch.conf; from Daniel Kopecek 2012-09-04 09:22:10 -04:00
Todd C. Miller
2068d941b9 Add sssd.c 2012-09-04 09:07:33 -04:00
Todd C. Miller
a71e685aa9 regen .po files 2012-09-01 17:10:36 -04:00
Todd C. Miller
8de12a2bcf Add Vietnamese sudoers translation from translationproject.org 2012-09-01 17:00:49 -04:00
Todd C. Miller
cab82ddcf6 mention PIE 2012-09-01 13:10:16 -04:00
Todd C. Miller
4380a60a97 Add Vietnamese sudoers translation from translationproject.org 2012-09-01 13:10:04 -04:00
Todd C. Miller
4017e63b9c Add missing signame dependency 2012-08-29 16:08:02 -04:00
Todd C. Miller
ae21fb299d Silence compiler warnings. 2012-08-29 14:40:25 -04:00
Todd C. Miller
ab7dda035a Replace strsigname() with sig2str(), emulating it as needed. 2012-08-29 14:25:09 -04:00
Todd C. Miller
71e2d8290b Use fseeko() for legacy utmp handling if available. 2012-08-29 10:32:49 -04:00
Todd C. Miller
f44afdc423 Detect sys_sigabbrev[] and use it in place of sys_signame[] if
present.  For some reason glibc does not declare sys_sigabbrev so
we must add an extern definition of our own.
2012-08-28 10:11:38 -04:00
Todd C. Miller
af4f02d3e2 Handle NULL entries in sys_siglist and sys_signame. 2012-08-28 09:40:56 -04:00
Todd C. Miller
24991069f6 Convert my_sys_sig{list,name} -> sudo_sys_sig{list,name} 2012-08-28 09:28:25 -04:00
Todd C. Miller
a371c50f0a sync 2012-08-27 11:28:38 -04:00
Todd C. Miller
37269d662a Pass on SIGTSTP to the command if it was sent by a user process
(not the kernel or the terminal) when we are not I/O logging and
set the default SIGTSTP handler when we re-send the signal to
ourself, restoring our handler after we resume.
2012-08-27 11:22:33 -04:00
Todd C. Miller
29907e357c Shells typically change their process group when they start up so
that they can implement job control.  Most well-behaved shells
change the pgrp back to its original value before suspending so we
must not try to restore in that case, lest we race with the child
upon resume, potentially stopping sudo with SIGTTOU while the command
continues to run.  Some shells, such as pdksh, just suspend the
shell by sending SIGSTOP to themselves without restoring the pgrp.
In this case we need to change the pgrp back for them.
Should fix bug #568
2012-08-27 10:29:59 -04:00
Todd C. Miller
537dc94b9e Use strsigname() to print signal names in the debug output.
If the system has no strsigname(), use our own.
2012-08-26 20:12:51 -04:00
Todd C. Miller
ac4b21b3e2 Remove generated file and change path for temporary include file. 2012-08-23 14:57:57 -04:00
Todd C. Miller
6d08c4b406 When running regress tests, list pass/fail rate for each dir
(testsudoers and visudo) instead of the total.  Also prevent the
result files from clobbering each other by keeping them in the
relevant directories.
2012-08-23 14:47:58 -04:00
Todd C. Miller
e498bab4c1 Don't print an error message in yyerror() if open_sudoers() fails,
we've already printed an error message.  Also restore the check
for sudoers_warnings in yyerror().
2012-08-23 14:02:02 -04:00
Todd C. Miller
0c8c3c0cd8 Avoid printing the >>> parse error <<< message for testsudoers
when the -t flag is specified.
2012-08-23 11:28:44 -04:00
Todd C. Miller
793426106e Fix NULL deref when an entry has no Runas_Entry 2012-08-22 15:50:58 -04:00
Todd C. Miller
81d42ae4e6 sync with translationproject.org 2012-08-22 12:56:28 -04:00
Todd C. Miller
f82515a8c7 sync 2012-08-22 12:52:15 -04:00
Todd C. Miller
778895adfd Correct the check_user() comment header. 2012-08-22 12:52:07 -04:00
Todd C. Miller
60ba369791 Change a log_fatal() into log_error() when no auth methods are
configured.  The caller already checks the return value.
2012-08-22 12:51:46 -04:00
Todd C. Miller
2b5d43b8aa Add missing debug_return 2012-08-22 10:20:27 -04:00
Todd C. Miller
2d3a0d14d3 Make the capitalization consistent for .Ss and .Sx 2012-08-21 15:11:43 -04:00
Todd C. Miller
8f3232ee69 Add COMMAND EXECUTION section that describes how sudo runs
the command, the extra sudo processes and signal handling.
2012-08-21 13:01:43 -04:00
Todd C. Miller
c1d6e86d67 Happy Easter 2012-08-18 19:58:07 -04:00