pam_get_data.c (91094) | pam_get_data.c (91097) |
---|---|
1/*- 2 * Copyright (c) 2002 Networks Associates Technologies, Inc. 3 * All rights reserved. 4 * 5 * This software was developed for the FreeBSD Project by ThinkSec AS and 6 * NAI Labs, the Security Research Division of Network Associates, Inc. 7 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the 8 * DARPA CHATS research program. --- 36 unchanged lines hidden (view full) --- 45 * XSSO 6 page 43 46 * 47 * Get module information 48 */ 49 50int 51pam_get_data(pam_handle_t *pamh, 52 const char *module_data_name, | 1/*- 2 * Copyright (c) 2002 Networks Associates Technologies, Inc. 3 * All rights reserved. 4 * 5 * This software was developed for the FreeBSD Project by ThinkSec AS and 6 * NAI Labs, the Security Research Division of Network Associates, Inc. 7 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the 8 * DARPA CHATS research program. --- 36 unchanged lines hidden (view full) --- 45 * XSSO 6 page 43 46 * 47 * Get module information 48 */ 49 50int 51pam_get_data(pam_handle_t *pamh, 52 const char *module_data_name, |
53 void **data) | 53 const void **data) |
54{ 55 pam_data_t *dp; 56 57 if (pamh == NULL) 58 return (PAM_SYSTEM_ERR); 59 60 for (dp = pamh->module_data; dp != NULL; dp = dp->next) 61 if (strcmp(dp->name, module_data_name) == 0) { 62 *data = dp->data; 63 return (PAM_SUCCESS); 64 } 65 66 return (PAM_NO_MODULE_DATA); 67} | 54{ 55 pam_data_t *dp; 56 57 if (pamh == NULL) 58 return (PAM_SYSTEM_ERR); 59 60 for (dp = pamh->module_data; dp != NULL; dp = dp->next) 61 if (strcmp(dp->name, module_data_name) == 0) { 62 *data = dp->data; 63 return (PAM_SUCCESS); 64 } 65 66 return (PAM_NO_MODULE_DATA); 67} |