Re: [Samba] Samba 3.0.25b: smbd 99% CPU utilisation with opened MS Word doc

2007-08-10 Thread Ben Tisdall

Eric J. Feldhusen wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ben Tisdall wrote:

Hi I'm trying to upgrade from Samba 3.0.23c on FC4 to 3.0.25b from Samba
sources.

Everything appears to function correctly until an MS word document is
opened from a share - the file opens but the smbd process in question
rockets to 99%+ CPU, stays there  needs kill -9'ing to stop it. This
happens reliably.


We're running RHEL 4.x with the latest RHEL samba packages of
3.0.10.x.x, and we've seen something similar on a couple of servers, but
it's a very rare occurrence.  Would you be able to send me a document
that you know triggers the problem, along with what version of MS Word
you're using to open it?


Thanks for the kind offer Eric, will get back to you after some more 
testing.


--
Ben Tisdall

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


Re: [Samba] OK. there I am again!

2007-08-10 Thread John Drescher
Although I have been very busy recently at work (I am working 14hr
days all week) I have not forgotten about the problems you were
having. I was thinking about emailing you Today to ask if you made
progress. Anyways, I am very happy that you stuck with this read the
docs and made some very good progress. I have no time to answer this
in its entirety but I will try some now and some this weekend if I
can.

On 8/10/07, joop gerritse [EMAIL PROTECTED] wrote:
 Well, I read quite a few documents; thanks for pointing them out... And I
 got it working...

 The most important point I learned is P_a_t_i_e_n_c_e! You really have to wait
 a few minutes after having modified your smb.conf and restarted samba. And
 you have plenty of time to reboot your client, I am not sure whether you
 really need this, but anyway... it really takes quite some minutes before
 even the most limited changes have trickled through a (not really big)
 network.

If you are talking about network browsing. Yes this stuff takes a few
minutes minimum as packets are broadcast from clients and master
browsers listen for these broadcasts and create a list of the clients
that send packets.


 In general, I started removing lines from the inherited smb.conf, all lines
 of which I did not understand the purpose, and then restarting samba and the
 client, and see what happened.

This is good.

 I still have some questions, though...

 First of all: what is a domain name in Samba? I only saw a workgroup name as
 the parameter.
 Just to try, I changed it into something completely different,
 and after some time I saw it appear as a workgroup. But then I could also
 enter it as a domain name (on W98 stations, anyway), and I could really log
 in to it.
 Even though I now have a PDC on the domain LIEMERS-MUSEUM, and a BDC (without
 a PDC) on the domain LIEMERS2MUSEUM, it seems to work. So my conjecture for
 the moment is that the domain name equals the workgroup name. Right?

That is correct.


 Second: in my inherited smb.conf, I have a share [users]. I do not know what
 it is for, but if I comment it out, the workgroup LIEMERS2MUSEUM vanishes
 from the Workgroups in the network Environment. So I guess it serves some
 purpose but which one?

You do not need a users share or any shares for a machine to show up
in the browse lists.


 Third:
snip
Sorry that is too difficult to answer without taking a lot of time
which I do not have at the moment..

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


[Samba] fedora and samba

2007-08-10 Thread gayan Attygala
I use samba on fedora computer. when i try to connect to it via windows
computer it deny the connection. then I check the log files. it says that
samba trying to create builtin_ administarators. then connection refusing.
any idea have yu all ?
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Re: smbldap_open: cannot access LDAP when not root..

2007-08-10 Thread Matt Anderson
Matt Anderson sokkerstud_11 at hotmail.com writes:

 I currently have a Samba PDC along with multiple BDCs using an eDirectory LDAP
 backend.  While trying to figure out how to get the bad password account
 lockout feature to work, I managed to somehow mess up the samba PDC.

For anyone who runs into the same issue, I believe that I must have corrupted
one of the user or policy-related local databases on the PDC.  I was only able
to resolve this issue by removing Samba from the system (and deleting the
contents of etc samba) and then re-installing it again as the PDC.  The fresh
install seemed to fix whatever the underlying problem was.

Best of luck,
Matt

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


[Samba] OK. there I am again!

2007-08-10 Thread joop gerritse
Well, I read quite a few documents; thanks for pointing them out... And I 
got it working... 

The most important point I learned is P_a_t_i_e_n_c_e! You really have to wait 
a few minutes after having modified your smb.conf and restarted samba. And 
you have plenty of time to reboot your client, I am not sure whether you 
really need this, but anyway... it really takes quite some minutes before 
even the most limited changes have trickled through a (not really big) 
network.

In general, I started removing lines from the inherited smb.conf, all lines 
of which I did not understand the purpose, and then restarting samba and the 
client, and see what happened.

I still have some questions, though...

First of all: what is a domain name in Samba? I only saw a workgroup name as 
the parameter. Just to try, I changed it into something completely different, 
and after some time I saw it appear as a workgroup. But then I could also 
enter it as a domain name (on W98 stations, anyway), and I could really log 
in to it.
Even though I now have a PDC on the domain LIEMERS-MUSEUM, and a BDC (without 
a PDC) on the domain LIEMERS2MUSEUM, it seems to work. So my conjecture for 
the moment is that the domain name equals the workgroup name. Right?

Second: in my inherited smb.conf, I have a share [users]. I do not know what 
it is for, but if I comment it out, the workgroup LIEMERS2MUSEUM vanishes 
from the Workgroups in the network Environment. So I guess it serves some 
purpose but which one?

Third: I read quite a lot about how to set up various servers, but not too 
many details on exactly what the SMB protocols do. I read something about 
elections, and I think that part is fairly clear to me, but I am quite 
curious about what several parties in the game are really doing. For 
instance, when a server comes up, how does the rest of the world know? I 
commented out the remote announce line, so I guess that is not part of the 
mechanism. Anyway, if the server is initially the only node in the network, 
this will not be significant anyway. If a client comes up, what happens? Does 
it broadcast its presence throughout the network? Do all servers respond? I 
also read something about browser nodes, but how are they established? How do 
they announce their presence?
In general: is there any detail documentation on MS SMB protocols, not just 
the message format but rather the exact mechanisms? They may be described 
somewhere, but I haven't discovered them yet...

I have more questions, but these are the most pressing ones at the moment. 
Thanks a lot in advance for any clues.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] full_audit on Samba 3.0.20 vs 3.0.25

2007-08-10 Thread Volker Lendecke
On Thu, Aug 09, 2007 at 11:34:29AM -0400, Ryan Steele wrote:
  On the 3.0.20 box, they seem to be ignored, which causes the logs to
  fill up very quickly.  I appreciate any light that can be shed on this
  situation.  Thanks in advance!


The all/none flags were added with r13028,
tags/release-3.0.20 was created with r9403. So none was
added after 3.0.20. I think you have to upgrade.

Volker


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

Re: [Samba] 3.0.25b problem joining 3.0.23d domain..

2007-08-10 Thread Ian Clancy

Marcin,
Did you have any luck resolving this issue ?. I am having the same problem.
I ran ethereal on my domain controller and the join appeared to fail at 
RPC_NETLOGON NetrServerAuthenticate2 where the domain controller 
returned a STATUS_ACCESS_DENIED response.

Regards

--
Ian Clancy
IT Co-ordinator




Marcin Giedz wrote:

Hi,

My PDC is running on 3.0.23d. I have more than 50+ users (Win XP , 
Linux) connected to it. Today I've downloaded 3.0.25b and wanted to 
add to domain new server. For a while I was wondering if 3.0.25b can 
join to elder 3.0.23d but gave it goal. This message I got during 
joining:


/opt/samba-3.0.25b/bin/net rpc join -U user1%pass1

Starting service: samba
[2007/07/20 13:02:35, 0] utils/net_rpc_join.c:net_rpc_join_newstyle(304)
error setting trust account password: NT code 0x1c010002
Unable to join domain PDC.

My smb.conf for this new test server is as follows:

[global]
netbios name = test
workgroup = PDC
server string = TEST Samba Server
security = domain
hosts allow = 192.168.89. 127. 10.9.
load printers = no
log file = /opt/samba-3.0.25b/var/log.%m
max log size = 1
log level = 5
interfaces = 192.168.89.0/24
wins server = 192.168.89.3

Has it changed something related to joining process since 3.0.23d? 
Should I keep 3.0.23d on all servers including a new one or should I 
upgrade my PDC to 3.0.25b - if this is the case - should I expect any 
problems with changing PDC. As a backend for PDC I use LDAPv3 - 2.3.35.


Best regards,
Marcin


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


[Samba] Disappearing samba ports

2007-08-10 Thread Dale Schroeder
I have new install of Debian, primarily testing with some stable. 
The kernel is 2.6.21-2. I am having problems with a Samba (3.0.25b-1+b1, 
3.0.25b-1) install. smb.conf is from a template I have used several 
times previously (including 3.0.25b) with no problems. From Windows 
Explorer, the shares will be slow to appear, with folders and files in 
the right pane appearing and disappearing. After some time, the shares 
will become completely inaccessible. In an attempt to correct, I 
restarted both Samba processes, which not only did not help, but made worse.


The log files gave messages suggesting firewall problems, but there is 
no firewall. NMAP showed both samba ports closed, but open again after a 
reboot. A restart of Samba causes the ports to close again leading to 
the error messages mentioned previously.


