mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
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:
@@ -52,6 +52,7 @@ typedef int (*sudo_conv_t)(int num_msgs, const struct sudo_conv_message msgs[],
|
||||
typedef int (*sudo_printf_t)(int msg_type, const char *fmt, ...);
|
||||
|
||||
/* Policy plugin type and defines */
|
||||
struct passwd;
|
||||
struct policy_plugin {
|
||||
#define SUDO_POLICY_PLUGIN 1
|
||||
unsigned int type; /* always SUDO_POLICY_PLUGIN */
|
||||
@@ -68,6 +69,7 @@ struct policy_plugin {
|
||||
const char *list_user);
|
||||
int (*validate)(void);
|
||||
void (*invalidate)(int remove);
|
||||
int (*init_session)(struct passwd *pwd);
|
||||
};
|
||||
|
||||
/* I/O plugin type and defines */
|
||||
|
Reference in New Issue
Block a user