[Samba] Linux in a Windows 2k3 domain - odd lockout issue

2007-09-30 Thread Christopher Dick
I am currently running an openSuSE 10.2 machine in a
Windows 2k3 domain.  I have upgraded to Samba 3.0.26a,
hoping it would solve my issue, but so far no luck.

I was successful in adding my machine to the domain,
and the DC logs show repeated successful
authentications, and those few typo'd attempts, but
nothing that is a sequence of failed logins.

I get tickets and can access shares from machines all
over the network without needing to re-authenticate.

The problem is, at approx. 3:30 every afternoon, the
domain controller locks my user ID as if I had failed
repeatedly to type in the correct password.  Though
the DC does not show this in the logs.

In exchange for running Linux, I am told I can't call
help desk for support, and no changes can be made to
systems expressly to make them linux compatible.

Any help is appreciated, if someone might have an idea
of what this might be.

Thanks! 


  

Shape Yahoo! in your own image.  Join our Network Research Panel today!   
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Re: Authentication Question; WAS: installing Samba as non-root user

2007-09-30 Thread simo
On Wed, 2007-09-26 at 11:39 -0700, [EMAIL PROTECTED] wrote:
 It's amazing how indignant people get when they think someone hasn't
 done
 his homework.  I've read the man pages in depth, and the official
 HOWTO.
 Unless I overlooked something, no where does it explain the
 authentication
 in the kind of detail that is necessary to understand if there's a way
 to
 have multiple users have proper access to their home directories when
 the
 daemon is not being run as root.

You will not find this knowledge in the Samba material simply because it
is basic unix architecture knowledge.
In unix only root owned process (modulo SELinux) can change privileges.
File access is controlled by the kernel and based on said privileges.
So logical consequence is:
1. no root - no change in privileges - no access to files beyond
existing privileges
2. root - impersonation (change in privileges) - access to files with
provided privileges

For the password part, I only say that authentication is not magic, it
is just an exchange of information (usually involving encryption of some
sort to protect said information) to establish a remote process is who
it claim it is (or represent). If your app performs authentication, it
is the only one that knows about it, and unless it has mighty powers
(root) it can't force the rest of the system to believe it.


Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: [EMAIL PROTECTED]
http://samba.org

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Linux in a Windows 2k3 domain - odd lockout issue

2007-09-30 Thread Doug VanLeuven

Christopher Dick wrote:

I am currently running an openSuSE 10.2 machine in a
Windows 2k3 domain.  I have upgraded to Samba 3.0.26a,
hoping it would solve my issue, but so far no luck.

I was successful in adding my machine to the domain,
and the DC logs show repeated successful
authentications, and those few typo'd attempts, but
nothing that is a sequence of failed logins.

I get tickets and can access shares from machines all
over the network without needing to re-authenticate.

The problem is, at approx. 3:30 every afternoon, the
domain controller locks my user ID as if I had failed
repeatedly to type in the correct password.  Though
the DC does not show this in the logs.
  

I only know of logon hours under the user account on the AD.

Maybe your systems require a more frequent machine password change than 
one week.


It would be helpful to know what steps you take to re-enable the account 
or how long you have to wait.


Does samba manage the keytab or did you manually add the kerberos keytab 
principals?


Regards, Doug


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] wbinfo -u fails on RHEL5

2007-09-30 Thread herman

Hi guys,

Pulling my hair out...

Version: RHEL5 straight off the CDs, no patches.
Active Directory: Win2003 with SP2

I'm experiencing confusing problems when logging onto an Active 
Directory system.  I have gotten it to work perfectly, but after a few 
days/weeks it screws up for no apparent reason.  Windows XP clients 
still work perfectly.  Linux clients show signature and packet errors, 
'wbinfo -u' is unable to retrieve user information and login fails. 

I have installed everything from scratch on a test machine on Friday and 
it fails right off the bat with the same errors as the systems that 
worked before.  I am now installing the whole kettle of fish on VMware 
so I can experiment better.


