]> git.sur5r.net Git - openldap/blobdiff - clients/rcpt500/main.c
Added support for ldap.conf file. See ldap.conf(5) for details.
[openldap] / clients / rcpt500 / main.c
index 3e65ac233b6467731c569e486c1a6d2f8c901098..4a73a2f53d40de3bf8ff29fb2ae86f693de6633a 100644 (file)
@@ -6,31 +6,30 @@
  * All Rights Reserved
  */
 
+#include "portable.h"
+
 #include <stdio.h>
 #include <stdlib.h>
-#include <syslog.h>
-#include <string.h>
-#include <ctype.h>
 
-#include "portable.h"
+#include <ac/ctype.h>
+#include <ac/string.h>
+#include <ac/syslog.h>
+
 #include "ldapconfig.h"
 #include "rcpt500.h"
 
-#ifdef ultrix
-extern char *strdup();
-#endif
-
 int dosyslog = 0;
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
 int do_cldap = 0;
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
+
 int derefaliases = 1;
 int sizelimit = RCPT500_SIZELIMIT;
 int rdncount = RCPT500_RDNCOUNT;
 int ldapport = 0;
-char *ldaphost = LDAPHOST;
-char *searchbase = RCPT500_BASE;
-char *dapuser = RCPT500_BINDDN;
+char *ldaphost = NULL;
+char *searchbase = NULL;
+char *dapuser = NULL;
 char *filterfile = FILTERFILE;
 char *templatefile = TEMPLATEFILE;
 char reply[ MAXSIZE * RCPT500_LISTLIMIT ];
@@ -78,11 +77,12 @@ main( argc, argv )
            dosyslog = 1;
            break;
        case 'U':
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
            do_cldap = 1;
-#else /* CLDAP */
-           fprintf( stderr, "Compile with -DCLDAP for -U support\n" );
-#endif /* CLDAP */
+#else /* LDAP_CONNECTIONLESS */
+           fprintf( stderr,
+                       "Compile with -DLDAP_CONNECTIONLESS for -U support\n" );
+#endif /* LDAP_CONNECTIONLESS */
            break;      
        case 'b':
            searchbase = optarg;
@@ -364,7 +364,7 @@ find_command( text, argp )
 
     p = text;
     for ( s = argbuf; *p != '\0'; ++p ) {
-       *s++ = tolower( *p );
+       *s++ = TOLOWER( *p );
     }
     *s = '\0';