[Samba] Should Oplocks be enable Pershare

2006-04-10 Thread mallapadi niranjan
Hi all

We have a samba pdc (samba 3.0.21c with Openldap 2.3.19) and
another Linux system as Samba Domain Member server(Samba 3.0.21c).
All my windows Clients are windows 2k Professional and Win XP .
My query is
1Q) Should oplocks and Level2 oplocks be declared per share declaration  in
smb.conf
or if it declared in global section of smb.conf is it enough?
2Q) Is there any enhancement of performance if the oplocks and level2
oplocks are declared in global section and also in the share
declaration

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


Re: [Samba] (no subject)

2006-04-10 Thread Vaisonet

Owner and file permissions seem to be ok.

This my smb.conf :

[global]
 netbios name = CUMULUS
 server string = Serveur de fichiers
 workgroup = RC

 ; domain  local master browser
 ; coz we're dealing with Win2k
 os level = 65
 prefered master = yes
 domain master = yes
 local master = yes
 domain logons = yes

 ; misc options
 socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 
SO_RCVBUF=8192

 time server = yes

 ; do not show files starting with dots
 hide dot files = yes

 ; Central European code page support
 client code page = 852
 character set = ISO8859-2

 ; do not allow guest access, use only local system accounts
 security = user
 guest ok = no
 invalid users = bin deamon sys man postfix mail ftp
 ;admin users = @wheel

 ; domain administrators
 domain admin group = root
 domain admin users = root
  ;add user script = /usr/sbin/useradd -n -g machines -d /dev/null -s 
/bin/false %m$
   add user script = /usr/sbin/useradd -d /dev/null -g machines -c 
'Machine Account' -s /bin/false -M %u


 ; use encrypted passwords
 encrypt passwords = yes

 ; logging (max log size is in kB)
 log level = 2
 log file = /var/log/samba/log.%L
 max log size = 1000
 debug timestamp = yes
 syslog = 1

 ; user roaming profiles path
 logon path = \\%N\profiles\%u

 ; general logon script (in DOS format)
 logon script = logon.bat

  case sensitive = no
  wins support = yes

; share for domain controller
[netlogon]
 path = /home/netlogon
 public = no
 writeable = no
 browsable = no
 valid users = root @ste_varinard

; share for storing user profiles
[profiles]
 path = /home/profiles
 writeable = yes
 create mask = 0700
 directory mask = 0700
 browsable = no
 valid users = root @ste_varinard

[Documents]
  path = /home/Documents
  strict locking = yes
  writeable = yes
  create mode = 0770
 directory mode = 0770
  valid users = root @ste_varinard
 public = yes
  #définition de la Corbeille
  vfs object = recycle
  recycle:repository = ../../non-sauve/Corbeille
  recycle:keeptree = yes
  recycle:versions = yes
  recycle:touch = yes
  recycle:maxsize = 204857600

[Banque images]
  comment = Non sauvegardé
  strict locking = yes
  path = /non-sauve/b_img
  writeable = yes
  create mode = 0770
 directory mode = 0770
  valid users = root @ste_varinard
 public = yes
  #définition de la Corbeille
  vfs object = recycle
  recycle:repository = ../../non-sauve/Corbeille
  recycle:keeptree = yes
  recycle:versions = yes
  recycle:touch = yes
  recycle:maxsize = 204857600

[Partage]
  comment = Pour mettre les fichiers utilisés par les programmes
  path = /home/partage
  strict locking = yes
  writeable = yes
  create mode = 0770
 directory mode = 0770
  valid users = root @ste_varinard
 public = yes

