summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-11-13 14:01:46 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-11-14 08:01:44 +0000
commitfbfb11b0f7ebd69cc4b1b545b398a367720d5473 (patch)
tree6e647324c54bdd39abbecc2b6ead724033ff2e6a
parent0e159b725ecf2f9a6d026170253e2d1eb73ed0c2 (diff)
downloadsamba-fbfb11b0f7ebd69cc4b1b545b398a367720d5473.tar.gz
s4:torture: Remove calls to gnutls_global_(de)init() in backupkey test
This is handled by the gnutls library constructor/destructor. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/torture/rpc/backupkey.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/source4/torture/rpc/backupkey.c b/source4/torture/rpc/backupkey.c
index b955f933430..284488f84ea 100644
--- a/source4/torture/rpc/backupkey.c
+++ b/source4/torture/rpc/backupkey.c
@@ -834,8 +834,6 @@ static bool test_RestoreGUID_ko(struct torture_context *tctx,
enum dcerpc_AuthType auth_type;
enum dcerpc_AuthLevel auth_level;
- gnutls_global_init();
-
dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
@@ -853,8 +851,6 @@ static bool test_RestoreGUID_ko(struct torture_context *tctx,
NT_STATUS_ACCESS_DENIED, "Get GUID");
}
- gnutls_global_deinit();
-
return true;
}
@@ -868,8 +864,6 @@ static bool test_RestoreGUID_wrongversion(struct torture_context *tctx,
enum dcerpc_AuthType auth_type;
enum dcerpc_AuthLevel auth_level;
- gnutls_global_init();
-
dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
@@ -887,8 +881,6 @@ static bool test_RestoreGUID_wrongversion(struct torture_context *tctx,
NT_STATUS_ACCESS_DENIED, "Get GUID");
}
- gnutls_global_deinit();
-
return true;
}
@@ -902,8 +894,6 @@ static bool test_RestoreGUID_wronguser(struct torture_context *tctx,
enum dcerpc_AuthType auth_type;
enum dcerpc_AuthLevel auth_level;
- gnutls_global_init();
-
dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
@@ -921,8 +911,6 @@ static bool test_RestoreGUID_wronguser(struct torture_context *tctx,
NT_STATUS_ACCESS_DENIED, "Get GUID");
}
- gnutls_global_deinit();
-
return true;
}
@@ -936,8 +924,6 @@ static bool test_RestoreGUID_v3(struct torture_context *tctx,
enum dcerpc_AuthType auth_type;
enum dcerpc_AuthLevel auth_level;
- gnutls_global_init();
-
dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
@@ -956,8 +942,6 @@ static bool test_RestoreGUID_v3(struct torture_context *tctx,
NT_STATUS_ACCESS_DENIED, "Get GUID");
}
- gnutls_global_deinit();
-
return true;
}
@@ -970,8 +954,6 @@ static bool test_RestoreGUID(struct torture_context *tctx,
enum dcerpc_AuthType auth_type;
enum dcerpc_AuthLevel auth_level;
- gnutls_global_init();
-
dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
@@ -993,8 +975,6 @@ static bool test_RestoreGUID(struct torture_context *tctx,
NT_STATUS_ACCESS_DENIED, "Get GUID");
}
- gnutls_global_deinit();
-
return true;
}
@@ -1008,8 +988,6 @@ static bool test_RestoreGUID_badmagiconsecret(struct torture_context *tctx,
enum dcerpc_AuthType auth_type;
enum dcerpc_AuthLevel auth_level;
- gnutls_global_init();
-
dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
@@ -1027,8 +1005,6 @@ static bool test_RestoreGUID_badmagiconsecret(struct torture_context *tctx,
NT_STATUS_ACCESS_DENIED, "Get GUID");
}
- gnutls_global_deinit();
-
return true;
}
@@ -1040,8 +1016,6 @@ static bool test_RestoreGUID_emptyrequest(struct torture_context *tctx,
enum dcerpc_AuthType auth_type;
enum dcerpc_AuthLevel auth_level;
- gnutls_global_init();
-
dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
@@ -1061,8 +1035,6 @@ static bool test_RestoreGUID_emptyrequest(struct torture_context *tctx,
NT_STATUS_ACCESS_DENIED, "Get GUID");
}
- gnutls_global_deinit();
-
return true;
}
@@ -1076,8 +1048,6 @@ static bool test_RestoreGUID_badcertguid(struct torture_context *tctx,
enum dcerpc_AuthType auth_type;
enum dcerpc_AuthLevel auth_level;
- gnutls_global_init();
-
dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
@@ -1102,8 +1072,6 @@ static bool test_RestoreGUID_badcertguid(struct torture_context *tctx,
NT_STATUS_ACCESS_DENIED, "Get GUID");
}
- gnutls_global_deinit();
-
return true;
}
@@ -1117,8 +1085,6 @@ static bool test_RestoreGUID_badmagicaccesscheck(struct torture_context *tctx,
enum dcerpc_AuthType auth_type;
enum dcerpc_AuthLevel auth_level;
- gnutls_global_init();
-
dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
@@ -1136,8 +1102,6 @@ static bool test_RestoreGUID_badmagicaccesscheck(struct torture_context *tctx,
NT_STATUS_ACCESS_DENIED, "Get GUID");
}
- gnutls_global_deinit();
-
return true;
}
@@ -1151,8 +1115,6 @@ static bool test_RestoreGUID_badhashaccesscheck(struct torture_context *tctx,
enum dcerpc_AuthType auth_type;
enum dcerpc_AuthLevel auth_level;
- gnutls_global_init();
-
dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
@@ -1170,8 +1132,6 @@ static bool test_RestoreGUID_badhashaccesscheck(struct torture_context *tctx,
NT_STATUS_ACCESS_DENIED, "Get GUID");
}
- gnutls_global_init();
-
return true;
}
@@ -1187,8 +1147,6 @@ static bool test_RetrieveBackupKeyGUID_validate(struct torture_context *tctx,
enum dcerpc_AuthType auth_type;
enum dcerpc_AuthLevel auth_level;
- gnutls_global_init();
-
torture_assert(tctx, r != NULL, "test_RetrieveBackupKeyGUID_validate failed");
if (r == NULL) {
@@ -1376,8 +1334,6 @@ static bool test_RetrieveBackupKeyGUID_validate(struct torture_context *tctx,
"Get GUID");
}
- gnutls_global_deinit();
-
return true;
}
@@ -2091,8 +2047,6 @@ static bool test_ServerWrap_decrypt_wrong_stuff(struct torture_context *tctx,
enum dcerpc_AuthLevel auth_level;
ZERO_STRUCT(r);
- gnutls_global_init();
-
dcerpc_binding_handle_auth_info(b, &auth_type, &auth_level);
/* Encrypt */
@@ -2268,8 +2222,6 @@ static bool test_ServerWrap_decrypt_wrong_stuff(struct torture_context *tctx,
"decrypt should fail with WERR_INVALID_PARAMETER");
}
- gnutls_global_deinit();
-
return true;
}