Re: [Samba] Winbindd filling log file with final write to client failed: Broken pipe

2011-04-01 Thread Volker Lendecke
On Thu, Mar 31, 2011 at 09:08:12PM +0200, Gabriele Paggi wrote:
 I've set up winbindd to authenticate local users against our active
 directory servers and everything works fine.
 I see plenty of the following lines in my logs and I'm wondering if
 someone can help me troubleshooting this:
 
 [2011/03/31 15:15:02, 10]
 winbindd/winbindd_cache.c:cache_retrieve_response(2666)
   Retrieving response for pid 8749
 [2011/03/31 15:15:02,  7]
 winbindd/winbindd_idmap.c:winbindd_sid2gid_async(351)
   winbindd_sid2gid_async: Resolving
 S-1-5-21-2615388863-3808077908-615857747-2195 to a gid
 [2011/03/31 15:15:02, 10] winbindd/winbindd_dual.c:async_request(125)
   Sending request to child pid 8749 (domain='')
 [2011/03/31 15:15:02, 10]
 winbindd/winbindd_cache.c:cache_retrieve_response(2666)
   Retrieving response for pid 8749
 [2011/03/31 15:15:02,  2] winbindd/winbindd.c:remove_client(744)
   final write to client failed: Broken pipe
 [2011/03/31 15:15:02,  2] winbindd/winbindd.c:remove_client(744)
   final write to client failed: Broken pipe

Where is the real error here? This seems completely normal
to me with such a high debug level.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-37-0, fax: +49-551-37-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Winbindd filling log file with final write to client failed: Broken pipe

2011-04-01 Thread Matthieu Patou

On 31/03/2011 23:08, Gabriele Paggi wrote:

Hello,

I've set up winbindd to authenticate local users against our active
directory servers and everything works fine.
I see plenty of the following lines in my logs and I'm wondering if
someone can help me troubleshooting this:

[2011/03/31 15:15:02, 10]
winbindd/winbindd_cache.c:cache_retrieve_response(2666)
   Retrieving response for pid 8749
[2011/03/31 15:15:02,  7]
winbindd/winbindd_idmap.c:winbindd_sid2gid_async(351)
   winbindd_sid2gid_async: Resolving
S-1-5-21-2615388863-3808077908-615857747-2195 to a gid
[2011/03/31 15:15:02, 10] winbindd/winbindd_dual.c:async_request(125)
   Sending request to child pid 8749 (domain='')
[2011/03/31 15:15:02, 10]
winbindd/winbindd_cache.c:cache_retrieve_response(2666)
   Retrieving response for pid 8749
[2011/03/31 15:15:02,  2] winbindd/winbindd.c:remove_client(744)
   final write to client failed: Broken pipe
[2011/03/31 15:15:02,  2] winbindd/winbindd.c:remove_client(744)
   final write to client failed: Broken pipe

Researches on the internet didn't help as this kind of error are
always associated with some functionality not working at all, but
that's not my case (apparently).

Look to me familiar with a bug that I reported to Gunther and that 
crashed my server this summer as far as I remember it's fixed in 3.5.x.


Gunther can you confirm ?

--

Matthieu Patou
Samba Teamhttp://samba.org
Private repo  http://git.samba.org/?p=mat/samba.git;a=summary


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


Re: [Samba] Winbindd filling log file with ' final write to client failed: Broken pipe'

2011-04-01 Thread Gabriele Paggi
Hello Volker,

thank for your reply!

 Where is the real error here? This seems completely normal
 to me with such a high debug level.

The error I'm referring to is:

[2011/03/31 15:15:02,  2] winbindd/winbindd.c:remove_client(744)
  final write to client failed: Broken pipe
[2011/03/31 15:15:02,  2] winbindd/winbindd.c:remove_client(744)
  final write to client failed: Broken pipe

I can of course disregard it but I would still be wondering why it fails
writing to the client :)

Have a nice day,
Gabriele


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


Re: [Samba] 300mbit/s smbclient vs. 500mbit/s iperf [Solved]

2011-04-01 Thread Werner Durgarten
Hi,

 Original-Nachricht 

  
   What smbclient is that?
   
  
  
  smbclient --version
  Version 3.0.33-3.29.el5_5.1
  
  ... i admit that this is a littte old. i'll upgrade and rerun the tests.
 
 Yes, please do. For 3.2 there considerable work was done to
 tune the get/put commands.
 

smbclient 3.3 reaches same throughput as iperf. thanks for your help.
-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] kernel oplocks in ctdb environment

2011-04-01 Thread Bob Cregan

Hi
Can anyone advise me on kernel oplocks in a ctdb cluster.

I have a ctdb (GPFS is the parallel file system) setup that uses samba 
(3.5.8) for cifs and IBM CNFS for NFS. Reading the documentation on 
kernel oplocks it seems to me that I can export the same area via samba 
and NFS with kernel oplocks = Yes .


My logic is that IBM CNFS has shared NFS locking information held on the 
shared filesystem, and therefore the kernel on each member of the ctdb 
cluster will be aware of any NFS locks. Samba with kernel oplocks = 
Yes should then not provide opportunistic locking to a CIFS client that 
want to access a file that has an NFS lock (giving an I/O error to that 
client??).


Is this in fact what will happen? The ability to dual export area of the 
filesystem would be very useful, but I don't want to risk data corruption.


Thanks for any advice.

Bob

--
Bob Cregan
Senior Storage Systems Administrator
ACRC
Bristol University
Tel: +44 (0) 117 331 4421
Mobile: +44 (0) 7712388129

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


[Samba] FW: ACL Lost and unable to set rights from explorer (xp)

2011-04-01 Thread L . P . H . van Belle
Hai, 

Ik have tried the option:  follow symlinks = yes, but this also doesnt work.

My workstation is XP SP3. 
Im also having some CIFS VFS messages on my console, 