Samba is set up as a standalone server in a workgroup with security = 
user, passdb backend = tdbsam.


After the initial install, I was able to upload printer drivers and did 
not notice any speed problems.  Changes to the system since the initial 
Samba install are the latest hplip (2.7.7) from sourceforge and an 
iptables update from Debian.


I cannot determine from the logs if the problem is from Samba, such as 
tdb corruption, or something else in the system. I would think that 
ports should not spontaneously close.  I'm hoping someone can give me 
their best guess as to where to look next.


Thanks,

Dale

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


Re: [Samba] Samba and winbind with LDAP IDMAP backend - user connects with Domain Admin permissions

2007-08-10 Thread simo
On Fri, 2007-08-10 at 09:40 -0700, Stang, Sharol wrote:
 
  [users]
 
 comment = user's home directory
 
 path = /mnt/cluster/home/users
 
 force group = Domain Admins 

So if you force _everybody_ to be Domain Admins why do you expect them
not to be able to access something owned by Domain Admins ?

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] ACLs and winbind

2007-08-10 Thread Thierry Lacoste
On Thursday 09 August 2007 15:58, Angela Gavazzi wrote:
 My working nsswitch.conf look like this:

 passwd: files winbind ldap
 group:  files winbind ldap
 shadow: files winbind ldap

 By, Angela
Can nss_winbind be used against a Samba domain? AFAICS it is only used to
identify users/groups of Windows domains. Please correct me if I'm wrong.

I found three options to allow windows users to manage ACLs in their homes
on a Samba server which is joined to a Samba domain and uses nss_ldap against
the DC's backend LDAP server.

option 1: basic smb.conf
- winbind needed to add ACLs
- winbind trusted domains only = yes needed so that the domain appears
in the original ACLs (and not the NetBIOS name of the server) and 
winbind_idmap.tdb maps domain users/groups to their LDAP uids/gids

option2: smb.conf with LDAP idmap backend
Same requirements. Note that as above I need to define ranges for
idmap uid and gid although winbindd_idmap.tdb never changes

option3: smb.conf with LDAP passdb backend
- winbind needed (but netlogon proxy only mode is OK) otherwise
ACLs can be added but when displayed users/groups are not resolved

Are there other options? What is the best in terms of performance?

While I can imagine why winbind is needed for option 1 I don't see
- why it can't be used in netlogon proxy only mode for option 2 and
- why it is needed at all for otion 3.

Regards,
Thierry.

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


[Samba] Samba and winbind with LDAP IDMAP backend - user connects with Domain Admin permissions

2007-08-10 Thread Stang, Sharol
Hi,

 

Please Help! My normal users are able to gain access to all home
directories even though the group owner is Domain Admins. I have set the
permissions to 770 while testing and the group to Domain Admin on all
directories.

 

I have a Server2003 AD Domain with a clustered RHEL5 samba server for
the home directory. I am using samba 3.0.23 with Winbind and LDAP idmap
backend. This server is still in testing to replace a RH9 samba server.

 

Below I have listed the ID of three users. One is Domain Admin the
others are normal users. The logs show the users initially logging in
with Domain Admins rights! (GID 5004)  I tried creating another group
called DADMIN and changing the ownership to that and had the same
result! It user would connects initially as group DADMIN. 

 

 

id w11350

uid=5213(w11350) gid=5004(Domain Admins) groups=5004(Domain
Admins),5000(Domain Users),
5117(BUILTIN\administrators),5118(BUILTIN\users)  

 

ls -l |grep w11350

drwxrwx---  14 w11350 Domain Admins  4096 Aug  9 12:52 w11350

 

id w11664

uid=5598(w11664) gid=5000(Domain Users) groups=5000(Domain
Users,5118(BUILTIN\users)

 

ls -l |grep w11664

drwxrwx---   3 w11664 Domain Admins  4096 Aug  8 15:31 w11664

 

/var/log/samba/24001wk001.log

24001wk001 (x.151.18.23) signed connect to service users initially as
user w11664 (uid=5598, gid=5004) (pid 5802)

 

 

id w10828

uid=6007(w10828) gid=5000(Domain Users) groups=5000(Domain
Users),5118(BUILTIN\users)

 

ls -l |grep w10828

drwxrwx---  18 w10828 Domain Admins  4096 Jun 13 08:06 w10828

 

/var/log/samba/24001wk226.log

24001wk226 (x.151.19.7) signed connect to service users initially as
user w10828 (uid=6007, gid=5004) (pid 23707)

 

 

 

I edited out the company names, but here is the smb.conf

 

[global]

workgroup = DOMAIN

realm = COMPANY.COM

netbios name = HSA-SMB

server string = HSA-SMB

interfaces = x.151.1.200

bind interfaces only = Yes

security = ADS

client schannel = No

password server = x.151.1.25 x.151.1.21

username map = /etc/samba/smbusers

log file = /var/log/samba/%m.log

smb ports = 445

name resolve order = host wins bcast

server signing = auto

client use spnego = Yes

preferred master = No

local master = No

domain master = No

ldap admin dn = CN=Manager,DC=company,DC=com

ldap idmap suffix = ou=Idmap

ldap suffix = DC=company,DC=com

ldap ssl = no

lock directory = /var/cache/samba/HSA-SMB

pid directory = /var/run/samba/HSA-SMB

idmap backend = ldap:ldap://x.151.1.102

idmap uid = 5000-1

idmap gid = 5000-1

winbind cache time = 5

winbind use default domain = Yes

winbind nested groups = Yes

winbind enum users = Yes

winbind enum groups = Yes

 

 [users]

comment = user's home directory

path = /mnt/cluster/home/users

force group = Domain Admins

create mask = 0770

directory mask = 0770

browseable = No

read only = No

 

Thank you so much for your help!

-sharol

 

--
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.25b: smbd 99% CPU utilisation with opened MS Word doc

2007-08-10 Thread Eric J. Feldhusen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ben Tisdall wrote:
 Hi I'm trying to upgrade from Samba 3.0.23c on FC4 to 3.0.25b from Samba
 sources.
 
 Everything appears to function correctly until an MS word document is
 opened from a share - the file opens but the smbd process in question
 rockets to 99%+ CPU, stays there  needs kill -9'ing to stop it. This
 happens reliably.

We're running RHEL 4.x with the latest RHEL samba packages of
3.0.10.x.x, and we've seen something similar on a couple of servers, but
it's a very rare occurrence.  Would you be able to send me a document
that you know triggers the problem, along with what version of MS Word
you're using to open it?

- --
Eric Feldhusen
Network Administratorhttp://www.remc1.org
[EMAIL PROTECTED]
PO Box 270  (906) 482-4520  x239
809 Hecla St(906) 482-5031 fax
Hancock, MI  49930  (906) 370 6202 mobile

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

iD8DBQFGvGot7yU9EEFrWcwRAixOAJ45La8blvq6j4xQyi+9WGpnRr0UTQCeMiCl
Qp0RYw/V8zD8tShCfOl7orI=
=rNFw
-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] SUMMARY: username map

2007-08-10 Thread JESSE CARROLL
It turned out that the Windows ID was 9 characters and for some reason the
Unix system was truncating it. I'm guessing that it is because the Unix box
has a 8 character ID limit. We changed the Windows ID to 7 characters and
everything worked.

JC

-- Original Message --
Received: Wed, 08 Aug 2007 05:10:15 PM EDT
From: JESSE CARROLL [EMAIL PROTECTED]
To: samba@lists.samba.org
Subject: username map

Forgive me for being new - but you've got start somewhere.

I've setup SAMBA on a Unix server that talks to AD. Almost everything works
save for a user name map. From my configuration (names changed)below I can
attach from windusr1 on PC1 to the Unix system and it sets up as unxusr1 no
problems and clean. I can access all three shares. However, when I try to do
the same thing from PC2 for appusrwin I am prompted for a name/password. No
matter what I put in (windows ID/password or Unix ID/password, or
combinations
of these)I can't connect. The message in the log.smbd is
domain_client_validate: unable to validate password for user appusru in
domain XXXGLOBAL to Domain controller USORSDC00. Error was
NT_STATUS_NO_SUCH_USER.  Note that in reality the Unix ID and Windows are
very similar, with the difference being that the Windows ID is the same as
the
Unix ID but with 2 more characters.  What am I doing incorrectly?



::
smb.conf
::
[global]
security = domain
workgroup = XXXGLOBAL
netbios name = unix01
password server = adserver01, adserver02
domain master = no
local master = no
preferred master = no

username map = /usr/local/samba/lib/smb.users

[homes]
writeable = yes
# +sysadmin is a Unix group which unxusr1 is a member
valid users = +sysadmin
wide links = no

[trax]  
path = /var/data_files
writeable = yes
valid users = unxusr1, appusru
wide links = no

[test]  
path = /var/tmp
writeable = yes
valid users = unxusr1, appusru
wide links = no
::
smb.users
::
unxusr1 = XXXGLOBAL\windusr1
appusru = XXXGLOBAL\appusrwin




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


[Samba] Trailing backslash issue with Windows Shares

