]> granicus.if.org Git - sudo/log
sudo
14 years agoterm.c does not needto include sudo.h
Todd C. Miller [Sun, 21 Mar 2010 16:57:00 +0000 (12:57 -0400)]
term.c does not needto include sudo.h

14 years agoDocument the -2 return in the check_policy section too
Todd C. Miller [Sun, 21 Mar 2010 12:58:13 +0000 (08:58 -0400)]
Document the -2 return in the check_policy section too

14 years agoFix the -s and -i flags and add support for the "implied_shell"
Todd C. Miller [Sun, 21 Mar 2010 12:54:06 +0000 (08:54 -0400)]
Fix the -s and -i flags and add support for the "implied_shell"
option.  If the user does not specify a command, sudo will now pass
in the path to the user's shell and set impied_shell=true.  The
plugin can them either check the command normally or return -2 to
cause sudo to print a usage message and exit.

14 years agoBring back SUDOERS_PLUGIN but add .dylib -> .so conversion for
Todd C. Miller [Sat, 20 Mar 2010 00:01:00 +0000 (20:01 -0400)]
Bring back SUDOERS_PLUGIN but add .dylib -> .so conversion for
Darwin where libraries end in .dylib but modules end in .so

14 years agoBetter prefix determination now that we can't rely on len==0 to
Todd C. Miller [Fri, 19 Mar 2010 12:17:58 +0000 (08:17 -0400)]
Better prefix determination now that we can't rely on len==0 to
tell the beginning on an entry.

14 years agodisplay_bound_defaults() stub should return 0, not 1 since it is a count,
Todd C. Miller [Fri, 19 Mar 2010 12:17:09 +0000 (08:17 -0400)]
display_bound_defaults() stub should return 0, not 1 since it is a count,
not a boolean.

14 years agoDocument progname in settings
Todd C. Miller [Fri, 19 Mar 2010 11:56:06 +0000 (07:56 -0400)]
Document progname in settings

14 years agoRewrite compat/getprogname.c and add setprogname().
Todd C. Miller [Fri, 19 Mar 2010 11:52:31 +0000 (07:52 -0400)]
Rewrite compat/getprogname.c and add setprogname().
The progname is now passed to the plugin via the settings array.

14 years agoFix --with-ldap
Todd C. Miller [Fri, 19 Mar 2010 11:32:14 +0000 (07:32 -0400)]
Fix --with-ldap

14 years agoAdd missing whitespace for Runas and Command-specific defaults
Todd C. Miller [Fri, 19 Mar 2010 11:31:42 +0000 (07:31 -0400)]
Add missing whitespace for Runas and Command-specific defaults

14 years agoUse embedded newlines in lbuf instead of multiple calls to lbuf_print.
Todd C. Miller [Fri, 19 Mar 2010 11:04:34 +0000 (07:04 -0400)]
Use embedded newlines in lbuf instead of multiple calls to lbuf_print.

14 years agoAdd support for embedded newlines.
Todd C. Miller [Fri, 19 Mar 2010 10:59:02 +0000 (06:59 -0400)]
Add support for embedded newlines.

14 years agoIf system doesn't support getprogname or __programe and we are
Todd C. Miller [Thu, 18 Mar 2010 17:53:12 +0000 (13:53 -0400)]
If system doesn't support getprogname or __programe and we are
building a shared object don't bother with Argc/Argv, just
return "sudo"

14 years agoHard-code sudoers.so instead of using SUDOERS_PLUGIN since libtool
Todd C. Miller [Thu, 18 Mar 2010 16:02:05 +0000 (12:02 -0400)]
Hard-code sudoers.so instead of using SUDOERS_PLUGIN since libtool
appears to always install a shared object with the .so suffix.

14 years agoPlay more nicely with libtool and let it build libreplace (was libmissing)
Todd C. Miller [Thu, 18 Mar 2010 15:42:12 +0000 (11:42 -0400)]
Play more nicely with libtool and let it build libreplace (was libmissing)
for us.

14 years agoInclude stdarg.h for va_list rather than requiring all consumers of
Todd C. Miller [Thu, 18 Mar 2010 12:58:31 +0000 (08:58 -0400)]
Include stdarg.h for va_list rather than requiring all consumers of
missing.h to include stdarg.h themselves.

14 years agoPass in output function to lbuf_init() instead of writing to stdout.
Todd C. Miller [Thu, 18 Mar 2010 10:42:17 +0000 (06:42 -0400)]
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.

14 years agoUse number of tty columns that is passed in user_info instead of
Todd C. Miller [Thu, 18 Mar 2010 01:25:32 +0000 (21:25 -0400)]
Use number of tty columns that is passed in user_info instead of
getting it directly in the lbuf code.

