Re: [Samba] Multi samba domain in one LDAP Backend with multi-site authentication

2010-02-01 Thread Thibault Vançon
Thanks Gaiseric for your answer,


I know this things about trust relashionship even if i still don't
have setup one, but we need to have only one LDAP backend, to allow
others applications to authenticate user with LDAP. We can't specifie
more than one backend in our application.

I've thought that i could create different OU with each domain, and
configure smbldap-tools and pam to work with this OU, with a base like
: dc=DOMAIN, dc=company, dc=com , and replicate this LDAP on other
site.

But is it possible to use trust relationship with this kind of LDAP
structure ? will i need IDMAP ?

Thanks,


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


Re: [Samba] I can not create Home DIR

2010-02-01 Thread Moray Henderson
Claudio Guzman wrote:
when users enter the system can not see your home folder, or it asks
the username and password denuevo. My configuration is

Server + Samba + LDAP PDC
Samba server that only has the shared folders and are accessed via
winbind and pam

# Global settings
[global]
display charset = LOCALE
passwd chat = *New*password* %n\n *Retype*new*password* %n\n
*passwd:*all*authentication*tokens*updated*successfully*
idmap gid = 1000-33554431
passwd program = /usr/bin/passwd %u
netbios name = srvsamba
idmap uid = 1000-33554431
dos charset = CP850
local master = no
workgroup = SERVER
debug level = 9
os level = 0
security = domain
log file = /var/log/samba/%m.log
guest account = nobody
smb passwd file = /etc/samba/smbpasswd
load printers = no
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
wins server = 192.168.1.252
map to guest = Bad User
domain master = no
encrypt passwords = yes
realm =
template shell = /bin/false
server string = srvsamba
winbind enum users = Yes
password server = 192.168.1.252
template homedir = /mnt/samba/home/%U
winbind enum groups = Yes
unix charset = UTF-8
preferred master = no
pam password change = yes
winbind use default domain = no

[homes]
comment = Home Directories
browseable = no
writeable = yes

What OS is Samba running on?

I have seen this sort of thing when the user's home directory from the
Unix side (passwd or LDAP) is a symlink rather than a real directory, on
CentOS 5.  SELinux prevents Samba from using the symlink, so I have to
make sure all users' home directory entries point to the real thing.  To
check for SELinux errors use aureport --avc, or see if there's
anything useful in the samba logs.


Moray.
To err is human.  To purr, feline




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


Re: [Samba] Can't connect to printers from Win 2008 and Win 7

2010-02-01 Thread Åke Holmlund

Thank You for making that clear!

New problem. I have been trying to set up a temporary Samba server
to handle printing until this problem gets fixed. I am running
3.3.10 on a Sun Solaris 10 machine. From a Win 2003 (32 bit) server
I can install print drivers and print ok but from Win 2008 R2 and
Win 7 it´s not working.

In Win 2008 R2, if I try to connect to a printer with no drivers
installed on the server I get a dialog box stating that there
are no drivers installed on the server. This is as expected.

However, if I go to properties there is NO dialog about missing
drivers. Clicking on the Advanced tab and then New Driver starts
the Add Printer wizard but when I get to the Printer Driver
Selection there are no drivers to choose from. All I can see is
the text (Unable to find any drivers for this device)

If I try to connect to a printer that has a driver installed,
I get error 0x06d1

Any ideas?

Åke Holmlund

--On 29 januari 2010 10.09.57 -0800 Jeremy Allison j...@samba.org wrote:


On Fri, Jan 29, 2010 at 05:46:14PM +0100, Åke Holmlund wrote:

Hello!

I have sent this a few days ago but I don't think it made it to the
mailinglist.

We have problems connecting to printers (spoolss) from Windows Server
2008 (64-bit, domain member) and Windows 7 (64-bit, NOT domain member).
When trying to connect to the printers we get an error message saying
Windows cannot connect to the printer. Operation could not be completed
(error 0x000d). Connecting as a standard user or a domain
administrator makes no difference.

If I try to add a printer on the server from Windows 2008, there are no
ports to choose from in the Choose a printer port dialog.

Connecting to the printers is no problem from Win XP, Win Vista and Win
2003 (all 32-bit). When trying to add a printer from Windows 2003, the
Samba Printer Port shows up in the Choose a printer port dialog.

The Samba (domain) server is 3.4.4 running on Solaris 10 (Sparc).

Any ideas what the problem can be or where to start looking?


Ok, here's the deal. If you have 64-bit Windows clients at the
moment you need to be using 3.3.10, not anything later. If you're
using 32-bit Windows clients, you can use 3.4.5 or later.

The reason (and Guenther can correct me if I'm wrong), is
that in 3.4.x we changed from the hand-marshalled SPOOLSS RPC
we used in 3.3.x, which was mostly correct after being worked
on for many years, to pidl-generated SPOOLSS RPC directly from
the idl files. Now our idl files are correct, but it turns
out that the Windows idl parser for SPOOLSS is itself custom,
and won't accept the normally marshalled RPC packets that
the pidl-generated code creates.

Guenter and Metze have been doing a lot of work on fixing
this, and this is why 32-bit Windows clients work in 3.4.5.
However there are still some changes needed for 64-bit Windows
clients, and this will probably make it into an early patch
for 3.5.x (it won't make 3.5.0, as it's too late to test the
changes needed before we ship next month).

I'm going to write this up as a tech-note for the next
3.4.x release and for 3.5.0 and get it into the release
notes. Hope this hasn't caused you too many problems.

Jeremy.



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

Re: [Samba] [Announce] Samba 3.5.0rc2 Available for Download

2010-02-01 Thread Robert LeBlanc
On Sun, Jan 31, 2010 at 11:05 PM, Christian PERRIER bubu...@debian.orgwrote:

 Quoting Karolin Seeger (ksee...@samba.org):
  Release Announcements
  =
 
  This is the second release candidate of Samba 3.5.  This is *not*


 Debian packages for 3.5.0rc2 were uploaded to Debian experimental as
 of Sunday Jan 31st.

 Many special thanks to Michael Adam for bringing a new configure
 option for the *.dat files location. That allowed us, Debian
 maintainers, to drop the very last bit of code changes meant to deal
 with file locations that were not fitting the Debian view of the FHS.

 The Debian diff is now very minimally restricted to Debian specific
 changes that are not suitable for upstream inclusion (mostly
 documentation stuff).

 The Debian packaging team for Samba will now discuss the opportunity
 to bring 3.5 packages in Debian unstable:

 - release Debian squeeze with 3.5 instead of the now quite rock solid
  3.4?

 - consequences for Ubuntu?

 Anyway, we again renew public thanks to Karolin's for her tremendous
 job in release management. The entire Samba Team also deserves thanks
 for their commitment to follow their release manager. A predictable
 upstream release policy is the best that can happen to distro
 packagers.


This is very exciting, thank you all for your hard work. We would like to
see 3.5 in Squeeze soon as we will most likely be deploying Windows 7 2nd
quarter this year.

Thanks,

Robert LeBlanc
Life Sciences  Undergraduate Education Computer Support
Brigham Young University
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Samba Load Balancing with DNS round robin

2010-02-01 Thread Ganju Yadav
I want to add another server to my existing Samba environment and use DNS
round robin to do load balancing. Both will use same smb.conf. Is anyone out
there using this kind of setup? I have few quick questions:

1. Can interfaces statement be used in DNS round robin. If yes, then how?
2. Should preferred master= yes be defined on both boxes?

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


Re: [Samba] Multi samba domain in one LDAP Backend with multi-site authentication

2010-02-01 Thread Gaiseric Vandal
You should be able to have separate OU's in LDAP for each domain.   From 
the point-of-view of samba, each samba PDC would only know about its own 
section of the LDAP tree-  and in effect would be the same as separate 
LDAP servers.


You would want to make sure that the underlying unix authentication on 
that server would also only used the domain-specific section of LDAP for 
user authentication.



You would still want to use idmap.   Do you need all domains trusting 
each other-  or is it a series of trusts between each remote office and 
the central office.A full mesh could get really messy, although I 
haven't tried this yet. If you have six domains, potentially each 
domain OU is could contain 5 ou's for idmap entries.   I think you 
could have one, enterprise-wide idmap ldap section, with a ou underneath 
for each domain.You might even want to make them read-only for most 
domains so that the entries stay consistent.


By default, winbind allocates uid and gid's from a dynamic range that 
does NOT overlap the uid and gid ranges for local users.I 
personally would either modify entries as they are created, or actually 
prepopulate entries,  so that the uid/gid entries in the idmap are the 
same as the real uid/gid values for the actual unix account.I used 
to do this when using idmap with member servers with in the domain to 
make sure that when a windows user created or modified a file on an NFS 
shared, a consistent unix uid was used between windows and nfs on all 
servers.



So your LDAP structure would be similar to
ou=DomainA
ou=people,ou=DomainA
ou=DomainB
ou=people,ou=DomainB
...
ou=DomainF
ou=people,ou=DomainF
...
ou=IDMAP
ou=DomainA,ou=IDMAP
ou=DomainB,ou=IDMAP
...
ou=DomainF,ou=IDMAP




I don't know if OpenLDAP handles multi-master replication (I am using 
Sun Directory Server.)   Assuming it did, each site could have its 
own LDAP server but in the same LDAP tree.