2007-08-10 Thread Patrick Rynhart
I have Samba 3.0.25b running as a PDC.  When opening a share on a
Windows member server from an XP/Vista client, if I add a trailing
backslash after a share name (e.g. \\WIN-SERVER\C$\) then an explorer
windows appears immediately and correctly contains the share.  Without
the backslash (e.g. \\WIN-SERVER\C$) I have observed delays of up to
20 seconds.  I have msdfs root = yes in my smb.conf.  Is this a known
problem ?

Regards,

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


Re: [Samba] hundreds of 'smb -D' processes

2007-08-10 Thread Patrick Rynhart
Hi Mike,

I've encountered this one too.  The solution was to add an smbd
deadtime. As I understand the issue, XP and Samba don't always agree
when an SMB session should be closed.

Try adding:

deadtime = 60

which means If I don't hear from a client within 60 minutes, assume
that the connection is dead and close the smbd process.

Also see my bug report at https://bugzilla.samba.org/show_bug.cgi?id=4470

Regards,

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


[Samba] Samba winbind and nsswith.conf

2007-08-10 Thread Mark Campbell
I have a Solaris 10 box running samba.  I have it joined to a windows 
2003 domain.  I can authenticate to the samba server.  However I am not 
getting group informaiton. 


I have in nsswith.conf I have

passwd: files winbind
group:  files winbind

winbindd is running

libnss_windbind.so and so.1 are in /usr/lib

when I run wbinfo -u or -g it returns users and groups from AD.

When I do a getent passwd I get the results for /etc/passwd and nothing 
from AD.


When I auth to the samba server the permissions set based on groups do 
not work.


Any help is appreciated.

Thanks

Mark


--
Mark Campbell
Systems Analyst
Digital Library Technologies
The Pennsylvania State University
[EMAIL PROTECTED], 814-865-4774

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


Re: [Samba] Samba winbind and nsswith.conf

2007-08-10 Thread Joshua M. Miller
Hi Mark,

Is nscd running?  If so, stop it and try again.

Please post a sanitized smb.conf if this was not the problem.

Joshua M. Miller - RHCE, VCP
Ditree Consulting
http://ditree.com/



Mark Campbell wrote:
 I have a Solaris 10 box running samba.  I have it joined to a windows
 2003 domain.  I can authenticate to the samba server.  However I am
 not getting group informaiton.
 I have in nsswith.conf I have

 passwd: files winbind
 group:  files winbind

 winbindd is running

 libnss_windbind.so and so.1 are in /usr/lib

 when I run wbinfo -u or -g it returns users and groups from AD.

 When I do a getent passwd I get the results for /etc/passwd and
 nothing from AD.

 When I auth to the samba server the permissions set based on groups do
 not work.

 Any help is appreciated.

 Thanks

 Mark


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


Re: [Samba] Trailing backslash issue with Windows Shares

2007-08-10 Thread Jeremy Allison
On Sat, Aug 11, 2007 at 11:13:59AM +1200, Patrick Rynhart wrote:
 I have Samba 3.0.25b running as a PDC.  When opening a share on a
 Windows member server from an XP/Vista client, if I add a trailing
 backslash after a share name (e.g. \\WIN-SERVER\C$\) then an explorer
 windows appears immediately and correctly contains the share.  Without
 the backslash (e.g. \\WIN-SERVER\C$) I have observed delays of up to
 20 seconds.  I have msdfs root = yes in my smb.conf.  Is this a known
 problem ?

Yeah, known bug someone reported - will be fixed for 3.0.25c.

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


svn commit: samba r24300 - in branches/SAMBA_4_0/source/torture/local: .

2007-08-10 Thread abartlet
Author: abartlet
Date: 2007-08-10 07:40:50 + (Fri, 10 Aug 2007)
New Revision: 24300

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

Log:
Try to get the LOCAL-EVENT test to pass on hosts with epoll() in
glibc, but not in the host kernel.

Andrew Bartlett


Modified:
   branches/SAMBA_4_0/source/torture/local/event.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/local/event.c
===
--- branches/SAMBA_4_0/source/torture/local/event.c 2007-08-10 06:55:26 UTC 
(rev 24299)
+++ branches/SAMBA_4_0/source/torture/local/event.c 2007-08-10 07:40:50 UTC 
(rev 24300)
@@ -97,9 +97,17 @@
 
t = timeval_current();
while (!finished) {
+   errno = 0;
if (event_loop_once(ev_ctx) == -1) {
talloc_free(ev_ctx);
-   torture_fail(test, Failed event loop\n);
+   if (errno == ENOSYS) {
+   torture_comment(test, Host kernel does not 
support %s event backend!, backend);
+   talloc_free(ev_ctx);
+   
+   return true;
+   } else {
+   torture_fail(test, Failed event loop\n);
+   }
}
}
 



svn commit: samba r24308 - in branches/SAMBA_3_2/source/smbd: .

2007-08-10 Thread metze
Author: metze
Date: 2007-08-10 09:57:30 + (Fri, 10 Aug 2007)
New Revision: 24308

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

Log:
this needs a better fix that compiles...

metze
Modified:
   branches/SAMBA_3_2/source/smbd/negprot.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/negprot.c
===
--- branches/SAMBA_3_2/source/smbd/negprot.c2007-08-10 09:56:13 UTC (rev 
24307)
+++ branches/SAMBA_3_2/source/smbd/negprot.c2007-08-10 09:57:30 UTC (rev 
24308)
@@ -674,7 +674,6 @@
DEBUG(3,(Selected protocol 
%s\n,supported_protocols[protocol].proto_name));
} else {
DEBUG(0,(No protocol supported !\n));
-   SSVAL(outbuf,smb_vwv0,choice);
}
   
DEBUG( 5, ( negprot index=%d\n, choice ) );



svn commit: samba r24306 - in branches/SAMBA_3_2/source/smbd: .

2007-08-10 Thread metze
Author: metze
Date: 2007-08-10 09:53:42 + (Fri, 10 Aug 2007)
New Revision: 24306

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

Log:
the check_fsp() function has an explicit user argument
so use it...

metze
Modified:
   branches/SAMBA_3_2/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/reply.c
===
--- branches/SAMBA_3_2/source/smbd/reply.c  2007-08-10 09:45:09 UTC (rev 
24305)
+++ branches/SAMBA_3_2/source/smbd/reply.c  2007-08-10 09:53:42 UTC (rev 
24306)
@@ -295,7 +295,7 @@
reply_nterror(req, NT_STATUS_INVALID_HANDLE);
return False;
}
-   if (((conn) != (fsp)-conn) || current_user.vuid != (fsp)-vuid) {
+   if (((conn) != (fsp)-conn) || user-vuid != (fsp)-vuid) {
reply_nterror(req, NT_STATUS_INVALID_HANDLE);
return False;
}



svn commit: samba r24305 - in branches/SAMBA_3_2_0/source: . include lib

2007-08-10 Thread metze
Author: metze
Date: 2007-08-10 09:45:09 + (Fri, 10 Aug 2007)
New Revision: 24305

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

Log:
merge from SAMBA_3_2:
patch from Bjoern JAcke [EMAIL PROTECTED]:

attached patches add EA support for Solaris. If no one disagrees, can 
someone check this in please?

metze
Modified:
   branches/SAMBA_3_2_0/source/configure.in
   branches/SAMBA_3_2_0/source/include/includes.h
   branches/SAMBA_3_2_0/source/lib/system.c


Changeset:
Modified: branches/SAMBA_3_2_0/source/configure.in
===
--- branches/SAMBA_3_2_0/source/configure.in2007-08-10 09:44:13 UTC (rev 
24304)
+++ branches/SAMBA_3_2_0/source/configure.in2007-08-10 09:45:09 UTC (rev 
24305)
@@ -1664,6 +1664,14 @@
 esac
 
 
+# Check if attropen() is present if this is Solaris
+case $host_os in
+  *solaris*)
+   AC_CHECK_FUNCS(attropen)
+  ;;
+esac
+
+
 # Do xattr functions take additional options like on Darwin?
 if test x$ac_cv_func_getxattr = xyes ; then
