s4-libnet: Use SetUserInfo2 to set the account flags
authorAndreas Schneider <asn@samba.org>
Tue, 4 Oct 2016 16:09:54 +0000 (18:09 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 6 Oct 2016 00:30:16 +0000 (02:30 +0200)
[MS-WKST] states that SetUserInfo2 should be used to set the account
flags. We already call this a few lines down to set the password.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libnet/libnet_join.c

index 86130ca..9436cc9 100644 (file)
@@ -1413,11 +1413,11 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
        ZERO_STRUCT(user_info.info16);
        user_info.info16.acct_flags = acct_flags;
 
-       status = dcerpc_samr_SetUserInfo(b, mem_ctx,
-                                        &user_pol,
-                                        16,
-                                        &user_info,
-                                        &result);
+       status = dcerpc_samr_SetUserInfo2(b, mem_ctx,
+                                         &user_pol,
+                                         16,
+                                         &user_info,
+                                         &result);
        if (!NT_STATUS_IS_OK(status)) {
                dcerpc_samr_DeleteUser(b, mem_ctx,
                                       &user_pol,