the other approach would be to have a separate LDAP server and structure 
for each site BUT configure referrals between each LDAP server (i.e. on 
ServerA, ou=DomainB points to ou=DomainB on ServerB) to create the 
appearance of a single LDAP tree.





















On 02/01/10 04:02, Thibault Vançon wrote:

Thanks Gaiseric for your answer,


I know this things about trust relashionship even if i still don't
have setup one, but we need to have only one LDAP backend, to allow
others applications to authenticate user with LDAP. We can't specifie
more than one backend in our application.

I've thought that i could create different OU with each domain, and
configure smbldap-tools and pam to work with this OU, with a base like
: dc=DOMAIN, dc=company, dc=com , and replicate this LDAP on other
site.

But is it possible to use trust relationship with this kind of LDAP
structure ? will i need IDMAP ?

Thanks,


Thibault
   


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


Re: [Samba] Printer sharing with 64-bit Windows clients

2010-02-01 Thread Ryan Suarez

Jeremy Allison wrote:

Ok, here's the deal. If you have 64-bit Windows clients at the
moment you need to be using 3.3.10, not anything later. If you're
using 32-bit Windows clients, you can use 3.4.5 or later.

I'm going to write this up as a tech-note for the next
3.4.x release and for 3.5.0 and get it into the release
notes. Hope this hasn't caused you too many problems.
  
Just to add my 2cents.  We're going to see alot more of this problem as 
Win7 64bit becomes the standard oem install for new systems.

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


[Samba] How can i build samba server on uClinux platform

2010-02-01 Thread hefei game
Hi, all
  How can i build samba server on uClinux platform? My hardware platform is
samsung s3c44b0 chip (nommu). Does anyone has idea for that?
   Thanks a lots~!
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Printer sharing with 64-bit Windows clients

2010-02-01 Thread Jeremy Allison
On Mon, Feb 01, 2010 at 12:53:12PM -0500, Ryan Suarez wrote:
 Jeremy Allison wrote:
 Ok, here's the deal. If you have 64-bit Windows clients at the
 moment you need to be using 3.3.10, not anything later. If you're
 using 32-bit Windows clients, you can use 3.4.5 or later.

 I'm going to write this up as a tech-note for the next
 3.4.x release and for 3.5.0 and get it into the release
 notes. Hope this hasn't caused you too many problems.
   
 Just to add my 2cents.  We're going to see alot more of this problem as  
 Win7 64bit becomes the standard oem install for new systems.

I know. We're working on it as fast as we can...
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] [Announce] Samba 3.5.0rc2 Available for Download

2010-02-01 Thread Dale Schroeder

On 02/01/2010 12:05 AM, Christian PERRIER wrote:

Quoting Karolin Seeger (ksee...@samba.org):
   

Release Announcements
=

This is the second release candidate of Samba 3.5.  This is *not*
 


Debian packages for 3.5.0rc2 were uploaded to Debian experimental as
of Sunday Jan 31st.

Many special thanks to Michael Adam for bringing a new configure
option for the *.dat files location. That allowed us, Debian
maintainers, to drop the very last bit of code changes meant to deal
with file locations that were not fitting the Debian view of the FHS.

The Debian diff is now very minimally restricted to Debian specific
changes that are not suitable for upstream inclusion (mostly
documentation stuff).

The Debian packaging team for Samba will now discuss the opportunity
to bring 3.5 packages in Debian unstable:

- release Debian squeeze with 3.5 instead of the now quite rock solid
   3.4?

- consequences for Ubuntu?

Anyway, we again renew public thanks to Karolin's for her tremendous
job in release management. The entire Samba Team also deserves thanks
for their commitment to follow their release manager. A predictable
upstream release policy is the best that can happen to distro
packagers.

   
Any chance that there will be included in this release, a fix for the 
libkrb5-3 1.8 problem with winbind?

Or will that fix have to come from the libkrb5-3 maintainers?
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] [Announce] Samba 3.5.0rc2 Available for Download

2010-02-01 Thread Christian PERRIER
Quoting Dale Schroeder (d...@briannassaladdressing.com):
 On 02/01/2010 12:05 AM, Christian PERRIER wrote:
 Quoting Karolin Seeger (ksee...@samba.org):
 Release Announcements
 =
 
 This is the second release candidate of Samba 3.5.  This is *not*
 
 Debian packages for 3.5.0rc2 were uploaded to Debian experimental as
 of Sunday Jan 31st.
 
 Many special thanks to Michael Adam for bringing a new configure
 option for the *.dat files location. That allowed us, Debian
 maintainers, to drop the very last bit of code changes meant to deal
 with file locations that were not fitting the Debian view of the FHS.
 
 The Debian diff is now very minimally restricted to Debian specific
 changes that are not suitable for upstream inclusion (mostly
 documentation stuff).
 
 The Debian packaging team for Samba will now discuss the opportunity
 to bring 3.5 packages in Debian unstable:
 
 - release Debian squeeze with 3.5 instead of the now quite rock solid
3.4?
 
 - consequences for Ubuntu?
 
 Anyway, we again renew public thanks to Karolin's for her tremendous
 job in release management. The entire Samba Team also deserves thanks
 for their commitment to follow their release manager. A predictable
 upstream release policy is the best that can happen to distro
 packagers.
 
 Any chance that there will be included in this release, a fix for
 the libkrb5-3 1.8 problem with winbind?
 Or will that fix have to come from the libkrb5-3 maintainers?
 
 
 
 ** CRM114 Whitelisted by: lists.samba.org **

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


Re: [Samba] [Announce] Samba 3.5.0rc2 Available for Download

2010-02-01 Thread Jeremy Allison
On Mon, Feb 01, 2010 at 07:05:02AM +0100, Christian PERRIER wrote:

 Anyway, we again renew public thanks to Karolin's for her tremendous
 job in release management.

Hear hear ! I'd also like to publicly thank Karolin for the
wonderful job she is doing as release manager !
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] DOS dir command on Samba share

2010-02-01 Thread Braxton Neate
Hi,

