svn commit: samba r26285 - in branches/SAMBA_4_0/source: .
librpc/idl rpc_server/netlogon torture/rpc
gd at samba.org
gd at samba.org
Tue Dec 4 09:41:28 GMT 2007
Author: gd
Date: 2007-12-04 09:41:28 +0000 (Tue, 04 Dec 2007)
New Revision: 26285
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26285
Log:
Add IDL and torture test for netr_ServerPasswordGet().
Guenther
Modified:
branches/SAMBA_4_0/source/librpc/idl/netlogon.idl
branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
branches/SAMBA_4_0/source/samba4-knownfail
branches/SAMBA_4_0/source/torture/rpc/netlogon.c
Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/netlogon.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/netlogon.idl 2007-12-04 05:32:23 UTC (rev 26284)
+++ branches/SAMBA_4_0/source/librpc/idl/netlogon.idl 2007-12-04 09:41:28 UTC (rev 26285)
@@ -1112,7 +1112,15 @@
/****************/
/* Function 0x1f */
- WERROR netr_NETRSERVERPASSWORDGET();
+ WERROR netr_ServerPasswordGet(
+ [in] [string,charset(UTF16)] uint16 *server_name,
+ [in] [string,charset(UTF16)] uint16 account_name[],
+ [in] netr_SchannelType secure_channel_type,
+ [in] [string,charset(UTF16)] uint16 computer_name[],
+ [in,ref] netr_Authenticator *credential,
+ [out,ref] netr_Authenticator *return_authenticator,
+ [out,ref] samr_Password *password
+ );
/****************/
/* Function 0x20 */
Modified: branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c 2007-12-04 05:32:23 UTC (rev 26284)
+++ branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c 2007-12-04 09:41:28 UTC (rev 26285)
@@ -946,11 +946,11 @@
-/*
- netr_NETRSERVERPASSWORDGET
+/*
+ netr_ServerPasswordGet
*/
-static WERROR dcesrv_netr_NETRSERVERPASSWORDGET(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct netr_NETRSERVERPASSWORDGET *r)
+static WERROR dcesrv_netr_ServerPasswordGet(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct netr_ServerPasswordGet *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
Modified: branches/SAMBA_4_0/source/samba4-knownfail
===================================================================
--- branches/SAMBA_4_0/source/samba4-knownfail 2007-12-04 05:32:23 UTC (rev 26284)
+++ branches/SAMBA_4_0/source/samba4-knownfail 2007-12-04 09:41:28 UTC (rev 26285)
@@ -29,5 +29,6 @@
RPC-NETLOGON.*/DsrGetDcSiteCoverageW
RPC-NETLOGON.*/DsRAddressToSitenamesW
RPC-NETLOGON.*/DsRAddressToSitenamesExW
+RPC-NETLOGON.*/GetPassword
BASE-CHARSET.*/Testing partial surrogate
.*NET-API-DELSHARE.* # DelShare isn't implemented yet
Modified: branches/SAMBA_4_0/source/torture/rpc/netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/netlogon.c 2007-12-04 05:32:23 UTC (rev 26284)
+++ branches/SAMBA_4_0/source/torture/rpc/netlogon.c 2007-12-04 09:41:28 UTC (rev 26285)
@@ -438,6 +438,36 @@
return true;
}
+static bool test_GetPassword(struct torture_context *tctx,
+ struct dcerpc_pipe *p,
+ struct cli_credentials *machine_credentials)
+{
+ struct netr_ServerPasswordGet r;
+ struct creds_CredentialState *creds;
+ struct netr_Authenticator credential;
+ NTSTATUS status;
+ struct netr_Authenticator return_authenticator;
+ struct samr_Password password;
+
+ if (!test_SetupCredentials(p, tctx, machine_credentials, &creds)) {
+ return false;
+ }
+
+ creds_client_authenticator(creds, &credential);
+
+ r.in.server_name = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
+ r.in.account_name = talloc_asprintf(tctx, "%s$", TEST_MACHINE_NAME);
+ r.in.secure_channel_type = SEC_CHAN_BDC;
+ r.in.computer_name = TEST_MACHINE_NAME;
+ r.in.credential = &credential;
+ r.out.return_authenticator = &return_authenticator;
+ r.out.password = &password;
+
+ status = dcerpc_netr_ServerPasswordGet(p, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, status, "ServerPasswordGet");
+
+ return true;
+}
/*
try a netlogon SamLogon
*/
More information about the samba-cvs
mailing list