Commit Graph

6565 Commits

Author SHA1 Message Date
Todd C. Miller
929aef0754 Make interfaces pointer private to interfaces.c and add get_interfaces()
accessor.
2012-10-25 13:15:52 -04:00
Todd C. Miller
319fe95d08 Make user_cwd const since it is either a string literal or passed
in from the front-end.
2012-10-24 16:32:43 -04:00
Todd C. Miller
8aca292b23 sudo 1.8.7 2012-10-24 16:29:13 -04:00
Todd C. Miller
4134b24ec2 Avoid nested strtok() calls. 2012-10-24 14:24:36 -04:00
Todd C. Miller
2b23d2b12c Move expand_prompt() into its own source file for easier unit testing. 2012-10-23 14:27:52 -04:00
Todd C. Miller
0a7af23038 Make check.c independent of the underlying timestamp implementation. 2012-10-23 14:16:57 -04:00
Todd C. Miller
fb037caffc Add SUDOERS_NO_SEQ define to allow ${seq} to be disabled. 2012-10-23 11:57:07 -04:00
Todd C. Miller
3442a0aeae Use a list for the possible values of Tag_Spec with a minimal indent
to improve readability.  In the pod version, these were =head3.
Also use .St -p1003.1 instead of just POSIX when talking about
glob() and fnmatch().
2012-10-23 10:21:24 -04:00
Todd C. Miller
84eedd3f79 sudo_ttyname_dev() is unused if there is no /proc or sysctl(). 2012-10-02 15:29:52 -04:00
Todd C. Miller
a3a1574cdf Explicitly mark main() as public in executables to avoid an HP-UX
ld warning.
2012-10-02 15:08:02 -04:00
Todd C. Miller
09140fd1a0 Remove grep from SEE ALSO section. 2012-10-02 15:07:11 -04:00
Todd C. Miller
1cf3def4be If vasprintf() fails, just use the errno it sets instead of assuming
ENOMEM.
2012-10-02 14:45:18 -04:00
Todd C. Miller
acb9c62987 Mention HP-UX pam.conf settings. 2012-09-28 09:05:31 -04:00
Todd C. Miller
0fa33ccf0f Split off timestamp functions into their own source file. 2012-09-27 10:21:13 -04:00
Todd C. Miller
05896f9cfc Mention how !foo is not the same as ALL,!foo 2012-09-26 14:55:18 -04:00
Todd C. Miller
592f6fefb0 Start commands in the background when I/O logging is enabled. We
can't do this on Mac OS X due to a kernel bug in tc[gs]etattr(2)
which returns EINTR on signal instead of restarting automatically.
2012-09-25 13:49:51 -04:00
Todd C. Miller
616d713e9b Handle SIGCONT_FG and SIGCONT_BG when converting signal number to
string in deliver_signal().
2012-09-25 13:31:20 -04:00
Todd C. Miller
0e94e8ca91 Fix running commands that need the terminal in the background when
I/O logging is enabled.  E.g. "sudo vi &".  When the command is
foregrounded, it will now resume properly.
2012-09-24 15:06:14 -04:00
Todd C. Miller
6a25affb47 Add rudimentary support for name-based matching as a compile-time
option.  This unsafe when used in conjunction with the '!' operator.
2012-09-24 10:09:41 -04:00
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