s3-samr: fix return code for invalid password sets in SetUserInfo.
authorGünther Deschner <gd@samba.org>
Thu, 27 Nov 2008 00:25:46 +0000 (01:25 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 27 Nov 2008 17:28:59 +0000 (18:28 +0100)
Guenther

source3/rpc_server/srv_samr_nt.c

index 537d58fac1019d46798dec4080d6e8adc665efac..332d41b1b04fe8b19c8baac7c358f543a966173d 100644 (file)
@@ -4053,7 +4053,7 @@ static NTSTATUS set_user_info_23(TALLOC_CTX *mem_ctx,
                                &len,
                                STR_UNICODE)) {
                TALLOC_FREE(pwd);
-               return NT_STATUS_INVALID_PARAMETER;
+               return NT_STATUS_WRONG_PASSWORD;
        }
 
        if (!pdb_set_plaintext_passwd (pwd, plaintext_buf)) {
@@ -4410,7 +4410,7 @@ NTSTATUS _samr_SetUserInfo(pipes_struct *p,
 
                        if (!set_user_info_pw(info->info24.password.data, pwd,
                                              switch_value)) {
-                               status = NT_STATUS_ACCESS_DENIED;
+                               status = NT_STATUS_WRONG_PASSWORD;
                        }
                        break;
 
@@ -4431,7 +4431,7 @@ NTSTATUS _samr_SetUserInfo(pipes_struct *p,
                        }
                        if (!set_user_info_pw(info->info25.password.data, pwd,
                                              switch_value)) {
-                               status = NT_STATUS_ACCESS_DENIED;
+                               status = NT_STATUS_WRONG_PASSWORD;
                        }
                        break;
 
@@ -4447,7 +4447,7 @@ NTSTATUS _samr_SetUserInfo(pipes_struct *p,
 
                        if (!set_user_info_pw(info->info26.password.data, pwd,
                                              switch_value)) {
-                               status = NT_STATUS_ACCESS_DENIED;
+                               status = NT_STATUS_WRONG_PASSWORD;
                        }
                        break;