I was wondering if anyone could shed some light on a problem I am having with 
the DOS DIR command on a SMB share.

I have a batch script that copies files from one mapped network drive to 
another. To check that the copy has been sucsessful it creates two text files 
with the output of the command dir /s directory | find File on both 
directories.

We have recently upgraded one of the servers from Windows to Samba running on 
RHEL 5. For some reason now the output of the dir command comes in a different 
order and the total byte size is different on the samba share than the native 
Windows share thus breaking the check. All the file appear to by copied 
correctly though.

I have attached a sample of what happens.
Any help is greatly appreciated.


Regards,
Braxton Neate   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   4 File(s)484,509 bytes
   9 File(s) 15,456,617 bytes
  32 File(s)103,890,559 bytes
   9 File(s)  9,493,444 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   1 File(s)501 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
 Total Files Listed:
  55 File(s)129,325,630 bytes   0 File(s)  0 bytes
   4 File(s)488,605 bytes
  32 File(s)103,890,559 bytes
   9 File(s) 15,456,617 bytes
   9 File(s)  9,493,444 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   0 File(s)  0 bytes
   1 File(s)501 bytes
 Total Files Listed:
  55 File(s)129,329,726 bytes-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] DOS dir command on Samba share

2010-02-01 Thread Stan Hoeppner
Braxton Neate put forth on 2/1/2010 9:37 PM:
 Hi,
 
 I was wondering if anyone could shed some light on a problem I am having with 
 the DOS DIR command on a SMB share.
 
 I have a batch script that copies files from one mapped network drive to 
 another. To check that the copy has been sucsessful it creates two text files 
 with the output of the command dir /s directory | find File on both 
 directories. 
 
 We have recently upgraded one of the servers from Windows to Samba running on 
 RHEL 5. For some reason now the output of the dir command comes in a 
 different order and the total byte size is different on the samba share than 
 the native Windows share thus breaking the check. All the file appear to by 
 copied correctly though.
 
 I have attached a sample of what happens.
 Any help is greatly appreciated. 

You should be able to fix the directory order issue by setting the environment
variable

set dircmd=/ogn

on the Windows machine running the script.  The file size discrepancy probably
has to do with the fact that you changed the underlying filesystem from (I
assume) NTFS to one of EXT2/3/4, ReiserFS, XFS, or JFS.  Each filesystem may
report slightly different sizes for files and directories.  This problem may be
more difficult to solve.  Are you currently using?

fstype = NTFS or
fstype = Samba

You may try swapping those and see if it fixes the file size issue.  I have no
idea if this will help, but you might try it.  However, keep in mind that any
software that attempts to store information in NTFS alternate data streams will
be unable to do so.  For example, the Windows 2000 file viewer, Windows
Explorer, stores image file thumbnail data in ADS on NTFS filesystems.  Thus, if
you enable fstype = NTFS and the underlying FS is say, ext3 or XFS, thumbnail
data will not be written to the AFS as it doesn't exist, and on top of that,
Explorer will not automatically fall back and create a thumbs.db file, which is
how thumbnail data is handled on FAT32 and all filesystems *other than* NTFS.
Thus, if one has thumbnail view enabled on a Samba share containing hundreds or
thousands of photos, the thumbnail data must be regenerated, for every file,
each time the share is viewed, and this is _painfully_ slow.  I took me more a
few hours to figure this out.

So, again, exporting a *nix Samba share as NTFS will cause unforeseen problems
with applications that expect the AFS to exist on the filesystem.

It seems your current verification method may not work in the future.  Have you
looked into a fully automated, purpose built tool for this task, such as rsync?
 It may give you some more options and flexibility to accomplish your goals.

http://samba.anu.edu.au/rsync/

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


Re: [Samba] DOS dir command on Samba share

2010-02-01 Thread Stan Hoeppner
Stan Hoeppner put forth on 2/1/2010 10:48 PM:
 Braxton Neate put forth on 2/1/2010 9:37 PM:
 Hi,

 I was wondering if anyone could shed some light on a problem I am having 
 with the DOS DIR command on a SMB share.

 I have a batch script that copies files from one mapped network drive to 
 another. To check that the copy has been sucsessful it creates two text 
 files with the output of the command dir /s directory | find File on 
 both directories. 

 We have recently upgraded one of the servers from Windows to Samba running 
 on RHEL 5. For some reason now the output of the dir command comes in a 
 different order and the total byte size is different on the samba share than 
 the native Windows share thus breaking the check. All the file appear to by 
 copied correctly though.

 I have attached a sample of what happens.
 Any help is greatly appreciated. 
 
 You should be able to fix the directory order issue by setting the environment
 variable
 
 set dircmd=/ogn
 
 on the Windows machine running the script.  The file size discrepancy probably
 has to do with the fact that you changed the underlying filesystem from (I
 assume) NTFS to one of EXT2/3/4, ReiserFS, XFS, or JFS.  Each filesystem may
 report slightly different sizes for files and directories.  This problem may 
 be
 more difficult to solve.  Are you currently using?
 
 fstype = NTFS or
 fstype = Samba
 
 You may try swapping those and see if it fixes the file size issue.  I have no
 idea if this will help, but you might try it.  However, keep in mind that any
 software that attempts to store information in NTFS alternate data streams 
 will
 be unable to do so.  For example, the Windows 2000 file viewer, Windows
 Explorer, stores image file thumbnail data in ADS on NTFS filesystems.  Thus, 
 if
 you enable fstype = NTFS and the underlying FS is say, ext3 or XFS, thumbnail
 data will not be written to the AFS as it doesn't exist, and on top of that,
 Explorer will not automatically fall back and create a thumbs.db file, which 
 is
 how thumbnail data is handled on FAT32 and all filesystems *other than* NTFS.
 Thus, if one has thumbnail view enabled on a Samba share containing hundreds 
 or
 thousands of photos, the thumbnail data must be regenerated, for every file,
 each time the share is viewed, and this is _painfully_ slow.  I took me more a
 few hours to figure this out.
 
 So, again, exporting a *nix Samba share as NTFS will cause unforeseen problems
 with applications that expect the AFS to exist on the filesystem.
 
 It seems your current verification method may not work in the future.  Have 
 you
 looked into a fully automated, purpose built tool for this task, such as 
 rsync?
  It may give you some more options and flexibility to accomplish your goals.
 
 http://samba.anu.edu.au/rsync/

Come to think of it, these file size differences being reported may be directly
related to existing alternate data streams on your NTFS volume.

-- 
Stan

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


Re: [Samba] Different file permissions on new file

2010-02-01 Thread Alexander Busam


Alexander Busam schrieb:

Hello list :-)

I got different file permissions on a new created/copied file.

If I copy the file to \\192.168.1.25\data
I got -rwx--1 advantage advantage   0 Jan 18 11:16 test.txt

If I copy the file to \\192.168.1.25\data\pix
I got -rwxrwxr--+   1 advantage advantage 0 Jan 18 11:18 test.txt

The permissions of the path to the share are:
drwxrwxr-x+  14 advantage advantage  4096 Jan 18 11:16 data

What is wrong?

Best regards,

Alex

The smb.conf:

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2010/01/18 11:22:35

[global]
workgroup = HMDBSRV
server string = map to guest = Bad Password
printcap name = cups
add machine script = /usr/sbin/useradd  -c Machine -d 
/var/lib/nobody -s /bin/false %m$

