2001-04-25 00:00:12 +04:00
/* syslogging function for errors and other information */
2009-05-26 17:40:21 +04:00
extern void _log_err ( pam_handle_t * , int , const char * , . . . ) ;
2001-04-25 00:00:12 +04:00
/* set the control flags for the UNIX module. */
2009-05-26 17:40:21 +04:00
extern int set_ctrl ( pam_handle_t * , int , int , const char * * ) ;
2001-04-25 00:00:12 +04:00
/* generic function for freeing pam data segments */
extern void _cleanup ( pam_handle_t * , void * , int ) ;
/*
* Safe duplication of character strings . " Paranoid " ; don ' t leave
* evidence of old token around for later stack analysis .
*/
2009-05-26 17:40:21 +04:00
extern char * smbpXstrDup ( pam_handle_t * , const char * ) ;
2001-04-25 00:00:12 +04:00
/* ************************************************************** *
* Useful non - trivial functions *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
extern void _cleanup_failures ( pam_handle_t * , void * , int ) ;
/* compare 2 strings */
2007-10-19 04:40:25 +04:00
extern bool strequal ( const char * , const char * ) ;
2001-04-25 00:00:12 +04:00
extern struct smb_passwd *
2007-10-19 04:40:25 +04:00
_my_get_smbpwnam ( FILE * , const char * , bool * , bool * , long * ) ;
2001-04-25 00:00:12 +04:00
2006-02-20 23:09:36 +03:00
extern int _smb_verify_password ( pam_handle_t * pamh , struct samu * sampass ,
2002-01-13 02:12:13 +03:00
const char * p , unsigned int ctrl ) ;
2001-04-25 00:00:12 +04:00
/*
* this function obtains the name of the current user and ensures
* that the PAM_USER item is set to this value
*/
extern int _smb_get_user ( pam_handle_t * , unsigned int ,
const char * , const char * * ) ;
/* _smb_blankpasswd() is a quick check for a blank password */
2006-02-20 23:09:36 +03:00
extern int _smb_blankpasswd ( unsigned int , struct samu * ) ;
2001-04-25 00:00:12 +04:00
/* obtain a password from the user */
extern int _smb_read_password ( pam_handle_t * , unsigned int , const char * ,
2002-01-13 02:12:13 +03:00
const char * , const char * , const char * , char * * ) ;
2001-04-25 00:00:12 +04:00
extern int _pam_smb_approve_pass ( pam_handle_t * , unsigned int , const char * ,
const char * ) ;
2009-05-22 19:56:37 +04:00
int _pam_get_item ( const pam_handle_t * pamh ,
int item_type ,
const void * _item ) ;
int _pam_get_data ( const pam_handle_t * pamh ,
const char * module_data_name ,
const void * _data ) ;