X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslurpd%2Fconfig.c;h=ad78eda888aad82ef5b6c829c12e6ea08cf11969;hb=71dfd57e75a98d02c26ec823554035e5feae1675;hp=6f3df19a0f95444217954371795a6984a7248d74;hpb=44e32b3f7f30c0a70704876520e53f33ec0ce162;p=openldap diff --git a/servers/slurpd/config.c b/servers/slurpd/config.c index 6f3df19a0f..ad78eda888 100644 --- a/servers/slurpd/config.c +++ b/servers/slurpd/config.c @@ -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 . + * + * 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 + * . */ -/* - * 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 @@ -14,6 +24,13 @@ * 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;