[Mail]
  comment = Mozilla Thunderbird
  path = /home/mail
  strict locking = yes
  writeable = yes
  create mode = 0770
 directory mode = 0770
  valid users = root daubepart mbotteau
 public = yes
  veto oplock files = /*.mab/

[Money]
  path = /home/money
  strict locking = yes
  writeable = yes
  create mode = 0750
 directory mode = 0750
  valid users = root mcvarinard
 public = yes
  #définition de la Corbeille
  vfs object = recycle
  recycle:repository = ../../non-sauve/Corbeille
  recycle:keeptree = yes
  recycle:versions = yes
  recycle:touch = yes
  recycle:maxsize = 204857600

[Devis]
  path = /var/www/html/devis
  strict locking = yes
  oplocks = no
  writeable = yes
  create mode = 0770
 directory mode = 0770
  valid users = root @ste_varinard
 public = yes
  #définition de la Corbeille
  vfs object = recycle
  recycle:repository = ../../../../non-sauve/Corbeille
  recycle:keeptree = yes
  recycle:versions = yes
  recycle:touch = yes
  recycle:maxsize = 204857600

[Corbeille]
  comment = Corbeille Serveur de fichiers
  path = /non-sauve/Corbeille
  writeable = yes
  create mode = 0700
 directory mode = 0770
  valid users = root @ste_varinard
 public = yes

[Applications]
  comment = Logiciels communs
  strict locking = yes
  path = /non-sauve/appli
  writeable = yes
  create mode = 0770
 directory mode = 0770
  valid users = root @ste_varinard
 public = yes

Thanks for your help :-)

Maxime



Gary Dale a écrit :
Can you go onto the Linux server and look at the actual owner:group 
and file permissions? Check both the files and the directory they are 
part of. If they are what you expect to see, then can you post a 
sample of them and post your smb.conf file?



Vaisonet wrote:


Samba is 3.0.22 on a CentOS 4 box.
Only Word and Excel write a temporary file, i have the same problem 
with corel draw, and openoffice.

Office is 97 and XP. Openoffice is 2.0.

It's happening with eall shared folders.
All users have this problems.
It's happening only with existing 

[Samba] does samba support multiple domains?crucial issue for ISP company

2006-04-10 Thread Qin Zhen
Hi samba users, 
we are an ISP companies running proxy, so the domains we need to work on are 
large amount, keeping increasing, and moreover belonging to different 
companies. so whether samba supports multiple domains is an important issue for 
us to decide whether to adopt samba with proxy. i googled online and found some 
notion that samba doesnt support multiple domains unless multiple instances of 
samba are installed. is it true? pls kindly advise. thanks a lot in advance.  

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


RE: [Samba] Can pam_winbind be configured to issue Kerberos tickets onuser validation?

2006-04-10 Thread Gautier, B \(Bob\)

 -Original Message-

 
 I've tried to use the pam_krb5 module, but as pam modules 
 validate the user as given, pam_krb5 is trying to match the 
 password to [EMAIL PROTECTED]  so it fails.
 

Pam_krb5 can be configured to convert winbind usernames back into
principal names, by means of some regexp matching and template filling
magic.  It it 'underdocumented' - perhaps you even need to grab the
source RPM and look there?  I can't remember where I found out about it.
I have pam_krb5 2.1.8-1 working very nicely.  Here's the excerpt from my
/etc/krb5.conf:

[appdefaults]
 pam = {
   debug = false
   ticket_lifetime = 36000
   renew_lifetime = 36000
   forwardable = true
   krb4_convert = false
   mappings = RILINUX-(.*) [EMAIL PROTECTED] RILINUXEU-(.*)
[EMAIL PROTECTED]
 }

The 'mappings' is a set of regexp-template pairs.  In my example,
usernames that start with
RILINUX- are mapped into principals in RILINUX.COM, usernames in
RILINUXEU- are mapped into the
EU.RILINUX.COM realm.

If you have lots of domains you can do things like (untested):

   mappings = RILINUX([^-]+)-(.*) [EMAIL PROTECTED]

So RILINUXEU-foo - [EMAIL PROTECTED]
RILINUXANYOLDJUNK-nobody -
[EMAIL PROTECTED]

Bob G
_

This email (including any attachments to it) is confidential, legally 
privileged, subject to copyright and is sent for the personal attention of the 
intended recipient only. If you have received this email in error, please 
advise us immediately and delete it. You are notified that disclosing, copying, 
distributing or taking any action in reliance on the contents of this 
information is strictly prohibited. Although we have taken reasonable 
precautions to ensure no viruses are present in this email, we cannot accept 
responsibility for any loss or damage arising from the viruses in this email or 
attachments. We exclude any liability for the content of this email, or for the 
consequences of any actions taken on the basis of the information provided in 
this email or its attachments, unless that information is subsequently 
confirmed in writing. If this email contains an offer, that should be 
considered as an invitation to treat.
_
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


RE: [Samba] stress testing

2006-04-10 Thread Bruno Guerreiro
Hi, 
Have you tried Samba torture?

Best Regards,
Bruno Guerreiro 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 On Behalf Of Chris Anders
 Sent: sábado, 8 de Abril de 2006 12:54
 To: samba@lists.samba.org
 Subject: [Samba] stress testing
 
 Does anyone know how to stress test samba without getting a 
 whole room of people to login to all the computers at once ? 
 perhaps some kind person has coded up a nice app that can be 
 run on the server ??
 
 just curious..
 
 
 Kind Regards,
 
 
 Chris Anders
 Network Engineer
 
 Anders Networks
 Mobile - 0421 580 017
 Email   - [EMAIL PROTECTED]
 Web - http://www.anders.net.au
 
 
  
 
 ---
 This message contains confidential information and is 
 intended only f or the individual named. If you are not the 
 named addressee you s hould not disseminate, distribute or 
 copy this e-mail. Please notify t he sender immediately by 
 e-mail if you have received this e-mail by mistake and delete 
 this e-mail from your system. E-mail transmission ca n not be 
 guaranteed to be secure or error-free as information could be 
 intercepted, corrupted, lost, destroyed, arrive late or 
 incomplete, or contain viruses. The sender therefore does not 
 accept liability for any errors or omissions in the contents 
 of this message, which arise as a result of e-mail 
 transmission. If verification is required please request a 
 hard-copy version.
 
 
 
 --
 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] RPC Protocol Error

2006-04-10 Thread Per Qvindesland

Hello,

Sorry that I have not replied to these but it has just been so hectic.

I have redone the ldc with a fc 4 machine and the latest samba and ldap, 
now things has improved but the issue that I am now having is the new 
windows 2003 server only accepts usernames with 6-7 characters which is 
rather irritating.


Does anyone know where I can change this on windows? when I try a 
username shorter or longer then 6-7 characters on a windows 2000 machine 
it works fine so there must be somewhere that billy boy is saying that I 
can't use any shorter or longer usernames.


Regards
Per Qvindesland

Volker Lendecke wrote:

On Mon, Apr 03, 2006 at 06:52:45PM +0200, Per Qvindesland wrote:
  
Again thanks for all your help, but no joy I updated to the latest 
release but no joy, this server also has ldap installed working togeter 
with samba, do you have any other idea?



You might want to send a debug level 10 log of smbd failing,
together with a network sniff of the operation.

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

Re: [Samba] Should Oplocks be enable Pershare

2006-04-10 Thread Craig White
On Mon, 2006-04-10 at 11:50 +0530, mallapadi niranjan wrote:
 Hi all
 
 We have a samba pdc (samba 3.0.21c with Openldap 2.3.19) and
 another Linux system as Samba Domain Member server(Samba 3.0.21c).
 All my windows Clients are windows 2k Professional and Win XP .
 My query is
 1Q) Should oplocks and Level2 oplocks be declared per share declaration  in
 smb.conf
 or if it declared in global section of smb.conf is it enough?
 2Q) Is there any enhancement of performance if the oplocks and level2
 oplocks are declared in global section and also in the share
 declaration

are you adverse to reading the documentation? If not, the topic is
thoroughly covered in the official how to found here...

http://samba.org/samba/docs

Craig

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


[Samba] pam_winbind log ip nr

2006-04-10 Thread Collen Blijenberg

Just a quick question,

we use pam_winbind to authenticate users against smb-pdc.
(works ok btw)

is there a way to make pam_winbind log the ip numbers of failed 
authentications ??

or is this done by the PAM service ??

if i look in the /var/log/messages log i see the loggings of success and 
failed logins, but without IP nrs.


it's for adding iptables rules to a blacklist.

Cheers  Thx

Collen.

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


[Samba] samba and sun one ldap

2006-04-10 Thread lenny
any advise on integrating Sun One LDAP 5.2 with samba ?

I successfully imported the schema, created the domain object with rid in
LDAP, but I'm stuck trying to map the groups, whether mapping to the local
group 'admins' or ldap group Domain Admins.

net groupmap add rid=512 ntgroup='Domain Admins'  unixgroup='admins'
[2006/04/05 11:04:41, 0] lib/smbldap_util.c:(258)

  Adding domain info for BRUTUS failed with NT_STATUS_UNSUCCESSFUL
adding entry for group Domain Admins failed!


getent group admins
admins::2513:

net groupmap add rid=512 ntgroup='Domain Admins'  unixgroup='Domain Admins'
[2006/04/05 11:13:46, 0] lib/smbldap_util.c:(258)
  Adding domain info for BRUTUS failed with NT_STATUS_UNSUCCESSFUL
adding entry for group Domain Admins failed!

getent group Domain Admins
Domain Admins::2512:

I don't see any debug flags for net command similar to what smbpasswd
provides, so any help and further advise on Sun LDAP/Samba would be
appreciated. Thank you.







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


RE: [Samba] stress testing

2006-04-10 Thread Bruno Guerreiro
Hi,
It must be compiled from smb sources.
In the source directory issue:
make torture
You'll end up with a binary called smbtorture.
Have fun.
 
Best regards,
Bruno Guerreiro


  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: segunda-feira, 10 de Abril de 2006 13:16
To: Bruno Guerreiro
Subject: RE: [Samba] stress testing



Where can one find a copy of smb torture? 
  I was unable to locate a copy nor any how to use documents. 

Thanks.  -Cheers, Peter.



In specification, Murphy's
Law supersedes Ohm's Law.
  --Unknown




Bruno Guerreiro [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED] 


04/10/2006 04:59 AM 


To
'Chris Anders' [EMAIL PROTECTED], samba@lists.samba.org 

cc

Subject
RE: [Samba] stress testing






Hi, 
Have you tried Samba torture?

Best Regards,
Bruno Guerreiro 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 On Behalf Of Chris Anders
 Sent: sábado, 8 de Abril de 2006 12:54
 To: samba@lists.samba.org
 Subject: [Samba] stress testing
 
 Does anyone know how to stress test samba without getting a 
 whole room of people to login to all the computers at once ? 
 perhaps some kind person has coded up a nice app that can be 
 run on the server ??
 
 just curious..
 
 
 Kind Regards,
 
 
 Chris Anders
 Network Engineer
 
 Anders Networks
 Mobile - 0421 580 017
 Email   - [EMAIL PROTECTED]
 Web - http://www.anders.net.au
 
 
  
 
 ---
 This message contains confidential information and is 
 intended only f or the individual named. If you are not the 
 named addressee you s hould not disseminate, distribute or 
 copy this e-mail. Please notify t he sender immediately by 
 e-mail if you have received this e-mail by mistake and delete 
 this e-mail from your system. E-mail transmission ca n not be 
 guaranteed to be secure or error-free as information could be 
 intercepted, corrupted, lost, destroyed, arrive late or 
 incomplete, or contain viruses. The sender therefore does not 
 accept liability for any errors or omissions in the contents 
 of this message, which arise as a result of e-mail 
 transmission. If verification is required please request a 
 hard-copy version.
 
 
 
 --
 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



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


Re: RES: [Samba] Preventing Multiple Logins in Samba

2006-04-10 Thread Ryan Novosielski
I gave you the solution that others who have asked this question have
been told in the past, which is something you would know if you bothered
to read the archives.

You may not like the solution, but there is no need to look down your
nose at my answer. Clearly the solution does work, or other people would
not be using it. If you are going to respond that way when someone takes
the time to ask you, you can figure it out yourself.

Wilson A. Galafassi Jr. wrote:

Can someone tell me some solution really working?
Thanks

-Mensagem original-
De: Ryan Novosielski [mailto:[EMAIL PROTECTED] 
Enviada em: sábado, 8 de abril de 2006 13:03
Para: Wilson A. Galafassi Jr.
Cc: samba@lists.samba.org
Assunto: Re: [Samba] Preventing Multiple Logins in Samba

Search the list archives.

The short answer is by implementing a login script that will check if
the user is logged in and deny the second login.

Wilson A. Galafassi Jr. wrote:

  

Hello to all.

Samba is the PDC on my network. 
My question is: It´s possible to don´t permit multiple login of the same
user on the PDC?

Thanks
Wilson




___
Abra sua conta no Yahoo! Mail: 1GB de espaço, alertas de e-mail no celular


e anti-spam realmente eficaz.
  

http://br.info.mail.yahoo.com/
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba
 









___
Yahoo! doce lar. Faça do Yahoo! sua homepage.
http://br.yahoo.com/homepageset.html


  

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


Re: [Samba] (no subject)

2006-04-10 Thread Gary Dale
One thing I notice is that you don't have any normal user administration 
scripts. The ones in my smb.conf look like this:

   add user script = /usr/sbin/useradd -g samba -c %u
   delete user script = /usr/sbin/userdel -r %u
   add group script = /usr/sbin/groupadd %g
   delete group script = /usr/sbin/groupdel %g
   add user to group script = /usr/sbin/usermod -G  %g %u
   add machine script = /usr/sbin/useradd -g machines -c Machine -d 
/dev/null -s /bin/false %u


This may be creating problems because if your users aren't in the 
correct groups, they won't have permission to modify the files. Your 
shares are set to have valid users in the NIS or Unix ste_varinard 
group, but it's not clear how your users are getting into that group.


Also, I notice that you have guest ok = no in the globals, but you've 
declared all your shares as public. Public means guest ok = yes. It's 
possible that your files are being created with the guest account but 
accessed by the user's real account, which then wouldn't have 
permission, or vice-versa.




Vaisonet wrote:


Owner and file permissions seem to be ok.

This my smb.conf :

[global]
 netbios name = CUMULUS
 server string = Serveur de fichiers
 workgroup = RC

 ; domain  local master browser
 ; coz we're dealing with Win2k
 os level = 65
 prefered master = yes
 domain master = yes
 local master = yes
 domain logons = yes

 ; misc options
 socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 
SO_RCVBUF=8192

 time server = yes

 ; do not show files starting with dots
 hide dot files = yes

 ; Central European code page support
 client code page = 852
 character set = ISO8859-2

 ; do not allow guest access, use only local system accounts
 security = user
 guest ok = no
 invalid users = bin deamon sys man postfix mail ftp
 ;admin users = @wheel

 ; domain administrators
 domain admin group = root samba
 domain admin users = root
  ;add user script = /usr/sbin/useradd -n -g machines -d /dev/null -s 
/bin/false %m$
   add user script = /usr/sbin/useradd -d /dev/null -g machines -c 
'Machine Account' -s /bin/false -M %u


 ; use encrypted passwords
 encrypt passwords = yes

 ; logging (max log size is in kB)
 log level = 2
 log file = /var/log/samba/log.%L
 max log size = 1000
 debug timestamp = yes
 syslog = 1

 ; user roaming profiles path
 logon path = \\%N\profiles\%u

 ; general logon script (in DOS format)
 logon script = logon.bat

  case sensitive = no
  wins support = yes

; share for domain controller
[netlogon]
 path = /home/netlogon
 public = no
 writeable = no
 browsable = no
 valid users = root @ste_varinard

; share for storing user profiles
[profiles]
 path = /home/profiles
 writeable = yes
 create mask = 0700
 directory mask = 0700
 browsable = no
 valid users = root @ste_varinard

[Documents]
  path = /home/Documents
  strict locking = yes
  writeable = yes
  create mode = 0770
 directory mode = 0770
  valid users = root @ste_varinard
 public = yes
  #définition de la Corbeille
  vfs object = recycle
  recycle:repository = ../../non-sauve/Corbeille
  recycle:keeptree = yes
  recycle:versions = yes
  recycle:touch = yes
  recycle:maxsize = 204857600

[Banque images]
  comment = Non sauvegardé
  strict locking = yes
  path = /non-sauve/b_img
  writeable = yes
  create mode = 0770
 directory mode = 0770
  valid users = root @ste_varinard
 public = yes
  #définition de la Corbeille
  vfs object = recycle
  recycle:repository = ../../non-sauve/Corbeille
  recycle:keeptree = yes
  recycle:versions = yes
  recycle:touch = yes
  recycle:maxsize = 204857600

[Partage]
  comment = Pour mettre les fichiers utilisés par les programmes
  path = /home/partage
  strict locking = yes
  writeable = yes
  create mode = 0770
 directory mode = 0770
  valid users = root @ste_varinard
 public = yes

[Mail]
  comment = Mozilla Thunderbird
  path = /home/mail
  strict locking = yes
  writeable = yes
  create mode = 0770
 directory mode = 0770
  valid users = root daubepart mbotteau
 public = yes
  veto oplock files = /*.mab/

[Money]
  path = /home/money
  strict locking = yes
  writeable = yes
  create mode = 0750
 directory mode = 0750
  valid users = root mcvarinard
 public = yes
  #définition de la Corbeille
  vfs object = recycle
  recycle:repository = ../../non-sauve/Corbeille
  recycle:keeptree = yes
  recycle:versions = yes
  recycle:touch = yes
  recycle:maxsize = 204857600

[Devis]
  path = /var/www/html/devis
  strict locking = yes
  oplocks = no
  writeable = yes
  create mode = 0770
 directory mode = 0770
  valid users = root @ste_varinard
 public = yes
  #définition de la Corbeille
  vfs object = recycle
  recycle:repository = ../../../../non-sauve/Corbeille
  recycle:keeptree = yes
  recycle:versions = yes
  

[Samba] win2003 access smb share

2006-04-10 Thread jbuburuz
Hi all,

What I got:

Samba running on a RH box, smb version 3.0.10-1
My smb.conf has the following:
Security = server

Windows 2003 AD server(Authentication server)

The samba server smb.conf points to the win2003 server for authentication.
This works great! Samba users can access there stuff(files, printers,
shares).

Problem:

The windows 2003 server cannot access shares? For example:

c:\net use x: \\samba\printers
---error network name not found ---

Although the XP clients have no problems, they can access access samba
shares, and they are authenticating with windows 2003 server.
I have also made the change to the windows 2003 server Digitally sign
communications disabled thinnking this might be the casue of the problem.

Some other notes: The windows 2003 server was a 2000 server, upgraded. I
know this is more of a windows problem, but the windows server can access
other 2003/2000 servers through net use x: \\someMSbox\share with no
problems. The win3k server cannot access any samba server share!

Is there another security policy edit I have to do to win3k?

Hope I provided enough detail.

Any help, thoughts is appreciated.

thanks,

jerry


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


[Samba] pam_group with samba

2006-04-10 Thread Guillermo Gutierrez
I have read somewhere that pam_group can be used to map windows domain users to 
local linux/unix user groups. I have tried this with sshd but was not 
successful, has anyone successfully used the pam_group.so module to attach 
domain users to local linux groups?

sorry if this is off topic

Guillermo Gutierrez
Development Systems Engineer
Market Scan Information Systems Inc.
(818) 575-2000 x2427
[EMAIL PROTECTED]

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


Re: [Samba] win2003 access smb share

2006-04-10 Thread Matt Richards
i would of thought that would be a problem with the server not being 
able to resolv the samba name

what does ..  ping samba from XP and 2k3 show ?

If you run a wins server like the win2k3 server i would just add a 
mapping for samba to the ip addr of the samba server .. or
if you have a dns suffix of say hello.com setup then adding a dns entry 
of samba.hello.com should allow them to resolv it when they contact samba


or you could just shove an entry in your hosts file on your server lol.

Matt.

[EMAIL PROTECTED] wrote:

Hi all,

What I got:

Samba running on a RH box, smb version 3.0.10-1
My smb.conf has the following:
Security = server

Windows 2003 AD server(Authentication server)

The samba server smb.conf points to the win2003 server for authentication.
This works great! Samba users can access there stuff(files, printers,
shares).

Problem:

The windows 2003 server cannot access shares? For example:

c:\net use x: \\samba\printers
---error network name not found ---

Although the XP clients have no problems, they can access access samba
shares, and they are authenticating with windows 2003 server.
I have also made the change to the windows 2003 server Digitally sign
communications disabled thinnking this might be the casue of the problem.

Some other notes: The windows 2003 server was a 2000 server, upgraded. I
know this is more of a windows problem, but the windows server can access
other 2003/2000 servers through net use x: \\someMSbox\share with no
problems. The win3k server cannot access any samba server share!

Is there another security policy edit I have to do to win3k?

Hope I provided enough detail.

Any help, thoughts is appreciated.

thanks,

jerry


  



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


Re: [Samba] pam_winbind log ip nr

2006-04-10 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Collen Blijenberg wrote:
 Just a quick question,
 
 we use pam_winbind to authenticate users against smb-pdc.
 (works ok btw)
 
 is there a way to make pam_winbind log the ip numbers of failed
 authentications ??
 or is this done by the PAM service ??
 
 if i look in the /var/log/messages log i see the loggings 
 of success and failed logins, but without IP nrs.
 
 it's for adding iptables rules to a blacklist.

This should be done through the service I expect and
not PAM.  For example, this would be the job of sshd and
not pam_winbind.so.




cheers, jerry
=
I live in a Reply-to-All world.   ---
Samba--- http://www.samba.org
Centeris ---  http://www.centeris.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEOmb2IR7qMdg1EfYRAl4HAKDBVf+iSBA6qaLCwfL8lC5IiAilJgCgl4N2
ZIV7Hcf6Ektg5BTdHh55fGQ=
=1EGb
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Weird XP synchronisation issue. Using old cached IP?

2006-04-10 Thread Paul Smith
First, a little background:
I successfully migrated the samba PDC funtionality from an old Suse
machine to a new debian-based one.  The old machine was named PHOENIX
and had an ip address of 10.10.10.4.  The new one has the same name but
is on 10.10.10.14.
Everything is working just fine with this new domain (authentication,
adding users, computers, printing etc), except for one laptop.
Since the domain changeover I've assigned the old 10.10.10.4 IP address
to a machine running MS Project Server 2003 which works just fine.

Now, the issue:
When the XP-based laptop attempts to synchronise its offline files it
prompts me for a username/password, but the server name in the login
dialog is PROJECTSRV - the name of the ProjectServer at 10.10.10.4.

I have tried to rectify this by bringing down the ProjectServer, adding
an ip eth0.alias to the samba PDC of 10.10.10.4 and synchronising the
laptop.  This worked fine.  However, when I remove this ip alias and
bring the ProjectServer back online, the synchronisation error occurs
again.  I've searched the registry on this laptop for 10.10.10.4 and
PROJECTSRV but have found nothing.

Has this happened to anyone before?  How can I reset the laptop's
synchronisation configuration to only want to synchronise with PHOENIX?

Thanks

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


[Samba] Samba 4.0 compilation problem

2006-04-10 Thread jasmine mary

Hi all 

I am compiling the Samba4.0 which provides built in AD support. I compiled
it successfully by using the command configure.When i was issuing the make
proto all, i am getting the following error.

# make proto all
Compiling heimdal/lib/asn1/main.c with host compiler
In file included from heimdal_build/roken.h:7,
 from heimdal/lib/asn1/gen_locl.h:51,
 from heimdal/lib/asn1/main.c:34:
heimdal/lib/roken/roken.h:556: conflicting types for `gai_strerror'
/usr/include/netdb.h:307: previous declaration of `gai_strerror'
*** Error code 1
make: Fatal error: Command failed for target `heimdal/lib/asn1/main.ho'



# echo $PATH
/usr/local/bin/:/usr/local/doc/:/usr/ccs/bin/:/usr/share/lib/:/usr/sbin:/usr/bin

Path is set to gcc and make commands.

GCC version is 2.95.2. Solaris version is 8.

Please anyone guide me and help me.

Jasmine
--
View this message in context: 
http://www.nabble.com/Samba-4.0-compilation-problem-t1425848.html#a3844689
Sent from the Samba - General forum at Nabble.com.

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


Re: [Samba] Weird XP synchronisation issue. Using old cached IP?

2006-04-10 Thread Lars Rasmussen
On 4/10/06, Paul Smith [EMAIL PROTECTED] wrote:
 Now, the issue:
 When the XP-based laptop attempts to synchronise its offline files it
 prompts me for a username/password, but the server name in the login
 dialog is PROJECTSRV - the name of the ProjectServer at 10.10.10.4.

 I have tried to rectify this by bringing down the ProjectServer, adding
 an ip eth0.alias to the samba PDC of 10.10.10.4 and synchronising the
 laptop.  This worked fine.  However, when I remove this ip alias and
 bring the ProjectServer back online, the synchronisation error occurs
 again.  I've searched the registry on this laptop for 10.10.10.4 and
 PROJECTSRV but have found nothing.

 Has this happened to anyone before?  How can I reset the laptop's
 synchronisation configuration to only want to synchronise with PHOENIX?

Paul,
I'd try 2 things:

1. run
nbtstat -R
on the laptop.

2. Check your wins.dat file on the samba server to see if there is an
outdated entry present with the old IP.  If so, comment out/remove the
entry.
My wins.dat is located at /var/lib/samba/wins.dat

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


[Samba] Windows 98 Freezes when rename a network folder

2006-04-10 Thread Marco Aurelio Keiler

Samba 3.0.12 + Windows 98

When I try to rename a folder in the network the instance of windows 
explorer freezes and nothing happens.

And when I come back to the share the folder name hasn't changed.

thanks
Marco Aurélio Keiler
CCS / Unicamp

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


Re: [Samba] Windows 98 Freezes when rename a network folder

2006-04-10 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marco Aurelio Keiler wrote:
 Samba 3.0.12 + Windows 98
 
 When I try to rename a folder in the network the instance of windows
 explorer freezes and nothing happens.
 And when I come back to the share the folder name hasn't changed.

Marco,

Please retest with a more recent Samba release.  Thanks.




cheers, jerry
=
I live in a Reply-to-All world.   ---
Samba--- http://www.samba.org
Centeris ---  http://www.centeris.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEOrhGIR7qMdg1EfYRAlPxAKDx53Z8M4iAWpaaz3s/OBWdMJwINACeJWox
7hwXxeZFamDFoHj4Ic7S73I=
=6Nft
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Winbind without NetBIOS?

2006-04-10 Thread Evan Dandrea
I'm trying to join the Windows Server 2003 test server my university
has set up for their Novell to Windows migration and have run into
some trouble.  I can kinit and net ads join just fine, but when I try
a wbinfo -g/-u I get:
Error looking up domain groups/users

When I run wbinfo -t I get:
checking the trust secret via RPC calls failed
error code was NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND (0xc233)
Could not check secret

This, despite net lookup dc returning a pair of IP addresses.

I should note that NetBIOS is currently dropped between myself and the
server, thus the subject of this message.  I'm wondering if winbind
without netbios is still not possible as mentioned here previously:
http://marc.theaimsgroup.com/?l=sambam=110667151520426w=2

If that's not the case, that is that you can do winbind without
netbios, does anyone have any ideas of what the problem could be?

Here are links to the steps I took and my winbind log file.  I figured
they were too big to post as I ran winbind with a debug level greater
than 10:
http://pclug.pct.edu/~daneva76/samba-log-040706
http://pclug.pct.edu/~daneva76/winbind-log-041006

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


[Samba] Browsing problem

2006-04-10 Thread Niki Hammler

Hi,

I've got a browsing problem, I'm searching the error for a long time now 
so I think betimes it's a bug ;-)


For debugging purposes, I've left away everything in the network that's 
not necessary. There's now only one XP-Prof workstation (domain member) 
and one samba server (3.0.22, acting as PDC) anymore.


Bind9 is the local DNS server; Forward and PTR entries are working. The 
DNS domain is the same as the NT.


The problem is: Everything works (domain logons, searching the computer 
with the windows search feature, accessing with \\server, ...) EXCEPT 
the network neighbourhood. It is empty and there is no PC in it. There 
is no error and there is no delay while searching.


Here is a copy of my smb.conf:

[global]
netbios name = server
workgroup = INTRA.COMPANY.NET
server string = server
passdb backend = tdbsam

os level = 128
preferred master = yes
domain master = yes
local master = yes

security = user
encrypt passwords = true
domain logons = yes
logon path = \\%L\profile
logon drive = U:
logon home = \\%N\%U
logon script = logon.cmd

map to guest = never
;guest account = nobody
;map to guest = Bad User
;username map = /etc/samba/users.map
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = Enter*new*UNIX*password: %n\n 
\nRetype*new*UNIX*password: %n\n \npasswd:*password*updated*successfully*


;time server = yes
wins support = yes
;dns proxy = yes
name resolve order = lmhosts wins bcast host

printing = cups
printcap name = cups
load printers = yes

preserve case = yes
dos charset = CP850
create mask = 600
directory mask = 700
short preserve case = yes
unix charset = ISO8859-1

log level = 3
; log file = /var/log/samba/smb%m.log
log file = /var/log/samba/SMB.log
max log size = 5

[netlogon]
(...)

As you can see, I've configured samba as WINS-server.
Clients configuration is assigned by DHCP with:

option netbios-node-type 8;
option netbios-name-servers 192.168.200.121;

I've tried almost everything I could but I'm unable to find the error. 
The first strange thing is (on the server itself):


$ smbclient -L server -U %
Domain=[INTRA.COMPANY.NET] OS=[Unix] Server=[Samba 3.0.22]

Sharename   Type  Comment
-     ---
web-publish Printer   publish PDF on homepage
pub Disk  public place
IPC$IPC   IPC Service (server Server)
ADMIN$  IPC   IPC Service (server Server)
Domain=[INTRA.COMPANY.NET] OS=[Unix] Server=[Samba 3.0.22]

Server   Comment
----

WorkgroupMaster
----

As you can see, there is NO (!) server or workgroup although WINS, DNS 
etc etc is properly configured.


On windows:

% NET VIEW
no entries in list

% NBTSTAT -c
LAN-Verbindung:
Knoten-IP-Adresse: [192.168.200.201] Bereichskennung: []

  NetBIOS-Remotecache-Namentabelle

Name  TypHostadresse Dauer [Sek.]
-
INTRA.COMPANY.NET 1C  GRUPPE  192.168.200.121 72

% NBTSTAT -n
LAN-Verbindung:
Knoten-IP-Adresse: [192.168.200.201] Bereichskennung: []

Lokale NetBIOS-Namentabelle

   Name   Typ  Status
-
STYLISTIC 00  EINDEUTIG   Registriert
INTRA.COMPANY.NET 00  GRUPPE  Registriert
STYLISTIC 20  EINDEUTIG   Registriert
INTRA.COMPANY.NET 1E  GRUPPE  Registriert

% NBTSTAT -a SERVER
LAN-Verbindung:
Knoten-IP-Adresse: [192.168.200.201] Bereichskennung: []

  NetBIOS-Namentabelle des Remotecomputers

   Name   Typ  Status
-
SERVER   00  EINDEUTIG   Registriert
SERVER   03  EINDEUTIG   Registriert
SERVER   20  EINDEUTIG   Registriert
..__MSBROWSE__.  01  GRUPPE  Registriert
INTRA.COMPANY.NET00  GRUPPE  Registriert
INTRA.COMPANY.NET1B  EINDEUTIG   Registriert
INTRA.COMPANY.NET1C  GRUPPE  Registriert
INTRA.COMPANY.NET1D  EINDEUTIG   Registriert
INTRA.COMPANY.NET1E  GRUPPE  Registriert

MAC Adresse = 00-00-00-00-00-00

% BROWSTAT STATUS
Status for domain INTRA.COMPANY.NET on transport 
\Device\NetBT_Tcpip_{CFE1851D-F46

9-482D-8682-2137FEF1FF3E}
Browsing is active on domain.
Master browser name is: SERVER
Unable to determine build of browser master: 2
SERVER .  Version:04.09  Flags: 9a0b NT CONTROLLER SERVER
1 backup servers retrieved from 

Re: [Samba] Browsing problem

2006-04-10 Thread Craig White
On Tue, 2006-04-11 at 03:12 +0200, Niki Hammler wrote:
 Hi,
 
 I've got a browsing problem, I'm searching the error for a long time now 
 so I think betimes it's a bug ;-)
 
 For debugging purposes, I've left away everything in the network that's 
 not necessary. There's now only one XP-Prof workstation (domain member) 
 and one samba server (3.0.22, acting as PDC) anymore.
 
 Bind9 is the local DNS server; Forward and PTR entries are working. The 
 DNS domain is the same as the NT.
 
 The problem is: Everything works (domain logons, searching the computer 
 with the windows search feature, accessing with \\server, ...) EXCEPT 
 the network neighbourhood. It is empty and there is no PC in it. There 
 is no error and there is no delay while searching.
 
 Here is a copy of my smb.conf:
 
 [global]
  netbios name = server
  workgroup = INTRA.COMPANY.NET
  server string = server
  passdb backend = tdbsam
 
  os level = 128
  preferred master = yes
  domain master = yes
  local master = yes
 
  security = user
  encrypt passwords = true
  domain logons = yes
  logon path = \\%L\profile
  logon drive = U:
  logon home = \\%N\%U
  logon script = logon.cmd
 
  map to guest = never
  ;guest account = nobody
  ;map to guest = Bad User
  ;username map = /etc/samba/users.map
  unix password sync = yes
  passwd program = /usr/bin/passwd %u
  passwd chat = Enter*new*UNIX*password: %n\n 
 \nRetype*new*UNIX*password: %n\n \npasswd:*password*updated*successfully*
 
  ;time server = yes
  wins support = yes
  ;dns proxy = yes
  name resolve order = lmhosts wins bcast host
 
  printing = cups
  printcap name = cups
  load printers = yes
 
  preserve case = yes
  dos charset = CP850
  create mask = 600
  directory mask = 700
  short preserve case = yes
  unix charset = ISO8859-1
 
  log level = 3
  ; log file = /var/log/samba/smb%m.log
  log file = /var/log/samba/SMB.log
  max log size = 5
 
 [netlogon]
   (...)
 
 As you can see, I've configured samba as WINS-server.
 Clients configuration is assigned by DHCP with:
 
 option netbios-node-type 8;
 option netbios-name-servers 192.168.200.121;
 
 I've tried almost everything I could but I'm unable to find the error. 
 The first strange thing is (on the server itself):
 
 $ smbclient -L server -U %
 Domain=[INTRA.COMPANY.NET] OS=[Unix] Server=[Samba 3.0.22]
 
  Sharename   Type  Comment
  -     ---
  web-publish Printer   publish PDF on homepage
  pub Disk  public place
  IPC$IPC   IPC Service (server Server)
  ADMIN$  IPC   IPC Service (server Server)
 Domain=[INTRA.COMPANY.NET] OS=[Unix] Server=[Samba 3.0.22]
 
  Server   Comment
  ----
 
  WorkgroupMaster
  ----
 
 As you can see, there is NO (!) server or workgroup although WINS, DNS 
 etc etc is properly configured.
 
 On windows:
 
 % NET VIEW
 no entries in list
 
 % NBTSTAT -c
 LAN-Verbindung:
 Knoten-IP-Adresse: [192.168.200.201] Bereichskennung: []
 
NetBIOS-Remotecache-Namentabelle
 
  Name  TypHostadresse Dauer [Sek.]
  -
  INTRA.COMPANY.NET 1C  GRUPPE  192.168.200.121 72
 
 % NBTSTAT -n
 LAN-Verbindung:
 Knoten-IP-Adresse: [192.168.200.201] Bereichskennung: []
 
  Lokale NetBIOS-Namentabelle
 
 Name   Typ  Status
  -
  STYLISTIC 00  EINDEUTIG   Registriert
  INTRA.COMPANY.NET 00  GRUPPE  Registriert
  STYLISTIC 20  EINDEUTIG   Registriert
  INTRA.COMPANY.NET 1E  GRUPPE  Registriert
 
 % NBTSTAT -a SERVER
 LAN-Verbindung:
 Knoten-IP-Adresse: [192.168.200.201] Bereichskennung: []
 
NetBIOS-Namentabelle des Remotecomputers
 
 Name   Typ  Status
  -
  SERVER   00  EINDEUTIG   Registriert
  SERVER   03  EINDEUTIG   Registriert
  SERVER   20  EINDEUTIG   Registriert
  ..__MSBROWSE__.  01  GRUPPE  Registriert
  INTRA.COMPANY.NET00  GRUPPE  Registriert
  INTRA.COMPANY.NET1B  EINDEUTIG   Registriert
  INTRA.COMPANY.NET1C  GRUPPE  Registriert
  INTRA.COMPANY.NET1D  EINDEUTIG   Registriert
  INTRA.COMPANY.NET1E  GRUPPE  Registriert
 
  MAC Adresse = 00-00-00-00-00-00
 
 % BROWSTAT STATUS
 Status for domain INTRA.COMPANY.NET on transport 
 

Re: [Samba] Winbind without NetBIOS?

2006-04-10 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Evan Dandrea wrote:
 I'm trying to join the Windows Server 2003 test server my university
 has set up for their Novell to Windows migration and have run into
 some trouble.  I can kinit and net ads join just fine, but when I try
 a wbinfo -g/-u I get:
 Error looking up domain groups/users
 
 When I run wbinfo -t I get:
 checking the trust secret via RPC calls failed
 error code was NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND (0xc233)
 Could not check secret

This has been fixed in the current SAMBA_3_0 code and
will be in 3.0.23




cheers, jerry



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEOyDtIR7qMdg1EfYRAoyBAJ0XqOErcl+bMitL8ibwBvIxoVkB6wCeNFyc
GnC6ssMyENTK6vRqL9q/5oA=
=BIZY
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] file transfer problem

2006-04-10 Thread Elvar

Hello,


I'm having a problem copying large amounts of data from our Win2k3 
server to a samba share on the samba server. I've turned debugging on in 
the smb.conf file all the way up to level 10 and I still do not see what 
is causing my file transfers to abort. It consistently aborts copying 
files as small as 10 gigs even. I've read through the performance tuning 
section in the handbook and tried those options, but I'm still not 
having any luck. I tried copying the same data using ftp instead and did 
not have any problems so I do not think there is a physical networking 
problem. If anyone has any suggestions I would greatly appreciate them.




Kind regards,
Elvar

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


svn commit: samba r15016 - in branches/SAMBA_4_0/source/torture/raw: .

2006-04-10 Thread tridge
Author: tridge
Date: 2006-04-10 06:06:26 + (Mon, 10 Apr 2006)
New Revision: 15016

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15016

Log:

add a test for a 2nd open with an exclusive oplock. It does not cause
a break, as exclusive oplocks don't cache close requests

Modified:
   branches/SAMBA_4_0/source/torture/raw/oplock.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/oplock.c
===
--- branches/SAMBA_4_0/source/torture/raw/oplock.c  2006-04-10 05:12:49 UTC 
(rev 15015)
+++ branches/SAMBA_4_0/source/torture/raw/oplock.c  2006-04-10 06:06:26 UTC 
(rev 15016)
@@ -146,7 +146,13 @@
fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, EXCLUSIVE_OPLOCK_RETURN);
 
-   printf(unlink it - should be no break\n);
+   printf(a 2nd open should not cause a break\n);
+   status = smb_raw_open(cli-tree, mem_ctx, io);
+   CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
+   CHECK_VAL(break_info.count, 0);
+   CHECK_VAL(break_info.failures, 0);
+
+   printf(unlink it - should also be no break\n);
unl.unlink.in.pattern = fname;
unl.unlink.in.attrib = 0;
status = smb_raw_unlink(cli-tree, unl);



svn commit: samba r15017 - in branches/SAMBA_4_0/source/ntvfs/sysdep: .

2006-04-10 Thread tpot
Author: tpot
Date: 2006-04-10 12:15:40 + (Mon, 10 Apr 2006)
New Revision: 15017

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15017

Log:
When making up our own inotify functions, make sure glibc exports the 
__NR_inotify_* syscall numbers before trying.

Modified:
   branches/SAMBA_4_0/source/ntvfs/sysdep/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/sysdep/config.m4
===
--- branches/SAMBA_4_0/source/ntvfs/sysdep/config.m42006-04-10 06:06:26 UTC 
(rev 15016)
+++ branches/SAMBA_4_0/source/ntvfs/sysdep/config.m42006-04-10 12:15:40 UTC 
(rev 15017)
@@ -1,7 +1,13 @@
 AC_CHECK_HEADERS(linux/inotify.h asm/unistd.h)
 AC_CHECK_FUNC(inotify_init)
+AC_CHECK_DECL(__NR_inotify_init)
 
 SMB_ENABLE(sys_notify_inotify, NO)
-if test x$ac_cv_header_linux_inotify_h = xyes; then
+
+if test x$ac_cv_func_inotify_init = xyes -a 
x$ac_cv_header_linux_inotify_h = xyes; then
 SMB_ENABLE(sys_notify_inotify, YES)
 fi
+
+if test x$ac_cv_header_linux_inotify_h = xyes -a 
x$ac_cv_have_decl___NR_inotify_init; then
+SMB_ENABLE(sys_notify_inotify, YES)
+fi



svn commit: samba r15018 - in branches/SAMBA_3_0: examples/VFS source/include source/lib source/libsmb source/locking source/modules source/param source/smbd source/tests source/utils

2006-04-10 Thread jra
Author: jra
Date: 2006-04-10 15:33:04 + (Mon, 10 Apr 2006)
New Revision: 15018

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15018

Log:
Merge Volker's ipc/trans2/nttrans changes over
into 3.0. Also merge the new POSIX lock code - this
is not enabled unless -DDEVELOPER is defined.
This doesn't yet map onto underlying system POSIX
locks. Updates vfs to allow lock queries.
Jeremy.

Modified:
   branches/SAMBA_3_0/examples/VFS/Makefile.in
   branches/SAMBA_3_0/examples/VFS/skel_opaque.c
   branches/SAMBA_3_0/examples/VFS/skel_transparent.c
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/include/smbprofile.h
   branches/SAMBA_3_0/source/include/trans2.h
   branches/SAMBA_3_0/source/include/vfs.h
   branches/SAMBA_3_0/source/include/vfs_macros.h
   branches/SAMBA_3_0/source/lib/util.c
   branches/SAMBA_3_0/source/libsmb/clifile.c
   branches/SAMBA_3_0/source/libsmb/clitrans.c
   branches/SAMBA_3_0/source/libsmb/errormap.c
   branches/SAMBA_3_0/source/libsmb/smb_signing.c
   branches/SAMBA_3_0/source/locking/brlock.c
   branches/SAMBA_3_0/source/locking/locking.c
   branches/SAMBA_3_0/source/locking/posix.c
   branches/SAMBA_3_0/source/modules/vfs_full_audit.c
   branches/SAMBA_3_0/source/param/loadparm.c
   branches/SAMBA_3_0/source/smbd/blocking.c
   branches/SAMBA_3_0/source/smbd/ipc.c
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/process.c
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/server.c
   branches/SAMBA_3_0/source/smbd/trans2.c
   branches/SAMBA_3_0/source/smbd/vfs-wrap.c
   branches/SAMBA_3_0/source/smbd/vfs.c
   branches/SAMBA_3_0/source/tests/os2_delete.c
   branches/SAMBA_3_0/source/utils/net_sam.c
   branches/SAMBA_3_0/source/utils/status.c


Changeset:
Sorry, the patch is too large (6921 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15018


svn commit: samba r15019 - in trunk/source/smbd: .

2006-04-10 Thread jra
Author: jra
Date: 2006-04-10 18:43:41 + (Mon, 10 Apr 2006)
New Revision: 15019

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15019

Log:
Fix issue with samba4 netbench torture tester,
it sends break replies to break to none from level2
requests and it shouldn't. Just don't log a debug
level zero message.
Jeremy.

Modified:
   trunk/source/smbd/reply.c


Changeset:
Modified: trunk/source/smbd/reply.c
===
--- trunk/source/smbd/reply.c   2006-04-10 15:33:04 UTC (rev 15018)
+++ trunk/source/smbd/reply.c   2006-04-10 18:43:41 UTC (rev 15019)
@@ -269,10 +269,13 @@
switch(next_mb_char_size(s)) {
case 4:
*d++ = *s++;
+   /*fall through*/
case 3:
*d++ = *s++;
+   /*fall through*/
case 2:
*d++ = *s++;
+   /*fall through*/
case 1:
*d++ = *s++;
break;
@@ -374,10 +377,13 @@
switch(next_mb_char_size(s)) {
case 4:
*d++ = *s++;
+   /*fall through*/
case 3:
*d++ = *s++;
+   /*fall through*/
case 2:
*d++ = *s++;
+   /*fall through*/
case 1:
*d++ = *s++;
break;
@@ -5241,7 +5247,14 @@
 */

if (fsp-oplock_type == 0) {
-   DEBUG(0,(reply_lockingX: Error : oplock break from 
+
+   /* The Samba4 nbench simulator doesn't understand
+  the difference between break to level2 and break
+  to none from level2 - it sends oplock break
+  replies in both cases. Don't keep logging an error
+  message here - just ignore it. JRA. */
+
+   DEBUG(5,(reply_lockingX: Error : oplock break from 
 client for fnum = %d (oplock=%d) and no 
 oplock granted on this file (%s).\n,
 fsp-fnum, fsp-oplock_type, fsp-fsp_name));



svn commit: samba r15020 - in branches/SAMBA_3_0/source/smbd: .

2006-04-10 Thread jra
Author: jra
Date: 2006-04-10 18:44:27 + (Mon, 10 Apr 2006)
New Revision: 15020

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15020

Log:
Fix issue with samba4 netbench torture tester,
it sends break replies to break to none from level2
requests and it shouldn't. Just don't log a debug
level zero message.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===
--- branches/SAMBA_3_0/source/smbd/reply.c  2006-04-10 18:43:41 UTC (rev 
15019)
+++ branches/SAMBA_3_0/source/smbd/reply.c  2006-04-10 18:44:27 UTC (rev 
15020)
@@ -5247,7 +5247,14 @@
 */

if (fsp-oplock_type == 0) {
-   DEBUG(0,(reply_lockingX: Error : oplock break from 
+
+   /* The Samba4 nbench simulator doesn't understand
+  the difference between break to level2 and break
+  to none from level2 - it sends oplock break
+  replies in both cases. Don't keep logging an error
+  message here - just ignore it. JRA. */
+
+   DEBUG(5,(reply_lockingX: Error : oplock break from 
 client for fnum = %d (oplock=%d) and no 
 oplock granted on this file (%s).\n,
 fsp-fnum, fsp-oplock_type, fsp-fsp_name));



svn commit: samba r15021 - in branches/SAMBA_4_0/source/librpc/rpc: .

2006-04-10 Thread mimir
Author: mimir
Date: 2006-04-10 22:03:26 + (Mon, 10 Apr 2006)
New Revision: 15021

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15021

Log:
Couple more comments and fixes in spirit of utility functions
for composite interface.


rafal


Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_auth.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_auth.c
===
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_auth.c  2006-04-10 18:44:27 UTC 
(rev 15020)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_auth.c  2006-04-10 22:03:26 UTC 
(rev 15021)
@@ -27,13 +27,13 @@
 #include auth/gensec/gensec.h
 #include librpc/rpc/dcerpc.h
 
+
 /*
-  do a non-athenticated dcerpc bind
+  Send request to do a non-authenticated dcerpc bind
 */
-
 struct composite_context *dcerpc_bind_auth_none_send(TALLOC_CTX *mem_ctx,
 struct dcerpc_pipe *p,
-const struct 
dcerpc_interface_table *table)
+const struct 
dcerpc_interface_table *table)
 {
struct dcerpc_syntax_id syntax;
struct dcerpc_syntax_id transfer_syntax;
@@ -58,19 +58,29 @@
return dcerpc_bind_send(p, mem_ctx, syntax, transfer_syntax);
 }
 
+
+/*
+  Receive result of a non-authenticated dcerpc bind
+*/
 NTSTATUS dcerpc_bind_auth_none_recv(struct composite_context *ctx)
 {
return dcerpc_bind_recv(ctx);
 }
 
+
+/*
+  Perform sync non-authenticated dcerpc bind
+*/
 NTSTATUS dcerpc_bind_auth_none(struct dcerpc_pipe *p,
   const struct dcerpc_interface_table *table)
 {
struct composite_context *ctx;
+
ctx = dcerpc_bind_auth_none_send(p, p, table);
return dcerpc_bind_auth_none_recv(ctx);
 }
 
+
 struct bind_auth_state {
struct dcerpc_pipe *pipe;
DATA_BLOB credentials;
@@ -82,12 +92,14 @@
 
 static void bind_auth_next_step(struct composite_context *c)
 {
-   struct bind_auth_state *state =
-   talloc_get_type(c-private_data, struct bind_auth_state);
-   struct dcerpc_security *sec = state-pipe-conn-security_state;
+   struct bind_auth_state *state;
+   struct dcerpc_security *sec;
struct composite_context *creq;
BOOL more_processing = False;
 
+   state = talloc_get_type(c-private_data, struct bind_auth_state);
+   sec = state-pipe-conn-security_state;
+
/* The status value here, from GENSEC is vital to the security
 * of the system.  Even if the other end accepts, if GENSEC
 * claims 'MORE_PROCESSING_REQUIRED' then you must keep
@@ -120,6 +132,7 @@
/* NO reply expected, so just send it */
c-status = dcerpc_auth3(state-pipe-conn, state);
if (!composite_is_ok(c)) return;
+
composite_done(c);
return;
}
@@ -129,14 +142,16 @@
creq = dcerpc_alter_context_send(state-pipe, state,
 state-pipe-syntax,
 state-pipe-transfer_syntax);
+   if (composite_nomem(creq, c)) return;
+
composite_continue(c, creq, bind_auth_recv_alter, c);
 }
 
+
 static void bind_auth_recv_alter(struct composite_context *creq)
 {
-   struct composite_context *c =
-   talloc_get_type(creq-async.private_data,
-   struct composite_context);
+   struct composite_context *c = talloc_get_type(creq-async.private_data,
+ struct composite_context);
 
c-status = dcerpc_alter_context_recv(creq);
if (!composite_is_ok(c)) return;
@@ -144,13 +159,13 @@
bind_auth_next_step(c);
 }
 
+
 static void bind_auth_recv_bindreply(struct composite_context *creq)
 {
-   struct composite_context *c =
-   talloc_get_type(creq-async.private_data,
-   struct composite_context);
-   struct bind_auth_state *state =
-   talloc_get_type(c-private_data, struct bind_auth_state);
+   struct composite_context *c = talloc_get_type(creq-async.private_data,
+ struct composite_context);
+   struct bind_auth_state *state = talloc_get_type(c-private_data,
+   struct bind_auth_state);
 
c-status = dcerpc_bind_recv(creq);
if (!composite_is_ok(c)) return;
@@ -165,8 +180,9 @@
bind_auth_next_step(c);
 }
 
+
 /**
-   Bind to a DCE/RPC pipe, async
+   Bind to a DCE/RPC pipe, send async request
@param mem_ctx TALLOC_CTX for the allocation of the composite_context
@param p The dcerpc_pipe to bind (must already be connected)
@param table The interface table to use (the DCE/RPC bind both selects and 
interface and 

svn commit: samba r15022 - in branches/SAMBA_3_0/source: include smbd

2006-04-10 Thread jra
Author: jra
Date: 2006-04-10 22:47:09 + (Mon, 10 Apr 2006)
New Revision: 15022

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15022

Log:
Fix core dumps on normal server exit.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/include/includes.h
   branches/SAMBA_3_0/source/smbd/process.c
   branches/SAMBA_3_0/source/smbd/server.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/includes.h
===
--- branches/SAMBA_3_0/source/include/includes.h2006-04-10 22:03:26 UTC 
(rev 15021)
+++ branches/SAMBA_3_0/source/include/includes.h2006-04-10 22:47:09 UTC 
(rev 15022)
@@ -1564,7 +1564,7 @@
 void smb_panic( const char *why ) NORETURN_ATTRIBUTE ;
 void dump_core(void) NORETURN_ATTRIBUTE ;
 void exit_server(const char *const reason) NORETURN_ATTRIBUTE ;
-void exit_server_cleanly(void) NORETURN_ATTRIBUTE ;
+void exit_server_cleanly(const char *const reason) NORETURN_ATTRIBUTE ;
 void exit_server_fault(void) NORETURN_ATTRIBUTE ;
 
 #endif /* _INCLUDES_H */

Modified: branches/SAMBA_3_0/source/smbd/process.c
===
--- branches/SAMBA_3_0/source/smbd/process.c2006-04-10 22:03:26 UTC (rev 
15021)
+++ branches/SAMBA_3_0/source/smbd/process.c2006-04-10 22:47:09 UTC (rev 
15022)
@@ -303,7 +303,7 @@
process_aio_queue();
 
if (got_sig_term) {
-   exit_server_cleanly();
+   exit_server_cleanly(termination signal);
}
 
/* check for async change notify events */
@@ -886,7 +886,7 @@
/* Make sure this is an SMB packet. smb_size contains NetBIOS header so 
subtract 4 from it. */
if ((strncmp(smb_base(inbuf),\377SMB,4) != 0) || (size  (smb_size - 
4))) {
DEBUG(2,(Non-SMB packet of length %d. Terminating 
server\n,smb_len(inbuf)));
-   exit_server(Non-SMB packet);
+   exit_server_cleanly(Non-SMB packet);
return(-1);
}
 
@@ -1100,7 +1100,7 @@
static unsigned char buf[5] = {0x83, 0, 0, 1, 0x81};
DEBUG( 1, ( Connection denied from %s\n, 
client_addr() ) );
(void)send_smb(smbd_server_fd(),(char *)buf);
-   exit_server(connection denied);
+   exit_server_cleanly(connection denied);
}
}
 
@@ -1122,7 +1122,7 @@
DEBUG(0,(ERROR: Invalid message response size! %d 
%d\n,
nread, smb_len(outbuf)));
} else if (!send_smb(smbd_server_fd(),outbuf)) {
-   exit_server(process_smb: send_smb failed.);
+   exit_server_cleanly(process_smb: send_smb failed.);
}
}
trans_num++;

Modified: branches/SAMBA_3_0/source/smbd/server.c
===
--- branches/SAMBA_3_0/source/smbd/server.c 2006-04-10 22:03:26 UTC (rev 
15021)
+++ branches/SAMBA_3_0/source/smbd/server.c 2006-04-10 22:47:09 UTC (rev 
15022)
@@ -153,7 +153,7 @@
void *buf, size_t len)
 {
DEBUG(3, (got a SHUTDOWN message\n));
-   exit_server_cleanly();
+   exit_server_cleanly(NULL);
 }
 
 #ifdef DEVELOPER
@@ -397,7 +397,7 @@

if (num == -1  errno == EINTR) {
if (got_sig_term) {
-   exit_server_cleanly();
+   exit_server_cleanly(NULL);
}
 
/* check for sighup processing */
@@ -681,9 +681,9 @@
exit_server_common(SERVER_EXIT_ABNORMAL, explanation);
 }
 
-void exit_server_cleanly(void)
+void exit_server_cleanly(const char *const explanation)
 {
-   exit_server_common(SERVER_EXIT_NORMAL, NULL);
+   exit_server_common(SERVER_EXIT_NORMAL, explanation);
 }
 
 void exit_server_fault(void)
@@ -1014,6 +1014,6 @@
 
namecache_shutdown();
 
-   exit_server_cleanly();
+   exit_server_cleanly(NULL);
return(0);
 }