kern.log.0:Mar 30 20:47:52 ms249-lin-001 kernel: [12804.264823]  CIFS VFS:
strtoUCS: char2uni of -121 returned -22
kern.log.0:Mar 30 20:47:52 ms249-lin-001 kernel: [12804.323034]  CIFS VFS:
strtoUCS: char2uni of -127 returned -22
kern.log.0:Mar 30 20:47:52 ms249-lin-001 kernel: [12804.323278]  CIFS VFS:
strtoUCS: char2uni of -127 returned -22
kern.log.0:Mar 30 20:55:16 ms249-lin-001 kernel: [13248.053159]  CIFS VFS:
strtoUCS: char2uni of -119 returned -22
kern.log.0:Mar 30 20:55:16 ms249-lin-001 kernel: [13248.053405]  CIFS VFS:
strtoUCS: char2uni of -119 returned -22
kern.log.0:Mar 30 21:14:11 ms249-lin-001 kernel: [14382.464779]  CIFS VFS:
strtoUCS: char2uni of -13 returned -22
kern.log.0:Mar 30 21:14:11 ms249-lin-001 kernel: [14382.464806]  CIFS VFS:
strtoUCS: char2uni of -13 returned -22
kern.log.0:Mar 30 21:14:11 ms249-lin-001 kernel: [14382.471268]  CIFS VFS:
strtoUCS: char2uni of -13 returned -22
kern.log.0:Mar 30 21:14:11 ms249-lin-001 kernel: [14382.471293]  CIFS VFS:
strtoUCS: char2uni of -13 returned -22
messages:Mar 30 11:05:50 ms249-lin-001 kernel: CIFS: Unknown mount option
prefixpath
messages:Mar 30 11:08:30 ms249-lin-001 kernel: CIFS: Unknown mount option
prefixpath
messages:Mar 30 11:38:54 ms249-lin-001 kernel: CIFS: Unknown mount option
prefixpath
messages:Mar 30 11:41:12 ms249-lin-001 kernel: CIFS: Unknown mount option
prefixpath
messages:Mar 30 12:02:22 ms249-lin-001 kernel: CIFS: Unknown mount option
prefixpath
messages:Mar 30 12:02:57 ms249-lin-001 kernel: CIFS: Unknown mount option
prefixpath
messages:Mar 30 12:36:59 ms249-lin-001 kernel: fs/cifs/inode.c: CIFS VFS:
in cifs_revalidate as Xid: 182706760fs/cifs/inode.c: CIFS VFS: in
cifs_revalidate as Xid: 1827067624 with uid: 0
messages:Mar 30 12:36:59 ms249-lin-001 kernel: fs/cifs/inode.c: CIFS VFS:
in cifs_revalidate as Xid: 1827067964 with uid: 0
syslog.0:Mar 31 10:27:47 ms249-lin-001 kernel: [61999.039710]  CIFS VFS: No
response for cmd 114 mid 40334
syslog.0:Mar 31 20:30:47 ms249-lin-001 kernel: [98178.459129]  CIFS VFS:
strtoUCS: char2uni of -21 returned -22
syslog.0:Mar 31 20:30:49 ms249-lin-001 kernel: [98180.484485]  CIFS VFS:
strtoUCS: char2uni of -108 returned -22
syslog.0:Mar 31 20:30:49 ms249-lin-001 kernel: [98180.543383]  CIFS VFS:
strtoUCS: char2uni of -55 returned -22
syslog.0:Mar 31 20:30:49 ms249-lin-001 kernel: [98181.123411]  CIFS VFS:
strtoUCS: char2uni of -108 returned -22
syslog.0:Mar 31 20:30:52 ms249-lin-001 kernel: [98183.604815]  CIFS VFS:
strtoUCS: char2uni of -4 returned -22
syslog.0:Mar 31 20:30:52 ms249-lin-001 kernel: [98183.850038]  CIFS VFS:
strtoUCS: char2uni of -23 returned -22
syslog.0:Mar 31 20:30:54 ms249-lin-001 kernel: [98185.403633]  CIFS VFS:
strtoUCS: char2uni of -23 returned -22
syslog.0:Mar 31 20:30:54 ms249-lin-001 kernel: [98185.418036]  CIFS VFS:
strtoUCS: char2uni of -23 returned -22
syslog.0:Mar 31 20:30:57 ms249-lin-001 kernel: [98188.452798]  CIFS VFS:
strtoUCS: char2uni of -24 returned -22
syslog.0:Mar 31 20:30:57 ms249-lin-001 kernel: [98188.586922]  CIFS VFS:
strtoUCS: char2uni of -21 returned -22
syslog.0:Mar 31 20:30:57 ms249-lin-001 kernel: [98189.274373]  CIFS VFS:
strtoUCS: char2uni of -23 returned -22
syslog.0:Mar 31 20:31:03 ms249-lin-001 kernel: [98195.360788]  CIFS VFS:
strtoUCS: char2uni of -21 returned -22
syslog.0:Mar 31 20:31:04 ms249-lin-001 kernel: [98195.400124]  CIFS VFS:
strtoUCS: char2uni of -10 returned -22
 

here is a part of my smb.conf of the running config. 
## MISC FILES/DIRECTORIES
#   inherit permissions = yes   
#   inherit acls = yes  
nt acl support = yes
dos filemode =  yes
map acl inherit = yes
ea support = yes
store dos attributes = no
map hidden = no
map system = no
map archive = no
map readonly = no
dos charset = 850
#   unix charset = ISO8859-1
preserve case = yes
short preserve case = yes
case sensitive = auto
directory mask = 0755
hide dot files = yes
hide unreadable = yes


[homes]
comment = Prive documenten van %U
read only = No
create mask = 0644
directory mask = 0775
browseable = Yes
follow symlinks = yes
vfs object = recycle
recycle: config-files = /etc/samba/samba-recycle.conf


-Oorspronkelijk bericht-
Van: be...@bazuin.nl [mailto:samba-boun...@lists.samba.org] 
Namens L.P.H. van Belle
Verzonden: 2011-03-31 14:05
Aan: samba@lists.samba.org
Onderwerp: [Samba] ACL Lost and unable to set rights from explorer (xp)

Hi all, 

I have 2 problems :-( 

Im running debian kernel 2.6.32 samba 3.5.6.
i upgraded my samba from 3.2.4 to 3.5.6 
now i have the following problems. 

When i want to set my rights on a folder i get access denied 
this was working ok 

Re: [Samba] Winbindd filling log file with ' final write to client failed: Broken pipe'

2011-04-01 Thread Volker Lendecke
On Fri, Apr 01, 2011 at 09:25:30AM +0200, Gabriele Paggi wrote:
 Hello Volker,
 
 thank for your reply!
 
  Where is the real error here? This seems completely normal
  to me with such a high debug level.
 
 The error I'm referring to is:
 
 [2011/03/31 15:15:02,  2] winbindd/winbindd.c:remove_client(744)
   final write to client failed: Broken pipe
 [2011/03/31 15:15:02,  2] winbindd/winbindd.c:remove_client(744)
   final write to client failed: Broken pipe
 
 I can of course disregard it but I would still be wondering why it fails
 writing to the client :)

Oh, that's in response to a Solaris bug. Instead of just
closing the socket we write one byte before closing it. The
bug was that the winbind client did not get a 0 read size
when we just close the server end of a unix domain socket
and thus went into a timeout. Without this bug it can happen
that we can't write to that socket anymore, but it's very
hard to detect at runtime whether we have this bug. So we
live with this error message.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-37-0, fax: +49-551-37-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Unable to connect to Samba share from Windows XP

2011-04-01 Thread Jaime Aguado
Hi everyone,

I'm integrating a Samba server in an Embedded Linux box, in order to share
the contents of the storage devices plugged in the USB port. For this, I
have created a share in the folder where the USB devices are always mounted,
giving free and exclusive access to the guest user.

The strange thing is that, when using a Linux machine (to be precise, with
Ubuntu), I can connect with no problem using any user or password by a
simple mount command. But when using Windows XP, even though I can see the
server with the NetBIOS name I have configured, there is no way I can
connect to the share. In fact, many times the connection attempt kills the
smbd daemon, although not the nmbd.

Anybody knows what can be happening? I've been trying to solve this for a
few days now without any success at all...

Many thanks in advance :)
Jaime
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] difference between samba running on solaris 10 and centos 5.5

2011-04-01 Thread Gaiseric Vandal
I believe ZFS uses NFSv4 Acl's while Ext3 (or UFS)  uses Posix.  
Supposedly the NFSv4 ACL's are closer to Windows.  My experience was 
that ZFS gave more headaches than UFS in conjunction with Samba-   with 
ZFS a perm such as 660 (i.e. user and group can read and write, but 
not rights to anyone ELSE) sometimes got  interpreted by Samba as 
everyone is denied which trumped the user and group allow ACE's.


What does getfacl show on the file?

What do you see for the permissions and effective permissions under 
Windows?  Are there Deny ACE's?  Does windows complain about 
permissions being ordered incorrectly?