Has anyone seen this and know where I should start digging?

Cheers,

Herman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] wbinfo -u fails on RHEL5

2007-09-30 Thread Matthew Nelson
i run centos5 on several machines, that all auth via active directory.  i've
found that they will occasionally fail because of a slight change in the
time.

make sure that you have ntp setup to sync with your DC and do a 'net time
set'


On 9/30/07, herman [EMAIL PROTECTED] wrote:

 Hi guys,

 Pulling my hair out...

 Version: RHEL5 straight off the CDs, no patches.
 Active Directory: Win2003 with SP2

 I'm experiencing confusing problems when logging onto an Active
 Directory system.  I have gotten it to work perfectly, but after a few
 days/weeks it screws up for no apparent reason.  Windows XP clients
 still work perfectly.  Linux clients show signature and packet errors,
 'wbinfo -u' is unable to retrieve user information and login fails.

 I have installed everything from scratch on a test machine on Friday and
 it fails right off the bat with the same errors as the systems that
 worked before.  I am now installing the whole kettle of fish on VMware
 so I can experiment better.

 Has anyone seen this and know where I should start digging?

 Cheers,

 Herman
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/listinfo/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] wbinfo -u fails on RHEL5

2007-09-30 Thread herman

Matthew Nelson wrote:

make sure that you have ntp setup to sync with your DC and do a 'net time
set'
I'm aware of the Kerberos time requirements and do a 'net time set -S 
w.x.y.z' with the ADS from cron.hourly, so this is not the issue.  I can 
join the domain, which uses Kerberos, so Kerberos is happy.  I can also 
do 'kinit [EMAIL PROTECTED]', but 'smbclient -k ...' fails, 'wbinfo 
-u' returns nothing and login doesn't work since the username isn't found.


I'm beginning to suspect that it is an ADS configuration issue and has 
something to do with how I define security groups, which causes winbindd 
to blow up.  So, I'm going to try the latest version of Samba and see 
how that goes, if I can just figure out how to compile the thing with 
the options that RedHat needs.


Anyhoo, glad to hear that it is stable for you, so it must be something 
I do different in the configuration.


Cheers,

H.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] samba 3.0.26a-1 / Debian/Lenny sendfile(?) performance problems

2007-09-30 Thread Guenter Kukkukk
Am Samstag, 29. September 2007 20:00 schrieb Justin Piszcz:
 Package: samba
 Version: 3.0.26a-1
 
 Kernel: 2.6.22
 
 samba 3.0.26a-1 performance  900 KiB/s, but FTP = 30-90 MiB/s
 
 Let me start out by saing this is an oddball problem:
 
 SAMBA:
 LINUX - WINDOWS =  900 KiB/s (varies between 100 - 900 KiB/s)
 WINDOWS - LINUX = 30-90 MiB/s (always)
 
 FTP:
 Either direction, 30-90 MiB/s (always)
 
 I do not see any nasty errors in the logs even with verbose = 5.
 
 Any ideas here? I am not using any special options.
 
 # cat /etc/samba/smb.conf
 
 [global]
  log level = 5
  workgroup = WORKGROUP
  server string = %h - Pentium IV 3.4GHZ
  security = user
  encrypt passwords = true
 
 [user]
