r448: Fix 'auth' in Samba4, by making 'auth methods' a normal smb.conf
authorAndrew Bartlett <abartlet@samba.org>
Sun, 2 May 2004 11:45:01 +0000 (11:45 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:51:43 +0000 (12:51 -0500)
paramter, without special links to other variables.

When we get 'server role' ideas back into Samba4, we can fix this properly.

The default is:

guest, sam_ignoredomain

which is the expected behaviour for a stand-alone server.

Andrew Bartlett
(This used to be commit 56ebc4275fedc8141d43a4ae9a4f4f0e1eccaf49)

source4/auth/auth.c
source4/param/loadparm.c

index 714bb37c6d7a9c1ce2d63db0c4600f555383536a..720b8149bda2f6f4be90f8f7f8b3f39553c2f596 100644 (file)
@@ -377,47 +377,6 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context)
                return NT_STATUS_NO_MEMORY;
        }
 
-       if (auth_method_list == NULL) {
-               switch (lp_security()) 
-               {
-               case SEC_DOMAIN:
-                       DEBUG(5,("Making default auth method list for security=domain\n"));
-                       auth_method_list = str_list_make("guest sam winbind:ntdomain", NULL);
-                       break;
-               case SEC_SERVER:
-                       DEBUG(5,("Making default auth method list for security=server\n"));
-                       auth_method_list = str_list_make("guest sam smbserver", NULL);
-                       break;
-               case SEC_USER:
-                       if (lp_encrypted_passwords()) { 
-                               DEBUG(5,("Making default auth method list for security=user, encrypt passwords = yes\n"));
-                               auth_method_list = str_list_make("guest sam", NULL);
-                       } else {
-                               DEBUG(5,("Making default auth method list for security=user, encrypt passwords = no\n"));
-                               auth_method_list = str_list_make("guest unix", NULL);
-                       }
-                       break;
-               case SEC_SHARE:
-                       if (lp_encrypted_passwords()) {
-                               DEBUG(5,("Making default auth method list for security=share, encrypt passwords = yes\n"));
-                               auth_method_list = str_list_make("guest sam", NULL);
-                       } else {
-                               DEBUG(5,("Making default auth method list for security=share, encrypt passwords = no\n"));
-                               auth_method_list = str_list_make("guest unix", NULL);
-                       }
-                       break;
-               case SEC_ADS:
-                       DEBUG(5,("Making default auth method list for security=ADS\n"));
-                       auth_method_list = str_list_make("guest sam winbind:ntdomain", NULL);
-                       break;
-               default:
-                       DEBUG(5,("Unknown auth method!\n"));
-                       return NT_STATUS_UNSUCCESSFUL;
-               }
-       } else {
-               DEBUG(5,("Using specified auth order\n"));
-       }
-       
        if (!NT_STATUS_IS_OK(nt_status = make_auth_context_text_list(auth_context, auth_method_list))) {
                str_list_free(&auth_method_list);
                return nt_status;
index 90fc86380e86d5220fd21639b12f6ede4bad65e0..7218b2ecab951cde59dca027006ee5c1d3cc2b9a 100644 (file)
@@ -932,6 +932,8 @@ static void init_globals(void)
 
        Globals.dcerpc_ep_servers = str_list_make("epmapper srvsvc wkssvc rpcecho", NULL);
 
+       Globals.AuthMethods = str_list_make("guest sam_ignoredomain", NULL);
+
        string_set(&Globals.szSMBPasswdFile, dyn_SMB_PASSWD_FILE);
        string_set(&Globals.szPrivateDir, dyn_PRIVATE_DIR);