I believe that Centos 5.x/RHEL5.x DOES enabled ACL's on Ext3 file 
systems by default.



On 03/31/2011 11:16 PM, Jeremy Allison wrote:

On Fri, Apr 01, 2011 at 12:05:03PM +1000, Jason Wise wrote:
   

I have recently switch from Solaris 10 with ZFS filesystem to CentOS 5.5
with ext3 filesystem. I am now getting access denied errors randomly
in windows. What I would like to know is, what are the difference's
between solaris and linux that may cause this?
 

They have different ACL models. We'd need to see level 10 logs
containing these errors to be able to tell what is going on.

Jeremy.
   


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


Re: [Samba] Samba4 domain trust to windows 2003 domain

2011-04-01 Thread Gaiseric Vandal

Would Samba4 support Kerberos trusts?

On 04/01/2011 12:53 AM, Andrew Bartlett wrote:

On Tue, 2011-03-15 at 18:37 +0100, Luca Zanon wrote:
   

Hi,
i have installed Samba4 ALPHA 15 on debian/ubuntu how to described in
http://wiki.samba.org/index.php/Samba4/HOWTO
all ok
i created a domain and i have join pc and member server, etc.. etc...

Now i want trust my test domain with a existent windows AD domain, is
possible?
exist an HOWTO that described this procedure?

thanks.
 

I'm sorry to say that Samba4 does not support domain trusts at the
moment.

Andrew Bartlett

   


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


[Samba] Disk full / file corrupted

2011-04-01 Thread Dmitry Mordovin

Hello!

Sorry if I repeated.

I have next problem with Samba 3.5.8

*Scenario:*
- CentOS 5.5
- Mounted disk image with loop device to /mnt/.sharedDisk

mount (output)
/SharedDiskImage.img on /mnt/.sharedDisk type vfat 
(rw,noexec,nosuid,nodev,loop=/dev/loop0,uid=99)


df -h (output)
FilesystemSize  Used Avail Use% Mounted on
/SharedDiskImage.img 128M  128M  1.5K 100% /mnt/.sharedDisk

- Avail 1.5K space
- I was test with vfat, ext3, ext4 file system.

Samba share /mnt/.sharedDisk folder.

On my windows XP pc I map this share as network drive.
In drive properties I see, avail only 1.5K free disk space

However, I can open existed BMP image (10K size) with MS Paint, resize 
image and save. Paint alert me disk is full.

Now my BMP image size is 54K, and corrupted.

Why 54K if only 1.5K avail?

Above example with MS Paint.
If I use MS Wordpad in same scenario (Save more data than avail) Wordpad 
alert me in half of the cases.


This problem is very important for me.

I thinking, this problem with Paint and Wordpad and have been do some 
alternative test.


I create virtual disk on local XP machine, and try same scenario, Paint 
and Wordpad works well. They alert about disk full and not rewrite early 
saved file.

So, I don't loss saved file.

Does it possible to solve this problem?

Thanks
Dmitry

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


[Samba] Unable to join to Windows 2003 PDC using samba 3.5.8 from a linux machine!!

2011-04-01 Thread Rick Gates
Hi all,

I am using samba 3.5.8 on a linux machine.
I am not able to join the domain of a windows 2003 server in ADS mode.

I am getting the following error message:

# /usr/local/samba/bin/net ads join -U Administrator%password -I 10.25.66.71

Failed to join domain: failed to find DC for domain ABCDOM.PQR.COM
#

I am not sure what the issue here.
It works absolutely fine when I try to join the domain in rpc mode.

# /usr/local/samba/bin/net rpc join -U Administrator%password
Joined domain ABCDOM.
#

The smb.conf used is:

# /usr/local/samba/bin/testparm
Load smb config files from /usr/local/samba/lib/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section [homes]
Processing section [printers]
Processing section [Linux]
Loaded services file OK.
Server role: ROLE_DOMAIN_MEMBER
Press enter to see a dump of your service definitions

[global]
workgroup = ABCDOM
realm = ABCDOM.PQR.COM
server string = Samba Server - Research
security = ADS
password server = 10.25.66.71
log level = 10
log file = /var/log/samba/%m.log
max log size = 50
add user script = /usr/sbin/useradd %u
delete user script = /usr/sbin/userdel %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/sbin/usermod -a -G %g %u
delete user from group script = /usr/sbin/deluser %u %g
add machine script = /usr/sbin/adduser -n -g machines -c Machine -d
/dev/null -s /bin/false %u
domain master = No
dns proxy = No
wins server = 10.25.66.71
idmap uid = 200-12
idmap gid = 200-12
admin users = root
cups options = raw

[homes]
comment = Home Directories
read only = No
browseable = No

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

[Linux]
comment = Share on this linux machine
path = /tmp/linux
read only = No
#

NOTE: 10.25.66.71 is the IP of my 2003 windows server.

My lmhosts file is:

# cat lmhosts.
10.25.66.71 ABC3
10.25.66.71 ABCDOM#1b
10.25.66.71 ABCDOM#1c

#

It would be great, if any one can tell me if there is anything wrong here
and probably help me sort out this issue.
Thanks in advance!!

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


Re: [Samba] Unable to join to Windows 2003 PDC using samba 3.5.8 from a linux machine!!

2011-04-01 Thread Gaiseric Vandal

So your samba server thinks it is  joining an NT4 domain.
Is the ADS domain in NT4 compatibility mode or windows 2003 native 
mode?I think that NT4 machines can still join ADS domains even if 
the ADS domains are in 2000/2003 mode.


Did you try adding the kerberos realm info for ABCDOM.PQR.COM into the 
samba clients krb5?


Also check

testparm -v | grep resolve

By default
name resolve order = lmhosts wins host bcast

I think it is better to have hosts and wins first.

Is the ADS server your DNS server?  Is the samba server using the ADS 
server as the DNS server?  DNS should include resource records to help 
locate an ADS DC.  I don't think you can have lmhosts entry for an ADS 
server.




On 04/01/2011 11:59 AM, Rick Gates wrote:

Hi all,

I am using samba 3.5.8 on a linux machine.
I am not able to join the domain of a windows 2003 server in ADS mode.

I am getting the following error message:

# /usr/local/samba/bin/net ads join -U Administrator%password -I 10.25.66.71

Failed to join domain: failed to find DC for domain ABCDOM.PQR.COM
#

I am not sure what the issue here.
It works absolutely fine when I try to join the domain in rpc mode.

# /usr/local/samba/bin/net rpc join -U Administrator%password
Joined domain ABCDOM.
#

The smb.conf used is:

# /usr/local/samba/bin/testparm
Load smb config files from /usr/local/samba/lib/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section [homes]
Processing section [printers]
Processing section [Linux]
Loaded services file OK.
Server role: ROLE_DOMAIN_MEMBER
Press enter to see a dump of your service definitions

[global]
 workgroup = ABCDOM
 realm = ABCDOM.PQR.COM
 server string = Samba Server - Research
 security = ADS
 password server = 10.25.66.71
 log level = 10
 log file = /var/log/samba/%m.log
 max log size = 50
 add user script = /usr/sbin/useradd %u
 delete user script = /usr/sbin/userdel %u
 add group script = /usr/sbin/groupadd %g
 delete group script = /usr/sbin/groupdel %g
 add user to group script = /usr/sbin/usermod -a -G %g %u
 delete user from group script = /usr/sbin/deluser %u %g
 add machine script = /usr/sbin/adduser -n -g machines -c Machine -d
