X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fconfig.c;h=dad9eaee1437075d76e8f1a5e84b2fdf98f24fc1;hb=4eb74b26380dfde31c86c685f0589e0c653aebf0;hp=30989674216419f9199770a92828db18bfacf3a8;hpb=e6cfe7f6bbcfb1af0a47ea167e7185d71343748f;p=citadel.git diff --git a/citadel/config.c b/citadel/config.c index 309896742..dad9eaee1 100644 --- a/citadel/config.c +++ b/citadel/config.c @@ -1,9 +1,23 @@ /* * $Id$ * - * This function reads the citadel.config file. It should be called at - * the beginning of EVERY Citadel program. + * Read and write the citadel.config file * + * Copyright (c) 1987-2009 by the citadel.org team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "sysdep.h" @@ -79,6 +93,14 @@ void get_config(void) { exit(CTDLEXIT_LIBCITADEL); } + /* Only allow LDAP auth mode if we actually have LDAP support */ +#ifndef HAVE_LDAP + if ((config.c_auth_mode == AUTHMODE_LDAP) || (config.c_auth_mode == AUTHMODE_LDAP_AD)) { + fprintf(stderr, "Your system is configured for LDAP authentication,\n" + "but you are running a server built without OpenLDAP support.\n"); + exit(CTDL_EXIT_UNSUP_AUTH); + } +#endif /* Check to see whether 'setup' must first be run to update data file formats */ if (config.c_setup_level < REV_MIN) {