components/samba/samba/patches/mozldap.patch
author Jiri Sasek <Jiri.Sasek@Sun.COM>
Mon, 15 Jul 2013 17:22:36 -0700
changeset 1396 2c75b46fc80a
parent 628 c3c0c8f3f696
permissions -rw-r--r--
15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1396
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
     1
--- a/source3/param/loadparm.c	2013-03-18 01:59:37.000000000 -0700
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
     2
+++ b/source3/param/loadparm.c	2013-05-10 23:59:37.528279300 +0200
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
     3
@@ -278,6 +278,9 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
     4
 	int ldap_follow_referral;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
     5
 	char *szLdapSuffix;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
     6
 	char *szLdapAdminDn;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
     7
+	char *szLdapCertDBdir;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
     8
+	char *szLdapKeyDBdir;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
     9
+	bool ldap_privkey_open;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    10
 	int ldap_debug_level;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    11
 	int ldap_debug_threshold;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    12
 	int iAclCompat;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    13
@@ -3701,6 +3704,33 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    14
 		.flags		= FLAG_ADVANCED,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    15
 	},
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    16
 	{
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    17
+		.label		= "ldap certdb dir",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    18
+		.type		= P_STRING,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    19
+		.p_class	= P_GLOBAL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    20
+		.ptr		= &Globals.szLdapCertDBdir,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    21
+		.special	= NULL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    22
+		.enum_list	= NULL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    23
+		.flags		= FLAG_ADVANCED,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    24
+	},
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    25
+	{
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    26
+		.label		= "ldap keydb dir",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    27
+		.type		= P_STRING,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    28
+		.p_class	= P_GLOBAL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    29
+		.ptr		= &Globals.szLdapKeyDBdir,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    30
+		.special	= NULL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    31
+		.enum_list	= NULL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    32
+		.flags		= FLAG_ADVANCED,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    33
+	},
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    34
+	{
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    35
+		.label		= "ldap privkey open",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    36
+		.type		= P_BOOL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    37
+		.p_class	= P_GLOBAL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    38
+		.ptr		= &Globals.ldap_privkey_open,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    39
+		.special	= NULL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    40
+		.enum_list	= NULL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    41
+		.flags		= FLAG_ADVANCED,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    42
+	},
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    43
+	{
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    44
 		.label		= "ldap delete dn",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    45
 		.type		= P_BOOL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    46
 		.p_class	= P_GLOBAL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    47
@@ -5366,6 +5396,9 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    48
 	string_set(&Globals.szLdapIdmapSuffix, "");
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    49
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    50
 	string_set(&Globals.szLdapAdminDn, "");
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    51
+	string_set(&Globals.szLdapCertDBdir, get_dyn_PRIVATE_DIR());
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    52
+	string_set(&Globals.szLdapKeyDBdir, get_dyn_PRIVATE_DIR());
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    53
+	Globals.ldap_privkey_open = False;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    54
 	Globals.ldap_ssl = LDAP_SSL_START_TLS;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    55
 	Globals.ldap_ssl_ads = False;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    56
 	Globals.ldap_deref = -1;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    57
@@ -5747,6 +5780,9 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    58
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    59
 FN_GLOBAL_STRING(lp_ldap_suffix, &Globals.szLdapSuffix)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    60
 FN_GLOBAL_STRING(lp_ldap_admin_dn, &Globals.szLdapAdminDn)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    61
+FN_GLOBAL_STRING(lp_ldap_certdb_dir, &Globals.szLdapCertDBdir)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    62
+FN_GLOBAL_STRING(lp_ldap_keydb_dir, &Globals.szLdapKeyDBdir)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    63
+FN_GLOBAL_BOOL(lp_ldap_privkey_open, &Globals.ldap_privkey_open)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    64
 FN_GLOBAL_INTEGER(lp_ldap_ssl, &Globals.ldap_ssl)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    65
 FN_GLOBAL_BOOL(lp_ldap_ssl_ads, &Globals.ldap_ssl_ads)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    66
 FN_GLOBAL_INTEGER(lp_ldap_deref, &Globals.ldap_deref)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    67
--- a/source3/include/proto.h	2013-03-18 01:59:37.000000000 -0700
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    68
+++ b/source3/include/proto.h	2013-05-11 00:04:26.565521200 +0200
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    69
@@ -1429,6 +1429,9 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    70
 bool lp_passdb_expand_explicit(void);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    71
 char *lp_ldap_suffix(void);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    72
 char *lp_ldap_admin_dn(void);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    73
+char *lp_ldap_certdb_dir(void);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    74
+char *lp_ldap_keydb_dir(void);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    75
+bool lp_ldap_privkey_open(void);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    76
 int lp_ldap_ssl(void);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    77
 bool lp_ldap_ssl_ads(void);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    78
 int lp_ldap_deref(void);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    79
--- a/source3/include/smb_ldap.h	2013-03-18 01:59:37.000000000 -0700
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    80
+++ b/source3/include/smb_ldap.h	2013-04-29 13:33:34.602541500 -0700
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    81
@@ -63,6 +63,10 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    82
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    83
 #endif /* HAVE_LDAP_H */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    84
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    85
+#if HAVE_LDAP_SSL_H
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    86
+#include <ldap_ssl.h>
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    87
+#endif /* HAVE_LDAP_SSL_H */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    88
+
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    89
 #ifndef HAVE_LDAP
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    90
 #define LDAP void
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    91
 #define LDAPMessage void
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    92
--- a/source3/lib/smbldap.c	2013-05-08 10:16:26.000000000 +0200
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    93
+++ b/source3/lib/smbldap.c	2013-07-03 09:00:28.482477500 +0200
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    94
@@ -780,7 +780,7 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    95
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    96
 int smb_ldap_start_tls(LDAP *ldap_struct, int version)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    97
 { 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    98
-#ifdef LDAP_OPT_X_TLS
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
    99
+#ifdef HAVE_LDAP_START_TLS_S
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   100
 	int rc;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   101
 #endif
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   102
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   103
@@ -788,12 +788,24 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   104
 		return LDAP_SUCCESS;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   105
 	}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   106
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   107
-#ifdef LDAP_OPT_X_TLS
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   108
+#ifdef HAVE_LDAP_START_TLS_S
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   109
 	if (version != LDAP_VERSION3) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   110
 		DEBUG(0, ("Need LDAPv3 for Start TLS\n"));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   111
 		return LDAP_OPERATIONS_ERROR;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   112
 	}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   113
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   114
+#ifdef HAVE_LDAPSSL_INIT  /* Netscape */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   115
+	rc = ldapssl_clientauth_init(lp_ldap_certdb_dir(), NULL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   116
+		lp_ldap_privkey_open(), lp_ldap_keydb_dir(), NULL);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   117
+	if (rc != LDAP_SUCCESS) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   118
+		DEBUG(0,("ldapssl_clientauth_init with '%s' cert db, "
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   119
+			"%s key db, failed: %s\n",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   120
+			lp_ldap_certdb_dir(), lp_ldap_keydb_dir(),
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   121
+			ldap_err2string(rc)));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   122
+		return rc;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   123
+	}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   124
+#endif /* HAVE_LDAPSSL_INIT */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   125
+
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   126
 	if ((rc = ldap_start_tls_s (ldap_struct, NULL, NULL)) != LDAP_SUCCESS)	{
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   127
 		DEBUG(0,("Failed to issue the StartTLS instruction: %s\n",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   128
 			 ldap_err2string(rc)));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   129
@@ -802,12 +814,14 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   130
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   131
 	DEBUG (3, ("StartTLS issued: using a TLS connection\n"));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   132
 	return LDAP_SUCCESS;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   133
-#else
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   134
+
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   135
+#else /* ! HAVE_LDAP_START_TLS_S */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   136
 	DEBUG(0,("StartTLS not supported by LDAP client libraries!\n"));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   137
 	return LDAP_OPERATIONS_ERROR;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   138
-#endif
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   139
+#endif /* HAVE_LDAP_START_TLS_S */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   140
 }
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   141
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   142
+
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   143
 /********************************************************************
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   144
  setup a connection to the LDAP server based on a uri
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   145
 *******************************************************************/
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   146
@@ -815,8 +829,24 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   147
 static int smb_ldap_setup_conn(LDAP **ldap_struct, const char *uri)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   148
 {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   149
 	int rc;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   150
+#ifdef LDAP_OPT_TIMELIMIT
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   151
+	int ot = lp_ldap_timeout();
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   152
+#endif
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   153
+#ifdef LDAP_X_OPT_CONNECT_TIMEOUT /* Netscape */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   154
+	int ct = lp_ldap_connection_timeout() * 1000;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   155
+#elif defined (LDAP_OPT_NETWORK_TIMEOUT) /* OpenLDAP */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   156
+	struct timeval ct;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   157
+#endif
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   158
+#ifndef HAVE_LDAP_INITIALIZE
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   159
+	int port = 0;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   160
+	fstring protocol;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   161
+	fstring host;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   162
+	/* Following symbols are only available if Mozldap	*/
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   163
+	/* is compiled with LDAP_DEBUG on			*/
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   164
+	/* extern int lber_debug, ldap_debug; */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   165
+#endif
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   166
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   167
-	DEBUG(10, ("smb_ldap_setup_connection: %s\n", uri));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   168
+	DEBUG(10, ("smb_ldap_setup_conn: %s\n", uri));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   169
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   170
 #ifdef HAVE_LDAP_INITIALIZE
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   171
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   172
@@ -837,74 +867,105 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   173
 	return LDAP_SUCCESS;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   174
 #else 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   175
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   176
+	/* lber_debug =  255 ; */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   177
+	/* ldap_debug =  1023 | 0x4000 ; */
628
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   178
+
1396
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   179
 	/* Parse the string manually */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   180
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   181
-	{
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   182
-		int port = 0;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   183
-		fstring protocol;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   184
-		fstring host;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   185
-		SMB_ASSERT(sizeof(protocol)>10 && sizeof(host)>254);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   186
+	SMB_ASSERT(sizeof(protocol)>10 && sizeof(host)>254);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   187
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   188
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   189
-		/* skip leading "URL:" (if any) */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   190
-		if ( strnequal( uri, "URL:", 4 ) ) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   191
-			uri += 4;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   192
-		}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   193
+	/* skip leading "URL:" (if any) */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   194
+	if ( strnequal( uri, "URL:", 4 ) ) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   195
+		uri += 4;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   196
+	}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   197
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   198
-		sscanf(uri, "%10[^:]://%254[^:/]:%d", protocol, host, &port);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   199
+	sscanf(uri, "%10[^:]://%254[^:/]:%d", protocol, host, &port);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   200
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   201
-		if (port == 0) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   202
-			if (strequal(protocol, "ldap")) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   203
-				port = LDAP_PORT;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   204
-			} else if (strequal(protocol, "ldaps")) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   205
-				port = LDAPS_PORT;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   206
-			} else {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   207
-				DEBUG(0, ("unrecognised protocol (%s)!\n", protocol));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   208
-			}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   209
+	if (port == 0) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   210
+		if (strequal(protocol, "ldap")) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   211
+			port = LDAP_PORT;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   212
+		} else if (strequal(protocol, "ldaps")) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   213
+			port = LDAPS_PORT;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   214
+		} else {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   215
+			DEBUG(0, ("unrecognised protocol (%s)!\n", protocol));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   216
+			return LDAP_OPERATIONS_ERROR;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   217
 		}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   218