svn commit: samba r15023 - in trunk/source: include smbd

2006-04-10 Thread jra
Author: jra
Date: 2006-04-10 22:47:37 + (Mon, 10 Apr 2006)
New Revision: 15023

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15023

Log:
Fix core dumps on normal server exit.
Jeremy.

Modified:
   trunk/source/include/includes.h
   trunk/source/smbd/process.c
   trunk/source/smbd/server.c


Changeset:
Modified: trunk/source/include/includes.h
===
--- trunk/source/include/includes.h 2006-04-10 22:47:09 UTC (rev 15022)
+++ trunk/source/include/includes.h 2006-04-10 22:47:37 UTC (rev 15023)
@@ -1565,7 +1565,7 @@
 void smb_panic( const char *why ) NORETURN_ATTRIBUTE ;
 void dump_core(void) NORETURN_ATTRIBUTE ;
 void exit_server(const char *const reason) NORETURN_ATTRIBUTE ;
-void exit_server_cleanly(void) NORETURN_ATTRIBUTE ;
+void exit_server_cleanly(const char *const reason) NORETURN_ATTRIBUTE ;
 void exit_server_fault(void) NORETURN_ATTRIBUTE ;
 
 #endif /* _INCLUDES_H */

Modified: trunk/source/smbd/process.c
===
--- trunk/source/smbd/process.c 2006-04-10 22:47:09 UTC (rev 15022)
+++ trunk/source/smbd/process.c 2006-04-10 22:47:37 UTC (rev 15023)
@@ -303,7 +303,7 @@
process_aio_queue();
 
