version 1.5, 2002/06/01 00:57:26
|
version 1.6, 2002/08/29 00:27:52
|
|
|
/** Service name for pam_start */ | /** Service name for pam_start */ |
const char *service = "wbem"; | const char *service = "wbem"; |
| |
char* userPassword = 0; |
const char* userPassword = 0; |
| |
/* constructor. */ | /* constructor. */ |
PAMBasicAuthenticator::PAMBasicAuthenticator() | PAMBasicAuthenticator::PAMBasicAuthenticator() |
|
|
pconv.conv = PAMBasicAuthenticator::PAMCallback; | pconv.conv = PAMBasicAuthenticator::PAMCallback; |
pconv.appdata_ptr = NULL; | pconv.appdata_ptr = NULL; |
| |
ArrayDestroyer<char> p(password.allocateCString()); |
userPassword = password.getCString(); |
userPassword = p.getPointer(); |
|
|
|
ArrayDestroyer<char> user(userName.allocateCString()); |
|
| |
// | // |
//Call pam_start since you need to before making any other PAM calls | //Call pam_start since you need to before making any other PAM calls |
// | // |
if ( ( pam_start(service, | if ( ( pam_start(service, |
(const char *)user.getPointer(), &pconv, &phandle) ) != PAM_SUCCESS ) |
(const char *)userName.getCString(), &pconv, &phandle) ) != PAM_SUCCESS ) |
{ | { |
userPassword = 0; | userPassword = 0; |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |