Todd C. Miller
839919566e
Add debug_decl/debug_return (almost) everywhere.
...
Remove old sudo_debug() and convert users to sudo_debug_printf().
2011-10-22 14:40:21 -04:00
Todd C. Miller
1e93d1fbb6
Make sudo_auth_{init,cleanup} return TRUE on success and check for
...
sudo_auth_init() return value in check_user().
2011-09-27 15:41:22 -04:00
Todd C. Miller
4540a7525e
Do not return without restoring permissions.
2011-09-27 15:22:08 -04:00
Todd C. Miller
bceb5df158
Modify the authentication API such that the init and cleanup functions
...
are always called, regardless of whether or not we are going to
verify a password. This is needed for proper PAM session support.
2011-09-27 13:18:46 -04:00
Todd C. Miller
c5f8dc95c6
Fix a PAM_USER mismatch in session open/close. We update PAM_USER
...
to the target user immediately before setting resource limits, which
is after the monitor process has forked (so it has the old value).
Also, if the user did not authenticate, there is no pamh in the
monitor so we need to init pam here too. This means we end up
calling pam_start() twice, which should be fixed, but at least the
session is always properly closed now.
2011-09-27 11:13:44 -04:00
Todd C. Miller
42a3966a88
Minor warning/error cleanup
2011-05-18 13:44:36 -04:00
Todd C. Miller
fce0b906eb
cannot -> "unable to" in warning/error messages
2011-05-18 12:41:06 -04:00
Todd C. Miller
b643b190a7
Prepare sudoers module messages for translation.
2011-05-16 16:32:05 -04:00
Todd C. Miller
d2cc4740c1
For non-standalone auth methods, stop reading the password if the
...
user enters ^C at the prompt.
2010-08-06 17:16:57 -04:00
Todd C. Miller
96cb890d53
No need to look up shadow password unless we are doing password-style
...
authentication. This moves the shadow password lookup to the auth
functions that need it.
2010-08-06 13:55:33 -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
e146aaaa29
Fix visiblepw sudoers option; the plugin API portion still needs documenting
2010-06-10 15:02:32 -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
34e1a06767
Use sudo_printf to display verbose version information.
2010-05-28 12:01:06 -04:00
Todd C. Miller
b2ed46652b
Clean up the sudoers auth API a bit and update the docs.
2010-05-27 14:53:11 -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
27be96c9cd
Add open/close session to sudo auth, only used by PAM.
...
This allows us to open (and close) the PAM session from sudoers.
2010-05-26 17:57:47 -04:00
Todd C. Miller
d2b8bad2a5
Fix compilation for non PAM/BSD auth/AIX auth
2010-05-19 11:40:46 -04:00
Todd C. Miller
f42cf76d8a
Re-enable bsm audit. Currently auditing is done within the sudoers
...
plugin itself. If possible, this should really be done in the main
driver but we don't presently have the needed data to do that. This
will be re-evaluated when Linux audit support is added.
2010-04-30 12:01:15 -04:00
Todd C. Miller
1bb9f62143
Convert perm setting to push/pop model; still needs some work
...
Use the stashed runas groups instead of using getgrouplist()
Reset perms to the initial value on error
2010-04-20 17:00: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
88a0244dde
Add missing newline after pass password warning
2010-03-15 18:13:06 -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
e90fa482f9
Rework source layout in preparation for modular sudo.
2010-02-20 09:14:01 -05:00