X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fsetup.c;h=408fc8394c265c299f1a6a8b63546a5fa6be90c8;hb=c6ebbc1bf9230aecaa75e5bc6c7157091445a049;hp=8a52b0a0282f91c67112707aaacf86d10c3b07d6;hpb=a04ca4f479f7ba98f15fc01fac6a2af0ae964694;p=citadel.git diff --git a/citadel/setup.c b/citadel/setup.c index 8a52b0a02..408fc8394 100644 --- a/citadel/setup.c +++ b/citadel/setup.c @@ -870,12 +870,22 @@ void edit_value(int curr) case 6: if (setup_type == UI_SILENT) { - if (getenv("ENABLE_UNIX_AUTH")) { - if (!strcasecmp(getenv("ENABLE_UNIX_AUTH"), "yes")) { + const char *auth; + config.c_auth_mode = AUTHMODE_NATIVE; + auth = getenv("ENABLE_UNIX_AUTH"); + if (auth != NULL) + { + if ((strcasecmp(auth, "yes") == 0) || + (strcasecmp(auth, "host") == 0)) + { config.c_auth_mode = AUTHMODE_HOST; } - else { - config.c_auth_mode = AUTHMODE_NATIVE; + else if (strcasecmp(auth, "ldap") == 0){ + config.c_auth_mode = AUTHMODE_LDAP; + } + else if ((strcasecmp(auth, "ldap_ad") == 0) || + (strcasecmp(auth, "active directory") == 0)){ + config.c_auth_mode = AUTHMODE_LDAP_AD; } } }