]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Renamed auth_ntlm_use_winbind to auth_use_winbind,
authorTimo Sirainen <tss@iki.fi>
Wed, 13 Aug 2008 20:43:29 +0000 (16:43 -0400)
committerTimo Sirainen <tss@iki.fi>
Wed, 13 Aug 2008 20:43:29 +0000 (16:43 -0400)
which also determines if GSS-SPNEGO is handled by GSSAPI or winbind.

--HG--
branch : HEAD

dovecot-example.conf
src/auth/mech-gssapi.c
src/auth/mech.c
src/master/auth-process.c
src/master/master-settings.c
src/master/master-settings.h

index 6910ca1ecbe2cb06b4cea52a0ddbf3b99f2d9443..47e6fd6a1a3819f12c4b5c50dc4a9cda8155f9f6 100644 (file)
@@ -786,9 +786,9 @@ protocol lda {
 # default (usually /etc/krb5.keytab) if not specified.
 #auth_krb5_keytab = 
 
-# Do NTLM authentication using Samba's winbind daemon and ntlm_auth helper.
-# <doc/wiki/Authentication/Mechanisms/Winbind.txt>
-#auth_ntlm_use_winbind = no
+# Do NTLM and GSS-SPNEGO authentication using Samba's winbind daemon and
+# ntlm_auth helper. <doc/wiki/Authentication/Mechanisms/Winbind.txt>
+#auth_use_winbind = no
 
 # Path for Samba's ntlm_auth helper binary.
 #auth_winbind_helper_path = /usr/bin/ntlm_auth
index f88ad54cbf48da05be163068c75bd9a7427cf2d9..d932e778d212f3833b382c412b95cee9daf25a32 100644 (file)
@@ -578,7 +578,8 @@ void mech_gssapi_init(void)
 {
        mech_register_module(&mech_gssapi);
 #ifdef HAVE_GSSAPI_SPNEGO
-       mech_register_module(&mech_gssapi_spnego);
+       if (getenv("NTLM_USE_WINBIND") == NULL)
+               mech_register_module(&mech_gssapi_spnego);
 #endif
 }
 
@@ -586,7 +587,8 @@ void mech_gssapi_deinit(void)
 {
        mech_unregister_module(&mech_gssapi);
 #ifdef HAVE_GSSAPI_SPNEGO
-       mech_unregister_module(&mech_gssapi_spnego);
+       if (getenv("NTLM_USE_WINBIND") == NULL)
+               mech_unregister_module(&mech_gssapi_spnego);
 #endif
 }
 #endif
index f357602644c540f04285a2358da2fd5a761741be..f1dc784751b57b2cad2e1e59268b62d44e2fc50f 100644 (file)
@@ -88,20 +88,21 @@ void mech_init(void)
        mech_register_module(&mech_apop);
        mech_register_module(&mech_cram_md5);
        mech_register_module(&mech_digest_md5);
-       if (getenv("NTLM_USE_WINBIND") != NULL)
+       if (getenv("USE_WINBIND") != NULL) {
                mech_register_module(&mech_winbind_ntlm);
-       else
+               mech_register_module(&mech_winbind_spnego);
+       } else {
                mech_register_module(&mech_ntlm);
-       mech_register_module(&mech_winbind_spnego);
+#if defined(HAVE_GSSAPI_SPNEGO) && defined(BUILTIN_GSSAPI)
+               mech_register_module(&mech_gssapi_spnego);
+#endif
+       }
        mech_register_module(&mech_otp);
        mech_register_module(&mech_skey);
        mech_register_module(&mech_rpa);
        mech_register_module(&mech_anonymous);
 #ifdef BUILTIN_GSSAPI
        mech_register_module(&mech_gssapi);
-#ifdef HAVE_GSSAPI_SPNEGO
-       mech_register_module(&mech_gssapi_spnego);
-#endif
 #endif
 }
 
@@ -112,19 +113,20 @@ void mech_deinit(void)
        mech_unregister_module(&mech_apop);
        mech_unregister_module(&mech_cram_md5);
        mech_unregister_module(&mech_digest_md5);
-       if (getenv("NTLM_USE_WINBIND") != NULL)
+       if (getenv("NTLM_USE_WINBIND") != NULL) {
                mech_unregister_module(&mech_winbind_ntlm);
-       else
+               mech_unregister_module(&mech_winbind_spnego);
+       } else {
                mech_unregister_module(&mech_ntlm);
-       mech_unregister_module(&mech_winbind_spnego);
+#if defined(HAVE_GSSAPI_SPNEGO) && defined(BUILTIN_GSSAPI)
+               mech_unregister_module(&mech_gssapi_spnego);
+#endif
+       }
        mech_unregister_module(&mech_otp);
        mech_unregister_module(&mech_skey);
        mech_unregister_module(&mech_rpa);
        mech_unregister_module(&mech_anonymous);
 #ifdef BUILTIN_GSSAPI
        mech_unregister_module(&mech_gssapi);
-#ifdef HAVE_GSSAPI_SPNEGO
-       mech_unregister_module(&mech_gssapi_spnego);
-#endif
 #endif
 }
index 9d185397e89bd64dec6bc54324e5d3aa96a75882..5846b54ba73bf0206f6e4fa0e66ef6ff75982be1 100644 (file)
@@ -485,8 +485,8 @@ static void auth_set_environment(struct auth_settings *set)
                env_put("SSL_REQUIRE_CLIENT_CERT=1");
        if (set->ssl_username_from_cert)
                env_put("SSL_USERNAME_FROM_CERT=1");
-       if (set->ntlm_use_winbind)
-               env_put("NTLM_USE_WINBIND=1");
+       if (set->use_winbind)
+               env_put("USE_WINBIND=1");
        if (*set->krb5_keytab != '\0') {
                /* Environment may be used by Kerberos 5 library directly,
                   although we also try to use it directly as well */
index 8d210b22eb81b4238cebbb27295543ea0a243ceb..5caa67bdbe3407d2f2b2c6483689a9513d7933f2 100644 (file)
@@ -90,7 +90,7 @@ static struct setting_def auth_setting_defs[] = {
        DEF_BOOL(debug_passwords),
        DEF_BOOL(ssl_require_client_cert),
        DEF_BOOL(ssl_username_from_cert),
-       DEF_BOOL(ntlm_use_winbind),
+       DEF_BOOL(use_winbind),
 
        DEF_INT(count),
        DEF_INT(worker_max_count),
@@ -327,7 +327,7 @@ struct auth_settings default_auth_settings = {
        MEMBER(debug_passwords) FALSE,
        MEMBER(ssl_require_client_cert) FALSE,
        MEMBER(ssl_username_from_cert) FALSE,
-       MEMBER(ntlm_use_winbind) FALSE,
+       MEMBER(use_winbind) FALSE,
 
        MEMBER(count) 1,
        MEMBER(worker_max_count) 30,
index 8b4c339627ae0c37bf7c4874b6e0100942239d77..c055d352abff65763d89956acb0b39b97912c8f0 100644 (file)
@@ -217,7 +217,7 @@ struct auth_settings {
        bool verbose, debug, debug_passwords;
        bool ssl_require_client_cert;
        bool ssl_username_from_cert;
-       bool ntlm_use_winbind;
+       bool use_winbind;
 
        unsigned int count;
        unsigned int worker_max_count;