AC_CACHE_CHECK([whether xattr interface takes additional options], 
smb_attr_cv_xattr_add_opt, [

Modified: branches/SAMBA_3_2_0/source/include/includes.h
===
--- branches/SAMBA_3_2_0/source/include/includes.h  2007-08-10 09:44:13 UTC 
(rev 24304)
+++ branches/SAMBA_3_2_0/source/include/includes.h  2007-08-10 09:45:09 UTC 
(rev 24305)
@@ -224,6 +224,10 @@
 #include sys/attributes.h
 #endif
 
+#ifndef ENOATTR
+#define ENOATTR ENODATA
+#endif
+
 /* mutually exclusive (SuSE 8.2) */
 #if HAVE_ATTR_XATTR_H
 #include attr/xattr.h

Modified: branches/SAMBA_3_2_0/source/lib/system.c
===
--- branches/SAMBA_3_2_0/source/lib/system.c2007-08-10 09:44:13 UTC (rev 
24304)
+++ branches/SAMBA_3_2_0/source/lib/system.c2007-08-10 09:45:09 UTC (rev 
24305)
@@ -4,6 +4,7 @@
Copyright (C) Andrew Tridgell 1992-1998
Copyright (C) Jeremy Allison  1998-2005
Copyright (C) Timur Bakeyev2005
+   Copyright (C) Bjoern Jacke2006-2007

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1682,6 +1683,17 @@
SAFE_FREE(msgbuf);
 }
 
+/ Solaris EA helper function prototypes /
+#ifdef HAVE_ATTROPEN
+#define SOLARIS_ATTRMODE S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP
+int solaris_write_xattr(int attrfd, const char *value, size_t size);
+ssize_t solaris_read_xattr(int attrfd, void *value, size_t size);
+ssize_t solaris_list_xattr(int attrdirfd, char *list, size_t size);
+int solaris_unlinkat(int attrdirfd, const char *name);
+int solaris_attropen(const char *path, const char *attrpath, int oflag, mode_t 
mode);
+int solaris_openat(int fildes, const char *path, int oflag, mode_t mode);
+#endif
+
 /**
  Wrappers for extented attribute calls. Based on the Linux package with
  support for IRIX and (Net|Free)BSD also. Expand as other systems have them.
@@ -1730,6 +1742,14 @@
retval = attr_get(path, attrname, (char *)value, valuelength, flags);
 
return retval ? retval : valuelength;
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrfd = solaris_attropen(path, name, O_RDONLY, 0);
+   if (attrfd = 0) {
+   ret = solaris_read_xattr(attrfd, value, size);
+   close(attrfd);
+   }
+   return ret;
 #else
errno = ENOSYS;
return -1;
@@ -1773,6 +1793,14 @@
retval = attr_get(path, attrname, (char *)value, valuelength, flags);
 
return retval ? retval : valuelength;
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrfd = solaris_attropen(path, name, O_RDONLY|AT_SYMLINK_NOFOLLOW, 
0);
+   if (attrfd = 0) {
+   ret = solaris_read_xattr(attrfd, value, size);
+   close(attrfd);
+   }
+   return ret;
 #else
errno = ENOSYS;
return -1;
@@ -1818,6 +1846,14 @@
retval = attr_getf(filedes, attrname, (char *)value, valuelength, 
flags);
 
return retval ? retval : valuelength;
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrfd = solaris_openat(filedes, name, O_RDONLY|O_XATTR, 0);
+   if (attrfd = 0) {
+   ret = solaris_read_xattr(attrfd, value, size);
+   close(attrfd);
+   }
+   return ret;
 #else
errno = ENOSYS;
return -1;
@@ -2002,6 +2038,14 @@
return bsd_attr_list(0, arg, list, size);
 #elif defined(HAVE_ATTR_LIST)  defined(HAVE_SYS_ATTRIBUTES_H)
return irix_attr_list(path, 0, list, size, 0);
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrdirfd = 

svn commit: samba r24311 - in branches/SAMBA_3_2/source: include smbd

2007-08-10 Thread metze
Author: metze
Date: 2007-08-10 10:28:09 + (Fri, 10 Aug 2007)
New Revision: 24311

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

Log:
add a reply_force_nterror() macro

metze
Modified:
   branches/SAMBA_3_2/source/include/smb_macros.h
   branches/SAMBA_3_2/source/smbd/error.c


Changeset:
Modified: branches/SAMBA_3_2/source/include/smb_macros.h
===
--- branches/SAMBA_3_2/source/include/smb_macros.h  2007-08-10 10:15:25 UTC 
(rev 24310)
+++ branches/SAMBA_3_2/source/include/smb_macros.h  2007-08-10 10:28:09 UTC 
(rev 24311)
@@ -170,6 +170,7 @@
 #define ERROR_BOTH(status,class,code) 
error_packet(inbuf,outbuf,class,code,status,__LINE__,__FILE__)
 
 #define reply_nterror(req,status) reply_nt_error(req,status,__LINE__,__FILE__)
+#define reply_force_nterror(req,status) 
reply_force_nt_error(req,status,__LINE__,__FILE__)
 #define reply_doserror(req,eclass,ecode) 
reply_dos_error(req,eclass,ecode,__LINE__,__FILE__)
 #define reply_botherror(req,status,eclass,ecode) 
reply_both_error(req,eclass,ecode,status,__LINE__,__FILE__)
 #define reply_unixerror(req,defclass,deferror) 
reply_unix_error(req,defclass,deferror,NT_STATUS_OK,__LINE__,__FILE__)

Modified: branches/SAMBA_3_2/source/smbd/error.c
===
--- branches/SAMBA_3_2/source/smbd/error.c  2007-08-10 10:15:25 UTC (rev 
24310)
+++ branches/SAMBA_3_2/source/smbd/error.c  2007-08-10 10:28:09 UTC (rev 
24311)
@@ -140,6 +140,14 @@
error_packet_set((char *)req-outbuf, 0, 0, ntstatus, line, file);
 }
 
+void reply_force_nt_error(struct smb_request *req, NTSTATUS ntstatus,
+ int line, const char *file)
+{
+   TALLOC_FREE(req-outbuf);
+   reply_outbuf(req, 0, 0);
+   error_packet_set((char *)req-outbuf, -1, -1, ntstatus, line, file);
+}
+
 void reply_dos_error(struct smb_request *req, uint8 eclass, uint32 ecode,
int line, const char *file)
 {



svn commit: samba r24315 - in branches/4.0-regwrite: . source/lib/registry/tools

2007-08-10 Thread jelmer
Author: jelmer
Date: 2007-08-10 16:01:47 + (Fri, 10 Aug 2007)
New Revision: 24315

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

Log:
Track path correctly in regshell.

Modified:
   branches/4.0-regwrite/
   branches/4.0-regwrite/BRANCH.TODO
   branches/4.0-regwrite/source/lib/registry/tools/regshell.c


Changeset:

Property changes on: branches/4.0-regwrite
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-regwrite/BRANCH.TODO
===
--- branches/4.0-regwrite/BRANCH.TODO   2007-08-10 14:01:14 UTC (rev 24314)
+++ branches/4.0-regwrite/BRANCH.TODO   2007-08-10 16:01:47 UTC (rev 24315)
@@ -1,6 +1,5 @@
 The following things still need to be fixed before this branch 
 can be merged:
-- regshell: generate correct path
 - RPC-WINREG
 - tests for diff functionality
 - test for classname and last_mod_time being kept

Modified: branches/4.0-regwrite/source/lib/registry/tools/regshell.c
===
--- branches/4.0-regwrite/source/lib/registry/tools/regshell.c  2007-08-10 
14:01:14 UTC (rev 24314)
+++ branches/4.0-regwrite/source/lib/registry/tools/regshell.c  2007-08-10 
16:01:47 UTC (rev 24315)
@@ -146,8 +146,9 @@
}
} 
 
-   /* FIXME: Set ctx-path, ctx-current */
+   ctx-path = talloc_asprintf(ctx, %s\\%s, ctx-path, argv[1]);
printf(Current path is: %s\n, ctx-path);
+   ctx-current = new;

return WERR_OK;
 }
@@ -481,6 +482,7 @@
} else if (file != NULL) {
ctx-current = reg_common_open_file(file, cmdline_credentials);
ctx-registry = ctx-current-context;
+   ctx-path = talloc_strdup(ctx, );
} else {
ctx-registry = reg_common_open_local(cmdline_credentials);
}
@@ -497,6 +499,7 @@

 reg_predefined_keys[i].handle, 

 ctx-current);