14 years agoKill __P in sudoers
Todd C. Miller [Wed, 17 Mar 2010 23:56:27 +0000 (19:56 -0400)]
Kill __P in sudoers

14 years agoSet the sudoers plugin name in configure so we get the extension right.
Todd C. Miller [Wed, 17 Mar 2010 22:48:19 +0000 (18:48 -0400)]
Set the sudoers plugin name in configure so we get the extension right.

14 years agoDocument lines/cols in user_info
Todd C. Miller [Wed, 17 Mar 2010 14:44:16 +0000 (10:44 -0400)]
Document lines/cols in user_info

14 years agoAdd tty size to user info
Todd C. Miller [Wed, 17 Mar 2010 14:36:02 +0000 (10:36 -0400)]
Add tty size to user info

14 years agoUse TIOCGSIZE/TIOCSSIZE instead of TIOCGWINSZ/TIOCSWINSZ
Todd C. Miller [Wed, 17 Mar 2010 12:36:17 +0000 (08:36 -0400)]
Use TIOCGSIZE/TIOCSSIZE instead of TIOCGWINSZ/TIOCSWINSZ

14 years agoKill dead code
Todd C. Miller [Tue, 16 Mar 2010 12:50:03 +0000 (08:50 -0400)]
Kill dead code
Add missing sigsetjmp in sudo_policy_invalidate
Error out if we fail to lookup the user's name that is passed in

14 years agoPass the error value back via siglongjmp.
Todd C. Miller [Tue, 16 Mar 2010 12:41:36 +0000 (08:41 -0400)]
Pass the error value back via siglongjmp.

14 years agoUse conversation function for lecture.
Todd C. Miller [Tue, 16 Mar 2010 11:41:41 +0000 (07:41 -0400)]
Use conversation function for lecture.

14 years agoDon't update ticket file if verify_user returns FALSE.
Todd C. Miller [Tue, 16 Mar 2010 11:13:57 +0000 (07:13 -0400)]
Don't update ticket file if verify_user returns FALSE.

14 years agoWire up invalidate and validate methods for sudoers
Todd C. Miller [Tue, 16 Mar 2010 00:24:55 +0000 (20:24 -0400)]
Wire up invalidate and validate methods for sudoers

14 years agoAdd support for -k flag with a command.
Todd C. Miller [Mon, 15 Mar 2010 23:41:15 +0000 (19:41 -0400)]
Add support for -k flag with a command.

14 years agoAllow -k to be specified with a command.
Todd C. Miller [Mon, 15 Mar 2010 23:40:15 +0000 (19:40 -0400)]
Allow -k to be specified with a command.

14 years agoWire up policy_list
Todd C. Miller [Mon, 15 Mar 2010 22:13:58 +0000 (18:13 -0400)]
Wire up policy_list

14 years agoAdd newline at the end of message and space after the colon in warning message
Todd C. Miller [Mon, 15 Mar 2010 22:13:31 +0000 (18:13 -0400)]
Add newline at the end of message and space after the colon in warning message

14 years agoAdd missing newline after pass password warning
Todd C. Miller [Mon, 15 Mar 2010 22:13:06 +0000 (18:13 -0400)]
Add missing newline after pass password warning

14 years agoSet user_groups and user_ngroups based on user_info
Todd C. Miller [Mon, 15 Mar 2010 21:07:10 +0000 (17:07 -0400)]
Set user_groups and user_ngroups based on user_info

14 years agoMake this compile
Todd C. Miller [Mon, 15 Mar 2010 17:42:40 +0000 (13:42 -0400)]
Make this compile

14 years agoMake _warning in error.c use the conversation function and remove
Todd C. Miller [Mon, 15 Mar 2010 11:14:45 +0000 (07:14 -0400)]
Make _warning in error.c use the conversation function and remove
commented out warning/warningx in sudoers.c.

14 years agoUse siglongjmp() in log_error for fatal errors
Todd C. Miller [Mon, 15 Mar 2010 11:06:11 +0000 (07:06 -0400)]
Use siglongjmp() in log_error for fatal errors

14 years agoQuiet a libtool warning
Todd C. Miller [Mon, 15 Mar 2010 11:01:51 +0000 (07:01 -0400)]
Quiet a libtool warning

14 years agoBuild sudoers plugin
Todd C. Miller [Mon, 15 Mar 2010 14:44:19 +0000 (10:44 -0400)]
Build sudoers plugin

