Commit Graph

5555 Commits

Author SHA1 Message Date
Todd C. Miller
caefd1abdc In handle_signals(), restart the read() on EINTR to make sure we keep up
with the signal pipe.  Don't return -1 on EAGAIN, it just means we have
emptied the pipe.
2011-03-09 11:28:51 -05:00
Todd C. Miller
da24fe8c3b Reorder functions to quiet a compiler warning. 2011-03-09 11:22:34 -05:00
Todd C. Miller
1c633bb2bb Use the Sun Studio C compiler on Solaris if possible 2011-03-09 11:22:09 -05:00
Todd C. Miller
206f5ff313 Fix default setting of osversion variable. 2011-03-08 16:09:48 -05:00
Todd C. Miller
32cfe08a12 Make two login_class entris consistent. 2011-03-08 15:38:06 -05:00
Todd C. Miller
1496bfed6c Add support for adding a utmp entry when allocating a new pty.
Requires the BSD login(3) or SYSV/POSIX getutent()/getutxent().
Currently only creates a new entry if the existing tty has
a utmp entry.
2011-03-08 15:37:40 -05:00
Todd C. Miller
9c9c0223e6 Avoid pulling in headers we don't need on Linux
For getutx?id(), call setutx?ent() first and always call endutx?ent().
2011-03-08 15:34:34 -05:00
Todd C. Miller
2241947b38 Add some more libs to SUDOERS_LIBS instead of relying on them to be
pulled in by SUDO_LIBS.
2011-03-08 09:46:35 -05:00
Todd C. Miller
d6252de205 Fix return value of "sudo -l command" when command is not allowed, broken
in [c7097ea22111].  The default return value is now TRUE and a bad:
label is used when permission is denied.  Also fixed missing permissions
restoration on certain errors.  On error()/errorx(), the password and
group files are now closed before returning.
2011-03-08 09:38:21 -05:00
Todd C. Miller
47968912a2 Fix passing of login class back to sudo front end. 2011-03-07 16:55:08 -05:00
Todd C. Miller
7e10987348 Add --osversion flag to specify OS instead of running "pp --probeonly" 2011-03-07 10:34:47 -05:00
Todd C. Miller
b54425e041 Fix expr usage w/ GNU expr 2011-03-07 10:08:21 -05:00
Todd C. Miller
e65bc35c6d Fix exit value for validate and list mode. 2011-03-06 15:52:40 -05:00
Todd C. Miller
a0ba308694 Fix non-interactive mode with sudoers plugin. 2011-03-06 15:38:02 -05:00
Todd C. Miller
6968367cb1 sudoreplay can now find IDs other than %{seq} and display the session. 2011-03-05 15:34:30 -05:00
Todd C. Miller
85e8e584ae Add support for replaying sessions when iolog_file is set to something
other than %{seq}.
2011-03-04 20:10:44 -05:00
Todd C. Miller
f5e356ed40 If we are killed by a signal, display the name of the signal that got us. 2011-03-04 16:12:40 -05:00
Todd C. Miller
3cc46dd70a Move libs used for authentication from SUDO_LIBS to SUDOERS_LIBS
where they belong.
2011-03-04 08:26:48 -05:00
Todd C. Miller
06a39eefb9 Fix bug in skey/opie check that could cause a shell warning. 2011-03-04 08:22:35 -05:00
Todd C. Miller
95512ae05e No longer need sudo_getepw() stubs. 2011-03-04 08:08:22 -05:00
Todd C. Miller
8ee8a0d87a Fix exit value of "sudo -l command" in sudoers module. 2011-03-03 09:38:15 -05:00
Todd C. Miller
ca86faac93 Use fgets() not fgetln() for portability. 2011-03-02 12:39:11 -05:00
Todd C. Miller
9d7a12e752 Don't use the beta or release candidate version as the rpm release. 2011-03-02 12:28:05 -05:00
Todd C. Miller
4333b06914 version 1.8.0 2011-02-25 14:57:18 -05:00
Todd C. Miller
c30fecb830 update sudo 1.8 section 2011-02-25 13:39:28 -05:00
Todd C. Miller
4688f1ce60 fix test description 2011-02-23 15:39:24 -05:00
Todd C. Miller
a64bd36b33 convert test2 to use testsudoers 2011-02-23 15:26:13 -05:00
Todd C. Miller
e558b79e85 Move struct generic_plugin to sudo_plugin_int.h 2011-02-23 15:12:04 -05:00
Todd C. Miller
3c0672e2e3 Allow sudoers file name, mode, uid and gid to be specified in the
settings list.  The sudo front end does not currently set these
but may in the future.
2011-02-23 13:38:52 -05:00
Todd C. Miller
74c4252c1b 1.8.0rc1 2011-02-21 13:36:24 -05:00
Todd C. Miller
59515a4a6d add help text to sudo, visudo and sudoreplay for the -h option 2011-02-21 11:33:36 -05:00
Todd C. Miller
7b622a8ca1 avoid using "howmany" for a parameter name since it is a select-related macro 2011-02-19 18:53:28 -05:00
Todd C. Miller
315e54fd61 mention group_plugin when describing nonunix_group 2011-02-19 18:40:00 -05:00
Todd C. Miller
0122e3be28 Add missing period at end of sentence 2011-02-19 18:39:27 -05:00
Todd C. Miller
435e44808d add localstatedir; closes bug 471 2011-02-19 08:29:21 -05:00
Todd C. Miller
39d9feb438 The howmany macro lives in sys/sysmacros.h on SVR5 systems
Closes Bug 470
2011-02-19 08:23:46 -05:00
Todd C. Miller
6e312fee09 add missing AH_TEMPLATE for ENV_RESET 2011-02-19 08:22:32 -05:00
Todd C. Miller
a099aa7f2a SVR5 systems return non-zero for success on socketpair(),
check for -1 instead.  Closes Bug 469
2011-02-19 08:13:17 -05:00
Todd C. Miller
554833c587 1.8.0b5 2011-02-16 12:22:56 -05:00
Todd C. Miller
6983d782c1 regen 2011-02-16 12:22:38 -05:00
Todd C. Miller
b0d0e163c3 Document that a sudo.conf file with no Pligin lines uses the default
sudoers plugins.
2011-02-16 12:22:31 -05:00
Todd C. Miller
011ba5511f If sudo.conf contains no Plugin lines, use the default sudoers
policy and I/O plugins.
2011-02-16 12:15:46 -05:00
Todd C. Miller
c3d795ff95 Avoid printing empty "Runas and Command-specific defaults for user"
line.
2011-02-14 11:29:20 -05:00
Todd C. Miller
151af93022 Truncate the buffer at buf.len before printing in the non-wordwrap case. 2011-02-14 11:28:44 -05:00
Todd C. Miller
ec00a1b588 Remove extra newline when the tty width is very small or unavailable 2011-02-14 11:04:24 -05:00
Todd C. Miller
289afc301e Remove unneeded variable. 2011-02-11 09:47:23 -05:00
Todd C. Miller
d661058389 Prefer getutxid over getutid 2011-02-09 15:11:52 -05:00
Todd C. Miller
63449de859 Include utmp.h / utmpx.h before missing.h as apparently including it
afterwards causes a compilation problem on GNU Hurd.
2011-02-09 15:09:57 -05:00
Todd C. Miller
4294650039 #include "foo.h", not <foo.h> for local includes. 2011-02-07 10:51:43 -05:00
Todd C. Miller
2d88a09883 remove bogus XXX 2011-02-07 10:51:14 -05:00