Todd C. Miller
e146aaaa29
Fix visiblepw sudoers option; the plugin API portion still needs documenting
2010-06-10 15:02:32 -04:00
Todd C. Miller
879d01796c
Print sudo version as well.
2010-06-10 14:25:25 -04:00
Todd C. Miller
b91b65722b
Store askpass path in a global instead of uses setenv() which many
...
systems lack.
2010-06-10 12:03:40 -04:00
Todd C. Miller
eec336115a
Move askpass path specification from sudoers to sudo.conf.
2010-06-09 17:40:44 -04:00
Todd C. Miller
34613c8465
Use a flag bit in struct command_details for selinux instead of a separate
...
field.
2010-06-09 16:25:44 -04:00
Todd C. Miller
4c1ef12648
Implement background mode. If I/O logging we use pipes instead of a pty.
2010-06-09 16:19:45 -04:00
Todd C. Miller
c5a6ca998a
Move compat definition of NSIG to compat.h
2010-06-09 13:57:07 -04:00
Todd C. Miller
474392821e
Set _PATH_SUDO_CONF based on $(sysconfdir)
2010-06-09 12:24:37 -04:00
Todd C. Miller
e5283b2f96
Require POSIX termios to build sudo
2010-06-09 11:09:55 -04:00
Todd C. Miller
82a56e421f
Ignore SIGPIPE for "sudo -S"
2010-06-09 10:59:51 -04:00
Todd C. Miller
afb3f9dbf5
Fix uninitialized variable in TGP_ECHO case and print a newline if
...
the user interrupted password input.
2010-06-09 10:52:02 -04:00
Todd C. Miller
3e9ecaf1ec
Make TGP_ECHO override TGP_MASK and don't try to restore the terminal
...
if we didn't modify it.
2010-06-09 10:45:07 -04:00
Todd C. Miller
a4a6620b24
Add SUDO_CONV_PROMPT_MASK define which corresponds to the "pwfeedback"
...
sudoers option. Do not disable echo if TGP_ECHO is set.
2010-06-09 10:31:05 -04:00
Todd C. Miller
51f70f2040
Use POSIX tcgetpgrp() instead of BSD TIOCGPGRP ioctl
2010-06-09 09:54:58 -04:00
Todd C. Miller
edd34a2d7e
Add selinux_enabled flag into struct command_details and
...
set it in command_info_to_details().
Return an error from selinux_setup() instead of exiting.
Call selinux_setup() from exec_setup().
2010-06-08 17:59:18 -04:00
Todd C. Miller
ecfb70b056
Remove commented out copy of old sudo_execve() function.
2010-06-09 09:22:44 -04:00
Todd C. Miller
79f178923e
Replace timerfoo macros with timevalfoo since the timer macros are known
...
to be busted on some systems.
2010-06-08 18:38:23 -04:00
Todd C. Miller
0be6bab05c
Remove duplicate call to selinux_setup().
2010-06-08 16:16:08 -04:00
Todd C. Miller
6717c59d77
Split exec.c into exec.c and exec_pty.c
2010-06-07 18:06:22 -04:00
Todd C. Miller
d6e7face2b
Rename pty.c -> get_pty.c
2010-06-07 11:13:03 -04:00
Todd C. Miller
5aa2c7dcc6
uid -> ttyuid
2010-06-04 14:20:03 -04:00
Todd C. Miller
e3ac18f510
Remove unneeded endpwent()/endgrent()
2010-06-04 12:11:02 -04:00
Todd C. Miller
3fbd834783
Add missing const to I/O log action function
2010-06-04 09:10:05 -04:00
Todd C. Miller
cd26d2891d
Unbreak the non-io logging case.
2010-06-02 14:23:38 -04:00
Todd C. Miller
2b8fc46e2c
Fix symbol name conflict with sudo_printf.
2010-06-02 11:10:04 -04:00
Todd C. Miller
1eafb30a44
Fix a bug where we could treat EAGAIN as a permanent error.
...
Also set cstat if perform_io() returns an error.
2010-06-01 10:58:11 -04:00
Todd C. Miller
73b630fa97
Completely remove the -L flag from the sudo front end.
2010-05-28 17:37:36 -04:00
Todd C. Miller
d2d68aa24d
Re-enable cleanup functions in sudoers plugin and sudo driver
...
for error()/errorx().
2010-05-28 12:15:14 -04:00
Todd C. Miller
303d856065
Minor Makefile cleanup: fix a typo, change the removal order in
...
the clean targets, and remove a superfluous include path for
the sudoers plugin.
2010-05-28 10:41:58 -04:00
Todd C. Miller
62f470a575
Link libcommon before libreplace since libcommon may use functions
...
only present in libreplace.
2010-05-27 17:48:17 -04:00
Todd C. Miller
b8b006a885
Move code common to sudo and the sudoers plugin to a convenience library,
...
libcommon. Removes the need to make links in the sudoers plugin dir
and reduces re-compilation of duplicate object files.
2010-05-27 17:27:36 -04:00
Todd C. Miller
9773ba3f79
Rename script_execve to sudo_execve and rename script_foo in exec.c
2010-05-27 16:46:31 -04:00
Todd C. Miller
4248a11ef7
rename script.c exec.c and fix up the MANIFEST file
2010-05-27 16:32:41 -04:00
Todd C. Miller
f8f82ffa8e
Rename script_setup() to pty_setup() and call from script_execve()
...
directly.
2010-05-27 16:29:48 -04:00
Todd C. Miller
7e6d1d1f7d
Add init_session function to struct policy_plugin that gets called
...
before the uid/gid/etc changes. A struct passwd pointer is passed in,which may be NULL if the user does not exist in the passwd database.The sudoers module uses init_session to open the pam session as needed.
2010-05-27 14:46:39 -04:00
Todd C. Miller
efa908448d
Now that we defer sending cstat until the end of script_child()
...
we cannot reuse cstat when reading command status from parent.
2010-05-26 11:19:17 -04:00
Todd C. Miller
2942edcbd0
Rework SELinux support.
2010-05-25 11:00:39 -04:00
Todd C. Miller
5f857e6e54
Make SELinux support compile again. Needs more work to be complete.
2010-05-24 18:18:50 -04:00
Todd C. Miller
0487aee6b4
Bring back closefrom settings.
2010-05-24 15:40:36 -04:00
Todd C. Miller
8a8830e34f
Substitute @SHELL@ into Makefiles
2010-05-21 21:29:44 -04:00
Todd C. Miller
51b558e753
Update to libtool-2.2.6b. I haven't made any local modifications
...
this time, which should be OK since we install sudo_noexec.so by
hand now.
2010-05-21 17:59:47 -04:00
Todd C. Miller
6b370cb020
Use libtool to clean objects
2010-05-21 16:53:21 -04:00
Todd C. Miller
95d939f9bb
Install sudo_plugin.h as part of "make install" and make other install
...
targets callable from the top-level Makefile
2010-05-21 15:31:36 -04:00
Todd C. Miller
16c2769ed9
Close the I/O pipes aftering dup2()ing them to std{in,out,err}.
...
Fixes extra fds being present in the command when it is part of a pipeline.
2010-05-21 14:50:26 -04:00
Todd C. Miller
064cffd575
Cosmetic changes:
...
add comments, remove orphaned prototype and make a global static.
2010-05-21 12:01:11 -04:00
Todd C. Miller
a9a16d7331
Move check for maxfd == -1 to flush_output where it belongs.
2010-05-20 17:34:53 -04:00
Todd C. Miller
d18b458e1f
Break out of select loop if all the fds we want to select on are -1.
2010-05-20 17:13:22 -04:00
Todd C. Miller
20c125297f
Avoid possible malloc(0) if plugin returns an empty groups list.
2010-05-20 17:10:16 -04:00
Todd C. Miller
9360e67a3d
Add debugging info when calling plugin close function
2010-05-20 17:01:53 -04:00
Todd C. Miller
882fe3ac41
Avoid closing stdin/stdout/stderr when we are piping output.
2010-05-20 17:01:27 -04:00