Todd C. Miller [Thu, 28 Mar 2013 19:46:52 +0000 (15:46 -0400)]
Now that we can determine the terminal even when file descriptors
are redirected we can check user_ttypath rather than opening
/dev/tty when enforcing requiretty.
Todd C. Miller [Tue, 19 Mar 2013 15:52:54 +0000 (11:52 -0400)]
Add -R flags at the very end after configure link tests are done
since we can only count on libtool to accept -R, the compiler front
end may not.
Also unify the libldap and libibmldap tests using AC_SEARCH_LIBS
and check for -lCsup on HP-UX which is needed by libibmldap (but
is not an explicit dependency).
Todd C. Miller [Mon, 18 Mar 2013 13:27:07 +0000 (09:27 -0400)]
Replace --with-rpath and --with-blibpath with --disable-rpath.
Now that we use libtool for linking we can just use the -R
flag and have libtool translate it to the proper linker flag.
Todd C. Miller [Thu, 7 Mar 2013 20:41:34 +0000 (15:41 -0500)]
Convert efree() to a macro that just casts to void * and does free().
If the system free() can't handle free(NULL) this may crash but C89
was a long time ago.
Todd C. Miller [Wed, 6 Mar 2013 22:08:10 +0000 (17:08 -0500)]
Always install plugins with a .so extension regardless of what
extension the system uses for shared libraries. That way the
group_plugin sudoers setting can be shared between heterogenous
systems.
Todd C. Miller [Tue, 5 Mar 2013 19:06:51 +0000 (14:06 -0500)]
Make sure groupname_len is at least 32 just to be on the safe side.
It is better to allocate a little extra and not need it than to
have to reallocate and start over.
Todd C. Miller [Tue, 5 Mar 2013 15:18:32 +0000 (10:18 -0500)]
Add __malloc_like macro to apply __malloc__ attribute to emalloc,
ecalloc and estrdup. It cannot be applied to realloc since that
may return the same pointer.
Todd C. Miller [Tue, 5 Mar 2013 11:56:57 +0000 (06:56 -0500)]
When running the command in a pty, defer the call to exec_setup()
until just before we exec the command. This is consistent with the
non-pty path. As a side effect, the monitor process runs as root
and not the runas user.
Todd C. Miller [Sun, 24 Feb 2013 18:20:56 +0000 (13:20 -0500)]
Document that close and version be NULL for plugin API >= 1.3 and
that sudo may execute the command directly if there is no close,
or pty or timeout needed.
Todd C. Miller [Sun, 24 Feb 2013 10:54:57 +0000 (05:54 -0500)]
Dummy out close function if there is no end_session for the auth
method and the front-end can handle a NULL close function. Avoids
the extra sudo process when we don't actually need it.
Todd C. Miller [Sat, 23 Feb 2013 19:19:07 +0000 (14:19 -0500)]
If the policy plugin does not provide a close function, there is
no command timeout and no pty is required, skip the event loop and
just exec the command directly.
Todd C. Miller [Sat, 23 Feb 2013 18:53:48 +0000 (13:53 -0500)]
Do not crash if the plugin close and version functions are not
defined. If there is no policy close function, simply print a
warning that the command was not found.
Todd C. Miller [Thu, 21 Feb 2013 12:01:53 +0000 (07:01 -0500)]
Avoid calling realloc3() with a zero size parameter when all retrieved
sssd rules fail. Otherwise we'll get a run-time error due to
malloc(0) checking.
Todd C. Miller [Wed, 20 Feb 2013 20:09:21 +0000 (15:09 -0500)]
Make sudoers file long list output better match the format used by
ldap sudoers. Tags are now converted to options and there is a
single command per line.