X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=contrib%2Fweb_ldap%2Fweb_ldap.c;h=8747269551827ee6b1cd5bceb1ae115c51b28dfe;hb=295f3ba0aa4cdce147612da6400f93e8f4b0a79f;hp=c37ef3846c13c9e081b9515162d37afa4a14fbb7;hpb=dd44e1c28f5fa7d0f5809285c9b832150396a5ae;p=openldap diff --git a/contrib/web_ldap/web_ldap.c b/contrib/web_ldap/web_ldap.c index c37ef3846c..8747269551 100644 --- a/contrib/web_ldap/web_ldap.c +++ b/contrib/web_ldap/web_ldap.c @@ -7,19 +7,19 @@ #include "portable.h" -#include #include #include #include #include -#include -#include +#include #include +#include +#include #include #include -#include +#include "ldif.h" #include "maint_form.h" /* for HTML Form manipulations */ /* default values */ @@ -178,12 +178,12 @@ main(int argc, char ** argv) { if (strcompare(getenv("REQUEST_METHOD"),"POST")) { printf("

++ Error - This script should be referenced with a METHOD of POST.\n"); - exit(1); + exit( EXIT_FAILURE ); } if (strcompare(getenv("CONTENT_TYPE"),"application/x-www-form-urlencoded")) { printf("

++ Error - This script can only be used to decode form results. \n"); - exit(1); + exit( EXIT_FAILURE ); } cl = atoi(getenv("CONTENT_LENGTH")); @@ -209,7 +209,7 @@ main(int argc, char ** argv) { printf("%s%s%s", "This script expected a 'FORM' value returned ", "and did not get one. Make sure the HTML used for this ", "script is correct."); - exit(1); + exit( EXIT_FAILURE ); } /* Looking for: @@ -321,27 +321,27 @@ main(int argc, char ** argv) { time(&now); sprintf(temp,"\n==< Results >==\n\n"); fputs(temp,logfp); - sprintf(temp,"** performing ldap_open at %s\n", ctime(&now)); + sprintf(temp,"** performing ldap_init at %s\n", ctime(&now)); fputs(temp,logfp); fflush(logfp); fclose(logfp); } } - if ( (ld = ldap_open(ldap_data.servername, ldap_data.ldap_port_num) ) == NULL) + if ( (ld = ldap_init(ldap_data.servername, ldap_data.ldap_port_num) ) == NULL) { - printf("ldap_open error\n"); + printf("ldap_init error\n"); if (ldap_data.debug != 0) { if ((logfp = fopen("web_ldap.log","a")) == 0) { } else { - sprintf(temp,"++ ldap_open error\n"); + sprintf(temp,"++ ldap_init error\n"); fputs(temp,logfp); fflush(logfp); fclose(logfp); } } printf("\n\n"); - exit(1); + exit( EXIT_FAILURE ); } /*authenticate as nobody */ @@ -373,7 +373,7 @@ main(int argc, char ** argv) { } } printf("\n\n"); - exit(1); + exit( EXIT_FAILURE ); } printf("Directory Lookup Results\n

\n");