diff options
author | John Terpstra <jht@samba.org> | 2001-04-24 20:00:12 +0000 |
---|---|---|
committer | John Terpstra <jht@samba.org> | 2001-04-24 20:00:12 +0000 |
commit | 2321514e9300ac85a1976318bae18a6b177f25c9 (patch) | |
tree | fe7bbb36aaba15deb9f13f3324c696cc06fd8a2d /source3/pam_smbpass/support.h | |
parent | 61da9a7e939df69e3feb7d4854b42f72c132a21f (diff) | |
download | samba-2321514e9300ac85a1976318bae18a6b177f25c9.tar.gz samba-2321514e9300ac85a1976318bae18a6b177f25c9.tar.bz2 samba-2321514e9300ac85a1976318bae18a6b177f25c9.zip |
Added Steve Langasek <vorlon@netexpress.net> pam_smbpass PAM module code.
Note: Still have to add build stuff - not ready yet.
(This used to be commit 1de7022f98b64b15503aaf48c8d729789fc49781)
Diffstat (limited to 'source3/pam_smbpass/support.h')
-rw-r--r-- | source3/pam_smbpass/support.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/source3/pam_smbpass/support.h b/source3/pam_smbpass/support.h new file mode 100644 index 0000000000..85bbd0a523 --- /dev/null +++ b/source3/pam_smbpass/support.h @@ -0,0 +1,52 @@ +/* syslogging function for errors and other information */ +extern void _log_err(int, const char *, ...); + +/* set the control flags for the UNIX module. */ +extern int set_ctrl(int, int, const char **); + +/* 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. + */ + +extern char *xstrdup(const char *); + +/* ************************************************************** * + * Useful non-trivial functions * + * ************************************************************** */ + +extern void _cleanup_failures(pam_handle_t *, void *, int); + +/* compare 2 strings */ +extern BOOL strequal(const char *, const char *); + +extern struct smb_passwd * +_my_get_smbpwnam(FILE *, const char *, BOOL *, BOOL *, long *); + +extern int _smb_verify_password( pam_handle_t *pamh + , const struct smb_passwd *smb_pwent + , const char *p, unsigned int ctrl ); + +/* + * 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 */ + +extern int _smb_blankpasswd(unsigned int, const struct smb_passwd *); + + +/* obtain a password from the user */ +extern int _smb_read_password( pam_handle_t *, unsigned int, const char*, + const char *, const char *, const char *, + const char **); + +extern int _pam_smb_approve_pass(pam_handle_t *, unsigned int, const char *, + const char *); |