r4337: Produce a slightly different error message is lanman authentication is
authorAndrew Bartlett <abartlet@samba.org>
Thu, 23 Dec 2004 02:16:57 +0000 (02:16 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:53:45 +0000 (10:53 -0500)
disabled, rather than simply unavailable.

Andrew Bartlett

source/smbd/chgpasswd.c

index cc27d3baca044d60ff788ca333dd066c29f80416..540acfc22509629214626cca3d68f6fa60e20aba 100644 (file)
@@ -817,9 +817,14 @@ static NTSTATUS check_oem_password(const char *user,
                pdb_free_sam(&sampass);
                return NT_STATUS_WRONG_PASSWORD;        
        } else if (lm_pass_set) {
-               DEBUG(1, ("LM password change supplied for user %s, but we have no LanMan password to check it with\n", 
-                         user));
-               pdb_free_sam(&sampass);
+               if (lp_lanman_auth()) {
+                       DEBUG(1, ("LM password change supplied for user %s, but we have no LanMan password to check it with\n", 
+                                 user));
+               } else {
+                       DEBUG(1, ("LM password change supplied for user %s, but we have disabled LanMan authentication\n", 
+                                 user));
+               }
+                       pdb_free_sam(&sampass);
                return NT_STATUS_WRONG_PASSWORD;
        } else {
                DEBUG(1, ("password change requested for user %s, but no password supplied!\n",