Commit Graph

4952 Commits

Author SHA1 Message Date
Todd C. Miller
a72669d8a6 Set preserve_groups or groups list in command_info 2010-03-22 08:28:11 -04:00
Todd C. Miller
7af5cdfaf4 Fix setting of groups list 2010-03-22 08:26:05 -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
4b36657781 Pass in preserve_groups when the -P flag is specified as per the design 2010-03-22 08:11:06 -04:00
Todd C. Miller
0ea44bcba1 Check preserve_groups and ignore_ticket args with atobool instead
of assuming they are true if present.
2010-03-22 08:09:50 -04:00
Todd C. Miller
066e6a7e8f Rename plugin-specific error.c to plugin_error.c
Wire up visudo, sudoreplay and testsudoers in the build
2010-03-21 12:58:14 -04:00
Todd C. Miller
74ce00482f term.c does not needto include sudo.h 2010-03-21 12:57:00 -04:00
Todd C. Miller
9edc09609f Document the -2 return in the check_policy section too 2010-03-21 08:58:13 -04:00
Todd C. Miller
6b180d24da 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.
2010-03-21 08:54:06 -04:00
Todd C. Miller
2e27226a0d Bring back SUDOERS_PLUGIN but add .dylib -> .so conversion for
Darwin where libraries end in .dylib but modules end in .so
2010-03-19 20:01:00 -04:00
Todd C. Miller
8c9db4ef6f Better prefix determination now that we can't rely on len==0 to
tell the beginning on an entry.
2010-03-19 08:17:58 -04:00
Todd C. Miller
5fb6784ab1 display_bound_defaults() stub should return 0, not 1 since it is a count,
not a boolean.
2010-03-19 08:17:09 -04:00
Todd C. Miller
18cd91d56e Document progname in settings 2010-03-19 07:56:06 -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
0dbf4362d9 Fix --with-ldap 2010-03-19 07:32:14 -04:00
Todd C. Miller
71baab8acc Add missing whitespace for Runas and Command-specific defaults 2010-03-19 07:31:42 -04:00
Todd C. Miller
38937dca5e Use embedded newlines in lbuf instead of multiple calls to lbuf_print. 2010-03-19 07:04:34 -04:00
Todd C. Miller
6f771f39b3 Add support for embedded newlines. 2010-03-19 06:59:02 -04:00
Todd C. Miller
623fc34dd4 If system doesn't support getprogname or __programe and we are
building a shared object don't bother with Argc/Argv, just
return "sudo"
2010-03-18 13:53:12 -04:00
Todd C. Miller
5be1b80169 Hard-code sudoers.so instead of using SUDOERS_PLUGIN since libtool
appears to always install a shared object with the .so suffix.
2010-03-18 12:02:05 -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
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
d5ae4c7d87 Kill __P in sudoers 2010-03-17 19:56:27 -04:00
Todd C. Miller
5a2a2d193f Set the sudoers plugin name in configure so we get the extension right. 2010-03-17 18:48:19 -04:00
Todd C. Miller
81949e89d1 Document lines/cols in user_info 2010-03-17 10:44:16 -04:00
Todd C. Miller
96a98bed4b Add tty size to user info 2010-03-17 10:36:02 -04:00
Todd C. Miller
f08479f19a Use TIOCGSIZE/TIOCSSIZE instead of TIOCGWINSZ/TIOCSWINSZ 2010-03-17 08:36:17 -04:00
Todd C. Miller
a5d2775f73 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
2010-03-16 08:50:03 -04:00
Todd C. Miller
0d8159fa2f Pass the error value back via siglongjmp. 2010-03-16 08:41:36 -04:00
Todd C. Miller
51c55cd487 Use conversation function for lecture. 2010-03-16 07:41:41 -04:00
Todd C. Miller
cbf298bfc8 Don't update ticket file if verify_user returns FALSE. 2010-03-16 07:13:57 -04:00
Todd C. Miller
ee223889c1 Wire up invalidate and validate methods for sudoers 2010-03-15 20:24:55 -04:00
Todd C. Miller
248bae4e56 Add support for -k flag with a command. 2010-03-15 19:41:15 -04:00
Todd C. Miller
36701e1233 Allow -k to be specified with a command. 2010-03-15 19:40:15 -04:00
Todd C. Miller
e8eec34022 Wire up policy_list 2010-03-15 18:13:58 -04:00
Todd C. Miller
718073e271 Add newline at the end of message and space after the colon in warning message 2010-03-15 18:13:31 -04:00
Todd C. Miller
88a0244dde Add missing newline after pass password warning 2010-03-15 18:13:06 -04:00
Todd C. Miller
7b024c53c4 Set user_groups and user_ngroups based on user_info 2010-03-15 17:07:10 -04:00
Todd C. Miller
5113f84894 Make this compile 2010-03-15 13:42:40 -04:00
Todd C. Miller
5e2f61a098 Make _warning in error.c use the conversation function and remove
commented out warning/warningx in sudoers.c.
2010-03-15 07:14:45 -04:00
Todd C. Miller
dbbc0cea56 Use siglongjmp() in log_error for fatal errors 2010-03-15 07:06:11 -04:00
Todd C. Miller
d1d6afaef0 Quiet a libtool warning 2010-03-15 07:01:51 -04:00
Todd C. Miller
6527c92da4 Build sudoers plugin 2010-03-15 10:44:19 -04:00
Todd C. Miller
d54cedfab7 Use warningx in yyerror() so the conversation function gets used
when built as part of sudoers.
2010-03-15 10:44:06 -04:00
Todd C. Miller
748ce55381 Rename sudo_conv to conversation to avoid a namespace conflict. 2010-03-14 20:47:56 -04:00
Todd C. Miller
9b0205846b Initial bits of sudoers plugin; still needs work. 2010-03-14 19:58:47 -04:00
Todd C. Miller
3116e254b4 Add HAVE_STRDUP and HAVE_STRNDUP 2010-03-14 18:05:23 -04:00
Todd C. Miller
90ec112540 Build libmissing in two flavors (one PIC one non-PIC) and link with the
appropriate one.
2010-03-14 18:05:00 -04:00