if (got_sig_term) {
-   exit_server_cleanly();
+   exit_server_cleanly(termination signal);
}
 
/* check for async change notify events */
@@ -886,7 +886,7 @@
/* Make sure this is an SMB packet. smb_size contains NetBIOS header so 
subtract 4 from it. */
if ((strncmp(smb_base(inbuf),\377SMB,4) != 0) || (size  (smb_size - 
4))) {
DEBUG(2,(Non-SMB packet of length %d. Terminating 
server\n,smb_len(inbuf)));
-   exit_server(Non-SMB packet);
+   exit_server_cleanly(Non-SMB packet);
return(-1);
}
 
@@ -1100,7 +1100,7 @@
static unsigned char buf[5] = {0x83, 0, 0, 1, 0x81};
DEBUG( 1, ( Connection denied from %s\n, 
client_addr() ) );
(void)send_smb(smbd_server_fd(),(char *)buf);
-   exit_server(connection denied);
+   exit_server_cleanly(connection denied);
}
}
 
@@ -1122,7 +1122,7 @@
DEBUG(0,(ERROR: Invalid message response size! %d 
%d\n,
nread, smb_len(outbuf)));
} else if (!send_smb(smbd_server_fd(),outbuf)) {
-   exit_server(process_smb: send_smb failed.);
+   exit_server_cleanly(process_smb: send_smb failed.);
}
}
trans_num++;