comment = user
path= /home/user
writable= yes
valid users = user
create mask = 644
 
 --
 
 Here, FTP for pulling files from Linux.
 
 ftp mget *
 200 TYPE is now 8-bit binary
 200 PORT command successful
 150-Connecting to port 1255
 150 715924.0 kbytes to download
 226-File successfully transferred
 226 13.687 seconds (measured here), 51.08 Mbytes per second
 ftp: 733106176 bytes received in 13.69Seconds 53562.23Kbytes/sec.
 200 PORT command successful
 150-Connecting to port 1256
 150 716272.0 kbytes to download
 226-File successfully transferred
 226 13.032 seconds (measured here), 53.67 Mbytes per second
 ftp: 733462528 bytes received in 13.05Seconds 56216.95Kbytes/sec.
 200 PORT command successful
 150-Connecting to port 1257
 150 713200.0 kbytes to download
 226-File successfully transferred
 226 12.869 seconds (measured here), 54.12 Mbytes per second
 ftp: 730316800 bytes received in 12.88Seconds 56723.63Kbytes/sec.
 
 Here, FTP for pushing files to Linux.
 
 ftp mput 1 2 3
 200 PORT command successful
 150 Connecting to port 1263
 226-File successfully transferred
 226 12.802 seconds (measured here), 54.61 Mbytes per second
 ftp: 733106176 bytes sent in 12.80Seconds 57287.35Kbytes/sec.
 200 PORT command successful
 150 Connecting to port 1264
 226-File successfully transferred
 226 12.949 seconds (measured here), 54.02 Mbytes per second
 ftp: 733462528 bytes sent in 12.95Seconds 56624.92Kbytes/sec.
 200 PORT command successful
 150 Connecting to port 1265
 226-File successfully transferred
 226 15.400 seconds (measured here), 45.23 Mbytes per second
 ftp: 730316800 bytes sent in 15.38Seconds 47500.28Kbytes/sec.
 
 But (all I can offer is packet dumps/traces or bandwidth measurements):
 
 Incoming:   Outgoing:
 Curr: 0.00 MByte/s  Curr: 0.07 MByte/s
 Avg: 0.00 MByte/s   Avg: 0.07 MByte/s
 Min: 0.00 MByte/s   Min: 0.07 MByte/s
 Max: 0.00 MByte/s   Max: 0.07 MByte/s
 Ttl: 1898.08 MByte  Ttl: 2954.92 MByte
 
 LOCAL - REMOTE  TXBPS   RXBPS 
 TOTALBPS
   (IP)  PORT  PROTO  (IP)  PORT   TX  RX
 TOTAL
 linuxbox - p4w.internal.lan  546k/s 4.74k/s 551k/s
 192.168.0.1 445TCP  192.168.0.212596.88m106k  6.99m
 
 Why do I get such poor performance when trying to retrieve a file off the 
 Linux box?  This is a very strange problem.
 
 Linux:
 
 $ netstat -i
 Kernel Interface table
 Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVRTX-OK TX-ERR TX-DRP TX-OVR 
 Flg
 eth0   1500 0  14049682  0  0  0 11354070  0  0  0 
 BMRU
 lo16436 0 45335  0  0  045335  0  0  0 LRU
 
 Windows:
 
 netstat -s
 
 IPv4 Statistics
 
Packets Received   = 5053597
Received Header Errors = 0
Received Address Errors= 19
Datagrams Forwarded= 0
Unknown Protocols Received = 0
Received Packets Discarded = 2
Received Packets Delivered = 5053595
Output Requests= 3655144
Routing Discards   = 0
Discarded Output Packets   = 0
Output Packet No Route = 0
Reassembly Required= 0
Reassembly Successful  = 0
Reassembly Failures= 0
Datagrams Successfully Fragmented  = 0
Datagrams Failing Fragmentation= 3
Fragments Created  = 0
 
 ICMPv4 Statistics
 
  ReceivedSent
Messages  47  24
Errors0   0
Destination Unreachable   25  2
Time Exceeded 0   0
Parameter Problems0   0
Source Quenches   0   0
Redirects 0   0
Echos 0   22
Echo Replies  22  0
Timestamps0   0
Timestamp Replies 0   0
Address Masks 0   0
Address 

svn commit: samba r25433 - in branches/SAMBA_4_0/source/librpc/idl: .

2007-09-30 Thread metze
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

2007-09-30 Thread obnox
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

2007-09-30 Thread metze
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

2007-09-30 Thread obnox
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: .

2007-09-30 Thread metze
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: .

2007-09-30 Thread metze
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: .

2007-09-30 Thread obnox
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: .

2007-09-30 Thread obnox
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);