if (W_ERROR_IS_OK(err)) {
+   ctx-path = talloc_strdup(ctx, 
reg_predefined_keys[i].name);
break;
} else {
ctx-current = NULL;



Re: svn commit: samba r24301 - in branches/SAMBA_4_0/source/selftest: .

2007-08-10 Thread simo
On Fri, 2007-08-10 at 08:46 +, [EMAIL PROTECTED] wrote:
 Author: abartlet
 Date: 2007-08-10 08:46:29 + (Fri, 10 Aug 2007)
 New Revision: 24301
 
 WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=24301
 
 Log:
 The less escape characters the better.  This changes the winbind
 seperator to /, which is not an escape character, and uses the fact
 that we always support / as the DOMAIN/username seperator.

Andrew we can't use / as it is the path separator.
Anything that uses the user name to build the home directory will come
up with something like /home/DOMAIN/username which is not what you
expect normally.

Simo.

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



svn commit: samba r24313 - in branches/SAMBA_4_0/source: .

2007-08-10 Thread vlendec
Author: vlendec
Date: 2007-08-10 11:53:52 + (Fri, 10 Aug 2007)
New Revision: 24313

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

Log:
Merge r23377 from 3_2

Patch from Bjoern Jacke [EMAIL PROTECTED] to deal
with non-GNU implementations of tr in autogen.sh


Modified:
   branches/SAMBA_4_0/source/autogen.sh


Changeset:
Modified: branches/SAMBA_4_0/source/autogen.sh
===
--- branches/SAMBA_4_0/source/autogen.sh2007-08-10 10:31:28 UTC (rev 
24312)
+++ branches/SAMBA_4_0/source/autogen.sh2007-08-10 11:53:52 UTC (rev 
24313)
@@ -16,7 +16,7 @@
 ##
 for i in $TESTAUTOHEADER; do
if which $i  /dev/null 21; then
-   if test `$i --version | head -n 1 | cut -d.  -f 2 | tr -d 
[:alpha:]` -ge 53; then
+   if test `$i --version | head -n 1 | cut -d.  -f 2 | sed 
s/[^0-9]//g` -ge 53; then
AUTOHEADER=$i
AUTOHEADERFOUND=1
break
@@ -30,7 +30,7 @@
 
 for i in $TESTAUTOCONF; do
if which $i  /dev/null 21; then
-   if test `$i --version | head -n 1 | cut -d.  -f 2 | tr -d 
[:alpha:]` -ge 53; then
+   if test `$i --version | head -n 1 | cut -d.  -f 2 | sed 
s/[^0-9]//g` -ge 53; then
AUTOCONF=$i
AUTOCONFFOUND=1
break



svn commit: samba r24312 - in branches/SAMBA_3_2/source/smbd: .

2007-08-10 Thread metze
Author: metze
Date: 2007-08-10 10:31:28 + (Fri, 10 Aug 2007)
New Revision: 24312

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

Log:
revision 24091 removed the 'FORCE'...

metze
Modified:
   branches/SAMBA_3_2/source/smbd/nttrans.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/nttrans.c
===
--- branches/SAMBA_3_2/source/smbd/nttrans.c2007-08-10 10:28:09 UTC (rev 
24311)
+++ branches/SAMBA_3_2/source/smbd/nttrans.c2007-08-10 10:31:28 UTC (rev 
24312)
@@ -898,7 +898,7 @@
 
if (create_options  FILE_NON_DIRECTORY_FILE) {
TALLOC_FREE(case_state);
-   reply_nterror(req, 
NT_STATUS_FILE_IS_A_DIRECTORY);
+   reply_force_nterror(req, 
NT_STATUS_FILE_IS_A_DIRECTORY);
END_PROFILE(SMBntcreateX);
return;
}



svn commit: samba r24309 - in branches/SAMBA_3_2/source/smbd: .

2007-08-10 Thread metze
Author: metze
Date: 2007-08-10 10:11:40 + (Fri, 10 Aug 2007)
New Revision: 24309

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

Log:
if no protocol matches, just return choise 0x
as we've done before revision 24002

metze
Modified:
   branches/SAMBA_3_2/source/smbd/negprot.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/negprot.c
===
--- branches/SAMBA_3_2/source/smbd/negprot.c2007-08-10 09:57:30 UTC (rev 
24308)
+++ branches/SAMBA_3_2/source/smbd/negprot.c2007-08-10 10:11:40 UTC (rev 
24309)
@@ -674,6 +674,8 @@
DEBUG(3,(Selected protocol 
%s\n,supported_protocols[protocol].proto_name));
} else {
DEBUG(0,(No protocol supported !\n));
+   reply_outbuf(req, 1, 0);
+   SSVAL(req-outbuf, smb_vwv0, choice);
}
   
DEBUG( 5, ( negprot index=%d\n, choice ) );



svn commit: samba r24303 - in branches/SAMBA_3_2_0/source: . modules

2007-08-10 Thread metze
Author: metze
Date: 2007-08-10 09:13:06 + (Fri, 10 Aug 2007)
New Revision: 24303

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

Log:
add a module that overloads the file_id_create VFS function
and alters the device id depending on the configured algorithm.

The algorithm is configured via fileid:algorithm:
- fsname (default) uses a uint64 hash over the mount point
- fsid uses the fsid returned from statfs()

This is needed for clustering = yes on some clusterfilesystems

metze
Added:
   branches/SAMBA_3_2_0/source/modules/vfs_fileid.c
Modified:
   branches/SAMBA_3_2_0/source/Makefile.in
   branches/SAMBA_3_2_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_2_0/source/Makefile.in
===
--- branches/SAMBA_3_2_0/source/Makefile.in 2007-08-10 09:05:18 UTC (rev 
24302)
+++ branches/SAMBA_3_2_0/source/Makefile.in 2007-08-10 09:13:06 UTC (rev 
24303)
@@ -472,6 +472,7 @@
 VFS_GPFS_OBJ = modules/vfs_gpfs.o modules/gpfs.o modules/nfs4_acls.o
 VFS_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o
 VFS_READAHEAD_OBJ = modules/vfs_readahead.o
+VFS_FILEID_OBJ = modules/vfs_fileid.o
 
 PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
 
@@ -1674,6 +1675,10 @@
@$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_READAHEAD_OBJ) \
@[EMAIL PROTECTED] [EMAIL PROTECTED]
 
+bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(VFS_FILEID_OBJ)
+   @echo Building plugin $@
+   @$(SHLD_MODULE) $(VFS_FILEID_OBJ)
+
 #
 ## IdMap NSS plugins
 

Modified: branches/SAMBA_3_2_0/source/configure.in
===
--- branches/SAMBA_3_2_0/source/configure.in2007-08-10 09:05:18 UTC (rev 
24302)
+++ branches/SAMBA_3_2_0/source/configure.in2007-08-10 09:13:06 UTC (rev 
24303)
@@ -6072,6 +6072,38 @@
   esac ])
 AC_SUBST(PYTHON)
 
+
+# Checks for the vfs_fileid module
+# Start
+AC_CHECK_FUNC(getmntent)
+
+AC_CHECK_HEADERS(sys/statfs.h)
+
+AC_MSG_CHECKING([vfs_fileid: checking for statfs() and struct statfs.f_fsid)])
+AC_CACHE_VAL(vfsfileid_cv_statfs,[
+AC_TRY_RUN([
+   #include sys/types.h
+   #include sys/statfs.h
+   int main(void)
+   {
+   struct statfs fsd;
+   fsid_t fsid = fsd.f_fsid;
+   return statfs (., fsd);
+   }],
+   vfsfileid_cv_statfs=yes,
+   vfsfileid_cv_statfs=no,
+   vfsfileid_cv_statfs=cross)
+])
+AC_MSG_RESULT($vfsfileid_cv_statfs)
+
+if test x$ac_cv_func_getmntent = xyes -a \
+   x$vfsfileid_cv_statfs = xyes; then
+   default_shared_modules=$default_shared_modules vfs_fileid
+fi
+# End
+# Checks for the vfs_fileid module
+
+
 for i in `echo $default_static_modules | sed -e 's/,/ /g'`
 do
eval MODULE_DEFAULT_$i=STATIC
@@ -6189,6 +6221,7 @@
 SMB_MODULE(vfs_commit, \$(VFS_COMMIT_OBJ), bin/commit.$SHLIBEXT, VFS)
 SMB_MODULE(vfs_gpfs, \$(VFS_GPFS_OBJ), bin/gpfs.$SHLIBEXT, VFS)
 SMB_MODULE(vfs_readahead, \$(VFS_READAHEAD_OBJ), bin/readahead.$SHLIBEXT, 
VFS)
+SMB_MODULE(vfs_fileid, \$(VFS_FILEID_OBJ), bin/fileid.$SHLIBEXT, VFS)
 
 SMB_SUBSYSTEM(VFS,smbd/vfs.o)
 