+	}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   219
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   220
+	if (strequal(protocol, "ldap")) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   221
 		if ((*ldap_struct = ldap_init(host, port)) == NULL)	{
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   222
 			DEBUG(0, ("ldap_init failed !\n"));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   223
 			return LDAP_OPERATIONS_ERROR;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   224
 		}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   225
-
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   226
-	        if (strequal(protocol, "ldaps")) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   227
+	} else if (strequal(protocol, "ldaps")) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   228
 #ifdef LDAP_OPT_X_TLS
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   229
-			int tls = LDAP_OPT_X_TLS_HARD;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   230
-			if (ldap_set_option (*ldap_struct, LDAP_OPT_X_TLS, &tls) != LDAP_SUCCESS)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   231
-			{
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   232
-				DEBUG(0, ("Failed to setup a TLS session\n"));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   233
+		int tls = LDAP_OPT_X_TLS_HARD;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   234
+		if ((*ldap_struct = ldap_init(host, port)) == NULL)	{
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   235
+			DEBUG(0, ("ldap_init failed !\n"));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   236
+			return LDAP_OPERATIONS_ERROR;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   237
+		}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   238
+		if (ldap_set_option (*ldap_struct, LDAP_OPT_X_TLS, &tls) != LDAP_SUCCESS) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   239
+			DEBUG(0, ("Failed to setup a TLS session\n"));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   240
+		}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   241
+
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   242
+		DEBUG(3,("LDAPS option set...!\n"));
628
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   243
+
1396
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   244
+#elif defined(HAVE_LDAPSSL_INIT) /* Netscape */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   245
+		if (*ldap_struct != NULL) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   246
+			rc = ldap_unbind_s(*ldap_struct);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   247
+			if (rc == LDAP_SUCCESS) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   248
+			    DEBUG(10, ("LDAP already bound... unbound.\n"));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   249
+			} else {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   250
+			    DEBUG(10, ("ldap_unbind_s failed: %s\n",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   251
+				ldap_err2string(rc)));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   252
 			}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   253
