svn commit: samba r25433 - in branches/SAMBA_4_0/source/librpc/idl: .
Author: metze Date: 2007-09-30 07:12:10 + (Sun, 30 Sep 2007) New Revision: 25433 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25433 Log: - dcerpc_AuthType is a 8bit enum not 32bit - also add dcerpc_AuthLevel enum metze Modified: branches/SAMBA_4_0/source/librpc/idl/dcerpc.idl Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/dcerpc.idl === --- branches/SAMBA_4_0/source/librpc/idl/dcerpc.idl 2007-09-29 23:54:32 UTC (rev 25432) +++ branches/SAMBA_4_0/source/librpc/idl/dcerpc.idl 2007-09-30 07:12:10 UTC (rev 25433) @@ -118,7 +118,7 @@ } dcerpc_fault; /* the auth types we know about */ - typedef [v1_enum] enum { + typedef [enum8bit] enum { DCERPC_AUTH_TYPE_NONE = 0, /* this seems to be not krb5! */ DCERPC_AUTH_TYPE_KRB5_1 = 1, @@ -132,17 +132,20 @@ DCERPC_AUTH_TYPE_MSMQ = 100 } dcerpc_AuthType; + typedef [enum8bit] enum { + DCERPC_AUTH_LEVEL_NONE = 1, + DCERPC_AUTH_LEVEL_CONNECT = 2, + DCERPC_AUTH_LEVEL_CALL = 3, + DCERPC_AUTH_LEVEL_PACKET= 4, + DCERPC_AUTH_LEVEL_INTEGRITY = 5, + DCERPC_AUTH_LEVEL_PRIVACY = 6 + } dcerpc_AuthLevel; + const uint8 DCERPC_AUTH_LEVEL_DEFAULT = DCERPC_AUTH_LEVEL_CONNECT; - const uint8 DCERPC_AUTH_LEVEL_NONE = 1; - const uint8 DCERPC_AUTH_LEVEL_CONNECT = 2; - const uint8 DCERPC_AUTH_LEVEL_CALL = 3; - const uint8 DCERPC_AUTH_LEVEL_PACKET= 4; - const uint8 DCERPC_AUTH_LEVEL_INTEGRITY = 5; - const uint8 DCERPC_AUTH_LEVEL_PRIVACY = 6; typedef [public] struct { - uint8 auth_type; - uint8 auth_level; + dcerpc_AuthType auth_type; + dcerpc_AuthLevel auth_level; uint8 auth_pad_length; uint8 auth_reserved; uint32 auth_context_id;
svn commit: samba r25434 - in branches/SAMBA_3_2/source: include lib param
Author: obnox Date: 2007-09-30 08:07:06 + (Sun, 30 Sep 2007) New Revision: 25434 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25434 Log: Add the option to print the debug class (DBGC_CLASS) in the debug header. Control this by a new boolean smb.conf option debug class which is by default set to no to keep the default debug header unchanged. Michael Note: You need to make clean for this patch. Modified: branches/SAMBA_3_2/source/include/debug.h branches/SAMBA_3_2/source/lib/debug.c branches/SAMBA_3_2/source/param/loadparm.c Changeset: Modified: branches/SAMBA_3_2/source/include/debug.h === --- branches/SAMBA_3_2/source/include/debug.h 2007-09-30 07:12:10 UTC (rev 25433) +++ branches/SAMBA_3_2/source/include/debug.h 2007-09-30 08:07:06 UTC (rev 25434) @@ -40,7 +40,7 @@ int Debug1( const char *, ... ) PRINTF_ATTRIBUTE(1,2); /* PRINTFLIKE1 */ BOOL dbgtext( const char *, ... ) PRINTF_ATTRIBUTE(1,2); -BOOL dbghdr( int level, const char *file, const char *func, int line ); +BOOL dbghdr( int level, int cls, const char *file, const char *func, int line ); #if defined(sgi) (_COMPILER_VERSION = 730) #pragma mips_frequency_hint NEVER Debug1 @@ -167,7 +167,7 @@ ((DEBUGLEVEL_CLASS[ DBGC_CLASS ] = (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ DBGC_CLASS ] \ DEBUGLEVEL_CLASS[ DBGC_ALL ] = (level)) ) \ -dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) ) ) +dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) ) ) #define DEBUGLVLC( dbgc_class, level ) \ @@ -175,7 +175,7 @@ ((DEBUGLEVEL_CLASS[ dbgc_class ] = (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ dbgc_class ] \ DEBUGLEVEL_CLASS[ DBGC_ALL ] = (level)) ) \ -dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) ) ) +dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) ) ) #define DEBUG( level, body ) \ @@ -183,7 +183,7 @@ ((DEBUGLEVEL_CLASS[ DBGC_CLASS ] = (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ DBGC_CLASS ] \ DEBUGLEVEL_CLASS[ DBGC_ALL ] = (level)) ) \ -(dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) )) \ +(dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) )) \ (dbgtext body) ) #define DEBUGC( dbgc_class, level, body ) \ @@ -191,7 +191,7 @@ ((DEBUGLEVEL_CLASS[ dbgc_class ] = (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ dbgc_class ] \ DEBUGLEVEL_CLASS[ DBGC_ALL ] = (level)) ) \ -(dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) )) \ +(dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) )) \ (dbgtext body) ) #define DEBUGADD( level, body ) \ Modified: branches/SAMBA_3_2/source/lib/debug.c === --- branches/SAMBA_3_2/source/lib/debug.c 2007-09-30 07:12:10 UTC (rev 25433) +++ branches/SAMBA_3_2/source/lib/debug.c 2007-09-30 08:07:06 UTC (rev 25434) @@ -913,6 +913,7 @@ Input: level - Debug level of the message (not the system-wide debug level. ) + cls - Debuglevel class of the calling module. file - Pointer to a string containing the name of the file from which this function was called, or an empty string if the __FILE__ macro is not implemented. @@ -930,7 +931,7 @@ / -BOOL dbghdr( int level, const char *file, const char *func, int line ) +BOOL dbghdr(int level, int cls, const char *file, const char *func, int line) { /* Ensure we don't lose any real errno value. */ int old_errno = errno; @@ -976,6 +977,14 @@ (unsigned int)geteuid(), (unsigned int)getegid(), (unsigned int)getuid(), (unsigned int)getgid()); } + + if (lp_debug_class() (cls != DBGC_ALL)) { + size_t hs_len = strlen(header_str); + slprintf(header_str + hs_len, +sizeof(header_str) -1 - hs_len, +, class=%s, +default_classname_table[cls]); + } /* Print it all out at once to prevent split syslog output. */ if( lp_debug_prefix_timestamp() ) { Modified: branches/SAMBA_3_2/source/param/loadparm.c === --- branches/SAMBA_3_2/source/param/loadparm.c 2007-09-30 07:12:10 UTC (rev 25433) +++ branches/SAMBA_3_2/source/param/loadparm.c 2007-09-30 08:07:06 UTC (rev 25434) @@ -306,6 +306,7 @@ BOOL bDebugHiresTimestamp; BOOL bDebugPid; BOOL bDebugUid; + BOOL bDebugClass; BOOL bEnableCoreFiles; BOOL
svn commit: samba r25435 - in branches/SAMBA_4_0/source/selftest: . output
Author: metze Date: 2007-09-30 08:26:53 + (Sun, 30 Sep 2007) New Revision: 25435 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25435 Log: actually pass the statistics to the buildfarm output module to calculate the SELFTEST RUNTIME correct metze Modified: branches/SAMBA_4_0/source/selftest/output/buildfarm.pm branches/SAMBA_4_0/source/selftest/selftest.pl Changeset: Modified: branches/SAMBA_4_0/source/selftest/output/buildfarm.pm === --- branches/SAMBA_4_0/source/selftest/output/buildfarm.pm 2007-09-30 08:07:06 UTC (rev 25434) +++ branches/SAMBA_4_0/source/selftest/output/buildfarm.pm 2007-09-30 08:26:53 UTC (rev 25435) @@ -8,8 +8,8 @@ use strict; sub new() { - my ($class, $verbose, $immediate, $statistics) = @_; - my $self = { + my ($class, $statistics) = @_; + my $self = { statistics = $statistics, test_output = {} }; Modified: branches/SAMBA_4_0/source/selftest/selftest.pl === --- branches/SAMBA_4_0/source/selftest/selftest.pl 2007-09-30 08:07:06 UTC (rev 25434) +++ branches/SAMBA_4_0/source/selftest/selftest.pl 2007-09-30 08:26:53 UTC (rev 25435) @@ -694,7 +694,7 @@ my $msg_ops; if ($opt_format eq buildfarm) { require output::buildfarm; - $msg_ops = new output::buildfarm(); + $msg_ops = new output::buildfarm($statistics); } elsif ($opt_format eq plain) { require output::plain; $msg_ops = new output::plain($opt_verbose, $opt_immediate, $statistics);
svn commit: samba r25436 - in branches/SAMBA_3_2_0/source: include lib param
Author: obnox Date: 2007-09-30 08:32:10 + (Sun, 30 Sep 2007) New Revision: 25436 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25436 Log: Add the option to print the debug class (DBGC_CLASS) in the debug header. Control this by a new boolean smb.conf option debug class which is by default set to no to keep the default debug header unchanged. Michael Note: You need to make clean for this patch. Modified: branches/SAMBA_3_2_0/source/include/debug.h branches/SAMBA_3_2_0/source/lib/debug.c branches/SAMBA_3_2_0/source/param/loadparm.c Changeset: Modified: branches/SAMBA_3_2_0/source/include/debug.h === --- branches/SAMBA_3_2_0/source/include/debug.h 2007-09-30 08:26:53 UTC (rev 25435) +++ branches/SAMBA_3_2_0/source/include/debug.h 2007-09-30 08:32:10 UTC (rev 25436) @@ -40,7 +40,7 @@ int Debug1( const char *, ... ) PRINTF_ATTRIBUTE(1,2); /* PRINTFLIKE1 */ BOOL dbgtext( const char *, ... ) PRINTF_ATTRIBUTE(1,2); -BOOL dbghdr( int level, const char *file, const char *func, int line ); +BOOL dbghdr( int level, int cls, const char *file, const char *func, int line ); #if defined(sgi) (_COMPILER_VERSION = 730) #pragma mips_frequency_hint NEVER Debug1 @@ -167,7 +167,7 @@ ((DEBUGLEVEL_CLASS[ DBGC_CLASS ] = (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ DBGC_CLASS ] \ DEBUGLEVEL_CLASS[ DBGC_ALL ] = (level)) ) \ -dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) ) ) +dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) ) ) #define DEBUGLVLC( dbgc_class, level ) \ @@ -175,7 +175,7 @@ ((DEBUGLEVEL_CLASS[ dbgc_class ] = (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ dbgc_class ] \ DEBUGLEVEL_CLASS[ DBGC_ALL ] = (level)) ) \ -dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) ) ) +dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) ) ) #define DEBUG( level, body ) \ @@ -183,7 +183,7 @@ ((DEBUGLEVEL_CLASS[ DBGC_CLASS ] = (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ DBGC_CLASS ] \ DEBUGLEVEL_CLASS[ DBGC_ALL ] = (level)) ) \ -(dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) )) \ +(dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) )) \ (dbgtext body) ) #define DEBUGC( dbgc_class, level, body ) \ @@ -191,7 +191,7 @@ ((DEBUGLEVEL_CLASS[ dbgc_class ] = (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ dbgc_class ] \ DEBUGLEVEL_CLASS[ DBGC_ALL ] = (level)) ) \ -(dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) )) \ +(dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) )) \ (dbgtext body) ) #define DEBUGADD( level, body ) \ Modified: branches/SAMBA_3_2_0/source/lib/debug.c === --- branches/SAMBA_3_2_0/source/lib/debug.c 2007-09-30 08:26:53 UTC (rev 25435) +++ branches/SAMBA_3_2_0/source/lib/debug.c 2007-09-30 08:32:10 UTC (rev 25436) @@ -913,6 +913,7 @@ Input: level - Debug level of the message (not the system-wide debug level. ) + cls - Debuglevel class of the calling module. file - Pointer to a string containing the name of the file from which this function was called, or an empty string if the __FILE__ macro is not implemented. @@ -930,7 +931,7 @@ / -BOOL dbghdr( int level, const char *file, const char *func, int line ) +BOOL dbghdr(int level, int cls, const char *file, const char *func, int line) { /* Ensure we don't lose any real errno value. */ int old_errno = errno; @@ -976,6 +977,14 @@ (unsigned int)geteuid(), (unsigned int)getegid(), (unsigned int)getuid(), (unsigned int)getgid()); } + + if (lp_debug_class() (cls != DBGC_ALL)) { + size_t hs_len = strlen(header_str); + slprintf(header_str + hs_len, +sizeof(header_str) -1 - hs_len, +, class=%s, +default_classname_table[cls]); + } /* Print it all out at once to prevent split syslog output. */ if( lp_debug_prefix_timestamp() ) { Modified: branches/SAMBA_3_2_0/source/param/loadparm.c === --- branches/SAMBA_3_2_0/source/param/loadparm.c2007-09-30 08:26:53 UTC (rev 25435) +++ branches/SAMBA_3_2_0/source/param/loadparm.c2007-09-30 08:32:10 UTC (rev 25436) @@ -306,6 +306,7 @@ BOOL bDebugHiresTimestamp; BOOL bDebugPid; BOOL bDebugUid; + BOOL bDebugClass; BOOL
svn commit: samba r25437 - in branches/SAMBA_4_0/source/selftest: .
Author: metze Date: 2007-09-30 09:07:07 + (Sun, 30 Sep 2007) New Revision: 25437 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25437 Log: let the default env for 'make testenv' depend on the target as only samba4 supports the member target yet. metze Modified: branches/SAMBA_4_0/source/selftest/selftest.pl Changeset: Modified: branches/SAMBA_4_0/source/selftest/selftest.pl === --- branches/SAMBA_4_0/source/selftest/selftest.pl 2007-09-30 08:32:10 UTC (rev 25436) +++ branches/SAMBA_4_0/source/selftest/selftest.pl 2007-09-30 09:07:07 UTC (rev 25437) @@ -421,18 +421,21 @@ } my $target; +my $testenv_default = none; if ($opt_target eq samba4) { + $testenv_default = member; $target = new Samba4($opt_bindir or $srcdir/bin, $ldap, $srcdir/setup); } elsif ($opt_target eq samba3) { if ($opt_socket_wrapper and `$opt_bindir/smbd -b | grep SOCKET_WRAPPER` eq ) { die(You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'. Exiting); } - + $testenv_default = dc; $target = new Samba3($opt_bindir); } elsif ($opt_target eq win) { die(Windows tests will not run with socket wrapper enabled.) if ($opt_socket_wrapper); + $testenv_default = dc; $target = new Windows(); } @@ -712,7 +715,7 @@ if ($opt_testenv) { my $testenv_name = $ENV{SELFTEST_TESTENV}; - $testenv_name = member unless defined($testenv_name); + $testenv_name = $testenv_default unless defined($testenv_name); my $testenv_vars = setup_env($testenv_name);
svn commit: samba r25438 - in branches/SAMBA_4_0/source/selftest/env: .
Author: metze Date: 2007-09-30 09:08:10 + (Sun, 30 Sep 2007) New Revision: 25438 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25438 Log: start samba3's winbindd in the selftest dc env metze Modified: branches/SAMBA_4_0/source/selftest/env/Samba3.pm Changeset: Modified: branches/SAMBA_4_0/source/selftest/env/Samba3.pm === --- branches/SAMBA_4_0/source/selftest/env/Samba3.pm2007-09-30 09:07:07 UTC (rev 25437) +++ branches/SAMBA_4_0/source/selftest/env/Samba3.pm2007-09-30 09:08:10 UTC (rev 25438) @@ -36,11 +36,14 @@ my $smbdpid = read_pid($envvars, smbd); my $nmbdpid = read_pid($envvars, nmbd); + my $winbinddpid = read_pid($envvars, winbindd); $self-stop_sig_term($smbdpid); $self-stop_sig_term($nmbdpid); + $self-stop_sig_term($winbinddpid); $self-stop_sig_kill($smbdpid); $self-stop_sig_kill($nmbdpid); + $self-stop_sig_kill($winbinddpid); return 0; } @@ -69,8 +72,13 @@ sub getlog_env($$) { my ($self, $envvars) = @_; + my $ret = ; - return $self-getlog_env_app($envvars, SMBD) . $self-getlog_env_app($envvars, NMBD); + $ret .= $self-getlog_env_app($envvars, SMBD); + $ret .= $self-getlog_env_app($envvars, NMBD); + $ret .= $self-getlog_env_app($envvars, WINBINDD); + + return $ret; } sub check_env($$) @@ -98,7 +106,10 @@ my $vars = $self-provision($path, dc); - $self-check_or_start($vars, ($ENV{NMBD_MAXTIME} or 2700), ($ENV{SMBD_MAXTIME} or 2700)); + $self-check_or_start($vars, + ($ENV{NMBD_MAXTIME} or 2700), + ($ENV{WINBINDD_MAXTIME} or 2700), + ($ENV{SMBD_MAXTIME} or 2700)); $self-wait_for_start($vars); @@ -140,7 +151,7 @@ } sub check_or_start() { - my ($self, $env_vars, $nmbd_maxtime, $smbd_maxtime) = @_; + my ($self, $env_vars, $nmbd_maxtime, $winbindd_maxtime, $smbd_maxtime) = @_; unlink($env_vars-{NMBD_TEST_LOG}); print STARTING NMBD...; @@ -148,20 +159,39 @@ if ($pid == 0) { open STDOUT, $env_vars-{NMBD_TEST_LOG}; open STDERR, 'STDOUT'; - + + $ENV{WINBINDD_SOCKET_DIR} = $env_vars-{WINBINDD_SOCKET_DIR}; + $ENV{MAKE_TEST_BINARY} = $self-binpath(nmbd); exec($self-binpath(timelimit), $nmbd_maxtime, $self-binpath(nmbd), -F, -S, -d0, --no-process-group, -s, $env_vars-{SERVERCONFFILE}) or die(Unable to start nmbd: $!); } write_pid($env_vars, nmbd, $pid); print DONE\n; + unlink($env_vars-{WINBINDD_TEST_LOG}); + print STARTING WINBINDD...; + my $pid = fork(); + if ($pid == 0) { + open STDOUT, $env_vars-{WINBINDD_TEST_LOG}; + open STDERR, 'STDOUT'; + + $ENV{WINBINDD_SOCKET_DIR} = $env_vars-{WINBINDD_SOCKET_DIR}; + + $ENV{MAKE_TEST_BINARY} = $self-binpath(winbindd); + exec($self-binpath(timelimit), $winbindd_maxtime, $self-binpath(winbindd), -F, -S, -d0, --no-process-group, -s, $env_vars-{SERVERCONFFILE}) or die(Unable to start winbindd: $!); + } + write_pid($env_vars, winbindd, $pid); + print DONE\n; + unlink($env_vars-{SMBD_TEST_LOG}); print STARTING SMBD...; $pid = fork(); if ($pid == 0) { open STDOUT, $env_vars-{SMBD_TEST_LOG}; open STDERR, 'STDOUT'; - + + $ENV{WINBINDD_SOCKET_DIR} = $env_vars-{WINBINDD_SOCKET_DIR}; + $ENV{MAKE_TEST_BINARY} = $self-binpath(smbd); exec($self-binpath(timelimit), $smbd_maxtime, $self-binpath(smbd), -F, -S, -d0 , --no-process-group, -s, $env_vars-{SERVERCONFFILE}) or die(Unable to start smbd: $!); } @@ -216,6 +246,8 @@ my %ret = (); my $server = localhost2; my $server_ip = 127.0.0.2; + my $domain = SAMBA-TEST; + my $username = `PATH=/usr/ucb:$ENV{PATH} whoami`; chomp $username; my $password = test; @@ -223,26 +255,40 @@ my $srcdir=$RealBin/..; my $scriptdir=$srcdir/selftest; my $prefix_abs = abs_path($prefix); - my $shrdir=$prefix_abs/tmp; + + my @dirs = (); + + my $shrdir=$prefix_abs/share; + push(@dirs,$shrdir); + my $libdir=$prefix_abs/lib; + push(@dirs,$libdir); + my $piddir=$prefix_abs/pid; - my $conffile=$libdir/server.conf; + push(@dirs,$piddir); + my $privatedir=$prefix_abs/private; + push(@dirs,$privatedir); + my $lockdir=$prefix_abs/lockdir; + push(@dirs,$lockdir); + my $logdir=$prefix_abs/logs; - my $domain = SAMBA-TEST; + push(@dirs,$logdir); + # this gets autocreated by winbindd + my $wbsockdir=$prefix_abs/winbindd; +
svn commit: samba r25439 - in branches/SAMBA_4_0/source/torture/winbind: .
Author: obnox Date: 2007-09-30 09:15:04 + (Sun, 30 Sep 2007) New Revision: 25439 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25439 Log: Extend the SHOW_SEQUENCE test somewhat to walk the list of trusted domains. Michael Modified: branches/SAMBA_4_0/source/torture/winbind/struct_based.c Changeset: Modified: branches/SAMBA_4_0/source/torture/winbind/struct_based.c === --- branches/SAMBA_4_0/source/torture/winbind/struct_based.c2007-09-30 09:08:10 UTC (rev 25438) +++ branches/SAMBA_4_0/source/torture/winbind/struct_based.c2007-09-30 09:15:04 UTC (rev 25439) @@ -589,9 +589,15 @@ { struct winbindd_request req; struct winbindd_response rep; + bool ok; + struct torture_trust_domain *domlist = NULL; + int i; + torture_comment(torture, Running WINBINDD_SHOW_SEQUENCE (struct based)\n); + torture_comment(torture, - Running WINBINDD_SHOW_SEQUENCE without domain:\n); + ZERO_STRUCT(req); ZERO_STRUCT(rep); @@ -601,6 +607,22 @@ torture_comment(torture, %s, (char *)rep.extra_data.data); } + torture_comment(torture, - getting list of trusted domains\n); + ok = get_trusted_domains(torture, domlist); + torture_assert(torture, ok, failed to get trust list); + + for (i=0; domlist[i].netbios_name; i++) { + ZERO_STRUCT(req); + ZERO_STRUCT(rep); + fstrcpy(req.domain_name, domlist[i].netbios_name); + torture_comment(torture, - Running WINBINDD_SHOW_SEQUENCE + for domain %s:\n, req.domain_name); + DO_STRUCT_REQ_REP(WINBINDD_SHOW_SEQUENCE, req, rep); + if (rep.extra_data.data) { + torture_comment(torture, %s, (char *)rep.extra_data.data); + } + } + return true; }
svn commit: samba r25440 - in branches/SAMBA_4_0/source/torture/winbind: .
Author: obnox Date: 2007-09-30 09:19:10 + (Sun, 30 Sep 2007) New Revision: 25440 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25440 Log: Add simple WINBINDD_SETPWENT and WINBINDD_ENDPWENT tests. WINBINDD_GETPWENT is to follow. Michael Modified: branches/SAMBA_4_0/source/torture/winbind/struct_based.c Changeset: Modified: branches/SAMBA_4_0/source/torture/winbind/struct_based.c === --- branches/SAMBA_4_0/source/torture/winbind/struct_based.c2007-09-30 09:15:04 UTC (rev 25439) +++ branches/SAMBA_4_0/source/torture/winbind/struct_based.c2007-09-30 09:19:10 UTC (rev 25440) @@ -626,6 +626,36 @@ return true; } +static bool torture_winbind_struct_setpwent(struct torture_context *torture) +{ + struct winbindd_request req; + struct winbindd_response rep; + + torture_comment(torture, Running WINBINDD_SETPWENT (struct based)\n); + + ZERO_STRUCT(req); + ZERO_STRUCT(rep); + + DO_STRUCT_REQ_REP(WINBINDD_SETPWENT, req, rep); + + return true; +} + +static bool torture_winbind_struct_endpwent(struct torture_context *torture) +{ + struct winbindd_request req; + struct winbindd_response rep; + + torture_comment(torture, Running WINBINDD_ENDPWENT (struct based)\n); + + ZERO_STRUCT(req); + ZERO_STRUCT(rep); + + DO_STRUCT_REQ_REP(WINBINDD_ENDPWENT, req, rep); + + return true; +} + struct torture_suite *torture_winbind_struct_init(void) { struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), STRUCT); @@ -644,6 +674,8 @@ torture_suite_add_simple_test(suite, LIST_USERS, torture_winbind_struct_list_users); torture_suite_add_simple_test(suite, LIST_GROUPS, torture_winbind_struct_list_groups); torture_suite_add_simple_test(suite, SHOW_SEQUENCE, torture_winbind_struct_show_sequence); + torture_suite_add_simple_test(suite, SETPWENT, torture_winbind_struct_setpwent); + torture_suite_add_simple_test(suite, ENDPWENT, torture_winbind_struct_endpwent); suite-description = talloc_strdup(suite, WINBIND - struct based protocol tests);