14 years agoUse warningx in yyerror() so the conversation function gets used
Todd C. Miller [Mon, 15 Mar 2010 14:44:06 +0000 (10:44 -0400)]
Use warningx in yyerror() so the conversation function gets used
when built as part of sudoers.

14 years agoRename sudo_conv to conversation to avoid a namespace conflict.
Todd C. Miller [Mon, 15 Mar 2010 00:47:56 +0000 (20:47 -0400)]
Rename sudo_conv to conversation to avoid a namespace conflict.

14 years agoInitial bits of sudoers plugin; still needs work.
Todd C. Miller [Sun, 14 Mar 2010 23:58:47 +0000 (19:58 -0400)]
Initial bits of sudoers plugin; still needs work.

14 years agoAdd HAVE_STRDUP and HAVE_STRNDUP
Todd C. Miller [Sun, 14 Mar 2010 22:05:23 +0000 (18:05 -0400)]
Add HAVE_STRDUP and HAVE_STRNDUP

14 years agoBuild libmissing in two flavors (one PIC one non-PIC) and link with the
Todd C. Miller [Sun, 14 Mar 2010 22:05:00 +0000 (18:05 -0400)]
Build libmissing in two flavors (one PIC one non-PIC) and link with the
appropriate one.

14 years agoBuild libmissing in two flavors (one PIC one non-PIC) and link with the
Todd C. Miller [Sun, 14 Mar 2010 22:01:17 +0000 (18:01 -0400)]
Build libmissing in two flavors (one PIC one non-PIC) and link with the
appropriate one.

14 years agoAdd strdup and strndup and fix strsignal
Todd C. Miller [Sat, 13 Mar 2010 14:30:22 +0000 (09:30 -0500)]
Add strdup and strndup and fix strsignal

14 years agoAdd strdup and strndup to compat
Todd C. Miller [Fri, 12 Mar 2010 22:11:11 +0000 (17:11 -0500)]
Add strdup and strndup to compat

14 years agoNeed to include compat.h before missing.h
Todd C. Miller [Fri, 12 Mar 2010 17:46:30 +0000 (12:46 -0500)]
Need to include compat.h before missing.h

14 years agoMust check HAVE_DECL_SYS_SIGLIST == 1 (not just if defined) since
Todd C. Miller [Fri, 12 Mar 2010 17:43:03 +0000 (12:43 -0500)]
Must check HAVE_DECL_SYS_SIGLIST == 1 (not just if defined) since
if it doesn't exist configure will set it to 0.

14 years agoFix botched ANSI C coversion of globexp2()
Todd C. Miller [Fri, 12 Mar 2010 17:40:00 +0000 (12:40 -0500)]
Fix botched ANSI C coversion of globexp2()

14 years agoRemove redundant getgroups check
Todd C. Miller [Fri, 12 Mar 2010 17:39:04 +0000 (12:39 -0500)]
Remove redundant getgroups check

14 years agoRequire either termios or termio, no more sgtty.
Todd C. Miller [Fri, 12 Mar 2010 16:45:57 +0000 (11:45 -0500)]
Require either termios or termio, no more sgtty.

14 years agoChange the sys_siglist check to use AC_CHECK_DECLS and also check
Todd C. Miller [Fri, 12 Mar 2010 10:26:01 +0000 (05:26 -0500)]
Change the sys_siglist check to use AC_CHECK_DECLS and also check
for _sys_siglist and__sys_siglist

14 years agoChange SUDO_LDFLAGS to SUDOERS_LDFLAGS and add SUDOERS_OBJS.
Todd C. Miller [Thu, 11 Mar 2010 22:21:34 +0000 (17:21 -0500)]
Change SUDO_LDFLAGS to SUDOERS_LDFLAGS and add SUDOERS_OBJS.
We now use SUDO_OBJS for the main driver as part of OBJS.

14 years agoMention in the conversation function section that a newline is
Todd C. Miller [Thu, 11 Mar 2010 22:02:23 +0000 (17:02 -0500)]
Mention in the conversation function section that a newline is
not implicit.

14 years agoAdd definition of WCOREDUMP for systems without it. This is known
Todd C. Miller [Thu, 11 Mar 2010 21:57:20 +0000 (16:57 -0500)]
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.

14 years agoconversation function no longer puts a newline at the end of info
Todd C. Miller [Wed, 10 Mar 2010 00:20:01 +0000 (19:20 -0500)]
conversation function no longer puts a newline at the end of info
or error messages.

14 years agoUse parent process group id instead of parent process id when checking
Todd C. Miller [Sun, 7 Mar 2010 12:45:17 +0000 (07:45 -0500)]
Use parent process group id instead of parent process id when checking
foreground status and suspending parent.  Fixes an issue when running
commands under /usr/bin/time and others.