Added: branches/SAMBA_3_2_0/source/modules/vfs_fileid.c
===
--- branches/SAMBA_3_2_0/source/modules/vfs_fileid.c2007-08-10 09:05:18 UTC 
(rev 24302)
+++ branches/SAMBA_3_2_0/source/modules/vfs_fileid.c2007-08-10 09:13:06 UTC 
(rev 24303)
@@ -0,0 +1,288 @@
+/*
+ * VFS module to alter the algorithm to calculate
+ * the struct file_id used as key for the share mode
+ * and byte range locking db's.
+ *
+ * Copyright (C) 2007, Stefan Metzmacher
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see http://www.gnu.org/licenses/.
+ */
+
+#include includes.h
+
+static int vfs_fileid_debug_level = DBGC_VFS;
+
+#undef DBGC_CLASS
+#define DBGC_CLASS vfs_fileid_debug_level
+
+struct fileid_mount_entry {
+   SMB_DEV_T device;
+   const char *mnt_fsname;
+   fsid_t fsid;
+   uint64_t devid;
+};
+
+struct fileid_handle_data {
+   uint64_t (*device_mapping_fn)(struct fileid_handle_data *data,
+ SMB_DEV_T dev);
+   unsigned num_mount_entries;
+   struct fileid_mount_entry 

svn commit: samba r24301 - in branches/SAMBA_4_0/source/selftest: .

2007-08-10 Thread abartlet
Author: abartlet
Date: 2007-08-10 08:46:29 + (Fri, 10 Aug 2007)
New Revision: 24301

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

Log:
The less escape characters the better.  This changes the winbind
seperator to /, which is not an escape character, and uses the fact
that we always support / as the DOMAIN/username seperator.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/selftest/Samba4.pm
   branches/SAMBA_4_0/source/selftest/test_member.sh


Changeset:
Modified: branches/SAMBA_4_0/source/selftest/Samba4.pm
===
--- branches/SAMBA_4_0/source/selftest/Samba4.pm2007-08-10 07:40:50 UTC 
(rev 24300)
+++ branches/SAMBA_4_0/source/selftest/Samba4.pm2007-08-10 08:46:29 UTC 
(rev 24301)
@@ -298,6 +298,7 @@
setup directory = $self-{setupdir}
js include = $srcdir/scripting/libjs
winbindd socket directory = $winbindd_socket_dir
+winbind separator = /
name resolve order = bcast
interfaces = $interfaces
tls dh params file = $tlsdir/dhparms.pem

Modified: branches/SAMBA_4_0/source/selftest/test_member.sh
===
--- branches/SAMBA_4_0/source/selftest/test_member.sh   2007-08-10 07:40:50 UTC 
(rev 24300)
+++ branches/SAMBA_4_0/source/selftest/test_member.sh   2007-08-10 08:46:29 UTC 
(rev 24301)
@@ -3,6 +3,6 @@
 incdir=`dirname $0`
 . $incdir/test_functions.sh
 
-plantest RPC-ECHO against member server with local creds member $VALGRIND 
bin/smbtorture $TORTURE_OPTIONS ncacn_np:\$NETBIOSNAME 
-U\$NETBIOSNAME\$USERNAME%\$PASSWORD RPC-ECHO $*
-plantest RPC-ECHO against member server with domain creds member $VALGRIND 
bin/smbtorture $TORTURE_OPTIONS ncacn_np:\$NETBIOSNAME 
-U\$DOMAIN\$DC_USERNAME%\$DC_PASSWORD RPC-ECHO $*
-plantest wbinfo -a against member server with domain creds member $VALGRIND 
bin/wbinfo -a \$DOMAIN\$DC_USERNAME%\$DC_PASSWORD
\ No newline at end of file
+plantest RPC-ECHO against member server with local creds member $VALGRIND 
bin/smbtorture $TORTURE_OPTIONS ncacn_np:\$NETBIOSNAME 
-U\$NETBIOSNAME/\$USERNAME%\$PASSWORD RPC-ECHO $*
+plantest RPC-ECHO against member server with domain creds member $VALGRIND 
bin/smbtorture $TORTURE_OPTIONS ncacn_np:\$NETBIOSNAME 
-U\$DOMAIN/\$DC_USERNAME%\$DC_PASSWORD RPC-ECHO $*
+plantest wbinfo -a against member server with domain creds member $VALGRIND 
bin/wbinfo -a \$DOMAIN/\$DC_USERNAME%\$DC_PASSWORD



svn commit: samba r24302 - in branches/SAMBA_3_2/source: . modules

2007-08-10 Thread metze
Author: metze
Date: 2007-08-10 09:05:18 + (Fri, 10 Aug 2007)
New Revision: 24302

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

Log:
add a module that overloads the file_id_create VFS function
and alters the device id depending on the configured algorithm.

The algorithm is configured via fileid:algorithm:
- fsname (default) uses a uint64 hash over the mount point
- fsid uses the fsid returned from statfs()

This is needed for clustering = yes on some clusterfilesystems

metze
Added:
   branches/SAMBA_3_2/source/modules/vfs_fileid.c
Modified:
   branches/SAMBA_3_2/source/Makefile.in
   branches/SAMBA_3_2/source/configure.in


Changeset:
Modified: branches/SAMBA_3_2/source/Makefile.in
===
--- branches/SAMBA_3_2/source/Makefile.in   2007-08-10 08:46:29 UTC (rev 
24301)
+++ branches/SAMBA_3_2/source/Makefile.in   2007-08-10 09:05:18 UTC (rev 
24302)
@@ -479,6 +479,7 @@
 VFS_GPFS_OBJ = modules/vfs_gpfs.o modules/gpfs.o modules/nfs4_acls.o
 VFS_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o
 VFS_READAHEAD_OBJ = modules/vfs_readahead.o
+VFS_FILEID_OBJ = modules/vfs_fileid.o
 
 PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
 
@@ -1681,6 +1682,10 @@
@echo Building plugin $@
@$(SHLD_MODULE) $(VFS_READAHEAD_OBJ)
 
+bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(VFS_FILEID_OBJ)
+   @echo Building plugin $@
+   @$(SHLD_MODULE) $(VFS_FILEID_OBJ)
+
 #
 ## IdMap NSS plugins
 

Modified: branches/SAMBA_3_2/source/configure.in
===
--- branches/SAMBA_3_2/source/configure.in  2007-08-10 08:46:29 UTC (rev 
24301)
+++ branches/SAMBA_3_2/source/configure.in  2007-08-10 09:05:18 UTC (rev 
24302)
@@ -6236,6 +6236,38 @@
   esac ])
 AC_SUBST(PYTHON)
 
+
+# Checks for the vfs_fileid module
+# Start
+AC_CHECK_FUNC(getmntent)
+
+AC_CHECK_HEADERS(sys/statfs.h)
+
+AC_MSG_CHECKING([vfs_fileid: checking for statfs() and struct statfs.f_fsid)])
+AC_CACHE_VAL(vfsfileid_cv_statfs,[
+AC_TRY_RUN([
+   #include sys/types.h
+   #include sys/statfs.h
+   int main(void)
+   {
+   struct statfs fsd;
+   fsid_t fsid = fsd.f_fsid;
+   return statfs (., fsd);
+   }],
+   vfsfileid_cv_statfs=yes,
+   vfsfileid_cv_statfs=no,
+   vfsfileid_cv_statfs=cross)
+])
+AC_MSG_RESULT($vfsfileid_cv_statfs)
+
+if test x$ac_cv_func_getmntent = xyes -a \
+   x$vfsfileid_cv_statfs = xyes; then
+   default_shared_modules=$default_shared_modules vfs_fileid
+fi
+# End
+# Checks for the vfs_fileid module
+
+
 for i in `echo $default_static_modules | sed -e 's/,/ /g'`
 do
eval MODULE_DEFAULT_$i=STATIC
@@ -6356,6 +6388,7 @@
 SMB_MODULE(vfs_gpfs, \$(VFS_GPFS_OBJ), bin/gpfs.$SHLIBEXT, VFS)
 SMB_MODULE(vfs_notify_fam, \$(VFS_NOTIFY_FAM_OBJ), bin/notify_fam.$SHLIBEXT, 
VFS)
 SMB_MODULE(vfs_readahead, \$(VFS_READAHEAD_OBJ), bin/readahead.$SHLIBEXT, 
VFS)
+SMB_MODULE(vfs_fileid, \$(VFS_FILEID_OBJ), bin/fileid.$SHLIBEXT, VFS)
 
 SMB_SUBSYSTEM(VFS,smbd/vfs.o)
 

Added: branches/SAMBA_3_2/source/modules/vfs_fileid.c
===
--- branches/SAMBA_3_2/source/modules/vfs_fileid.c  2007-08-10 08:46:29 UTC 
(rev 24301)
+++ branches/SAMBA_3_2/source/modules/vfs_fileid.c  2007-08-10 09:05:18 UTC 
(rev 24302)
@@ -0,0 +1,288 @@
+/*
+ * VFS module to alter the algorithm to calculate
+ * the struct file_id used as key for the share mode
+ * and byte range locking db's.
+ *
+ * Copyright (C) 2007, Stefan Metzmacher
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see http://www.gnu.org/licenses/.
+ */
+
+#include includes.h
+
+static int vfs_fileid_debug_level = DBGC_VFS;
+
+#undef DBGC_CLASS
+#define DBGC_CLASS vfs_fileid_debug_level
+
+struct fileid_mount_entry {
+   SMB_DEV_T device;
+   const char *mnt_fsname;
+   fsid_t fsid;
+   uint64_t devid;
+};
+
+struct fileid_handle_data {
+   uint64_t (*device_mapping_fn)(struct fileid_handle_data *data,
+ SMB_DEV_T dev);
+   unsigned num_mount_entries;
+   struct fileid_mount_entry *mount_entries;
+};
+
+/* load all 

svn commit: samba r24304 - in branches/SAMBA_3_2/source: . include lib

2007-08-10 Thread metze
Author: metze
Date: 2007-08-10 09:44:13 + (Fri, 10 Aug 2007)
New Revision: 24304

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

Log:
patch from Bjoern JAcke [EMAIL PROTECTED]:

attached patches add EA support for Solaris. If no one disagrees, can 
someone check this in please?

metze
Modified:
   branches/SAMBA_3_2/source/configure.in
   branches/SAMBA_3_2/source/include/includes.h
   branches/SAMBA_3_2/source/lib/system.c


Changeset:
Modified: branches/SAMBA_3_2/source/configure.in
===
--- branches/SAMBA_3_2/source/configure.in  2007-08-10 09:13:06 UTC (rev 
24303)
+++ branches/SAMBA_3_2/source/configure.in  2007-08-10 09:44:13 UTC (rev 
24304)
@@ -1748,6 +1748,14 @@
 esac
 
 
+# Check if attropen() is present if this is Solaris
+case $host_os in
+  *solaris*)
+   AC_CHECK_FUNCS(attropen)
+  ;;
+esac
+
+
 # Do xattr functions take additional options like on Darwin?
 if test x$ac_cv_func_getxattr = xyes ; then
AC_CACHE_CHECK([whether xattr interface takes additional options], 
smb_attr_cv_xattr_add_opt, [

Modified: branches/SAMBA_3_2/source/include/includes.h
===
--- branches/SAMBA_3_2/source/include/includes.h2007-08-10 09:13:06 UTC 
(rev 24303)
+++ branches/SAMBA_3_2/source/include/includes.h2007-08-10 09:44:13 UTC 
(rev 24304)
@@ -224,6 +224,10 @@
 #include sys/attributes.h
 #endif
 
+#ifndef ENOATTR
+#define ENOATTR ENODATA
+#endif
+
 /* mutually exclusive (SuSE 8.2) */
 #if HAVE_ATTR_XATTR_H
 #include attr/xattr.h