+			*ldap_struct = NULL;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   254
+		}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   255
+		rc = ldapssl_clientauth_init(lp_ldap_certdb_dir(), NULL,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   256
+			lp_ldap_privkey_open(), lp_ldap_keydb_dir(), NULL);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   257
+		if (rc != LDAP_SUCCESS) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   258
+			DEBUG(0,("ldapssl_clientauth_init with '%s' cert db, "
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   259
+				"%s key db, failed: %s\n",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   260
+				lp_ldap_certdb_dir(), lp_ldap_keydb_dir(),
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   261
+				ldap_err2string(rc)));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   262
+			return rc;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   263
+		}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   264
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   265
-			DEBUG(3,("LDAPS option set...!\n"));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   266
+		if ((*ldap_struct = ldapssl_init(host, port, True)) == NULL) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   267
+			DEBUG(0, ("ldapssl_init to %s:%d failed!\n", host,
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   268
+				port));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   269
+			return LDAP_OPERATIONS_ERROR;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   270
+		}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   271
 #else
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   272
-			DEBUG(0,("smbldap_open_connection: Secure connection not supported by LDAP client libraries!\n"));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   273
+		DEBUG(0,("smbldap_open_connection: Secure connection not supported by LDAP client libraries!\n"));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   274
 			return LDAP_OPERATIONS_ERROR;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   275
 #endif /* LDAP_OPT_X_TLS */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   276
