s4:torture/rpc: make use of dcerpc_binding_handle_auth_info() in lsa.c
authorStefan Metzmacher <metze@samba.org>
Wed, 22 Jan 2014 10:19:15 +0000 (11:19 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 24 Mar 2014 23:45:29 +0000 (00:45 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/torture/rpc/lsa.c

index ed618b7a64acf4925bf67685c1bc6b6512fb2f72..f09fed2e68b65d8b7b95eaefc5fb66d76d7b252b 100644 (file)
@@ -1003,12 +1003,17 @@ bool test_many_LookupSids(struct dcerpc_pipe *p,
                }
        } else if (transport == NCACN_IP_TCP) {
                struct lsa_TransNameArray2 names;
+               enum dcerpc_AuthType auth_type;
+               enum dcerpc_AuthLevel auth_level;
 
                names.count = 0;
                names.names = NULL;
 
-               if (p->conn->security_state.auth_info->auth_type == DCERPC_AUTH_TYPE_SCHANNEL &&
-                  p->conn->security_state.auth_info->auth_level >= DCERPC_AUTH_LEVEL_INTEGRITY) {
+               dcerpc_binding_handle_auth_info(p->binding_handle,
+                                               &auth_type, &auth_level);
+
+               if (auth_type == DCERPC_AUTH_TYPE_SCHANNEL &&
+                   auth_level >= DCERPC_AUTH_LEVEL_INTEGRITY) {
                        if (!test_LookupSids3(b, tctx, &sids)) {
                                return false;
                        }