[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-1268-ga263eac
Günther Deschner
gd at samba.org
Fri Apr 24 11:37:59 GMT 2009
The branch, master has been updated
via a263eaca499cf2b8a89c3ab04c6ef5e7e9aea396 (commit)
via f926a4e390e7108dad36ecfffaddb628b23436c0 (commit)
via ae5dd1219a14e939cb1e3674e6daba7885cc9d51 (commit)
from 67588ca80d654183b8b7b062b9660a506a825f94 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a263eaca499cf2b8a89c3ab04c6ef5e7e9aea396
Author: Günther Deschner <gd at samba.org>
Date: Fri Apr 10 21:10:07 2009 +0200
s4-smbtorture: add test_ControlService() to RPC-SVCCTL.
Guenther
commit f926a4e390e7108dad36ecfffaddb628b23436c0
Author: Günther Deschner <gd at samba.org>
Date: Fri Apr 10 20:55:10 2009 +0200
s4-smbtorture: add test_StartServiceW() to RPC-SVCCTL.
Guenther
commit ae5dd1219a14e939cb1e3674e6daba7885cc9d51
Author: Günther Deschner <gd at samba.org>
Date: Mon Apr 20 16:49:01 2009 +0200
s4-smbtorture: change default service to spooler in RPC-SVCCTL.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source4/torture/rpc/svcctl.c | 70 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 69 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index a2e32f2..ad27060 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -26,7 +26,7 @@
#include "torture/rpc/rpc.h"
#include "param/param.h"
-#define TORTURE_DEFAULT_SERVICE "NetLogon"
+#define TORTURE_DEFAULT_SERVICE "Spooler"
static bool test_OpenSCManager(struct dcerpc_pipe *p, struct torture_context *tctx, struct policy_handle *h)
{
@@ -313,6 +313,70 @@ static bool test_QueryServiceObjectSecurity(struct torture_context *tctx,
return true;
}
+static bool test_StartServiceW(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
+{
+ struct svcctl_StartServiceW r;
+ struct policy_handle h, s;
+
+ if (!test_OpenSCManager(p, tctx, &h))
+ return false;
+
+ if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
+ return false;
+
+ r.in.handle = &s;
+ r.in.NumArgs = 0;
+ r.in.Arguments = NULL;
+
+ torture_assert_ntstatus_ok(tctx,
+ dcerpc_svcctl_StartServiceW(p, tctx, &r),
+ "StartServiceW failed!");
+ torture_assert_werr_equal(tctx, r.out.result,
+ WERR_SERVICE_ALREADY_RUNNING,
+ "StartServiceW failed!");
+
+ if (!test_CloseServiceHandle(p, tctx, &s))
+ return false;
+
+ if (!test_CloseServiceHandle(p, tctx, &h))
+ return false;
+
+ return true;
+}
+
+static bool test_ControlService(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
+{
+ struct svcctl_ControlService r;
+ struct policy_handle h, s;
+ struct SERVICE_STATUS service_status;
+
+ if (!test_OpenSCManager(p, tctx, &h))
+ return false;
+
+ if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
+ return false;
+
+ r.in.handle = &s;
+ r.in.control = 0;
+ r.out.service_status = &service_status;
+
+ torture_assert_ntstatus_ok(tctx,
+ dcerpc_svcctl_ControlService(p, tctx, &r),
+ "ControlService failed!");
+ torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_PARAM,
+ "ControlService failed!");
+
+ if (!test_CloseServiceHandle(p, tctx, &s))
+ return false;
+
+ if (!test_CloseServiceHandle(p, tctx, &h))
+ return false;
+
+ return true;
+}
+
static bool test_EnumServicesStatus(struct torture_context *tctx, struct dcerpc_pipe *p)
{
struct svcctl_EnumServicesStatusW r;
@@ -490,6 +554,10 @@ struct torture_suite *torture_rpc_svcctl(TALLOC_CTX *mem_ctx)
test_QueryServiceConfig2W);
torture_rpc_tcase_add_test(tcase, "QueryServiceObjectSecurity",
test_QueryServiceObjectSecurity);
+ torture_rpc_tcase_add_test(tcase, "StartServiceW",
+ test_StartServiceW);
+ torture_rpc_tcase_add_test(tcase, "ControlService",
+ test_ControlService);
return suite;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list