-		}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   277
 	}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   278
 #endif /* HAVE_LDAP_INITIALIZE */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   279
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   280
+#ifdef LDAP_OPT_TIMELIMIT
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   281
+	rc = ldap_set_option(*ldap_struct, LDAP_OPT_TIMELIMIT, &ot);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   282
+	if (rc != LDAP_SUCCESS) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   283
+		DEBUG(0,("Failed to setup a ldap operation timeout %d: %s\n",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   284
+			ot, ldap_err2string(rc)));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   285
+	}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   286
+#endif
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   287
+
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   288
 	/* now set connection timeout */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   289
 #ifdef LDAP_X_OPT_CONNECT_TIMEOUT /* Netscape */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   290
-	{
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   291
-		int ct = lp_ldap_connection_timeout()*1000;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   292
-		rc = ldap_set_option(*ldap_struct, LDAP_X_OPT_CONNECT_TIMEOUT, &ct);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   293
-		if (rc != LDAP_SUCCESS) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   294
-			DEBUG(0,("Failed to setup an ldap connection timeout %d: %s\n",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   295
-				ct, ldap_err2string(rc)));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   296
-		}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   297
+	rc = ldap_set_option(*ldap_struct, LDAP_X_OPT_CONNECT_TIMEOUT, &ct);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   298
+	if (rc != LDAP_SUCCESS) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   299
+		DEBUG(0,("Failed to setup an ldap connection timeout %d: %s\n",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   300
+			ct, ldap_err2string(rc)));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   301
 	}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   302
 #elif defined (LDAP_OPT_NETWORK_TIMEOUT) /* OpenLDAP */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   303
-	{
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   304
-		struct timeval ct;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   305
-		ct.tv_usec = 0;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   306
-		ct.tv_sec = lp_ldap_connection_timeout();
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   307
-		rc = ldap_set_option(*ldap_struct, LDAP_OPT_NETWORK_TIMEOUT, &ct);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   308
-		if (rc != LDAP_SUCCESS) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   309
-			DEBUG(0,("Failed to setup an ldap connection timeout %d: %s\n",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   310
-				(int)ct.tv_sec, ldap_err2string(rc)));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   311
-		}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   312
+	ct.tv_usec = 0;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   313
+	ct.tv_sec = lp_ldap_connection_timeout();
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   314
+	rc = ldap_set_option(*ldap_struct, LDAP_OPT_NETWORK_TIMEOUT, &ct);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   315
+	if (rc != LDAP_SUCCESS) {
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   316
+		DEBUG(0,("Failed to setup an ldap connection timeout %d: %s\n",
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   317
+			(int)ct.tv_sec, ldap_err2string(rc)));
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   318
 	}
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   319
 #endif
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   320
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   321
@@ -1094,7 +1155,7 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   322
 	 * our credentials. At least *try* to secure the connection - Guenther */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   323
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   324
 	smb_ldap_upgrade_conn(ldap_struct, &version);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   325
