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.
This commit is contained in:
Todd C. Miller
2010-05-27 14:46:39 -04:00
parent 27be96c9cd
commit 7e6d1d1f7d
7 changed files with 69 additions and 38 deletions

View File

@@ -234,7 +234,7 @@ cleanup:
return rval;
}
int begin_session(struct passwd *pw)
int auth_begin_session(struct passwd *pw)
{
sudo_auth *auth;
int status;
@@ -251,7 +251,7 @@ int begin_session(struct passwd *pw)
return TRUE;
}
int end_session(void)
int auth_end_session(void)
{
sudo_auth *auth;
int status;