ldap.c (132943) | ldap.c (141858) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2001-2003 Sendmail, Inc. and its suppliers. | 2 * Copyright (c) 2001-2004 Sendmail, Inc. and its suppliers. |
3 * All rights reserved. 4 * 5 * By using this file, you agree to the terms and conditions set 6 * forth in the LICENSE file which can be found at the top level of 7 * the sendmail distribution. 8 */ 9 10#include <sm/gen.h> | 3 * All rights reserved. 4 * 5 * By using this file, you agree to the terms and conditions set 6 * forth in the LICENSE file which can be found at the top level of 7 * the sendmail distribution. 8 */ 9 10#include <sm/gen.h> |
11SM_RCSID("@(#)$Id: ldap.c,v 1.59 2003/12/23 21:20:15 gshapiro Exp $") | 11SM_RCSID("@(#)$Id: ldap.c,v 1.60 2004/08/03 20:42:21 ca Exp $") |
12 13#if LDAPMAP 14# include <sys/types.h> 15# include <errno.h> 16# include <setjmp.h> 17# include <stdlib.h> 18# include <unistd.h> 19 --- 8 unchanged lines hidden (view full) --- 28# undef EX_OK /* for SVr4.2 SMP */ 29# endif /* EX_OK */ 30# include <sm/sysexits.h> 31 32SM_DEBUG_T SmLDAPTrace = SM_DEBUG_INITIALIZER("sm_trace_ldap", 33 "@(#)$Debug: sm_trace_ldap - trace LDAP operations $"); 34 35static void ldaptimeout __P((int)); | 12 13#if LDAPMAP 14# include <sys/types.h> 15# include <errno.h> 16# include <setjmp.h> 17# include <stdlib.h> 18# include <unistd.h> 19 --- 8 unchanged lines hidden (view full) --- 28# undef EX_OK /* for SVr4.2 SMP */ 29# endif /* EX_OK */ 30# include <sm/sysexits.h> 31 32SM_DEBUG_T SmLDAPTrace = SM_DEBUG_INITIALIZER("sm_trace_ldap", 33 "@(#)$Debug: sm_trace_ldap - trace LDAP operations $"); 34 35static void ldaptimeout __P((int)); |
36static bool sm_ldap_has_objectclass __P((SM_LDAP_STRUCT *, LDAPMessage *, char *)); 37static SM_LDAP_RECURSE_ENTRY *sm_ldap_add_recurse __P((SM_LDAP_RECURSE_LIST **, char *, int, SM_RPOOL_T *)); |
|
36 37/* 38** SM_LDAP_CLEAR -- set default values for SM_LDAP_STRUCT 39** 40** Parameters: 41** lmap -- pointer to SM_LDAP_STRUCT to clear 42** 43** Returns: --- 77 unchanged lines hidden (view full) --- 121} while (0) 122 123bool 124sm_ldap_start(name, lmap) 125 char *name; 126 SM_LDAP_STRUCT *lmap; 127{ 128 int bind_result; | 38 39/* 40** SM_LDAP_CLEAR -- set default values for SM_LDAP_STRUCT 41** 42** Parameters: 43** lmap -- pointer to SM_LDAP_STRUCT to clear 44** 45** Returns: --- 77 unchanged lines hidden (view full) --- 123} while (0) 124 125bool 126sm_ldap_start(name, lmap) 127 char *name; 128 SM_LDAP_STRUCT *lmap; 129{ 130 int bind_result; |
129 int save_errno; | 131 int save_errno = 0; |
130 char *id; 131 SM_EVENT *ev = NULL; 132 LDAP *ld = NULL; 133 134 if (sm_debug_active(&SmLDAPTrace, 2)) 135 sm_dprintf("ldapmap_start(%s)\n", name == NULL ? "" : name); 136 137 if (lmap->ldap_host != NULL) --- 1191 unchanged lines hidden --- | 132 char *id; 133 SM_EVENT *ev = NULL; 134 LDAP *ld = NULL; 135 136 if (sm_debug_active(&SmLDAPTrace, 2)) 137 sm_dprintf("ldapmap_start(%s)\n", name == NULL ? "" : name); 138 139 if (lmap->ldap_host != NULL) --- 1191 unchanged lines hidden --- |