Modified: trunk/source/smbd/server.c
===
--- trunk/source/smbd/server.c  2006-04-10 22:47:09 UTC (rev 15022)
+++ trunk/source/smbd/server.c  2006-04-10 22:47:37 UTC (rev 15023)
@@ -153,7 +153,7 @@
void *buf, size_t len)
 {
DEBUG(3, (got a SHUTDOWN message\n));
-   exit_server_cleanly();
+   exit_server_cleanly(NULL);
 }
 
 #ifdef DEVELOPER
@@ -397,7 +397,7 @@

if (num == -1  errno == EINTR) {
if (got_sig_term) {
-   exit_server_cleanly();
+   exit_server_cleanly(NULL);
}
 
/* check for sighup processing */
@@ -681,9 +681,9 @@
exit_server_common(SERVER_EXIT_ABNORMAL, explanation);
 }
 
-void exit_server_cleanly(void)
+void exit_server_cleanly(const char *const explanation)
 {
-   exit_server_common(SERVER_EXIT_NORMAL, NULL);
+   exit_server_common(SERVER_EXIT_NORMAL, explanation);
 }
 
 void exit_server_fault(void)
@@ -1014,6 +1014,6 @@
 
namecache_shutdown();
 
-   exit_server_cleanly();
+   exit_server_cleanly(NULL);
return(0);
 }



