Re: [Samba] Samba 3.0 and XP roaming profiles

2007-04-16 Thread C.Scheeder

Hi all, the share, subdirs and script have to be readable and executable
to the guest user.
The netlogon-share gets mapped by guest, not the user.
Then windows looks for the logonscript in there and if it can execute it
as guest.
Christoph

Dennis McLeod schrieb:

I haven't done this, so I don't really know.
If the script is named user1, would windows know what to do with it?
Shouldn't it be user1.bat? (assuming it's a batch file.)
If so, shouldn't it say:

path= /var/samba/netlogon/%U.bat

In the netlogon section?

Again, I haven't tried it, so I'm just guessing
Dennis


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
contact_mahajan
Sent: Thursday, April 12, 2007 8:35 AM
To: samba@lists.samba.org
Subject: Re: [Samba] Samba 3.0 and XP roaming profiles



Hi,

I dont have samba with LDAP.
I took out \scripts\ part from logon script part in GLOBAL settings. ALso
I created a script for a particular test user (script name is same as login
name). I stored that script under /var/samba/netlogon/. Permissions were
also set so that this user can read/write/Execute, plus the ownership was
also changed.
I tried loggin as this user to test the script but nothing was mapped. I
think the script failed. Can you think of any reason? I even restarted my
samba services.

Thanks,

Gigs





Wolfgang Ratzka wrote:

contact_mahajan schrieb:


Also regarding my logon script, my smb.conf fille says like this:

[GLOBAL]
..
logon script = scripts\login.bat
.

[netlogon]
...
path= /var/samba/netlogon/%U

This definition is trying to be subtle by defining a per-user-netlogon 
share, as %U expands to the session user name. Normally you will not 
want to do this, so you will strip off the /%U and simply put your 
login scripts below /var/samba/netlogon. (Permissions should of course 
be so that everyone can read and only admins can write.) The logon 
script parameter is a (windows) path relative to the netlogon 
directory. There is no need to put those in a subdirectory. (Sou you 
can do away with the scripts\ part...) You should note that the 
logon script parameter in the [global] section can be overridden by 
per-user-settings in ldap (if you are using ldap).


Kind regards
--
Wolfgang Ratzka  Phone: +49 6421 2823531  FAX: +49 6421 2826994 Uni 
Marburg,  HRZ, Hans-Meerwein-Str., D-35032 Marburg, Germany

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




--
View this message in context:
http://www.nabble.com/Samba-3.0-and-XP-roaming-profiles-tf3561201.html#a9961
787
Sent from the Samba - General mailing list archive at Nabble.com.

--
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] Samba 3.0 and XP roaming profiles

2007-04-16 Thread C.Scheeder

Ups, forgot something:

with the script in /var/samba/netlogon and named like the user,
in smb.conf you need this:

[global]
.
#this path is relative to the root of the netlogon-share
logon script = %U.bat   
.

[netlogon]
path= /var/samba/netlogon

Hi all, the share, subdirs and script have to be readable and executable
to the guest user.
The netlogon-share gets mapped by guest, not the user.
Then windows looks for the logonscript in there and if it can execute it
as guest.
Christoph

Dennis McLeod schrieb:

I haven't done this, so I don't really know.
If the script is named user1, would windows know what to do with it?
Shouldn't it be user1.bat? (assuming it's a batch file.)
If so, shouldn't it say:

path= /var/samba/netlogon/%U.bat

In the netlogon section?

Again, I haven't tried it, so I'm just guessing
Dennis


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
contact_mahajan
Sent: Thursday, April 12, 2007 8:35 AM
To: samba@lists.samba.org
Subject: Re: [Samba] Samba 3.0 and XP roaming profiles



Hi,

I dont have samba with LDAP.
I took out \scripts\ part from logon script part in GLOBAL settings. ALso
I created a script for a particular test user (script name is same as login
name). I stored that script under /var/samba/netlogon/. Permissions were
also set so that this user can read/write/Execute, plus the ownership was
also changed.
I tried loggin as this user to test the script but nothing was mapped. I
think the script failed. Can you think of any reason? I even restarted my
samba services.

Thanks,

Gigs





Wolfgang Ratzka wrote:

contact_mahajan schrieb:


Also regarding my logon script, my smb.conf fille says like this:

[GLOBAL]
..
logon script = scripts\login.bat
.

[netlogon]
...
path= /var/samba/netlogon/%U

This definition is trying to be subtle by defining a per-user-netlogon 
share, as %U expands to the session user name. Normally you will not 
want to do this, so you will strip off the /%U and simply put your 
login scripts below /var/samba/netlogon. (Permissions should of course 
be so that everyone can read and only admins can write.) The logon 
script parameter is a (windows) path relative to the netlogon 
directory. There is no need to put those in a subdirectory. (Sou you 
can do away with the scripts\ part...) You should note that the 
logon script parameter in the [global] section can be overridden by 
per-user-settings in ldap (if you are using ldap).


Kind regards
--
Wolfgang Ratzka  Phone: +49 6421 2823531  FAX: +49 6421 2826994 Uni 
Marburg,  HRZ, Hans-Meerwein-Str., D-35032 Marburg, Germany

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




--
View this message in context:
http://www.nabble.com/Samba-3.0-and-XP-roaming-profiles-tf3561201.html#a9961
787
Sent from the Samba - General mailing list archive at Nabble.com.

--
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] Failed to verify incoming ticket! When clients use netbios names only!

2007-04-16 Thread Martin Zielinski

Hi,

the Failed to join domain: Type or value exists is caused, when the 
machine_name is equal to the fqdn.


This is the case, e.g. if the /etc/hosts file contains only the short 
name. The server reports the error and net aborts although the join 
itself was successfull.


There are serveral issues with the hostname vs. domainname thing under 
linux.
E.g. the missing driver listings when using the fqdn accessing the samba 
server.
I've added a getdomainname() call in the get_mydnsfullname() function in 
 lib/util.c if the gethostname() call does not contain a ..

Then the comparison in is_myname() succeeds and the drivers are listed.

But the manpage says, getdomainname() is *not* POSIX. So this all might 
end in a configuration issue of the hostname.


Regards,

~ Martin


Hansjörg Maurer schrieb:

Hi

we see the similar messages too.

Gerald (Jerry) Carter wrote:

m.bland wrote:


thor:/var/log/samba# cat /etc/samba/smb.conf
[global]
workgroup = DOMAIN
realm = DOMAIN

Are these really the same value ?

do they have to?
When I try to set them to the same value I get the following message
when joining the domain.

[EMAIL PROTECTED] root]# net ads join  -U Admin
Admin's password:
The workgroup in /etc/samba/smb.conf does not match the short
domain name obtained from the server.
Using the name [DOMNAME] from the server.
You should set workgroup = DOMNAME in /etc/samba/smb.conf.
Using short domain name -- DOMNAME
Failed to set servicePrincipalNames. Please ensure that
the DNS domain of this server matches the AD domain,
Or rejoin with using Domain Admin credentials.
Deleted account for 'RMVBS02' in realm 'REALM'
Failed to join domain: Type or value exists


But we have a DNS not matching the REALM.

Could this lead to this problem?

(the above join only works with net rpc join, even while User Admin has
full rights on the domain)

Greetings

hansjörg


...


thor:/var/log/samba# cat /etc/krb5.conf
[libdefaults]
 default_realm = DOMAIN.NAME






cheers, jerry




--
Martin Zielinski [EMAIL PROTECTED]
Software Development
SEH Computertechnik GmbH www.seh.de

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


[Samba] samba and FreeBSD jails

2007-04-16 Thread Dave

Hello,
   Is anyone using samba on a FreeBSD system in a jailed environment? I've 
got a jail set up, and although on the host system i've set up bind 
interfaces and a listen directive specifying the specific ip to listen to 
nmbd is still binding to all active interfaces. Does anyone know if there's 
a way to get around this? On the same subject i'd like to run samba from 
within a jail, offering limited services to the jail and host environment. 
Any help appreciated.

Thanks.
Dave.

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


[Samba] Winbind offline logon

2007-04-16 Thread Anders.Strandberg
Hi,

I have a question about Winbinds offline logon capabilities. 

We are working on integration of laptops  with winbind in to our Linux 
Workstation Managment System, but have some difficulties to verify the desired  
functionality. For that we are running the latest samba (currently 3.0.25rc1) . 
Authentication is setup against Windows AD 2003 with R2 extensions (rfc2703bis) 
.

Smb.conf:

[global]
workgroup = MY
realm = MY.DOMAIN.COM
security = ADS
auth methods = winbind
password server = dc11.my.domain.com dc12.my.domain.com *
name resolve order = host
socket options = SO_REUSEADDR TCP_NODELAY
os level = 0
preferred master = No
socket address = 10.41.24.141
idmap domains = MY
template homedir = /home/%u
winbind cache time = 600
winbind use default domain = Yes
winbind refresh tickets = Yes
winbind offline logon = Yes
idmap config MY:readonly = yes
idmap config MY:default = yes
idmap config MY:range = 300 - 3
idmap config MY:backend = ad
include = /env/samba/lib/smb.include.shares



It seems to work OK when connected to the network, but when disconnected it 
gets out of order.  When I pull the network plug and log out I cannot log with 
ssh as my personal user. I get (after a while) a notification that login is 
done witch cached credentials but the login fails. When I attempt to login 
again I am immediatley returned to the login prompt. Looking at the log it 
seems that the user is autheticated but the account is not found. The behaviour 
is similar if I log out and attempt a gui login.

The SID for my user seems to be retrieved OK, but winbind cannot retrieve user 
info for the sid. Eventually winbindd core dumps.

Winbind seems to have some trouble locating the unreachable DC:s .

My questions are:

What level of offline functionality is expected with winbind ?  What is working 
and what is not ? Are there any additional requirements to be fullfilled in 
addition to get it working while connected ?

Can I expect this setup to work, i.e. (winbind + ad) pull the network cable and 
be able to login with cached credentials ?  I suppose that  this is similar to 
doing a reboot and attempt an offline login, haven't got this working either.

When I connect the network cable again it seems that winbind does not catch up 
immediatley. On some occations the functionality is restored after several 
minutes , on other I have to restart the service to be able to login again.

I think Novel has this working for SLED 10 , but I have not been able to verify 
it on my laptop. I think they are running an older samba.

/Anders
 

 
_
Anders Strandberg, TietoEnator Processing  Network AB
E-mail:   [EMAIL PROTECTED] | Voice:  +46 920 452 037
Internet: http://www.tietoenator.com/   | Fax:+46 920 452 
906
Laboratoriegränd 11, Box 50006, S-973 21  Luleå, Sweden | Mobile: +46 70 345 
3285

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


Re: [Samba] Samba - WinXP: slow transfers, partial solution

2007-04-16 Thread Charles Marcus
I'm running Samba 3.0.24 as PDC and file server on Gentoo Linux, AMD64, 
2.6.19 kernel, 100MBit/s network, and experience quite slow file 
transfers from Samba to WinXP SP2 clients: the speed is varying, but is 
about 1-2Mb/s at best.


I'm assuming for the rest of this that you mean MB/sec not Mb/sec when 
referencing transfer speeds...


 b) Transfering to/from Samba server from Gentoo Linux on the same PC 
where WinXP is installed (so, completely the same hardware and 
connection) is also at normal speed.


So, you are running something in a VM?

 c) Transferring to/from WinXP to the server where Samba is installed 
using any other protocol (such as HTTPS or SCP) is also at normal speed.


Define 'normal'...

2) CPU is at almost idle level both at client and server, so it's not 
the issue.


3) If there is any other network activity, transfer speed is increased 
up to normal level: f.e. doing two simulteneous transfers from Samba 
server to WinXP client gives 5Mb/s at each transfer, as expected.


Again, define 'normal'?

100Mb network connections should give @ 12MB/sec transfer speeds, no? So 
5MB/sec speeds are certainly not 'normal'.


4) Running tcpdump on server while the transfer is performed improves 
transfer speed in about 1.5 - 3 times, but still not to the normal speed.


TCP dumps are fine, but you neglected to provide the most important 
thing for initial troubleshooting assistance: where is your config?



5) Playing with socket options does not give any results.


Modern linux kernels (2.6+) do *not* need to have these values tuned, so 
it is recommended to not set them *at* *all*. Just delete these entries.


Specifically, using advices from the article 
http://www.dd.iij4u.or.jp/~okuyamak/Documents/tuning.english.html about 
SO_SNDBUF does not improve situation (but read below).


Well, since this article is dated from 2000, I don't think I'd trust it 
much.


6) tcpdump + tcptrace show that there are a lot of retransmissions, see 
dumps below.


7) I've tested several WinXP clients with different hardware, all with 
the same results.


What about the NIC on the Samba server? If all clients are affected the 
same, then that is the NIC you should focus on (if it is indeed a 
hardware issue).



8) Samba logs looks normal to me, nothing special.

Points (3) and (5), and also the article about SO_SNDBUF tuning gave me 
an idea that there might be smth wrong with ACKs sent from WinXP.


I think you need to go back to square one, and start over, but with up 
to date references - like the excellent 'Samba-3 By Example' and/or 'The 
Official Samba-3 HOWTO and Reference Guide'.


It seems that I'm not the only one who have similar problems: see BUGs 
2117 and 3706 in Bugzilla, and discussion at Gentoo mailing list: 
http://forums.gentoo.org/viewtopic-p-2820556.html


This too is an old(er) thread - and it specifically mentions switching 
from smbfs to cifs as the best solution...


--

Best regards,

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


Re: [Samba] Samba - WinXP: slow transfers, partial solution

2007-04-16 Thread [EMAIL PROTECTED]
I have slow transfer from my samba serwer, casue my HDD wasn't running 
in UDMA mode, only in PIO, beside this a installed CentOS 4 and all 2 
disks are running in UDMA mode and there isn't a issue with network 
speed between WINXP SP2 and samba serwer.


Maybe check yours HDD too ?

Cheers,

I.Piasecki


Charles Marcus pisze:

I'm running Samba 3.0.24 as PDC and file server on Gentoo Linux, 
AMD64, 2.6.19 kernel, 100MBit/s network, and experience quite slow 
file transfers from Samba to WinXP SP2 clients: the speed is varying, 
but is about 1-2Mb/s at best.


I'm assuming for the rest of this that you mean MB/sec not Mb/sec when 
referencing transfer speeds...


 b) Transfering to/from Samba server from Gentoo Linux on the same PC 
where WinXP is installed (so, completely the same hardware and 
connection) is also at normal speed.


So, you are running something in a VM?

 c) Transferring to/from WinXP to the server where Samba is installed 
using any other protocol (such as HTTPS or SCP) is also at normal speed.


Define 'normal'...

2) CPU is at almost idle level both at client and server, so it's not 
the issue.


3) If there is any other network activity, transfer speed is 
increased up to normal level: f.e. doing two simulteneous transfers 
from Samba server to WinXP client gives 5Mb/s at each transfer, as 
expected.


Again, define 'normal'?

100Mb network connections should give @ 12MB/sec transfer speeds, no? 
So 5MB/sec speeds are certainly not 'normal'.


4) Running tcpdump on server while the transfer is performed improves 
transfer speed in about 1.5 - 3 times, but still not to the normal 
speed.


TCP dumps are fine, but you neglected to provide the most important 
thing for initial troubleshooting assistance: where is your config?



5) Playing with socket options does not give any results.


Modern linux kernels (2.6+) do *not* need to have these values tuned, 
so it is recommended to not set them *at* *all*. Just delete these 
entries.


Specifically, using advices from the article 
http://www.dd.iij4u.or.jp/~okuyamak/Documents/tuning.english.html 
about SO_SNDBUF does not improve situation (but read below).


Well, since this article is dated from 2000, I don't think I'd trust 
it much.


6) tcpdump + tcptrace show that there are a lot of retransmissions, 
see dumps below.


7) I've tested several WinXP clients with different hardware, all 
with the same results.


What about the NIC on the Samba server? If all clients are affected 
the same, then that is the NIC you should focus on (if it is indeed a 
hardware issue).



8) Samba logs looks normal to me, nothing special.

Points (3) and (5), and also the article about SO_SNDBUF tuning gave 
me an idea that there might be smth wrong with ACKs sent from WinXP.


I think you need to go back to square one, and start over, but with up 
to date references - like the excellent 'Samba-3 By Example' and/or 
'The Official Samba-3 HOWTO and Reference Guide'.


It seems that I'm not the only one who have similar problems: see 
BUGs 2117 and 3706 in Bugzilla, and discussion at Gentoo mailing 
list: http://forums.gentoo.org/viewtopic-p-2820556.html


This too is an old(er) thread - and it specifically mentions switching 
from smbfs to cifs as the best solution...




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


Re: [Samba] smbldap-useradd not creating machine accounts in correct fashion

2007-04-16 Thread Ben Tisdall
On Fri, April 13, 2007 23:48, Edmundo Valle Neto wrote:

 Your script appears to be working right, smbldap-useradd -w
 machinename$ should only create an account with posix attributes, the
sambaSAMAccount class and attributes will be added by samba when the
client is joined into the domain.

 You can see that in the IDEALX smbldap-tools user manual.

Thanks Edmundo and apologies for not having consulted the fine manual more
closely - I should know better.

In the end testing revealed that the tools were putting the machine
accounts under 'ou=computers,${suffix}' (as I wanted) but samba seemed to
be looking for them under 'ou=users,${suffix}', because if I reconfigured
the tools to put the accounts there then everything worked as expected.

This is odd as I have 'machine suffix = ou=computers' in smb.conf  now,
having now put things back as they were, everything's working!

Therefore I can only conclude that the issue was due to some typo that
I've now unwittingly corrected - odd, as I was logging samba at up to 4 
saw nothing suggestive.

Best,

-- 
Ben Tisdall



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


[Samba] hide directories?

2007-04-16 Thread Klemens Lichter
Hi,
is there a possibility to hide directories from to bee seen from a windows
box?

I have a samba share containing several directories. Some of them have
permissions only for a privileged group of users (group special) and some
others are allowed for all users (group users) and some for a special
subgroup of users (group subusers). What I want is that only members of
group special are able to see the existence of those directories that are
only accessible for them and also only members of subgroup are able to see
the existence of their directories. I was used to have this comfort on our
prevoius novell netware server and I think this is a great feature of
security. People that don´t see the existence of certain directories or
files don´t ask for them and don´t think about why they can´t access them.

Please feel free to ask for more information if you need them to answer my
question.

Thanks in advance
Klemens



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


[Samba] Winbindd periodical timeout issue

2007-04-16 Thread Rasmus Larsen
Hey,

I've got an issue with winbindd seeming to periodically fail to resolve 
user/group names from an AD setup. I'm getting the following error, the error 
seems to occur when I try to access a the samba server OR a directory that uses 
AD dependent ACLs/permissions. The server will stall for around 30-40 seconds 
and then it all seems to work perfectly (though I haven't yet determined if it 
causes permission problems). This only seems to happen if the server or data 
hasn't been accessed for an extented period.

This is part of the winbindd log:

[2007/04/15 22:06:30, 1] nsswitch/winbindd.c:main(953)
  winbindd version 3.0.23c-2.el5.2 started.
  Copyright The Samba Team 2000-2004
[2007/04/16 13:13:43, 0] lib/util_sock.c:read_socket_with_timeout(497)
  read_socket_with_timeout: timeout read. read error = Connection reset by peer.
[2007/04/16 13:13:43, 0] rpc_client/cli_pipe.c:rpc_api_pipe(790)
  rpc_api_pipe: Remote machine erstorage.er.dtu.dk pipe \lsarpc fnum 
0xc002returned critical error. Error was Read error: Connection reset by peer
[2007/04/16 13:13:43, 1] nsswitch/winbindd_group.c:winbindd_getgrnam(259)
  group Domain Users in domain ER does not exist
[2007/04/16 13:13:43, 1] libsmb/clientgen.c:cli_rpc_pipe_close(376)
  cli_rpc_pipe_close: cli_close failed on pipe \lsarpc, fnum 0xc002 to machine 
erstorage.er.dtu.dk.  Error was Read error: Success


About my setup:

I'm running samba Version 3.0.23c-2.el5.2 (CentOS 5, newest update), it's 
accessing an AD, of which erstorage.er.dtu.dk (as seen in the log), is a 
controller.

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


[Samba] Problem with RPC and Win2003 Server

2007-04-16 Thread Manuel Erber
Hello,
I have big trouble with the domainlogon. My Win2003 server say, that the
RPC-Server isn´t available. This problem comes sometimes and I can't see
anything in the logs.
That’s what I have:
- SAMBA PDC with LDAP-Backend (3.0.24-6 DEBIAN)
- SAMBA BDC with LDAP-Backend (3.0.24-6 DEBIAN)
- both servers are in the same network
- two Win2003-TS-Server that are in an other network
- the problem is, I want to say, never on both win2003 servers
together

Here my configs

PDC:


[global]

  netbios name = XYZ-PDC 
  workgroup = XYZ
  server string = PDC auf SERVER11 
  log file = /var/log/samba/log.XYZ.%m
  lock directory = /etc/samba/XYZ.lock
  max log size = 1000
  panic action = /usr/share/samba/panic-action %d
  os level = 64
  passdb expand explicit = Yes
  load printers = yes
  printing = cups
  printcap name = cups
  addprinter command = `/usr/sbin/lpadmin -p`
  domain master = yes 
  domain logons = yes
  security = user
  encrypt passwords = true
  preferred master = yes
  local master = yes
  server signing = yes  
  client schannel = no 
  server schannel = no 
  client signing = no 
  smb ports = 445 139 137
  ldap passwd sync = Yes
  unix password sync = no 
  wins support = yes 
  wins proxy = yes
  ldap admin dn = cn=admin,dc=xyz,dc=de
  ldap delete dn = no
  passdb backend = ldapsam:ldap://xxx.xxx.xxx.xxx:389;
  ldap suffix = dc=xyz,dc=de
  ldap group suffix = ou=Groups,sambaDomainName=XYZ,ou=samba
  ldap machine suffix = ou=Computers,sambaDomainName=XYZ,ou=samba 
  ldap user suffix = ou=Personen




BDC:

[global]

 netbios name = XYZ-BDC
 workgroup = XYZ
 server string = %h server (Samba %v)
 log file = /var/log/samba/log.XYZ.%m
 lock directory = /etc/samba/XYZ.lock
 max log size = 1000
 panic action = /usr/share/samba/panic-action %d
 os level = 64
 passdb expand explicit = yes
 domain master = no
 domain logons = yes
 security = user
 encrypt passwords = true
 preferred master = yes 
 local master = yes
 ldap passwd sync = Yes
 unix password sync = no
 wins support = yes
 wins proxy = yes
 ldap admin dn = cn=admin,dc=xyz,dc=de 
 ldap delete dn = no
 passdb backend = ldapsam:ldap://xxx.xxx.xxx.xxx:389;
 ldap suffix = dc=xyz,dc=de
 ldap group suffix = ou=Groups,sambaDomainName=XYZ,ou=samba
 ldap machine suffix = ou=Computers,sambaDomainName=XYZ,ou=samba
 ldap user suffix = ou=Personen

Have anybody the same problems or can help me to locate the problems.


Thanks
Manuel Erber
 

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


Re: [Samba] R: Printer and faxes icon in browsing list

2007-04-16 Thread mokhtar

I have tested with an older version Samba 2.0.7 
with this version Printer and Faxes is not displayed

So I think it is related with samba version

-- 
View this message in context: 
http://www.nabble.com/Printer-and-faxes-icon-in-browsing-list-tf3571681.html#a10016902
Sent from the Samba - General mailing list archive at Nabble.com.

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


[Samba] VFS on AIX 5.2 4.3.3

2007-04-16 Thread borgarello

Hello
I have been trying to use the module recycle.so on samba
installed on Aix. I tried with different version of Aix and
also different versions of samba. Also the latest one 3.0.24.
I have always installed the Binary version .
Always when I activate the recycle option the samba server
stops to accept connections. Otherwise it works normally.
I have googled on this problem and someone suggested to compile
modules statically. Does anybody have this option working on aix ?
Please can you tell me how to do it ?
Thanks in Advance
Massimo Borgarello


This message was sent using IMP, the Internet Messaging Program.

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


Re: [Samba] hide directories?

2007-04-16 Thread Mauricio Silveira

Just add the parameter hide unreadable = yes to the share declaration.
If you want to hide Rean-Only files too, just add hide unwriteable 
files = yes
I think a service restart might be needed, 1st try to logoff/logon in a 
client machine,  the try the command `smbcontrol smbd reload-config` 
then logoff/logon again; If both fail, simply restart the service and 
all goes well.


Mauricio

Klemens Lichter wrote:

Hi,
is there a possibility to hide directories from to bee seen from a windows
box?

I have a samba share containing several directories. Some of them have
permissions only for a privileged group of users (group special) and some
others are allowed for all users (group users) and some for a special
subgroup of users (group subusers). What I want is that only members of
group special are able to see the existence of those directories that are
only accessible for them and also only members of subgroup are able to see
the existence of their directories. I was used to have this comfort on our
prevoius novell netware server and I think this is a great feature of
security. People that don´t see the existence of certain directories or
files don´t ask for them and don´t think about why they can´t access them.

Please feel free to ask for more information if you need them to answer my
question.

Thanks in advance
Klemens



  


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

[Samba] Re: hide directories?

2007-04-16 Thread Klemens Lichter
Hi Mauricio,
you made my day! It works. Thank you.
Klemens
-- 