logon script = scripts\login.bat
logon path = \\%L\profiles\.msprofile
logon drive = L:
logon home = \\%L\%U\.9xprofile
domain master = No
ldap admin dn = cn=xxx,dc=,dc=de
ldap group suffix = ou=groups
ldap machine suffix = ou=hosts
ldap passwd sync = Yes
ldap suffix = dc=,dc=de
ldap ssl = no
ldap user suffix = ou=users
usershare allow guests = Yes
printing = cups
cups options = raw
print command = lpq command = %p
lprm command = oplocks = No

[data]
comment = Datenbank
path = /data
force user = advantage
force group = advantage
read only = No
guest ok = Yes
preserve case = No
level2 oplocks = No


Can anybody tell me what's wrong ?
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[SCM] Samba Shared Repository - branch master updated

2010-02-01 Thread Volker Lendecke
The branch, master has been updated
   via  5310596... tdb: fix an early release of the global lock that can 
cause data corruption
  from  42f5125... s4-smbtorture: check for RouterReplyPrinterEx packets 
inside backchannel in RPC-SPOOLSS-NOTIFY.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 531059696e17d1ee538310d81af309c107d08e3e
Author: Volker Lendecke v...@samba.org
Date:   Fri Jan 29 18:21:09 2010 +0100

tdb: fix an early release of the global lock that can cause data corruption

There was a bug in tdb where the

tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);

(ending the transaction-mutex) was done before the

/* remove the recovery marker */

This means that when a transaction is committed there is a window where 
another
opener of the file sees the transaction marker while the transaction 
committer
is still fully functional and working on it. This led to transaction being
rolled back by that second opener of the file while transaction_commit() 
gave
no error to the caller.

This patch moves the F_UNLCK to after the recovery marker was removed, 
closing
this window.

---

Summary of changes:
 lib/tdb/common/transaction.c |   15 ++-
 1 files changed, 10 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c
index 20f2bfc..b8988ea 100644
--- a/lib/tdb/common/transaction.c
+++ b/lib/tdb/common/transaction.c
@@ -135,6 +135,9 @@ struct tdb_transaction {
bool prepared;
tdb_off_t magic_offset;
 
+   /* set when the GLOBAL_LOCK has been taken */
+   bool global_lock_taken;
+
/* old file size before transaction */
tdb_len_t old_map_size;
 
@@ -603,6 +606,11 @@ int _tdb_transaction_cancel(struct tdb_context *tdb)
}
}
 
+   if (tdb-transaction-global_lock_taken) {
+   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
+   tdb-transaction-global_lock_taken = false;
+   }
+
/* remove any global lock created during the transaction */
if (tdb-global_lock.count != 0) {
tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 
4*tdb-header.hash_size);
@@ -947,11 +955,12 @@ static int _tdb_transaction_prepare_commit(struct 
tdb_context *tdb)
return -1;
}
 
+   tdb-transaction-global_lock_taken = true;
+
if (!(tdb-flags  TDB_NOSYNC)) {
/* write the recovery data to the end of the file */
if (transaction_setup_recovery(tdb, 
tdb-transaction-magic_offset) == -1) {
TDB_LOG((tdb, TDB_DEBUG_FATAL, 
tdb_transaction_prepare_commit: failed to setup recovery data\n));
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
_tdb_transaction_cancel(tdb);
return -1;
}
@@ -966,7 +975,6 @@ static int _tdb_transaction_prepare_commit(struct 
tdb_context *tdb)
 tdb-transaction-old_map_size) == 
-1) {
tdb-ecode = TDB_ERR_IO;
TDB_LOG((tdb, TDB_DEBUG_FATAL, 
tdb_transaction_prepare_commit: expansion failed\n));
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
_tdb_transaction_cancel(tdb);
return -1;
}
@@ -1056,7 +1064,6 @@ int tdb_transaction_commit(struct tdb_context *tdb)
tdb_transaction_recover(tdb); 
 
_tdb_transaction_cancel(tdb);
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
 
TDB_LOG((tdb, TDB_DEBUG_FATAL, tdb_transaction_commit: 
write failed\n));
return -1;
@@ -1072,8 +1079,6 @@ int tdb_transaction_commit(struct tdb_context *tdb)
return -1;
}
 
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
-
/*
  TODO: maybe write to some dummy hdr field, or write to magic
  offset without mmap, before the last sync, instead of the


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-02-01 Thread Stefan Metzmacher
The branch, master has been updated
   via  93142e4... s4/ldif: Handle Schema:prefixMap blobs in W2K3 and W2K8
   via  83068b4... s4/ldif: Better control on ldif_write_NDR() errors 
processing
   via  a342e3a... s4/idl: drsblobs IDL regeneration
   via  20db321... s4/drsblobs: Custom ndr_print_ implementation for 
drsuapi_MSPrefixMap_Entry
   via  cd3d165... s4/idl: PrefixMap description for W2K3 and W2K8 
Schema:prefixMap attribute
  from  5310596... tdb: fix an early release of the global lock that can 
cause data corruption

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 93142e4a3a0a7dbe5f8ba737bd45f01c61d997da
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Wed Jan 20 18:10:05 2010 +0200

s4/ldif: Handle Schema:prefixMap blobs in W2K3 and W2K8

Signed-off-by: Stefan Metzmacher me...@samba.org

commit 83068b42ae22af18c5a06dc05a86021db0e25634
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Wed Jan 20 17:58:39 2010 +0200

s4/ldif: Better control on ldif_write_NDR() errors processing

Current implementation mask NDR_ errors implicitly.
Thus the caller has no opportunity handle such an error.

Signed-off-by: Stefan Metzmacher me...@samba.org

commit a342e3a419058e28f073a6c5b96ede15a8bdec91
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Tue Jan 19 16:54:09 2010 +0200

s4/idl: drsblobs IDL regeneration

Signed-off-by: Stefan Metzmacher me...@samba.org

commit 20db3211ae406004425dd2e2b4294b03b4c4ecbf
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Tue Jan 19 16:53:32 2010 +0200

s4/drsblobs: Custom ndr_print_ implementation for drsuapi_MSPrefixMap_Entry

Signed-off-by: Stefan Metzmacher me...@samba.org

commit cd3d165778e51987f185a58ff49c124a555e14e7
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Tue Jan 19 16:52:10 2010 +0200

s4/idl: PrefixMap description for W2K3 and W2K8 Schema:prefixMap attribute

Signed-off-by: Stefan Metzmacher me...@samba.org

---

Summary of changes:
 librpc/gen_ndr/drsblobs.h |   12 
 librpc/gen_ndr/ndr_drsblobs.c |  103 +
 librpc/gen_ndr/ndr_drsblobs.h |5 ++
 librpc/idl/drsblobs.idl   |   22 +++
 librpc/ndr/ndr_drsblobs.c |   25 
 librpc/ndr/ndr_drsblobs.h |2 +-
 source4/lib/ldb-samba/ldif_handlers.c |   45 +++---
 7 files changed, 203 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/drsblobs.h b/librpc/gen_ndr/drsblobs.h
index 57712a4..7fa201d 100644
--- a/librpc/gen_ndr/drsblobs.h
+++ b/librpc/gen_ndr/drsblobs.h
@@ -134,6 +134,18 @@ struct partialAttributeSetBlob {
union partialAttributeSetCtr ctr;/* [switch_is(version)] */
 }/* [public] */;
 
+struct drsuapi_MSPrefixMap_Entry {
+   uint16_t entryID;
+   uint16_t length;
+   uint8_t *binary_oid;
+}/* [noprint,flag(LIBNDR_FLAG_NOALIGN)] */;
+
+struct drsuapi_MSPrefixMap_Ctr {
+   uint32_t num_entries;
+   uint32_t __ndr_size;/* 
[value(ndr_size_drsuapi_MSPrefixMap_Ctr(r,ndr-iconv_convenience,ndr-flags))] 
*/
+   struct drsuapi_MSPrefixMap_Entry *entries;
+}/* [gensize,public] */;
+
 enum prefixMapVersion
 #ifndef USE_UINT_ENUMS
  {
diff --git a/librpc/gen_ndr/ndr_drsblobs.c b/librpc/gen_ndr/ndr_drsblobs.c
index 3102251..4290ce5 100644
--- a/librpc/gen_ndr/ndr_drsblobs.c
+++ b/librpc/gen_ndr/ndr_drsblobs.c
@@ -1213,6 +1213,109 @@ _PUBLIC_ void ndr_print_partialAttributeSetBlob(struct 
ndr_print *ndr, const cha
ndr-depth--;
 }
 
+static enum ndr_err_code ndr_push_drsuapi_MSPrefixMap_Entry(struct ndr_push 
*ndr, int ndr_flags, const struct drsuapi_MSPrefixMap_Entry *r)
+{
+   {
+   uint32_t _flags_save_STRUCT = ndr-flags;
+   ndr_set_flags(ndr-flags, LIBNDR_FLAG_NOALIGN);
+   if (ndr_flags  NDR_SCALARS) {
+   NDR_CHECK(ndr_push_align(ndr, 2));
+   NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 
r-entryID));
+   NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r-length));
+   NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, 
r-binary_oid, r-length));
+   NDR_CHECK(ndr_push_trailer_align(ndr, 2));
+   }
+   if (ndr_flags  NDR_BUFFERS) {
+   }
+   ndr-flags = _flags_save_STRUCT;
+   }
+   return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_drsuapi_MSPrefixMap_Entry(struct ndr_pull 
*ndr, int ndr_flags, struct drsuapi_MSPrefixMap_Entry *r)
+{
+   {
+   uint32_t _flags_save_STRUCT = ndr-flags;
+   ndr_set_flags(ndr-flags, LIBNDR_FLAG_NOALIGN);
+   if (ndr_flags  

[SCM] Samba Shared Repository - branch master updated

2010-02-01 Thread Stefan Metzmacher
The branch, master has been updated
   via  431d75f... s4:NBT-WINS: test large scopes
   via  70779a4... s4:NBT-WINS: pass the expected rcode of the name 
registration to the test code
   via  c1d8dc0... s4:NBT-WINSREPLICATION: test replication with names 
including scopes
   via  331505f... s4:NBT-WINSREPLICATION: fix compiler warnings
   via  07b06e5... s4:NBT-WINSREPLICATION: use an array of nbt_names to 
loop over different names
   via  ea7ec4f... s4:winsserver: reject name registrations with a scope 
length  237
   via  7a02a2b... s4:wrepl_server: truncate the scope of a netbios name to 
237 bytes as Windows 2008 does
   via  e37dc56... libcli/nbt: fix ndr_push_nbt_string() string labels with 
a length of 63 (0x3F) are allowed
  from  93142e4... s4/ldif: Handle Schema:prefixMap blobs in W2K3 and W2K8

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 431d75fc9c7f942dcbd31f80380dda59887ac229
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 1 15:32:37 2010 +0100

s4:NBT-WINS: test large scopes

metze

commit 70779a46a7b7f6e5c00eba048dbf653d86bc07d4
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 1 14:55:14 2010 +0100

s4:NBT-WINS: pass the expected rcode of the name registration to the test 
code

metze

commit c1d8dc01fc6f0fa3a22a405419917d880b832761
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Jan 30 10:50:33 2010 +0100

s4:NBT-WINSREPLICATION: test replication with names including scopes

metze

commit 331505f09d61cdc5c920293fc36ac1853235177b
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jan 29 16:42:24 2010 +0100

s4:NBT-WINSREPLICATION: fix compiler warnings

metze

commit 07b06e51bbf95168899081ba2aa92a4e6a5bac12
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jan 29 16:33:58 2010 +0100

s4:NBT-WINSREPLICATION: use an array of nbt_names to loop over different 
names

metze

commit ea7ec4fb30a261cedb882c9325815679e5e20d57
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 1 14:39:13 2010 +0100

s4:winsserver: reject name registrations with a scope length  237

This matches Windows 2008 behavior. Name releases are just ignored.

metze

commit 7a02a2ba80c2997947a2b2c48c33f8c7647f7471
Author: Stefan Metzmacher me...@samba.org
Date:   Sun Jan 31 18:59:41 2010 +0100

s4:wrepl_server: truncate the scope of a netbios name to 237 bytes as 
Windows 2008 does

metze

commit e37dc56e971f44c00791529a39144d1a972e3ca2
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 1 15:18:15 2010 +0100

libcli/nbt: fix ndr_push_nbt_string() string labels with a length of 63 
(0x3F) are allowed

metze

---

Summary of changes:
 libcli/nbt/nbtname.c   |4 +-
 source4/nbt_server/wins/winsserver.c   |9 +++
 source4/torture/nbt/wins.c |   94 ++-
 source4/torture/nbt/winsreplication.c  |   93 ++--
 source4/wrepl_server/wrepl_apply_records.c |   14 
 5 files changed, 175 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/nbt/nbtname.c b/libcli/nbt/nbtname.c
index 792b340..136379a 100644
--- a/libcli/nbt/nbtname.c
+++ b/libcli/nbt/nbtname.c
@@ -173,9 +173,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_string(struct 
ndr_push *ndr, int ndr_fla
complen = strcspn(s, .);
 
/* we need to make sure the length fits into 6 bytes */
-   if (complen = 0x3F) {
+   if (complen  0x3F) {
return ndr_push_error(ndr, NDR_ERR_STRING,
- component length %u[%08X]  
0x3F,
+ component length %u[%08X]  
0x003F,
  (unsigned)complen, 
(unsigned)complen);
}
 
diff --git a/source4/nbt_server/wins/winsserver.c 
b/source4/nbt_server/wins/winsserver.c
index 4b8b8cc..ca8daed 100644
--- a/source4/nbt_server/wins/winsserver.c
+++ b/source4/nbt_server/wins/winsserver.c
@@ -496,6 +496,11 @@ static void nbtd_winsserver_register(struct 
nbt_name_socket *nbtsock,
goto done;
}
 
+   if (name-scope  strlen(name-scope)  237) {
+   rcode = NBT_RCODE_SVR;
+   goto done;
+   }
+
duplicate_packet = wins_check_wack_queue(iface, packet, src);
if (duplicate_packet) {
/* just ignore the packet */
@@ -874,6 +879,10 @@ static void nbtd_winsserver_release(struct nbt_name_socket 
*nbtsock,
goto done;
}
 
+   if (name-scope  strlen(name-scope)  237) {
+   goto done;
+   }
+
status = winsdb_lookup(winssrv-wins_db, name, packet, rec);
   

svn commit: samba-web r1362 - in trunk/support: .

2010-02-01 Thread jra
Author: jra
Date: 2010-02-01 11:57:40 -0700 (Mon, 01 Feb 2010)
New Revision: 1362

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

Log:
Update Dentar phone number.

Modified:
   trunk/support/us.html


Changeset:
Modified: trunk/support/us.html
===
--- trunk/support/us.html   2010-01-26 15:10:26 UTC (rev 1361)
+++ trunk/support/us.html   2010-02-01 18:57:40 UTC (rev 1362)
@@ -934,8 +934,7 @@
 Dentar, Inc.
 Thomas Glascock, President
 UNIX, Linux, and Samba expertise.
-513.985.0964
-513.312.6673
+513-312-6673
 den...@dentar.com
 /small/pre
 



[SCM] CTDB repository - branch 1.0.112 updated - ctdb-1.0.111-18-g04e40de

2010-02-01 Thread Ronnie Sahlberg
The branch, 1.0.112 has been updated
   via  04e40deac8d0c7edf907135ae81ac961c23135c3 (commit)
   via  72d6ae64ab5ece7645b02054d617b71e231d4741 (commit)
  from  3e2b1839a9f8419eeeb7f22ea5925f6c42f32a65 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.0.112


- Log -
commit 04e40deac8d0c7edf907135ae81ac961c23135c3
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Feb 2 08:03:37 2010 +1100

Version 1.0.112-5

commit 72d6ae64ab5ece7645b02054d617b71e231d4741
Author: Volker Lendecke v...@samba.org
Date:   Fri Jan 29 18:21:09 2010 +0100

tdb: fix an early release of the global lock that can cause data corruption

There was a bug in tdb where the

tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);

(ending the transaction-mutex) was done before the

/* remove the recovery marker */

This means that when a transaction is committed there is a window where 
another
opener of the file sees the transaction marker while the transaction 
committer
is still fully functional and working on it. This led to transaction being
rolled back by that second opener of the file while transaction_commit() 
gave
no error to the caller.

This patch moves the F_UNLCK to after the recovery marker was removed, 
closing
this window.

---

Summary of changes:
 lib/tdb/common/transaction.c |   15 ++-
 packaging/RPM/ctdb.spec.in   |4 +++-
 2 files changed, 13 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c
index 20f2bfc..b8988ea 100644
--- a/lib/tdb/common/transaction.c
+++ b/lib/tdb/common/transaction.c
@@ -135,6 +135,9 @@ struct tdb_transaction {
bool prepared;
tdb_off_t magic_offset;
 
+   /* set when the GLOBAL_LOCK has been taken */
+   bool global_lock_taken;
+
/* old file size before transaction */
tdb_len_t old_map_size;
 
@@ -603,6 +606,11 @@ int _tdb_transaction_cancel(struct tdb_context *tdb)
}
}
 
+   if (tdb-transaction-global_lock_taken) {
+   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
+   tdb-transaction-global_lock_taken = false;
+   }
+
/* remove any global lock created during the transaction */
if (tdb-global_lock.count != 0) {
tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 
4*tdb-header.hash_size);
@@ -947,11 +955,12 @@ static int _tdb_transaction_prepare_commit(struct 
tdb_context *tdb)
return -1;
}
 
+   tdb-transaction-global_lock_taken = true;
+
if (!(tdb-flags  TDB_NOSYNC)) {
/* write the recovery data to the end of the file */
if (transaction_setup_recovery(tdb, 
tdb-transaction-magic_offset) == -1) {
TDB_LOG((tdb, TDB_DEBUG_FATAL, 
tdb_transaction_prepare_commit: failed to setup recovery data\n));
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
_tdb_transaction_cancel(tdb);
return -1;
}
@@ -966,7 +975,6 @@ static int _tdb_transaction_prepare_commit(struct 
tdb_context *tdb)
 tdb-transaction-old_map_size) == 
-1) {
tdb-ecode = TDB_ERR_IO;
TDB_LOG((tdb, TDB_DEBUG_FATAL, 
tdb_transaction_prepare_commit: expansion failed\n));
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
_tdb_transaction_cancel(tdb);
return -1;
}
@@ -1056,7 +1064,6 @@ int tdb_transaction_commit(struct tdb_context *tdb)
tdb_transaction_recover(tdb); 
 
_tdb_transaction_cancel(tdb);
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
 
TDB_LOG((tdb, TDB_DEBUG_FATAL, tdb_transaction_commit: 
write failed\n));
return -1;
@@ -1072,8 +1079,6 @@ int tdb_transaction_commit(struct tdb_context *tdb)
return -1;
}
 
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
-
/*
  TODO: maybe write to some dummy hdr field, or write to magic
  offset without mmap, before the last sync, instead of the
diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index 93f5e22..9b74d49 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -5,7 +5,7 @@ Vendor: Samba Team
 Packager: Samba Team sa...@samba.org
 Name: ctdb
 Version: 1.0.112
-Release: 4
+Release: 5
 Epoch: 0
 License: GNU GPL version 3
 Group: System Environment/Daemons
@@ -123,6 +123,8 @@ rm -rf 

[SCM] CTDB repository - branch master updated - ctdb-1.0.113-66-g898b5ed

2010-02-01 Thread Ronnie Sahlberg
The branch, master has been updated
   via  898b5edfe757cb145960b8f3631029bfd5592119 (commit)
  from  522fbb012524fe41a67dbe43589a282dda6bcbe2 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -
commit 898b5edfe757cb145960b8f3631029bfd5592119
Author: Volker Lendecke v...@samba.org
Date:   Fri Jan 29 18:21:09 2010 +0100

tdb: fix an early release of the global lock that can cause data corruption

There was a bug in tdb where the

tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);

(ending the transaction-mutex) was done before the

/* remove the recovery marker */

This means that when a transaction is committed there is a window where 
another
opener of the file sees the transaction marker while the transaction 
committer
is still fully functional and working on it. This led to transaction being
rolled back by that second opener of the file while transaction_commit() 
gave
no error to the caller.

This patch moves the F_UNLCK to after the recovery marker was removed, 
closing
this window.

---

Summary of changes:
 lib/tdb/common/transaction.c |   15 ++-
 1 files changed, 10 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c
index 20f2bfc..b8988ea 100644
--- a/lib/tdb/common/transaction.c
+++ b/lib/tdb/common/transaction.c
@@ -135,6 +135,9 @@ struct tdb_transaction {
bool prepared;
tdb_off_t magic_offset;
 
+   /* set when the GLOBAL_LOCK has been taken */
+   bool global_lock_taken;
+
/* old file size before transaction */
tdb_len_t old_map_size;
 
@@ -603,6 +606,11 @@ int _tdb_transaction_cancel(struct tdb_context *tdb)
}
}
 
+   if (tdb-transaction-global_lock_taken) {
+   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
+   tdb-transaction-global_lock_taken = false;
+   }
+
/* remove any global lock created during the transaction */
if (tdb-global_lock.count != 0) {
tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 
4*tdb-header.hash_size);
@@ -947,11 +955,12 @@ static int _tdb_transaction_prepare_commit(struct 
tdb_context *tdb)
return -1;
}
 
+   tdb-transaction-global_lock_taken = true;
+
if (!(tdb-flags  TDB_NOSYNC)) {
/* write the recovery data to the end of the file */
if (transaction_setup_recovery(tdb, 
tdb-transaction-magic_offset) == -1) {
TDB_LOG((tdb, TDB_DEBUG_FATAL, 
tdb_transaction_prepare_commit: failed to setup recovery data\n));
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
_tdb_transaction_cancel(tdb);
return -1;
}
@@ -966,7 +975,6 @@ static int _tdb_transaction_prepare_commit(struct 
tdb_context *tdb)
 tdb-transaction-old_map_size) == 
-1) {
tdb-ecode = TDB_ERR_IO;
TDB_LOG((tdb, TDB_DEBUG_FATAL, 
tdb_transaction_prepare_commit: expansion failed\n));
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
_tdb_transaction_cancel(tdb);
return -1;
}
@@ -1056,7 +1064,6 @@ int tdb_transaction_commit(struct tdb_context *tdb)
tdb_transaction_recover(tdb); 
 
_tdb_transaction_cancel(tdb);
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
 
TDB_LOG((tdb, TDB_DEBUG_FATAL, tdb_transaction_commit: 
write failed\n));
return -1;
@@ -1072,8 +1079,6 @@ int tdb_transaction_commit(struct tdb_context *tdb)
return -1;
}
 
-   tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
-
/*
  TODO: maybe write to some dummy hdr field, or write to magic
  offset without mmap, before the last sync, instead of the


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated

2010-02-01 Thread Jeremy Allison
The branch, master has been updated
   via  b300981... Fix bug #7080 - Quota only shown when logged as root.
  from  431d75f... s4:NBT-WINS: test large scopes

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit b3009819c55043aca81d5b53c805696dd4c88aac
Author: Jeremy Allison j...@samba.org
Date:   Mon Feb 1 15:55:55 2010 -0800

Fix bug #7080 - Quota only shown when logged as root.

conn-server_info-utok.uid == 0

isn't the correct check to see if we're root anymore. As rpc_samr_nt.c does,
the correct check is :

geteuid() == sec_initial_uid()

Jeremy.

---

Summary of changes:
 source3/smbd/fake_file.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/fake_file.c b/source3/smbd/fake_file.c
index 6898793..9917481 100644
--- a/source3/smbd/fake_file.c
+++ b/source3/smbd/fake_file.c
@@ -126,7 +126,7 @@ NTSTATUS open_fake_file(struct smb_request *req, 
connection_struct *conn,
NTSTATUS status;
 
/* access check */
-   if (conn-server_info-utok.uid != 0) {
+   if (geteuid() == sec_initial_uid()) {
DEBUG(3, (open_fake_file_shared: access_denied to 
  service[%s] file[%s] user[%s]\n,
  lp_servicename(SNUM(conn)),


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-02-01 Thread Jeremy Allison
The branch, master has been updated
   via  a35be8c... Torture test for bug 7084 - Create time on directories 
not stored properly in an EA in new create time code.
  from  4e08d0d... Arg. Got the sense of the test reversed to fix bug #7080 
- Quota only shown when logged as root.. Doh !

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit a35be8c0c2d804638d9eda5afb6c96ef2f090549
Author: Jeremy Allison j...@samba.org
Date:   Mon Feb 1 18:49:50 2010 -0800

Torture test for bug 7084 - Create time on directories not stored properly 
in an EA in new create time code.

Ensure new files in a directory don't reset the create time.

Jeremy.

---

Summary of changes:
 source3/script/tests/test_smbtorture_s3.sh |2 +-
 source3/torture/torture.c  |   87 
 2 files changed, 88 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_smbtorture_s3.sh 
b/source3/script/tests/test_smbtorture_s3.sh
index 1cbfc23..3e0e3de 100755
--- a/source3/script/tests/test_smbtorture_s3.sh
+++ b/source3/script/tests/test_smbtorture_s3.sh
@@ -28,7 +28,7 @@ tests=FDPASS LOCK1 LOCK2 LOCK3 LOCK4 LOCK5 LOCK6 LOCK7 LOCK9
 #tests=$tests UNLINK BROWSE ATTR TRANS2 MAXFID TORTURE 
 tests=$tests UNLINK BROWSE ATTR TRANS2 TORTURE 
 tests=$tests OPLOCK1 OPLOCK2 OPLOCK3 STREAMERROR
-tests=$tests DIR DIR1 TCON TCONDEV RW1 RW2 RW3
+tests=$tests DIR DIR1 DIR-CREATETIME TCON TCONDEV RW1 RW2 RW3
 tests=$tests OPEN XCOPY RENAME DELETE PROPERTIES W2K
 tests=$tests TCON2 IOCTL CHKPATH FDSESS LOCAL-SUBSTITUTE CHAIN1
 tests=$tests GETADDRINFO POSIX UID-REGRESSION-TEST SHORTNAME-TEST
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 758bb60..07cf5f9 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -6340,6 +6340,92 @@ static bool run_tldap(int dummy)
return true;
 }
 
+/* Torture test to ensure no regression of :
+https://bugzilla.samba.org/show_bug.cgi?id=7084
+*/
+
+static bool run_dir_createtime(int dummy)
+{
+   struct cli_state *cli;
+   const char *dname = \\testdir;
+   const char *fname = \\testdir\\testfile;
+   NTSTATUS status;
+   struct timespec create_time;
+   struct timespec create_time1;
+   uint16_t fnum;
+   bool ret = false;
+
+   if (!torture_open_connection(cli, 0)) {
+   return false;
+   }
+
+   cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+   cli_rmdir(cli, dname);
+
+   status = cli_mkdir(cli, dname);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(mkdir failed: %s\n, nt_errstr(status));
+   goto out;
+   }
+
+   if (!cli_qpathinfo2(cli,
+   dname,
+   create_time,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL)) {
+   status = cli_nt_error(cli);
+   printf(cli_qpathinfo2 returned %s\n,
+  nt_errstr(status));
+   goto out;
+   }
+
+   /* Sleep 3 seconds, then create a file. */
+   sleep(3);
+
+   status = cli_open(cli, fname, O_RDWR | O_CREAT | O_EXCL,
+ DENY_NONE, fnum);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(cli_open failed: %s\n, nt_errstr(status));
+   goto out;
+   }
+
+   if (!cli_qpathinfo2(cli,
+   dname,
+   create_time1,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL)) {
+   status = cli_nt_error(cli);
+   printf(cli_qpathinfo2 (2) returned %s\n,
+  nt_errstr(status));
+   goto out;
+   }
+
+   if (timespec_compare(create_time1, create_time)) {
+   printf(run_dir_createtime: create time was updated (error)\n);
+   } else {
+   printf(run_dir_createtime: create time was not updated 
(correct)\n);
+   ret = true;
+   }
+
+  out:
+
+   cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+   cli_rmdir(cli, dname);
+   if (!torture_close_connection(cli)) {
+   ret = false;
+   }
+   return ret;
+}
+
+
 static bool run_streamerror(int dummy)
 {
struct cli_state *cli;
@@ -7195,6 +7281,7 @@ static struct {
{OPLOCK3,  run_oplock3, 0},
{DIR,  run_dirtest, 0},
{DIR1,  run_dirtest1, 0},
+   {DIR-CREATETIME,  run_dir_createtime, 0},
{DENY1,  torture_denytest1, 0},
{DENY2,  torture_denytest2, 0},
{TCON,  run_tcon_test, 0},


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-02-01 Thread Jeremy Allison
The branch, master has been updated
   via  f3ee151... Fix bug #7084 - Create time on directories not stored 
properly in an EA in new create time code.
  from  a35be8c... Torture test for bug 7084 - Create time on directories 
not stored properly in an EA in new create time code.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit f3ee1516e631274531439e0ab7c384d02aff789c
Author: Jeremy Allison j...@samba.org
Date:   Mon Feb 1 18:50:43 2010 -0800

Fix bug #7084 - Create time on directories not stored properly in an EA in 
new create time code.

Remove erroneous optimisation that caused no EA to be set
if calculated btime matched st_ex btime, and calculated DOS
attribute matched existing file attribute.

Jeremy.

---

Summary of changes:
 source3/smbd/dosmode.c |7 ---
 1 files changed, 0 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index e5d6bc3..10249f4 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -739,13 +739,6 @@ int file_set_dosmode(connection_struct *conn, struct 
smb_filename *smb_fname,
dosmode  = ~FILE_ATTRIBUTE_OFFLINE;
old_mode = ~FILE_ATTRIBUTE_OFFLINE;
 
-   if (old_mode == dosmode 
-   (timespec_compare(new_create_timespec,
-   smb_fname-st.st_ex_btime) == 0)) {
-   smb_fname-st.st_ex_mode = unixmode;
-   return(0);
-   }
-
smb_fname-st.st_ex_btime = new_create_timespec;
 
 #ifdef HAVE_STAT_DOS_FLAGS


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-02-01 Thread Jeremy Allison
The branch, master has been updated
   via  86bf5ea... Add debug to make it clear when EA dosmode set is 
invoked.
  from  f3ee151... Fix bug #7084 - Create time on directories not stored 
properly in an EA in new create time code.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 86bf5eac678d54037d8fcf81bade1f464dd97299
Author: Jeremy Allison j...@samba.org
Date:   Mon Feb 1 19:21:35 2010 -0800

Add debug to make it clear when EA dosmode set is invoked.

Jeremy.

---

Summary of changes:
 source3/smbd/dosmode.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 10249f4..4365563 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -372,6 +372,11 @@ static bool set_ea_dos_attribute(connection_struct *conn,
unix_timespec_to_nt_time(dosattrib.info.info3.create_time,
smb_fname-st.st_ex_btime);
 
+   DEBUG(10,(set_ea_dos_attributes: set attribute 0x%x, btime = %s on 
file %s\n,
+   (unsigned int)dosmode,
+   
time_to_asc(convert_timespec_to_time_t(smb_fname-st.st_ex_btime)),
+   smb_fname_str_dbg(smb_fname) ));
+
ndr_err = ndr_push_struct_blob(
blob, talloc_tos(), NULL, dosattrib,
(ndr_push_flags_fn_t)ndr_push_xattr_DOSATTRIB);


-- 
Samba Shared Repository


Build status as of Tue Feb 2 07:00:03 2010

2010-02-01 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2010-02-01 
00:00:16.0 -0700
+++ /home/build/master/cache/broken_results.txt 2010-02-02 00:00:30.0 
-0700
@@ -1,10 +1,10 @@
-Build status as of Mon Feb  1 07:00:06 2010
+Build status as of Tue Feb  2 07:00:03 2010
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   3  0  0 
-ldb  28 28 0 
+ccache   1  0  0 
+ldb  20 20 0 
 libreplace   1  0  0 
 lorikeet 0  0  0 
 pidl 0  0  0 
@@ -13,9 +13,9 @@
 samba-docs   0  0  0 
 samba-web0  0  0 
 samba_3_current 0  0  0 
-samba_3_master 25 24 3 
-samba_3_next 17 16 1 
-samba_4_0_test 28 28 1 
+samba_3_master 17 16 1 
+samba_3_next 0  0  0 
+samba_4_0_test 20 20 1 
 talloc   1  0  0 
-tdb  1  1  0 
+tdb  18 8  0 
 


[SCM] Samba Shared Repository - branch master updated

2010-02-01 Thread Stefan Metzmacher
The branch, master has been updated
   via  d8071e7... Change uint_t to unsigned int in source4
   via  a47b6eb... Change uint_t to unsigned int in source3
   via  3ee9d1a... Change uint_t to unsigned int in pidl
   via  aa6a507... Change uint_t to unsigned int in libcli
   via  a7250eb... Change uint_t to unsigned int in lib/util
   via  2cb2d53... Change uint_t to unsigned int in lib/talloc
   via  d4fc2e8... Change uint_t to unsigned int in lib/crypto
   via  a2c95a5... Change uint_t to unsigned int in lib/replace
   via  e3aeea2... s4:NBT-WINSREPLICATION: don't mark a local variable as 
static
  from  86bf5ea... Add debug to make it clear when EA dosmode set is 
invoked.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit d8071e7ed7c57e8b0f2d80420e27f9ea7ab63022
Author: Matt Kraai mkr...@beckman.com
Date:   Tue Jan 5 09:42:54 2010 -0800

Change uint_t to unsigned int in source4

Signed-off-by: Stefan Metzmacher me...@samba.org

commit a47b6ebb3036f5073fdb2320b584345d3604c38d
Author: Matt Kraai mkr...@beckman.com
Date:   Tue Jan 5 09:42:23 2010 -0800

Change uint_t to unsigned int in source3

Signed-off-by: Stefan Metzmacher me...@samba.org

commit 3ee9d1a3d1e934eccd0846b4dac30aae40dc70f8
Author: Matt Kraai mkr...@beckman.com
Date:   Tue Jan 5 09:41:53 2010 -0800

Change uint_t to unsigned int in pidl

Signed-off-by: Stefan Metzmacher me...@samba.org

commit aa6a507e76685f2a8d1f3bd33cbf0fbdeb0d69ce
Author: Matt Kraai mkr...@beckman.com
Date:   Tue Jan 5 09:41:24 2010 -0800

Change uint_t to unsigned int in libcli

Signed-off-by: Stefan Metzmacher me...@samba.org

commit a7250eb14270101d4ca580acd8fdcaf7e308e515
Author: Matt Kraai mkr...@beckman.com
Date:   Tue Jan 5 09:40:54 2010 -0800

Change uint_t to unsigned int in lib/util

Signed-off-by: Stefan Metzmacher me...@samba.org

commit 2cb2d5317f8428b5eaef2365c815aa34739a80b5
Author: Matt Kraai mkr...@beckman.com
Date:   Tue Jan 5 09:40:26 2010 -0800

Change uint_t to unsigned int in lib/talloc

Signed-off-by: Stefan Metzmacher me...@samba.org

commit d4fc2e82012277e5e8570da5d08d62c6847a99c0
Author: Matt Kraai mkr...@beckman.com
Date:   Tue Jan 5 09:39:56 2010 -0800

Change uint_t to unsigned int in lib/crypto

Signed-off-by: Stefan Metzmacher me...@samba.org

commit a2c95a5d961594f2accbb032cd7e8da9767e2e47
Author: Matt Kraai mkr...@beckman.com
Date:   Tue Jan 5 09:43:24 2010 -0800

Change uint_t to unsigned int in lib/replace

Signed-off-by: Stefan Metzmacher me...@samba.org

commit e3aeea29a4e730ccbe7367645703cdc9ee8e7a7e
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 1 17:30:30 2010 +0100

s4:NBT-WINSREPLICATION: don't mark a local variable as static

This was somehow introduced in commit 
8773e743c518578584d07d35ffdafdd598af88b0.

metze

---

Summary of changes:
 lib/crypto/md5.c   |8 ++--
 lib/replace/README |1 -
 lib/replace/getifaddrs.c   |2 +-
 lib/replace/libreplace_cc.m4   |1 -
 lib/replace/test/testsuite.c   |1 -
 lib/talloc/talloc.3.xml|6 ++--
 lib/talloc/talloc_guide.txt|6 ++--
 lib/util/asn1.c|4 +-
 lib/util/byteorder.h   |4 +-
 lib/util/charset/iconv.c   |2 +-
 lib/util/util_str.c|2 +-
 libcli/auth/msrpc_parse.c  |2 +-
 libcli/auth/proto.h|2 +-
 libcli/auth/smbdes.c   |2 +-
 libcli/nbt/nbtname.c   |2 +-
 libcli/security/dom_sid.c  |2 +-
 pidl/tests/Util.pm |1 -
 source3/include/proto.h|8 ++--
 source3/libsmb/clirap2.c   |8 ++--
 source4/client/client.c|4 +-
 source4/dsdb/common/util.c |   16 
 source4/dsdb/samdb/ldb_modules/password_hash.c |4 +-
 source4/lib/messaging/messaging.c  |2 +-
 source4/libcli/clifile.c   |6 ++--
 source4/libcli/raw/interfaces.h|   20 +-
 source4/libcli/raw/libcliraw.h |   34 +-
 source4/libcli/raw/raweas.c|   44 
 source4/libcli/raw/rawfile.c   |4 +-
 source4/libcli/raw/rawfileinfo.c   |2 +-
 source4/libcli/raw/rawrequest.c|   38 ++--
 source4/libcli/raw/rawsearch.c |   12 +++---