14 years agotranscript option is now --with not --enable
Todd C. Miller [Sat, 6 Mar 2010 21:31:10 +0000 (16:31 -0500)]
transcript option is now --with not --enable

14 years agoAdd support to -u and -g flags
Todd C. Miller [Sat, 6 Mar 2010 21:29:59 +0000 (16:29 -0500)]
Add support to -u and -g flags
Check fmt_string retval
Add timeout for debugging purposes

14 years agoWire up SIGALRM handler
Todd C. Miller [Sat, 6 Mar 2010 19:34:23 +0000 (14:34 -0500)]
Wire up SIGALRM handler
Set close on exec flag for child side of the socketpair
Fix signal handling when not doing I/O logging

14 years agog/c unused SIGCHLD handler
Todd C. Miller [Sat, 6 Mar 2010 19:29:32 +0000 (14:29 -0500)]
g/c unused SIGCHLD handler

14 years agoDon't use emalloc() in fmt_string(); we want to be able to use it from
Todd C. Miller [Sat, 6 Mar 2010 19:29:04 +0000 (14:29 -0500)]
Don't use emalloc() in fmt_string(); we want to be able to use it from
a plugin.

14 years agotq_remove not list_remove
Todd C. Miller [Sat, 6 Mar 2010 19:28:26 +0000 (14:28 -0500)]
tq_remove not list_remove

14 years agoAUTH_OBJS should contain .lo files not .o files.
Todd C. Miller [Sat, 6 Mar 2010 12:36:02 +0000 (07:36 -0500)]
AUTH_OBJS should contain .lo files not .o files.

14 years agoSimplify conversion of command line args to name=value pairs.
Todd C. Miller [Fri, 5 Mar 2010 22:14:19 +0000 (17:14 -0500)]
Simplify conversion of command line args to name=value pairs.

14 years agoHandle NULL reply from conversation function
Todd C. Miller [Fri, 5 Mar 2010 22:13:42 +0000 (17:13 -0500)]
Handle NULL reply from conversation function

14 years agoDon't depend on emalloc/erealloc
Todd C. Miller [Fri, 5 Mar 2010 21:52:04 +0000 (16:52 -0500)]
Don't depend on emalloc/erealloc

14 years agoUse $(OBJS) instead of sample_plugin.lo
Todd C. Miller [Fri, 5 Mar 2010 19:44:04 +0000 (14:44 -0500)]
Use $(OBJS) instead of sample_plugin.lo

14 years agorunas_user is in settings not user_info
Todd C. Miller [Fri, 5 Mar 2010 19:39:13 +0000 (14:39 -0500)]
runas_user is in settings not user_info

14 years agoFix a mismatch between sudo_settings and settings_pairs that causes
Todd C. Miller [Fri, 5 Mar 2010 19:38:42 +0000 (14:38 -0500)]
Fix a mismatch between sudo_settings and settings_pairs that causes
some settings to get the wrong values.

14 years agoConvert to ANSI C
Todd C. Miller [Fri, 5 Mar 2010 01:18:22 +0000 (20:18 -0500)]
Convert to ANSI C

14 years agoFix strlcpy() return value check.
Todd C. Miller [Thu, 4 Mar 2010 17:06:42 +0000 (12:06 -0500)]
Fix strlcpy() return value check.

14 years agoNo longer need to substitute in script.o and pty.o; I/O logging support
Todd C. Miller [Thu, 4 Mar 2010 13:12:36 +0000 (08:12 -0500)]
No longer need to substitute in script.o and pty.o; I/O logging support
is always built.

14 years agoAdd fallback to /bin/sh when execve() fails with ENOEXEC.
Todd C. Miller [Sun, 28 Feb 2010 20:10:18 +0000 (15:10 -0500)]
Add fallback to /bin/sh when execve() fails with ENOEXEC.

14 years agoAdd estrndup()
Todd C. Miller [Sun, 28 Feb 2010 20:09:50 +0000 (15:09 -0500)]
Add estrndup()

14 years agoRefactor script_execve() a bit so that it can be used in non-script
Todd C. Miller [Sat, 27 Feb 2010 21:53:56 +0000 (16:53 -0500)]
Refactor script_execve() a bit so that it can be used in non-script
mode.  Needs more cleanup.

14 years agoIgnore empty entries in command_info list
Todd C. Miller [Sat, 27 Feb 2010 18:36:30 +0000 (13:36 -0500)]
Ignore empty entries in command_info list