-	smb_ldap_start_tls(ldap_struct, version);
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   326
+	/* smb_ldap_start_tls(ldap_struct, version); */
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   327
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   328
 	/** @TODO Should we be doing something to check what servers we rebind to?
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   329
 	    Could we get a referral to a machine that we don't want to give our
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   330
--- a/source3/configure.in	2013-04-26 03:05:37.000000000 -0700
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   331
+++ b/source3/configure.in	2013-05-09 13:54:35.613605329 -0700
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   332
@@ -3485,6 +3485,14 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   333
   fi
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   334
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   335
   ##################################################################
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   336
+  # check for ldap_ssl.h (Mozldap)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   337
+  AC_CHECK_HEADERS([ldap_ssl.h], [], [],
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   338
+  [[#if HAVE_LDAP_H
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   339
+  #include <ldap.h>
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   340
+  #endif
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   341
+  ]])
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   342
+
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   343
+  ##################################################################
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   344
   # HP/UX does not have ber_tag_t in lber.h - it must be configured as
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   345
   # unsigned int in include/includes.h
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   346
   case $host_os in
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   347
@@ -3551,6 +3562,14 @@
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   348
   AC_CHECK_LIB_EXT(ldap, LDAP_LIBS, ldap_init)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   349
 
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   350
   ########################################################
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   351
+  # check for Netscape mozldap SSL API
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   352
+  AC_CHECK_FUNC_EXT(ldapssl_init,$LDAP_LIBS)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   353
+
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   354
+  ########################################################
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   355
+  # check for StartTLS on API
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   356
+  AC_CHECK_FUNC_EXT(ldap_start_tls_s,$LDAP_LIBS)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   357
+
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   358
+  ########################################################
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   359
   # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   360
   # Check found in pam_ldap 145.
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   361
   AC_CHECK_FUNC_EXT(ldap_set_rebind_proc,$LDAP_LIBS)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   362
@@ -3627,33 +3646,17 @@
628
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   363
     # Check to see whether there is enough LDAP functionality to be able
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   364
     # to build AD support.
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   365
 
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   366
-# HPUX only has ldap_init; ok, we take care of this in smbldap.c
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   367
-case "$host_os" in
1396
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   368
-	*hpux*)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   369
-    AC_CHECK_FUNC_EXT(ldap_init,$LDAP_LIBS)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   370
+    # URL-open support is added into smbldap.c so ldap_init is enough
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   371
+    AC_CHECK_LIB_EXT(ldap, LDAP_LIBS, ldap_init)
628
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   372
 
1396
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   373
-    if test x"$ac_cv_func_ext_ldap_init" != x"yes"; then
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   374
+    if test x"$ac_cv_lib_ext_ldap_ldap_init" != x"yes"; then
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   375
 	if test x"$with_ads_support" = x"yes"; then
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   376
-	    AC_MSG_ERROR(Active Directory support on HPUX requires ldap_init)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   377
+	    AC_MSG_ERROR(Active Directory support requires ldap_init)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   378
 	elif test x"$with_ads_support" = x"auto"; then
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   379
-	    AC_MSG_WARN(Disabling Active Directory support (requires ldap_init on HPUX))
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   380
+	    AC_MSG_WARN(Disabling Active Directory support (requires ldap_init))
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   381
 	    with_ads_support=no
628
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   382
 	fi
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   383
     fi
1396
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   384
-    ;;
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   385
-	*)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   386
-    AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   387
-
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   388
-    if test x"$ac_cv_func_ext_ldap_initialize" != x"yes"; then
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   389
-	if test x"$with_ads_support" = x"yes"; then
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   390
-	    AC_MSG_ERROR(Active Directory support requires ldap_initialize)
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   391
-	elif test x"$with_ads_support" = x"auto"; then
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   392
-	    AC_MSG_WARN(Disabling Active Directory support (requires ldap_initialize))
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   393
-	    with_ads_support=no
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   394
-	fi
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   395
-    fi
2c75b46fc80a 15694966 SUNBT7016715 6641606 is not solved with 146363-01/146364-01
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents: 628
diff changeset
   396
-    ;;
628
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   397
-esac
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   398
 
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   399
 
c3c0c8f3f696 7119845 Samba 3.5.10 can not use the system kerberos keytab.
Jiri Sasek <Jiri.Sasek@Sun.COM>
parents:
diff changeset
   400
     AC_CHECK_FUNC_EXT(ldap_add_result_entry,$LDAP_LIBS)