Modified: branches/SAMBA_3_2/source/lib/system.c
===
--- branches/SAMBA_3_2/source/lib/system.c  2007-08-10 09:13:06 UTC (rev 
24303)
+++ branches/SAMBA_3_2/source/lib/system.c  2007-08-10 09:44:13 UTC (rev 
24304)
@@ -4,6 +4,7 @@
Copyright (C) Andrew Tridgell 1992-1998
Copyright (C) Jeremy Allison  1998-2005
Copyright (C) Timur Bakeyev2005
+   Copyright (C) Bjoern Jacke2006-2007

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1682,6 +1683,17 @@
SAFE_FREE(msgbuf);
 }
 
+/ Solaris EA helper function prototypes /
+#ifdef HAVE_ATTROPEN
+#define SOLARIS_ATTRMODE S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP
+int solaris_write_xattr(int attrfd, const char *value, size_t size);
+ssize_t solaris_read_xattr(int attrfd, void *value, size_t size);
+ssize_t solaris_list_xattr(int attrdirfd, char *list, size_t size);
+int solaris_unlinkat(int attrdirfd, const char *name);
+int solaris_attropen(const char *path, const char *attrpath, int oflag, mode_t 
mode);
+int solaris_openat(int fildes, const char *path, int oflag, mode_t mode);
+#endif
+
 /**
  Wrappers for extented attribute calls. Based on the Linux package with
  support for IRIX and (Net|Free)BSD also. Expand as other systems have them.
@@ -1730,6 +1742,14 @@
retval = attr_get(path, attrname, (char *)value, valuelength, flags);
 
return retval ? retval : valuelength;
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrfd = solaris_attropen(path, name, O_RDONLY, 0);
+   if (attrfd = 0) {
+   ret = solaris_read_xattr(attrfd, value, size);
+   close(attrfd);
+   }
+   return ret;
 #else
errno = ENOSYS;
return -1;
@@ -1773,6 +1793,14 @@
retval = attr_get(path, attrname, (char *)value, valuelength, flags);
 
return retval ? retval : valuelength;
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrfd = solaris_attropen(path, name, O_RDONLY|AT_SYMLINK_NOFOLLOW, 
0);
+   if (attrfd = 0) {
+   ret = solaris_read_xattr(attrfd, value, size);
+   close(attrfd);
+   }
+   return ret;
 #else
errno = ENOSYS;
return -1;
@@ -1818,6 +1846,14 @@
retval = attr_getf(filedes, attrname, (char *)value, valuelength, 
flags);
 
return retval ? retval : valuelength;
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrfd = solaris_openat(filedes, name, O_RDONLY|O_XATTR, 0);
+   if (attrfd = 0) {
+   ret = solaris_read_xattr(attrfd, value, size);
+   close(attrfd);
+   }
+   return ret;
 #else
errno = ENOSYS;
return -1;
@@ -2002,6 +2038,14 @@
return bsd_attr_list(0, arg, list, size);
 #elif defined(HAVE_ATTR_LIST)  defined(HAVE_SYS_ATTRIBUTES_H)
return irix_attr_list(path, 0, list, size, 0);
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrdirfd = solaris_attropen(path, ., O_RDONLY, 

svn commit: samba r24307 - in branches/SAMBA_3_2/source/smbd: .

2007-08-10 Thread metze
Author: metze
Date: 2007-08-10 09:56:13 + (Fri, 10 Aug 2007)
New Revision: 24307

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

Log:
fill in choise with value -1 on error
as we've done before revision 24002

metze
Modified:
   branches/SAMBA_3_2/source/smbd/negprot.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/negprot.c
===
--- branches/SAMBA_3_2/source/smbd/negprot.c2007-08-10 09:53:42 UTC (rev 
24306)
+++ branches/SAMBA_3_2/source/smbd/negprot.c2007-08-10 09:56:13 UTC (rev 
24307)
@@ -674,6 +674,7 @@
DEBUG(3,(Selected protocol 
%s\n,supported_protocols[protocol].proto_name));
} else {
DEBUG(0,(No protocol supported !\n));
+   SSVAL(outbuf,smb_vwv0,choice);
}
   
DEBUG( 5, ( negprot index=%d\n, choice ) );



svn commit: samba r24310 - in branches/SAMBA_3_2/source/smbd: .

2007-08-10 Thread metze
Author: metze
Date: 2007-08-10 10:15:25 + (Fri, 10 Aug 2007)
New Revision: 24310

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

Log:
we should not call END_PROFILE(SMBntcreateX); twice...

metze
Modified:
   branches/SAMBA_3_2/source/smbd/nttrans.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/nttrans.c
===
--- branches/SAMBA_3_2/source/smbd/nttrans.c2007-08-10 10:11:40 UTC (rev 
24309)
+++ branches/SAMBA_3_2/source/smbd/nttrans.c2007-08-10 10:15:25 UTC (rev 
24310)
@@ -729,7 +729,6 @@
 */
status = resolve_dfspath(conn, req-flags2  FLAGS2_DFS_PATHNAMES, 
fname);
if (!NT_STATUS_IS_OK(status)) {
-   END_PROFILE(SMBntcreateX);
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
ERRSRV, ERRbadpath);



svn commit: samba r24317 - in branches/SAMBA_3_0_25/source: . include lib

2007-08-10 Thread jra
Author: jra
Date: 2007-08-10 20:47:47 + (Fri, 10 Aug 2007)
New Revision: 24317

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

Log:
From Bjoern JAcke [EMAIL PROTECTED]:

attached patches add EA support for Solaris. If no one disagrees, can
someone check this in please?

Jeremy.

Modified:
   branches/SAMBA_3_0_25/source/configure.in
   branches/SAMBA_3_0_25/source/include/includes.h
   branches/SAMBA_3_0_25/source/lib/system.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/configure.in
===
--- branches/SAMBA_3_0_25/source/configure.in   2007-08-10 20:03:31 UTC (rev 
24316)
+++ branches/SAMBA_3_0_25/source/configure.in   2007-08-10 20:47:47 UTC (rev 
24317)
@@ -1591,6 +1591,14 @@
 esac
 
 
+# Check if attropen() is present if this is Solaris
+case $host_os in
+  *solaris*)
+   AC_CHECK_FUNCS(attropen)
+  ;;
+esac
+
+
 # Do xattr functions take additional options like on Darwin?
 if test x$ac_cv_func_getxattr = xyes ; then