14 years agoAdd tq_remove
Todd C. Miller [Sat, 27 Feb 2010 18:17:58 +0000 (13:17 -0500)]
Add tq_remove

14 years agoPass timeout to tgetpass()
Todd C. Miller [Sat, 27 Feb 2010 17:39:18 +0000 (12:39 -0500)]
Pass timeout to tgetpass()

14 years agoAdd ChangeLog target
Todd C. Miller [Sat, 27 Feb 2010 17:37:49 +0000 (12:37 -0500)]
Add ChangeLog target

14 years agoBump version and update things slightly for sudo 1.8.0
Todd C. Miller [Sat, 27 Feb 2010 15:05:04 +0000 (10:05 -0500)]
Bump version and update things slightly for sudo 1.8.0

14 years agoSudo now requires an ANSI/ISO C compiler
Todd C. Miller [Sat, 27 Feb 2010 15:04:39 +0000 (10:04 -0500)]
Sudo now requires an ANSI/ISO C compiler

14 years agoConvert to ANSI C
Todd C. Miller [Sat, 27 Feb 2010 14:29:59 +0000 (09:29 -0500)]
Convert to ANSI C

14 years agoConvert to ANSI C
Todd C. Miller [Sat, 27 Feb 2010 14:26:43 +0000 (09:26 -0500)]
Convert to ANSI C

14 years agoConvert to ANSI C
Todd C. Miller [Sat, 27 Feb 2010 14:23:25 +0000 (09:23 -0500)]
Convert to ANSI C

14 years agoMake user_details extern so tgetpass can get at the uid and gid.
Todd C. Miller [Thu, 25 Feb 2010 00:53:45 +0000 (19:53 -0500)]
Make user_details extern so tgetpass can get at the uid and gid.
Set uid/gid to user before executing askpass program.
Check environment for SUDO_ASKPASS and use that if set.
TODO: a way for the policy to set the askpass program itself

14 years agoNo longer need sudo_usage.h in sudo.c
Todd C. Miller [Wed, 24 Feb 2010 12:49:16 +0000 (07:49 -0500)]
No longer need sudo_usage.h in sudo.c

14 years agoDocument -D level command line flag which maps to the debug_level setting.
Todd C. Miller [Wed, 24 Feb 2010 12:48:53 +0000 (07:48 -0500)]
Document -D level command line flag which maps to the debug_level setting.

14 years agoDocument debug_level in plugin doc. Still need to document the -D
Todd C. Miller [Wed, 24 Feb 2010 11:35:45 +0000 (06:35 -0500)]
Document debug_level in plugin doc.  Still need to document the -D
flag in sudo itself.

14 years agoinclude missing,h for vasprintf
Todd C. Miller [Mon, 22 Feb 2010 02:27:57 +0000 (21:27 -0500)]
include missing,h for vasprintf

14 years agoRename plugin.pod -> sudo_plugin.pod and wire into Makefile
Todd C. Miller [Mon, 22 Feb 2010 02:24:20 +0000 (21:24 -0500)]
Rename plugin.pod -> sudo_plugin.pod and wire into Makefile

14 years agoNeed to include limits.h
Todd C. Miller [Mon, 22 Feb 2010 02:19:07 +0000 (21:19 -0500)]
Need to include limits.h

14 years agoNo more sudo_getpw*
Todd C. Miller [Mon, 22 Feb 2010 02:18:52 +0000 (21:18 -0500)]
No more sudo_getpw*

14 years agoAdd missing compat bits
Todd C. Miller [Mon, 22 Feb 2010 02:15:38 +0000 (21:15 -0500)]
Add missing compat bits

14 years agocompat files should not include sudo.h
Todd C. Miller [Sun, 21 Feb 2010 21:41:19 +0000 (16:41 -0500)]
compat files should not include sudo.h
wire up compat in sample plugin

14 years agoFix up compat dependencies.
Todd C. Miller [Sun, 21 Feb 2010 21:12:01 +0000 (16:12 -0500)]
Fix up compat dependencies.
Fix distclean target in doc/Makefile.in

14 years agoFix typo
Todd C. Miller [Sun, 21 Feb 2010 20:32:59 +0000 (15:32 -0500)]
Fix typo

14 years agoLog input and output to temp files for proof of concept.
Todd C. Miller [Sun, 21 Feb 2010 19:19:22 +0000 (14:19 -0500)]
Log input and output to temp files for proof of concept.

14 years agoAdd doc Makefile.in and wire it up
Todd C. Miller [Sun, 21 Feb 2010 18:37:52 +0000 (13:37 -0500)]
Add doc Makefile.in and wire it up