Mauricio Silveira [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Just add the parameter hide unreadable = yes to the share declaration.
If you want to hide Rean-Only files too, just add hide unwriteable
files = yes
I think a service restart might be needed, 1st try to logoff/logon in a
client machine,  the try the command `smbcontrol smbd reload-config`
then logoff/logon again; If both fail, simply restart the service and
all goes well.

Mauricio

Klemens Lichter wrote:
 Hi,
 is there a possibility to hide directories from to bee seen from a windows
 box?

 I have a samba share containing several directories. Some of them have
 permissions only for a privileged group of users (group special) and some
 others are allowed for all users (group users) and some for a special
 subgroup of users (group subusers). What I want is that only members of
 group special are able to see the existence of those directories that are
 only accessible for them and also only members of subgroup are able to see
 the existence of their directories. I was used to have this comfort on our
 prevoius novell netware server and I think this is a great feature of
 security. People that don´t see the existence of certain directories or
 files don´t ask for them and don´t think about why they can´t access them.

 Please feel free to ask for more information if you need them to answer my
 question.

 Thanks in advance
 Klemens












 -- 
 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


[Samba] Samba with LDAP Intergration

2007-04-16 Thread James Ray

All,
I am trying to work out if the current setup is possible:
I would like to have Samba running to authenticate shares for /home 
directories running under FC6. All of my users are posixAccount's in an 
LDAP Directory.


I would like to use this information to authenticate these shares but 
without making any changes to the LDAP Directory itself (so including no 
new objects or schema changes).


Is there any way to do this? All my previous attempts have led to the 
Samba server doing a search on objectClass=sambaSamAccount which I of 
course would rather not have. Is it just possible to use the standard 
password attribute for authentication? Does anyone have a sample setup 
of such a situation?


Thanks for any help and let me know if you require any further information.

--
James Ray.  [EMAIL PROTECTED]
Computing Services
Queen Mary, University of London
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Resharing a Remotely Mounted CIFS share

2007-04-16 Thread Clayton

Greetings.

I am attempting to configure a SAMBA server to act as a gateway server 
and am having some issues.  Any assistance or clarification would be 
greatly appreciated.


Our company has need to connect to remote CIFS server, running SAMBA, 
hosted by a remote company.  To do this, I am attempting to mount the 
remote share to a local server and then reshare this back out to our 
user base.


The local server is running Fedora 6 and SAMBA version 3.0.24.  I can 
successfully mount and access the remote share on the local server.  I 
can successfully share another directory on the local server.  I cannot 
access the share that publishes mounted remote directory.  When I 
attempt to access the reshared directory (from a local client to our 
local server), I receive an invalid directory error.  I have checked 
my permissions, etc. and all seem in order.  I can browse the reshared 
directory from a Linux client, but cannot access the files.


This is something I was successful in doing utilizing a remote NFS 
share.  Utilizing a local client directly to the remote share is 
successful, but not a valid solution.


Firstly, is this possible?  If it is, are there any suggestions as to 
what I may be missing or doing wrong?  Any assistance you maybe able to 
give to me is greatly appreciated.  Thank you.


Clayton

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


Re: [Samba] Problems sharing HP Officejet 6210 Linux -- XP

2007-04-16 Thread Dale Schroeder

Larry,

Comparing your smb.conf to mine, for CUPS printing, I don't see the 
global parameters

   printing = cups
   printcap name = cups

Also, I assume you have assigned rights/privileges to add/manage 
printers as described here:


http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/rights.html#id341486

Dale

1arrybarnett wrote:

[cross-posted from www.tek-tips.com]

Dear samba forum,

I've now wasted most of a weekend on this issue, so now it's time to swallow
my pride and ask for help!

Background:

My main home computer died. I can't afford to replace it right now, so I'm
attempting to retread an old AMD PC into a linux print/file server. Clients
are a mixed bag of Windows XP home/professional PCs. The printer is an HP
Officejet 6210 multifunction print/scan/fax. I'm only attempting to get
basic printing working between Windows/Linux.

File shares to the PCs are working great. The printer is working locally via
cups and hplip. The printer is exported via Samba and is visible from the
windows boxes (i.e., you can see it in Network Neighborhood and get the
status of the print queue using the DOS 'net print' command). You can see my
smb.conf file at the bottom of this post.

Problem:

The basic catch-22 with this printer model is that the drivers aren't part
of the standard XP distro. The XP printer installation wizard expects the
drivers to be available from the print server. After searching the net, I
came across this basic installation method:

1. Temporarily plug the printer into the XP PC and install the drivers from
the Printer CD. Then plug the printer back into the linux server.

At this point 2 techniques were suggested, neither of which worked for me:

2a. Go back to the wizard and install the remote printer, using the correct
driver this time. This apparantly succeeds, but printint the test page fails
with an uninformative popup inviting me to go to the troubleshooting wizard
(which is equally unhelpful).

or

2b. Hack the local printer configuration by going to properties--ports and
creating a Local port with the value \\servername\printername, as shared
by Samba. This step fails for me with error 66 The network resource type is
not correct.

So that's it, I'm stuck. I would love to hear from anyone who has worked
through this problem already. Failing that, how can I pick apart this
problem to figure out what's failing?

Note: There was also some discussion in the forums about the print$ share
and loading drivers on the Linux box, but I never figured out if that was
relevant to my use case (Linux server/Windows client).

Many thanks in advance to those who reply.

Cheers,

Larry

My smb.conf

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2007/04/08 18:33:12

[global]
workgroup = HOMENET
server string = Samba Server
log file = /var/log/samba/%m.log
max log size = 50
add machine script = /usr/sbin/useradd -d /dev/null -g samba-clients
-s
/bin/false -M %u
os level = 65
preferred master = Yes
domain master = Yes
dns proxy = No
wins support = Yes
ldap ssl = no
cups options = raw

[homes]
comment = Home Directories
read only = No
create mask = 0664
directory mask = 0775
browseable = No

[printers]
comment = All Printers
path = /usr/spool/samba
printable = Yes
browseable = No

[hp6210]
comment = The HP multifunction printer w. scan and fax capability
path = /usr/spool/samba
printer admin = root, lbarnett
read only = No
guest ok = Yes
min print space = 2000
printable = Yes
cups options =
printer name = hp6210
oplocks = No
share modes = No

[shared]
available = No

[print$]
comment = Samba print driver download area
path = /etc/samba/drivers
admin users = root, lbarnett
guest ok = Yes


  

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


[Samba] BDC problems

2007-04-16 Thread Jason Baker
I have had a samba PDC up and running for about a month now with no 
issues, this weekend I added a BDC and it seems that all my clients are 
now logging into the BDC automatically instead of the PDC. I had to 
mount the homes from the PDC to the BDC so that users can have access to 
their home directories and set the path to the profiles directory on the 
BDC to that of the PDC. I also had to copy all my login scripts from the 
PDC to the BDC so that they will run when users login. Everything seems 
to be working okay now that everything is pointing to the correct 
directories, but it seems like things a backward from what they should 
be. If I login to the domain, my home directory (mapped to drive U: in 
windows XP), now shows up as the Backup Domain Controller, instead of 
the PDC. Should the BDC only be used as a failsafe, when the PDC isn't 
available? I have included my conf files for both PDC and BDC.


Samba version 3.0.23d-30 with LDAP backend.

PDC smb.conf

[global]
unix charset = LOCALE
workgroup = glastendernet
netbios name = aster
server string = Glastender Domain Controller running %v
interfaces = eth1, lo
bind interfaces only = yes
os level = 255
preferred master = yes
local master = yes
domain master = yes
security = user
time server = yes
username map = /etc/samba/smbusers
wins support = yes
encrypt passwords = yes
pam password change = yes   
name resolve order = wins bcast hosts
winbind nested groups = no
passdb backend = ldapsam:ldap://127.0.0.1 ldap://aspen;
ldap passwd sync = Yes
ldap suffix = dc=glastender,dc=com
ldap admin dn = cn=Manager,dc=glastender,dc=com
ldap ssl = no
ldap group suffix = ou=Groups
ldap user suffix = ou=People
ldap machine suffix = ou=People
ldap idmap suffix = ou=Idmap
idmap backend = ldap:ldap://127.0.0.1/
idmap uid = 1-2
idmap gid = 1-2
map acl inherit = yes   
add user script = /etc/smbldap-tools/smbldap-useradd -m %u
#delete user script = /etc/smbldap-tools/smbldap-userdel %u
add machine script = /etc/smbldap-tools/smbldap-useradd -w %u
add group script = /etc/smbldap-tools/smbldap-groupadd -p %g
#delete group script = /etc/smbldap-tools/smbldap-groupdel %g
add user to group script = /etc/smbldap-tools/smbldap-groupmod -m %u 
%g
delete user from group script = /etc/smbldap-tools/smbldap-groupmod -x %u 
%g
set primary group script = /etc/smbldap-tools/smbldap-usermod -g %g 
%u
domain logons = yes
log file = /var/log/samba/log.%m
log level = 1
syslog = 0
max log size = 50
#smb ports = 139 445
smb ports = 139
hosts allow = 127.0.0.1 172.16.0.0/255.255.0.0
# User profiles and home directories
logon drive = U:
logon path = \\%L\profiles\%U
logon script = %U.bat
large readwrite = no
   read raw = no
   write raw = no
   printcap name = /etc/printcap
   load printers = no
   printing =
template shell = /bin/false
winbind use default domain = no

#=Shares===
[homes]
comment = Home Directories
browseable = no
read only = no
write list = %U
create mask = 0600
directory mask = 0700
force user = %U

[profiles]
comment = Profile Share
path = /var/lib/samba/profiles
writeable = yes
browseable = no
profile acls = yes

[netlogon]
path = /var/lib/samba/netlogon
guest ok = yes
locking = no



BDC smb.conf

[global]
   unix charset = LOCALE
workgroup = GLASTENDERNET
socket options = TCP_NODELAY IPTOS_LOWDELAY
server string = Backup Domain Controller
passdb backend = ldapsam:ldap://127.0.0.1 ldap://aster.glastender.com;
   username map = /etc/samba/smbusers
domain master = no
domain logons = yes
os level = 35
   log level = 1
   syslog = 0
   log file = /var/log/samba/%m.log
   max log size = 50
   smb ports = 139
   name resolve order = wins bcast hosts
logon drive = U:
logon path = \\aster\profiles\%U
logon script = %U.bat
   wins server = 172.16.24.7
   ldap suffix = dc=glastender,dc=com
   ldap machine suffix = ou=People
   ldap user suffix = ou=People
   ldap group suffix = ou=Groups
   ldap idmap suffix = ou=Idmap
   ldap admin dn = cn=Manager,dc=glastender,dc=com
   idmap backend = ldap://aster.glastender.com
idmap uid = 1-2
idmap gid = 1-2
winbind trusted domains only = yes
password server = 172.16.24.7
winbind use default domain = no
veto oplock files = /*.mdb/

Re: [Samba] Samba 3.0.24 - group permissions

2007-04-16 Thread Dale Schroeder

Ralf,

One of the biggest changes (3.0.23b) is that if the group or user is a 
domain group or user, it must be prefixed (no longer optional) with the 
domain, e.g.

   valid users = DOMAIN\ralf, @DOMAIN\wireless.

See list of changes (especially 3.0.23 and higher) here:
   http://us4.samba.org/samba/history/samba-3.0.24.html

and if needed:
   
http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/groupmapping.html#id331362


Dale


Ralf K. Wiegand wrote:

Hello - I upgraded from FC4 to FC6.  My samba configuration (samba
3.0.1x) was working just fine until I upgraded to FC6 and Samba 
3.0.24. I had shares who where protected and only some users and 
groups can

access them.  I used valid users = @wireless, where the group wireless
had 10 users.  Before the upgrade this was working just fine.  Now
nobody from @wireless group members can access the share.  For the
moment I got around it by listing every user of the group @wireless in
the valid users = user1 user2 line.  I did some research and found
that samba version 3.0.24 uses something called getgroupmap.  OK here
are the questions:

q1) How to include my existing groups into the new samba setup, without
redoing everything.
q2) My server is a PDC, is it possible for samba to act as a AD 
controller?

q3) What is the correct way to setup a PDC using samba 3.0.24, and have
the group permissions work correctly?
q4) Are there any how to's on working with the new group permissions and
why did it change?
q5) Some of the research was mentioning off group permission problems
and bugs within the new version of samba 3.0.23 and greater.  Is this
also the case with version 3.0.24 and how do I get around it?

Thank You
Sincerely,
Ralf Wiegand

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


[Samba] Samba 2.2.7

2007-04-16 Thread Wagg, Dave
Hi,

I'm new to Samba.  We have version 2.2.7 installed and we have been
experiencing some weird issue.

I would change the Samba share password and the Unix login password to
be the same.

What is really weird is that the old password seems to be still in
effect.  When we use net use, to assign the share to a drive, it
doesn't work with the new password but will still work with the old
password.

Has anyone run into this situation?

Thanks
Dave

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


[Samba] requesting assistance in samba-samba migration

2007-04-16 Thread Peter Matulis
I have inherited a Samba server and would like to migrate the
installation to a new machine.  We are using Samba as a PDC and my
currrent worry is what users will see on their desktop (as well as
other changes?) once they log on to the new server.

As a test I have logged on with my laptop (running WinXP virtually) and
I get a completely blank desktop (with the exception of the trash can).
 Will users lose anything?  I am unclear on this.

The current/old samba config is posted below.  It is using LDAP but the
new config will not.  Thank you very much.

Peter

[global]
   workgroup = exampledomain
   netbios name = examplehost 
   server string = Samba Server %v

   printcap name = cups
   load printers = yes
   printing = cups
   printer admin = @Domain Admins

   log file = /var/log/samba/log.%m
   max log size = 50
   map to guest = bad user
   security = user

   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
   obey pam restrictions = yes

   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   bind interfaces only = yes
   interfaces = 10.9.2.6

os level = 32
domain master = yes 
preferred master = yes
domain logons = yes
logon path =

passdb backend = ldapsam:ldap://10.9.2.2 smbpasswd guest
ldap admin dn = cn=manager,dc=exampledomain,dc=com
ldap suffix = dc=exampledomain,dc=com 
ldap machine suffix = ou=Hosts
ldap user suffix = ou=People
ldap group suffix = ou=Group
ldap idmap suffix = ou=Idmap

wins support = yes
dns proxy = no 

dos charset = 850
unix charset = ISO8859-1


  Be smarter than spam. See how smart SpamGuard is at giving junk email the 
boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca

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


Re: [Samba] Samba 2.2.7

2007-04-16 Thread Mauricio Silveira

Try removing the user and adding again with the new password.

Wagg, Dave wrote:

Hi,

I'm new to Samba.  We have version 2.2.7 installed and we have been
experiencing some weird issue.

I would change the Samba share password and the Unix login password to
be the same.

What is really weird is that the old password seems to be still in
effect.  When we use net use, to assign the share to a drive, it
doesn't work with the new password but will still work with the old
password.

Has anyone run into this situation?

Thanks
Dave

  


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

Re: [Samba] Samba - WinXP: slow transfers, partial solution

2007-04-16 Thread Alexander Tsvyashchenko


Hello Charles,

file transfers from Samba to WinXP SP2 clients: the speed is   
varying, but is about 1-2Mb/s at best.


I'm assuming for the rest of this that you mean MB/sec not Mb/sec when
referencing transfer speeds...


Yes, that is correct, sorry for confusion.

b) Transfering to/from Samba server from Gentoo Linux on the same   
PC where WinXP is installed (so, completely the same hardware and   
connection) is also at normal speed.


So, you are running something in a VM?


No, I just have both WinXP and Gentoo Linux installed on client,  
booted first in WinXP and then in Gentoo and tested for each of them  
transfer speeds

to Samba on server.

c) Transferring to/from WinXP to the server where Samba is   
installed using any other protocol (such as HTTPS or SCP) is also   
at normal speed.


Define 'normal'...


More or equal to 10 MB/s, see trace logs in my original letter, SCP  
speed is listed in the last trace log.


3) If there is any other network activity, transfer speed is   
increased up to normal level: f.e. doing two simulteneous transfers  
 from Samba server to WinXP client gives 5Mb/s at each transfer, as  
 expected.


Again, define 'normal'?
100Mb network connections should give @ 12MB/sec transfer speeds, no?
So 5MB/sec speeds are certainly not 'normal'.


They are, as 5+5=10, transfers are done _simultaneously_. 10MB/s is of  
course less than 12MB/s, but I do not consider 10MB/s speed, including  
protocol

overhead, to be particularly slow.


TCP dumps are fine, but you neglected to provide the most important
thing for initial troubleshooting assistance: where is your config?


As I've experimented a lot with different config options, I do not  
really think that there's still left smth related to speed I missed to  
try, and also it doesn't look like misconfiguration issue, as I've  
used as the basis default smb.conf provided in Gentoo distribution,  
but you're right - I cannot be sure as I'm not really experienced with  
Samba, sorry about that. My config is attached in the end of e-mail.



5) Playing with socket options does not give any results.


Modern linux kernels (2.6+) do *not* need to have these values tuned,
so it is recommended to not set them *at* *all*. Just delete these
entries.


Yes, I read these options should not be needed, but if you read my  
original e-mail till the end, you should have noticed there options  
*did* play role in my setup.


Specifically, using advices from the article   
http://www.dd.iij4u.or.jp/~okuyamak/Documents/tuning.english.html   
about SO_SNDBUF does not improve situation (but read below).


Well, since this article is dated from 2000, I don't think I'd trust it much.


That's correct, but this is the only information I was able to find  
initially that seemd to be more or less relevant to my problem :-(


7) I've tested several WinXP clients with different hardware, all   
with the same results.


What about the NIC on the Samba server? If all clients are affected the
same, then that is the NIC you should focus on (if it is indeed a
hardware issue).


Theorecitally, this *could* be the possibility, but I doubt this is  
hardware issue, as the problem seems to happen in very particular  
environment - if there were problems with NIC, I would expect at least  
some sign of it in other applications, but there is none. I did not  
state it in the original e-mail, but hardware statistic, listed by  
ifconfig for the interface is fine - no collisions, errors, or  
whatever. The NIC on server is on-board Realtek RTL8111B (Gigabit),  
using default Linux Realtek 8169 driver, all options are by default,  
communication with clients happens through BCM5325e switch (100 Mbit),  
which is part of Asus Wl-500g Deluxe router, also no problems noted  
there.



I think you need to go back to square one, and start over, but with up
to date references - like the excellent 'Samba-3 By Example' and/or
'The Official Samba-3 HOWTO and Reference Guide'.


While I can agree that everyhing is possible, I do not think I was  
lucky enough to screw the default config that much ;-) As you can see  
from my config, the main changes there were authentication-related, to  
use LDAP server, and changes related to PDC. I cannot be 100% sure,  
but I do not see the way how use of LDAP server or PDC-related options  
could lead to particularly high number of TCP packets retransmissions  
in communication between client and Samba ...


Here's the config. LDAP user/group managing scripts are not specified  
in config as I've configured all users/groups once and there should be  
no changes in foreseeable future. ***text*** denotes my specific site  
information.


smb.conf=
[global]
workgroup = ***WORKGROUP-NAME***
netbios name = ***SERVER-NAME***
server string =  PDC [on Gentoo :: Samba server %v]

printcap name =
load printers = no
printing =

log file = /var/log/samba/log.%m
max log size = 50
log level = 3

hosts allow = 

Re: [Samba] Samba - WinXP: slow transfers, partial solution

2007-04-16 Thread Alexander Tsvyashchenko



I have slow transfer from my samba serwer, casue my HDD wasn't running
in UDMA mode, only in PIO, beside this a installed CentOS 4 and all 2
disks are running in UDMA mode and there isn't a issue with network
speed between WINXP SP2 and samba serwer.

Maybe check yours HDD too ?


Thanks for the idea, but I'm afraid this is not the case in my  
situation, as HDD is certainly capable of delivering the required speed.


(to be 100% sure I've just done traditional dd if=***big-file***  
of=/dev/null test on server, the same file I used for transfers speeds  
measurements, the speed is 42 MB/s)


Good luck! Alexander



This message was sent using IMP, the Internet Messaging Program.


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


Re: [Samba] requesting assistance in samba-samba migration

2007-04-16 Thread Gary Dale
The user's profile is usually stored locally. If you log on as the same 
user, you should get the same profile. The only time this wouldn't 
happen was if Windows thought you were logging on a new user. It would 
do this if your new server didn't have the same user database.


In other words, it's not sufficient to set up a new Samba server. You 
also need to migrate the user account information. Since you are 
currently using LDAP, that should be simple. Simply point your new Samba 
server to use the same LDAP database that the current Samba server uses.


If you want to migrate to a different datastore (not use LDAP), do that 
in a separate step. However, most people seem to prefer using LDAP. Once 
you've got it working with Samba, why would you want to switch?



Peter Matulis wrote:

I have inherited a Samba server and would like to migrate the
installation to a new machine.  We are using Samba as a PDC and my
currrent worry is what users will see on their desktop (as well as
other changes?) once they log on to the new server.

As a test I have logged on with my laptop (running WinXP virtually) and
I get a completely blank desktop (with the exception of the trash can).
 Will users lose anything?  I am unclear on this.

The current/old samba config is posted below.  It is using LDAP but the
new config will not.  Thank you very much.

Peter

[global]
   workgroup = exampledomain
   netbios name = examplehost 
   server string = Samba Server %v


   printcap name = cups
   load printers = yes
   printing = cups
   printer admin = @Domain Admins

   log file = /var/log/samba/log.%m
   max log size = 50
   map to guest = bad user
   security = user

   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
   obey pam restrictions = yes

   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   bind interfaces only = yes
   interfaces = 10.9.2.6

os level = 32
domain master = yes 
preferred master = yes

domain logons = yes
logon path =

passdb backend = ldapsam:ldap://10.9.2.2 smbpasswd guest
ldap admin dn = cn=manager,dc=exampledomain,dc=com
ldap suffix = dc=exampledomain,dc=com 
ldap machine suffix = ou=Hosts

ldap user suffix = ou=People
ldap group suffix = ou=Group
ldap idmap suffix = ou=Idmap

wins support = yes
dns proxy = no 


dos charset = 850
unix charset = ISO8859-1


  Be smarter than spam. See how smart SpamGuard is at giving junk email the 
boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca

  


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


Re: [Samba] Winbind on a PDC

2007-04-16 Thread Marc Muehlfeld
Hello,

I have two Samba PDCs and each trust each other. Users need to access both
server from each domains. To do this, I need the accounts of both domains
on each PDC.

When I run winbind on a memberserver, I get the users of both domains. But
not on the PDCs. Running winbind there, I see only the users of the
trusted domain and not of it`s own domain. Without winbind, I don`t have
the users of the trusted domain.

I found an earlier posting:

Gerald (Jerry) Carter jerry at samba.org
winbindd on a PDC only alloocates Unix ids for users and groups from
trusted domains.  Not its own domain.

Is this planned in future? Or is there a way to setup this?


Regards
Marc Muehlfeld

-- 
Marc Muehlfeld
Zentrum fuer Humangenetik und Laboratoriumsmedizin Dr. Klein und Dr. Rost
Lochhamer Str. 29 - D-82152 Martinsried
Telefon: +49(0)89/895578-0 - Fax: +49(0)89/895578-78
http://www.medizinische-genetik.de


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


[Samba] Sparc Solaris 10 samba issue -

2007-04-16 Thread Michael Folsom

Folks:

Having an issue with samba 3.0.24 on a Sun Sparc Solaris 10 box
compiled with gcc version 3.4.6.

On these systems I'm constantly getting the following two lines in the
log.smbd file:

[2007/04/16 10:20:19, 0] param/loadparm.c:map_parameter(2690)
 Unknown parameter encountered: client code page
[2007/04/16 10:20:19, 0] param/loadparm.c:lp_do_parameter(3420)
 Ignoring unknown parameter client code page


Any clue why?


Thanks -


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


Re: [Samba] Samba - WinXP: slow transfers, partial solution

2007-04-16 Thread Jancio Wodnik

Alexander Tsvyashchenko napisał(a):



I have slow transfer from my samba serwer, casue my HDD wasn't running
in UDMA mode, only in PIO, beside this a installed CentOS 4 and all 2
disks are running in UDMA mode and there isn't a issue with network
speed between WINXP SP2 and samba serwer.

Maybe check yours HDD too ?


Thanks for the idea, but I'm afraid this is not the case in my 
situation, as HDD is certainly capable of delivering the required speed.


(to be 100% sure I've just done traditional dd if=***big-file*** 
of=/dev/null test on server, the same file I used for transfers speeds 
measurements, the speed is 42 MB/s)


Good luck! Alexander


I have noticed too, that antyvirus software can cause slowdown transfer 
from samba serwer. fer example Panda Atyvirus titanium 2005 - it scans 
everyting, even files from samba share, i'm screew up this software, 
because my samba network was slownd down.


Do You have any antyvirus software, that scan smb shares, when files are 
accessing ?


I.Piasecki



This message was sent using IMP, the Internet Messaging Program.


--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] Performance issue with Vista

2007-04-16 Thread Jeremy Allison
On Thu, Feb 22, 2007 at 03:44:56PM +0200, Mikko Pukki wrote:
 Hi,
 
 I tested a little bit Samba with Windows vista and found serious performance 
 issue regarding reading large files from Samba server. Computers that I 
 tested Samba with were all identical computers equipped with 2,8 GHz Pentium 
 D processors, 1 GB memory and 1 Gbit/s LAN. All computers have only external 
 USB hard drives so that it is easier to change from operating system to 
 another.
 
 First I tested performance with 160 MB tar.gz file and there were no 
 problems. SMBClient from another Linux computer reads and writes about 45 
 MB/s. Performance on Vista Client was higher than this. Write was just a 
 little bit under 50 MB/s and read 48 MB/s. Then I moved to larger files to 
 make sure that I would get results that simulate better the environment, 
 where I need Samba myself (Saving and reading 500-1000 MB images from and to 
 Photoshop)
 . I chose 690MB Knoppix image. Read and write from SMBclient were 27 to 28 
 MB/s at average. Writing from Vista bursts at 50 MB/s and minimum was 28 MB/s 
 leading to over 30 MB/s average. _Then to the problem_: Reading from Samba 
 share gave bursts of 6 MB/s and repeated drops to 0,5 MB/s.
 
 I have same kind of problem also at home (at the moment 100 MB/s network) 
 using same version of samba and nearly identical configuration file. 
 SMBClient reads and writes ok but performance from Windows XP is poor (but in 
 this case both reading and writing)
 
 Has anyone else encountered same behaviour and is there any workarounds for 
 this. Linux systems that I use are Debian Sarge 3.1r5 and Samba version is 
 3.0.14a-3s.

We've done some work on this for 3.0.25 - check out the new
vfs_readahead module.

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


Re: [Samba] Re: Symlinks deletion behaviour

2007-04-16 Thread Jeremy Allison
On Mon, Mar 19, 2007 at 02:36:23PM +0300, Alexander wrote:
 Hi all,
 
 Further investigation with strace shows that Samba tries to use rmdir() 
 syscall to delete the link which naturally fails with Not a directory as it 
 should according to man.
 
 However, looking at usual rm -r behaviour shows that it uses unlink(). 
 Samba does not (while there's some  SMB_VFS_UNLINK) in rmdir_internals. Is 
 there any bug or a feature which I don't realize?
 

This should be fixed for 3.0.25rc2, due out this week.
Please re-test and let me know.

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


[Samba] winxp samba problem

2007-04-16 Thread Frank Muller

Greetings,

I have a newly loaded WinXP/SP2 laptop connecting to a FC6 samba share.  The
first 2-3 accesses to the share work fine but then it goes south.

The access times are extremely long.  I did a tcpdump on the FC6 box and see
constant samba traffic between the laptop
and the server when there is no actively on the laptop.  I have a different
laptop running WinXP which doesn't behave
in the same manner.  After a 2-3 minutes, the network traffic stops and I
can resume using the laptop.  During this period, the
laptop appears to be hung.  Connection between the two is via wifi.  I don't
see any other problems while using the network.

Both boxes are updated to the latest and greatest.  Samba is
samba-3.0.24-4.fc6, samba-client-3.0.24-4.fc6, samba-common-3.0.24-4.fc6

Extensive googling has found nothing helpfully.

Below is my smb.conf

[global]

oplocks = no
  workgroup = MONKEY
  server string = Data Server
  security = user
  hosts allow = 192.168.1. 127.
  load printers = yes
cups options = raw
  log file = /var/log/samba/%m.log
  max log size = 100
  dns proxy = no

[printers]
  comment = All Printers
  path = /usr/spool/samba
  browseable = no
  guest ok = no
  writable = no
  printable = yes
[data]
  comment = Data share
  path = /data1/smbshare
  valid users = smbuser
  public = no
  writable = yes
  printable = no
[video]
  comment = Video share
  path = /data2/video
  valid users = smbuser
  public = no
  writable = yes
  printable = no

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


Re: [Samba] requesting assistance in samba-samba migration

2007-04-16 Thread Peter Matulis

--- Gary Dale [EMAIL PROTECTED] wrote:

 The user's profile is usually stored locally. If you log on as the
 same 
 user, you should get the same profile. The only time this wouldn't 
 happen was if Windows thought you were logging on a new user. It
 would 
 do this if your new server didn't have the same user database.


But if the profile is stored locally why would a user get a different
desktop?


 In other words, it's not sufficient to set up a new Samba server. You
 
 also need to migrate the user account information. Since you are 
 currently using LDAP, that should be simple. Simply point your new
 Samba 
 server to use the same LDAP database that the current Samba server
 uses.
 
 If you want to migrate to a different datastore (not use LDAP), do
 that 
 in a separate step. However, most people seem to prefer using LDAP.
 Once 
 you've got it working with Samba, why would you want to switch?


I want to get rid of the current server completely and LDAP is running
on it locally.  I also find LDAP ill-suited for this environment. 
There are only about 20 users being managed.

What is the separate step you mention?  Can I export the data out of
LDAP?

Thanks for your help.
 


 
 Peter Matulis wrote:
  I have inherited a Samba server and would like to migrate the
  installation to a new machine.  We are using Samba as a PDC and my
  currrent worry is what users will see on their desktop (as well as
  other changes?) once they log on to the new server.
 
  As a test I have logged on with my laptop (running WinXP virtually)
 and
  I get a completely blank desktop (with the exception of the trash
 can).
   Will users lose anything?  I am unclear on this.
 
  The current/old samba config is posted below.  It is using LDAP but
 the
  new config will not.  Thank you very much.
 
  Peter
 
  [global]
 workgroup = exampledomain
 netbios name = examplehost 
 server string = Samba Server %v
 
 printcap name = cups
 load printers = yes
 printing = cups
 printer admin = @Domain Admins
 
 log file = /var/log/samba/log.%m
 max log size = 50
 map to guest = bad user
 security = user
 
 encrypt passwords = yes
 smb passwd file = /etc/samba/smbpasswd
 obey pam restrictions = yes
 
 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
 bind interfaces only = yes
 interfaces = 10.9.2.6
 
  os level = 32
  domain master = yes 
  preferred master = yes
  domain logons = yes
  logon path =
 
  passdb backend = ldapsam:ldap://10.9.2.2 smbpasswd guest
  ldap admin dn = cn=manager,dc=exampledomain,dc=com
  ldap suffix = dc=exampledomain,dc=com 
  ldap machine suffix = ou=Hosts
  ldap user suffix = ou=People
  ldap group suffix = ou=Group
  ldap idmap suffix = ou=Idmap
 
  wins support = yes
  dns proxy = no 
 
  dos charset = 850
  unix charset = ISO8859-1
 
 
Be smarter than spam. See how smart SpamGuard is at giving
 junk email the boot with the All-new Yahoo! Mail at
 http://mrd.mail.yahoo.com/try_beta?.intl=ca
 

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



  Be smarter than spam. See how smart SpamGuard is at giving junk email the 
boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca

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


[Fwd: Re: [Samba] Drag and Drop and Crash]

2007-04-16 Thread Jim Summers

Hello List,

Please read Tom's email below.  Has some interesting findings.  The affected 
machine I dealt with also had symantec on it.  Since the repair though there 
hasn't been a problem.  The user even re-applied the patches.  This is to weird.


HTH


 Original Message 
Subject:Re: [Samba] Drag and Drop and Crash
Date:   Mon, 16 Apr 2007 18:12:47 -0700
From:   Thomas McNeely [EMAIL PROTECTED]
To: [EMAIL PROTECTED]



Jim, sorry to keep doing this to you but the Samba list rejected me
again. Please share this with the list.

Thanks!

Tom

-

Here's what we've discovered about this problem, including much new
information:

(Most of the tedious version details are deferred to the end of this
message for readability.)

(Dates are expressed American-style as MM/DD/YY.)


On Thursday April 5th our users started experiencing abrupt reboots
(without proper shutdown) when they copied, saved, or renamed files on
our Samba 3.0 shares. This Samba server has run flawlessly for years in
essentially the same configuration as now, and exactly the same
configuration since Christmas. The problem does not occur when writing
to Microsoft or Novell shares.

After trying various experiments on the affected workstations, we
determined that the problem always and only occurs on workstations which
are running both the Novell Client and Symantec AntiVirus. We can only
induce the problem by installing both, and removing either one always
cures the problem.

Regarding Symantec, we have determined that it was a virus definition
file from soon after 3/27/07 (probably one from the week of 4/2/07) that
triggers the problem. The current program version and scan engine
version with virus definition files earlier than 3/27/07 do not trigger
the problem.

Regarding the Novell Client, we have found that only a default
installation is needed to replicate the problem -- no need for Zenworks
client, or even to log in. Also, moving the Novell Client to the bottom
of the provider order list does not fix the problem.

Although the timing of the problem's first appearance corresponds
suspiciously with the release of Microsoft's patch KB925902, we have
eliminated this patch as a factor.

We have another Samba server, version 2.2 running on Solaris, whose
users do not experience the problem. So we tried setting up another
Samba 2.2 machine to test with -- in every way similar to our Samba 3.0
machine except for the Samba version. We cannot replicate the problem
when writing to a Samba 2.2 share, regardless of workstation configuration.

Although there are a few contributing factors coming together to create
this problem, we believe that the most likely and appropriate solution
would come from Symantec (e.g. in the form of a fix to their virus
definition files). However, fixes might also be possible in the Novell
Client or Samba.

Hope that helps someone and/or someone can help me!

Tom McNeely

Western Washington University Libraries


Appendix: The software versions tested are:

* Windows XP with Service Pack 2 (no

  other versions tested)

* Novell Client version 4.91.3.20061109,

  default installation, no Zenworks client

* Symantec AntiVirus: program version

  10.1.5.5000, scan engine version

  71.2.0.12, and several virus definitions

  between 4/9/07 (and surely going back

  into the week of 4/2/07) through at least

  4/16/07 rev 17. Virus definitions earlier

  than 3/27/07 (and probably earlier than

  the week of 4/2/07) do not trigger the

  problem.

* Samba version 2.2.5 (installation method

  and options unknown, running on Solaris)

  -- NO problem

* Samba version 2.2.12 (default installation

  from samba.org source code, installed on

  Slackware 10.2) -- NO problem

* Samba versions 3.0.23d and 3.0.24 (default

  installation from samba.org source code,

  installed on Slackware 10.2 and 9.1

  respectively) -- DO have problem




--
Jim Summers
School of Computer Science-University of Oklahoma
-
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Rev 111: this is a demonstration of an idea for handling locks in ctdb. in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 111
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Mon 2007-04-16 16:01:37 +1000
message:
  this is a demonstration of an idea for handling locks in ctdb.
  
  The problem we have is this:
  
- we want the client smbd processes to be able to 'shortcut' access
  to the ltdb, by directly accessing the ltdb, and if the header of
  the record shows we are the dmaster then process immediately, with
  no overhead of talking across the unix domain socket
  
- a client doing a shortcut will use tdb_chainlock() to lock the
  record while processing
  
- we want the main ctdb daemon to be able to set locks on the
  record, and when those locks collide with a 'shortcut' fcntl lock,
  we want the ctdb daemon to keep processing other operations
  
- we don't want to have to send a message from a smbd client to the
  ctdbd each time it releases a lock
  
  The solution is shown in this example. Note that the expensive fork()
  and blocking lock is only paid in case of contention, so in the median
  case I think this is zero cost.
added:
  tests/lockwait.c   lockwait.c-20070416055753-3ztnb4cxqgamfudx-1
modified:
  Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1
  common/util.c  util.c-20061117234101-o3qt14umlg9en8z0-20
  config.mk  config.mk-20070416041303-xql6zaaq90w8kovl-1
  include/includes.h includes.h-20061117234101-o3qt14umlg9en8z0-17

Diff too large for email (315, the limit is 200).


svn commit: samba r22239 - in branches/SAMBA_4_0/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 06:08:06 + (Mon, 16 Apr 2007)
New Revision: 22239

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

Log:
use strlcpy instead of strcpy to make the IBM checker happy

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-04-16 
05:48:11 UTC (rev 22238)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-04-16 
06:08:06 UTC (rev 22239)
@@ -117,7 +117,7 @@
 {
char tmp[10];
printf(test: strlcat\n);
-   strcpy(tmp, );
+   strlcpy(tmp, , sizeof(tmp));
if (strlcat(tmp, bla, 3) != 3) {
printf(failure: strlcat [\ninvalid return code\n]\n);
return false;
@@ -128,7 +128,7 @@
return false;
}
 
-   strcpy(tmp, da);
+   strlcpy(tmp, da, sizeof(tmp));
if (strlcat(tmp, me, 4) != 4) {
printf(failure: strlcat [\nexpected \dam\, got \%s\\n]\n,
   tmp);



svn commit: samba r22240 - in branches/SAMBA_3_0/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 06:08:43 + (Mon, 16 Apr 2007)
New Revision: 22240

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

Log:
merge from samba4:

use strlcpy instead of strcpy to make the IBM checker happy

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-04-16 
06:08:06 UTC (rev 22239)
+++ branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-04-16 
06:08:43 UTC (rev 22240)
@@ -117,7 +117,7 @@
 {
char tmp[10];
printf(test: strlcat\n);
-   strcpy(tmp, );
+   strlcpy(tmp, , sizeof(tmp));
if (strlcat(tmp, bla, 3) != 3) {
printf(failure: strlcat [\ninvalid return code\n]\n);
return false;
@@ -128,7 +128,7 @@
return false;
}
 
-   strcpy(tmp, da);
+   strlcpy(tmp, da, sizeof(tmp));
if (strlcat(tmp, me, 4) != 4) {
printf(failure: strlcat [\nexpected \dam\, got \%s\\n]\n,
   tmp);



svn commit: samba r22241 - in branches/SAMBA_3_0_25/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 06:11:36 + (Mon, 16 Apr 2007)
New Revision: 22241

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

Log:
merge from samba4:

use strlcpy instead of strcpy to make the IBM checker happy

metze
Modified:
   branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c   2007-04-16 
06:08:43 UTC (rev 22240)
+++ branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c   2007-04-16 
06:11:36 UTC (rev 22241)
@@ -117,7 +117,7 @@
 {
char tmp[10];
printf(test: strlcat\n);
-   strcpy(tmp, );
+   strlcpy(tmp, , sizeof(tmp));
if (strlcat(tmp, bla, 3) != 3) {
printf(failure: strlcat [\ninvalid return code\n]\n);
return false;
@@ -128,7 +128,7 @@
return false;
}
 
-   strcpy(tmp, da);
+   strlcpy(tmp, da, sizeof(tmp));
if (strlcat(tmp, me, 4) != 4) {
printf(failure: strlcat [\nexpected \dam\, got \%s\\n]\n,
   tmp);



svn commit: samba r22242 - in branches/SAMBA_4_0/source/smbd: .

2007-04-16 Thread tridge
Author: tridge
Date: 2007-04-16 06:23:42 + (Mon, 16 Apr 2007)
New Revision: 22242

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

Log:

ctdb init now takes a process model

Modified:
   branches/SAMBA_4_0/source/smbd/server.c


Changeset:
Modified: branches/SAMBA_4_0/source/smbd/server.c
===
--- branches/SAMBA_4_0/source/smbd/server.c 2007-04-16 06:11:36 UTC (rev 
22241)
+++ branches/SAMBA_4_0/source/smbd/server.c 2007-04-16 06:23:42 UTC (rev 
22242)
@@ -286,7 +286,7 @@
event_ctx = event_context_init(NULL);
 
/* initialise clustering if needed */
-   cluster_ctdb_init(event_ctx);
+   cluster_ctdb_init(event_ctx, model);
 
if (interactive) {
/* catch EOF on stdin */



svn commit: samba r22243 - in branches/SAMBA_4_0/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 06:29:45 + (Mon, 16 Apr 2007)
New Revision: 22243

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

Log:
remove useless printf's

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-04-16 
06:23:42 UTC (rev 22242)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-04-16 
06:29:45 UTC (rev 22243)
@@ -423,9 +423,7 @@
 
 static int test_strerror(void)
 {
-   printf(test: strerror\n);
/* FIXME */
-   printf(failure: sterror\n);
return true;
 }
 



svn commit: samba r22244 - in branches/SAMBA_3_0/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 06:30:08 + (Mon, 16 Apr 2007)
New Revision: 22244

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

Log:
merge from samba4:

remove useless printf's

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-04-16 
06:29:45 UTC (rev 22243)
+++ branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-04-16 
06:30:08 UTC (rev 22244)
@@ -423,9 +423,7 @@
 
 static int test_strerror(void)
 {
-   printf(test: strerror\n);
/* FIXME */
-   printf(failure: sterror\n);
return true;
 }
 



svn commit: samba r22245 - in branches/SAMBA_3_0_25/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 06:30:20 + (Mon, 16 Apr 2007)
New Revision: 22245

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

Log:
merge from samba4:

remove useless printf's

metze
Modified:
   branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c   2007-04-16 
06:30:08 UTC (rev 22244)
+++ branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c   2007-04-16 
06:30:20 UTC (rev 22245)
@@ -423,9 +423,7 @@
 
 static int test_strerror(void)
 {
-   printf(test: strerror\n);
/* FIXME */
-   printf(failure: sterror\n);
return true;
 }
 



svn commit: samba r22246 - in branches/SAMBA_4_0/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 07:40:32 + (Mon, 16 Apr 2007)
New Revision: 22246

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

Log:
only test strtoll once

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-04-16 
06:30:20 UTC (rev 22245)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-04-16 
07:40:32 UTC (rev 22246)
@@ -651,7 +651,6 @@
ret = test_getpass();
ret = test_inet_ntoa();
ret = test_strtoll();
-   ret = test_strtoll();
ret = test_strtoull();
ret = test_va_copy();
ret = test_FUNCTION();



svn commit: samba r22247 - in branches/SAMBA_3_0/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 07:41:01 + (Mon, 16 Apr 2007)
New Revision: 22247

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

Log:
merge from samba4:

only test strtoll once

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-04-16 
07:40:32 UTC (rev 22246)
+++ branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-04-16 
07:41:01 UTC (rev 22247)
@@ -651,7 +651,6 @@
ret = test_getpass();
ret = test_inet_ntoa();
ret = test_strtoll();
-   ret = test_strtoll();
ret = test_strtoull();
ret = test_va_copy();
ret = test_FUNCTION();



svn commit: samba r22248 - in branches/SAMBA_3_0_25/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 07:41:12 + (Mon, 16 Apr 2007)
New Revision: 22248

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

Log:
merge from samba4:

only test strtoll once

metze
Modified:
   branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c   2007-04-16 
07:41:01 UTC (rev 22247)
+++ branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c   2007-04-16 
07:41:12 UTC (rev 22248)
@@ -651,7 +651,6 @@
ret = test_getpass();
ret = test_inet_ntoa();
ret = test_strtoll();
-   ret = test_strtoll();
ret = test_strtoull();
ret = test_va_copy();
ret = test_FUNCTION();



svn commit: samba-docs r1098 - in trunk: manpages-3 smbdotconf/base smbdotconf/ldap smbdotconf/locking smbdotconf/logon smbdotconf/misc smbdotconf/security smbdotconf/winbind

2007-04-16 Thread kseeger
Author: kseeger
Date: 2007-04-16 07:47:27 + (Mon, 16 Apr 2007)
New Revision: 1098

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

Log:
Add some missing whitespaces.
Modified:
   trunk/manpages-3/smb.conf.5.xml
   trunk/smbdotconf/base/bindinterfacesonly.xml
   trunk/smbdotconf/ldap/ldapssl.xml
   trunk/smbdotconf/ldap/ldapsuffix.xml
   trunk/smbdotconf/locking/sharemodes.xml
   trunk/smbdotconf/locking/strictlocking.xml
   trunk/smbdotconf/logon/addmachinescript.xml
   trunk/smbdotconf/logon/adduserscript.xml
   trunk/smbdotconf/logon/enableprivileges.xml
   trunk/smbdotconf/logon/logonhome.xml
   trunk/smbdotconf/logon/shutdownscript.xml
   trunk/smbdotconf/misc/utmp.xml
   trunk/smbdotconf/security/aclgroupcontrol.xml
   trunk/smbdotconf/security/allowtrusteddomains.xml
   trunk/smbdotconf/winbind/winbindenumusers.xml
   trunk/smbdotconf/winbind/winbindusedefaultdomain.xml


Changeset:
Modified: trunk/manpages-3/smb.conf.5.xml
===
--- trunk/manpages-3/smb.conf.5.xml 2007-04-12 11:20:15 UTC (rev 1097)
+++ trunk/manpages-3/smb.conf.5.xml 2007-04-16 07:47:27 UTC (rev 1098)
@@ -18,8 +18,8 @@
para
The filename moreinfo=nonesmb.conf/filename file is a 
configuration  file for the Samba suite. filename
moreinfo=nonesmb.conf/filename contains  runtime configuration 
information for the Samba programs. The
-   filename moreinfo=nonesmb.conf/filename file is designed to be 
configured and  administered by the
-   citerefentryrefentrytitleswat/refentrytitle 
manvolnum8/manvolnum/citerefentry program. The
+filename moreinfo=nonesmb.conf/filename file is designed to be 
configured and administered by the
+citerefentryrefentrytitleswat/refentrytitle 
manvolnum8/manvolnum/citerefentry program. The
complete description of the file format and possible parameters held 
within are here for reference purposes.
/para 
 /refsect1
@@ -77,7 +77,7 @@
 
para
There are three special sections, [global], [homes] and [printers], 
which are described under
-   emphasisspecial sections/emphasis. The following notes apply to 
ordinary section descriptions.
+emphasisspecial sections/emphasis. The following notes apply to 
ordinary section descriptions.
/para
 
para

Modified: trunk/smbdotconf/base/bindinterfacesonly.xml
===
--- trunk/smbdotconf/base/bindinterfacesonly.xml2007-04-12 11:20:15 UTC 
(rev 1097)
+++ trunk/smbdotconf/base/bindinterfacesonly.xml2007-04-16 07:47:27 UTC 
(rev 1098)
@@ -16,13 +16,13 @@
also binds to the quot;all addressesquot; interface (0.0.0.0) on 
ports 137 and 138 for the purposes of
reading broadcast messages.  If this option is not set then command 
moreinfo=nonenmbd/command will
service name requests on all of these sockets. If smbconfoption 
name=bind interfaces only/ is set then
-   command moreinfo=nonenmbd/command will check the source address 
of any packets coming in on the
+command moreinfo=nonenmbd/command will check the source address 
of any packets coming in on the
broadcast sockets and discard any that don't match the broadcast 
addresses of the interfaces in the
smbconfoption name=interfaces/ parameter list.  As unicast packets 
are received on the other sockets it
allows command moreinfo=nonenmbd/command to refuse to serve names 
to machines that send packets that
arrive through any interfaces not listed in the smbconfoption 
name=interfaces/ list.  IP Source address
spoofing does defeat this simple check, however, so it must not be used 
seriously as a security feature for
-   command moreinfo=nonenmbd/command.
+command moreinfo=nonenmbd/command.
/para
 
para
@@ -36,17 +36,17 @@
 
para
If smbconfoption name=bind interfaces only/ is set then unless the 
network address
-   emphasis127.0.0.1/emphasis is added to the smbconfoption 
name=interfaces/ parameter list
-   citerefentryrefentrytitlesmbpasswd/refentrytitle 
manvolnum8/manvolnum/citerefentry and
-   citerefentryrefentrytitleswat/refentrytitle 
manvolnum8/manvolnum/citerefentry may not work as
+emphasis127.0.0.1/emphasis is added to the smbconfoption 
name=interfaces/ parameter list
+citerefentryrefentrytitlesmbpasswd/refentrytitle 
manvolnum8/manvolnum/citerefentry and
+citerefentryrefentrytitleswat/refentrytitle 
manvolnum8/manvolnum/citerefentry may not work as
expected due to the reasons covered below.
/para
 
para
To change a users SMB password, the command 
moreinfo=nonesmbpasswd/command by default connects to the
-   emphasislocalhost - 127.0.0.1/emphasis address as an SMB client to 
issue the password change request. If
+

svn commit: samba r22254 - in branches/SAMBA_3_0/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 09:44:00 + (Mon, 16 Apr 2007)
New Revision: 22254

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

Log:
merge from samba4:

- make the strtoll tests more verbose
- add initial strtoull tests

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-04-16 
09:43:48 UTC (rev 22253)
+++ branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-04-16 
09:44:00 UTC (rev 22254)
@@ -478,26 +478,75 @@
 
 static int test_strtoll(void)
 {
+   int64_t v;
+
printf(test: strtoll\n);
-   if (strtoll(15, NULL, 10) != 15) {
-   printf(failure: strtoll [\nstrtoll failed\n]\n);
+
+   v = strtoll(15, NULL, 10);
+   if (v != 15) {
+   printf(failure: strtoll [\n
+  strtoll failed: %lld != 15\n
+  ]\n,
+  v);
return false;
}
-   if (strtoll(10, NULL, 16) != 16) {
-   printf(failure: strtoll [\nstrtoll hex failed\n]\n);
+
+   v = strtoll(10, NULL, 16);
+   if (v != 16) {
+   printf(failure: strtoll [\n
+  strtoll hex failed: %lld != 16\n
+  ]\n,
+  v);
return false;
}
-   if (strtoll(11, NULL, 2) != 3) {
-   printf(failure: strtoll [\nstrtoll binary failed\n]\n);
+
+   v = strtoll(11, NULL, 2);
+   if (v != 3) {
+   printf(failure: strtoll [\n
+  strtoll binary failed: %lld != 3\n
+  ]\n,
+  v);
return false;
}
+
printf(success: strtoll\n);
return true;
 }
 
 static int test_strtoull(void)
 {
-   /* FIXME */
+   uint64_t v;
+
+   printf(test: strtoull\n);
+
+   v = strtoull(15, NULL, 10);
+   if (v != 15) {
+   printf(failure: strtoull [\n
+  strtoull failed: %llu != 15\n
+  ]\n,
+  v);
+   return false;
+   }
+
+   v = strtoull(10, NULL, 16);
+   if (v != 16) {
+   printf(failure: strtoull [\n
+  strtoull hex failed: %llu != 16\n
+  ]\n,
+  v);
+   return false;
+   }
+
+   v = strtoull(11, NULL, 2);
+   if (v != 3) {
+   printf(failure: strtoull [\n
+  strtoull binary failed: %llu != 3\n
+  ]\n,
+  v);
+   return false;
+   }
+
+   printf(success: strtuoll\n);
return true;
 }
 



svn commit: samba-web r1100 - in trunk/team: .

2007-04-16 Thread kai
Author: kai
Date: 2007-04-16 10:35:51 + (Mon, 16 Apr 2007)
New Revision: 1100

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

Log:
Adding myself to the team list.

Modified:
   trunk/team/index.html


Changeset:
Modified: trunk/team/index.html
===
--- trunk/team/index.html   2007-04-09 19:53:29 UTC (rev 1099)
+++ trunk/team/index.html   2007-04-16 10:35:51 UTC (rev 1100)
@@ -40,6 +40,7 @@
 ul
 lia href=http://samba.org/~jra;Jeremy Allison/a/li
 lia href=http://samba.org/~abartlet/;Andrew Bartlett/a/li
+lia href=mailto:[EMAIL PROTECTED]Kai Blin/a/li
 lia href=mailto:[EMAIL PROTECTED]Alexander Bokovoy/a/li
 lia href=http://www.plainjoe.org/;Gerald Carter/a/li
 



svn commit: samba r22260 - in branches/SAMBA_4_0: . source/script/tests

2007-04-16 Thread jelmer
Author: jelmer
Date: 2007-04-16 10:44:26 + (Mon, 16 Apr 2007)
New Revision: 22260

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

Log:
Use single script for creating Samba 4 test environments. Add first test 
that uses the member environment.

Added:
   branches/SAMBA_4_0/source/script/tests/mksamba4server.sh
Removed:
   branches/SAMBA_4_0/source/script/tests/mktestdc.sh
   branches/SAMBA_4_0/source/script/tests/mktestmember.sh
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/script/tests/Samba4.pm
   branches/SAMBA_4_0/source/script/tests/test_member.sh
   branches/SAMBA_4_0/source/script/tests/tests_all.sh


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


Rev 11874: Use single script for creating Samba 4 test environments. Add first test in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-04-16 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11874
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Mon 2007-04-16 13:42:14 +0200
message:
  Use single script for creating Samba 4 test environments. Add first test 
  that uses the member environment.
removed:
  source/script/tests/mktestmember.sh svn-v2:[EMAIL PROTECTED]
renamed:
  source/script/tests/mktestdc.sh = source/script/tests/mksamba4server.sh 
svn-v2:[EMAIL PROTECTED]
modified:
  source/script/tests/Samba4.pm  svn-v2:[EMAIL PROTECTED]
  source/script/tests/test_member.sh svn-v2:[EMAIL PROTECTED]
  source/script/tests/tests_all.sh svn-v2:[EMAIL PROTECTED]
  source/script/tests/mksamba4server.sh svn-v2:[EMAIL PROTECTED]
=== removed file 'source/script/tests/mktestmember.sh'
--- a/source/script/tests/mktestmember.sh   2007-04-12 08:33:35 +
+++ b/source/script/tests/mktestmember.sh   1970-01-01 00:00:00 +
@@ -1,85 +0,0 @@
-#!/bin/sh
-
-if [ $# -lt 4 ]
-then
-   echo $0 PREFIX DOMAIN USERNAME PASSWORD
-   exit 1
-fi
-
-PREFIX=$1
-DOMAIN=$2
-DC_USERNAME=$3
-DC_PASSWORD=$4
-shift 4
-USERNAME=administrator
-PASSWORD=humbolt
-
-SRCDIR=`pwd`
-oldpwd=`dirname $0`/../..
-mkdir -p $PREFIX 
-cd $PREFIX
-PREFIX_ABS=`pwd`
-ETCDIR=$PREFIX_ABS/etc
-NCALRPCDIR=$PREFIX_ABS/ncalrpc
-PIDDIR=$PREFIX_ABS/pid
-PRIVATEDIR=$PREFIX_ABS/private
-LOCKDIR=$PREFIX_ABS/lockdir
-WINBINDD_SOCKET_DIR=$PREFIX_ABS/winbind_socket
-CONFFILE=$ETCDIR/smb.conf
-TMPDIR=$PREFIX_ABS/tmp
-NETBIOSNAME=localmember
-SMBD_LOGLEVEL=1
-
-mkdir -p $PRIVATEDIR $ETCDIR $PIDDIR $NCALRPCDIR $LOCKDIR $TMPDIR
-
-cat $CONFFILEEOF
-[global]
-   netbios name = $NETBIOSNAME
-   workgroup = $DOMAIN
-   private dir = $PRIVATEDIR
-   pid directory = $PIDDIR
-   ncalrpc dir = $NCALRPCDIR
-   lock dir = $LOCKDIR
-   setup directory = $SRCDIR/setup
-   js include = $SRCDIR/scripting/libjs
-   winbindd socket directory = $WINBINDD_SOCKET_DIR
-   name resolve order = bcast
-   interfaces = 127.0.0.5/8
-   panic action = $SRCDIR/script/gdb_backtrace %PID% %PROG%
-   wins support = yes
-   server role = domain member
-   max xmit = 32K
-   server max protocol = SMB2
-   notify:inotify = false
-   ldb:nosync = true
-   system:anonymous = true
-#We don't want to pass our self-tests if the PAC code is wrong
-   gensec:require_pac = true
-   log level = $SMBD_LOGLEVEL
-EOF
-
-PROVISION_OPTIONS=$CONFIGURATION --host-name=$NETBIOSNAME --host-ip=127.0.0.1
-PROVISION_OPTIONS=$PROVISION_OPTIONS --quiet --domain $DOMAIN --realm $REALM
-PROVISION_OPTIONS=$PROVISION_OPTIONS --adminpass $PASSWORD --root=$ROOT
-PROVISION_OPTIONS=$PROVISION_OPTIONS --simple-bind-dn=cn=Manager,$BASEDN 
--password=$PASSWORD --root=$ROOT
-$srcdir/bin/smbscript $srcdir/setup/provision $PROVISION_OPTIONS 2
-
-$srcdir/bin/net join member $DOMAIN -U$DC_USERNAME%$DC_PASSWORD 2 || {
-   echo Join failed
-   exit $?
-}
-
-echo PREFIX_ABS=$PREFIX_ABS
-echo PIDDIR=$PIDDIR
-echo SERVER=$SERVER
-echo NETBIOSNAME=$NETBIOSNAME
-echo DOMAIN=$DOMAIN
-echo USERNAME=$USERNAME
-echo REALM=$REALM
-echo PASSWORD=$PASSWORD
-echo SRCDIR=$SRCDIR
-echo PREFIX=$PREFIX
-echo CONFFILE=$CONFFILE
-echo WINBINDD_SOCKET_DIR=$WINBINDD_SOCKET_DIR
-echo NCALRPCDIR=$NCALRPCDIR
-echo CONFIGURATION=$CONFIGURATION

=== renamed file 'source/script/tests/mktestdc.sh' = 
'source/script/tests/mksamba4server.sh'
--- a/source/script/tests/mktestdc.sh   2007-04-12 10:25:01 +
+++ b/source/script/tests/mksamba4server.sh 2007-04-16 11:42:14 +
@@ -17,7 +17,10 @@
SMBD_LOGLEVEL=1
 fi
 
-SERVER_ROLE=domain controller
+if test -z $SERVER_ROLE; then
+   SERVER_ROLE=domain controller
+fi
+
 DOMAIN=SAMBADOMAIN
 USERNAME=administrator
 REALM=SAMBA.EXAMPLE.COM

=== modified file 'source/script/tests/Samba4.pm'
--- a/source/script/tests/Samba4.pm 2007-04-12 12:45:41 +
+++ b/source/script/tests/Samba4.pm 2007-04-16 11:42:14 +
@@ -140,15 +140,18 @@
my ($self, $prefix, $dcvars) = @_;
my %ret = ();
print PROVISIONING...;
-   open(IN, $RealBin/mktestmember.sh $prefix $dcvars-{DOMAIN} 
$dcvars-{USERNAME} $dcvars-{PASSWORD}|) or die(Unable to setup);
+   open(IN, SERVER_ROLE=\member server\ $RealBin/mksamba4server.sh 
$prefix|) or die(Unable to setup);
while (IN) {
die (Error parsing `$_') unless (/^([A-Z0-9a-z_]+)=(.*)$/);
$ret{$1} = $2;
}
close(IN);
 
+   system($self-{bindir}/net join $ret{CONFIGURATION} $dcvars-{DOMAIN} 
member -U$dcvars-{USERNAME}\%$dcvars-{PASSWORD}) or die(Join failed);
+
$ret{SMBD_TEST_FIFO} = $prefix/smbd_test.fifo;
$ret{SMBD_TEST_LOG} = $prefix/smbd_test.log;
+   print $ret{DOMAIN}\n;
return \%ret;
 }
 
@@ -157,7 +160,7 @@
my ($self, $prefix) = @_;
 

svn commit: samba r22261 - in branches/SAMBA_4_0/source/lib/socket_wrapper: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 10:49:11 + (Mon, 16 Apr 2007)
New Revision: 22261

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

Log:
ignore generated file

metze
Modified:
   branches/SAMBA_4_0/source/lib/socket_wrapper/


Changeset:

Property changes on: branches/SAMBA_4_0/source/lib/socket_wrapper
___
Name: svn:ignore
   - *.d
*.pc
   + *.d
*.pc
*.ho




svn commit: samba-web r1101 - in trunk/team: .

2007-04-16 Thread obnox
Author: obnox
Date: 2007-04-16 11:28:58 + (Mon, 16 Apr 2007)
New Revision: 1101

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

Log:
add myself to the team list
Modified:
   trunk/team/index.html


Changeset:
Modified: trunk/team/index.html
===
--- trunk/team/index.html   2007-04-16 10:35:51 UTC (rev 1100)
+++ trunk/team/index.html   2007-04-16 11:28:58 UTC (rev 1101)
@@ -38,6 +38,7 @@
 tr
 td valign=top
 ul
+lia href=mailto:[EMAIL PROTECTED]Michael Adam/a/li
 lia href=http://samba.org/~jra;Jeremy Allison/a/li
 lia href=http://samba.org/~abartlet/;Andrew Bartlett/a/li
 lia href=mailto:[EMAIL PROTECTED]Kai Blin/a/li



svn commit: samba r22263 - in branches/SAMBA_4_0/source/lib/replace: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 12:43:18 + (Mon, 16 Apr 2007)
New Revision: 22263

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

Log:
use AC_HAVE_DECL() because AC_CHECK_DECLS() defines to 1 or 0
and #ifndef doesn't work.

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/libreplace.m4
   branches/SAMBA_4_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-04-16 12:00:08 UTC 
(rev 22262)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-04-16 12:43:18 UTC 
(rev 22263)
@@ -263,7 +263,7 @@
 AC_CHECK_TYPE(comparison_fn_t, 
 [AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])])
 
-AC_CHECK_DECLS([setenv, unsetenv])
+AC_HAVE_DECL(setenv, [#include stdlib.h])
 AC_CHECK_FUNCS(setenv unsetenv)
 
 AC_CHECK_FUNCS(strnlen)

Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2007-04-16 12:00:08 UTC 
(rev 22262)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2007-04-16 12:43:18 UTC 
(rev 22263)
@@ -162,7 +162,7 @@
 #define setenv rep_setenv
 int rep_setenv(const char *name, const char *value, int overwrite);
 #else
-#ifndef HAVE_DECL_SETENV
+#ifndef HAVE_SETENV_DECL
 int setenv(const char *name, const char *value, int overwrite);
 #endif
 #endif



svn commit: samba r22264 - in branches/SAMBA_3_0/source/lib/replace: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 12:43:54 + (Mon, 16 Apr 2007)
New Revision: 22264

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

Log:
merge from samba4:

use AC_HAVE_DECL() because AC_CHECK_DECLS() defines to 1 or 0
and #ifndef doesn't work.

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/libreplace.m4
   branches/SAMBA_3_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/libreplace.m4
===
--- branches/SAMBA_3_0/source/lib/replace/libreplace.m4 2007-04-16 12:43:18 UTC 
(rev 22263)
+++ branches/SAMBA_3_0/source/lib/replace/libreplace.m4 2007-04-16 12:43:54 UTC 
(rev 22264)
@@ -263,7 +263,7 @@
 AC_CHECK_TYPE(comparison_fn_t, 
 [AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])])
 
-AC_CHECK_DECLS([setenv, unsetenv])
+AC_HAVE_DECL(setenv, [#include stdlib.h])
 AC_CHECK_FUNCS(setenv unsetenv)
 
 AC_CHECK_FUNCS(strnlen)

Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0/source/lib/replace/replace.h 2007-04-16 12:43:18 UTC 
(rev 22263)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h 2007-04-16 12:43:54 UTC 
(rev 22264)
@@ -162,7 +162,7 @@
 #define setenv rep_setenv
 int rep_setenv(const char *name, const char *value, int overwrite);
 #else
-#ifndef HAVE_DECL_SETENV
+#ifndef HAVE_SETENV_DECL
 int setenv(const char *name, const char *value, int overwrite);
 #endif
 #endif



svn commit: samba r22265 - in branches/SAMBA_3_0_25/source/lib/replace: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 12:44:13 + (Mon, 16 Apr 2007)
New Revision: 22265

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

Log:
merge from samba4:

use AC_HAVE_DECL() because AC_CHECK_DECLS() defines to 1 or 0
and #ifndef doesn't work.

metze
Modified:
   branches/SAMBA_3_0_25/source/lib/replace/libreplace.m4
   branches/SAMBA_3_0_25/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0_25/source/lib/replace/libreplace.m4
===
--- branches/SAMBA_3_0_25/source/lib/replace/libreplace.m4  2007-04-16 
12:43:54 UTC (rev 22264)
+++ branches/SAMBA_3_0_25/source/lib/replace/libreplace.m4  2007-04-16 
12:44:13 UTC (rev 22265)
@@ -263,7 +263,7 @@
 AC_CHECK_TYPE(comparison_fn_t, 
 [AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])])
 
-AC_CHECK_DECLS([setenv, unsetenv])
+AC_HAVE_DECL(setenv, [#include stdlib.h])
 AC_CHECK_FUNCS(setenv unsetenv)
 
 AC_CHECK_FUNCS(strnlen)

Modified: branches/SAMBA_3_0_25/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0_25/source/lib/replace/replace.h  2007-04-16 12:43:54 UTC 
(rev 22264)
+++ branches/SAMBA_3_0_25/source/lib/replace/replace.h  2007-04-16 12:44:13 UTC 
(rev 22265)
@@ -162,7 +162,7 @@
 #define setenv rep_setenv
 int rep_setenv(const char *name, const char *value, int overwrite);
 #else
-#ifndef HAVE_DECL_SETENV
+#ifndef HAVE_SETENV_DECL
 int setenv(const char *name, const char *value, int overwrite);
 #endif
 #endif



Rev 112: fixed a fd bug (thanks volker) in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 112
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Mon 2007-04-16 22:49:37 +1000
message:
  fixed a fd bug (thanks volker)
modified:
  tests/lockwait.c   lockwait.c-20070416055753-3ztnb4cxqgamfudx-1
=== modified file 'tests/lockwait.c'
--- a/tests/lockwait.c  2007-04-16 06:01:37 +
+++ b/tests/lockwait.c  2007-04-16 12:49:37 +
@@ -42,6 +42,7 @@
void (*callback)(void *) = h-callback;
void *p = h-private_data;
talloc_set_destructor(h, NULL);
+   close(h-fd[0]);
talloc_free(h); 
callback(p);
waitpid(h-child, NULL, 0);



Rev 113: merge local copy of tdb from samba4 tdb in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 113
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Mon 2007-04-16 22:52:58 +1000
message:
  merge local copy of tdb from samba4 tdb
modified:
  lib/tdb/autogen.sh autogen.sh-20070125040949-7t3f5zdl1q4z9hyv-61
  lib/tdb/common/dump.c  dump.c-20070220022425-m1wibgjq7n5hahs6-2
  lib/tdb/common/freelistcheck.c 
freelistcheck.c-20070220022425-m1wibgjq7n5hahs6-5
  lib/tdb/common/io.cio.c-20070220022425-m1wibgjq7n5hahs6-6
  lib/tdb/common/lock.c  lock.c-20070220022425-m1wibgjq7n5hahs6-7
  lib/tdb/common/open.c  open.c-20070220022425-m1wibgjq7n5hahs6-8
  lib/tdb/common/tdb.c   tdb.c-20070220022425-m1wibgjq7n5hahs6-9
  lib/tdb/common/tdb_private.h   
tdb_private.h-20070220022425-m1wibgjq7n5hahs6-10
  lib/tdb/common/transaction.c   
transaction.c-20070220022425-m1wibgjq7n5hahs6-11
  lib/tdb/config.mk  config.mk-20070125040949-7t3f5zdl1q4z9hyv-63
  lib/tdb/include/config.h.inconfig.h.in-20070125040949-7t3f5zdl1q4z9hyv-100
  lib/tdb/include/tdb.h  tdb.h-20070125040949-7t3f5zdl1q4z9hyv-101
  lib/tdb/tdb.pc tdb.pc-20070125040949-7t3f5zdl1q4z9hyv-71
  lib/tdb/tools/tdbtest.ctdbtest.c-20070125040949-7t3f5zdl1q4z9hyv-107
  lib/tdb/tools/tdbtool.ctdbtool.c-20070125040949-7t3f5zdl1q4z9hyv-108

Diff too large for email (1746, the limit is 200).


Rev 114: added a tdb_chainlock_nonblock() call to tdb in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 114
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Mon 2007-04-16 23:03:36 +1000
message:
  added a tdb_chainlock_nonblock() call to tdb
modified:
  lib/tdb/common/lock.c  lock.c-20070220022425-m1wibgjq7n5hahs6-7
  lib/tdb/include/tdb.h  tdb.h-20070125040949-7t3f5zdl1q4z9hyv-101
=== modified file 'lib/tdb/common/lock.c'
--- a/lib/tdb/common/lock.c 2007-04-16 12:52:58 +
+++ b/lib/tdb/common/lock.c 2007-04-16 13:03:36 +
@@ -105,7 +105,7 @@
 
 
 /* lock a list in the database. list -1 is the alloc list */
-int tdb_lock(struct tdb_context *tdb, int list, int ltype)
+static int _tdb_lock(struct tdb_context *tdb, int list, int ltype, int op)
 {
struct tdb_lock_type *new_lck;
int i;
@@ -158,10 +158,8 @@
 
/* Since fcntl locks don't nest, we do a lock for the first one,
   and simply bump the count for future ones */
-   if (tdb-methods-tdb_brlock(tdb,FREELIST_TOP+4*list,ltype,F_SETLKW,
+   if (tdb-methods-tdb_brlock(tdb,FREELIST_TOP+4*list,ltype, op,
 0, 1)) {
-   TDB_LOG((tdb, TDB_DEBUG_ERROR, tdb_lock failed on list %d 
-ltype=%d (%s)\n,  list, ltype, strerror(errno)));
return -1;
}
 
@@ -175,6 +173,25 @@
return 0;
 }
 
+/* lock a list in the database. list -1 is the alloc list */
+int tdb_lock(struct tdb_context *tdb, int list, int ltype)
+{
+   int ret;
+   ret = _tdb_lock(tdb, list, ltype, F_SETLKW);
+   if (ret) {
+   TDB_LOG((tdb, TDB_DEBUG_ERROR, tdb_lock failed on list %d 
+ltype=%d (%s)\n,  list, ltype, strerror(errno)));
+   }
+   return ret;
+}
+
+/* lock a list in the database. list -1 is the alloc list. non-blocking lock */
+int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype)
+{
+   return _tdb_lock(tdb, list, ltype, F_SETLK);
+}
+
+
 /* unlock the database: returns void because it's too late for errors. */
/* changed to return int it may be interesting to know there
   has been an error  --simo */
@@ -351,6 +368,14 @@
return tdb_lock(tdb, BUCKET(tdb-hash_fn(key)), F_WRLCK);
 }
 
+/* lock/unlock one hash chain, non-blocking. This is meant to be used
+   to reduce contention - it cannot guarantee how many records will be
+   locked */
+int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key)
+{
+   return tdb_lock_nonblock(tdb, BUCKET(tdb-hash_fn(key)), F_WRLCK);
+}
+
 int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key)
 {
return tdb_unlock(tdb, BUCKET(tdb-hash_fn(key)), F_WRLCK);

=== modified file 'lib/tdb/include/tdb.h'
--- a/lib/tdb/include/tdb.h 2007-04-16 12:52:58 +
+++ b/lib/tdb/include/tdb.h 2007-04-16 13:03:36 +
@@ -134,6 +134,7 @@
 
 /* Low level locking functions: use with care */
 int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);
+int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key);
 int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key);
 int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key);
 int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key);



Rev 115: added a ctdb_ltdb_lock_fetch_requeue() function in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 115
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Mon 2007-04-16 23:52:14 +1000
message:
  added a ctdb_ltdb_lock_fetch_requeue() function
  this will be the core of the non-blocking lock idea for ctdb, it will be used
  in place of ctdb_ltdb_fetch(), but will also get a lock. It re-starts a 
request
  if it needs to block
modified:
  Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1
  common/ctdb.c  ctdb.c-20061127094323-t50f58d65iaao5of-2
  common/ctdb_ltdb.c ctdb_ltdb.c-20061128065342-to93h6eejj5kon81-2
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
=== modified file 'Makefile.in'
--- a/Makefile.in   2007-04-16 06:01:37 +
+++ b/Makefile.in   2007-04-16 13:52:14 +
@@ -21,7 +21,7 @@
 EVENTS_OBJ = lib/events/events.o lib/events/events_standard.o
 
 CTDB_COMMON_OBJ = common/ctdb.o common/ctdb_daemon.o common/ctdb_client.o 
common/ctdb_io.o common/util.o common/ctdb_util.o \
-   common/ctdb_call.o common/ctdb_ltdb.o common/ctdb_message.o \
+   common/ctdb_call.o common/ctdb_ltdb.o common/ctdb_lockwait.o 
common/ctdb_message.o \
lib/util/idtree.o lib/util/db_wrap.o
 
 CTDB_TCP_OBJ = tcp/tcp_connect.o tcp/tcp_io.o tcp/tcp_init.o

=== modified file 'common/ctdb.c'
--- a/common/ctdb.c 2007-04-11 04:54:47 +
+++ b/common/ctdb.c 2007-04-16 13:52:14 +
@@ -190,7 +190,7 @@
 /*
   called by the transport layer when a packet comes in
 */
-static void ctdb_recv_pkt(struct ctdb_context *ctdb, uint8_t *data, uint32_t 
length)
+void ctdb_recv_pkt(struct ctdb_context *ctdb, uint8_t *data, uint32_t length)
 {
struct ctdb_req_header *hdr;
 

=== modified file 'common/ctdb_ltdb.c'
--- a/common/ctdb_ltdb.c2007-04-11 01:01:42 +
+++ b/common/ctdb_ltdb.c2007-04-16 13:52:14 +
@@ -215,3 +215,49 @@
return tdb_chainunlock(ctdb_db-ltdb-tdb, key);
 }
 
+/*
+  called when we should retry the operation
+ */
+static void lock_fetch_callback(void *p)
+{
+   struct ctdb_req_header *hdr = p;
+   struct ctdb_context *ctdb = talloc_find_parent_bytype(p, struct 
ctdb_context);
+   ctdb_recv_pkt(ctdb, (uint8_t *)hdr, hdr-length);
+   printf(PACKET REQUEUED\n);
+}
+
+/*
+  do a non-blocking ltdb_fetch with a locked record, deferring this
+  ctdb request until we have the chainlock
+ */
+int ctdb_ltdb_lock_fetch_requeue(struct ctdb_db_context *ctdb_db, 
+TDB_DATA key, struct ctdb_ltdb_header *header, 
+struct ctdb_req_header *hdr, TDB_DATA *data)
+{
+   int ret;
+   struct tdb_context *tdb = ctdb_db-ltdb-tdb;
+   struct lockwait_handle *h;
+   
+   ret = tdb_chainlock_nonblock(tdb, key);
+
+   /* first the non-contended path */
+   if (ret == 0) {
+   ret = ctdb_ltdb_fetch(ctdb_db, key, header, hdr, data);
+   if (ret != 0) {
+   tdb_chainunlock(tdb, key);
+   }   
+   return ret;
+   }
+
+   /* now the contended path */
+   h = ctdb_lockwait(ctdb_db, key, lock_fetch_callback, hdr);
+   if (h == NULL) {
+   tdb_chainunlock(tdb, key);
+   return -1;
+   }
+
+   /* we get an extra reference to the packet here, to 
+  stop it being freed in the top level packet handler */
+   (void)talloc_reference(ctdb_db, hdr);
+   return 0;
+}

=== modified file 'include/ctdb_private.h'
--- a/include/ctdb_private.h2007-04-13 10:38:24 +
+++ b/include/ctdb_private.h2007-04-16 13:52:14 +
@@ -353,6 +353,10 @@
 int ctdb_ltdb_store(struct ctdb_db_context *ctdb_db, TDB_DATA key, 
struct ctdb_ltdb_header *header, TDB_DATA data);
 void ctdb_queue_packet(struct ctdb_context *ctdb, struct ctdb_req_header *hdr);
+int ctdb_ltdb_lock_fetch_requeue(struct ctdb_db_context *ctdb_db, 
+TDB_DATA key, struct ctdb_ltdb_header *header, 
+struct ctdb_req_header *hdr, TDB_DATA *data);
+void ctdb_recv_pkt(struct ctdb_context *ctdb, uint8_t *data, uint32_t length);
 
 struct ctdb_call_state *ctdb_call_local_send(struct ctdb_db_context *ctdb_db, 
 struct ctdb_call *call,
@@ -449,4 +453,8 @@
 */
 int ctdb_client_store_unlock(struct ctdb_record_handle *rec, TDB_DATA data);
 
+struct lockwait_handle *ctdb_lockwait(struct ctdb_db_context *ctdb_db,
+ TDB_DATA key,
+ void (*callback)(void *), void 
*private_data);
+
 #endif



Rev 116: wait on the right fd .... in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 116
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-04-17 00:11:04 +1000
message:
  wait on the right fd 
modified:
  tests/lockwait.c   lockwait.c-20070416055753-3ztnb4cxqgamfudx-1
=== modified file 'tests/lockwait.c'
--- a/tests/lockwait.c  2007-04-16 12:49:37 +
+++ b/tests/lockwait.c  2007-04-16 14:11:04 +
@@ -41,6 +41,7 @@
 struct lockwait_handle);
void (*callback)(void *) = h-callback;
void *p = h-private_data;
+   printf(%s\n, __location__);
talloc_set_destructor(h, NULL);
close(h-fd[0]);
talloc_free(h); 
@@ -103,7 +104,7 @@
close(h-fd[1]);
talloc_set_destructor(h, lockwait_destructor);
 
-   h-fde = event_add_fd(ev, h, fd, EVENT_FD_READ, lockwait_handler, h);
+   h-fde = event_add_fd(ev, h, h-fd[0], EVENT_FD_READ, lockwait_handler, 
h);
if (h-fde == NULL) {
talloc_free(h);
return NULL;



Rev 73: merged tridge's branch in http://samba.org/~tridge/psomogyi/

2007-04-16 Thread psomogyi

revno: 73
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Peter Somogyi [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Mon 2007-04-16 16:28:29 +0200
message:
  merged tridge's branch 
added:
  common/ctdb_client.c   ctdb_client.c-20070411010216-3kd8v37k61steeya-1
  common/ctdb_daemon.c   ctdb_daemon.c-20070409200331-3el1kqgdb9m4ib0g-1
  common/ctdb_io.c   ctdb_io.c-20070409200335-dzfc7f3rra5rcf60-1
  config.mk  config.mk-20070416041303-xql6zaaq90w8kovl-1
  direct/direct-20070411085038-phusiewluwzyqjpc-1
  direct/README  readme-20070411085353-evbh8j3q762w3azh-1
  direct/ctdbd.c ctdbd.c-20070411085044-dqmhr6mfeexnyt4m-1
  direct/ctdbd.shctdbd.sh-20070411085038-phusiewluwzyqjpc-2
  direct/ctdbd_test.cctdbd_test.c-20070411085057-17kgjzfktsh28g99-1
  direct/nodes.txt   nodes.txt-20070411085104-tprj7cr1u6o5i7xm-1
  tests/bench1.shbench1.sh-20070405031753-caneu8tv5v8e93ws-1
  tests/cmdline.ccmdline.c-20070416041216-w1zvz91bkdsgjckw-1
  tests/cmdline.hcmdline.h-20070416041216-w1zvz91bkdsgjckw-2
  tests/ctdb_fetch.c ctdb_fetch.c-20070405031748-f7gslozfj3rwh5ie-1
  tests/ctdb_fetch1.cctdb_fetch1.c-20070412111848-xawz6wqk9r0v8jdk-1
  tests/ctdb_messaging.c 
ctdb_messaging.c-20070411034205-6d6vne56pbih2x1p-1
  tests/fetch.sh fetch.sh-20070405031756-lomzqpjyqg3xd1kv-1
  tests/fetch1.shfetch1.sh-20070412111854-6s84l3myac9ncl79-1
  tests/lockwait.c   lockwait.c-20070416055753-3ztnb4cxqgamfudx-1
  tests/messaging.sh messaging.sh-20070411034158-e1c175kqm9vzasb6-1
renamed:
  ctdb_bench.c = tests/ctdb_bench.c 
ctdb_bench.c-20061219052637-2liagoglohxb6p7s-1
  ctdb_test.c = tests/ctdb_test.c 
ctdb_test.c-20061117234101-o3qt14umlg9en8z0-16
  nodes.txt = tests/nodes.txt nodes.txt-20061118043428-8lz9unytgcsndgia-1
modified:
  Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1
  common/ctdb.c  ctdb.c-20061127094323-t50f58d65iaao5of-2
  common/ctdb_call.c ctdb_call.c-20061128065342-to93h6eejj5kon81-1
  common/ctdb_ltdb.c ctdb_ltdb.c-20061128065342-to93h6eejj5kon81-2
  common/ctdb_message.c  
ctdb_message.c-20070208224107-9dnio7x7z33prrmt-1
  common/ctdb_util.c ctdb_util.c-20061128065342-to93h6eejj5kon81-3
  common/util.c  util.c-20061117234101-o3qt14umlg9en8z0-20
  configure.ac   configure.ac-20061117234101-o3qt14umlg9en8z0-10
  ib/ibw_ctdb.c  ibw_ctdb.c-20070102171255-7krov7858dqza466-1
  ib/ibw_ctdb.h  ibw_ctdb.h-20070102171259-nmuvtzt98aqzg7xp-1
  ib/ibw_ctdb_init.c 
ibw_ctdb_init.c-20070102171305-cn2z4k7ibx8141d5-1
  ib/ibwrapper_test.c
ibwrapper_test.c-20061214171730-h11a2z5ed6pt66hj-1
  include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  include/includes.h includes.h-20061117234101-o3qt14umlg9en8z0-17
  lib/tdb/autogen.sh autogen.sh-20070125040949-7t3f5zdl1q4z9hyv-61
  lib/tdb/common/dump.c  dump.c-20070220022425-m1wibgjq7n5hahs6-2
  lib/tdb/common/freelistcheck.c 
freelistcheck.c-20070220022425-m1wibgjq7n5hahs6-5
  lib/tdb/common/io.cio.c-20070220022425-m1wibgjq7n5hahs6-6
  lib/tdb/common/lock.c  lock.c-20070220022425-m1wibgjq7n5hahs6-7
  lib/tdb/common/open.c  open.c-20070220022425-m1wibgjq7n5hahs6-8
  lib/tdb/common/tdb.c   tdb.c-20070220022425-m1wibgjq7n5hahs6-9
  lib/tdb/common/tdb_private.h   
tdb_private.h-20070220022425-m1wibgjq7n5hahs6-10
  lib/tdb/common/transaction.c   
transaction.c-20070220022425-m1wibgjq7n5hahs6-11
  lib/tdb/config.mk  config.mk-20070125040949-7t3f5zdl1q4z9hyv-63
  lib/tdb/include/config.h.inconfig.h.in-20070125040949-7t3f5zdl1q4z9hyv-100
  lib/tdb/include/tdb.h  tdb.h-20070125040949-7t3f5zdl1q4z9hyv-101
  lib/tdb/tdb.pc tdb.pc-20070125040949-7t3f5zdl1q4z9hyv-71
  lib/tdb/tools/tdbtest.ctdbtest.c-20070125040949-7t3f5zdl1q4z9hyv-107
  lib/tdb/tools/tdbtool.ctdbtool.c-20070125040949-7t3f5zdl1q4z9hyv-108
  tcp/ctdb_tcp.h ctdb_tcp.h-20061127103747-l8xeniwiapbydehq-3
  tcp/tcp_connect.c  tcp_connect.c-20061128004937-x70q1cu5xzg5g2tm-1
  tcp/tcp_init.c tcp_init.c-20061128004937-x70q1cu5xzg5g2tm-2
  tcp/tcp_io.c   tcp_io.c-20061128004937-x70q1cu5xzg5g2tm-3
  tests/bench.sh bench.sh-20070209014602-vdolpr6esqsa58s7-1
  tests/test.sh  test.sh-20061128065333-cla80zaxd9eb4o4a-2
  tests/test1.sh 

svn commit: samba r22266 - in branches: SAMBA_3_0/source/include SAMBA_3_0/source/param SAMBA_3_0/source/smbd SAMBA_3_0_25/source/include SAMBA_3_0_25/source/param SAMBA_3_0_25/source/smbd

2007-04-16 Thread jra
Author: jra
Date: 2007-04-16 19:10:16 + (Mon, 16 Apr 2007)
New Revision: 22266

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

Log:
Fix bug #4512 - we were returning a volume label greater than
32 unicode chars. Windows XP doesn't like that :-).
Jeremy

Modified:
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/param/loadparm.c
   branches/SAMBA_3_0/source/smbd/connection.c
   branches/SAMBA_3_0/source/smbd/trans2.c
   branches/SAMBA_3_0_25/source/include/smb.h
   branches/SAMBA_3_0_25/source/param/loadparm.c
   branches/SAMBA_3_0_25/source/smbd/connection.c
   branches/SAMBA_3_0_25/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/smb.h
===
--- branches/SAMBA_3_0/source/include/smb.h 2007-04-16 12:44:13 UTC (rev 
22265)
+++ branches/SAMBA_3_0/source/include/smb.h 2007-04-16 19:10:16 UTC (rev 
22266)
@@ -878,7 +878,7 @@
int cnum;
uid_t uid;
gid_t gid;
-   char name[24];
+   char servicename[FSTRING_LEN];
char addr[24];
char machine[FSTRING_LEN];
time_t start;

Modified: branches/SAMBA_3_0/source/param/loadparm.c
===
--- branches/SAMBA_3_0/source/param/loadparm.c  2007-04-16 12:44:13 UTC (rev 
22265)
+++ branches/SAMBA_3_0/source/param/loadparm.c  2007-04-16 19:10:16 UTC (rev 
22266)
@@ -5299,15 +5299,22 @@
  A useful volume label function. 
 /
 
-char *volume_label(int snum)
+const char *volume_label(int snum)
 {
-   char *ret = lp_volume(snum);
-   if (!*ret)
-   return lp_servicename(snum);
-   return (ret);
+   char *ret;
+   const char *label = lp_volume(snum);
+   if (!*label) {
+   label = lp_servicename(snum);
+   }
+   
+   /* This returns a 33 byte guarenteed null terminated string. */
+   ret = talloc_strndup(main_loop_talloc_get(), label, 32);
+   if (!ret) {
+   return ;
+   }   
+   return ret;
 }
 
-
 /***
  Set the server type we will announce as via nmbd.
 /

Modified: branches/SAMBA_3_0/source/smbd/connection.c
===
--- branches/SAMBA_3_0/source/smbd/connection.c 2007-04-16 12:44:13 UTC (rev 
22265)
+++ branches/SAMBA_3_0/source/smbd/connection.c 2007-04-16 19:10:16 UTC (rev 
22266)
@@ -108,13 +108,13 @@
 
if (cs-Clear  !process_exists(crec.pid)  (errno == ESRCH)) {
DEBUG(2,(pid %s doesn't exist - deleting connections %d 
[%s]\n,
-   procid_str_static(crec.pid), crec.cnum, crec.name));
+   procid_str_static(crec.pid), crec.cnum, 
crec.servicename));
if (tdb_delete(the_tdb, kbuf) != 0)
DEBUG(0,(count_fn: tdb_delete failed with error %s\n, 
tdb_errorstr(tdb) ));
return 0;
}
 
-   if (strequal(crec.name, cs-name))
+   if (strequal(crec.servicename, cs-name))
cs-curr_connections++;
 
return 0;
@@ -191,8 +191,8 @@
if (conn) {
crec.uid = conn-uid;
crec.gid = conn-gid;
-   safe_strcpy(crec.name,
-   lp_servicename(SNUM(conn)),sizeof(crec.name)-1);
+   safe_strcpy(crec.servicename,
+   
lp_servicename(SNUM(conn)),sizeof(crec.servicename)-1);
}
crec.start = time(NULL);
crec.bcast_msg_flags = msg_flags;

Modified: branches/SAMBA_3_0/source/smbd/trans2.c
===
--- branches/SAMBA_3_0/source/smbd/trans2.c 2007-04-16 12:44:13 UTC (rev 
22265)
+++ branches/SAMBA_3_0/source/smbd/trans2.c 2007-04-16 19:10:16 UTC (rev 
22266)
@@ -2247,7 +2247,7 @@
uint16 info_level;
int data_len, len;
SMB_STRUCT_STAT st;
-   char *vname = volume_label(SNUM(conn));
+   const char *vname = volume_label(SNUM(conn));
int snum = SNUM(conn);
char *fstype = lp_fstype(SNUM(conn));
int quota_flag = 0;
@@ -2368,9 +2368,11 @@
SIVAL(pdata,8,str_checksum(lp_servicename(snum)) ^ 
(str_checksum(get_local_machine_name())16));
 
+   /* Max label len is 32 characters. */
len = srvstr_push(outbuf, pdata+18, vname, -1, 
STR_UNICODE);
SIVAL(pdata,12,len);
data_len = 18+len;
+
DEBUG(5,(call_trans2qfsinfo : SMB_QUERY_FS_VOLUME_INFO 
namelen = %d, vol=%s serv=%s\n, 
(int)strlen(vname),vname, 

svn commit: samba r22267 - in branches/SAMBA_4_0/source/lib/talloc: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:14:55 + (Mon, 16 Apr 2007)
New Revision: 22267

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

Log:
protect #define __location__ with an #ifndef

metze
Modified:
   branches/SAMBA_4_0/source/lib/talloc/talloc.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.h
===
--- branches/SAMBA_4_0/source/lib/talloc/talloc.h   2007-04-16 19:10:16 UTC 
(rev 22266)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.h   2007-04-16 19:14:55 UTC 
(rev 22267)
@@ -36,10 +36,12 @@
 /*
   this uses a little trick to allow __LINE__ to be stringified
 */
-#define _STRING_LINE_(s)#s
-#define _STRING_LINE2_(s)   _STRING_LINE_(s)
-#define __LINESTR__   _STRING_LINE2_(__LINE__)
-#define __location__ __FILE__ : __LINESTR__
+#ifndef __location__
+#define __TALLOC_STRING_LINE1__(s)#s
+#define __TALLOC_STRING_LINE2__(s)   __TALLOC_STRING_LINE1__(s)
+#define __TALLOC_STRING_LINE3__  __TALLOC_STRING_LINE2__(__LINE__)
+#define __location__ __FILE__ : __TALLOC_STRING_LINE3__
+#endif
 
 #ifndef TALLOC_DEPRECATED
 #define TALLOC_DEPRECATED 0



svn commit: samba r22268 - in branches/SAMBA_3_0/source/lib/talloc: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:15:57 + (Mon, 16 Apr 2007)
New Revision: 22268

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

Log:
merge from samba4:

protect #define __location__ with an #ifndef

metze
Modified:
   branches/SAMBA_3_0/source/lib/talloc/talloc.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/talloc/talloc.h
===
--- branches/SAMBA_3_0/source/lib/talloc/talloc.h   2007-04-16 19:14:55 UTC 
(rev 22267)
+++ branches/SAMBA_3_0/source/lib/talloc/talloc.h   2007-04-16 19:15:57 UTC 
(rev 22268)
@@ -32,10 +32,12 @@
 /*
   this uses a little trick to allow __LINE__ to be stringified
 */
-#define _STRING_LINE_(s)#s
-#define _STRING_LINE2_(s)   _STRING_LINE_(s)
-#define __LINESTR__   _STRING_LINE2_(__LINE__)
-#define __location__ __FILE__ : __LINESTR__
+#ifndef __location__
+#define __TALLOC_STRING_LINE1__(s)#s
+#define __TALLOC_STRING_LINE2__(s)   __TALLOC_STRING_LINE1__(s)
+#define __TALLOC_STRING_LINE3__  __TALLOC_STRING_LINE2__(__LINE__)
+#define __location__ __FILE__ : __TALLOC_STRING_LINE3__
+#endif
 
 #ifndef TALLOC_DEPRECATED
 #define TALLOC_DEPRECATED 0



svn commit: samba r22269 - in branches/SAMBA_3_0_25/source/lib/talloc: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:16:20 + (Mon, 16 Apr 2007)
New Revision: 22269

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

Log:
merge from samba4:

protect #define __location__ with an #ifndef

metze
Modified:
   branches/SAMBA_3_0_25/source/lib/talloc/talloc.h


Changeset:
Modified: branches/SAMBA_3_0_25/source/lib/talloc/talloc.h
===
--- branches/SAMBA_3_0_25/source/lib/talloc/talloc.h2007-04-16 19:15:57 UTC 
(rev 22268)
+++ branches/SAMBA_3_0_25/source/lib/talloc/talloc.h2007-04-16 19:16:20 UTC 
(rev 22269)
@@ -32,10 +32,12 @@
 /*
   this uses a little trick to allow __LINE__ to be stringified
 */
-#define _STRING_LINE_(s)#s
-#define _STRING_LINE2_(s)   _STRING_LINE_(s)
-#define __LINESTR__   _STRING_LINE2_(__LINE__)
-#define __location__ __FILE__ : __LINESTR__
+#ifndef __location__
+#define __TALLOC_STRING_LINE1__(s)#s
+#define __TALLOC_STRING_LINE2__(s)   __TALLOC_STRING_LINE1__(s)
+#define __TALLOC_STRING_LINE3__  __TALLOC_STRING_LINE2__(__LINE__)
+#define __location__ __FILE__ : __TALLOC_STRING_LINE3__
+#endif
 
 #ifndef TALLOC_DEPRECATED
 #define TALLOC_DEPRECATED 0



svn commit: samba r22270 - in branches/SAMBA_4_0/source/lib/replace: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:22:24 + (Mon, 16 Apr 2007)
New Revision: 22270

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

Log:
provide __location__ in replace.h

and see how the build-farm likes this simpler version

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/README
   branches/SAMBA_4_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/README
===
--- branches/SAMBA_4_0/source/lib/replace/README2007-04-16 19:16:20 UTC 
(rev 22269)
+++ branches/SAMBA_4_0/source/lib/replace/README2007-04-16 19:22:24 UTC 
(rev 22270)
@@ -77,6 +77,9 @@
 Macros:
 va_copy
 __FUNCTION__
+__FILE__
+__LINE__
+__location__
 __STRING
 MIN
 MAX

Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2007-04-16 19:16:20 UTC 
(rev 22269)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2007-04-16 19:22:24 UTC 
(rev 22270)
@@ -439,6 +439,10 @@
 #define __STRING(x)#x
 #endif
 
+#ifndef __location__
+#define __location__ __FILE__ : __STRING(__LINE__)
+#endif
+
 #if MMAP_BLACKLIST
 #undef HAVE_MMAP
 #endif



svn commit: samba r22271 - in branches/SAMBA_3_0/source/lib/replace: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:23:00 + (Mon, 16 Apr 2007)
New Revision: 22271

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

Log:
merge from samba4: 

provide __location__ in replace.h

and see how the build-farm likes this simpler version

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/README
   branches/SAMBA_3_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/README
===
--- branches/SAMBA_3_0/source/lib/replace/README2007-04-16 19:22:24 UTC 
(rev 22270)
+++ branches/SAMBA_3_0/source/lib/replace/README2007-04-16 19:23:00 UTC 
(rev 22271)
@@ -77,6 +77,9 @@
 Macros:
 va_copy
 __FUNCTION__
+__FILE__
+__LINE__
+__location__
 __STRING
 MIN
 MAX

Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0/source/lib/replace/replace.h 2007-04-16 19:22:24 UTC 
(rev 22270)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h 2007-04-16 19:23:00 UTC 
(rev 22271)
@@ -439,6 +439,10 @@
 #define __STRING(x)#x
 #endif
 
+#ifndef __location__
+#define __location__ __FILE__ : __STRING(__LINE__)
+#endif
+
 #if MMAP_BLACKLIST
 #undef HAVE_MMAP
 #endif



svn commit: samba r22272 - in branches/SAMBA_3_0_25/source/lib/replace: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:23:17 + (Mon, 16 Apr 2007)
New Revision: 22272

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

Log:
merge from samba4: 

provide __location__ in replace.h

and see how the build-farm likes this simpler version

metze
Modified:
   branches/SAMBA_3_0_25/source/lib/replace/README
   branches/SAMBA_3_0_25/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0_25/source/lib/replace/README
===
--- branches/SAMBA_3_0_25/source/lib/replace/README 2007-04-16 19:23:00 UTC 
(rev 22271)
+++ branches/SAMBA_3_0_25/source/lib/replace/README 2007-04-16 19:23:17 UTC 
(rev 22272)
@@ -77,6 +77,9 @@
 Macros:
 va_copy
 __FUNCTION__
+__FILE__
+__LINE__
+__location__
 __STRING
 MIN
 MAX

Modified: branches/SAMBA_3_0_25/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0_25/source/lib/replace/replace.h  2007-04-16 19:23:00 UTC 
(rev 22271)
+++ branches/SAMBA_3_0_25/source/lib/replace/replace.h  2007-04-16 19:23:17 UTC 
(rev 22272)
@@ -439,6 +439,10 @@
 #define __STRING(x)#x
 #endif
 
+#ifndef __location__
+#define __location__ __FILE__ : __STRING(__LINE__)
+#endif
+
 #if MMAP_BLACKLIST
 #undef HAVE_MMAP
 #endif



svn commit: samba r22273 - in branches/SAMBA_4_0/source/lib/replace: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:45:35 + (Mon, 16 Apr 2007)
New Revision: 22273

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

Log:
- provide __LINESTR__ macro
- add __STRINGSTRING() macro to really create a string of __LINE__
- fix __location__ macro

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/README
   branches/SAMBA_4_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/README
===
--- branches/SAMBA_4_0/source/lib/replace/README2007-04-16 19:23:17 UTC 
(rev 22272)
+++ branches/SAMBA_4_0/source/lib/replace/README2007-04-16 19:45:35 UTC 
(rev 22273)
@@ -79,8 +79,10 @@
 __FUNCTION__
 __FILE__
 __LINE__
+__LINESTR__
 __location__
 __STRING
+__STRINGSTRING
 MIN
 MAX
 QSORT_CAST

Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2007-04-16 19:23:17 UTC 
(rev 22272)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2007-04-16 19:45:35 UTC 
(rev 22273)
@@ -439,8 +439,16 @@
 #define __STRING(x)#x
 #endif
 
+#ifndef _STRINGSTRING
+#define __STRINGSTRING(x) __STRING(x)
+#endif
+
+#ifndef __LINESTR__
+#define __LINESTR__ __STRINGSTRING(__LINE__)
+#endif
+
 #ifndef __location__
-#define __location__ __FILE__ : __STRING(__LINE__)
+#define __location__ __FILE__ : __LINESTR__
 #endif
 
 #if MMAP_BLACKLIST



svn commit: samba r22274 - in branches/SAMBA_3_0/source/lib/replace: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:46:06 + (Mon, 16 Apr 2007)
New Revision: 22274

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

Log:
merge from samba4:

- provide __LINESTR__ macro
- add __STRINGSTRING() macro to really create a string of __LINE__
- fix __location__ macro

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/README
   branches/SAMBA_3_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/README
===
--- branches/SAMBA_3_0/source/lib/replace/README2007-04-16 19:45:35 UTC 
(rev 22273)
+++ branches/SAMBA_3_0/source/lib/replace/README2007-04-16 19:46:06 UTC 
(rev 22274)
@@ -79,8 +79,10 @@
 __FUNCTION__
 __FILE__
 __LINE__
+__LINESTR__
 __location__
 __STRING
+__STRINGSTRING
 MIN
 MAX
 QSORT_CAST

Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0/source/lib/replace/replace.h 2007-04-16 19:45:35 UTC 
(rev 22273)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h 2007-04-16 19:46:06 UTC 
(rev 22274)
@@ -439,8 +439,16 @@
 #define __STRING(x)#x
 #endif
 
+#ifndef _STRINGSTRING
+#define __STRINGSTRING(x) __STRING(x)
+#endif
+
+#ifndef __LINESTR__
+#define __LINESTR__ __STRINGSTRING(__LINE__)
+#endif
+
 #ifndef __location__
-#define __location__ __FILE__ : __STRING(__LINE__)
+#define __location__ __FILE__ : __LINESTR__
 #endif
 
 #if MMAP_BLACKLIST



svn commit: samba r22275 - in branches/SAMBA_3_0_25/source/lib/replace: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:46:50 + (Mon, 16 Apr 2007)
New Revision: 22275

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

Log:
merge from samba4:

- provide __LINESTR__ macro
- add __STRINGSTRING() macro to really create a string of __LINE__
- fix __location__ macro

metze
Modified:
   branches/SAMBA_3_0_25/source/lib/replace/README
   branches/SAMBA_3_0_25/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0_25/source/lib/replace/README
===
--- branches/SAMBA_3_0_25/source/lib/replace/README 2007-04-16 19:46:06 UTC 
(rev 22274)
+++ branches/SAMBA_3_0_25/source/lib/replace/README 2007-04-16 19:46:50 UTC 
(rev 22275)
@@ -79,8 +79,10 @@
 __FUNCTION__
 __FILE__
 __LINE__
+__LINESTR__
 __location__
 __STRING
+__STRINGSTRING
 MIN
 MAX
 QSORT_CAST

Modified: branches/SAMBA_3_0_25/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0_25/source/lib/replace/replace.h  2007-04-16 19:46:06 UTC 
(rev 22274)
+++ branches/SAMBA_3_0_25/source/lib/replace/replace.h  2007-04-16 19:46:50 UTC 
(rev 22275)
@@ -439,8 +439,16 @@
 #define __STRING(x)#x
 #endif
 
+#ifndef _STRINGSTRING
+#define __STRINGSTRING(x) __STRING(x)
+#endif
+
+#ifndef __LINESTR__
+#define __LINESTR__ __STRINGSTRING(__LINE__)
+#endif
+
 #ifndef __location__
-#define __location__ __FILE__ : __STRING(__LINE__)
+#define __location__ __FILE__ : __LINESTR__
 #endif
 
 #if MMAP_BLACKLIST



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

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:52:05 + (Mon, 16 Apr 2007)
New Revision: 22278

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

Log:
__location__ is defined in libreplace now

metze
Modified:
   branches/SAMBA_3_0_25/source/include/smb_macros.h


Changeset:
Modified: branches/SAMBA_3_0_25/source/include/smb_macros.h
===
--- branches/SAMBA_3_0_25/source/include/smb_macros.h   2007-04-16 19:51:30 UTC 
(rev 22277)
+++ branches/SAMBA_3_0_25/source/include/smb_macros.h   2007-04-16 19:52:05 UTC 
(rev 22278)
@@ -350,11 +350,6 @@
 
 #else
 
-#define _STRING_LINE_(s)#s
-#define _STRING_LINE2_(s)   _STRING_LINE_(s)
-#define __LINESTR__   _STRING_LINE2_(__LINE__)
-#define __location__ __FILE__ : __LINESTR__
-
 #define PRS_ALLOC_MEM(ps, type, count) (type 
*)prs_alloc_mem((ps),sizeof(type),(count))
 #define PRS_ALLOC_MEM_VOID(ps, size) prs_alloc_mem((ps),(size),1)
 



svn commit: samba r22279 - in branches/SAMBA_4_0/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:55:51 + (Mon, 16 Apr 2007)
New Revision: 22279

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

Log:
add a lot more detailed strtoll() and strtoull() tests

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-04-16 
19:52:05 UTC (rev 22278)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-04-16 
19:55:51 UTC (rev 22279)
@@ -476,76 +476,274 @@
return true;
 }
 
+#define TEST_STRTO_X(type,fmt,func,str,base,res,diff,rrnoo) do {\
+   type _v; \
+   char _s[64]; \
+   char *_p = NULL;\
+   char *_ep = NULL; \
+   strlcpy(_s, str, sizeof(_s));\
+   if (diff = 0) { \
+   _ep = _s[diff]; \
+   } \
+   errno = 0; \
+   _v = func(_s, _p, base); \
+   if (errno != rrnoo) { \
+   printf(failure: %s [\n \
+  \t%s\n \
+  \t%s(\%s\,%d,%d):  fmt  (=/!)=  fmt \n \
+  \terrno: %d != %d\n \
+  ]\n, \
+   __STRING(func), __location__, __STRING(func), \
+  str, diff, base, res, _v, rrnoo, errno); \
+   return false; \
+   } else if (_v != res) { \
+   printf(failure: %s [\n \
+  \t%s\n \
+  \t%s(\%s\,%d,%d):  fmt  !=  fmt \n \
+  ]\n, \
+  __STRING(func), __location__, __STRING(func), \
+  str, diff, base, res, _v); \
+   return false; \
+   } else if (_p != _ep) { \
+   printf(failure: %s [\n \
+  \t%s\n \
+  \t%s(\%s\,%d,%d):  fmt  (=/!)=  fmt \n \
+  \tptr: %p - %p = %d != %d\n \
+  ]\n, \
+  __STRING(func), __location__, __STRING(func), \
+  str, diff, base, res, _v, _ep, _p, diff - (_ep - _p), 
diff); \
+   return false; \
+   } \
+} while (0)
+
 static int test_strtoll(void)
 {
-   int64_t v;
-
printf(test: strtoll\n);
 
-   v = strtoll(15, NULL, 10);
-   if (v != 15) {
-   printf(failure: strtoll [\n
-  strtoll failed: %lld != 15\n
-  ]\n,
-  v);
-   return false;
-   }
+#define TEST_STRTOLL(str,base,res,diff,errnoo) TEST_STRTO_X(int64_t, %lld, 
strtoll,str,base,res,diff,errnoo)
 
-   v = strtoll(10, NULL, 16);
-   if (v != 16) {
-   printf(failure: strtoll [\n
-  strtoll hex failed: %lld != 16\n
-  ]\n,
-  v);
-   return false;
-   }
+   TEST_STRTOLL(15,  10, 15LL,   2, 0);
+   TEST_STRTOLL(  15,10, 15LL,   4, 0);
+   TEST_STRTOLL(15,  0,  15LL,   2, 0);
+   TEST_STRTOLL( 15 ,0,  15LL,   3, 0);
+   TEST_STRTOLL(+15, 10, 15LL,   3, 0);
+   TEST_STRTOLL(  +15,   10, 15LL,   5, 0);
+   TEST_STRTOLL(+15, 0,  15LL,   3, 0);
+   TEST_STRTOLL( +15 ,   0,  15LL,   4, 0);
+   TEST_STRTOLL(-15, 10, -15LL,  3, 0);
+   TEST_STRTOLL(  -15,   10, -15LL,  5, 0);
+   TEST_STRTOLL(-15, 0,  -15LL,  3, 0);
+   TEST_STRTOLL( -15 ,   0,  -15LL,  4, 0);
+   TEST_STRTOLL(015, 10, 15LL,   3, 0);
+   TEST_STRTOLL(  015,   10, 15LL,   5, 0);
+   TEST_STRTOLL(015, 0,  13LL,   3, 0);
+   TEST_STRTOLL(  015,   0,  13LL,   5, 0);
+   TEST_STRTOLL(0x15,10, 0LL,1, 0);
+   TEST_STRTOLL(  0x15,  10, 0LL,3, 0);
+   TEST_STRTOLL(0x15,0,  21LL,   4, 0);
+   TEST_STRTOLL(  0x15,  0,  21LL,   6, 0);
 
-   v = strtoll(11, NULL, 2);
-   if (v != 3) {
-   printf(failure: strtoll [\n
-  strtoll binary failed: %lld != 3\n
-  ]\n,
-  v);
-   return false;
-   }
+   TEST_STRTOLL(10,  16, 16LL,   2, 0);
+   TEST_STRTOLL(  10 ,   16, 16LL,   4, 0);
+   TEST_STRTOLL(0x10,16, 16LL,   4, 0);
+   TEST_STRTOLL(0x10,0,  16LL,   4, 0);
+   TEST_STRTOLL( 0x10 ,  0,  16LL,   5, 0);
+   TEST_STRTOLL(+10, 16, 16LL,   3, 0);
+   TEST_STRTOLL(  +10 ,  16, 16LL,   5, 0);
+   TEST_STRTOLL(+0x10,   16, 16LL,   5, 0);
+   TEST_STRTOLL(+0x10,   0,  16LL,   5, 0);
+   TEST_STRTOLL( +0x10 , 0,  16LL,   6, 0);
+   TEST_STRTOLL(-10, 16, -16LL,  3, 0);
+   TEST_STRTOLL(  -10 ,  16, -16LL,  5, 0);
+   TEST_STRTOLL(-0x10,   16, -16LL,  5, 0);
+   

svn commit: samba r22280 - in branches/SAMBA_3_0/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:56:42 + (Mon, 16 Apr 2007)
New Revision: 22280

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

Log:
merge from samba4:

add a lot more detailed strtoll() and strtoull() tests

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-04-16 
19:55:51 UTC (rev 22279)
+++ branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-04-16 
19:56:42 UTC (rev 22280)
@@ -476,76 +476,274 @@
return true;
 }
 
+#define TEST_STRTO_X(type,fmt,func,str,base,res,diff,rrnoo) do {\
+   type _v; \
+   char _s[64]; \
+   char *_p = NULL;\
+   char *_ep = NULL; \
+   strlcpy(_s, str, sizeof(_s));\
+   if (diff = 0) { \
+   _ep = _s[diff]; \
+   } \
+   errno = 0; \
+   _v = func(_s, _p, base); \
+   if (errno != rrnoo) { \
+   printf(failure: %s [\n \
+  \t%s\n \
+  \t%s(\%s\,%d,%d):  fmt  (=/!)=  fmt \n \
+  \terrno: %d != %d\n \
+  ]\n, \
+   __STRING(func), __location__, __STRING(func), \
+  str, diff, base, res, _v, rrnoo, errno); \
+   return false; \
+   } else if (_v != res) { \
+   printf(failure: %s [\n \
+  \t%s\n \
+  \t%s(\%s\,%d,%d):  fmt  !=  fmt \n \
+  ]\n, \
+  __STRING(func), __location__, __STRING(func), \
+  str, diff, base, res, _v); \
+   return false; \
+   } else if (_p != _ep) { \
+   printf(failure: %s [\n \
+  \t%s\n \
+  \t%s(\%s\,%d,%d):  fmt  (=/!)=  fmt \n \
+  \tptr: %p - %p = %d != %d\n \
+  ]\n, \
+  __STRING(func), __location__, __STRING(func), \
+  str, diff, base, res, _v, _ep, _p, diff - (_ep - _p), 
diff); \
+   return false; \
+   } \
+} while (0)
+
 static int test_strtoll(void)
 {
-   int64_t v;
-
printf(test: strtoll\n);
 
-   v = strtoll(15, NULL, 10);
-   if (v != 15) {
-   printf(failure: strtoll [\n
-  strtoll failed: %lld != 15\n
-  ]\n,
-  v);
-   return false;
-   }
+#define TEST_STRTOLL(str,base,res,diff,errnoo) TEST_STRTO_X(int64_t, %lld, 
strtoll,str,base,res,diff,errnoo)
 
-   v = strtoll(10, NULL, 16);
-   if (v != 16) {
-   printf(failure: strtoll [\n
-  strtoll hex failed: %lld != 16\n
-  ]\n,
-  v);
-   return false;
-   }
+   TEST_STRTOLL(15,  10, 15LL,   2, 0);
+   TEST_STRTOLL(  15,10, 15LL,   4, 0);
+   TEST_STRTOLL(15,  0,  15LL,   2, 0);
+   TEST_STRTOLL( 15 ,0,  15LL,   3, 0);
+   TEST_STRTOLL(+15, 10, 15LL,   3, 0);
+   TEST_STRTOLL(  +15,   10, 15LL,   5, 0);
+   TEST_STRTOLL(+15, 0,  15LL,   3, 0);
+   TEST_STRTOLL( +15 ,   0,  15LL,   4, 0);
+   TEST_STRTOLL(-15, 10, -15LL,  3, 0);
+   TEST_STRTOLL(  -15,   10, -15LL,  5, 0);
+   TEST_STRTOLL(-15, 0,  -15LL,  3, 0);
+   TEST_STRTOLL( -15 ,   0,  -15LL,  4, 0);
+   TEST_STRTOLL(015, 10, 15LL,   3, 0);
+   TEST_STRTOLL(  015,   10, 15LL,   5, 0);
+   TEST_STRTOLL(015, 0,  13LL,   3, 0);
+   TEST_STRTOLL(  015,   0,  13LL,   5, 0);
+   TEST_STRTOLL(0x15,10, 0LL,1, 0);
+   TEST_STRTOLL(  0x15,  10, 0LL,3, 0);
+   TEST_STRTOLL(0x15,0,  21LL,   4, 0);
+   TEST_STRTOLL(  0x15,  0,  21LL,   6, 0);
 
-   v = strtoll(11, NULL, 2);
-   if (v != 3) {
-   printf(failure: strtoll [\n
-  strtoll binary failed: %lld != 3\n
-  ]\n,
-  v);
-   return false;
-   }
+   TEST_STRTOLL(10,  16, 16LL,   2, 0);
+   TEST_STRTOLL(  10 ,   16, 16LL,   4, 0);
+   TEST_STRTOLL(0x10,16, 16LL,   4, 0);
+   TEST_STRTOLL(0x10,0,  16LL,   4, 0);
+   TEST_STRTOLL( 0x10 ,  0,  16LL,   5, 0);
+   TEST_STRTOLL(+10, 16, 16LL,   3, 0);
+   TEST_STRTOLL(  +10 ,  16, 16LL,   5, 0);
+   TEST_STRTOLL(+0x10,   16, 16LL,   5, 0);
+   TEST_STRTOLL(+0x10,   0,  16LL,   5, 0);
+   TEST_STRTOLL( +0x10 , 0,  16LL,   6, 0);
+   TEST_STRTOLL(-10, 16, -16LL,  3, 0);
+   TEST_STRTOLL(  -10 ,  16, -16LL,  5, 0);
+   TEST_STRTOLL(-0x10,   16, -16LL,  5, 0);
+  

Rev 11875: Convert mksamba4server script to perl. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-04-16 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11875
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Mon 2007-04-16 22:35:19 +0200
message:
  Convert mksamba4server script to perl.
renamed:
  source/script/tests/mksamba4server.sh = 
source/script/tests/mksamba4server.pl svn-v2:[EMAIL PROTECTED]
modified:
  source/script/tests/Samba4.pm  svn-v2:[EMAIL PROTECTED]
  source/script/tests/mk-fedora-ds.sh svn-v2:[EMAIL PROTECTED]
  source/script/tests/mk-keyblobs.sh svn-v2:[EMAIL PROTECTED]
  source/script/tests/mk-openldap.sh svn-v2:[EMAIL PROTECTED]
  source/torture/local/torture.c svn-v2:[EMAIL PROTECTED]
  source/script/tests/mksamba4server.pl svn-v2:[EMAIL PROTECTED]
=== renamed file 'source/script/tests/mksamba4server.sh' = 
'source/script/tests/mksamba4server.pl'
--- a/source/script/tests/mksamba4server.sh 2007-04-16 10:44:26 +
+++ b/source/script/tests/mksamba4server.pl 2007-04-16 20:35:19 +
@@ -1,86 +1,89 @@
-#!/bin/sh
+#!/usr/bin/perl
 # Build a test environment for running Samba
 
-if [ $# -lt 1 ]
-then
-   echo $0 PREFIX
-   exit 1
-fi
-
-PREFIX=$1
-
-if test -z $SHARE_BACKEND; then
-   SHARE_BACKEND=classic
-fi
-
-if test -z $SMBD_LOGLEVEL; then
-   SMBD_LOGLEVEL=1
-fi
-
-if test -z $SERVER_ROLE; then
-   SERVER_ROLE=domain controller
-fi
-
-DOMAIN=SAMBADOMAIN
-USERNAME=administrator
-REALM=SAMBA.EXAMPLE.COM
-DNSNAME=samba.example.com
-BASEDN=dc=samba,dc=example,dc=com
-PASSWORD=penguin
-SRCDIR=`pwd`
-ROOT=$USER
-SERVER=localhost
-NETBIOSNAME=localtest
-if test -z $ROOT; then
-ROOT=$LOGNAME
-fi
-if test -z $ROOT; then
-ROOT=`whoami`
-fi
-
-oldpwd=`pwd`
-srcdir=`dirname $0`/../..
-mkdir -p $PREFIX || exit $?
-cd $PREFIX
-PREFIX_ABS=`pwd`
-cd $oldpwd
-
-TMPDIR=$PREFIX_ABS/tmp
-ETCDIR=$PREFIX_ABS/etc
-PIDDIR=$PREFIX_ABS/pid
-CONFFILE=$ETCDIR/smb.conf
-KRB5_CONFIG=$ETCDIR/krb5.conf
-PRIVATEDIR=$PREFIX_ABS/private
-NCALRPCDIR=$PREFIX_ABS/ncalrpc
-LOCKDIR=$PREFIX_ABS/lockdir
-
-WINBINDD_SOCKET_DIR=$PREFIX_ABS/winbind_socket
-CONFIGURATION=--configfile=$CONFFILE
-LDAPDIR=$PREFIX_ABS/ldap
-
-rm -rf $PREFIX/*
-mkdir -p $PRIVATEDIR $ETCDIR $PIDDIR $NCALRPCDIR $LOCKDIR $TMPDIR $LDAPDIR/db 
$LDAPDIR/db/bdb-logs $LDAPDIR/db/tmp
-
-cat $CONFFILEEOF
+use Cwd;
+use Getopt::Long;
+use FindBin qw($RealBin $Script);
+use strict;
+
+my $opt_help = undef;
+my $server_role = domain controller;
+my $opt_ldap = undef;
+my $domain = SAMBADOMAIN;
+my $netbiosname = localtest;
+
+my $result = GetOptions(
+   'help|h|?' = \$opt_help,
+   'server-role:s' = \$server_role,
+   'ldap:s' = \$opt_ldap,
+   'domain:s' = \$domain,
+   'netbios-name:s' = \$netbiosname,
+);
+
+if (not $result) {
+   exit(1);
+}
+
+if (scalar(@ARGV) == 0) {
+   print Usage: $Script [OPTIONS] PREFIX\n;
+   exit(1);
+}
+
+my $prefix = shift @ARGV;
+
+my $share_backend = classic;
+my $smbd_loglevel = 1;
+my $username = administrator;
+my $realm = SAMBA.EXAMPLE.COM;
+my $dnsname = samba.example.com;
+my $basedn = dc=samba,dc=example,dc=com;
+my $password = penguin;
+my $root = ($ENV{USER} or $ENV{LOGNAME} or `whoami`);
+my $server = localhost;
+my $srcdir=$RealBin/../..;
+-d $prefix or mkdir($prefix) or die(Unable to create $prefix);
+my $prefix_abs = getcwd()./.$prefix;
+
+my $tmpdir = $prefix_abs/tmp;
+my $etcdir = $prefix_abs/etc;
+my $piddir = $prefix_abs/pid;
+my $conffile = $etcdir/smb.conf;
+my $krb5_config = $etcdir/krb5.conf;
+my $privatedir = $prefix_abs/private;
+my $ncalrpcdir = $prefix_abs/ncalrpc;
+my $lockdir= $prefix_abs/lockdir;
+
+my $winbindd_socket_dir = $prefix_abs/winbind_socket;
+my $configuration = --configfile=$conffile;
+my $ldapdir = $prefix_abs/ldap;
+
+my $tlsdir = $privatedir/tls;
+
+(system(rm -rf $prefix/*) == 0) or die(Unable to clean up);
+mkdir($_) foreach ($privatedir, $etcdir, $piddir, $ncalrpcdir, $lockdir, 
+   $tmpdir);
+
+open(CONFFILE, $conffile);
+print CONFFILE 
 [global]
-   netbios name = $NETBIOSNAME
-   netbios aliases = $SERVER
-   workgroup = $DOMAIN
-   realm = $REALM
-   private dir = $PRIVATEDIR
-   pid directory = $PIDDIR
-   ncalrpc dir = $NCALRPCDIR
-   lock dir = $LOCKDIR
-   share backend = $SHARE_BACKEND
-   setup directory = $SRCDIR/setup
-   js include = $SRCDIR/scripting/libjs
-   winbindd socket directory = $WINBINDD_SOCKET_DIR
+   netbios name = $netbiosname
+   netbios aliases = $server
+   workgroup = $domain
+   realm = $realm
+   private dir = $privatedir
+   pid directory = $piddir
+   ncalrpc dir = $ncalrpcdir
+   lock dir = $lockdir
+   share backend = $share_backend
+   setup directory = $srcdir/setup
+   js include = $srcdir/scripting/libjs
+   winbindd socket directory = $winbindd_socket_dir
name resolve order = bcast
interfaces = 

svn commit: samba r22281 - in branches/SAMBA_3_0_25/source/lib/replace/test: .

2007-04-16 Thread metze
Author: metze
Date: 2007-04-16 19:57:11 + (Mon, 16 Apr 2007)
New Revision: 22281

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

Log:
merge from samba4:

add a lot more detailed strtoll() and strtoull() tests

metze
Modified:
   branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c   2007-04-16 
19:56:42 UTC (rev 22280)
+++ branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c   2007-04-16 
19:57:11 UTC (rev 22281)
@@ -476,76 +476,274 @@
return true;
 }
 
+#define TEST_STRTO_X(type,fmt,func,str,base,res,diff,rrnoo) do {\
+   type _v; \
+   char _s[64]; \
+   char *_p = NULL;\
+   char *_ep = NULL; \
+   strlcpy(_s, str, sizeof(_s));\
+   if (diff = 0) { \
+   _ep = _s[diff]; \
+   } \
+   errno = 0; \
+   _v = func(_s, _p, base); \
+   if (errno != rrnoo) { \
+   printf(failure: %s [\n \
+  \t%s\n \
+  \t%s(\%s\,%d,%d):  fmt  (=/!)=  fmt \n \
+  \terrno: %d != %d\n \
+  ]\n, \
+   __STRING(func), __location__, __STRING(func), \
+  str, diff, base, res, _v, rrnoo, errno); \
+   return false; \
+   } else if (_v != res) { \
+   printf(failure: %s [\n \
+  \t%s\n \
+  \t%s(\%s\,%d,%d):  fmt  !=  fmt \n \
+  ]\n, \
+  __STRING(func), __location__, __STRING(func), \
+  str, diff, base, res, _v); \
+   return false; \
+   } else if (_p != _ep) { \
+   printf(failure: %s [\n \
+  \t%s\n \
+  \t%s(\%s\,%d,%d):  fmt  (=/!)=  fmt \n \
+  \tptr: %p - %p = %d != %d\n \
+  ]\n, \
+  __STRING(func), __location__, __STRING(func), \
+  str, diff, base, res, _v, _ep, _p, diff - (_ep - _p), 
diff); \
+   return false; \
+   } \
+} while (0)
+
 static int test_strtoll(void)
 {
-   int64_t v;
-
printf(test: strtoll\n);
 
-   v = strtoll(15, NULL, 10);
-   if (v != 15) {
-   printf(failure: strtoll [\n
-  strtoll failed: %lld != 15\n
-  ]\n,
-  v);
-   return false;
-   }
+#define TEST_STRTOLL(str,base,res,diff,errnoo) TEST_STRTO_X(int64_t, %lld, 
strtoll,str,base,res,diff,errnoo)
 
-   v = strtoll(10, NULL, 16);
-   if (v != 16) {
-   printf(failure: strtoll [\n
-  strtoll hex failed: %lld != 16\n
-  ]\n,
-  v);
-   return false;
-   }
+   TEST_STRTOLL(15,  10, 15LL,   2, 0);
+   TEST_STRTOLL(  15,10, 15LL,   4, 0);
+   TEST_STRTOLL(15,  0,  15LL,   2, 0);
+   TEST_STRTOLL( 15 ,0,  15LL,   3, 0);
+   TEST_STRTOLL(+15, 10, 15LL,   3, 0);
+   TEST_STRTOLL(  +15,   10, 15LL,   5, 0);
+   TEST_STRTOLL(+15, 0,  15LL,   3, 0);
+   TEST_STRTOLL( +15 ,   0,  15LL,   4, 0);
+   TEST_STRTOLL(-15, 10, -15LL,  3, 0);
+   TEST_STRTOLL(  -15,   10, -15LL,  5, 0);
+   TEST_STRTOLL(-15, 0,  -15LL,  3, 0);
+   TEST_STRTOLL( -15 ,   0,  -15LL,  4, 0);
+   TEST_STRTOLL(015, 10, 15LL,   3, 0);
+   TEST_STRTOLL(  015,   10, 15LL,   5, 0);
+   TEST_STRTOLL(015, 0,  13LL,   3, 0);
+   TEST_STRTOLL(  015,   0,  13LL,   5, 0);
+   TEST_STRTOLL(0x15,10, 0LL,1, 0);
+   TEST_STRTOLL(  0x15,  10, 0LL,3, 0);
+   TEST_STRTOLL(0x15,0,  21LL,   4, 0);
+   TEST_STRTOLL(  0x15,  0,  21LL,   6, 0);
 
-   v = strtoll(11, NULL, 2);
-   if (v != 3) {
-   printf(failure: strtoll [\n
-  strtoll binary failed: %lld != 3\n
-  ]\n,
-  v);
-   return false;
-   }
+   TEST_STRTOLL(10,  16, 16LL,   2, 0);
+   TEST_STRTOLL(  10 ,   16, 16LL,   4, 0);
+   TEST_STRTOLL(0x10,16, 16LL,   4, 0);
+   TEST_STRTOLL(0x10,0,  16LL,   4, 0);
+   TEST_STRTOLL( 0x10 ,  0,  16LL,   5, 0);
+   TEST_STRTOLL(+10, 16, 16LL,   3, 0);
+   TEST_STRTOLL(  +10 ,  16, 16LL,   5, 0);
+   TEST_STRTOLL(+0x10,   16, 16LL,   5, 0);
+   TEST_STRTOLL(+0x10,   0,  16LL,   5, 0);
+   TEST_STRTOLL( +0x10 , 0,  16LL,   6, 0);
+   TEST_STRTOLL(-10, 16, -16LL,  3, 0);
+   TEST_STRTOLL(  -10 ,  16, -16LL,  5, 0);
+   TEST_STRTOLL(-0x10,   16, -16LL,  5, 

svn commit: samba r22282 - in branches: SAMBA_3_0/source/utils SAMBA_3_0/source/web SAMBA_3_0_25/source/utils SAMBA_3_0_25/source/web

2007-04-16 Thread jra
Author: jra
Date: 2007-04-16 20:06:02 + (Mon, 16 Apr 2007)
New Revision: 22282

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

Log:
Fix last few name - servicename changes.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/utils/net_status.c
   branches/SAMBA_3_0/source/utils/status.c
   branches/SAMBA_3_0/source/web/statuspage.c
   branches/SAMBA_3_0_25/source/utils/net_status.c
   branches/SAMBA_3_0_25/source/utils/status.c
   branches/SAMBA_3_0_25/source/web/statuspage.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_status.c
===
--- branches/SAMBA_3_0/source/utils/net_status.c2007-04-16 19:57:11 UTC 
(rev 22281)
+++ branches/SAMBA_3_0/source/utils/net_status.c2007-04-16 20:06:02 UTC 
(rev 22282)
@@ -102,7 +102,7 @@
}
 
d_printf(%-10.10s   %s   %-12s  %s,
-  crec.name,procid_str_static(crec.pid),
+  crec.servicename,procid_str_static(crec.pid),
   crec.machine,
   time_to_asc(crec.start));
 
@@ -168,7 +168,7 @@
}
 
d_printf(%s\\%s\\%s\\%s\\%s\\%s\\%s,
-crec.name,procid_str_static(crec.pid),
+crec.servicename,procid_str_static(crec.pid),
 guest ?  : uidtoname(ids-entries[i].uid),
 guest ?  : gidtoname(ids-entries[i].gid),
 crec.machine, 

Modified: branches/SAMBA_3_0/source/utils/status.c
===
--- branches/SAMBA_3_0/source/utils/status.c2007-04-16 19:57:11 UTC (rev 
22281)
+++ branches/SAMBA_3_0/source/utils/status.c2007-04-16 20:06:02 UTC (rev 
22282)
@@ -205,7 +205,7 @@
}
 
d_printf(%-10s   %s   %-12s  %s,
-  crec.name,procid_str_static(crec.pid),
+  crec.servicename,procid_str_static(crec.pid),
   crec.machine,
   time_to_asc(crec.start));
 

Modified: branches/SAMBA_3_0/source/web/statuspage.c
===
--- branches/SAMBA_3_0/source/web/statuspage.c  2007-04-16 19:57:11 UTC (rev 
22281)
+++ branches/SAMBA_3_0/source/web/statuspage.c  2007-04-16 20:06:02 UTC (rev 
22282)
@@ -230,7 +230,7 @@
return 0;
 

printf(trtd%s/tdtd%s/tdtd%s/tdtd%s/tdtd%s/tdtd%s/td/tr\n,
-  crec.name,uidtoname(crec.uid),
+  crec.servicename,uidtoname(crec.uid),
   gidtoname(crec.gid),procid_str_static(crec.pid),
   crec.machine,
   tstring(crec.start));

Modified: branches/SAMBA_3_0_25/source/utils/net_status.c
===
--- branches/SAMBA_3_0_25/source/utils/net_status.c 2007-04-16 19:57:11 UTC 
(rev 22281)
+++ branches/SAMBA_3_0_25/source/utils/net_status.c 2007-04-16 20:06:02 UTC 
(rev 22282)
@@ -102,7 +102,7 @@
}
 
d_printf(%-10.10s   %s   %-12s  %s,
-  crec.name,procid_str_static(crec.pid),
+  crec.servicename,procid_str_static(crec.pid),
   crec.machine,
   time_to_asc(crec.start));
 
@@ -168,7 +168,7 @@
}
 
d_printf(%s\\%s\\%s\\%s\\%s\\%s\\%s,
-crec.name,procid_str_static(crec.pid),
+crec.servicename,procid_str_static(crec.pid),
 guest ?  : uidtoname(ids-entries[i].uid),
 guest ?  : gidtoname(ids-entries[i].gid),
 crec.machine, 

Modified: branches/SAMBA_3_0_25/source/utils/status.c
===
--- branches/SAMBA_3_0_25/source/utils/status.c 2007-04-16 19:57:11 UTC (rev 
22281)
+++ branches/SAMBA_3_0_25/source/utils/status.c 2007-04-16 20:06:02 UTC (rev 
22282)
@@ -205,7 +205,7 @@
}
 
d_printf(%-10s   %s   %-12s  %s,
-  crec.name,procid_str_static(crec.pid),
+  crec.servicename,procid_str_static(crec.pid),
   crec.machine,
   time_to_asc(crec.start));
 

Modified: branches/SAMBA_3_0_25/source/web/statuspage.c
===
--- branches/SAMBA_3_0_25/source/web/statuspage.c   2007-04-16 19:57:11 UTC 
(rev 22281)
+++ branches/SAMBA_3_0_25/source/web/statuspage.c   2007-04-16 20:06:02 UTC 
(rev 22282)
@@ -230,7 +230,7 @@
return 0;
 

printf(trtd%s/tdtd%s/tdtd%s/tdtd%s/tdtd%s/tdtd%s/td/tr\n,
-  crec.name,uidtoname(crec.uid),
+  crec.servicename,uidtoname(crec.uid),
   gidtoname(crec.gid),procid_str_static(crec.pid),
   crec.machine,
   tstring(crec.start));



svn commit: samba r22284 - in branches/SAMBA_4_0/testprogs/blackbox: .

2007-04-16 Thread abartlet
Author: abartlet
Date: 2007-04-16 22:19:51 + (Mon, 16 Apr 2007)
New Revision: 22284

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

Log:
Make this script executable

Modified:
   branches/SAMBA_4_0/testprogs/blackbox/test_kinit.sh


Changeset:

Property changes on: branches/SAMBA_4_0/testprogs/blackbox/test_kinit.sh
___
Name: svn:executable
   + *



Rev 11880: Keep a clearer track of what ldap implementation to use. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-04-16 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11880
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 01:30:38 +0200
message:
  Keep a clearer track of what ldap implementation to use.
modified:
  source/script/tests/Samba4.pm  svn-v2:[EMAIL PROTECTED]
  source/script/tests/selftest.pl svn-v2:[EMAIL PROTECTED]
=== modified file 'source/script/tests/Samba4.pm'
--- a/source/script/tests/Samba4.pm 2007-04-16 23:13:08 +
+++ b/source/script/tests/Samba4.pm 2007-04-16 23:30:38 +
@@ -11,7 +11,12 @@
 
 sub new() {
my ($classname, $bindir, $ldap, $setupdir) = @_;
-   my $self = { vars = {}, ldap = $ldap, bindir = $bindir, setupdir = 
$setupdir };
+   my $self = { 
+   vars = {}, 
+   ldap = $ldap, 
+   bindir = $bindir, 
+   setupdir = $setupdir 
+   };
bless $self;
return $self;
 }
@@ -26,9 +31,9 @@
 
# running slapd in the background means it stays in the same process 
group, so it can be
# killed by timelimit
-   if (defined($ENV{FEDORA_DS_PREFIX})) {
+   if ($self-{ldap} eq fedora) {
system($ENV{FEDORA_DS_PREFIX}/sbin/ns-slapd -D 
$env_vars-{FEDORA_DS_DIR} -d$env_vars-{FEDORA_DS_LOGLEVEL} -i 
$env_vars-{FEDORA_DS_PIDFILE} $env_vars-{LDAPDIR}/logs 21 );
-   } else {
+   } elsif ($self-{ldap} eq openldap) {
my $oldpath = $ENV{PATH};
$ENV{PATH} = /usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH};
system(slapd -d$env_vars-{OPENLDAP_LOGLEVEL} -f $conf -h $uri 
 $env_vars-{LDAPDIR}/logs 21 );
@@ -48,9 +53,9 @@
 sub slapd_stop($$)
 {
my ($self, $envvars) = @_;
-   if (defined($ENV{FEDORA_DS_PREFIX})) {
+   if ($self-{ldap} eq fedora) {
system($envvars-{LDAPDIR}/slapd-samba4/stop-slapd);
-   } else {
+   } elsif ($self-{ldap} eq openldap) {
open(IN, $envvars-{OPENLDAP_PIDFILE}) or 
die(unable to open slapd pid file: 
$envvars-{OPENLDAP_PIDFILE});
kill 9, IN;
@@ -64,7 +69,7 @@
return 0 if ( -p $env_vars-{SMBD_TEST_FIFO});
 
# Start slapd before smbd
-   if ($self-{ldap}) {
+   if (defined($self-{ldap})) {
$self-slapd_start($env_vars) or 
die(couldn't start slapd);
 
@@ -159,9 +164,9 @@
 );
 }
 
-sub provision($$)
+sub provision($)
 {
-   my ($self, $prefix, $server_role, $domain, $netbiosname, $ldap) = @_;
+   my ($self, $prefix, $server_role, $domain, $netbiosname) = @_;
 
my $smbd_loglevel = 1;
my $username = administrator;
@@ -321,12 +326,12 @@
$ldap_uri = ldapi://$ldap_uri;
my $provision_aci = ; # FIXME
 
-   if (not defined($ldap)) {
-   } elsif ($ldap eq openldap) {
+   if (not defined($self-{ldap})) {
+   } elsif ($self-{ldap} eq openldap) {
mkdir($_) foreach ($ldapdir, $ldapdir/db, 
$ldapdir/db/bdb-logs, 
$ldapdir/db/tmp);
system($RealBin/mk-openldap.sh) == 0 or die(Unable to create 
openldap directories);
-   } elsif ($ldap eq fedora) {
+   } elsif ($self-{ldap} eq fedora) {
system($RealBin/mk-fedora-ds.sh) == 0 or die(Unable to 
create fedora ds directories);
push (@provision_options, --ldap-module=nsuniqueid);
}
@@ -355,9 +360,7 @@
print PROVISIONING MEMBER...;
 
my $ret = $self-provision($prefix, member server, SAMBADOMAIN, 
-   localmember, 
-   undef  # LDAP
-   );
+   localmember);
 
$ret or die(Unable to provision);
 
@@ -374,9 +377,7 @@
 
print PROVISIONING DC...;
my $ret = $self-provision($prefix, domain controller, SAMBADOMAIN, 
-   localtest, 
-   undef  # LDAP
-   );
+   localtest);
 
$self-add_wins_config($prefix/private) or 
die(Unable to add wins configuration);

=== modified file 'source/script/tests/selftest.pl'
--- a/source/script/tests/selftest.pl   2007-04-16 22:35:13 +
+++ b/source/script/tests/selftest.pl   2007-04-16 23:30:38 +
@@ -130,7 +130,7 @@
 my $opt_skip = undef;
 my $opt_verbose = 0;
 my $opt_testenv = 0;
-my $opt_ldap = undef;
+my $ldap = undef;
 my $opt_analyse_cmd = undef;
 my $opt_resetup_env = undef;
 
@@ -308,7 +308,7 @@
  --socket-wrapper-pcap=FILE save traffic to pcap file
  --socket-wrapper   enable socket wrapper
  --expected-failures=FILE   specify list of tests that is guaranteed to fail
- --ldap run against ldap
+ --ldap=openldap|fedora back smbd onto specified ldap server
 
 Behaviour:
  --quickrun quick overall test
@@ -335,7 +335,7 @@
'builddir=s' = \$builddir,

svn commit: samba r22285 - in branches: SAMBA_3_0/source/param SAMBA_3_0_25/source/param

2007-04-16 Thread jra
Author: jra
Date: 2007-04-16 22:42:45 + (Mon, 16 Apr 2007)
New Revision: 22285

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

Log:
Allow arbitrary bases in int and ulong parsing.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/param/loadparm.c
   branches/SAMBA_3_0_25/source/param/loadparm.c


Changeset:
Modified: branches/SAMBA_3_0/source/param/loadparm.c
===
--- branches/SAMBA_3_0/source/param/loadparm.c  2007-04-16 22:19:51 UTC (rev 
22284)
+++ branches/SAMBA_3_0/source/param/loadparm.c  2007-04-16 22:42:45 UTC (rev 
22285)
@@ -2232,7 +2232,7 @@
return (-1);
}
 
-   return atoi(s); 
+   return (int)strtol(s, NULL, 0);
 }
 
 /***
@@ -2246,7 +2246,7 @@
return (0);
}
 
-   return strtoul(s, NULL, 10);
+   return strtoul(s, NULL, 0);
 }
 
 /***

Modified: branches/SAMBA_3_0_25/source/param/loadparm.c
===
--- branches/SAMBA_3_0_25/source/param/loadparm.c   2007-04-16 22:19:51 UTC 
(rev 22284)
+++ branches/SAMBA_3_0_25/source/param/loadparm.c   2007-04-16 22:42:45 UTC 
(rev 22285)
@@ -2229,7 +2229,7 @@
return (-1);
}
 
-   return atoi(s); 
+   return (int)strtol(s, NULL, 0);
 }
 
 /***
@@ -2243,7 +2243,7 @@
return (0);
}
 
-   return strtoul(s, NULL, 10);
+   return strtoul(s, NULL, 0);
 }
 
 /***



Rev 5364: Changes of the registry also trigger a reload of smb.conf. in http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/

2007-04-16 Thread Michael Adam
At http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/


revno: 5364
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Michael Adam [EMAIL PROTECTED]
branch nick: SAMBA_3_0-registry.bzr
timestamp: Tue 2007-04-17 01:01:51 +0200
message:
  Changes of the registry also trigger a reload of smb.conf.
  
  This is a first slighty hacked version of a registry watcher
  in lp_file_list_changed. It uses the regdb sequence number
  to decide whether the contents of the registry has changed.
  The hack here is that the call to registry_init_regdb() 
  is now there in process_registry_shares() and and in 
  lp_file_list_changed(). It is needed in the latter function
  because when a new smbd process is started, lp_file_list_changed 
  is called before lp_load(). Maybe, I have to think of a better
  place to call regdb_init()... 
modified:
  source/param/loadparm.cloadparm.c-20060530022627-1efa1edb3eb0e897
=== modified file 'source/param/loadparm.c'
--- a/source/param/loadparm.c   2007-04-15 22:30:33 +
+++ b/source/param/loadparm.c   2007-04-16 23:01:51 +
@@ -80,6 +80,9 @@
 #define INCLUDE_REGISTRY_NAME registry
 #endif
 
+static int regdb_last_seqnum = 0;
+static BOOL include_registry_globals = False;
+
 /* some helpful bits */
 #define LP_SNUM_OK(i) (((i) = 0)  ((i)  iNumServices)  (ServicePtrs != 
NULL)  ServicePtrs[(i)]-valid)
 #define VALID(i) (ServicePtrs != NULL  ServicePtrs[i]-valid)
@@ -3084,6 +3087,24 @@
 
DEBUG(6, (lp_file_list_changed()\n));
 
+
+   /* hack - should't this go somewhere else?!
+* now it is here and in process_registry_globals. 
+* so whichever function is called first wil init the
+* regdb. here we need it for querying the regdb seqnum */
+   if (!registry_init_regdb()) {
+   DEBUG(1, (Error initializing the registry.\n));
+   return False;
+   }
+
+   if (include_registry_globals 
+   (regdb_last_seqnum != regdb_get_seqnum()))
+   {
+   DEBUGADD(6, (regdb seqnum changed: old = %d, new = %d\n,
+regdb_last_seqnum, regdb_get_seqnum()));
+   return True;
+   }
+
while (f) {
pstring n2;
time_t mod_time;
@@ -3193,6 +3214,8 @@
smb_panic(Failed to create talloc context!);
}
 
+   include_registry_globals = True;
+
/* It might not bee to clean to have the initialization here.
 * If the registry is already initialized, it does not do
 * any harm. */
@@ -3231,7 +3254,7 @@
pfunc(valname, value-v.sz.str);
break;
default:
-   /* ignore */
+   /* ignore other types */
break;
}
TALLOC_FREE(value);
@@ -3240,6 +3263,8 @@
 
ret = pfunc(registry shares, yes);
 
+   regdb_last_seqnum = regdb_get_seqnum();
+
 done:
talloc_destroy(ctx);
return ret;



Rev 11881: Convert ldap provision code to perl. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-04-16 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11881
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 02:13:33 +0200
message:
  Convert ldap provision code to perl.
removed:
  source/script/tests/mk-fedora-ds.sh svn-v2:[EMAIL PROTECTED]
  source/script/tests/mk-openldap.sh svn-v2:[EMAIL PROTECTED]
modified:
  source/script/tests/Samba4.pm  svn-v2:[EMAIL PROTECTED]
=== removed file 'source/script/tests/mk-fedora-ds.sh'
--- a/source/script/tests/mk-fedora-ds.sh   2007-04-16 20:35:19 +
+++ b/source/script/tests/mk-fedora-ds.sh   1970-01-01 00:00:00 +
@@ -1,90 +0,0 @@
-FEDORA_DS_INF=$LDAPDIR/fedorads.inf
-FEDORA_DS_INITIAL_LDIF=$LDAPDIR/fedorads-initial.ldif
-
-echo FEDORA_DS_LOGLEVEL=0
-
-#Make the subdirectory be as fedora DS would expect
-FEDORA_DS_DIR=$LDAPDIR/slapd-samba4
-echo FEDORA_DS_DIR=$FEDORA_DS_DIR
-
-echo FEDORA_DS_PIDFILE=$FEDORA_DS_DIR/logs/slapd-samba4.pid
-
-cat $FEDORA_DS_INF EOF
-[General]
-SuiteSpotUserID = $ROOT
-FullMachineName=   localhost
-ServerRoot=   $LDAPDIR
-
-[slapd]
-ldapifilepath=$LDAPDIR/ldapi
-Suffix= $BASEDN
-RootDN= cn=Manager,$BASEDN
-RootDNPwd= $PASSWORD
-ServerIdentifier= samba4
-InstallLdifFile=$FEDORA_DS_INITIAL_LDIF
-
-inst_dir= $FEDORA_DS_DIR
-config_dir= $FEDORA_DS_DIR
-schema_dir= $FEDORA_DS_DIR/schema
-lock_dir= $FEDORA_DS_DIR/lock
-log_dir= $FEDORA_DS_DIR/logs
-run_dir= $FEDORA_DS_DIR/logs
-db_dir= $FEDORA_DS_DIR/db
-bak_dir= $FEDORA_DS_DIR/bak
-tmp_dir= $FEDORA_DS_DIR/tmp
-ldif_dir= $FEDORA_DS_DIR/ldif
-cert_dir= $FEDORA_DS_DIR
-
-start_server= 0
-
-EOF
-
-cat $FEDORA_DS_INITIAL_LDIFEOF
-# These entries need to be added to get the container for the 
-# provision to be aimed at.
-
-dn: cn=dc=$BASEDN,cn=mapping tree,cn=config
-objectclass: top
-objectclass: extensibleObject
-objectclass: nsMappingTree
-nsslapd-state: backend
-nsslapd-backend: userData
-cn: $BASEDN
-
-dn: cn=userData,cn=ldbm database,cn=plugins,cn=config
-objectclass: extensibleObject
-objectclass: nsBackendInstance
-nsslapd-suffix: $BASEDN
-
-EOF
-
-perl $FEDORA_DS_PREFIX/bin/ds_newinst.pl $FEDORA_DS_INF 2 || exit 1;
-
-( 
- cd $FEDORA_DS_DIR/schema
- ls | grep -v ^00core | xargs rm
-)
-
-cat $FEDORA_DS_DIR/dse.ldifEOF
-dn: cn=bitwise,cn=plugins,cn=config
-objectClass: top
-objectClass: nsSlapdPlugin
-objectClass: extensibleObject
-cn: bitwise
-nsslapd-pluginPath: 
$FEDORA_DS_PREFIX/lib/fedora-ds/plugins/libbitwise-plugin.so
-nsslapd-pluginInitfunc: bitwise_init
-nsslapd-pluginType: matchingRule
-nsslapd-pluginEnabled: on
-nsslapd-pluginId: bitwise
-nsslapd-pluginVersion: 1.1.0a3
-nsslapd-pluginVendor: Fedora Project
-nsslapd-pluginDescription: Allow bitwise matching rules
-
-EOF
-
-$srcdir/bin/ad2oLschema $CONFIGURATION -H $PRIVATEDIR/sam.ldb 
--option=convert:target=fedora-ds -I $srcdir/setup/schema-map-fedora-ds-1.0 -O 
$FEDORA_DS_DIR/schema/99_ad.ldif 2
-
-#it is easier to base64 encode this than correctly escape it:
-# (targetattr = *) (version 3.0;acl full access to all by all;allow 
(all)(userdn = ldap:///anyone;);)
-echo PROVISION_ACI=--aci=aci:: 
KHRhcmdldGF0dHIgPSAiKiIpICh2ZXJzaW9uIDMuMDthY2wgImZ1bGwgYWNjZXNzIHRvIGFsbCBieSBhbGwiO2FsbG93IChhbGwpKHVzZXJkbiA9ICJsZGFwOi8vL2FueW9uZSIpOykK
-

=== removed file 'source/script/tests/mk-openldap.sh'
--- a/source/script/tests/mk-openldap.sh2007-04-16 20:35:19 +
+++ b/source/script/tests/mk-openldap.sh1970-01-01 00:00:00 +
@@ -1,124 +0,0 @@
-SLAPD_CONF=$LDAPDIR/slapd.conf
-export SLAPD_CONF
-echo SLAPD_CONF=$SLAPD_CONF
-
-echo OPENLDAP_LOGLEVEL=0
-OPENLDAP_PIDFILE=$PIDDIR/slapd.pid
-echo OPENLDAP_PIDFILE=$OPENLDAP_PIDFILE
-
-cat $SLAPD_CONF EOF
-loglevel 0
-
-include $LDAPDIR/ad.schema
-
-pidfile$OPENLDAP_PIDFILE
-argsfile   $LDAPDIR/slapd.args
-sasl-realm $DNSNAME
-access to * by * write
-
-allow update_anon
-
-authz-regexp
-  uid=([^,]*),cn=$DNSNAME,cn=digest-md5,cn=auth
-  ldap:///$BASEDN??sub?(samAccountName=\$1)
-
-authz-regexp
-  uid=([^,]*),cn=([^,]*),cn=digest-md5,cn=auth
-  ldap:///$BASEDN??sub?(samAccountName=\$1)
-
-include $LDAPDIR/modules.conf
-
-defaultsearchbase $BASEDN
-
-backendbdb
-databasebdb
-suffix $BASEDN
-rootdn  cn=Manager,$BASEDN
-rootpw  $PASSWORD
-directory  $LDAPDIR/db
-index   objectClass eq
-index   samAccountName eq
-index name eq
-index objectSid eq
-index objectCategory eq
-index member eq
-index uidNumber eq
-index gidNumber eq
-index unixName eq
-index privilege eq
-index nCName eq pres
-index lDAPDisplayName eq
-index subClassOf eq
-index dnsRoot eq
-index nETBIOSName eq pres
-
-#syncprov is stable in OpenLDAP 2.3, and available in 2.2.  
-#We only need this for the contextCSN attribute anyway
-overlay syncprov
-syncprov-checkpoint 100 10
-syncprov-sessionlog 100
-
-EOF
-
-cat  

Rev 119: add an explanation of how to use ctdb_lockwait() in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 119
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-04-17 09:14:52 +1000
message:
  add an explanation of how to use ctdb_lockwait()
modified:
  common/ctdb_lockwait.c 
ctdb_lockwait.c-20070416214118-n1aeonljj3vpdd9q-1
=== modified file 'common/ctdb_lockwait.c'
--- a/common/ctdb_lockwait.c2007-04-16 23:10:52 +
+++ b/common/ctdb_lockwait.c2007-04-16 23:14:52 +
@@ -59,7 +59,16 @@
return 0;
 }
 
+/*
+  setup a non-blocking chainlock on a tdb record. If this function
+  returns NULL then it could not get the chainlock. Otherwise it
+  returns a opaque handle, and will call callback() once it has
+  managed to get the chainlock. You can cancel it by using talloc_free
+  on the returned handle.
 
+  It is the callers responsibility to unlock the chainlock once
+  acquired
+ */
 struct lockwait_handle *ctdb_lockwait(struct ctdb_db_context *ctdb_db,
  TDB_DATA key,
  void (*callback)(void *), void 
*private_data)



Rev 120: add an explanation of ctdb_ltdb_lock_fetch_requeue() in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 120
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-04-17 09:18:20 +1000
message:
  add an explanation of ctdb_ltdb_lock_fetch_requeue()
modified:
  common/ctdb_ltdb.c ctdb_ltdb.c-20061128065342-to93h6eejj5kon81-2
=== modified file 'common/ctdb_ltdb.c'
--- a/common/ctdb_ltdb.c2007-04-16 13:52:14 +
+++ b/common/ctdb_ltdb.c2007-04-16 23:18:20 +
@@ -229,6 +229,21 @@
 /*
   do a non-blocking ltdb_fetch with a locked record, deferring this
   ctdb request until we have the chainlock
+
+  It does the following:
+
+   1) tries to get the chainlock. If it succeeds, then it fetches the record, 
and 
+  returns 0
+
+   2) if it fails to get a chainlock immediately then it sets up a
+   non-blocking chainlock via ctdb_lockwait, and when it gets the
+   chainlock it re-submits this ctdb request to the main packet
+   receive function
+
+   This effectively queues all ctdb requests that cannot be
+   immediately satisfied until it can get the lock. This means that
+   the main ctdb daemon will not block waiting for a chainlock held by
+   a client
  */
 int ctdb_ltdb_lock_fetch_requeue(struct ctdb_db_context *ctdb_db, 
 TDB_DATA key, struct ctdb_ltdb_header *header, 



Rev 5365: merge from upstream in http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/

2007-04-16 Thread Michael Adam
At http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/


revno: 5365
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Michael Adam [EMAIL PROTECTED]
branch nick: SAMBA_3_0-registry.bzr
timestamp: Tue 2007-04-17 01:26:34 +0200
message:
  merge from upstream
removed:
  source/tdb/tdb-20060530022626-c4945d2048b732b7
  source/tdb/Makefile.in Makefile.in-20060823151024-79ea4e845fdfe14a
  source/tdb/aclocal.m4  aclocal.m4-20060823151025-3b4d0f22678fd4c4
  source/tdb/autogen.sh  autogen.sh-20060823151027-977227dca6391fdf
  source/tdb/common/ common-20060823151029-039884a926fe1edb
  source/tdb/common/dump.c   dump.c-20060823151029-433b1b557011ad5a
  source/tdb/common/error.c  error.c-20060823151029-3d84207201e7660e
  source/tdb/common/freelist.c   freelist.c-20060823151029-f12820c2066c7a68
  source/tdb/common/freelistcheck.c 
freelistcheck.c-20061130130727-uf5r442rqar51dkc-1
  source/tdb/common/io.c io.c-20060823151029-637ec4cb476bff18
  source/tdb/common/lock.c   lock.c-20060823151029-46d2c64c2a0bac79
  source/tdb/common/open.c   open.c-20060823151029-1ae0dccc240463aa
  source/tdb/common/tdb.ctdb.c-20060823151029-1368a084072c7537
  source/tdb/common/tdb_private.h tdb_private.h-20060823151029-3c355986ee25e70a
  source/tdb/common/tdbback.ctdbback.c-20060823151029-9911bfec37f4c0dc
  source/tdb/common/transaction.c transaction.c-20060823151029-6cd356e535b2baa2
  source/tdb/common/traverse.c   traverse.c-20060823151029-af2f14f23a9f6fc6
  source/tdb/config.m4   config.m4-20060823151040-3b6c54001563c1cd
  source/tdb/config.mk   config.mk-20060823151042-1f8ccaa9a25613e5
  source/tdb/configure.inconfigure.in-20060823151043-1bee0b7f41fd7ba9
  source/tdb/docs/   docs-20060823151044-31724d5676aa81cf
  source/tdb/docs/README README-20060823151044-69091bab73bcd872
  source/tdb/docs/tdb.magic  tdb.magic-20060823151044-dec701d2cc04b8da
  source/tdb/include/include-20060823151047-7f47d74af2c97e64
  source/tdb/include/tdb.h   tdb.h-20060823151047-af91f430d9608794
  source/tdb/include/tdbback.h   tdbback.h-20060823151047-1e8ad59072140168
  source/tdb/include/tdbconfig.h.in 
tdbconfig.h.in-20060823151047-5373b186cf6fdadb
  source/tdb/swig/   swig-20060823151052-21a6b9655a73fbbf
  source/tdb/swig/Tdb.py Tdb.py-20060823151052-4210f0ca1f256984
  source/tdb/swig/tdb.i  tdb.i-20060823151052-f1868c276c57068f
  source/tdb/tdb.pc.in   tdb.pc.in-20060823151055-9335d2bddf83cbc9
  source/tdb/tools/  tools-20060823151056-f597c2d7c4ab2290
  source/tdb/tools/tdbbackup.c   tdbbackup.c-20060823151056-fc9ebc7259c020ba
  source/tdb/tools/tdbdump.c tdbdump.c-20060823151056-b91e530dcc96cada
  source/tdb/tools/tdbtest.c tdbtest.c-20060823151056-23829ec945e59ec6
  source/tdb/tools/tdbtool.c tdbtool.c-20060823151056-3fc2ae66c2a66158
  source/tdb/tools/tdbtorture.c  tdbtorture.c-20060823151056-1cb96efca74c4a1a
added:
  source/lib/replace/strptime.c  strptime.c-20070415230149-awuo498ptsb5qaf0-1
  source/lib/replace/strptime.m4 strptime.m4-20070415230150-azbrr8pi12rrqa6l-1
  source/lib/replace/test/strptime.c 
strptime.c-20070415230151-yk8ovwuikt3diddm-1
  source/lib/tdb/tdb-2007041647-cebijg5x16vcb45j-1
  source/lib/tdb/Makefile.in makefile.in-2007041647-cebijg5x16vcb45j-2
  source/lib/tdb/aclocal.m4  aclocal.m4-2007041647-cebijg5x16vcb45j-3
  source/lib/tdb/autogen.sh  autogen.sh-2007041647-cebijg5x16vcb45j-4
  source/lib/tdb/common/ common-2007041647-cebijg5x16vcb45j-5
  source/lib/tdb/common/dump.c   dump.c-2007041647-cebijg5x16vcb45j-14
  source/lib/tdb/common/error.c  error.c-2007041647-cebijg5x16vcb45j-15
  source/lib/tdb/common/freelist.c freelist.c-2007041647-cebijg5x16vcb45j-16
  source/lib/tdb/common/freelistcheck.c 
freelistcheck.c-2007041647-cebijg5x16vcb45j-17
  source/lib/tdb/common/io.c io.c-2007041647-cebijg5x16vcb45j-18
  source/lib/tdb/common/lock.c   lock.c-2007041647-cebijg5x16vcb45j-19
  source/lib/tdb/common/open.c   open.c-2007041647-cebijg5x16vcb45j-20
  source/lib/tdb/common/tdb.ctdb.c-2007041647-cebijg5x16vcb45j-21
  source/lib/tdb/common/tdb_private.h 
tdb_private.h-2007041647-cebijg5x16vcb45j-22
  source/lib/tdb/common/tdbback.c tdbback.c-2007041647-cebijg5x16vcb45j-23
  source/lib/tdb/common/transaction.c 
transaction.c-2007041647-cebijg5x16vcb45j-24
  source/lib/tdb/common/traverse.c traverse.c-2007041647-cebijg5x16vcb45j-25
  source/lib/tdb/config.m4   config.m4-2007041647-cebijg5x16vcb45j-6
  source/lib/tdb/config.mk   config.mk-2007041647-cebijg5x16vcb45j-7
  source/lib/tdb/configure.inconfigure.in-2007041647-cebijg5x16vcb45j-8
  source/lib/tdb/docs/   

Rev 11882: Fix running against openldap. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-04-16 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11882
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 02:35:37 +0200
message:
  Fix running against openldap.
modified:
  source/script/tests/Samba4.pm  svn-v2:[EMAIL PROTECTED]
=== modified file 'source/script/tests/Samba4.pm'
--- a/source/script/tests/Samba4.pm 2007-04-17 00:13:33 +
+++ b/source/script/tests/Samba4.pm 2007-04-17 00:35:37 +
@@ -26,7 +26,6 @@
my $count = 0;
my ($self, $env_vars) = @_;
 
-   my $conf = $env_vars-{SLAPD_CONF};
my $uri = $env_vars-{LDAP_URI};
 
# running slapd in the background means it stays in the same process 
group, so it can be
@@ -36,7 +35,7 @@
} elsif ($self-{ldap} eq openldap) {
my $oldpath = $ENV{PATH};
$ENV{PATH} = /usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH};
-   system(slapd -d0 -f $conf -h $uri  $env_vars-{LDAPDIR}/logs 
21 );
+   system(slapd -d0 -f $env_vars-{SLAPD_CONF} -h $uri  
$env_vars-{LDAPDIR}/logs 21 );
$ENV{PATH} = $oldpath;
}
while (system($self-{bindir}/ldbsearch -H $uri -s base -b \\ 
supportedLDAPVersion  /dev/null) != 0) {
@@ -229,7 +228,7 @@
 
system(perl $ENV{FEDORA_DS_PREFIX}/bin/ds_newinst.pl $fedora_ds_inf 
2) == 0 or return 0;
 
-   unlink($fedora_ds_dir/schema/00core.*);
+   system($fedora_ds_dir/schema/00core.*);
 
open(LDIF, $fedora_ds_dir/dse.ldif);
print LDIF 
@@ -295,7 +294,7 @@
 suffix \$basedn\
 rootdn  \cn=Manager,$basedn\
 rootpw  $password
-directory  \$ldapdir/db
+directory  $ldapdir/db
 index   objectClass eq
 index   samAccountName eq
 index name eq
@@ -363,9 +362,9 @@
open(CONF, $modconf); close(CONF);
 
if (system(slaptest -u -f $slapd_conf 2) != 0) {
-   open(CONF, modconf); 
+   open(CONF, $modconf); 
# enable slapd modules
-   print 
+   print CONF 
 modulepath /usr/lib/ldap
 moduleload back_bdb
 moduleload syncprov
@@ -373,16 +372,15 @@
close(CONF);
}
 
-   if (system(slaptest -u -f $slapd_conf) == 0) {
-   system(slapadd -f $slapd_conf  $privatedir/$dnsname.ldif /dev/null) 
== 0 or die(slapadd failed);
-}
+   system(slaptest -u -f $slapd_conf) == 0 or die(slaptest still fails 
after adding modules);
+   system(slapadd -f $slapd_conf  $privatedir/$dnsname.ldif /dev/null) 
== 0 or die(slapadd failed);
 
 system(slaptest -f $slapd_conf /dev/null) == 0 or 
die (slaptest after database load failed);
 
$ENV{PATH} = $oldpath;
 
-   return $pidfile;
+   return ($slapd_conf, $pidfile);
 }
 
 sub provision($)
@@ -564,7 +562,7 @@
 
if (not defined($self-{ldap})) {
} elsif ($self-{ldap} eq openldap) {
-   $ret-{OPENLDAP_PIDFILE} = $self-mk_openldap($ldapdir, 
$basedn, $password, $privatedir, $dnsname, $configuration, join(' ', 
@provision_options)) or die(Unable to create openldap directories);
+   ($ret-{SLAPD_CONF}, $ret-{OPENLDAP_PIDFILE}) = 
$self-mk_openldap($ldapdir, $basedn, $password, $privatedir, $dnsname, 
$configuration, join(' ', @provision_options)) or die(Unable to create 
openldap directories);
} elsif ($self-{ldap} eq fedora) {
($ret-{FEDORA_DS_DIR}, $ret-{FEDORA_DS_PIDFILE}) = 
$self-mk_fedora($ldapdir, $basedn, $root, $password, $privatedir, 
$configuration) or die(Unable to create fedora ds directories);
push (@provision_options, --ldap-module=nsuniqueid);



Rev 11883: Unlink all schemas /but/ the core ones. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-04-16 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11883
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 02:39:41 +0200
message:
  Unlink all schemas /but/ the core ones.
modified:
  source/script/tests/Samba4.pm  svn-v2:[EMAIL PROTECTED]
=== modified file 'source/script/tests/Samba4.pm'
--- a/source/script/tests/Samba4.pm 2007-04-17 00:35:37 +
+++ b/source/script/tests/Samba4.pm 2007-04-17 00:39:41 +
@@ -228,7 +228,9 @@
 
system(perl $ENV{FEDORA_DS_PREFIX}/bin/ds_newinst.pl $fedora_ds_inf 
2) == 0 or return 0;
 
-   system($fedora_ds_dir/schema/00core.*);
+   foreach($fedora_ds_dir/schema/*) {
+   unlink unless (/00core.*/);
+   }
 
open(LDIF, $fedora_ds_dir/dse.ldif);
print LDIF 



Build status as of Tue Apr 17 00:00:02 2007

2007-04-16 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-04-16 
00:00:48.0 +
+++ /home/build/master/cache/broken_results.txt 2007-04-17 00:00:21.0 
+
@@ -1,24 +1,24 @@
-Build status as of Mon Apr 16 00:00:02 2007
+Build status as of Tue Apr 17 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   36 6  0 
+ccache   37 6  0 
 ctdb 0  0  0 
 distcc   3  0  0 
-ldb  34 7  0 
-libreplace   32 7  0 
-lorikeet-heimdal 30 14 0 
-pidl 21 2  0 
-ppp  15 0  0 
-rsync36 12 0 
+ldb  35 3  0 
+libreplace   33 5  0 
+lorikeet-heimdal 31 14 0 
+pidl 22 1  0 
+ppp  16 0  0 
+rsync37 12 0 
 samba0  0  0 
 samba-docs   0  0  0 
-samba-gtk3  3  0 
-samba4   38 35 2 
-samba_3_041 21 1 
-smb-build32 31 0 
-talloc   36 1  0 
-tdb  34 3  0 
+samba-gtk4  4  0 
+samba4   39 35 2 
+samba_3_041 21 0 
+smb-build33 32 0 
+talloc   37 0  0 
+tdb  35 2  0 
 


Rev 11884: Add simple test for the test setup code. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-04-16 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11884
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 03:08:55 +0200
message:
  Add simple test for the test setup code.
added:
  source/script/tests/test_samba4.pl 
test_samba4.pl-20070417005516-ue89mey9pqgv3uw5-1
=== added file 'source/script/tests/test_samba4.pl'
--- a/source/script/tests/test_samba4.pl1970-01-01 00:00:00 +
+++ b/source/script/tests/test_samba4.pl2007-04-17 01:08:55 +
@@ -0,0 +1,21 @@
+#!/usr/bin/perl
+
+use Test::More tests = 3;
+use FindBin qw($RealBin);
+use lib $RealBin;
+use Samba4;
+
+my $s = new Samba4($RealBin./../../bin, undef, $RealBin./../../setup);
+
+ok($s);
+
+is($RealBin./../../bin, $s-{bindir});
+
+
+ok($s-write_ldb_file(tmpldb, 
+dn: a=b
+a: b
+c: d
+));
+
+unlink(tmpldb);



Rev 11882: Import branch that converted the Samba4 test target code to perl and makes the code a bit clearer. in file:///home/jelmer/bzr.samba/real4/

2007-04-16 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/real4/


revno: 11882
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: real4
timestamp: Tue 2007-04-17 03:29:14 +0200
message:
  Import branch that converted the Samba4 test target code to perl and makes 
the code a bit clearer.
removed:
  source/script/tests/mk-fedora-ds.sh svn-v2:[EMAIL PROTECTED]
  source/script/tests/mk-openldap.sh svn-v2:[EMAIL PROTECTED]
  source/script/tests/mksamba4server.sh svn-v2:[EMAIL PROTECTED]
  source/script/tests/mktestdc.sh.share_ldb svn-v2:[EMAIL PROTECTED]
added:
  source/script/tests/test_samba4.pl 
test_samba4.pl-20070417005516-ue89mey9pqgv3uw5-1
modified:
  source/script/tests/Samba4.pm  svn-v2:[EMAIL PROTECTED]
  source/script/tests/mk-keyblobs.sh svn-v2:[EMAIL PROTECTED]
  source/script/tests/selftest.pl svn-v2:[EMAIL PROTECTED]
  source/torture/local/torture.c svn-v2:[EMAIL PROTECTED]
  source/torture/util.c  svn-v2:[EMAIL PROTECTED]

revno: 11874.1.11
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 03:16:32 +0200
message:
  Fix LOCAL-TORTURE (now tested else).

revno: 11874.1.10
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 03:08:55 +0200
message:
  Add simple test for the test setup code.

revno: 11874.1.9
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 02:39:41 +0200
message:
  Unlink all schemas /but/ the core ones.

revno: 11874.1.8
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 02:35:37 +0200
message:
  Fix running against openldap.

revno: 11874.1.7
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 02:13:33 +0200
message:
  Convert ldap provision code to perl.

revno: 11874.1.6
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 01:30:38 +0200
message:
  Keep a clearer track of what ldap implementation to use.

revno: 11874.1.5
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 01:13:08 +0200
message:
  Don't add wins configuration, shares ldb, etc for member servers. 
  Remove shares testing code here (will readd in a slightly different 
fashion later).

revno: 11874.1.4
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 00:35:13 +0200
message:
  Merge mksamba4server.pl into Samba4.pm

revno: 11874.1.3
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Mon 2007-04-16 23:53:15 +0200
message:
  Make the actual domain join work by using a different netbios name than 
the the dc.

revno: 11874.1.2
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Mon 2007-04-16 22:48:56 +0200
message:
  Output as few variables as possible.

revno: 11874.1.1
merged: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Mon 2007-04-16 22:35:19 +0200
message:
  Convert mksamba4server script to perl.

Diff too large for email (1357 lines, the limit is 1000).


svn commit: samba r22286 - in branches/SAMBA_4_0: . source/script/tests source/torture source/torture/local

2007-04-16 Thread jelmer
Author: jelmer
Date: 2007-04-17 00:30:01 + (Tue, 17 Apr 2007)
New Revision: 22286

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

Log:
Import branch that converted the Samba4 test target code to perl and makes the 
code a bit clearer.
Added:
   branches/SAMBA_4_0/source/script/tests/test_samba4.pl
Removed:
   branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh
   branches/SAMBA_4_0/source/script/tests/mk-openldap.sh
   branches/SAMBA_4_0/source/script/tests/mksamba4server.sh
   branches/SAMBA_4_0/source/script/tests/mktestdc.sh.share_ldb
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/script/tests/Samba4.pm
   branches/SAMBA_4_0/source/script/tests/mk-keyblobs.sh
   branches/SAMBA_4_0/source/script/tests/selftest.pl
   branches/SAMBA_4_0/source/torture/local/torture.c
   branches/SAMBA_4_0/source/torture/util.c


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


Rev 11883: Fix some issues in fedora ds code. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-04-16 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11883
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 03:51:28 +0200
message:
  Fix some issues in fedora ds code.
modified:
  source/script/tests/Samba4.pm  svn-v2:[EMAIL PROTECTED]
=== modified file 'source/script/tests/Samba4.pm'
--- a/source/script/tests/Samba4.pm 2007-04-17 00:30:01 +
+++ b/source/script/tests/Samba4.pm 2007-04-17 01:51:28 +
@@ -167,6 +167,8 @@
 {
my ($self, $ldapdir, $basedn, $root, $password, $privatedir, 
$configuration) = @_;
 
+   mkdir($ldapdir);
+
my $fedora_ds_inf = $ldapdir/fedorads.inf;
my $fedora_ds_initial_ldif = $ldapdir/fedorads-initial.ldif;
 
@@ -206,8 +208,8 @@
 ;
close(CONF);
 
-   open(CONF, $fedora_ds_initial_ldif);
-   print 
+   open(LDIF, $fedora_ds_initial_ldif);
+   print LDIF 
 # These entries need to be added to get the container for the 
 # provision to be aimed at.
 
@@ -224,7 +226,7 @@
 objectclass: nsBackendInstance
 nsslapd-suffix: $basedn
 ;
-   close(CONF);
+   close(LDIF);
 
system(perl $ENV{FEDORA_DS_PREFIX}/bin/ds_newinst.pl $fedora_ds_inf 
2) == 0 or return 0;
 
@@ -248,7 +250,7 @@
 nsslapd-pluginVendor: Fedora Project
 nsslapd-pluginDescription: Allow bitwise matching rules
 ;
-   close(CONF);
+   close(LDIF);
 
system($self-{bindir}/ad2oLschema $configuration -H 
$privatedir/sam.ldb --option=convert:target=fedora-ds -I 
$self-{setupdir}/schema-map-fedora-ds-1.0 -O $fedora_ds_dir/schema/99_ad.ldif 
2);
 



Rev 121: better error handling in ctdb_ltdb_lock_fetch_requeue() in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 121
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-04-17 11:20:00 +1000
message:
  better error handling in ctdb_ltdb_lock_fetch_requeue()
modified:
  common/ctdb_ltdb.c ctdb_ltdb.c-20061128065342-to93h6eejj5kon81-2
=== modified file 'common/ctdb_ltdb.c'
--- a/common/ctdb_ltdb.c2007-04-16 23:18:20 +
+++ b/common/ctdb_ltdb.c2007-04-17 01:20:00 +
@@ -244,6 +244,12 @@
immediately satisfied until it can get the lock. This means that
the main ctdb daemon will not block waiting for a chainlock held by
a client
+
+   There are 3 possible return values:
+
+   0:means that it got the lock immediately.
+  -1:means that it failed to get the lock, and won't retry
+  -2:means that it failed to get the lock immediately, but will retry
  */
 int ctdb_ltdb_lock_fetch_requeue(struct ctdb_db_context *ctdb_db, 
 TDB_DATA key, struct ctdb_ltdb_header *header, 
@@ -255,6 +261,12 @@

ret = tdb_chainlock_nonblock(tdb, key);
 
+   if (ret != 0 
+   !(errno == EACCES || errno == EAGAIN || errno == EDEADLK)) {
+   /* a hard failure - don't try again */
+   return -1;
+   }
+
/* first the non-contended path */
if (ret == 0) {
ret = ctdb_ltdb_fetch(ctdb_db, key, header, hdr, data);
@@ -273,6 +285,11 @@
 
/* we get an extra reference to the packet here, to 
   stop it being freed in the top level packet handler */
-   (void)talloc_reference(ctdb_db, hdr);
-   return 0;
+   if (talloc_reference(ctdb_db, hdr) == NULL) {
+   talloc_free(h);
+   return -1;
+   }
+
+   /* now tell the caller than we will retry asynchronously */
+   return -2;
 }



Rev 11885: Another fedora ds fix in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-04-16 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11885
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-17 04:20:44 +0200
message:
  Another fedora ds fix
modified:
  source/script/tests/Samba4.pm  svn-v2:[EMAIL PROTECTED]
=== modified file 'source/script/tests/Samba4.pm'
--- a/source/script/tests/Samba4.pm 2007-04-17 01:06:10 +
+++ b/source/script/tests/Samba4.pm 2007-04-17 02:20:44 +
@@ -234,7 +234,7 @@
unlink unless (/00core.*/);
}
 
-   open(LDIF, $fedora_ds_dir/dse.ldif);
+   open(LDIF, $fedora_ds_dir/dse.ldif);
print LDIF 
 dn: cn=bitwise,cn=plugins,cn=config
 objectClass: top



svn commit: samba r22289 - in branches/SAMBA_4_0: . source/script/tests

2007-04-16 Thread jelmer
Author: jelmer
Date: 2007-04-17 01:21:20 + (Tue, 17 Apr 2007)
New Revision: 22289

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

Log:
Another fedora ds fix
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/script/tests/Samba4.pm


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:merge
...skipped...

Modified: branches/SAMBA_4_0/source/script/tests/Samba4.pm
===
--- branches/SAMBA_4_0/source/script/tests/Samba4.pm2007-04-17 01:06:10 UTC 
(rev 22288)
+++ branches/SAMBA_4_0/source/script/tests/Samba4.pm2007-04-17 01:21:20 UTC 
(rev 22289)
@@ -234,7 +234,7 @@
unlink unless (/00core.*/);
}
 
-   open(LDIF, $fedora_ds_dir/dse.ldif);
+   open(LDIF, $fedora_ds_dir/dse.ldif);
print LDIF 
 dn: cn=bitwise,cn=plugins,cn=config
 objectClass: top



Rev 122: partial merge from volker (some overlaps removed) in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 122
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-04-17 11:26:59 +1000
message:
  partial merge from volker (some overlaps removed)
modified:
  common/ctdb_daemon.c   ctdb_daemon.c-20070409200331-3el1kqgdb9m4ib0g-1
  common/ctdb_lockwait.c 
ctdb_lockwait.c-20070416214118-n1aeonljj3vpdd9q-1
=== modified file 'common/ctdb_daemon.c'
--- a/common/ctdb_daemon.c  2007-04-14 21:41:35 +
+++ b/common/ctdb_daemon.c  2007-04-17 01:26:59 +
@@ -186,6 +186,24 @@
struct client_fetch_lock_data *fl_data;
 
ctdb_db = find_ctdb_db(client-ctdb, f-db_id);
+   if (ctdb_db == NULL) {
+   struct ctdb_reply_fetch_lock r;
+
+   ZERO_STRUCT(r);
+   r.hdr.length   = sizeof(r);
+   r.hdr.ctdb_magic   = CTDB_MAGIC;
+   r.hdr.ctdb_version = CTDB_VERSION;
+   r.hdr.operation= CTDB_REPLY_FETCH_LOCK;
+   r.hdr.reqid= f-hdr.reqid;
+   r.state= -1;
+
+   /*
+* Ignore the result, there's not much we can do anyway.
+*/
+   ctdb_queue_send(client-queue, (uint8_t *)r.hdr,
+   r.hdr.length);
+   return;
+   }
 
key.dsize = f-keylen;
key.dptr = f-key[0];
@@ -220,6 +238,12 @@
int res;
 
ctdb_db = find_ctdb_db(client-ctdb, f-db_id);
+   if (ctdb_db == NULL) {
+   ctdb_set_error(client-ctdb, Could not find database %i,
+  f-db_id);
+   res = -1;
+   goto done;
+   }
 
/* write the data to ltdb */
key.dsize = f-keylen;

=== modified file 'common/ctdb_lockwait.c'
--- a/common/ctdb_lockwait.c2007-04-16 23:14:52 +
+++ b/common/ctdb_lockwait.c2007-04-17 01:26:59 +
@@ -71,48 +71,54 @@
  */
 struct lockwait_handle *ctdb_lockwait(struct ctdb_db_context *ctdb_db,
  TDB_DATA key,
- void (*callback)(void *), void 
*private_data)
+ void (*callback)(void *private_data),
+ void *private_data)
 {
-   struct lockwait_handle *h;
+   struct lockwait_handle *result;
int ret;
 
-   h = talloc_zero(ctdb_db, struct lockwait_handle);
-   if (h == NULL) {
+   if (!(result = talloc_zero(ctdb_db, struct lockwait_handle))) {
return NULL;
}
 
-   ret = pipe(h-fd);
+   ret = pipe(result-fd);
+
if (ret != 0) {
-   talloc_free(h);
-   return NULL;
-   }
-
-   h-child = fork();
-   if (h-child == (pid_t)-1) {
-   close(h-fd[0]);
-   close(h-fd[1]);
-   talloc_free(h);
-   return NULL;
-   }
-
-   h-callback = callback;
-   h-private_data = private_data;
-
-   if (h-child == 0) {
-   struct tdb_context *tdb = ctdb_db-ltdb-tdb;
-   /* in child */
-   tdb_chainlock(tdb, key);
-   _exit(0);
-   }
-
-   close(h-fd[1]);
-   talloc_set_destructor(h, lockwait_destructor);
-
-   h-fde = event_add_fd(ctdb_db-ctdb-ev, h, h-fd[0], EVENT_FD_READ, 
lockwait_handler, h);
-   if (h-fde == NULL) {
-   talloc_free(h);
-   return NULL;
-   }
-
-   return h;
+   talloc_free(result);
+   return NULL;
+   }
+
+   result-child = fork();
+
+   if (result-child == (pid_t)-1) {
+   close(result-fd[0]);
+   close(result-fd[1]);
+   talloc_free(result);
+   return NULL;
+   }
+
+   result-callback = callback;
+   result-private_data = private_data;
+
+   if (result-child == 0) {
+   close(result-fd[0]);
+   /*
+* Do we need a tdb_reopen here?
+*/
+   tdb_chainlock(ctdb_db-ltdb-tdb, key);
+   exit(0);
+   }
+
+   close(result-fd[1]);
+   talloc_set_destructor(result, lockwait_destructor);
+
+   result-fde = event_add_fd(ctdb_db-ctdb-ev, result, result-fd[0],
+  EVENT_FD_READ, lockwait_handler,
+  (void *)result);
+   if (result-fde == NULL) {
+   talloc_free(result);
+   return NULL;
+   }
+
+   return result;
 }



Rev 123: merge from ronnie in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 123
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-04-17 11:30:19 +1000
message:
  merge from ronnie
modified:
  common/ctdb_client.c   ctdb_client.c-20070411010216-3kd8v37k61steeya-1
  common/ctdb_daemon.c   ctdb_daemon.c-20070409200331-3el1kqgdb9m4ib0g-1

merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Tue 2007-04-17 10:15:44 +1000
message:
  change some error printouts to make it easier to determine whether the 
error occured in the client or in the daemon

merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Tue 2007-04-17 09:37:13 +1000
message:
  merge from tridge

merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Mon 2007-04-16 16:03:08 +1000
message:
  merge from tridge

merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Mon 2007-04-16 14:45:09 +1000
message:
  merge from tridge

merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Mon 2007-04-16 12:50:48 +1000
message:
  merge from tridge
=== modified file 'common/ctdb_client.c'
--- a/common/ctdb_client.c  2007-04-16 00:21:44 +
+++ b/common/ctdb_client.c  2007-04-17 00:15:44 +
@@ -114,23 +114,23 @@
struct ctdb_req_header *hdr;
 
if (cnt  sizeof(*hdr)) {
-   ctdb_set_error(ctdb, Bad packet length %d\n, cnt);
+   ctdb_set_error(ctdb, Bad packet length %d in client\n, cnt);
return;
}
hdr = (struct ctdb_req_header *)data;
if (cnt != hdr-length) {
-   ctdb_set_error(ctdb, Bad header length %d expected %d\n, 
+   ctdb_set_error(ctdb, Bad header length %d expected %d in 
client\n, 
   hdr-length, cnt);
return;
}
 
if (hdr-ctdb_magic != CTDB_MAGIC) {
-   ctdb_set_error(ctdb, Non CTDB packet rejected\n);
+   ctdb_set_error(ctdb, Non CTDB packet rejected in client\n);
return;
}
 
if (hdr-ctdb_version != CTDB_VERSION) {
-   ctdb_set_error(ctdb, Bad CTDB version 0x%x rejected\n, 
hdr-ctdb_version);
+   ctdb_set_error(ctdb, Bad CTDB version 0x%x rejected in 
client\n, hdr-ctdb_version);
return;
}
 

=== modified file 'common/ctdb_daemon.c'
--- a/common/ctdb_daemon.c  2007-04-17 01:26:59 +
+++ b/common/ctdb_daemon.c  2007-04-17 01:30:19 +
@@ -85,7 +85,7 @@
r-srvid = srvid;
r-datalen   = data.dsize;
memcpy(r-data[0], data.dptr, data.dsize);
-   
+
ctdb_queue_send(client-queue, (uint8_t *)r-hdr, len);
 
talloc_free(r);
@@ -417,12 +417,12 @@
struct ctdb_req_header *hdr = data;
 
if (hdr-ctdb_magic != CTDB_MAGIC) {
-   ctdb_set_error(client-ctdb, Non CTDB packet rejected\n);
+   ctdb_set_error(client-ctdb, Non CTDB packet rejected in 
daemon\n);
goto done;
}
 
if (hdr-ctdb_version != CTDB_VERSION) {
-   ctdb_set_error(client-ctdb, Bad CTDB version 0x%x 
rejected\n, hdr-ctdb_version);
+   ctdb_set_error(client-ctdb, Bad CTDB version 0x%x rejected in 
daemon\n, hdr-ctdb_version);
goto done;
}
 
@@ -468,12 +468,12 @@
}
 
if (cnt  sizeof(*hdr)) {
-   ctdb_set_error(client-ctdb, Bad packet length %d\n, cnt);
+   ctdb_set_error(client-ctdb, Bad packet length %d in 
daemon\n, cnt);
return;
}
hdr = (struct ctdb_req_header *)data;
if (cnt != hdr-length) {
-   ctdb_set_error(client-ctdb, Bad header length %d expected 
%d\n, 
+   ctdb_set_error(client-ctdb, Bad header length %d expected 
%d\n in daemon, 
   hdr-length, cnt);
return;
}
@@ -484,7 +484,7 @@
}
 
if (hdr-ctdb_version != CTDB_VERSION) {
-

svn commit: samba r22290 - in branches/SAMBA_4_0/source/script/tests: .

2007-04-16 Thread abartlet
Author: abartlet
Date: 2007-04-17 01:32:55 + (Tue, 17 Apr 2007)
New Revision: 22290

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

Log:
Fedora DS is incredibly picky about newlines...

Modified:
   branches/SAMBA_4_0/source/script/tests/Samba4.pm


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/Samba4.pm
===
--- branches/SAMBA_4_0/source/script/tests/Samba4.pm2007-04-17 01:21:20 UTC 
(rev 22289)
+++ branches/SAMBA_4_0/source/script/tests/Samba4.pm2007-04-17 01:32:55 UTC 
(rev 22290)
@@ -235,8 +235,7 @@
}
 
open(LDIF, $fedora_ds_dir/dse.ldif);
-   print LDIF 
-dn: cn=bitwise,cn=plugins,cn=config
+   print LDIF dn: cn=bitwise,cn=plugins,cn=config
 objectClass: top
 objectClass: nsSlapdPlugin
 objectClass: extensibleObject



Rev 124: merge from ronnie in http://samba.org/~tridge/ctdb

2007-04-16 Thread tridge

revno: 124
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-04-17 11:54:19 +1000
message:
  merge from ronnie
modified:
  common/ctdb_call.c ctdb_call.c-20061128065342-to93h6eejj5kon81-1
  common/ctdb_client.c   ctdb_client.c-20070411010216-3kd8v37k61steeya-1
  common/ctdb_daemon.c   ctdb_daemon.c-20070409200331-3el1kqgdb9m4ib0g-1
  direct/ctdbd_test.cctdbd_test.c-20070411085057-17kgjzfktsh28g99-1
  include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  tests/ctdb_fetch.c ctdb_fetch.c-20070405031748-f7gslozfj3rwh5ie-1
  tests/ctdb_fetch1.cctdb_fetch1.c-20070412111848-xawz6wqk9r0v8jdk-1

merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Tue 2007-04-17 11:48:27 +1000
message:
  remaning code to finish lock_fetch/store_unlock clientside helpers

merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Tue 2007-04-17 11:34:45 +1000
message:
  initial change to remove store_unlock pdu and use tdb chainlock in the 
client

Diff too large for email (503, the limit is 200).


svn commit: samba r22291 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd

2007-04-16 Thread jra
Author: jra
Date: 2007-04-17 02:14:28 + (Tue, 17 Apr 2007)
New Revision: 22291

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

Log:
Fix off-by-one in tconX parsing.
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===
--- branches/SAMBA_3_0/source/smbd/reply.c  2007-04-17 01:32:55 UTC (rev 
22290)
+++ branches/SAMBA_3_0/source/smbd/reply.c  2007-04-17 02:14:28 UTC (rev 
22291)
@@ -469,13 +469,22 @@
  
if (global_encrypted_passwords_negotiated) {
password = data_blob(smb_buf(inbuf),passlen);
+   if (lp_security() == SEC_SHARE) {
+   /*
+* Security = share always has a pad byte
+* after the password.
+*/
+   p = smb_buf(inbuf) + passlen + 1;
+   } else {
+   p = smb_buf(inbuf) + passlen;
+   }
} else {
password = data_blob(smb_buf(inbuf),passlen+1);
/* Ensure correct termination */
-   password.data[passlen]=0;
+   password.data[passlen]=0;
+   p = smb_buf(inbuf) + passlen + 1;
}
 
-   p = smb_buf(inbuf) + passlen;
p += srvstr_pull_buf(inbuf, path, p, sizeof(path), STR_TERMINATE);
 
/*

Modified: branches/SAMBA_3_0_25/source/smbd/reply.c
===
--- branches/SAMBA_3_0_25/source/smbd/reply.c   2007-04-17 01:32:55 UTC (rev 
22290)
+++ branches/SAMBA_3_0_25/source/smbd/reply.c   2007-04-17 02:14:28 UTC (rev 
22291)
@@ -468,13 +468,22 @@
  
if (global_encrypted_passwords_negotiated) {
password = data_blob(smb_buf(inbuf),passlen);
+   if (lp_security() == SEC_SHARE) {
+   /*
+* Security = share always has a pad byte
+* after the password.
+*/
+   p = smb_buf(inbuf) + passlen + 1;
+   } else {
+   p = smb_buf(inbuf) + passlen;
+   }
} else {
password = data_blob(smb_buf(inbuf),passlen+1);
/* Ensure correct termination */
-   password.data[passlen]=0;
+   password.data[passlen]=0;
+   p = smb_buf(inbuf) + passlen + 1;
}
 
-   p = smb_buf(inbuf) + passlen;
p += srvstr_pull_buf(inbuf, path, p, sizeof(path), STR_TERMINATE);
 
/*



  1   2   >