[Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt ldapfct.c, 1.2, 1.3 ldclt.c, 1.3, 1.4 ldclt.h, 1.2, 1.3 ldclt.use, 1.1, 1.2 ldcltU.c, 1.2, 1.3 scalab01.c, 1.2, 1.3
Nathan Kinder (nkinder)
fedora-directory-commits at redhat.com
Fri Jun 8 23:19:22 UTC 2007
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31128/ldap/servers/slapd/tools/ldclt
Modified Files:
ldapfct.c ldclt.c ldclt.h ldclt.use ldcltU.c scalab01.c
Log Message:
Resolves: 240583
Summary: Added SASL support to ldclt as well as some thread-safety fixes for ns-slapd when using SASL.
Index: ldapfct.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/ldapfct.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ldapfct.c 10 Nov 2006 23:45:50 -0000 1.2
+++ ldapfct.c 8 Jun 2007 23:19:19 -0000 1.3
@@ -254,6 +254,9 @@
#include "ldclt.h" /* This tool's include file */
#include "utils.h" /* Utilities functions */ /*JLS 14-11-00*/
+#include <sasl.h>
+#include "ldaptool-sasl.h"
+
@@ -656,7 +659,6 @@
*/
if (tttctx->ldapCtx == NULL)
{
-#ifdef LDCLTSSL
/*
* SSL is enabled ?
*/
@@ -703,7 +705,6 @@
}
}
} else {
-#endif
/*
* connection initialization in normal, unencrypted mode
*/
@@ -719,9 +720,7 @@
fflush (stdout);
return (-1);
}
-#ifdef LDCLTSSL
}
-#endif
if (mctx.mode & LDAP_V2)
v2v3 = LDAP_VERSION2;
@@ -752,7 +751,8 @@
* below in this function ?
* 03-05-01 : no cleanup I think, cf M2_RNDBINDFILE
*/
- if ((mctx.bindDN == NULL) && (!(mctx.mod2 & M2_RNDBINDFILE))) /*JLS 03-05-01*/
+ if ((mctx.bindDN == NULL) && ((!(mctx.mod2 & M2_RNDBINDFILE))
+ && (!(mctx.mod2 & M2_SASLAUTH))))
{ /*JLS 05-03-01*/
tttctx->binded = 1; /*JLS 05-03-01*/
return (0); /*JLS 05-03-01*/
@@ -761,7 +761,6 @@
/*
* Maybe we should bind ?
*/
-#ifdef LDCLTSSL
/*
* for SSL client authentication, SASL BIND is used
*/
@@ -804,10 +803,50 @@
return (-1); /*JLS 18-12-00*/
} /*JLS 18-12-00*/
}
- }
- else
- {
-#endif /* LDCLTSSL */
+ } else if ((mctx.mod2 & M2_SASLAUTH) && ((!(tttctx->binded)) ||
+ (mctx.mode & BIND_EACH_OPER))) {
+ void *defaults;
+ LDAPControl **rctrls = NULL;
+
+ if ( mctx.sasl_mech == NULL) {
+ fprintf( stderr, "Please specify the SASL mechanism name when "
+ "using SASL options\n");
+ return (-1);
+ }
+
+ if ( mctx.sasl_secprops != NULL) {
+ ret = ldap_set_option( tttctx->ldapCtx, LDAP_OPT_X_SASL_SECPROPS,
+ (void *) mctx.sasl_secprops );
+
+ if ( ret != LDAP_SUCCESS ) {
+ fprintf( stderr, "Unable to set LDAP_OPT_X_SASL_SECPROPS: %s\n",
+ mctx.sasl_secprops );
+ return (-1);
+ }
+ }
+
+ defaults = ldaptool_set_sasl_defaults( tttctx->ldapCtx, mctx.sasl_flags, mctx.sasl_mech,
+ mctx.sasl_authid, mctx.sasl_username, mctx.passwd, mctx.sasl_realm );
+ if (defaults == NULL) {
+ perror ("malloc");
+ exit (LDAP_NO_MEMORY);
+ }
+
+ ret = ldap_sasl_interactive_bind_ext_s( tttctx->ldapCtx, mctx.bindDN, mctx.sasl_mech,
+ NULL, NULL, mctx.sasl_flags,
+ ldaptool_sasl_interact, defaults, NULL );
+ if (ret != LDAP_SUCCESS ) {
+ tttctx->binded = 0;
+ if (!(mctx.mode & QUIET))
+ ldap_perror( tttctx->ldapCtx, "Bind Error" );
+ if (addErrorStat (ret) < 0)
+ return (-1);
+ } else {
+ tttctx->binded = 1;
+ }
+
+ ldaptool_free_defaults( defaults );
+ } else {
if (((mctx.bindDN != NULL) || (mctx.mod2 & M2_RNDBINDFILE)) && /*03-05-01*/
((!(tttctx->binded)) || (mctx.mode & BIND_EACH_OPER)))
{
@@ -857,9 +896,7 @@
} /*JLS 18-12-00*/
}
}
-#ifdef LDCLTSSL
}
-#endif
/*
* Normal end
@@ -1769,7 +1806,6 @@
if (mctx.mode & VERY_VERBOSE) /*JLS 14-12-00*/
printf ("ldclt[%d]: T%03d: must connect to the server.\n",
mctx.pid, tttctx->thrdNum);
-#ifdef LDCLTSSL
/*
* SSL is enabled ?
*/
@@ -1815,7 +1851,6 @@
}
}
} else {
-#endif
/*
* connection initialization in normal, unencrypted mode
*/
@@ -1827,9 +1862,7 @@
fflush (stdout);
return (-1);
}
-#ifdef LDCLTSSL
}
-#endif
if (mctx.mode & LDAP_V2)
v2v3 = LDAP_VERSION2;
@@ -1848,7 +1881,6 @@
/*
* Bind to the server
*/
-#ifdef LDCLTSSL
/*
* for SSL client authentication, SASL BIND is used
*/
@@ -1867,7 +1899,6 @@
return (-1);
}
} else {
-#endif
ret = ldap_simple_bind_s (cnx, tttctx->bufBindDN, tttctx->bufPasswd);
if (ret != LDAP_SUCCESS)
{
@@ -1882,9 +1913,7 @@
return (-1);
}
}
-#ifdef LDCLTSSL
}
-#endif
/*
* Create the entry
@@ -3276,7 +3305,9 @@
*/
if (connectToServer (tttctx) < 0)
return (-1);
- if (!(tttctx->binded))
+
+ /* don't count failed binds unless counteach option is used */
+ if (!(tttctx->binded) && !(mctx.mode & COUNT_EACH))
return (0);
if (incrementNbOpers (tttctx) < 0)
Index: ldclt.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/ldclt.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ldclt.c 10 Nov 2006 23:45:50 -0000 1.3
+++ ldclt.c 8 Jun 2007 23:19:20 -0000 1.4
@@ -1644,7 +1644,6 @@
}
}
-#ifdef LDCLTSSL
/*
* SSL is enabled ?
*/
@@ -1677,7 +1676,6 @@
}
}
}
-#endif /* LDCLTSSL */
/*
* Specific scenarios initialization...
@@ -1753,6 +1751,8 @@
printf (" ssl");
if (mctx.mode & CLTAUTH)
printf (" ssl_with_client_authentication"); /* BK 23-11-00*/
+ if (mctx.mod2 & M2_SASLAUTH)
+ printf (" saslauth");
if (mctx.mode & SMOOTHSHUTDOWN) /*JLS 17-11-00*/
printf (" smoothshutdown"); /*JLS 17-11-00*/
if (mctx.mode & DONT_SLEEP_DOWN) /*JLS 14-03-01*/
@@ -1857,6 +1857,104 @@
+/* ****************************************************************************
+ FUNCTION : saslSetParam
+ PURPOSE : Sets SASL parameters
+ INPUT : saslarg = value to decode
+ OUTPUT : None.
+ RETURN : -1 if error, 0 otherwise.
+ DESCRIPTION : Copied from Mozilla LDAP C SDK (common.c)
+ *****************************************************************************/
+int
+saslSetParam (
+ char *saslarg)
+{
+ char *attr = NULL;
+ int argnamelen;
+
+ if (saslarg == NULL) {
+ fprintf (stderr, "Error: missing SASL argument\n");
+ return (-1);
+ }
+
+ attr = strchr(saslarg, '=');
+ if (attr == NULL) {
+ fprintf( stderr, "Didn't find \"=\" character in %s\n", saslarg);
+ return (-1);
+ }
+
+ argnamelen = attr - saslarg;
+ attr++;
+
+ if (!strncasecmp(saslarg, "secProp", argnamelen)) {
+ if ( mctx.sasl_secprops != NULL ) {
+ fprintf( stderr, "secProp previously specified\n");
+ return (-1);
+ }
+ if (( mctx.sasl_secprops = strdup(attr)) == NULL ) {
+ perror ("malloc");
+ exit (LDAP_NO_MEMORY);
+ }
+ } else if (!strncasecmp(saslarg, "realm", argnamelen)) {
+ if ( mctx.sasl_realm != NULL ) {
+ fprintf( stderr, "Realm previously specified\n");
+ return (-1);
+ }
+ if (( mctx.sasl_realm = strdup(attr)) == NULL ) {
+ perror ("malloc");
+ exit (LDAP_NO_MEMORY);
+ }
+ } else if (!strncasecmp(saslarg, "authzid", argnamelen)) {
+ if (mctx.sasl_username != NULL) {
+ fprintf( stderr, "Authorization name previously specified\n");
+ return (-1);
+ }
+ if (( mctx.sasl_username = strdup(attr)) == NULL ) {
+ perror ("malloc");
+ exit (LDAP_NO_MEMORY);
+ }
+ } else if (!strncasecmp(saslarg, "authid", argnamelen)) {
+ if ( mctx.sasl_authid != NULL ) {
+ fprintf( stderr, "Authentication name previously specified\n");
+ return (-1);
+ }
+ if (( mctx.sasl_authid = strdup(attr)) == NULL) {
+ perror ("malloc");
+ exit (LDAP_NO_MEMORY);
+ }
+ } else if (!strncasecmp(saslarg, "mech", argnamelen)) {
+ if ( mctx.sasl_mech != NULL ) {
+ fprintf( stderr, "Mech previously specified\n");
+ return (-1);
+ }
+ if (( mctx.sasl_mech = strdup(attr)) == NULL) {
+ perror ("malloc");
+ exit (LDAP_NO_MEMORY);
+ }
+ } else if (!strncasecmp(saslarg, "flags", argnamelen)) {
+ int len = strlen(attr);
+ if (len && !strncasecmp(attr, "automatic", len)) {
+ mctx.sasl_flags = LDAP_SASL_AUTOMATIC;
+ } else if (len && !strncasecmp(attr, "interactive", len)) {
+ mctx.sasl_flags = LDAP_SASL_INTERACTIVE;
+ } else if (len && !strncasecmp(attr, "quiet", len)) {
+ mctx.sasl_flags = LDAP_SASL_QUIET;
+ } else {
+ fprintf(stderr, "Invalid SASL flags value [%s]: must be one of "
+ "automatic, interactive, or quiet\n", attr);
+ return (-1);
+ }
+ } else {
+ fprintf (stderr, "Invalid SASL attribute name %s\n", saslarg);
+ return (-1);
+ }
+ return 0;
+}
+
+
+
+
+
/* New function */ /*JLS 08-03-01*/
/* ****************************************************************************
FUNCTION : decodeReferralParams
@@ -2480,46 +2578,52 @@
/*
* Initialization
*/
- mctx.attrlistNb = 0; /*JLS 15-03-01*/
- mctx.attrsonly = DEF_ATTRSONLY; /*JLS 03-01-01*/
- mctx.baseDN = "o=sun,c=us";
- mctx.baseDNLow = -1; /*JLS 13-11-00*/
- mctx.baseDNHigh = -1; /*JLS 13-11-00*/
- mctx.bindDN = NULL;
- mctx.bindDNLow = -1; /*JLS 05-01-01*/
- mctx.bindDNHigh = -1; /*JLS 05-01-01*/
- mctx.dlf = NULL; /*JLS 23-03-01*/
- mctx.exitStatus = EXIT_OK; /*JLS 25-08-00*/
- mctx.filter = NULL;
- mctx.globStatsCnt = DEF_GLOBAL_NB; /*JLS 08-08-00*/
- mctx.hostname = "localhost";
- mctx.ignErrNb = 0;
- mctx.images = NULL; /*JLS 17-11-00*/
- mctx.imagesDir = DEF_IMAGES_PATH; /*JLS 16-11-00*/
- mctx.inactivMax = DEF_INACTIV_MAX;
- mctx.maxErrors = DEF_MAX_ERRORS;
- mctx.mode = NOTHING;
- mctx.mod2 = NOTHING;
- mctx.nbNoActivity = 0;
- mctx.nbSamples = -1;
- mctx.nbThreads = DEF_NB_THREADS;
- mctx.opListTail = NULL;
- mctx.passwd = NULL;
- mctx.pid = getpid();
- mctx.port = DEF_PORT;
- mctx.randomLow = -1;
- mctx.randomHigh = -1;
- mctx.referral = DEF_REFERRAL; /*JLS 08-03-01*/
- mctx.sampling = DEF_SAMPLING;
- mctx.scope = DEF_SCOPE;
- mctx.slaveConn = 0;
- mctx.slavesNb = 0;
- mctx.timeout = DEF_TIMEOUT;
- mctx.totalReq = -1;
- mctx.waitSec = 0;
- s1ctx.cnxduration = SCALAB01_DEF_CNX_DURATION; /*JLS 12-01-01*/
- s1ctx.maxcnxnb = SCALAB01_DEF_MAX_CNX; /*JLS 12-01-01*/
- s1ctx.wait = SCALAB01_DEF_WAIT_TIME; /*JLS 12-01-01*/
+ mctx.attrlistNb = 0; /*JLS 15-03-01*/
+ mctx.attrsonly = DEF_ATTRSONLY; /*JLS 03-01-01*/
+ mctx.baseDN = "dc=example,dc=com";
+ mctx.baseDNLow = -1; /*JLS 13-11-00*/
+ mctx.baseDNHigh = -1; /*JLS 13-11-00*/
+ mctx.bindDN = NULL;
+ mctx.bindDNLow = -1; /*JLS 05-01-01*/
+ mctx.bindDNHigh = -1; /*JLS 05-01-01*/
+ mctx.dlf = NULL; /*JLS 23-03-01*/
+ mctx.exitStatus = EXIT_OK; /*JLS 25-08-00*/
+ mctx.filter = NULL;
+ mctx.globStatsCnt = DEF_GLOBAL_NB; /*JLS 08-08-00*/
+ mctx.hostname = "localhost";
+ mctx.ignErrNb = 0;
+ mctx.images = NULL; /*JLS 17-11-00*/
+ mctx.imagesDir = DEF_IMAGES_PATH; /*JLS 16-11-00*/
+ mctx.inactivMax = DEF_INACTIV_MAX;
+ mctx.maxErrors = DEF_MAX_ERRORS;
+ mctx.mode = NOTHING;
+ mctx.mod2 = NOTHING;
+ mctx.nbNoActivity = 0;
+ mctx.nbSamples = -1;
+ mctx.nbThreads = DEF_NB_THREADS;
+ mctx.opListTail = NULL;
+ mctx.passwd = NULL;
+ mctx.pid = getpid();
+ mctx.port = DEF_PORT;
+ mctx.randomLow = -1;
+ mctx.randomHigh = -1;
+ mctx.referral = DEF_REFERRAL; /*JLS 08-03-01*/
+ mctx.sampling = DEF_SAMPLING;
+ mctx.sasl_authid = NULL;
+ mctx.sasl_flags = LDAP_SASL_QUIET;
+ mctx.sasl_mech = NULL;
+ mctx.sasl_realm = NULL;
+ mctx.sasl_secprops = NULL;
+ mctx.sasl_username = NULL;
+ mctx.scope = DEF_SCOPE;
+ mctx.slaveConn = 0;
+ mctx.slavesNb = 0;
+ mctx.timeout = DEF_TIMEOUT;
+ mctx.totalReq = -1;
+ mctx.waitSec = 0;
+ s1ctx.cnxduration = SCALAB01_DEF_CNX_DURATION; /*JLS 12-01-01*/
+ s1ctx.maxcnxnb = SCALAB01_DEF_MAX_CNX; /*JLS 12-01-01*/
+ s1ctx.wait = SCALAB01_DEF_WAIT_TIME; /*JLS 12-01-01*/
/*
* Initiates the object *NOW*
@@ -2534,7 +2638,7 @@
* Get options
*/
while ((opt_ret = getopt (argc, argv,
- "a:b:D:e:E:f:h:i:I:n:N:p:qQr:R:s:S:t:T:vVw:W:Z:H")) != EOF)
+ "a:b:D:e:E:f:h:i:I:n:N:o:p:qQr:R:s:S:t:T:vVw:W:Z:H")) != EOF)
switch (opt_ret)
{
case 'a':
@@ -2584,6 +2688,11 @@
case 'N':
mctx.nbSamples = atoi (optarg);
break;
+ case 'o':
+ if (saslSetParam (optarg) < 0)
+ ldcltExit (EXIT_PARAMS);
+ mctx.mod2 |= M2_SASLAUTH;
+ break;
case 'p':
mctx.port = atoi (optarg);
break;
Index: ldclt.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/ldclt.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ldclt.h 10 Nov 2006 23:45:50 -0000 1.2
+++ ldclt.h 8 Jun 2007 23:19:20 -0000 1.3
@@ -282,6 +282,7 @@
#define M2_APPEND 0x00000008 /* -e append */ /*JLS 05-04-01*/
#define M2_RNDBINDFILE 0x00000010 /* -e randombinddnfromfile *//*JLS 03-05-01*/
#define M2_BINDONLY 0x00000020 /* -e bindonly */ /*JLS 04-05-01*/
+#define M2_SASLAUTH 0x00000040 /* -o : SASL authentication */
/*
* Combinatory defines
@@ -536,6 +537,7 @@
char *keydbpin; /* key DB password */ /* BK 23-11-00*/
int lastVal; /* To build filters */ /*JLS 14-03-01*/
ldclt_mutex_t lastVal_mutex; /* Protect lastVal */ /*JLS 14-03-01*/
+ int ldapauth; /* Used to indicate auth type */
int maxErrors; /* Max allowed errors */
unsigned int mode; /* Running mode */
unsigned int mod2; /* Running mode - 2 */ /*JLS 19-03-01*/
@@ -560,6 +562,12 @@
char *rndBindFname; /* Rnd bind file name *//*JLS 03-05-01*/
int referral; /* Referral followed */ /*JLS 08-03-01*/
int sampling; /* Sampling frequency */
+ char *sasl_authid;
+ unsigned sasl_flags;
+ char *sasl_mech;
+ char *sasl_realm;
+ char *sasl_secprops;
+ char *sasl_username;
int scope; /* Searches scope */
int slaveConn; /* Slave has connected */
char *slaves[MAX_SLAVES]; /* Slaves list */
Index: ldclt.use
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/ldclt.use,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ldclt.use 11 Jan 2006 01:54:30 -0000 1.1
+++ ldclt.use 8 Jun 2007 23:19:20 -0000 1.2
@@ -1,6 +1,6 @@
usage: ldclt [-qQvV] [-E <max errors>]
[-b <base DN>] [-h <host>] [-p <port>] [-t <timeout>]
- [-D <bind DN>] [-w <passwd>]
+ [-D <bind DN>] [-w <passwd>] [-o <SASL options>]
[-e <execParams>] [-a <max pending>]
[-n <nb threads>] [-i <nb times>] [-N <nb samples>]
[-I <err number>] [-T <total>]
@@ -14,7 +14,7 @@
The valid options are:
-a Asynchronous mode, with max pending operations.
- -b Give the base DN to use. Default "o=sun,c=us".
+ -b Give the base DN to use. Default "dc=example,dc=com".
-D Bind DN. See -w
-E Max errors allowed. Default 1000.
-e Execution parameters:
@@ -68,6 +68,7 @@
-I Ignore errors (cf. -E). Default none.
-n Number of threads. Default 10.
-N Number of samples (10 seconds each). Default infinite.
+ -o SASL Options.
-p Server port. Default 389.
-P Master port (to check replication). Default 16000.
-q Quiet mode. See option -I.
Index: ldcltU.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/ldcltU.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ldcltU.c 10 Nov 2006 23:45:50 -0000 1.2
+++ ldcltU.c 8 Jun 2007 23:19:20 -0000 1.3
@@ -32,7 +32,7 @@
*
*
* Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2006 Red Hat, Inc.
+ * Copyright (C) 2007 Red Hat, Inc.
* All rights reserved.
* END COPYRIGHT BLOCK **/
@@ -47,7 +47,7 @@
/*
* usage: ldclt [-qQvV] [-E <max errors>]
* [-b <base DN>] [-h <host>] [-p <port>] [-t <timeout>]
- * [-D <bind DN>] [-w <passwd>]
+ * [-D <bind DN>] [-w <passwd>] [-o <SASL option>]
* [-e <execParams>] [-a <max pending>]
* [-n <nb threads>] [-i <nb times>] [-N <nb samples>]
* [-I <err number>] [-T <total>]
@@ -61,7 +61,7 @@
*
* The valid options are:
* -a Asynchronous mode, with max pending operations.
- * -b Give the base DN to use. Default "o=sun,c=us".
+ * -b Give the base DN to use. Default "dc=example,dc=com".
* -D Bind DN. See -w
* -E Max errors allowed. Default 1000.
* -e Execution parameters:
@@ -116,6 +116,7 @@
* -I Ignore errors (cf. -E). Default none.
* -n Number of threads. Default 10.
* -N Number of samples (10 seconds each). Default infinite.
+ * -o SASL Option.
* -p Server port. Default 389.
* -P Master port (to check replication). Default 16000.
* -q Quiet mode. See option -I.
@@ -137,7 +138,7 @@
(void) printf ("\n");
(void) printf ("usage: ldclt [-qQvV] [-E <max errors>]\n");
(void) printf (" [-b <base DN>] [-h <host>] [-p <port>] [-t <timeout>]\n");
- (void) printf (" [-D <bind DN>] [-w <passwd>]\n");
+ (void) printf (" [-D <bind DN>] [-w <passwd>] [-o <SASL option>]\n");
(void) printf (" [-e <execParams>] [-a <max pending>]\n");
(void) printf (" [-n <nb threads>] [-i <nb times>] [-N <nb samples>]\n");
(void) printf (" [-I <err number>] [-T <total>]\n");
@@ -206,6 +207,7 @@
(void) printf (" -I Ignore errors (cf. -E). Default none.\n");
(void) printf (" -n Number of threads. Default 10.\n");
(void) printf (" -N Number of samples (10 seconds each). Default infinite.\n");
+ (void) printf (" -o SASL Option.\n");
(void) printf (" -p Server port. Default 389.\n");
(void) printf (" -P Master port (to check replication). Default 16000.\n");
(void) printf (" -q Quiet mode. See option -I.\n");
Index: scalab01.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/scalab01.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- scalab01.c 10 Nov 2006 23:45:50 -0000 1.2
+++ scalab01.c 8 Jun 2007 23:19:20 -0000 1.3
@@ -513,7 +513,6 @@
/*
* Create the LDAP context
*/
-#ifdef LDCLTSSL
/*
* SSL is enabled ?
*/
@@ -558,7 +557,6 @@
}
else
{
-#endif
/*
* Connection initialization in normal, unencrypted mode
*/
@@ -573,9 +571,7 @@
fflush (stdout);
return (-1);
}
-#ifdef LDCLTSSL
}
-#endif
/*
* Set the LDAP version and other options...
@@ -598,7 +594,6 @@
/*
* Now we could bind
*/
-#ifdef LDCLTSSL
/*
* for SSL client authentication, SASL BIND is used
*/
@@ -620,7 +615,6 @@
}
else
{
-#endif /* LDCLTSSL */
strcpy (bindDN, SCALAB01_SUPER_USER_RDN);
strcat (bindDN, ",");
strcat (bindDN, mctx.baseDN);
@@ -640,9 +634,7 @@
fflush (stdout);
return (-1);
}
-#ifdef LDCLTSSL
}
-#endif
/*
* Normal end...
More information about the Fedora-directory-commits
mailing list