Fix asking for credentials for non-LDAP provisions.
authorAndrew Bartlett <abartlet@samba.org>
Tue, 15 Jul 2008 08:44:58 +0000 (18:44 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 15 Jul 2008 08:44:58 +0000 (18:44 +1000)
(This used to be commit 78416f4840df4f8d1f9cc5e46a48b19c86888050)

source4/scripting/python/samba/provision.py

index f27cc17290fa23359373d05ee3cc811ff504aa0f..6102dc77ffa4435d293cbea3a8fdae0f986c9f95 100644 (file)
@@ -605,7 +605,7 @@ def setup_secretsdb(path, setup_path, session_info, credentials, lp):
                       lp=lp)
     secrets_ldb.load_ldif_file_add(setup_path("secrets.ldif"))
 
-    if credentials.authentication_requested:
+    if credentials is not None and credentials.authentication_requested():
         if credentials.get_bind_dn() is not None:
             setup_add_ldif(secrets_ldb, setup_path("secrets_simple_ldap.ldif"), {
                     "LDAPMANAGERDN": credentials.get_bind_dn(),