AC_CACHE_CHECK([whether xattr interface takes additional options], 
smb_attr_cv_xattr_add_opt, [

Modified: branches/SAMBA_3_0_25/source/include/includes.h
===
--- branches/SAMBA_3_0_25/source/include/includes.h 2007-08-10 20:03:31 UTC 
(rev 24316)
+++ branches/SAMBA_3_0_25/source/include/includes.h 2007-08-10 20:47:47 UTC 
(rev 24317)
@@ -225,6 +225,10 @@
 #include sys/attributes.h
 #endif
 
+#ifndef ENOATTR
+#define ENOATTR ENODATA
+#endif
+
 /* mutually exclusive (SuSE 8.2) */
 #if HAVE_ATTR_XATTR_H
 #include attr/xattr.h

Modified: branches/SAMBA_3_0_25/source/lib/system.c
===
--- branches/SAMBA_3_0_25/source/lib/system.c   2007-08-10 20:03:31 UTC (rev 
24316)
+++ branches/SAMBA_3_0_25/source/lib/system.c   2007-08-10 20:47:47 UTC (rev 
24317)
@@ -4,6 +4,7 @@
Copyright (C) Andrew Tridgell 1992-1998
Copyright (C) Jeremy Allison  1998-2005
Copyright (C) Timur Bakeyev2005
+   Copyright (C) Bjoern Jacke2006-2007

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1561,6 +1562,17 @@
SAFE_FREE(msgbuf);
 }
 
+/ Solaris EA helper function prototypes /
+#ifdef HAVE_ATTROPEN
+#define SOLARIS_ATTRMODE S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP
+int solaris_write_xattr(int attrfd, const char *value, size_t size);
+ssize_t solaris_read_xattr(int attrfd, void *value, size_t size);
+ssize_t solaris_list_xattr(int attrdirfd, char *list, size_t size);
+int solaris_unlinkat(int attrdirfd, const char *name);
+int solaris_attropen(const char *path, const char *attrpath, int oflag, mode_t 
mode);
+int solaris_openat(int fildes, const char *path, int oflag, mode_t mode);
+#endif
+
 /**
  Wrappers for extented attribute calls. Based on the Linux package with
  support for IRIX and (Net|Free)BSD also. Expand as other systems have them.
@@ -1609,6 +1621,14 @@
retval = attr_get(path, attrname, (char *)value, valuelength, flags);
 
return retval ? retval : valuelength;
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrfd = solaris_attropen(path, name, O_RDONLY, 0);
+   if (attrfd = 0) {
+   ret = solaris_read_xattr(attrfd, value, size);
+   close(attrfd);
+   }
+   return ret;
 #else
errno = ENOSYS;
return -1;
@@ -1652,6 +1672,14 @@
retval = attr_get(path, attrname, (char *)value, valuelength, flags);
 
return retval ? retval : valuelength;
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrfd = solaris_attropen(path, name, O_RDONLY|AT_SYMLINK_NOFOLLOW, 
0);
+   if (attrfd = 0) {
+   ret = solaris_read_xattr(attrfd, value, size);
+   close(attrfd);
+   }
+   return ret;
 #else
errno = ENOSYS;
return -1;
@@ -1697,6 +1725,14 @@
retval = attr_getf(filedes, attrname, (char *)value, valuelength, 
flags);
 
return retval ? retval : valuelength;
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrfd = solaris_openat(filedes, name, O_RDONLY|O_XATTR, 0);
+   if (attrfd = 0) {
+   ret = solaris_read_xattr(attrfd, value, size);
+   close(attrfd);
+   }
+   return ret;
 #else
errno = ENOSYS;
return -1;
@@ -1881,6 +1917,14 @@
return bsd_attr_list(0, arg, list, size);
 #elif defined(HAVE_ATTR_LIST)  defined(HAVE_SYS_ATTRIBUTES_H)
return irix_attr_list(path, 0, list, size, 0);
+#elif defined(HAVE_ATTROPEN)
+   ssize_t ret = -1;
+   int attrdirfd = solaris_attropen(path, 

svn commit: samba r24318 - in branches/SAMBA_3_2/source/smbd: .

2007-08-10 Thread vlendec
Author: vlendec
Date: 2007-08-10 20:53:27 + (Fri, 10 Aug 2007)
New Revision: 24318

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

Log:
Print a prominent warning when reply_prep_legacy is called

This is a temporary function anyway

Modified:
   branches/SAMBA_3_2/source/smbd/process.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/process.c
===
--- branches/SAMBA_3_2/source/smbd/process.c2007-08-10 20:47:47 UTC (rev 
24317)
+++ branches/SAMBA_3_2/source/smbd/process.c2007-08-10 20:53:27 UTC (rev 
24318)
@@ -82,6 +82,8 @@
 + SAFETY_MARGIN);
char *inbuf, *outbuf;
 
+   DEBUG(1, (reply_prep_legacy called\n));
+
if (!(inbuf = TALLOC_ARRAY(req, char, bufsize))) {
DEBUG(0, (Could not allocate legacy inbuf\n));
return False;



svn commit: samba r24314 - in branches: SAMBA_3_0_25/source/smbd SAMBA_3_2/source/smbd SAMBA_3_2_0/source/smbd

2007-08-10 Thread vlendec
Author: vlendec
Date: 2007-08-10 14:01:14 + (Fri, 10 Aug 2007)
New Revision: 24314

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

Log:
Attempt to fix bug 4868

Modified:
   branches/SAMBA_3_0_25/source/smbd/notify.c
   branches/SAMBA_3_2/source/smbd/notify.c
   branches/SAMBA_3_2_0/source/smbd/notify.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/smbd/notify.c
===
--- branches/SAMBA_3_0_25/source/smbd/notify.c  2007-08-10 11:53:52 UTC (rev 
24313)
+++ branches/SAMBA_3_0_25/source/smbd/notify.c  2007-08-10 14:01:14 UTC (rev 
24314)
@@ -160,6 +160,7 @@
 
if (notify_buf-num_changes == -1) {
change_notify_reply_packet(request_buf, NT_STATUS_OK);
+   notify_buf-num_changes = 0;
return;
}
 

Modified: branches/SAMBA_3_2/source/smbd/notify.c
===
--- branches/SAMBA_3_2/source/smbd/notify.c 2007-08-10 11:53:52 UTC (rev 
24313)
+++ branches/SAMBA_3_2/source/smbd/notify.c 2007-08-10 14:01:14 UTC (rev 
24314)
@@ -160,6 +160,7 @@
 
if (notify_buf-num_changes == -1) {
change_notify_reply_packet(request_buf, NT_STATUS_OK);
+   notify_buf-num_changes = 0;
return;
}
 

Modified: branches/SAMBA_3_2_0/source/smbd/notify.c
===
--- branches/SAMBA_3_2_0/source/smbd/notify.c   2007-08-10 11:53:52 UTC (rev 
24313)
+++ branches/SAMBA_3_2_0/source/smbd/notify.c   2007-08-10 14:01:14 UTC (rev 
24314)
@@ -159,6 +159,7 @@
 
if (notify_buf-num_changes == -1) {
change_notify_reply_packet(request_buf, NT_STATUS_OK);
+   notify_buf-num_changes = 0;
return;
}
 



svn commit: samba r24320 - in branches/SAMBA_3_2/source/smbd: .

2007-08-10 Thread vlendec
Author: vlendec
Date: 2007-08-10 21:34:55 + (Fri, 10 Aug 2007)
New Revision: 24320

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

Log:
Fix the wct checks in reply_trans2 and the reply_trans calls

No idea what I've been smoking here.

Thanks to Stefan for closely looking

Modified:
   branches/SAMBA_3_2/source/smbd/ipc.c
   branches/SAMBA_3_2/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/ipc.c
===
--- branches/SAMBA_3_2/source/smbd/ipc.c2007-08-10 21:33:58 UTC (rev 
24319)
+++ branches/SAMBA_3_2/source/smbd/ipc.c2007-08-10 21:34:55 UTC (rev 
24320)
@@ -488,7 +488,7 @@
 
START_PROFILE(SMBtrans);
 
-   if (SVAL(req-inbuf, smb_wct)  10) {
+   if (req-wct  14) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBtrans);
return;
@@ -667,7 +667,7 @@
 
show_msg((char *)req-inbuf);
 
-   if (req-wct  10) {
+   if (req-wct  8) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBtranss);
return;

Modified: branches/SAMBA_3_2/source/smbd/trans2.c
===
--- branches/SAMBA_3_2/source/smbd/trans2.c 2007-08-10 21:33:58 UTC (rev 
24319)
+++ branches/SAMBA_3_2/source/smbd/trans2.c 2007-08-10 21:34:55 UTC (rev 
24320)
@@ -7028,7 +7028,7 @@
 
START_PROFILE(SMBtrans2);
 
-   if (req-wct  8) {
+   if (req-wct  14) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBtrans2);
return;



svn commit: samba r24319 - in branches/SAMBA_3_2/source/smbd: .

2007-08-10 Thread vlendec
Author: vlendec
Date: 2007-08-10 21:33:58 + (Fri, 10 Aug 2007)
New Revision: 24319

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

Log:
Check wct in reply_read_and_X
Modified:
   branches/SAMBA_3_2/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/reply.c
===
--- branches/SAMBA_3_2/source/smbd/reply.c  2007-08-10 20:53:27 UTC (rev 
24318)
+++ branches/SAMBA_3_2/source/smbd/reply.c  2007-08-10 21:33:58 UTC (rev 
24319)
@@ -2860,10 +2860,10 @@
 
 int reply_read_and_X(connection_struct *conn, char *inbuf,char *outbuf,int 
length,int bufsize)
 {
-   files_struct *fsp = file_fsp(SVAL(inbuf,smb_vwv2));
-   SMB_OFF_T startpos = IVAL_TO_SMB_OFF_T(inbuf,smb_vwv3);
+   files_struct *fsp;
+   SMB_OFF_T startpos;
ssize_t nread = -1;
-   size_t smb_maxcnt = SVAL(inbuf,smb_vwv5);
+   size_t smb_maxcnt;
BOOL big_readX = False;
 #if 0
size_t smb_mincnt = SVAL(inbuf,smb_vwv6);
@@ -2871,6 +2871,14 @@
 
START_PROFILE(SMBreadX);
 
+   if ((CVAL(inbuf, smb_wct) != 10)  (CVAL(inbuf, smb_wct) != 12)) {
+   return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
+   }
+
+   fsp = file_fsp(SVAL(inbuf,smb_vwv2));
+   startpos = IVAL_TO_SMB_OFF_T(inbuf,smb_vwv3);
+   smb_maxcnt = SVAL(inbuf,smb_vwv5);
+
/* If it's an IPC, pass off the pipe handler. */
if (IS_IPC(conn)) {
END_PROFILE(SMBreadX);



Build status as of Sat Aug 11 00:00:03 2007

2007-08-10 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-08-10 
00:00:21.0 +
+++ /home/build/master/cache/broken_results.txt 2007-08-11 00:01:40.0 
+
@@ -1,24 +1,24 @@
-Build status as of Fri Aug 10 00:00:02 2007
+Build status as of Sat Aug 11 00:00:03 2007
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   28 8  0 
+ccache   30 8  0 
 ctdb 0  0  0 
 distcc   2  0  0 
-ldb  29 4  0 
-libreplace   28 8  0 
-lorikeet-heimdal 25 14 0 
-pidl 17 3  0 
-ppp  12 9  0 
+ldb  30 4  0 
+libreplace   29 8  0 
+lorikeet-heimdal 26 14 0 
+pidl 18 3  0 
+ppp  13 10 0 
 python   0  0  0 
-rsync30 11 0 
+rsync31 11 0 
 samba-docs   0  0  0 
-samba-gtk2  2  0 
-samba4   27 18 2 
-samba_3_231 18 0 
-smb-build27 27 0 
-talloc   30 1  0 
-tdb  28 3  0 
+samba-gtk3  3  0 
+samba4   28 16 2 
+samba_3_232 19 0 
+smb-build28 28 0 
+talloc   31 1  0 
+tdb  29 3  0