/dev/null -s /bin/false %u
 domain master = No
 dns proxy = No
 wins server = 10.25.66.71
 idmap uid = 200-12
 idmap gid = 200-12
 admin users = root
 cups options = raw

[homes]
 comment = Home Directories
 read only = No
 browseable = No

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

[Linux]
 comment = Share on this linux machine
 path = /tmp/linux
 read only = No
#

NOTE: 10.25.66.71 is the IP of my 2003 windows server.

My lmhosts file is:

# cat lmhosts.
10.25.66.71 ABC3
10.25.66.71 ABCDOM#1b
10.25.66.71 ABCDOM#1c

#

It would be great, if any one can tell me if there is anything wrong here
and probably help me sort out this issue.
Thanks in advance!!

Thanks,
Rick
   


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


[Samba] Samba4 Ubuntu Init Scripts

2011-04-01 Thread Ryan Leimenstoll
Hello all,
  I was wondering if anyone has developed an init script for Samba4
Alpha14. I am using alpha 12 right now (from APT), but I would like to
upgrade to Alpha14. Since Samba4 from GIT doesn't come with an init script,
I have been unable to upgrade.

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


Re: [Samba] Samba4 Ubuntu Init Scripts

2011-04-01 Thread Aaron E.
here's one I put together and it works pretty good. I took parts from 
various net research and came up with this, I have since gathered a 
better understanding and probably should rewrite it without the killall 
statement but Ill save that for another day..


Edit paths accordingly..

#! /bin/bash -e
### BEGIN INIT INFO
# Provides:  samba
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Samba
# Description:   Samba Domain controller
#scheduler
### END INIT INFO
#
#
#
set -e

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/local/samba1/sbin/samba

test -x $DAEMON || exit 0

case $1 in
   start)
echo -ne Starting Samba samba \n
$DAEMON -D
  ;;
stop)
echo -ne Stopping Samba samba \n
PIDSMB=`ps -e | grep samba | awk '{ print $1 }'`
killall samba
  ;;
restart)
$0 stop
echo -ne Sleeping 5 Seconds Before Start: \n
sleep 5
$0 start
   ;;
 *)
   echo Usage: /etc/init.d/samba {start|stop|restart)
   exit 1
   ;;
esac

exit 0



On 04/01/2011 12:43 PM, Ryan Leimenstoll wrote:

Hello all,
   I was wondering if anyone has developed an init script for Samba4
Alpha14. I am using alpha 12 right now (from APT), but I would like to
upgrade to Alpha14. Since Samba4 from GIT doesn't come with an init script,
I have been unable to upgrade.

Thanks!


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


Re: [Samba] kernel oplocks in ctdb environment

2011-04-01 Thread Volker Lendecke
On Fri, Apr 01, 2011 at 08:58:57AM +0100, Bob Cregan wrote:
 Hi
 Can anyone advise me on kernel oplocks in a ctdb cluster.
 
 I have a ctdb (GPFS is the parallel file system) setup that uses
 samba (3.5.8) for cifs and IBM CNFS for NFS. Reading the
 documentation on kernel oplocks it seems to me that I can export the
 same area via samba and NFS with kernel oplocks = Yes .
 
 My logic is that IBM CNFS has shared NFS locking information held on
 the shared filesystem, and therefore the kernel on each member of
 the ctdb cluster will be aware of any NFS locks. Samba with kernel
 oplocks = Yes should then not provide opportunistic locking to a
 CIFS client that want to access a file that has an NFS lock (giving
 an I/O error to that client??).

The only point of kernel oplocks is to be informed if
someone else wants to open a file. We can then inform the
client to flush its cache and not cache future requests.
Intra-Samba this works in cooperation with GPFS. GPFS has a
special leases API that Samba can make use of with the gpfs
VFS module, so the theory is that oplocks should work
cross-protocol. I haven't run concrete tests in that area
for a while though, I'd need to do that again to be 100%
certain nothing broke.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-37-0, fax: +49-551-37-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Unable to join to Windows 2003 PDC using samba 3.5.8 from a linux machine!!

2011-04-01 Thread Rick Gates
Hi Gaiseric,

To answer some of the questions in the last mail:

Is the ADS domain in NT4 compatibility mode or windows 2003 native
mode?

will need to check that out. Will check out how can I do so (googling should
help here) and post the outcome.

 Did you try adding the kerberos realm info for ABCDOM.PQR.COM into the
samba clients krb5?

Yeah. I did try to configure kerberos.
In fact, kinit Administrator succeeds. Correct me if I am mistaken, but I
believe that indicates that kerberos configuration has no issues.
(Missed including krb5.conf in my original post. Will do that soon (probably
in my next post))

Will check the remaining points and post the outcome.

Thanks,
Rick

On Fri, Apr 1, 2011 at 10:00 PM, Gaiseric Vandal
gaiseric.van...@gmail.comwrote:

 So your samba server thinks it is  joining an NT4 domain.
 Is the ADS domain in NT4 compatibility mode or windows 2003 native
 mode?I think that NT4 machines can still join ADS domains even if the
 ADS domains are in 2000/2003 mode.

 Did you try adding the kerberos realm info for ABCDOM.PQR.COM into the
 samba clients krb5?

 Also check

testparm -v | grep resolve

 By default
name resolve order = lmhosts wins host bcast

 I think it is better to have hosts and wins first.

 Is the ADS server your DNS server?  Is the samba server using the ADS
 server as the DNS server?  DNS should include resource records to help
 locate an ADS DC.  I don't think you can have lmhosts entry for an ADS
 server.




 On 04/01/2011 11:59 AM, Rick Gates wrote:

 Hi all,

 I am using samba 3.5.8 on a linux machine.
 I am not able to join the domain of a windows 2003 server in ADS mode.

 I am getting the following error message:

 # /usr/local/samba/bin/net ads join -U Administrator%password -I
 10.25.66.71

 Failed to join domain: failed to find DC for domain ABCDOM.PQR.COM
 #

 I am not sure what the issue here.
 It works absolutely fine when I try to join the domain in rpc mode.

 # /usr/local/samba/bin/net rpc join -U Administrator%password
 Joined domain ABCDOM.
 #

 The smb.conf used is:

 # /usr/local/samba/bin/testparm
 Load smb config files from /usr/local/samba/lib/smb.conf
 rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
 Processing section [homes]
 Processing section [printers]
 Processing section [Linux]
 Loaded services file OK.
 Server role: ROLE_DOMAIN_MEMBER
 Press enter to see a dump of your service definitions

 [global]
 workgroup = ABCDOM
 realm = ABCDOM.PQR.COM
 server string = Samba Server - Research
 security = ADS
 password server = 10.25.66.71
 log level = 10
 log file = /var/log/samba/%m.log
 max log size = 50
 add user script = /usr/sbin/useradd %u
 delete user script = /usr/sbin/userdel %u
 add group script = /usr/sbin/groupadd %g
 delete group script = /usr/sbin/groupdel %g
 add user to group script = /usr/sbin/usermod -a -G %g %u
 delete user from group script = /usr/sbin/deluser %u %g
 add machine script = /usr/sbin/adduser -n -g machines -c Machine
 -d
 /dev/null -s /bin/false %u
 domain master = No
 dns proxy = No
 wins server = 10.25.66.71
 idmap uid = 200-12
 idmap gid = 200-12
 admin users = root
 cups options = raw

 [homes]
 comment = Home Directories
 read only = No
 browseable = No

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

 [Linux]
 comment = Share on this linux machine
 path = /tmp/linux
 read only = No
 #

 NOTE: 10.25.66.71 is the IP of my 2003 windows server.

 My lmhosts file is:

 # cat lmhosts.
 10.25.66.71 ABC3
 10.25.66.71 ABCDOM#1b
 10.25.66.71 ABCDOM#1c

 #

 It would be great, if any one can tell me if there is anything wrong here
 and probably help me sort out this issue.
 Thanks in advance!!

 Thanks,
 Rick



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

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


