s3-samr: fix SAMR_FIELD_PASSWORD callers.
authorGünther Deschner <gd@samba.org>
Thu, 4 Dec 2008 17:15:03 +0000 (18:15 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 12 Dec 2008 11:31:01 +0000 (12:31 +0100)
Guenther
(cherry picked from commit 2edf2cef9cb43a65ce8ee8e8a782d248856030dd)

source/lib/netapi/user.c
source/rpc_server/srv_samr_nt.c
source/utils/net_rpc.c

index 2abc25d6813c84670d96144977ff4f34c64033b3..d7fe392526c39b4534124f5640fca860d34f53f1 100644 (file)
@@ -46,7 +46,7 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX,
                fields_present |= SAMR_FIELD_ACCOUNT_NAME;
        }
        if (infoX->usriX_password) {
-               fields_present |= SAMR_FIELD_PASSWORD;
+               fields_present |= SAMR_FIELD_NT_PASSWORD_PRESENT;
        }
        if (infoX->usriX_flags) {
                fields_present |= SAMR_FIELD_ACCT_FLAGS;
index b34b47c2cf372d564c774a95279006345975b64f..9e603df276eaa9004298777268c471b2a5e26590 100644 (file)
@@ -3966,8 +3966,8 @@ static NTSTATUS set_user_info_23(TALLOC_CTX *mem_ctx,
                return NT_STATUS_ACCESS_DENIED;
        }
 
-       if ((id23->info.fields_present & SAMR_FIELD_PASSWORD) ||
-           (id23->info.fields_present & SAMR_FIELD_PASSWORD2)) {
+       if ((id23->info.fields_present & SAMR_FIELD_NT_PASSWORD_PRESENT) ||
+           (id23->info.fields_present & SAMR_FIELD_LM_PASSWORD_PRESENT)) {
 
                DEBUG(5, ("Attempting administrator password change (level 23) for user %s\n",
                          pdb_get_username(pwd)));
index bb63a57caa3970276a6ff282924cfa74f0bf1c4d..65e0a49d3603005b7bef6ed5db71bd6922127cc2 100644 (file)
@@ -5255,7 +5255,7 @@ static NTSTATUS rpc_trustdom_add_internals(struct net_context *c,
                                      NULL, NULL, NULL, NULL, NULL,
                                      NULL, NULL, NULL, NULL, &parameters,
                                      0, 0, ACB_DOMTRUST,
-                                     SAMR_FIELD_ACCT_FLAGS | SAMR_FIELD_PASSWORD,
+                                     SAMR_FIELD_ACCT_FLAGS | SAMR_FIELD_NT_PASSWORD_PRESENT,
                                      hours,
                                      0, 0, 0, 0, 0, 0, 0,
                                      &crypt_pwd);