2010-03-23 18:04:30 +03:00
/*
2006-08-28 00:41:29 +04:00
Unix SMB / CIFS implementation .
Test suite for libnet calls .
Copyright ( C ) Rafal Szczesniak 2006
2010-03-23 18:04:30 +03:00
2006-08-28 00:41:29 +04:00
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
2007-07-10 06:07:03 +04:00
the Free Software Foundation ; either version 3 of the License , or
2006-08-28 00:41:29 +04:00
( at your option ) any later version .
2010-03-23 18:04:30 +03:00
2006-08-28 00:41:29 +04:00
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
2010-03-23 18:04:30 +03:00
2006-08-28 00:41:29 +04:00
You should have received a copy of the GNU General Public License
2007-07-10 06:07:03 +04:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2006-08-28 00:41:29 +04:00
*/
# include "includes.h"
2020-12-02 19:24:22 +03:00
# include "lib/cmdline/cmdline.h"
2006-08-28 00:41:29 +04:00
# include "libnet/libnet.h"
# include "librpc/gen_ndr/ndr_samr_c.h"
# include "librpc/gen_ndr/ndr_lsa_c.h"
2010-04-14 00:06:51 +04:00
# include "torture/rpc/torture_rpc.h"
2007-09-08 16:42:09 +04:00
# include "param/param.h"
2014-02-27 12:08:17 +04:00
# include "torture/libnet/proto.h"
2006-08-28 00:41:29 +04:00
2010-03-23 17:31:27 +03:00
static bool test_opendomain_samr ( struct torture_context * tctx ,
struct dcerpc_binding_handle * b , TALLOC_CTX * mem_ctx ,
2006-09-05 22:46:07 +04:00
struct policy_handle * handle , struct lsa_String * domname ,
2008-11-07 04:42:45 +03:00
uint32_t * access_mask , struct dom_sid * * sid_p )
2006-08-28 00:41:29 +04:00
{
struct policy_handle h , domain_handle ;
struct samr_Connect r1 ;
struct samr_LookupDomain r2 ;
2008-11-07 04:42:45 +03:00
struct dom_sid2 * sid = NULL ;
2006-08-28 00:41:29 +04:00
struct samr_OpenDomain r3 ;
2010-03-23 18:04:30 +03:00
2010-03-23 17:31:27 +03:00
torture_comment ( tctx , " connecting \n " ) ;
2006-09-05 22:46:07 +04:00
* access_mask = SEC_FLAG_MAXIMUM_ALLOWED ;
2010-03-23 18:04:30 +03:00
2006-08-28 00:41:29 +04:00
r1 . in . system_name = 0 ;
2006-09-05 22:46:07 +04:00
r1 . in . access_mask = * access_mask ;
2006-08-28 00:41:29 +04:00
r1 . out . connect_handle = & h ;
2010-03-23 18:04:30 +03:00
2010-03-23 17:20:16 +03:00
torture_assert_ntstatus_ok ( tctx ,
dcerpc_samr_Connect_r ( b , mem_ctx , & r1 ) ,
" Connect failed " ) ;
torture_assert_ntstatus_ok ( tctx , r1 . out . result ,
" Connect failed " ) ;
2010-03-23 18:04:30 +03:00
2006-08-28 00:41:29 +04:00
r2 . in . connect_handle = & h ;
r2 . in . domain_name = domname ;
2008-11-07 04:42:45 +03:00
r2 . out . sid = & sid ;
2006-08-28 00:41:29 +04:00
2010-03-23 17:31:27 +03:00
torture_comment ( tctx , " domain lookup on %s \n " , domname - > string ) ;
2006-08-28 00:41:29 +04:00
2010-03-23 17:20:16 +03:00
torture_assert_ntstatus_ok ( tctx ,
dcerpc_samr_LookupDomain_r ( b , mem_ctx , & r2 ) ,
" LookupDomain failed " ) ;
torture_assert_ntstatus_ok ( tctx , r2 . out . result ,
" LookupDomain failed " ) ;
2006-08-28 00:41:29 +04:00
r3 . in . connect_handle = & h ;
2006-09-05 22:46:07 +04:00
r3 . in . access_mask = * access_mask ;
2008-11-07 04:42:45 +03:00
r3 . in . sid = * sid_p = * r2 . out . sid ;
2006-08-28 00:41:29 +04:00
r3 . out . domain_handle = & domain_handle ;
2010-03-23 17:31:27 +03:00
torture_comment ( tctx , " opening domain \n " ) ;
2006-08-28 00:41:29 +04:00
2010-03-23 17:20:16 +03:00
torture_assert_ntstatus_ok ( tctx ,
dcerpc_samr_OpenDomain_r ( b , mem_ctx , & r3 ) ,
" OpenDomain failed " ) ;
torture_assert_ntstatus_ok ( tctx , r3 . out . result ,
" OpenDomain failed " ) ;
* handle = domain_handle ;
2006-08-28 00:41:29 +04:00
2007-10-07 02:28:14 +04:00
return true ;
2006-08-28 00:41:29 +04:00
}
2010-03-23 17:20:16 +03:00
static bool test_opendomain_lsa ( struct torture_context * tctx ,
struct dcerpc_binding_handle * b , TALLOC_CTX * mem_ctx ,
2006-09-05 21:59:37 +04:00
struct policy_handle * handle , struct lsa_String * domname ,
uint32_t * access_mask )
2006-08-28 00:41:29 +04:00
{
struct lsa_OpenPolicy2 open ;
struct lsa_ObjectAttribute attr ;
struct lsa_QosInfo qos ;
2006-09-05 21:59:37 +04:00
* access_mask = SEC_FLAG_MAXIMUM_ALLOWED ;
2006-08-28 00:41:29 +04:00
ZERO_STRUCT ( attr ) ;
ZERO_STRUCT ( qos ) ;
qos . len = 0 ;
qos . impersonation_level = 2 ;
qos . context_mode = 1 ;
qos . effective_only = 0 ;
2010-03-23 18:04:30 +03:00
2006-08-28 00:41:29 +04:00
attr . sec_qos = & qos ;
open . in . system_name = domname - > string ;
open . in . attr = & attr ;
2006-09-05 21:59:37 +04:00
open . in . access_mask = * access_mask ;
open . out . handle = handle ;
2010-03-23 18:04:30 +03:00
2010-03-23 17:20:16 +03:00
torture_assert_ntstatus_ok ( tctx ,
dcerpc_lsa_OpenPolicy2_r ( b , mem_ctx , & open ) ,
" OpenPolicy2 failed " ) ;
torture_assert_ntstatus_ok ( tctx , open . out . result ,
" OpenPolicy2 failed " ) ;
2006-08-28 00:41:29 +04:00
2007-10-07 02:28:14 +04:00
return true ;
2006-08-28 00:41:29 +04:00
}
2007-08-28 04:16:58 +04:00
bool torture_domain_open_lsa ( struct torture_context * torture )
2006-08-28 00:41:29 +04:00
{
NTSTATUS status ;
2007-10-07 02:28:14 +04:00
bool ret = true ;
2006-08-28 00:41:29 +04:00
struct libnet_context * ctx ;
struct libnet_DomainOpen r ;
2007-01-02 04:39:53 +03:00
struct lsa_Close lsa_close ;
2006-09-05 21:59:37 +04:00
struct policy_handle h ;
2007-05-12 01:48:29 +04:00
const char * domain_name ;
/* we're accessing domain controller so the domain name should be
passed ( it ' s going to be resolved to dc name and address ) instead
of specific server name . */
2010-07-16 08:32:42 +04:00
domain_name = lpcfg_workgroup ( torture - > lp_ctx ) ;
2006-08-28 00:41:29 +04:00
2008-04-14 20:43:37 +04:00
ctx = libnet_context_init ( torture - > ev , torture - > lp_ctx ) ;
2006-08-28 00:41:29 +04:00
if ( ctx = = NULL ) {
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " failed to create libnet context \n " ) ;
2007-10-07 02:28:14 +04:00
return false ;
2006-08-28 00:41:29 +04:00
}
2020-12-02 19:24:22 +03:00
ctx - > cred = samba_cmdline_get_creds ( ) ;
2006-08-28 00:41:29 +04:00
2006-09-05 21:59:37 +04:00
ZERO_STRUCT ( r ) ;
2006-08-28 00:41:29 +04:00
r . in . type = DOMAIN_LSA ;
2007-05-12 01:48:29 +04:00
r . in . domain_name = domain_name ;
2006-08-28 00:41:29 +04:00
r . in . access_mask = SEC_FLAG_MAXIMUM_ALLOWED ;
status = libnet_DomainOpen ( ctx , torture , & r ) ;
if ( ! NT_STATUS_IS_OK ( status ) ) {
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " failed to open domain on lsa service: %s \n " , nt_errstr ( status ) ) ;
2007-10-07 02:28:14 +04:00
ret = false ;
2006-09-05 21:59:37 +04:00
goto done ;
2006-08-28 00:41:29 +04:00
}
2007-01-02 04:39:53 +03:00
ZERO_STRUCT ( lsa_close ) ;
lsa_close . in . handle = & ctx - > lsa . handle ;
lsa_close . out . handle = & h ;
2010-03-23 18:04:30 +03:00
2010-03-23 17:20:16 +03:00
torture_assert_ntstatus_ok ( torture ,
dcerpc_lsa_Close_r ( ctx - > lsa . pipe - > binding_handle , ctx , & lsa_close ) ,
" failed to close domain on lsa service " ) ;
torture_assert_ntstatus_ok ( torture , lsa_close . out . result ,
" failed to close domain on lsa service " ) ;
2006-08-28 00:41:29 +04:00
2006-09-05 21:59:37 +04:00
done :
talloc_free ( ctx ) ;
return ret ;
2006-08-28 00:41:29 +04:00
}
2007-10-07 02:28:14 +04:00
bool torture_domain_close_lsa ( struct torture_context * torture )
2006-08-28 00:41:29 +04:00
{
2007-10-07 02:28:14 +04:00
bool ret = true ;
2006-08-28 00:41:29 +04:00
NTSTATUS status ;
2006-09-10 14:43:31 +04:00
TALLOC_CTX * mem_ctx = NULL ;
2006-08-28 00:41:29 +04:00
struct libnet_context * ctx ;
struct lsa_String domain_name ;
struct dcerpc_binding * binding ;
2006-09-05 21:59:37 +04:00
uint32_t access_mask ;
struct policy_handle h ;
2006-08-28 00:41:29 +04:00
struct dcerpc_pipe * p ;
struct libnet_DomainClose r ;
2007-08-28 23:03:08 +04:00
status = torture_rpc_binding ( torture , & binding ) ;
2006-08-28 00:41:29 +04:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2007-08-28 23:03:08 +04:00
return false ;
2006-08-28 00:41:29 +04:00
}
2008-04-14 20:43:37 +04:00
ctx = libnet_context_init ( torture - > ev , torture - > lp_ctx ) ;
2006-08-28 00:41:29 +04:00
if ( ctx = = NULL ) {
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " failed to create libnet context \n " ) ;
2007-10-07 02:28:14 +04:00
ret = false ;
2006-08-28 00:41:29 +04:00
goto done ;
}
2020-12-02 19:24:22 +03:00
ctx - > cred = samba_cmdline_get_creds ( ) ;
2006-08-28 00:41:29 +04:00
2006-09-05 21:59:37 +04:00
mem_ctx = talloc_init ( " torture_domain_close_lsa " ) ;
2007-08-28 23:03:08 +04:00
status = dcerpc_pipe_connect_b ( mem_ctx , & p , binding , & ndr_table_lsarpc ,
2020-12-02 19:24:22 +03:00
samba_cmdline_get_creds ( ) ,
2017-05-10 02:10:03 +03:00
torture - > ev , torture - > lp_ctx ) ;
2006-08-28 00:41:29 +04:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " failed to connect to server: %s \n " , nt_errstr ( status ) ) ;
2007-10-07 02:28:14 +04:00
ret = false ;
2006-08-28 00:41:29 +04:00
goto done ;
}
2010-07-16 08:32:42 +04:00
domain_name . string = lpcfg_workgroup ( torture - > lp_ctx ) ;
2010-03-23 18:04:30 +03:00
2010-03-23 17:20:16 +03:00
if ( ! test_opendomain_lsa ( torture , p - > binding_handle , torture , & h , & domain_name , & access_mask ) ) {
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " failed to open domain on lsa service \n " ) ;
2007-10-07 02:28:14 +04:00
ret = false ;
2006-08-28 00:41:29 +04:00
goto done ;
}
2010-03-23 18:04:30 +03:00
2006-09-05 21:59:37 +04:00
ctx - > lsa . pipe = p ;
ctx - > lsa . name = domain_name . string ;
ctx - > lsa . access_mask = access_mask ;
ctx - > lsa . handle = h ;
ZERO_STRUCT ( r ) ;
2006-08-28 00:41:29 +04:00
r . in . type = DOMAIN_LSA ;
r . in . domain_name = domain_name . string ;
2010-03-23 18:04:30 +03:00
2006-08-28 00:41:29 +04:00
status = libnet_DomainClose ( ctx , mem_ctx , & r ) ;
if ( ! NT_STATUS_IS_OK ( status ) ) {
2007-10-07 02:28:14 +04:00
ret = false ;
2006-08-31 02:30:47 +04:00
goto done ;
2006-08-28 00:41:29 +04:00
}
done :
talloc_free ( mem_ctx ) ;
talloc_free ( ctx ) ;
return ret ;
}
2007-10-07 02:28:14 +04:00
bool torture_domain_open_samr ( struct torture_context * torture )
2006-08-28 00:41:29 +04:00
{
NTSTATUS status ;
struct libnet_context * ctx ;
TALLOC_CTX * mem_ctx ;
struct policy_handle domain_handle , handle ;
struct libnet_DomainOpen io ;
struct samr_Close r ;
2007-05-12 01:48:29 +04:00
const char * domain_name ;
2007-10-07 02:28:14 +04:00
bool ret = true ;
2006-08-28 00:41:29 +04:00
mem_ctx = talloc_init ( " test_domainopen_lsa " ) ;
2008-04-14 20:43:37 +04:00
ctx = libnet_context_init ( torture - > ev , torture - > lp_ctx ) ;
2020-12-02 19:24:22 +03:00
ctx - > cred = samba_cmdline_get_creds ( ) ;
2006-08-28 00:41:29 +04:00
2007-05-12 01:48:29 +04:00
/* we're accessing domain controller so the domain name should be
passed ( it ' s going to be resolved to dc name and address ) instead
of specific server name . */
2010-07-16 08:32:42 +04:00
domain_name = lpcfg_workgroup ( torture - > lp_ctx ) ;
2006-08-28 00:41:29 +04:00
/*
* Testing synchronous version
*/
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " opening domain \n " ) ;
2010-03-23 18:04:30 +03:00
2006-08-28 00:41:29 +04:00
io . in . type = DOMAIN_SAMR ;
2007-05-12 01:48:29 +04:00
io . in . domain_name = domain_name ;
2006-08-28 00:41:29 +04:00
io . in . access_mask = SEC_FLAG_MAXIMUM_ALLOWED ;
status = libnet_DomainOpen ( ctx , mem_ctx , & io ) ;
if ( ! NT_STATUS_IS_OK ( status ) ) {
2010-09-15 03:53:49 +04:00
torture_comment ( torture , " Composite domain open failed for domain '%s' - %s \n " ,
domain_name , nt_errstr ( status ) ) ;
2007-10-07 02:28:14 +04:00
ret = false ;
2006-08-28 00:41:29 +04:00
goto done ;
}
2006-09-05 22:46:07 +04:00
domain_handle = ctx - > samr . handle ;
2006-08-28 00:41:29 +04:00
r . in . handle = & domain_handle ;
r . out . handle = & handle ;
2010-03-23 18:04:30 +03:00
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " closing domain handle \n " ) ;
2010-03-23 18:04:30 +03:00
2010-03-23 17:20:16 +03:00
torture_assert_ntstatus_ok ( torture ,
dcerpc_samr_Close_r ( ctx - > samr . pipe - > binding_handle , mem_ctx , & r ) ,
" Close failed " ) ;
torture_assert_ntstatus_ok ( torture , r . out . result ,
" Close failed " ) ;
2006-08-28 00:41:29 +04:00
done :
talloc_free ( mem_ctx ) ;
2006-09-05 22:46:07 +04:00
talloc_free ( ctx ) ;
return ret ;
}
2007-10-07 02:28:14 +04:00
bool torture_domain_close_samr ( struct torture_context * torture )
2006-09-05 22:46:07 +04:00
{
2007-10-07 02:28:14 +04:00
bool ret = true ;
2006-09-05 22:46:07 +04:00
NTSTATUS status ;
2007-04-29 16:32:17 +04:00
TALLOC_CTX * mem_ctx = NULL ;
2006-09-05 22:46:07 +04:00
struct libnet_context * ctx ;
struct lsa_String domain_name ;
struct dcerpc_binding * binding ;
uint32_t access_mask ;
struct policy_handle h ;
struct dcerpc_pipe * p ;
struct libnet_DomainClose r ;
2007-08-02 17:08:39 +04:00
struct dom_sid * sid ;
2006-08-28 00:41:29 +04:00
2007-08-28 23:03:08 +04:00
status = torture_rpc_binding ( torture , & binding ) ;
2006-09-05 22:46:07 +04:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2007-08-28 23:03:08 +04:00
return false ;
2006-09-05 22:46:07 +04:00
}
2008-04-14 20:43:37 +04:00
ctx = libnet_context_init ( torture - > ev , torture - > lp_ctx ) ;
2006-09-05 22:46:07 +04:00
if ( ctx = = NULL ) {
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " failed to create libnet context \n " ) ;
2007-10-07 02:28:14 +04:00
ret = false ;
2006-09-05 22:46:07 +04:00
goto done ;
}
2020-12-02 19:24:22 +03:00
ctx - > cred = samba_cmdline_get_creds ( ) ;
2006-09-05 22:46:07 +04:00
mem_ctx = talloc_init ( " torture_domain_close_samr " ) ;
2007-08-28 23:03:08 +04:00
status = dcerpc_pipe_connect_b ( mem_ctx , & p , binding , & ndr_table_samr ,
2008-04-22 01:58:23 +04:00
ctx - > cred , torture - > ev , torture - > lp_ctx ) ;
2006-09-05 22:46:07 +04:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " failed to connect to server: %s \n " , nt_errstr ( status ) ) ;
2007-10-07 02:28:14 +04:00
ret = false ;
2006-09-05 22:46:07 +04:00
goto done ;
}
2010-07-16 08:32:42 +04:00
domain_name . string = talloc_strdup ( mem_ctx , lpcfg_workgroup ( torture - > lp_ctx ) ) ;
2010-03-23 18:04:30 +03:00
2010-03-23 17:31:27 +03:00
if ( ! test_opendomain_samr ( torture , p - > binding_handle , torture , & h , & domain_name , & access_mask , & sid ) ) {
torture_comment ( torture , " failed to open domain on samr service \n " ) ;
2007-10-07 02:28:14 +04:00
ret = false ;
2006-09-05 22:46:07 +04:00
goto done ;
}
2010-03-23 18:04:30 +03:00
2006-09-05 22:46:07 +04:00
ctx - > samr . pipe = p ;
2007-08-02 17:08:39 +04:00
ctx - > samr . name = talloc_steal ( ctx , domain_name . string ) ;
2006-09-05 22:46:07 +04:00
ctx - > samr . access_mask = access_mask ;
ctx - > samr . handle = h ;
2007-08-02 17:08:39 +04:00
ctx - > samr . sid = talloc_steal ( ctx , sid ) ;
2006-09-05 22:46:07 +04:00
ZERO_STRUCT ( r ) ;
r . in . type = DOMAIN_SAMR ;
r . in . domain_name = domain_name . string ;
2010-03-23 18:04:30 +03:00
2006-09-05 22:46:07 +04:00
status = libnet_DomainClose ( ctx , mem_ctx , & r ) ;
if ( ! NT_STATUS_IS_OK ( status ) ) {
2007-10-07 02:28:14 +04:00
ret = false ;
2006-09-05 22:46:07 +04:00
goto done ;
}
done :
talloc_free ( mem_ctx ) ;
talloc_free ( ctx ) ;
2006-08-28 00:41:29 +04:00
return ret ;
}
2007-04-29 16:32:17 +04:00
2007-10-07 02:28:14 +04:00
bool torture_domain_list ( struct torture_context * torture )
2007-04-29 16:32:17 +04:00
{
2007-10-07 02:28:14 +04:00
bool ret = true ;
2007-04-29 16:32:17 +04:00
NTSTATUS status ;
TALLOC_CTX * mem_ctx = NULL ;
struct dcerpc_binding * binding ;
struct libnet_context * ctx ;
struct libnet_DomainList r ;
int i ;
2007-08-28 23:03:08 +04:00
status = torture_rpc_binding ( torture , & binding ) ;
2007-04-29 16:32:17 +04:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2007-08-28 23:03:08 +04:00
return false ;
2007-04-29 16:32:17 +04:00
}
2008-04-14 20:43:37 +04:00
ctx = libnet_context_init ( torture - > ev , torture - > lp_ctx ) ;
2007-04-29 16:32:17 +04:00
if ( ctx = = NULL ) {
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " failed to create libnet context \n " ) ;
2007-10-07 02:28:14 +04:00
ret = false ;
2007-04-29 16:32:17 +04:00
goto done ;
}
2020-12-02 19:24:22 +03:00
ctx - > cred = samba_cmdline_get_creds ( ) ;
2010-03-23 18:04:30 +03:00
2007-04-29 16:32:17 +04:00
mem_ctx = talloc_init ( " torture_domain_close_samr " ) ;
2007-05-12 01:48:29 +04:00
/*
* querying the domain list using default buffer size
*/
ZERO_STRUCT ( r ) ;
2014-02-04 15:14:37 +04:00
r . in . hostname = dcerpc_binding_get_string_option ( binding , " host " ) ;
2007-05-12 01:48:29 +04:00
status = libnet_DomainList ( ctx , mem_ctx , & r ) ;
if ( ! NT_STATUS_IS_OK ( status ) ) {
2007-10-07 02:28:14 +04:00
ret = false ;
2007-05-12 01:48:29 +04:00
goto done ;
}
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " Received list or domains (everything in one piece): \n " ) ;
2010-03-23 18:04:30 +03:00
2007-05-12 01:48:29 +04:00
for ( i = 0 ; i < r . out . count ; i + + ) {
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " Name[%d]: %s \n " , i , r . out . domains [ i ] . name ) ;
2007-05-12 01:48:29 +04:00
}
/*
* querying the domain list using specified ( much smaller ) buffer size
*/
ctx - > samr . buf_size = 32 ;
2007-04-29 16:32:17 +04:00
ZERO_STRUCT ( r ) ;
2014-02-04 15:14:37 +04:00
r . in . hostname = dcerpc_binding_get_string_option ( binding , " host " ) ;
2007-04-29 16:32:17 +04:00
status = libnet_DomainList ( ctx , mem_ctx , & r ) ;
if ( ! NT_STATUS_IS_OK ( status ) ) {
2007-10-07 02:28:14 +04:00
ret = false ;
2007-04-29 16:32:17 +04:00
goto done ;
}
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " Received list or domains (collected in more than one round): \n " ) ;
2010-03-23 18:04:30 +03:00
2007-04-29 16:32:17 +04:00
for ( i = 0 ; i < r . out . count ; i + + ) {
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " Name[%d]: %s \n " , i , r . out . domains [ i ] . name ) ;
2007-04-29 16:32:17 +04:00
}
done :
2010-03-23 17:31:27 +03:00
torture_comment ( torture , " \n Status: %s \n " , nt_errstr ( status ) ) ;
2007-04-29 16:32:17 +04:00
talloc_free ( mem_ctx ) ;
talloc_free ( ctx ) ;
return ret ;
}