Re: [Samba] Unable to connect to Samba share from Windows XP

2011-04-01 Thread Rick Gates
Hi,

May be you can try taking the network traces when this behavior is seen.
Looking at the network traces might reveal some thing.

Just to clear, you are not able to access one particular share which are for
the USB devices, correct?

Sharing the configuration details of your samba server can be helpful.

Regards,
Rick

On Fri, Apr 1, 2011 at 2:53 PM, Jaime Aguado tech.mustole...@gmail.comwrote:

 Hi everyone,

 I'm integrating a Samba server in an Embedded Linux box, in order to share
 the contents of the storage devices plugged in the USB port. For this, I
 have created a share in the folder where the USB devices are always
 mounted,
 giving free and exclusive access to the guest user.

 The strange thing is that, when using a Linux machine (to be precise, with
 Ubuntu), I can connect with no problem using any user or password by a
 simple mount command. But when using Windows XP, even though I can see the
 server with the NetBIOS name I have configured, there is no way I can
 connect to the share. In fact, many times the connection attempt kills the
 smbd daemon, although not the nmbd.

 Anybody knows what can be happening? I've been trying to solve this for a
 few days now without any success at all...

 Many thanks in advance :)
 Jaime
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

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


Re: [Samba] samba howto: sticky bit on directories

2011-04-01 Thread Linda Walsh

Daniel Müller wrote:

On Mon, 28 Mar 2011 19:24:17 -0700, Linda Walsh sa...@tlinx.org wrote:

Daniel MCller wrote:

This is working with samba sernet newest release:
This is setting the bit for the group even with msoffice-files

correctly

directory mask=2770
force directory mode=2770
create mask = 2770
force create mode=2770
force security mode=2770
force directory security mode=2770



Unfortunately, I don't think the 'local linux' version allows the
setUID functionality to work on directories.

SetGID and allowing the propagation of the GID _does_ work.

I'd guess on the reasoning: on any linux I've run on, users can't give
away files to other users.   Allowing this 'bit' to work would

effectively do the same thing.


Hm!! but I do it on centos 5.5 , it is working


--

You do what?   You mean you, for example:

mkdir ~/suid-test-dir
chmod 777 ~/suid-test-dir
sudo chown daemon.daemon ~/suid-test-dir
sudo chmod u+s,g+s ~/suid-test-dir
touch ~/suid-test-dir/file

Now what are the user and group set on the file?

I see the file's user still set to me (i.e. setuid on dir didn't work), 
though the files group is set to 'daemon' (i.e. setgid on dir does work).


You are saying that on centos, both the user and group of 'file' are
*both* set to 'daemon'?




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

Re: [Samba] Unable to join to Windows 2003 PDC using samba 3.5.8 from alinux machine!!

2011-04-01 Thread Andrew Masterson

 -Original Message-
 From: samba-boun...@lists.samba.org
[mailto:samba-boun...@lists.samba.org]
 On Behalf Of Rick Gates
 Sent: Friday, April 01, 2011 10:00 AM
 To: samba@lists.samba.org
 Subject: [Samba] Unable to join to Windows 2003 PDC using samba 3.5.8
from
 alinux machine!!
 
 Hi all,
 
 I am using samba 3.5.8 on a linux machine.
 I am not able to join the domain of a windows 2003 server in ADS mode.
 
 I am getting the following error message:
 
 # /usr/local/samba/bin/net ads join -U Administrator%password -I
10.25.66.71
 
 Failed to join domain: failed to find DC for domain ABCDOM.PQR.COM
 #
 
 I am not sure what the issue here.
 It works absolutely fine when I try to join the domain in rpc mode.
 
 # /usr/local/samba/bin/net rpc join -U Administrator%password
 Joined domain ABCDOM.
 #
 
 The smb.conf used is:
 
 # /usr/local/samba/bin/testparm
 Load smb config files from /usr/local/samba/lib/smb.conf
 rlimit_max: increasing rlimit_max (1024) to minimum Windows limit
(16384)
 Processing section [homes]
 Processing section [printers]
 Processing section [Linux]
 Loaded services file OK.
 Server role: ROLE_DOMAIN_MEMBER
 Press enter to see a dump of your service definitions
 
 [global]
 workgroup = ABCDOM
 realm = ABCDOM.PQR.COM
 server string = Samba Server - Research
 security = ADS
 password server = 10.25.66.71
 log level = 10
 log file = /var/log/samba/%m.log
 max log size = 50
 add user script = /usr/sbin/useradd %u
 delete user script = /usr/sbin/userdel %u
 add group script = /usr/sbin/groupadd %g
 delete group script = /usr/sbin/groupdel %g
 add user to group script = /usr/sbin/usermod -a -G %g %u
 delete user from group script = /usr/sbin/deluser %u %g
 add machine script = /usr/sbin/adduser -n -g machines -c
Machine -d
 /dev/null -s /bin/false %u
 domain master = No
 dns proxy = No
 wins server = 10.25.66.71
 idmap uid = 200-12
 idmap gid = 200-12
 admin users = root
 cups options = raw
 
 [homes]
 comment = Home Directories
 read only = No
 browseable = No
 
 [printers]
 comment = All Printers
 path = /usr/spool/samba
 printable = Yes
 browseable = No
 
 [Linux]
 comment = Share on this linux machine
 path = /tmp/linux
 read only = No
 #
 
 NOTE: 10.25.66.71 is the IP of my 2003 windows server.
 
 My lmhosts file is:
 
 # cat lmhosts.
 10.25.66.71 ABC3
 10.25.66.71 ABCDOM#1b
 10.25.66.71 ABCDOM#1c
 
 #
 
 It would be great, if any one can tell me if there is anything wrong
here
 and probably help me sort out this issue.
 Thanks in advance!!


What does your krb5.conf look like?  I suspect it's having trouble
finding a kdc.

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

2011-04-01 Thread Volker Lendecke
The branch, master has been updated
   via  1272758 s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT
   via  d9b03cb s3: Fix Coverity ID 1136: CONSTANT_EXPRESSION_RESULT
  from  644222a debug: Restore the s3-style check in check_log_size()

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


- Log -
commit 1272758f8f989647802ea90722661ab133efa83f
Author: Volker Lendecke v...@samba.org
Date:   Fri Apr 1 08:40:38 2011 +0200

s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Fri Apr  1 09:35:19 CEST 2011 on sn-devel-104

commit d9b03cb4f0906bc7844c4abffcb3c9d8b04dc5eb
Author: Volker Lendecke v...@samba.org
Date:   Fri Apr 1 08:40:38 2011 +0200

s3: Fix Coverity ID 1136: CONSTANT_EXPRESSION_RESULT

---

Summary of changes:
 source3/utils/ntlm_auth.c |2 +-
 source3/winbindd/winbindd_cache.c |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index a6c5be8..73f41a7 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -772,7 +772,7 @@ static NTSTATUS do_ccache_ntlm_auth(DATA_BLOB initial_msg, 
DATA_BLOB challenge_m
 */
ctrl = get_pam_winbind_config();
 
-   if (ctrl | WINBIND_KRB5_AUTH) {
+   if (ctrl  WINBIND_KRB5_AUTH) {
wb_request.flags |= WBFLAG_PAM_CONTACT_TRUSTDOM;
}
 
diff --git a/source3/winbindd/winbindd_cache.c 
b/source3/winbindd/winbindd_cache.c
index 57a93a7..68a8625 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -246,7 +246,7 @@ static uint16 centry_uint16(struct cache_entry *centry)
if (!centry_check_bytes(centry, 2)) {
smb_panic_fn(centry_uint16);
}
-   ret = CVAL(centry-data, centry-ofs);
+   ret = SVAL(centry-data, centry-ofs);
centry-ofs += 2;
return ret;
 }
@@ -792,7 +792,7 @@ static void centry_put_uint32(struct cache_entry *centry, 
uint32 v)
 static void centry_put_uint16(struct cache_entry *centry, uint16 v)
 {
centry_expand(centry, 2);
-   SIVAL(centry-data, centry-ofs, v);
+   SSVAL(centry-data, centry-ofs, v);
centry-ofs += 2;
 }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-04-01 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  bf65a3a s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT
   via  02ae791 s3: Fix Coverity ID 1136: CONSTANT_EXPRESSION_RESULT 
(cherry picked from commit d9b03cb4f0906bc7844c4abffcb3c9d8b04dc5eb)
  from  7b3ff54 s3-ctdb_wrap: remove unused variable from 
db_ctdb_fetch_persistent().

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit bf65a3a582a740c187b668068cb1d5cba3573a08
Author: Volker Lendecke v...@samba.org
Date:   Fri Apr 1 08:40:38 2011 +0200

s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Fri Apr  1 09:35:19 CEST 2011 on sn-devel-104
(cherry picked from commit 1272758f8f989647802ea90722661ab133efa83f)

commit 02ae7915ee3bbba8291588ce9ebced396c93a5c0
Author: Volker Lendecke v...@samba.org
Date:   Fri Apr 1 08:40:38 2011 +0200

s3: Fix Coverity ID 1136: CONSTANT_EXPRESSION_RESULT
(cherry picked from commit d9b03cb4f0906bc7844c4abffcb3c9d8b04dc5eb)

---

Summary of changes:
 source3/utils/ntlm_auth.c |2 +-
 source3/winbindd/winbindd_cache.c |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index a6c5be8..73f41a7 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -772,7 +772,7 @@ static NTSTATUS do_ccache_ntlm_auth(DATA_BLOB initial_msg, 
DATA_BLOB challenge_m
 */
ctrl = get_pam_winbind_config();
 
-   if (ctrl | WINBIND_KRB5_AUTH) {
+   if (ctrl  WINBIND_KRB5_AUTH) {
wb_request.flags |= WBFLAG_PAM_CONTACT_TRUSTDOM;
}
 
diff --git a/source3/winbindd/winbindd_cache.c 
b/source3/winbindd/winbindd_cache.c
index 243c46a..0a59b8c 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -244,7 +244,7 @@ static uint16 centry_uint16(struct cache_entry *centry)
if (!centry_check_bytes(centry, 2)) {
smb_panic_fn(centry_uint16);
}
-   ret = CVAL(centry-data, centry-ofs);
+   ret = SVAL(centry-data, centry-ofs);
centry-ofs += 2;
return ret;
 }
@@ -790,7 +790,7 @@ static void centry_put_uint32(struct cache_entry *centry, 
uint32 v)
 static void centry_put_uint16(struct cache_entry *centry, uint16 v)
 {
centry_expand(centry, 2);
-   SIVAL(centry-data, centry-ofs, v);
+   SSVAL(centry-data, centry-ofs, v);
centry-ofs += 2;
 }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-04-01 Thread Andreas Schneider
The branch, v3-6-test has been updated
   via  2b4ddf3 s3-winbindd: Use the correct enums for 
samr_QueryDomainInfo. (cherry picked from commit 
d9ad60f0dc40be1e1d533f96ec0032e01035d85b)
   via  b2532c5 s3-net: Do not use uninitialized value
  from  bf65a3a s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 2b4ddf387cf2b4a9958643930c4ac12b48dd45ba
Author: Andreas Schneider a...@samba.org
Date:   Wed Mar 30 11:08:31 2011 +0200

s3-winbindd: Use the correct enums for samr_QueryDomainInfo.
(cherry picked from commit d9ad60f0dc40be1e1d533f96ec0032e01035d85b)

commit b2532c5eb6d23d043590fbf1c51ee7bef699fd11
Author: Sumit Bose sb...@redhat.com
Date:   Thu Mar 31 14:09:45 2011 +0200

s3-net: Do not use uninitialized value

s3-net: Do not use uninitialized value

Signed-off-by: Andreas Schneider a...@samba.org

Autobuild-User: Andreas Schneider a...@cryptomilk.org
Autobuild-Date: Thu Mar 31 18:09:57 CEST 2011 on sn-devel-104
(cherry picked from commit 34ea813553368a7f0805693c9731e9b0abfefa99)

---

Summary of changes:
 source3/utils/net_rpc.c   |2 ++
 source3/winbindd/winbindd_msrpc.c |4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 3fbeb87..c86127e 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -6737,6 +6737,8 @@ static int rpc_trustdom_list(struct net_context *c, int 
argc, const char **argv)
return -1;
};
 
+   b = pipe_hnd-binding_handle;
+
nt_status = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, false, 
KEY_QUERY_VALUE,
connect_hnd);
if (NT_STATUS_IS_ERR(nt_status)) {
diff --git a/source3/winbindd/winbindd_msrpc.c 
b/source3/winbindd/winbindd_msrpc.c
index f01308c..13a5d64 100644
--- a/source3/winbindd/winbindd_msrpc.c
+++ b/source3/winbindd/winbindd_msrpc.c
@@ -987,7 +987,7 @@ static NTSTATUS msrpc_lockout_policy(struct winbindd_domain 
*domain,
 
status = dcerpc_samr_QueryDomainInfo(b, mem_ctx,
 dom_pol,
-12,
+DomainLockoutInformation,
 info,
 result);
if (!NT_STATUS_IS_OK(status)) {
@@ -1037,7 +1037,7 @@ static NTSTATUS msrpc_password_policy(struct 
winbindd_domain *domain,
 
status = dcerpc_samr_QueryDomainInfo(b, mem_ctx,
 dom_pol,
-1,
+DomainPasswordInformation,
 info,
 result);
if (!NT_STATUS_IS_OK(status)) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated

2011-04-01 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  90e7f31 Fix bug #7996 - sgid bit lost on folder rename.
  from  64be11d s3: use getgrset() when it is available

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -
commit 90e7f310ec52119359784899945f47d0a9c4e3ae
Author: Jeremy Allison j...@samba.org
Date:   Thu Mar 31 10:49:22 2011 -0700

Fix bug #7996 - sgid bit lost on folder rename.

Refuse to set dos attributes into unix mode bits on such a
folder.

---

Summary of changes:
 source3/include/proto.h   |1 +
 source3/smbd/dosmode.c|   22 ++
 source3/smbd/posix_acls.c |2 +-
 3 files changed, 24 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index a261310..6ff0882 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6752,6 +6752,7 @@ uint32_t map_canon_ace_perms(int snum,
 mode_t perms,
 bool directory_ace);
 NTSTATUS unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp, uint32 
security_info_sent, const SEC_DESC *psd);
+bool current_user_in_group(gid_t gid);
 SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T the_acl);
 NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
   SEC_DESC **ppdesc);
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 74f54a0..94caaf6 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -793,6 +793,28 @@ int file_set_dosmode(connection_struct *conn, struct 
smb_filename *smb_fname,
unixmode |= (smb_fname-st.st_ex_mode  
(S_IWUSR|S_IWGRP|S_IWOTH));
}
 
+   /*
+* From the chmod 2 man page:
+*
+* If the calling process is not privileged, and the group of the file
+* does not match the effective group ID of the process or one of its
+* supplementary group IDs, the S_ISGID bit will be turned off, but
+* this will not cause an error to be returned.
+*
+* Simply refuse to do the chmod in this case.
+*/
+
+   if (S_ISDIR(smb_fname-st.st_ex_mode)  (unixmode  S_ISGID) 
+   geteuid() != sec_initial_uid() 
+   !current_user_in_group(smb_fname-st.st_ex_gid)) {
+   DEBUG(3,(file_set_dosmode: setgid bit cannot be 
+   set for directory %s\n,
+   smb_fname_str_dbg(smb_fname)));
+   errno = EPERM;
+   return -1;
+   }
+
+
ret = SMB_VFS_CHMOD(conn, smb_fname-base_name, unixmode);
if (ret == 0) {
if(!newfile || (lret != -1)) {
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index aaca9f4..714a4d3 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -2644,7 +2644,7 @@ static canon_ace *canonicalise_acl(struct 
connection_struct *conn,
  Check if the current user group list contains a given group.
 /
 
-static bool current_user_in_group(gid_t gid)
+bool current_user_in_group(gid_t gid)
 {
int i;
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-04-01 Thread Jeremy Allison
The branch, master has been updated
   via  ac216c1 Fix bug #8047 - mdns registration doesn't work if 
interfaces is used in smb.conf
  from  1272758 s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT

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


- Log -
commit ac216c130e5d1f1c86d7e481838748208bb68f73
Author: Marc A. Dahlhaus m...@wol.de
Date:   Fri Apr 1 13:26:31 2011 -0700

Fix bug #8047 - mdns registration doesn't work if interfaces is used in 
smb.conf

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Fri Apr  1 23:15:34 CEST 2011 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index e9332c1..1948077 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -681,6 +681,13 @@ static bool open_sockets_smbd(struct smbd_parent_context 
*parent,
continue;
}
 
+   /* Keep the first port for mDNS service
+* registration.
+*/
+   if (dns_port == 0) {
+   dns_port = port;
+   }
+
if (!smbd_open_one_socket(parent, ifss, port)) {
return false;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-04-01 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  8421f04 Fix bug #8047 - mdns registration doesn't work if 
interfaces is used in smb.conf
  from  2b4ddf3 s3-winbindd: Use the correct enums for 
samr_QueryDomainInfo. (cherry picked from commit 
d9ad60f0dc40be1e1d533f96ec0032e01035d85b)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 8421f046512c958ddb79f7ee8552dedfc870350b
Author: Marc A. Dahlhaus m...@wol.de
Date:   Fri Apr 1 13:26:31 2011 -0700

Fix bug #8047 - mdns registration doesn't work if interfaces is used in 
smb.conf

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Fri Apr  1 23:15:34 CEST 2011 on sn-devel-104
(cherry picked from commit ac216c130e5d1f1c86d7e481838748208bb68f73)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index e8c1169..da95b45 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -677,6 +677,13 @@ static bool open_sockets_smbd(struct smbd_parent_context 
*parent,
continue;
}
 
+   /* Keep the first port for mDNS service
+* registration.
+*/
+   if (dns_port == 0) {
+   dns_port = port;
+   }
+
if (!smbd_open_one_socket(parent, ifss, port)) {
return false;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-04-01 Thread Jeremy Allison
The branch, master has been updated
   via  00224d0 Fix bug #7987 - ACL can get lost when files are being 
renamed.
  from  ac216c1 Fix bug #8047 - mdns registration doesn't work if 
interfaces is used in smb.conf

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


- Log -
commit 00224d06c389e9744b83bcec09a9d002086058fc
Author: Jeremy Allison j...@samba.org
Date:   Fri Apr 1 16:50:28 2011 -0700

Fix bug #7987 - ACL can get lost when files are being renamed.

There is no reason for smbd with Windows ACLs to use chmod
or fchmod unless it's a file opened with UNIX extensions or
with posix pathnames.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Sat Apr  2 02:40:43 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/modules/vfs_acl_common.c |   40 ++
 source3/modules/vfs_acl_tdb.c|6 -
 source3/modules/vfs_acl_xattr.c  |4 +++
 3 files changed, 49 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index b3e9973..827c954 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -1020,3 +1020,43 @@ static int unlink_acl_common(struct vfs_handle_struct 
*handle,
smb_fname-base_name,
false);
 }
+
+static int chmod_acl_module_common(struct vfs_handle_struct *handle,
+   const char *path, mode_t mode)
+{
+   if (lp_posix_pathnames()) {
+   /* Only allow this on POSIX pathnames. */
+   return SMB_VFS_NEXT_CHMOD(handle, path, mode);
+   }
+   return 0;
+}
+
+static int fchmod_acl_module_common(struct vfs_handle_struct *handle,
+   struct files_struct *fsp, mode_t mode)
+{
+   if (fsp-posix_open) {
+   /* Only allow this on POSIX opens. */
+   return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode);
+   }
+   return 0;
+}
+
+static int chmod_acl_acl_module_common(struct vfs_handle_struct *handle,
+   const char *name, mode_t mode)
+{
+   if (lp_posix_pathnames()) {
+   /* Only allow this on POSIX pathnames. */
+   return SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode);
+   }
+   return 0;
+}
+
+static int fchmod_acl_acl_module_common(struct vfs_handle_struct *handle,
+   struct files_struct *fsp, mode_t mode)
+{
+   if (fsp-posix_open) {
+   /* Only allow this on POSIX opens. */
+   return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
+   }
+   return 0;
+}
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index 7a9e10d..17cf493 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -401,13 +401,17 @@ static struct vfs_fn_pointers vfs_acl_tdb_fns = {
.disconnect = disconnect_acl_tdb,
.opendir = opendir_acl_common,
.mkdir = mkdir_acl_common,
+   .rmdir = rmdir_acl_tdb,
.open = open_acl_common,
.create_file = create_file_acl_common,
.unlink = unlink_acl_tdb,
-   .rmdir = rmdir_acl_tdb,
+   .chmod = chmod_acl_module_common,
+   .fchmod = fchmod_acl_module_common,
.fget_nt_acl = fget_nt_acl_common,
.get_nt_acl = get_nt_acl_common,
.fset_nt_acl = fset_nt_acl_common,
+   .chmod_acl = chmod_acl_acl_module_common,
+   .fchmod_acl = fchmod_acl_acl_module_common,
.sys_acl_set_file = sys_acl_set_file_tdb,
.sys_acl_set_fd = sys_acl_set_fd_tdb
 };
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c
index 213ba9a..90959f3 100644
--- a/source3/modules/vfs_acl_xattr.c
+++ b/source3/modules/vfs_acl_xattr.c
@@ -209,9 +209,13 @@ static struct vfs_fn_pointers vfs_acl_xattr_fns = {
.open = open_acl_common,
.create_file = create_file_acl_common,
.unlink = unlink_acl_common,
+   .chmod = chmod_acl_module_common,
+   .fchmod = fchmod_acl_module_common,
.fget_nt_acl = fget_nt_acl_common,
.get_nt_acl = get_nt_acl_common,
.fset_nt_acl = fset_nt_acl_common,
+   .chmod_acl = chmod_acl_acl_module_common,
+   .fchmod_acl = fchmod_acl_acl_module_common,
.sys_acl_set_file = sys_acl_set_file_xattr,
.sys_acl_set_fd = sys_acl_set_fd_xattr
 };


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-04-01 Thread Michael Adam
The branch, master has been updated
   via  d143bc4 s3:waf: add cluster support / ctdb checks.
   via  af82dca s3:waf:compare_config_h3.sh: make diff tool configurable as 
env var DIFF
   via  e06dba1 s3:waf:compare_config_h3.sh: specify autoconf-config.h as 
commandline parameter
  from  00224d0 Fix bug #7987 - ACL can get lost when files are being 
renamed.

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


- Log -
commit d143bc444c10df99b2dd64f4a0e02c902c3c024e
Author: Michael Adam ob...@samba.org
Date:   Sat Apr 2 02:20:49 2011 +0200

s3:waf: add cluster support / ctdb checks.

The checks are roughtly taken from the autoconf ctdb checks.

I was not able to implement checks with CHECK_DECL, CHECK_TYPE,
CHECK_HEADER and friends, because the ctdb headers seem to need too
special a setup of includes and defines in order to compile.
So I used CHECK_CODE() in all checks.

In the long run, this should be changed.

I supported a --with-ctdb-dir options to allow for building
against a ctdb that is not installed into /usr (e.g. against
a local git checkout). In order to implement this, I had to
hand includes in to the CHECK_CODE function.
Here I found a problem with CHECK_CODE (or even the core waf
conf.check() function: The CHECK_CODE function does not
expand the includes it gets (i.e. '#' is not expanded to the
base dir, and relative paths are left relative). But the core
check() function seems to ignore all include paths that are
not absolute paths. Hence in particular the usual default '# .'
for the includes is useless. So I preprocessed the list of includes
for the cluster checks. But I assume that it would be useful
to move this expansion into CHECK_CODE or even into the core
waf check function.

Autobuild-User: Michael Adam ob...@samba.org
Autobuild-Date: Sat Apr  2 03:26:55 CEST 2011 on sn-devel-104

commit af82dcae302934c4ea9c14a5932a4647444f0a63
Author: Michael Adam ob...@samba.org
Date:   Sat Apr 2 00:33:52 2011 +0200

s3:waf:compare_config_h3.sh: make diff tool configurable as env var DIFF

commit e06dba158996909228834b9302cc56e4e1006d99
Author: Michael Adam ob...@samba.org
Date:   Sat Apr 2 00:29:51 2011 +0200

s3:waf:compare_config_h3.sh: specify autoconf-config.h as commandline 
parameter

---

Summary of changes:
 buildtools/compare_config_h3.sh |   15 ++-
 source3/wscript |  196 +++
 2 files changed, 207 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/compare_config_h3.sh b/buildtools/compare_config_h3.sh
index 0f640a9..294af30 100755
--- a/buildtools/compare_config_h3.sh
+++ b/buildtools/compare_config_h3.sh
@@ -3,10 +3,17 @@
 # compare the generated config.h from a waf build with existing samba
 # build
 
+OLD_CONFIG=$HOME/samba_old/source3/include/config.h
+if test x$1 != x ; then
+   OLD_CONFIG=$1
+fi
+
+if test x$DIFF = x ; then
+   DIFF=comm -23
+fi
+
 grep ^.define bin/default/source3/include/config.h | sort  waf-config.h
-grep ^.define $HOME/samba_old/source3/include/config.h | sort  old-config.h
+grep ^.define $OLD_CONFIG | sort  old-config.h
 
-comm -23 old-config.h waf-config.h
+$DIFF old-config.h waf-config.h
 
-#echo
-#diff -u old-config.h waf-config.h
diff --git a/source3/wscript b/source3/wscript
index e8bd625..e6e0b5a 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -60,6 +60,16 @@ def set_options(opt):
 opt.SAMBA3_ADD_OPTION('automount')
 opt.SAMBA3_ADD_OPTION('aio-support')
 
+opt.SAMBA3_ADD_OPTION('cluster-support')
+
+opt.add_option('--with-ctdb-dir',
+   help=(Directory under which ctdb is installed),
+   action=store, dest='ctdb_dir', default=None)
+opt.add_option('--enable-old-ctdb',
+  help=(enable building against (too) old version of ctdb 
(default=false)),
+  action=store_true, dest='enable_old_ctdb', default=False)
+
+
 
 def configure(conf):
 from samba_utils import TO_LIST
@@ -1496,6 +1506,192 @@ main() {
 # For sys/quota.h and linux/quota.h
 conf.CHECK_HEADERS('sys/quota.h')
 
+
+#
+# checking for clustering extensions (CTDB)
+#
+if not Options.options.with_cluster_support:
+have_cluster_support = False
+
+else:
+
+if Options.options.ctdb_dir:
+conf.ADD_EXTRA_INCLUDES(Options.options.ctdb_dir + '/include')
+
+srcdir = os.path.realpath(conf.srcdir)
+if 'EXTRA_INCLUDES' in conf.env:
+includes = ' '.join(conf.env['EXTRA_INCLUDES']).replace('#', 
srcdir + '/')
+else:
+includes = ''
+
+have_cluster_support = True
+ctdb_broken = 
+
+conf.CHECK_CODE('''
+#define 

autobuild: intermittent test failure detected

2011-04-01 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-04-02-0625/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-02-0625/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-04-02-0625/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-02-0625/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-04-02-0625/samba4.stdout
  
The top commit at the time of the failure was:

commit d143bc444c10df99b2dd64f4a0e02c902c3c024e
Author: Michael Adam ob...@samba.org
Date:   Sat Apr 2 02:20:49 2011 +0200

s3:waf: add cluster support / ctdb checks.

The checks are roughtly taken from the autoconf ctdb checks.

I was not able to implement checks with CHECK_DECL, CHECK_TYPE,
CHECK_HEADER and friends, because the ctdb headers seem to need too
special a setup of includes and defines in order to compile.
So I used CHECK_CODE() in all checks.

In the long run, this should be changed.

I supported a --with-ctdb-dir options to allow for building
against a ctdb that is not installed into /usr (e.g. against
a local git checkout). In order to implement this, I had to
hand includes in to the CHECK_CODE function.
Here I found a problem with CHECK_CODE (or even the core waf
conf.check() function: The CHECK_CODE function does not
expand the includes it gets (i.e. '#' is not expanded to the
base dir, and relative paths are left relative). But the core
check() function seems to ignore all include paths that are
not absolute paths. Hence in particular the usual default '# .'
for the includes is useless. So I preprocessed the list of includes
for the cluster checks. But I assume that it would be useful
to move this expansion into CHECK_CODE or even into the core
waf check function.

Autobuild-User: Michael Adam ob...@samba.org
Autobuild-Date: Sat Apr  2 03:26:55 CEST 2011 on sn-devel-104