Commit Graph

42 Commits

Author SHA1 Message Date
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
f454727bb8 Merge compat.h and missing.h into missing.h 2010-08-16 14:05:44 -04:00
Todd C. Miller
092a6935e1 Install binary files with -b~ to make a backup.
Fixes "text file busy" error on HP-UX during install.
2010-07-23 11:23:53 -04:00
Todd C. Miller
a33996e740 install-man -> install-doc 2010-07-13 08:36:19 -04:00
Todd C. Miller
3f33f75b7a Add uninstall target 2010-07-07 11:42:36 -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
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
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
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
b628e15dc4 The sample plugin doesn't support being run with no args so return
a usage error in this case.
2010-05-21 14:56: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
3ac9aee52e If plugin sets "sudoedit=true" in the command info, enable
sudoedit mode even if not invoked as sudoedit.  This allows
a plugin to enable sudoedit when the user runs an editor.
2010-05-16 19:27:04 -04:00
Todd C. Miller
2d785a7953 Refactor common bits of check_policy and check_edit 2010-05-15 11:51:00 -04:00
Todd C. Miller
31087fdcd6 Add sudoedit support 2010-05-15 07:51:24 -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
d346e50903 Use angle brackets when including headers that can only be found when
an -I flag is specified.  The files in the compat dir could get away
with double quotes here but I've converted all the source files
to use angle brackets for consistency.
2010-04-30 15:13:47 -04:00
Todd C. Miller
5e9ec6a365 Fix building with non-BSD versions of make such as GNU make.
Requires VPATH support, which should be in any non-neolithic make.
2010-04-30 12:18:06 -04:00
Todd C. Miller
0c7e3235f6 Remove extraneous $srcdir and use more .c.lo and .c.o rules instead
of explicit rules in the dependency.
2010-04-30 11:14:31 -04:00
Todd C. Miller
43b6359df3 Fix out-of-tree builds 2010-04-04 14:01:21 -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
ba9d2f5bb6 Play more nicely with libtool and let it build libreplace (was libmissing)
for us.
2010-03-18 11:42:12 -04:00
Todd C. Miller
d1d6afaef0 Quiet a libtool warning 2010-03-15 07:01:51 -04:00
Todd C. Miller
b883670a32 Build libmissing in two flavors (one PIC one non-PIC) and link with the
appropriate one.
2010-03-14 18:01:17 -04:00
Todd C. Miller
6b4d97ebc3 Add strdup and strndup to compat 2010-03-12 17:11:11 -05:00
Todd C. Miller
8003cb2f33 Need to include compat.h before missing.h 2010-03-12 12:46:30 -05:00
Todd C. Miller
f211213dcb conversation function no longer puts a newline at the end of info
or error messages.
2010-03-09 19:20:01 -05:00
Todd C. Miller
b814a0d74f Add support to -u and -g flags
Check fmt_string retval
Add timeout for debugging purposes
2010-03-06 16:29:59 -05:00
Todd C. Miller
1e131d4278 Handle NULL reply from conversation function 2010-03-05 17:13:42 -05:00
Todd C. Miller
c81a62df34 Use $(OBJS) instead of sample_plugin.lo 2010-03-05 14:44:04 -05:00
Todd C. Miller
064eb35365 runas_user is in settings not user_info 2010-03-05 14:39:13 -05:00
Todd C. Miller
fac0743e8a include missing,h for vasprintf 2010-02-21 21:27:57 -05:00
Todd C. Miller
80fae46be8 Need to include limits.h 2010-02-21 21:19:07 -05:00
Todd C. Miller
7200af0ce1 Add missing compat bits 2010-02-21 21:15:38 -05:00
Todd C. Miller
b3176134cb compat files should not include sudo.h
wire up compat in sample plugin
2010-02-21 16:41:19 -05:00
Todd C. Miller
781a054ab9 Log input and output to temp files for proof of concept. 2010-02-21 14:19:22 -05:00
Todd C. Miller
3b354e36f3 Sample plugin demonstrating the sudo plugin API 2010-02-20 09:42:16 -05:00