s4-smbtorture: define TORTURE_DEFAULT_SERVICE and set to netlogon.
authorGünther Deschner <gd@samba.org>
Tue, 14 Apr 2009 21:30:13 +0000 (23:30 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 15 Apr 2009 20:48:54 +0000 (22:48 +0200)
Guenther

source4/torture/rpc/svcctl.c

index 631e367c3bc7b5fa70c95f14f259aecd69da0f7a..a2e32f221fee5d9a22cd0e7e5dcb1331ad423004 100644 (file)
@@ -26,6 +26,8 @@
 #include "torture/rpc/rpc.h"
 #include "param/param.h"
 
+#define TORTURE_DEFAULT_SERVICE "NetLogon"
+
 static bool test_OpenSCManager(struct dcerpc_pipe *p, struct torture_context *tctx, struct policy_handle *h)
 {
        struct svcctl_OpenSCManagerW r;
@@ -85,7 +87,7 @@ static bool test_QueryServiceStatus(struct torture_context *tctx,
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        r.in.handle = &s;
@@ -118,7 +120,7 @@ static bool test_QueryServiceStatusEx(struct torture_context *tctx, struct dcerp
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        buffer = talloc(tctx, uint8_t);
@@ -165,7 +167,7 @@ static bool test_QueryServiceConfigW(struct torture_context *tctx,
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        r.in.handle = &s;
@@ -207,7 +209,7 @@ static bool test_QueryServiceConfig2W(struct torture_context *tctx, struct dcerp
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        buffer = talloc(tctx, uint8_t);
@@ -270,7 +272,7 @@ static bool test_QueryServiceObjectSecurity(struct torture_context *tctx,
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        r.in.handle = &s;
@@ -403,7 +405,7 @@ static bool test_EnumDependentServicesW(struct torture_context *tctx,
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        r.in.service = &s;