pam_set_data.c (107937) | pam_set_data.c (110503) |
---|---|
1/*- 2 * Copyright (c) 2002 Networks Associates Technology, Inc. 3 * All rights reserved. 4 * 5 * This software was developed for the FreeBSD Project by ThinkSec AS and 6 * Network Associates Laboratories, the Security Research Division of 7 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 8 * ("CBOSS"), as part of the DARPA CHATS research program. --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * | 1/*- 2 * Copyright (c) 2002 Networks Associates Technology, Inc. 3 * All rights reserved. 4 * 5 * This software was developed for the FreeBSD Project by ThinkSec AS and 6 * Network Associates Laboratories, the Security Research Division of 7 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 8 * ("CBOSS"), as part of the DARPA CHATS research program. --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * |
34 * $P4: //depot/projects/openpam/lib/pam_set_data.c#11 $ | 34 * $P4: //depot/projects/openpam/lib/pam_set_data.c#12 $ |
35 */ 36 37#include <stdlib.h> 38#include <string.h> 39 40#include <security/pam_appl.h> 41 42#include "openpam_impl.h" --- 10 unchanged lines hidden (view full) --- 53 const char *module_data_name, 54 void *data, 55 void (*cleanup)(pam_handle_t *pamh, 56 void *data, 57 int pam_end_status)) 58{ 59 pam_data_t *dp; 60 | 35 */ 36 37#include <stdlib.h> 38#include <string.h> 39 40#include <security/pam_appl.h> 41 42#include "openpam_impl.h" --- 10 unchanged lines hidden (view full) --- 53 const char *module_data_name, 54 void *data, 55 void (*cleanup)(pam_handle_t *pamh, 56 void *data, 57 int pam_end_status)) 58{ 59 pam_data_t *dp; 60 |
61 ENTER(); | 61 ENTERS(module_data_name); |
62 if (pamh == NULL) 63 RETURNC(PAM_SYSTEM_ERR); 64 for (dp = pamh->module_data; dp != NULL; dp = dp->next) { 65 if (strcmp(dp->name, module_data_name) == 0) { 66 if (dp->cleanup) 67 (dp->cleanup)(pamh, dp->data, PAM_SUCCESS); 68 dp->data = data; 69 dp->cleanup = cleanup; --- 34 unchanged lines hidden --- | 62 if (pamh == NULL) 63 RETURNC(PAM_SYSTEM_ERR); 64 for (dp = pamh->module_data; dp != NULL; dp = dp->next) { 65 if (strcmp(dp->name, module_data_name) == 0) { 66 if (dp->cleanup) 67 (dp->cleanup)(pamh, dp->data, PAM_SUCCESS); 68 dp->data = data; 69 dp->cleanup = cleanup; --- 34 unchanged lines hidden --- |