<div>All, I am having a problem setting password from the http application. It is getting reset to NULL inside pam_authenticate somehow. The only place I can see password is set to NULL is in the function </div>
<div> <strong>void _pam_sanitize(pam_handle_t *pamh)</strong> in pam_misc.c file. I've also commented out the invocation of _pam_sanitize from pam api. Also I have syslog trace in the <strong>pam_sanitize </strong>function. However, for some reason I am losing the password inside pam_authenticate inspite of all the changes and also I don't see any trace from the function
<strong>pam_sanitize. </strong>If anybody has any idea about this, please reply.</div>
<div>
<p> retval = pam_start("http", auth_userpass, &conv, &pamh);</p>
<p> syslog(LOG_INFO, "before pam_set_item..........................\n");<br> pam_set_item(pamh, PAM_AUTHTOK, pwd);<br> <br> if (retval == PAM_SUCCESS) {
<br> retval = pam_authenticate(pamh, 0); /* is user really user? */<br> }<br> else {<br> syslog(LOG_INFO, "--Not authenticated - pam start failed\n");
<br> }</p>
<p> /* This is where we have been authorized or not. */</p>
<p> if (retval == PAM_SUCCESS) {<br> syslog(LOG_INFO, "Authentication successful for %s from %s\n", auth_userpass, req->remote_ip_addr);<br><br> strncpy(req->user, auth_userpass, 15);
<br> req->user[15] = '\0';<br> if (pam_end(pamh,retval) != PAM_SUCCESS) { /* close Linux-PAM */<br> pamh = NULL;<br>
syslog(LOG_ERR, "http: failed to release pam authenticator\n"); <br> }<br> return 1; <br>
}</p>
<p>Thanks,</p>
<p>N</p>
<p> </p>
<p> </p></div>