The branch, master has been updated
       via  e065ecc... s4-smbtorture: add smbcli_rap_netuserpasswordset2().
       via  93d2e91... rap: add rap_NetUserPasswordSet2() to IDL.
      from  4afdb5a... s3: move BASE_RID to main includes.h (in preparation to 
separate passdb).

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e065ecc6b3680473cce46136af0772850fc0aee9
Author: Günther Deschner <g...@samba.org>
Date:   Fri May 7 15:40:49 2010 +0200

    s4-smbtorture: add smbcli_rap_netuserpasswordset2().
    
    Guenther

commit 93d2e91b901a2fea3ea87667fbb2e609029ae2c5
Author: Günther Deschner <g...@samba.org>
Date:   Thu May 6 18:08:41 2010 +0200

    rap: add rap_NetUserPasswordSet2() to IDL.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 librpc/idl/rap.idl        |   10 ++++++++
 source4/torture/rap/rap.c |   55 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/rap.idl b/librpc/idl/rap.idl
index 604ed64..8ab9fd2 100644
--- a/librpc/idl/rap.idl
+++ b/librpc/idl/rap.idl
@@ -754,6 +754,16 @@ interface rap
                [out,switch_is(level)] rap_printdest_info info
        );
 
+       [public] void rap_NetUserPasswordSet2(
+               [in] astring UserName,
+               [in] [charset(DOS)] uint8 OldPassword[16],
+               [in] [charset(DOS)] uint8 NewPassword[16],
+               [in] uint16 EncryptedPassword,
+               [in] uint16 RealPasswordLength,
+               [out] rap_status status,
+               [out] uint16 convert
+       );
+
 
        /* Parameter description strings for RAP calls   */
        /* Names are defined name for RAP call with _REQ */
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 39a4432..0e9900a 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -1593,6 +1593,61 @@ NTSTATUS smbcli_rap_netprintdestgetinfo(struct 
smbcli_tree *tree,
        return result;
 }
 
+NTSTATUS smbcli_rap_netuserpasswordset2(struct smbcli_tree *tree,
+                                       struct smb_iconv_convenience 
*iconv_convenience,
+                                       TALLOC_CTX *mem_ctx,
+                                       struct rap_NetUserPasswordSet2 *r)
+{
+       struct rap_call *call;
+       NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+       if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, 
RAP_WUserPasswordSet2))) {
+               return NT_STATUS_NO_MEMORY;
+       }
+
+       rap_cli_push_string(call, r->in.UserName);
+       rap_cli_push_paramdesc(call, 'b');
+       rap_cli_push_paramdesc(call, '1');
+       rap_cli_push_paramdesc(call, '6');
+       ndr_push_bytes(call->ndr_push_param, (uint8_t *)r->in.OldPassword, 16);
+       rap_cli_push_paramdesc(call, 'b');
+       rap_cli_push_paramdesc(call, '1');
+       rap_cli_push_paramdesc(call, '6');
+       ndr_push_bytes(call->ndr_push_param, (uint8_t *)r->in.NewPassword, 16);
+       rap_cli_push_word(call, r->in.EncryptedPassword);
+       rap_cli_push_word(call, r->in.RealPasswordLength);
+
+       rap_cli_expect_format(call, "");
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(rap_NetUserPasswordSet2, r);
+       }
+
+       result = rap_cli_do_call(tree, iconv_convenience, call);
+
+       if (!NT_STATUS_IS_OK(result))
+               goto done;
+
+       result = NT_STATUS_INVALID_PARAMETER;
+
+       NDR_GOTO(ndr_pull_rap_status(call->ndr_pull_param, NDR_SCALARS, 
&r->out.status));
+       NDR_GOTO(ndr_pull_uint16(call->ndr_pull_param, NDR_SCALARS, 
&r->out.convert));
+
+       result = NT_STATUS_OK;
+
+       if (!NT_STATUS_IS_OK(result)) {
+               goto done;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(rap_NetUserPasswordSet2, r);
+       }
+
+ done:
+       talloc_free(call);
+       return result;
+}
+
 static bool test_netservergetinfo(struct torture_context *tctx, 
                                  struct smbcli_state *cli)
 {


-- 
Samba Shared Repository

Reply via email to