svn commit: samba r15024 - in trunk/source/printing: .

2006-04-10 Thread jra
Author: jra
Date: 2006-04-10 22:56:54 + (Mon, 10 Apr 2006)
New Revision: 15024

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15024

Log:
Fix exit_server_cleanly call.
Jeremy.

Modified:
   trunk/source/printing/printing.c


Changeset:
Modified: trunk/source/printing/printing.c
===
--- trunk/source/printing/printing.c2006-04-10 22:47:37 UTC (rev 15023)
+++ trunk/source/printing/printing.c2006-04-10 22:56:54 UTC (rev 15024)
@@ -1400,7 +1400,7 @@
/* check for some essential signals first */

 if (got_sig_term) {
-exit_server_cleanly();
+exit_server_cleanly(NULL);
 }
 
 if (reload_after_sighup) {



svn commit: samba r15025 - in branches/SAMBA_3_0/source/printing: .

2006-04-10 Thread jra
Author: jra
Date: 2006-04-10 22:57:12 + (Mon, 10 Apr 2006)
New Revision: 15025

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15025

Log:
Fix exit_server_cleanly call.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/printing/printing.c


Changeset:
Modified: branches/SAMBA_3_0/source/printing/printing.c
===
--- branches/SAMBA_3_0/source/printing/printing.c   2006-04-10 22:56:54 UTC 
(rev 15024)
+++ branches/SAMBA_3_0/source/printing/printing.c   2006-04-10 22:57:12 UTC 
(rev 15025)
@@ -1400,7 +1400,7 @@
/* check for some essential signals first */

 if (got_sig_term) {
-exit_server_cleanly();
+exit_server_cleanly(NULL);
 }
 
 if (reload_after_sighup) {



svn commit: samba r15026 - in branches/SAMBA_3_0/source/locking: .

2006-04-10 Thread jra
Author: jra
Date: 2006-04-10 23:29:47 + (Mon, 10 Apr 2006)
New Revision: 15026

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15026

Log:
Fix warning until POSIX locking finished.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/locking/brlock.c


Changeset:
Modified: branches/SAMBA_3_0/source/locking/brlock.c
===
--- branches/SAMBA_3_0/source/locking/brlock.c  2006-04-10 22:57:12 UTC (rev 
15025)
+++ branches/SAMBA_3_0/source/locking/brlock.c  2006-04-10 23:29:47 UTC (rev 
15026)
@@ -601,7 +601,6 @@
unsigned int i, count;
struct lock_struct *locks = (struct lock_struct *)br_lck-lock_data;
struct lock_struct *tp;
-   files_struct *fsp = br_lck-fsp;
BOOL lock_was_added = False;
 
/* No zero-zero locks for POSIX. */
@@ -664,8 +663,8 @@
/* FIXME - this call doesn't work correctly yet for POSIX locks... */
 
if ((plock-lock_type != PENDING_LOCK)  
lp_posix_locking(SNUM(fsp-conn))) {
+   files_struct *fsp = br_lck-fsp;
 
-
if (!set_posix_lock(fsp, plock-start, plock-size, 
plock-lock_type, POSIX_LOCK)) {
if (errno == EACCES || errno == EAGAIN) {
SAFE_FREE(tp);



svn commit: samba r15027 - in trunk/source/locking: .

2006-04-10 Thread jra
Author: jra
Date: 2006-04-10 23:31:33 + (Mon, 10 Apr 2006)
New Revision: 15027

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15027

Log:
Fix warning until POSIX locking finished.
Jeremy.

Modified:
   trunk/source/locking/brlock.c


Changeset:
Modified: trunk/source/locking/brlock.c
===
--- trunk/source/locking/brlock.c   2006-04-10 23:29:47 UTC (rev 15026)
+++ trunk/source/locking/brlock.c   2006-04-10 23:31:33 UTC (rev 15027)
@@ -601,7 +601,6 @@
unsigned int i, count;
struct lock_struct *locks = (struct lock_struct *)br_lck-lock_data;
struct lock_struct *tp;
-   files_struct *fsp = br_lck-fsp;
BOOL lock_was_added = False;
 
/* No zero-zero locks for POSIX. */
@@ -660,7 +659,12 @@
   lock type so it can cope with the difference between
   Windows stacking locks and POSIX flat ones. */
 
+#if 0
+   /* FIXME - this call doesn't work correctly yet for POSIX locks... */
+
if ((plock-lock_type != PENDING_LOCK)  
lp_posix_locking(SNUM(fsp-conn))) {
+   files_struct *fsp = br_lck-fsp;
+
if (!set_posix_lock(fsp, plock-start, plock-size, 
plock-lock_type, POSIX_LOCK)) {
if (errno == EACCES || errno == EAGAIN) {
SAFE_FREE(tp);
@@ -671,6 +675,7 @@
}
}
}
+#endif
 
if (!lock_was_added) {
memcpy(tp[count], plock, sizeof(struct lock_struct));
@@ -950,10 +955,14 @@
return True;
}
 
+#if 0
+   /* FIXME - this call doesn't work correctly yet for POSIX locks... */
+
/* Unlock any POSIX regions. */
if(lp_posix_locking(br_lck-fsp-conn-cnum)) {
release_posix_lock(br_lck-fsp, plock-start, plock-size);
}
+#endif
 
/* Realloc so we don't leak entries per unlock call. */
if (count) {



svn commit: samba r15028 - in branches/SAMBA_3_0/source/libsmb: .

2006-04-10 Thread jra
Author: jra
Date: 2006-04-10 23:32:05 + (Mon, 10 Apr 2006)
New Revision: 15028

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15028

Log:
Fix logic error checking valid args to POSIX lock
call.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/libsmb/clifile.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/clifile.c
===
--- branches/SAMBA_3_0/source/libsmb/clifile.c  2006-04-10 23:31:33 UTC (rev 
15027)
+++ branches/SAMBA_3_0/source/libsmb/clifile.c  2006-04-10 23:32:05 UTC (rev 
15028)
@@ -1148,7 +1148,7 @@
SMB_BIG_UINT offset, SMB_BIG_UINT len,
BOOL wait_lock, enum brl_type lock_type)
 {
-   if (lock_type != READ_LOCK || lock_type != WRITE_LOCK) {
+   if (lock_type != READ_LOCK  lock_type != WRITE_LOCK) {
return False;
}
return cli_posix_lock_internal(cli, fnum, offset, len, wait_lock, 
lock_type);



Build status as of Tue Apr 11 00:00:02 2006

2006-04-10 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-04-10 
00:00:04.0 +
+++ /home/build/master/cache/broken_results.txt 2006-04-11 00:00:34.0 
+
@@ -1,17 +1,17 @@
-Build status as of Mon Apr 10 00:00:02 2006
+Build status as of Tue Apr 11 00:00:02 2006
 
 Build counts:
 Tree Total  Broken Panic 
-ccache   8  1  0 
-distcc   9  2  0 
-lorikeet-heimdal 14 14 0 
-ppp  18 0  0 
-rsync33 9  0 
+ccache   9  2  0 
+distcc   10 2  0 
+lorikeet-heimdal 17 17 0 
+ppp  19 0  0 
+rsync35 10 0 
 samba3  0  0 
 samba-docs   0  0  0 
-samba4   38 26 2 
-samba_3_035 7  0 
-smb-build23 0  0 
-talloc   31 15 0 
-tdb  31 3  0 
+samba4   40 27 2 
+samba_3_036 24 0 
+smb-build24 0  0 
+talloc   33 17 0 
+tdb  33 3  0 
 


svn commit: samba r15029 - in branches/SAMBA_4_0/source/ntvfs/sysdep: .

2006-04-10 Thread tridge
Author: tridge
Date: 2006-04-11 01:19:20 + (Tue, 11 Apr 2006)
New Revision: 15029

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15029

Log:

fixed the detection of inotify

Modified:
   branches/SAMBA_4_0/source/ntvfs/sysdep/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/sysdep/config.m4
===
--- branches/SAMBA_4_0/source/ntvfs/sysdep/config.m42006-04-10 23:32:05 UTC 
(rev 15028)
+++ branches/SAMBA_4_0/source/ntvfs/sysdep/config.m42006-04-11 01:19:20 UTC 
(rev 15029)
@@ -1,6 +1,6 @@
 AC_CHECK_HEADERS(linux/inotify.h asm/unistd.h)
 AC_CHECK_FUNC(inotify_init)
-AC_CHECK_DECL(__NR_inotify_init)
+AC_HAVE_DECL(__NR_inotify_init, [#include asm/unistd.h])
 
 SMB_ENABLE(sys_notify_inotify, NO)
 
@@ -8,6 +8,6 @@
 SMB_ENABLE(sys_notify_inotify, YES)
 fi
 
-if test x$ac_cv_header_linux_inotify_h = xyes -a 
x$ac_cv_have_decl___NR_inotify_init; then
+if test x$ac_cv_header_linux_inotify_h = xyes -a 
x$ac_cv_have___NR_inotify_init_decl = xyes; then
 SMB_ENABLE(sys_notify_inotify, YES)
 fi



svn commit: samba r15031 - in trunk/source: lib smbd

2006-04-10 Thread jra
Author: jra
Date: 2006-04-11 01:43:16 + (Tue, 11 Apr 2006)
New Revision: 15031

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15031

Log:
On a performace hunt... Remove as many extraneous
memset's as possible.
Jeremy.

Modified:
   trunk/source/lib/util.c
   trunk/source/lib/util_sock.c
   trunk/source/smbd/nttrans.c
   trunk/source/smbd/process.c
   trunk/source/smbd/reply.c
   trunk/source/smbd/trans2.c


Changeset:
Modified: trunk/source/lib/util.c
===
--- trunk/source/lib/util.c 2006-04-11 01:43:13 UTC (rev 15030)
+++ trunk/source/lib/util.c 2006-04-11 01:43:16 UTC (rev 15031)
@@ -529,8 +529,9 @@
 
 int set_message(char *buf,int num_words,int num_bytes,BOOL zero)
 {
-   if (zero)
+   if (zero  (num_words || num_bytes)) {
memset(buf + smb_size,'\0',num_words*2 + num_bytes);
+   }
SCVAL(buf,smb_wct,num_words);
SSVAL(buf,smb_vwv + num_words*SIZEOFWORD,num_bytes);  
smb_setlen(buf,smb_size + num_words*2 + num_bytes - 4);

Modified: trunk/source/lib/util_sock.c
===
--- trunk/source/lib/util_sock.c2006-04-11 01:43:13 UTC (rev 15030)
+++ trunk/source/lib/util_sock.c2006-04-11 01:43:16 UTC (rev 15031)
@@ -662,8 +662,6 @@
 
smb_read_error = 0;
 
-   memset(buffer,'\0',smb_size + 100);
-
len = read_smb_length_return_keepalive(fd,buffer,timeout);
if (len  0) {
DEBUG(10,(receive_smb_raw: length  0!\n));
@@ -708,8 +706,9 @@
}
 
if (ret != len) {
-   if (smb_read_error == 0)
+   if (smb_read_error == 0) {
smb_read_error = READ_ERROR;
+   }
return False;
}


Modified: trunk/source/smbd/nttrans.c
===
--- trunk/source/smbd/nttrans.c 2006-04-11 01:43:13 UTC (rev 15030)
+++ trunk/source/smbd/nttrans.c 2006-04-11 01:43:16 UTC (rev 15031)
@@ -1805,7 +1805,7 @@
 * update after a rename..
 */ 
process_pending_change_notify_queue((time_t)0);
-   outsize = set_message(outbuf,0,0,True);
+   outsize = set_message(outbuf,0,0,False);
   
END_PROFILE(SMBntrename);
return(outsize);
@@ -2956,7 +2956,7 @@
 
/* We need to send an interim response then receive the rest
   of the parameter/data bytes */
-   outsize = set_message(outbuf,0,0,True);
+   outsize = set_message(outbuf,0,0,False);
show_msg(outbuf);
END_PROFILE(SMBnttrans);
return outsize;

Modified: trunk/source/smbd/process.c
===
--- trunk/source/smbd/process.c 2006-04-11 01:43:13 UTC (rev 15030)
+++ trunk/source/smbd/process.c 2006-04-11 01:43:16 UTC (rev 15031)
@@ -1160,20 +1160,16 @@
 
 void construct_reply_common(char *inbuf,char *outbuf)
 {
-   memset(outbuf,'\0',smb_size);
-
-   set_message(outbuf,0,0,True);
-   SCVAL(outbuf,smb_com,CVAL(inbuf,smb_com));
+   set_message(outbuf,0,0,False);

-   memcpy(outbuf+4,inbuf+4,4);
-   SCVAL(outbuf,smb_rcls,SMB_SUCCESS);
-   SCVAL(outbuf,smb_reh,0);
+   SCVAL(outbuf,smb_com,CVAL(inbuf,smb_com));
+   SIVAL(outbuf,smb_rcls,0);
SCVAL(outbuf,smb_flg, FLAG_REPLY | (CVAL(inbuf,smb_flg)  
FLAG_CASELESS_PATHNAMES)); 
SSVAL(outbuf,smb_flg2,
(SVAL(inbuf,smb_flg2)  FLAGS2_UNICODE_STRINGS) |
common_flags2);
+   memset(outbuf+smb_pidhigh,'\0',(smb_tid-smb_pidhigh));
 
-   SSVAL(outbuf,smb_err,SMB_SUCCESS);
SSVAL(outbuf,smb_tid,SVAL(inbuf,smb_tid));
SSVAL(outbuf,smb_pid,SVAL(inbuf,smb_pid));
SSVAL(outbuf,smb_uid,SVAL(inbuf,smb_uid));

Modified: trunk/source/smbd/reply.c
===
--- trunk/source/smbd/reply.c   2006-04-11 01:43:13 UTC (rev 15030)
+++ trunk/source/smbd/reply.c   2006-04-11 01:43:16 UTC (rev 15031)
@@ -848,7 +848,7 @@
return(UNIXERROR(ERRDOS,ERRbadpath));
}
 
-   outsize = set_message(outbuf,0,0,True);
+   outsize = set_message(outbuf,0,0,False);
DEBUG(3,(chkpth %s mode=%d\n, name, (int)SVAL(inbuf,smb_vwv0)));
 
END_PROFILE(SMBchkpth);
@@ -994,7 +994,7 @@
return set_bad_path_error(errno, bad_path, outbuf, ERRDOS, 
ERRnoaccess);
}
  
-   outsize = set_message(outbuf,0,0,True);
+   outsize = set_message(outbuf,0,0,False);
   
DEBUG( 3, ( setatr name=%s mode=%d\n, fname, mode ) );
   
@@ -2113,7 +2113,7 @@
 */
process_pending_change_notify_queue((time_t)0);

-   outsize = set_message(outbuf,0,0,True);
+   outsize = set_message(outbuf,0,0,False);
   

svn commit: samba r15030 - in branches/SAMBA_3_0/source: lib smbd

2006-04-10 Thread jra
Author: jra
Date: 2006-04-11 01:43:13 + (Tue, 11 Apr 2006)
New Revision: 15030

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15030

Log:
On a performace hunt... Remove as many extraneous
memset's as possible.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/lib/util.c
   branches/SAMBA_3_0/source/lib/util_sock.c
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/process.c
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util.c
===
--- branches/SAMBA_3_0/source/lib/util.c2006-04-11 01:19:20 UTC (rev 
15029)
+++ branches/SAMBA_3_0/source/lib/util.c2006-04-11 01:43:13 UTC (rev 
15030)
@@ -529,8 +529,9 @@
 
 int set_message(char *buf,int num_words,int num_bytes,BOOL zero)
 {
-   if (zero)
+   if (zero  (num_words || num_bytes)) {
memset(buf + smb_size,'\0',num_words*2 + num_bytes);
+   }
SCVAL(buf,smb_wct,num_words);
SSVAL(buf,smb_vwv + num_words*SIZEOFWORD,num_bytes);  
smb_setlen(buf,smb_size + num_words*2 + num_bytes - 4);

Modified: branches/SAMBA_3_0/source/lib/util_sock.c
===
--- branches/SAMBA_3_0/source/lib/util_sock.c   2006-04-11 01:19:20 UTC (rev 
15029)
+++ branches/SAMBA_3_0/source/lib/util_sock.c   2006-04-11 01:43:13 UTC (rev 
15030)
@@ -662,8 +662,6 @@
 
smb_read_error = 0;
 
-   memset(buffer,'\0',smb_size + 100);
-
len = read_smb_length_return_keepalive(fd,buffer,timeout);
if (len  0) {
DEBUG(10,(receive_smb_raw: length  0!\n));
@@ -708,8 +706,9 @@
}
 
if (ret != len) {
-   if (smb_read_error == 0)
+   if (smb_read_error == 0) {
smb_read_error = READ_ERROR;
+   }
return False;
}


Modified: branches/SAMBA_3_0/source/smbd/nttrans.c
===
--- branches/SAMBA_3_0/source/smbd/nttrans.c2006-04-11 01:19:20 UTC (rev 
15029)
+++ branches/SAMBA_3_0/source/smbd/nttrans.c2006-04-11 01:43:13 UTC (rev 
15030)
@@ -1805,7 +1805,7 @@
 * update after a rename..
 */ 
process_pending_change_notify_queue((time_t)0);
-   outsize = set_message(outbuf,0,0,True);
+   outsize = set_message(outbuf,0,0,False);
   
END_PROFILE(SMBntrename);
return(outsize);
@@ -2956,7 +2956,7 @@
 
/* We need to send an interim response then receive the rest
   of the parameter/data bytes */
-   outsize = set_message(outbuf,0,0,True);
+   outsize = set_message(outbuf,0,0,False);
show_msg(outbuf);
END_PROFILE(SMBnttrans);
return outsize;

Modified: branches/SAMBA_3_0/source/smbd/process.c
===
--- branches/SAMBA_3_0/source/smbd/process.c2006-04-11 01:19:20 UTC (rev 
15029)
+++ branches/SAMBA_3_0/source/smbd/process.c2006-04-11 01:43:13 UTC (rev 
15030)
@@ -1160,20 +1160,16 @@
 
 void construct_reply_common(char *inbuf,char *outbuf)
 {
-   memset(outbuf,'\0',smb_size);
-
-   set_message(outbuf,0,0,True);
-   SCVAL(outbuf,smb_com,CVAL(inbuf,smb_com));
+   set_message(outbuf,0,0,False);

-   memcpy(outbuf+4,inbuf+4,4);
-   SCVAL(outbuf,smb_rcls,SMB_SUCCESS);
-   SCVAL(outbuf,smb_reh,0);
+   SCVAL(outbuf,smb_com,CVAL(inbuf,smb_com));
+   SIVAL(outbuf,smb_rcls,0);
SCVAL(outbuf,smb_flg, FLAG_REPLY | (CVAL(inbuf,smb_flg)  
FLAG_CASELESS_PATHNAMES)); 
SSVAL(outbuf,smb_flg2,
(SVAL(inbuf,smb_flg2)  FLAGS2_UNICODE_STRINGS) |
common_flags2);
+   memset(outbuf+smb_pidhigh,'\0',(smb_tid-smb_pidhigh));
 
-   SSVAL(outbuf,smb_err,SMB_SUCCESS);
SSVAL(outbuf,smb_tid,SVAL(inbuf,smb_tid));
SSVAL(outbuf,smb_pid,SVAL(inbuf,smb_pid));
SSVAL(outbuf,smb_uid,SVAL(inbuf,smb_uid));

Modified: branches/SAMBA_3_0/source/smbd/reply.c
===
--- branches/SAMBA_3_0/source/smbd/reply.c  2006-04-11 01:19:20 UTC (rev 
15029)
+++ branches/SAMBA_3_0/source/smbd/reply.c  2006-04-11 01:43:13 UTC (rev 
15030)
@@ -848,7 +848,7 @@
return(UNIXERROR(ERRDOS,ERRbadpath));
}
 
-   outsize = set_message(outbuf,0,0,True);
+   outsize = set_message(outbuf,0,0,False);
DEBUG(3,(chkpth %s mode=%d\n, name, (int)SVAL(inbuf,smb_vwv0)));
 
END_PROFILE(SMBchkpth);
@@ -994,7 +994,7 @@
return set_bad_path_error(errno, bad_path, outbuf, ERRDOS, 
ERRnoaccess);
}
  
-   outsize = set_message(outbuf,0,0,True);
+   outsize = 

svn commit: samba r15032 - in branches/SAMBA_4_0/source: include torture/nbench

2006-04-10 Thread tridge
Author: tridge
Date: 2006-04-11 04:36:09 + (Tue, 11 Apr 2006)
New Revision: 15032

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15032

Log:

change BENCH-NBENCH to always break to none, rather than accepting a
levelII break offer from the server.

Modified:
   branches/SAMBA_4_0/source/include/smb.h
   branches/SAMBA_4_0/source/torture/nbench/nbio.c


Changeset:
Modified: branches/SAMBA_4_0/source/include/smb.h
===
--- branches/SAMBA_4_0/source/include/smb.h 2006-04-11 01:43:16 UTC (rev 
15031)
+++ branches/SAMBA_4_0/source/include/smb.h 2006-04-11 04:36:09 UTC (rev 
15032)
@@ -551,6 +551,11 @@
 #define BATCH_OPLOCK_RETURN 2
 #define LEVEL_II_OPLOCK_RETURN 3
 
+/* oplock levels sent in oplock break */
+#define OPLOCK_BREAK_TO_NONE 0
+#define OPLOCK_BREAK_TO_LEVEL_II 1
+
+
 #define CMD_REPLY 0x8000
 
 /* The maximum length of a trust account password.

Modified: branches/SAMBA_4_0/source/torture/nbench/nbio.c
===
--- branches/SAMBA_4_0/source/torture/nbench/nbio.c 2006-04-11 01:43:16 UTC 
(rev 15031)
+++ branches/SAMBA_4_0/source/torture/nbench/nbio.c 2006-04-11 04:36:09 UTC 
(rev 15032)
@@ -181,10 +181,11 @@
 /*
   a handler function for oplock break requests
 */
-static BOOL oplock_handler(struct smbcli_transport *transport, uint16_t tid, 
uint16_t fnum, uint8_t level, void *private)
+static BOOL oplock_handler(struct smbcli_transport *transport, uint16_t tid, 
+  uint16_t fnum, BOOL shared, uint8_t level, void 
*private)
 {
struct smbcli_tree *tree = private;
-   return smbcli_oplock_ack(tree, fnum, level);
+   return smbcli_oplock_ack(tree, fnum, OPLOCK_BREAK_TO_NONE);
 }
 
 void nb_setup(struct smbcli_state *cli, int id)



svn commit: samba r15033 - in branches/SAMBA_4_0/source/torture: nbench raw

2006-04-10 Thread tridge
Author: tridge
Date: 2006-04-11 04:40:11 + (Tue, 11 Apr 2006)
New Revision: 15033

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15033

Log:

expanded the RAW-OPLOCK test to include the different cases where the
client chooses to break to none or break to level II, when offered a
level II break from exclusive

Modified:
   branches/SAMBA_4_0/source/torture/nbench/nbio.c
   branches/SAMBA_4_0/source/torture/raw/oplock.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/nbench/nbio.c
===
--- branches/SAMBA_4_0/source/torture/nbench/nbio.c 2006-04-11 04:36:09 UTC 
(rev 15032)
+++ branches/SAMBA_4_0/source/torture/nbench/nbio.c 2006-04-11 04:40:11 UTC 
(rev 15033)
@@ -182,7 +182,7 @@
   a handler function for oplock break requests
 */
 static BOOL oplock_handler(struct smbcli_transport *transport, uint16_t tid, 
-  uint16_t fnum, BOOL shared, uint8_t level, void 
*private)
+  uint16_t fnum, uint8_t level, void *private)
 {
struct smbcli_tree *tree = private;
return smbcli_oplock_ack(tree, fnum, OPLOCK_BREAK_TO_NONE);

Modified: branches/SAMBA_4_0/source/torture/raw/oplock.c
===
--- branches/SAMBA_4_0/source/torture/raw/oplock.c  2006-04-11 04:36:09 UTC 
(rev 15032)
+++ branches/SAMBA_4_0/source/torture/raw/oplock.c  2006-04-11 04:40:11 UTC 
(rev 15033)
@@ -52,20 +52,38 @@
 #define BASEDIR \\test_notify
 
 /*
-  a handler function for oplock break requests
+  a handler function for oplock break requests. Ack it as a break to level II 
if possible
 */
-static BOOL oplock_handler_ack(struct smbcli_transport *transport, uint16_t 
tid, uint16_t fnum, uint8_t level, void *private)
+static BOOL oplock_handler_ack_to_levelII(struct smbcli_transport *transport, 
uint16_t tid, 
+  uint16_t fnum, uint8_t level, void *private)
 {
struct smbcli_tree *tree = private;
break_info.fnum = fnum;
break_info.level = level;
break_info.count++;
 
-   printf(Acking in oplock handler\n);
+   printf(Acking to level II in oplock handler\n);
 
return smbcli_oplock_ack(tree, fnum, level);
 }
 
+/*
+  a handler function for oplock break requests. Ack it as a break to none
+*/
+static BOOL oplock_handler_ack_to_none(struct smbcli_transport *transport, 
uint16_t tid, 
+   uint16_t fnum, uint8_t level, 
+   void *private)
+{
+   struct smbcli_tree *tree = private;
+   break_info.fnum = fnum;
+   break_info.level = level;
+   break_info.count++;
+
+   printf(Acking to none in oplock handler\n);
+
+   return smbcli_oplock_ack(tree, fnum, OPLOCK_BREAK_TO_NONE);
+}
+
 static void oplock_handler_close_recv(struct smbcli_request *req)
 {
NTSTATUS status;
@@ -79,7 +97,8 @@
 /*
   a handler function for oplock break requests - close the file
 */
-static BOOL oplock_handler_close(struct smbcli_transport *transport, uint16_t 
tid, uint16_t fnum, uint8_t level, void *private)
+static BOOL oplock_handler_close(struct smbcli_transport *transport, uint16_t 
tid, 
+uint16_t fnum, uint8_t level, void *private)
 {
union smb_close io;
struct smbcli_tree *tree = private;
@@ -116,11 +135,12 @@
union smb_unlink unl;
union smb_read rd;
uint16_t fnum=0, fnum2=0;
+   char c = 0;
 
/* cleanup */
smbcli_unlink(cli-tree, fname);
 
-   smbcli_oplock_handler(cli-transport, oplock_handler_ack, cli-tree);
+   smbcli_oplock_handler(cli-transport, oplock_handler_ack_to_levelII, 
cli-tree);
 
/*
  base ntcreatex parms
@@ -181,13 +201,69 @@
status = smb_raw_unlink(cli-tree, unl);
CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
 
+   CHECK_VAL(break_info.count, 1);
CHECK_VAL(break_info.fnum, fnum);
-   CHECK_VAL(break_info.level, 1);
+   CHECK_VAL(break_info.level, OPLOCK_BREAK_TO_LEVEL_II);
+   CHECK_VAL(break_info.failures, 0);
+
+   printf(2nd unlink should not generate a break\n);
+   ZERO_STRUCT(break_info);
+   status = smb_raw_unlink(cli-tree, unl);
+   CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
+
+   CHECK_VAL(break_info.count, 0);
+
+   printf(writing should generate a self break to none\n);
+   smbcli_write(cli-tree, fnum, 0, c, 0, 1);
+   msleep(100);
+   smbcli_write(cli-tree, fnum, 0, c, 1, 1);
+
CHECK_VAL(break_info.count, 1);
+   CHECK_VAL(break_info.fnum, fnum);
+   CHECK_VAL(break_info.level, OPLOCK_BREAK_TO_NONE);
CHECK_VAL(break_info.failures, 0);
 
smbcli_close(cli-tree, fnum);
 
+
+   printf(open with batch oplock\n);
+   ZERO_STRUCT(break_info);
+   io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED |