Commit Graph

299 Commits

Author SHA1 Message Date
Todd C. Miller
9948dae706 Change I/O log API to pass in command info to the I/O log open function.
Add iolog_file and iolog_dir parameters to command info.
This allows the policy plugin to specify the I/O log pathname.
Add convenience functions for calling plugin functions that
handle ABI backwards compatibility.
2010-12-20 16:20:11 -05:00
Todd C. Miller
da67324b11 Declare innetgr() for HP-UX which is missing a declaration.
Declare domainname() for HP-UX and Solaris which are missing a declaration.
2010-09-13 11:52:46 -04:00
Todd C. Miller
10c3bb62c4 Make local includes consistent; use double quotes for local includes
except for generated ones where we use angle brackets.
Also g/c unused compat.h.
2010-09-07 16:45:19 -04:00
Todd C. Miller
0d935f8546 Move includes to the top of the file. 2010-09-03 19:28:42 -04:00
Todd C. Miller
f454727bb8 Merge compat.h and missing.h into missing.h 2010-08-16 14:05:44 -04:00
Todd C. Miller
8dd8aa000e Remove some obsolete configure tests, ancient Unix systems are no
longer supported.
2010-08-10 13:44:05 -04:00
Todd C. Miller
a33996e740 install-man -> install-doc 2010-07-13 08:36:19 -04:00
Todd C. Miller
7bcbce2078 Use http://rc.quest.com/topics/polypkg/ for packaging 2010-07-13 08:33:46 -04:00
Todd C. Miller
684d1fd9f7 Fix mkstemps() prototype 2010-07-09 10:22:20 -04:00
Todd C. Miller
ea4298bb54 Use mkstemps() instead of mkstemp() in sudoedit. This allows sudoedit
to preserve the file extension (if any) which may be used by the editor
(like emacs) to choose the editing mode.
2010-07-09 10:08:05 -04:00
Todd C. Miller
3f33f75b7a Add uninstall target 2010-07-07 11:42:36 -04:00
Todd C. Miller
e6b48d415c Replace built-in non-unix group support with a sudoers group plugin.
Include a sample plugin that can read Unix-format group files.
2010-07-02 11:11:25 -04:00
Todd C. Miller
30fe4a067c Set usrinfo for AIX
Set adminstrative domain for the process when looking up user's
    password or group info and when preparing for execve().
Include strings.h even if string.h exists since they may define
    different things.  Fixes warnings on AIX and others.
2010-06-29 13:08:05 -04:00
Todd C. Miller
b72a530fd0 Update copyright year 2010-06-14 12:19:49 -04:00
Todd C. Miller
047fc3876d Remove sigaction emulation
Use SA_INTERRUPT in sa_flags
2010-06-10 15:18:23 -04:00
Todd C. Miller
e54cfc9bd4 We don't use getgrouplist() at the moment so there's no need to
provide a compat version.
2010-06-10 15:12:37 -04:00
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
c5a6ca998a Move compat definition of NSIG to compat.h 2010-06-09 13:57: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
16da9fe800 No longer need NGROUPS_MAX define 2010-06-08 18:42:36 -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
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
8a8830e34f Substitute @SHELL@ into Makefiles 2010-05-21 21:29:44 -04:00
Todd C. Miller
a60f268a7c Install sudo_plugin.h as part of "make install" and make other install
targets callable from the top-level Makefile
2010-05-21 16:52:31 -04:00
Todd C. Miller
55ef027d88 Add argc and argv to I/O logger open function. 2010-05-17 10:38:56 -04:00
Todd C. Miller
fa717176b2 Remove check_sudoedit function pointer in struct sudo_policy.
Instead, sudo will set sudoedit=true in the settings array.
The plugin should check for this and modify argv_out as appropriate
in check_policy.
2010-05-17 10:25:27 -04:00
Todd C. Miller
d7f238ffaf Fix typo introduced in last commit 2010-05-14 16:49:22 -04:00
Todd C. Miller
553361aca0 Emulate seteuid using setreuid() or setresuid() as needed.
There are still a few places that call seteuid() directly.
2010-05-14 16:43:55 -04:00
Todd C. Miller
fdd28d411f Work in progress support for sudoedit. The actual interface used by the
plugin for sudoedit is likely to change.
2010-05-13 14:09:21 -04:00
Todd C. Miller
782f494003 Add separate I/O logging functions for tty in/out and stdin/stdout/stderr.
NOTE: stdin logging does not currently work and is disabled for now.
2010-05-05 07:29:28 -04:00
Todd C. Miller
9fbec34fed Add pointer to a printf like function to plugin open functon.
This can be used instead of the conversation function to display
info and error messages.
2010-05-04 19:17:31 -04:00
Todd C. Miller
4b04e875ed Move fileops.c defines and prototypes to filesops.h 2010-04-23 06:02:39 -04:00
Todd C. Miller
2bc52eb394 Add timercmp macro for systems without it 2010-04-22 10:37:20 -04:00
Todd C. Miller
b4a26b7691 Use timeval directly instead of converting to timespec when dealing
with file times and time of day.
2010-04-20 16:44:02 -04:00
Todd C. Miller
5770391ec4 No longer check for strdup or strndup for LIBOBJ replacement. 2010-04-05 19:47:49 -04:00
Todd C. Miller
8c91f0a30c Create our own sys_siglist for systems without it for use by strsignal() 2010-04-02 07:47:19 -04:00
Todd C. Miller
8db39a8586 Add checks for getgrset and getgrouplist and use replacement getgrouplist
if the system doesn't support it.
2010-03-22 08:25:30 -04:00
Todd C. Miller
eec5235d19 Rewrite compat/getprogname.c and add setprogname().
The progname is now passed to the plugin via the settings array.
2010-03-19 07:52:31 -04:00
Todd C. Miller
fdbc4ecffb Include stdarg.h for va_list rather than requiring all consumers of
missing.h to include stdarg.h themselves.
2010-03-18 08:58:31 -04:00
Todd C. Miller
b4f4afdf69 Pass in output function to lbuf_init() instead of writing to stdout.
A side effect is that the usage info can now go to stderr as it should.
2010-03-18 06:42:17 -04:00
Todd C. Miller
038ec569de Use number of tty columns that is passed in user_info instead of
getting it directly in the lbuf code.
2010-03-17 21:25:32 -04:00
Todd C. Miller
fc598f8e12 Add strdup and strndup and fix strsignal 2010-03-13 09:30:22 -05:00
Todd C. Miller
af62ffe6f1 Add definition of WCOREDUMP for systems without it. This is known
to work on AIX and SunOS 4, but may be incorrect on other systems
that lack WCOREDUMP.
2010-03-11 16:57:20 -05:00
Todd C. Miller
847a7c1b24 tq_remove not list_remove 2010-03-06 14:28:26 -05:00
Todd C. Miller
76c90bc301 Add estrndup() 2010-02-28 15:09:50 -05:00
Todd C. Miller
25d3b4e51c Add tq_remove 2010-02-27 13:17:58 -05:00
Todd C. Miller
841807dd66 Convert to ANSI C 2010-02-27 09:26:43 -05:00
Todd C. Miller
90c06ad7f2 Sudo plugin API 2010-02-20 09:30:27 -05:00
Todd C. Miller
e90fa482f9 Rework source layout in preparation for modular sudo. 2010-02-20 09:14:01 -05:00