]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/config.c
Initialize terminating bv_len in slapi_int_ldapmods2modifications
[openldap] / servers / slurpd / config.c
index 6f3df19a0f95444217954371795a6984a7248d74..ad78eda888aad82ef5b6c829c12e6ea08cf11969 100644 (file)
@@ -1,10 +1,20 @@
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2003 The OpenLDAP Foundation.
+ * Portions Copyright 2003 Mark Benson.
+ * Portions Copyright 2002 John Morrissey.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
-/*
- * Copyright (c) 1996 Regents of the University of Michigan.
+/* Portions Copyright (c) 1996 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
  * software without specific prior written permission. This software
  * is provided ``as is'' without express or implied warranty.
  */
+/* ACKNOWLEDGEMENTS:
+ * This work was originally developed by the University of Michigan
+ * (as part of U-MICH LDAP).  Additional signficant contributors
+ * include:
+ *    John Morrissey
+ *    Mark Benson
+ */
 
 
 /*
@@ -64,8 +81,10 @@ slurpd_read_config(
     FILE       *fp;
     char       *line;
 
+       if ( cargv == NULL ) {
        cargv = ch_calloc( ARGS_STEP + 1, sizeof(*cargv) );
        cargv_size = ARGS_STEP + 1;
+       }
 
 #ifdef NEW_LOGGING
     LDAP_LOG ( CONFIG, ARGS, 
@@ -521,10 +540,10 @@ parse_replica_line(
            fprintf( stderr, "slurpd no longer supports Kerberos.\n" );
            exit( EXIT_FAILURE );
            } else if ( !strcasecmp( val, SIMPLESTR )) {
-               ri->ri_bind_method = AUTH_SIMPLE;
+               ri->ri_bind_method = LDAP_AUTH_SIMPLE;
                gots |= GOT_METHOD;
            } else if ( !strcasecmp( val, SASLSTR )) {
-               ri->ri_bind_method = AUTH_SASL;
+               ri->ri_bind_method = LDAP_AUTH_SASL;
                gots |= GOT_METHOD;
            } else {
                ri->ri_bind_method = -1;
@@ -573,14 +592,13 @@ parse_replica_line(
        }
     }
     
-       if ( ri->ri_bind_method == AUTH_SASL) {
+       if ( ri->ri_bind_method == LDAP_AUTH_SASL) {
                if ((gots & GOT_MECH) == 0) {
                        fprintf( stderr, "Error: \"replica\" line needs SASLmech flag in " );
                        fprintf( stderr, "slapd config file, line %d\n", lineno );
                        return -1;
                }
-       }
-       else if ( gots != GOT_ALL ) {
+       } else if ( gots != GOT_ALL ) {
                fprintf( stderr, "Error: Malformed \"replica\" line in slapd " );
                fprintf( stderr, "config file, line %d\n", lineno );
                return -1;