summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-05-29 15:50:45 +0200
committerAndrew Bartlett <abartlet@samba.org>2019-07-26 01:48:24 +0000
commit576bcf61555fb641b2919ad84a6b26b242b57061 (patch)
treee671aee58735c352a45f7ab8d53e0f6e58648b87 /source4
parent9ea736590d9b22a7518f86b18e8c55b0d0e213d5 (diff)
downloadsamba-576bcf61555fb641b2919ad84a6b26b242b57061.tar.gz
libcli:auth: Return WERROR for encode_wkssvc_join_password_buffer()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/wkssvc.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index c98ac92b39b..4bc1f9cd0c7 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -1199,6 +1199,7 @@ static bool test_NetrJoinDomain2(struct torture_context *tctx,
enum wkssvc_NetJoinStatus join_status;
const char *join_name = NULL;
WERROR expected_err;
+ WERROR werr;
DATA_BLOB session_key;
struct dcerpc_binding_handle *b = p->binding_handle;
@@ -1240,8 +1241,13 @@ static bool test_NetrJoinDomain2(struct torture_context *tctx,
return false;
}
- encode_wkssvc_join_password_buffer(tctx, domain_admin_password,
- &session_key, &pwd_buf);
+ werr = encode_wkssvc_join_password_buffer(tctx,
+ domain_admin_password,
+ &session_key,
+ &pwd_buf);
+ if (!W_ERROR_IS_OK(werr)) {
+ return false;
+ }
r.in.server_name = dcerpc_server_name(p);
r.in.domain_name = domain_name;
@@ -1284,6 +1290,7 @@ static bool test_NetrUnjoinDomain2(struct torture_context *tctx,
enum wkssvc_NetJoinStatus join_status;
const char *join_name = NULL;
WERROR expected_err;
+ WERROR werr;
DATA_BLOB session_key;
struct dcerpc_binding_handle *b = p->binding_handle;
@@ -1322,8 +1329,13 @@ static bool test_NetrUnjoinDomain2(struct torture_context *tctx,
return false;
}
- encode_wkssvc_join_password_buffer(tctx, domain_admin_password,
- &session_key, &pwd_buf);
+ werr = encode_wkssvc_join_password_buffer(tctx,
+ domain_admin_password,
+ &session_key,
+ &pwd_buf);
+ if (!W_ERROR_IS_OK(werr)) {
+ return false;
+ }
r.in.server_name = dcerpc_server_name(p);
r.in.account = domain_admin_account;