Fix braino that arose from confusion between data and dp. This
unbreaks the pam_ldap module. Based on a patch by Joe Marcus Clarke <marcus@marcuscom.com>. Sponsored by: DARPA, NAI Labs git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@98 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
parent
6e48c6e7f5
commit
8113558d3a
1 changed files with 5 additions and 3 deletions
|
@ -31,7 +31,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $P4: //depot/projects/openpam/lib/pam_set_data.c#8 $
|
* $P4: //depot/projects/openpam/lib/pam_set_data.c#9 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -74,11 +74,13 @@ pam_set_data(pam_handle_t *pamh,
|
||||||
if ((dp = malloc(sizeof *dp)) == NULL)
|
if ((dp = malloc(sizeof *dp)) == NULL)
|
||||||
return (PAM_BUF_ERR);
|
return (PAM_BUF_ERR);
|
||||||
if ((dp->name = strdup(module_data_name)) == NULL) {
|
if ((dp->name = strdup(module_data_name)) == NULL) {
|
||||||
free(data);
|
free(dp);
|
||||||
return (PAM_BUF_ERR);
|
return (PAM_BUF_ERR);
|
||||||
}
|
}
|
||||||
|
dp->data = data;
|
||||||
|
dp->cleanup = cleanup;
|
||||||
dp->next = pamh->module_data;
|
dp->next = pamh->module_data;
|
||||||
pamh->module_data = data;
|
pamh->module_data = dp;
|
||||||
return (PAM_SUCCESS);
|
return (PAM_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue