]> git.sur5r.net Git - openldap/blobdiff - contrib/web_ldap/web_ldap.c
Add cn=monitor, cn=config, cn=schema to namingContexts.
[openldap] / contrib / web_ldap / web_ldap.c
index f08cd6b9e016987af7fabcc756f0003db9838e69..37376d1ec9f0c5be751dc014ae27985699cd9732 100644 (file)
@@ -5,23 +5,33 @@
  * Jens Moller - Dec 11, 1998
  */
 
-#include <stdlib.h>
+#include "portable.h"
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <time.h>
+
+#include <ac/stdlib.h>
+#include <ac/string.h>
+#include <ac/time.h>
+#include <ac/unistd.h>
+
 #include <lber.h>
 #include <ldap.h>
 #include <ldif.h> 
 #include "maint_form.h" /* for HTML Form manipulations */
 
 /* default values */
+#ifndef LDAP_PORT
 #define LDAP_PORT 389
-#define SERVER "ldap.bigfoot.com" 
+#endif
+#ifndef SERVER
+#define SERVER "ldap.bigfoot.com"
+#endif
+#ifndef CONFIG
 #define CONFIG "web_ldap.cfg"
+#endif
 
 #define MAX_ATTRIB 100
 #define MAX_CHARS  256
@@ -558,7 +568,7 @@ void upcase_string(char *array,
                   char *uparray) {
    int  i;
    for (i=0; i < strlen(array); i++) {
-      uparray[i] = toupper(array[i]);
+      uparray[i] = toupper((unsigned char) array[i]);
       uparray[i + 1] = 0;
    }
    return;