[Samba] permissions on Samba share mount point in RHEL 5

2010-02-03 Thread Chaitanya
Dear friends,

I am straight away coming to the point I have a samba
serverhttp://www.linuxforums.org/forum/#and I have created a public
share (with full permissions for every user in
network) and I have mounted it on a RHEL machine. The problem is that
permissions on the mount change when I restart the samba server and other
thing is that when any user on rhel machine creates any folder in mounted
folder S/he can create it but after that the permission of that folder
doesn't allow any user to create any folder or
filehttp://www.linuxforums.org/forum/#inside that folder. I will
explain you what I have done till now to achieve
what I want.

My Samba server IP http://www.linuxforums.org/forum/# is 192.168.1.104
My Samba share name is vol7
I have set full permission (777) to vol7 (Recursively -R)
I have created a user on samba server machine in name of ofguest
I have set both user and group ownership of vol7 to ofguest (Recursively -R)
I have SGID on vol7 (Recursively -R)

after doing this I thought that when this share will be mounted on any
machine all the users will be able to create folders and files which will
not have any restriction for using, modifying or deleteing. that means any
user will be able to open any file or folder created by any user and will
also be able to create folder in any folder.

Details of machine where I mount the share
RHEL machine with IP 192.168.1.106
Mount Point is /mountpoint
I have changed permission of /mountpoint to 777 (Recursively -R)
my fstab entry :
//192.168.1.104/vol7 /mountpoint cifs rw,password=

The Problem
when the share is mounted I can get all the users to create files and
folders but when any user creates a folder the permissions are not
recursively that means if that user tries to create a folder or file inside
previously created folder it is not allowed. the only thing that happens is
only ofguest user have group permissions on that newly created file or
folder.

I doubt if the system permissions are overwriting the permissions set by
samba

Can any one suggest any Idea so that this mount point can be used as an
ideal public mount where everyone have all the permission for creating
folders and files recursively.

Thanks in advance for any help

-- 

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


[Samba] file copy from share A to share B

2010-02-03 Thread Stijn Oude Brunink
Hello,

I'm using a samba server with one harddrive with several partitions. I want
to copy some file from one partition to the other. My pc runs on Ubuntu and
using the file browser I can easily copy files from one partition to the
other. If I copy files from one samba share to the other using the file
browser the file will be transported over the network to my pc and then back
to the other samba share. This is very inefficient if the files are
large. Is there a more efficient way of doing this?


thanks


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


[Samba] WG: file copy from share A to share B

2010-02-03 Thread Daniel Müller
From your Ubuntu box

rsync -e   -a /ShareA/  /ShareB
---
EDV Daniel Müller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen

Tel.: 07071/206-463, Fax: 07071/206-499
eMail: muel...@tropenklinik.de
Internet: www.tropenklinik.de
---

-Ursprüngliche Nachricht-
Von: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org] Im
Auftrag von Stijn Oude Brunink
Gesendet: Mittwoch, 3. Februar 2010 11:59
An: samba@lists.samba.org
Betreff: [Samba] file copy from share A to share B

Hello,

I'm using a samba server with one harddrive with several partitions. I want
to copy some file from one partition to the other. My pc runs on Ubuntu and
using the file browser I can easily copy files from one partition to the
other. If I copy files from one samba share to the other using the file
browser the file will be transported over the network to my pc and then back
to the other samba share. This is very inefficient if the files are
large. Is there a more efficient way of doing this?


thanks


Stijn
-- 
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] file copy from share A to share B

2010-02-03 Thread Roberto Sacchetti

Hi Stijn,

since the process is started on your pc, your pc drives the copy and 
handles data transfer.
If you don't want the files coming across the network, you have to issue 
the copy command on the server, even remotely, if you can.


Bye

Roberto


Stijn Oude Brunink ha scritto:

Hello,

I'm using a samba server with one harddrive with several partitions. I want
to copy some file from one partition to the other. My pc runs on Ubuntu and
using the file browser I can easily copy files from one partition to the
other. If I copy files from one samba share to the other using the file
browser the file will be transported over the network to my pc and then back
to the other samba share. This is very inefficient if the files are
large. Is there a more efficient way of doing this?


thanks


Stijn
  

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


Re: [Samba] Domain login delays w2k8 R2

2010-02-03 Thread Åke Holmlund

Hello!

From what I can see, there is no DNS-traffic around the time of the
gaps and the DNS-activity I can see in onther places seems ok. There
is almost no network traffic and no CPU activity during the gaps so
it looks like some kind of timeout issue.

It may be of interest that, for the moment, IPv6 is beeing used.
Sometimes we also have quite a long delay if we click on the View
computers and devices link in the Network and Sharing Center.

Regards,
Åke Holmlund

--On 2 februari 2010 10.16.22 -0800 Jeremy Allison j...@samba.org wrote:


On Tue, Feb 02, 2010 at 07:03:11PM +0100, Åke Holmlund wrote:

Hello!

We have a w2k8 R2 64-bit machine in a Samba 3.4.4 controlled domain.
When logging in as a domain user there is a ~30 sec delay waiting
for the User Profile Service. This has nothing to do with the size
of the user profile. Looking at the network traffic I can see 2
gaps, the first about 11 sek and the second about 19 sek with
no packets sent except one TCP ACK (from the client) in each gap.

Between the gaps there is only a few packets sent. According
to WireShark it's a Tree Disconnect Request with response and
a Logoff AndX Request with response.

Any idea what may be causing this?


Gaps like that are almost always DNS lookups of some kind :-).

Are you looking for those, or just CIFS traffic ?

Jeremy.



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

Re: [Samba] Domain login delays w2k8 R2

2010-02-03 Thread Martin Hochreiter

Am 2010-02-03 15:19, schrieb Åke Holmlund:

Hello!

From what I can see, there is no DNS-traffic around the time of the
gaps and the DNS-activity I can see in onther places seems ok. There
is almost no network traffic and no CPU activity during the gaps so
it looks like some kind of timeout issue.

It may be of interest that, for the moment, IPv6 is beeing used.
Sometimes we also have quite a long delay if we click on the View
computers and devices link in the Network and Sharing Center.

Regards,
Åke Holmlund

--On 2 februari 2010 10.16.22 -0800 Jeremy Allison j...@samba.org wrote:


On Tue, Feb 02, 2010 at 07:03:11PM +0100, Åke Holmlund wrote:

Hello!

We have a w2k8 R2 64-bit machine in a Samba 3.4.4 controlled domain.
When logging in as a domain user there is a ~30 sec delay waiting
for the User Profile Service. This has nothing to do with the size
of the user profile. Looking at the network traffic I can see 2
gaps, the first about 11 sek and the second about 19 sek with
no packets sent except one TCP ACK (from the client) in each gap.

Between the gaps there is only a few packets sent. According
to WireShark it's a Tree Disconnect Request with response and
a Logoff AndX Request with response.

Any idea what may be causing this?

Hi!

We had the same problem - 2 ~30 second delays while loading the
roaming profile
The solution at our site was not related to samba ... it was the McAffee 
enterprise

virus scanner. By patching it to the latest version this 2 delays were gone.
- do you use McAffee or a similar enterprise scanner?

regards
Maritn


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

Re: [Samba] Domain login delays w2k8 R2

2010-02-03 Thread Martin Hochreiter

Am 2010-02-03 15:19, schrieb Åke Holmlund:

Hello!

From what I can see, there is no DNS-traffic around the time of the
gaps and the DNS-activity I can see in onther places seems ok. There
is almost no network traffic and no CPU activity during the gaps so
it looks like some kind of timeout issue.

It may be of interest that, for the moment, IPv6 is beeing used.
Sometimes we also have quite a long delay if we click on the View
computers and devices link in the Network and Sharing Center.

Regards,
Åke Holmlund

--On 2 februari 2010 10.16.22 -0800 Jeremy Allison j...@samba.org wrote:


On Tue, Feb 02, 2010 at 07:03:11PM +0100, Åke Holmlund wrote:

Hello!

We have a w2k8 R2 64-bit machine in a Samba 3.4.4 controlled domain.
When logging in as a domain user there is a ~30 sec delay waiting
for the User Profile Service. This has nothing to do with the size
of the user profile. Looking at the network traffic I can see 2
gaps, the first about 11 sek and the second about 19 sek with
no packets sent except one TCP ACK (from the client) in each gap.

Between the gaps there is only a few packets sent. According
to WireShark it's a Tree Disconnect Request with response and
a Logoff AndX Request with response.

Any idea what may be causing this?

To explain that further:

That was solved by mcafee Patch 7 for McAfee Enterprise 8.5

7.  ISSUE:
Changes made in Microsoft Vista SP1 and later, in
how the operating system opens/views network files,
caused delays in opening new network paths, with
the On-Access Scanner’s Network Scanning feature
enabled.

RESOLUTION:
The link driver has been modified to use a
different method of accessing the network resources
that avoids the delays imposed by the operating
system change.

Altough we use mainly XP we think that such a thing
caused the delays - we discovered it by simply removing
the virus scanner and tried to login with a roaming profile again -maybe
try that too

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

[Samba] Help with samba in AD environment

2010-02-03 Thread Phusion
I need some help in configuring samba on a FreeBSD 8.0 server. I've
used the following as a base. My goal is to have a samba share where I
can set permissions for Active Directory users. I don't care about
SSHing into the server using Active Directory account information.

http://forums.freebsd.org/showthread.php?p=64144#post64144
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/domain-member.html#ads-member

I installed the samba 3.3 port (3.3.9) and only had the following
options enabled: LDAP, ADS, WINBIND, ACL_SUPPORT, SYSLOG and POPT.

  [global]
  workgroup = ABC
  netbios name = server
  server string =
  realm = ABC.LOCAL
  security = ADS
  password server = pdc.Abc.local
  idmap gid = 1-2
  idmap uid = 1-2
  winbind refresh tickets = yes
  winbind use default domain = yes
# vi /usr/local/etc/smb.conf
  [libdefaults]
  default_realm = ABC.LOCAL
  [domain_realm]
  .Abc.local = ABC.LOCAL
  [realms]
  ABC.LOCAL = {
  kdc = pdc.Abc.local
  }
  [logging]
  kdc = FILE:/var/heimdal/kdc.log
# vi /etc/krb5.conf
  samba_enable=YES
  winbindd_enable=YES
# vi /etc/rc.conf.local
# /usr/local/etc/rc.d/samba start
Removing stale Samba tdb files:  done
Starting nmbd.
Starting smbd.
Starting winbindd.
# /usr/local/bin/net ads join -U Administrator -S pdc.Abc.local
Enter Administrator's password:
Using short domain name -- ABC
Joined 'SERVER' to realm 'Abc.local'
Checked and the computer shows up in the Active Directory computers.
# kinit administra...@abc.local
administra...@abc.local's Password:

After doing a reboot the following commands both worked: wbinfo -u,
wbinfo -g. Here are the messages I see in the log file.

Feb  2 16:33:26 server winbindd[812]: [2010/02/02 16:33:26,  0]
winbindd/idmap.c:smb_register_idmap_alloc(201)
Feb  2 16:33:26 server winbindd[812]:   idmap_alloc module ldap
already registered!
Feb  2 16:33:26 server winbindd[812]: [2010/02/02 16:33:26,  0]
winbindd/idmap.c:smb_register_idmap_alloc(201)
Feb  2 16:33:26 server winbindd[812]:   idmap_alloc module tdb already
registered!
Feb  2 16:33:26 server winbindd[812]: [2010/02/02 16:33:26,  0]
winbindd/idmap.c:smb_register_idmap(149)
Feb  2 16:33:26 server winbindd[812]:   Idmap module passdb already registered!
Feb  2 16:33:26 server winbindd[812]: [2010/02/02 16:33:26,  0]
winbindd/idmap.c:smb_register_idmap(149)
Feb  2 16:33:26 server winbindd[812]:   Idmap module nss already registered!

Do I need to modify /etc/nsswitch.conf or just /usr/local/etc/smb.conf
since I'm only concerned with samba share permissions. Also, can
someone show me an example of what to put in smb.conf for a share. Let
me know. Thanks.

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


Re: [Samba] file copy from share A to share B

2010-02-03 Thread Stijn Oude Brunink
Roberto,

But how do I issue such a command on the server?

I can access an smb share via de command line and copy from the share to my
pc and vice versa using as listed here:
http://www.faqs.org/docs/Linux-HOWTO/SMB-HOWTO.html#s8. This method does not
allow copying files from share to share as far as I know

Stijn



2010/2/3 Roberto Sacchetti robe...@siros.it

 Hi Stijn,

 since the process is started on your pc, your pc drives the copy and
 handles data transfer.
 If you don't want the files coming across the network, you have to issue
 the copy command on the server, even remotely, if you can.

 Bye

 Roberto


 Stijn Oude Brunink ha scritto:

 Hello,


 I'm using a samba server with one harddrive with several partitions. I
 want
 to copy some file from one partition to the other. My pc runs on Ubuntu
 and
 using the file browser I can easily copy files from one partition to the
 other. If I copy files from one samba share to the other using the file
 browser the file will be transported over the network to my pc and then
 back
 to the other samba share. This is very inefficient if the files are
 large. Is there a more efficient way of doing this?


 thanks


 Stijn



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


Re: [Samba] Domain login delays w2k8 R2

2010-02-03 Thread Åke Holmlund

Hi!

Valid point but I have not yet installed any anti virus software on
this machine. I have also tried disabeling the firewall but it makes
no difference.

Regards,
Åke Holmlund

--On 3 februari 2010 15.46.37 +0100 Martin Hochreiter linux...@wavenet.at 
wrote:


Am 2010-02-03 15:19, schrieb Åke Holmlund:

Hello!

From what I can see, there is no DNS-traffic around the time of the
gaps and the DNS-activity I can see in onther places seems ok. There
is almost no network traffic and no CPU activity during the gaps so
it looks like some kind of timeout issue.

It may be of interest that, for the moment, IPv6 is beeing used.
Sometimes we also have quite a long delay if we click on the View
computers and devices link in the Network and Sharing Center.

Regards,
Åke Holmlund

--On 2 februari 2010 10.16.22 -0800 Jeremy Allison j...@samba.org wrote:


On Tue, Feb 02, 2010 at 07:03:11PM +0100, Åke Holmlund wrote:

Hello!

We have a w2k8 R2 64-bit machine in a Samba 3.4.4 controlled domain.
When logging in as a domain user there is a ~30 sec delay waiting
for the User Profile Service. This has nothing to do with the size
of the user profile. Looking at the network traffic I can see 2
gaps, the first about 11 sek and the second about 19 sek with
no packets sent except one TCP ACK (from the client) in each gap.

Between the gaps there is only a few packets sent. According
to WireShark it's a Tree Disconnect Request with response and
a Logoff AndX Request with response.

Any idea what may be causing this?

Hi!

We had the same problem - 2 ~30 second delays while loading the
roaming profile
The solution at our site was not related to samba ... it was the McAffee 
enterprise
virus scanner. By patching it to the latest version this 2 delays were gone.
- do you use McAffee or a similar enterprise scanner?

regards
Maritn




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

Re: [Samba] You do not have permission to change password issue with XP clients

2010-02-03 Thread Gaiseric Vandal

On 02/02/10 18:07, Brett Charbeneau wrote:

Greetings all

I'm running Samba 3.0 on an Ubuntu box as a PDC and I'm having trouble 
changing passwords with XP clients - here's my smb.conf 
http://pastebin.com/m1bb6d4a6


I've played with a variety of passwd chat settings but no joy. I am 
trying to use pam_cracklib.so - here's my /etc/pam.d/common-password 
file: http://pastebin.com/m1a1d5f89


I've tried the suggestions in this thread, but no luck: 
http://www.mail-archive.com/samba@lists.samba.org/msg104476.html


Any hints? I'd be very grateful for any suggestions anyone has the 
time to offer!





Are you using an LDAP backend?

I am not sure the samba password chat chat scripts can pass the old 
password back to unix.My experience with ldap (Sun LDAP server not 
OpenLDAP)  is that that password change either requires the user's old 
password or the LDAP admin pw.  The local root account does not have 
privledges to change ldap passwords.  (Local or NIS password's weren't a 
problem.)



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


Re: [Samba] (no subject) - DOS apps are failing on recent samba version

2010-02-03 Thread Günter Kukkukk
Am Mittwoch 03 Februar 2010 03:52:43 schrieb Günter Kukkukk:
 Am Dienstag 02 Februar 2010 23:56:06 schrieb James Hurlburt:
  Sirs:
 
  I have a Ubuntu 6.06 samba 3.0.22 file server running on linux.
  I am attempting to update the file server to ubuntu 8.10, samba 3.2.3.
  I have been attempting this, intermittently, for some time which is why
   8.10.
 
 
  I have 10 MSDOS (mostly 6.22) workstations as a part of the network.
  The ones that have to run, control production machinery on the plant
  floor. Updating the operating system on those machines is effectivly
  impossible. There are some of them that run software that I control, most
  of them use vendor supplied software to control the older machines.
 
  They are using lanman 2.2 as the client software.
  (I have many xp workstations, they work fine with both systems.
  I can map drives, read and save and run the same dos exe files that the
  dos stations are failing on. Print stuff...)
 
  On the old server, the dos stations can log in and use network resources.
  Thus far, I have failed to make them work on the new server.
 
  The relevant parts of the smb.conf files for the servers are --
 
  The 3.0.22 server.  This one is the production server and the dos
  stations work.
 
  # Samba config file created using SWAT
  # from 10.23.0.118 (10.23.0.118)
  # Date: 2010/01/29 09:46:06
 
  [global]
  workgroup = ATRIUM-DW
  server string = Samba
  passwd program = /usr/bin/passwd %u
  unix password sync = Yes
  change notify timeout = 30
  deadtime = 30
  printcap name = CUPS
  disable spoolss = Yes
  show add printer wizard = No
  ldap ssl = no
  case sensitive = No
 
  [bestbilt]
  comment = Mapped as U:
  path = /atrium/bestbilt
  valid users = @users
  force group = users
  read only = No
  create mask = 0664
  force create mode = 0664
  directory mask = 0775
  force directory mode = 0775
  oplocks = No
  level2 oplocks = No
  strict locking = No
 
  ***
 
  The 3.2.3 server
 
  # Samba config file created using SWAT
  # from UNKNOWN ()
  # Date: 2010/02/02 13:20:51
 
  [global]
  workgroup = ATRIUM-DW
  guest account = bbijimhur
  lanman auth = Yes
  ldap ssl = no
 
  [bestbilt]
  comment = working production data
  path = /atrium/bestbilt
  username = bbijimhur
  valid users = @users
  force group = users
  read only = No
  guest ok = Yes
 
  [dosbbilt]
  comment = win94 for dos workstations
  path = /atrium/bestbilt
  read only = No
  guest ok = Yes
 
  This smb.conf file is the best one I have been able to create
  for the dos stations.
 
  With it, I can log in and map the drive.
  net use u: \\bbi-sam-2-srv\bestbilt
 
 
  I can do directory listings and change directory to u:\win94
 
  When I attempt to run a dos program (tracking.exe) I get the following
 
  u:\win94\  Tracking
 
  NET805: NETWORK DEVICE NO LONGER EXISTS READING DRIVE U
 
  Abort, Retry, Fail?
 
  f
 
  Access denied.
 
  I have much the same error if I put the executable on the local drive and
  attempt to use shared .dbf data files from the server.
 
  I can connect to the old server with the same box.
  It takes a few minutes to change all the config files for lanman, but it
   works.
 
  On the old server, I can login, map the drives and run executables and
  use the dbf data files.
 
  It seems to me as if there is some configuration flag where the default
  has from 3.0 to 3.2 that I can't find.
 
  I did a detailed view of both config files from swat and ran a dif on
  them. I was unable to identify a place that could be changed that would
  allow the dos machines to utilize the samba file server.
 
  I am willing to use either different client software on the dos stations,
   or update the samba setup to a different version.
  I like ubuntu, but am not wedded to it.
 
  However, the dos stations must stay, even if I must maintain a server
  with 3.0 on it to keep them running.
 
  Any ideas?  I am more that willing to RTFM, but have exausted my ideas of
  which FM and which part of it to read.  Hints in this matter would be
   welcome. Hints on which config option in smb.conf would be even more
   welcome.
 
  Thanks in advance,
  Jim Hurlburt
  Atrium Windows and Doors Northwest.
  Yakima, WA  USA
 
 1.) On your new server add the following to the [global] section of
  smb.conf: log level = 10
 
 This will raise the debug level of samba - the log file(s) are usually
  written to /var/log/samba/log.smbd   (this might be different in your
  distro)
 
 2.) Take a network sniff on your new server, details are here:
http://wiki.samba.org/index.php/Capture_Packets
 
 Now do the failing DOS commands again.
 
 The 1.) samba debug log might already be sufficient to track down the
  problem.
 
 Better would be both - the samba debug 10 log and a corresponding 

[Samba] Can compile idmap_passdb as shared module

2010-02-03 Thread Alex Domoradov
Hi all,

I have CentOS-5.4 box with all updates.I want to use samba as PDC with ldap
backend. All works fine, except winbind daemon. My samba version is 3.4.5.

# winbindd -D -d 3

# wbinfo -i test
test:*:50001:513:test:/home/W3/test:/bin/false

all fine, but in log file I get the following error

[2010/02/02 17:16:55, 3] winbindd/idmap.c:302(idmap_init_domain)
idmap backend passdb not found
[2010/02/02 17:16:55, 5] lib/module.c:111(smb_probe_module)
Probing module 'passdb'
[2010/02/02 17:16:55, 5] lib/module.c:130(smb_probe_module)
Probing module 'passdb': Trying to load from /usr/lib/samba/idmap/passdb.so
[2010/02/02 17:16:55, 3] lib/module.c:48(do_smb_load_module)
Error loading module '/usr/lib/samba/idmap/passdb.so':
/usr/lib/samba/idmap/passdb.so: cannot open shared object file: No such file
or directory
[2010/02/02 17:16:55, 3] winbindd/idmap.c:307(idmap_init_domain)
Could not probe idmap module passdb
[2010/02/02 17:16:55, 1] winbindd/idmap.c:438(idmap_init_passdb_domain)
Could not init passdb idmap domain

Why does it try to load passdb.so? It was build statically

checking how to build idmap_passdb... static

When i try to build it dynamically

./configure \
...
--with-shared-modules=idmap_passdb \

I get the following error

Building plugin bin/smb_traffic_analyzer.so
Compiling modules/vfs_dirsort.c
Building plugin bin/dirsort.so
Compiling winbindd/idmap_ldap.c
Building plugin bin/ldap.so
make: *** No rule to make target `bin/passdb.so', needed by `all'.  Stop.
error: Bad exit status from /var/tmp/rpm-tmp.42756 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.42756 (%build)

My smb.conf

[global]
dos charset = cp866
unix charset = utf8
display charset = utf8

workgroup = W3
server string = Primary Domain Controller
passdb backend = ldapsam:ldap://127.0.0.1/;

client NTLMv2 auth = Yes
log file = /var/log/samba/samba.log
time server = Yes

deadtime = 15
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192

load printers = No
printcap name = /dev/null
disable spoolss = Yes
show add printer wizard = No

add user script = /usr/sbin/smbldap-useradd -m %u
delete user script = /usr/sbin/smbldap-userdel %u
add group script = /usr/sbin/smbldap-groupadd -p %g
delete group script = /usr/sbin/smbldap-groupdel %g
add user to group script = /usr/sbin/smbldap-groupmod -m %u %g
delete user from group script = /usr/sbin/smbldap-groupmod -x %u %g
set primary group script = /usr/sbin/smbldap-usermod -g %g %u
add machine script = /usr/sbin/smbldap-useradd -w %u

logon path =
logon drive = Y:
logon home = \\pdc\home\%U
domain logons = Yes
os level = 64
lm announce = No
preferred master = Yes
domain master = Yes
dns proxy = No
wins support = Yes

ldap admin dn = cn=root,dc=w3,dc=lan
ldap group suffix = ou=groups
ldap idmap suffix = ou=idmap
ldap machine suffix = ou=computers
ldap suffix = dc=w3,dc=lan
ldap ssl = no
ldap user suffix = ou=users

idmap backend = ldap:ldap://localhost;
idmap alloc backend = ldap:ldap://localhost;
idmap uid = 5-50
idmap gid = 5-50

winbind enum users = Yes
winbind enum groups = Yes

idmap alloc config : range = 5-50
idmap alloc config : ldap_url = ldap://127.0.0.1/
idmap alloc config : ldap_user_dn = cn=root,dc=w3,dc=lan
idmap alloc config : ldap_base_dn = ou=idmap,dc=w3,dc=lan

idmap config BUILTIN : ldap_url = ldap://127.0.0.1/
idmap config BUILTIN : ldap_user_dn = cn=root,dc=w3,dc=lan
idmap config BUILTIN : ldap_base_dn = ou=idmap,dc=w3,dc=lan
idmap config BUILTIN : backend = ldap

idmap config W3 : ldap_url = ldap://127.0.0.1/
idmap config W3 : ldap_user_dn = cn=root,dc=w3,dc=lan
idmap config W3 : ldap_base_dn = ou=idmap,dc=w3,dc=lan
idmap config W3 : backend = ldap

ldapsam:editposix = yes
ldapsam:trusted = yes

admin users = administrator

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


[Samba] Fwd: OS X Clients Can't Create Sub-Directories

2010-02-03 Thread Kimball Larsen


Begin forwarded message:

 From: Kimball Larsen kimb...@miridiatech.com
 Date: February 2, 2010 7:58:49 PM MST
 To: Andy Liebman andylieb...@aol.com
 Subject: Re: [Samba] OS X Clients Can't Create Sub-Directories
 
 
 On Feb 2, 2010, at 6:53 PM, Andy Liebman wrote:
 
 
 Kimball Larsen wrote:
 I'm running samba on a local linux server, with a bunch of shares.  Over 
 the last several years, this has worked perfectly in our heterogenous 
 network of OS X and Windows.  All my windows clients still work perfectly - 
 my users can mount the samba shares and create, rename, move etc files and 
 folders. 
 However, recently (starting yesterday) my OS X clients are unable to rename 
 any sub directories on any of my shares. 
 So, if I have a structure like this: 
 Share Root
   FooFolder
   Bar Folder
 
 My OS X users are able to create and rename directories in the share root, 
 but are unable to rename folders they create in sub directories.
 
 So, if my OS X user navigates to FooFolder and tries to create a new folder 
 there, a new folder is created called untitled folder, but I'm unable to 
 rename it.  Every time I do, the finder says You don't have permission to 
 rename the item untitled folder.
 
 But, again, I can create and rename folders in the root of the share 
 without issue. 
 Here are the relevant bits from my smb.conf (Neighborhood is the name of 
 the share):
 
 [global]
   log file = /var/log/samba/log.%m
   load printers = no guest account = nobody
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n 
 *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
   socket options = TCP_NODELAY
   obey pam restrictions = yes
   encrypt passwords = true
   passwd program = /usr/bin/passwd %u
   passdb backend = tdbsam
   dns proxy = no
   delete readonly = yes
   server string = %h server
   invalid users = root
   workgroup = lappygroup
   security = share
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   max log size = 1000
   unix extensions = no
 
 
 [Neighborhood]
 comment = Who are the people in your neighborhood...
 path = /mnt/brick/Neighborhood
 public = yes
 writable = yes
 create mask = 0777
 directory mask = 0777
 force user = nobody
 force group = nogroup
 
 
 And here are the permissions on the root of the share:
 r...@jake:/mnt/brick# ls -la | grep Neighborhood
 drwxrwxrwx 46 nobody nogroup 2360 2010-02-02 15:31 Neighborhood
 
 And the Advertising directory where I want to create a sub directory.
 r...@jake:/mnt/brick/Neighborhood# ls -la | grep Advertising
 drwxrwxrwx  4 nobody nogroup   144 2010-02-02 15:49 Advertising
 
 And the resulting untitled folder that is created by the OS X client. 
 r...@jake:/mnt/brick/Neighborhood/Advertising# ls -la
 total 11
 drwxrwxrwx  4 nobody nogroup  144 2010-02-02 15:49 .
 drwxrwxrwx 46 nobody nogroup 2360 2010-02-02 15:31 ..
 -rwxrwxrwx  1 nobody nogroup 6148 2009-05-04 10:03 .DS_Store
 drwxrwxrwx  3 nobody nogroup 1064 2008-12-17 15:38 Lead Tracking
 drwxrwxrwx  2 nobody nogroup   48 2010-02-02 15:49 untitled folder
 
 
 What should I be checking?
 
 Thanks!
 
 -- Kimball 
 
 
 
 
 
 Hey Andy, 
 
 Hello Kimball,
 
 What version of Samba Server are you running?
 
 Samba version 3.4.0, running on ubuntu 9.10
 
 
 
 What version of OS X are you running?  There have been huge changes in the 
 use (and setting) of extended attributes with Snow Leopard.  These can cause 
 all sorts of issues that were not there before.  Have your Mac clients just 
 updated to Snow Leopard?
 
 The ones having the problems described above are all Snow Leopard, but were 
 upgraded some time ago - shortly after Snow Leopard came out last year.  It 
 is possible that the .DS_Store files you mention below are only just now 
 beginning to conflict, as we don't typically create new directories on these 
 shares.  I'll investigate that next. 
 
 There are 2 10.5 OS X machines on the network as well, and today when I 
 started mucking around with the samba server their finders both went belly-up 
 - had to reboot both macs to get their finders to start and run again.  I 
 presume there are similar problems on OS 10.5?
 
 Thanks!
 
 -- Kimball 
 
 
 
 
 I see that there is a .DS_Store file in the directory.  The permissions on 
 those files can prevent User B from accessing a share that User A accessed 
 (or at least the directories in that share that were accessed by User A).  
 In a shared environment accessed by multiple OS X servers, it's usually best 
 to disable the creation of .DS_Store files on network volumes, as the wrong 
 permissions on these files can prevent users from doing things they expect 
 to be able to do.
 
 There are many postings on the net about how to disable the creation of the 
 .DS_Store files,  for example:
 
 http://www.macosxhints.com/article.php?story=20051130083652119

I have removed all .DS_Store files, and disabled 

[Samba] windows 7 machine account fails to authenticate against samba PDC

2010-02-03 Thread graham

Hello all,

I've added my windows7 client to the domain (samba running as pdc), 
having applied the registry changes identified here 
(http://wiki.samba.org/index.php/Windows7).


Partial success - domain users can login and see shares etc, BUT:

1 - the registry settings in ntlogon/NTConfig.POL are not applied. Am I 
right in thinking that windows 7 ignores this policy?
And if so I therefore need to put the appropriate registry settings into 
a logon script?



2 - every time a domain user logs in to the windows7 host smbd reports 
an error:


[2010/02/02 19:07:51,  0] 
rpc_server/srv_netlog_nt.c:603(_netr_ServerAuthenticate3)
  _netr_ServerAuthenticate3: netlogon_creds_server_check failed. 
Rejecting auth request from client WIN7HOST machine account WIN7HOST$

[2010/02/02 19:07:52,  0] auth/auth_sam.c:355(check_sam_security)
  check_sam_security: make_server_info_sam() failed with 
'NT_STATUS_NO_SUCH_USER'


This only occurs for the windows7 client (not XP clients).
What does this mean, is it a problem, and how do I fix it?!


3 - periodic errors reported by nmbd:
Packet send failed to 192.168.10.8(138) ERRNO=Operation not permitted

That's the ipaddress of the windows7 client.
Actually, looking back in the logs I see this has occasionally happened 
for all but one of the xp clients too.

Again, what does this error mean, is it a problem, how would I fix it?


4 - windows7 client bombards the server on port 389 (ldap)
No idea why, no other (xp) clients do this. I'm guessing it /might/ be 
part of question 2 above ,ie. maybe the win7 client is trying to 
authenticate against ldap??


rgds all,
graham.

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


Re: [Samba] windows 7 machine account fails to authenticate against samba PDC

2010-02-03 Thread Gaiseric Vandal
What samba version?  After you login from Win 7 can you actually open 
and save files?   It does seem like it is trying to reauthenticate as an 
active directory client.


Maybe config samba to only listen on port 139 and not 445 (smb ports 
in smb.conf.)That might force the Win 7 client to treat the samba 
server as a NT4 server.  I believe port 445 is for Smb-over-tcp while 
139 is for smb-over-netbios-over-tcp.








On 02/03/10 12:09, graham wrote:

Hello all,

I've added my windows7 client to the domain (samba running as pdc), 
having applied the registry changes identified here 
(http://wiki.samba.org/index.php/Windows7).


Partial success - domain users can login and see shares etc, BUT:

1 - the registry settings in ntlogon/NTConfig.POL are not applied. Am 
I right in thinking that windows 7 ignores this policy?
And if so I therefore need to put the appropriate registry settings 
into a logon script?



2 - every time a domain user logs in to the windows7 host smbd reports 
an error:


[2010/02/02 19:07:51,  0] 
rpc_server/srv_netlog_nt.c:603(_netr_ServerAuthenticate3)
  _netr_ServerAuthenticate3: netlogon_creds_server_check failed. 
Rejecting auth request from client WIN7HOST machine account WIN7HOST$

[2010/02/02 19:07:52,  0] auth/auth_sam.c:355(check_sam_security)
  check_sam_security: make_server_info_sam() failed with 
'NT_STATUS_NO_SUCH_USER'


This only occurs for the windows7 client (not XP clients).
What does this mean, is it a problem, and how do I fix it?!


3 - periodic errors reported by nmbd:
Packet send failed to 192.168.10.8(138) ERRNO=Operation not permitted

That's the ipaddress of the windows7 client.
Actually, looking back in the logs I see this has occasionally 
happened for all but one of the xp clients too.

Again, what does this error mean, is it a problem, how would I fix it?


4 - windows7 client bombards the server on port 389 (ldap)
No idea why, no other (xp) clients do this. I'm guessing it /might/ be 
part of question 2 above ,ie. maybe the win7 client is trying to 
authenticate against ldap??


rgds all,
graham.



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


Re: [Samba] windows 7 machine account fails to authenticate against samba PDC

2010-02-03 Thread graham

Gaiseric Vandal wrote on 03/02/2010 17:27:

What samba version?


version 3.4.5


 After you login from Win 7 can you actually open

and save files?


yes. I'm not familiar enough with smb etc. to understand why the machine 
itself is trying to authenticate in addition to the user, and whether it 
matters.




It does seem like it is trying to reauthenticate as an
active directory client.

Maybe config samba to only listen on port 139 and not 445 (smb ports
in smb.conf.) That might force the Win 7 client to treat the samba
server as a NT4 server. I believe port 445 is for Smb-over-tcp while
139 is for smb-over-netbios-over-tcp.


I do have that set.
For completeness, the [global] config is:
workgroup = SMBDOMAIN
netbios name = SAMBASERVER
server string =
map to guest = Bad User
username map = /etc/samba/username-map
restrict anonymous = 1
log level = 1
smb ports = 139
name resolve order = wins lmhosts
time server = Yes
printcap name = cups
	add machine script = /usr/sbin/useradd -d /dev/null -g sambausers -c 
Machine -s /bin/false %u

logon script = logon.bat
logon path =
logon home =
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
wins support = Yes





On 02/03/10 12:09, graham wrote:

Hello all,

I've added my windows7 client to the domain (samba running as pdc),
having applied the registry changes identified here
(http://wiki.samba.org/index.php/Windows7).

Partial success - domain users can login and see shares etc, BUT:

1 - the registry settings in ntlogon/NTConfig.POL are not applied. Am
I right in thinking that windows 7 ignores this policy?
And if so I therefore need to put the appropriate registry settings
into a logon script?


2 - every time a domain user logs in to the windows7 host smbd reports
an error:

[2010/02/02 19:07:51, 0]
rpc_server/srv_netlog_nt.c:603(_netr_ServerAuthenticate3)
_netr_ServerAuthenticate3: netlogon_creds_server_check failed.
Rejecting auth request from client WIN7HOST machine account WIN7HOST$
[2010/02/02 19:07:52, 0] auth/auth_sam.c:355(check_sam_security)
check_sam_security: make_server_info_sam() failed with
'NT_STATUS_NO_SUCH_USER'

This only occurs for the windows7 client (not XP clients).
What does this mean, is it a problem, and how do I fix it?!


3 - periodic errors reported by nmbd:
Packet send failed to 192.168.10.8(138) ERRNO=Operation not permitted

That's the ipaddress of the windows7 client.
Actually, looking back in the logs I see this has occasionally
happened for all but one of the xp clients too.
Again, what does this error mean, is it a problem, how would I fix it?


4 - windows7 client bombards the server on port 389 (ldap)
No idea why, no other (xp) clients do this. I'm guessing it /might/ be
part of question 2 above ,ie. maybe the win7 client is trying to
authenticate against ldap??

rgds all,
graham.






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


Re: [Samba] windows 7 machine account fails to authenticate against samba PDC

2010-02-03 Thread Gaiseric Vandal
it looks like from the log entries that the samba can't find an account 
for the machine.  The machine-  if it is a domain member-   does need to 
have an account.  Were you able to join the machine to the domain?  if 
so there should be both a samba (windows) account (verify with pdbedit 
-Lv) and a unix account (verify with getent passwd.)





On 02/03/10 12:42, graham wrote:

Gaiseric Vandal wrote on 03/02/2010 17:27:

What samba version?


version 3.4.5


 After you login from Win 7 can you actually open

and save files?


yes. I'm not familiar enough with smb etc. to understand why the 
machine itself is trying to authenticate in addition to the user, and 
whether it matters.




It does seem like it is trying to reauthenticate as an
active directory client.

Maybe config samba to only listen on port 139 and not 445 (smb ports
in smb.conf.) That might force the Win 7 client to treat the samba
server as a NT4 server. I believe port 445 is for Smb-over-tcp while
139 is for smb-over-netbios-over-tcp.


I do have that set.
For completeness, the [global] config is:
workgroup = SMBDOMAIN
netbios name = SAMBASERVER
server string =
map to guest = Bad User
username map = /etc/samba/username-map
restrict anonymous = 1
log level = 1
smb ports = 139
name resolve order = wins lmhosts
time server = Yes
printcap name = cups
add machine script = /usr/sbin/useradd -d /dev/null -g sambausers 
-c Machine -s /bin/false %u

logon script = logon.bat
logon path =
logon home =
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
wins support = Yes





On 02/03/10 12:09, graham wrote:

Hello all,

I've added my windows7 client to the domain (samba running as pdc),
having applied the registry changes identified here
(http://wiki.samba.org/index.php/Windows7).

Partial success - domain users can login and see shares etc, BUT:

1 - the registry settings in ntlogon/NTConfig.POL are not applied. Am
I right in thinking that windows 7 ignores this policy?
And if so I therefore need to put the appropriate registry settings
into a logon script?


2 - every time a domain user logs in to the windows7 host smbd reports
an error:

[2010/02/02 19:07:51, 0]
rpc_server/srv_netlog_nt.c:603(_netr_ServerAuthenticate3)
_netr_ServerAuthenticate3: netlogon_creds_server_check failed.
Rejecting auth request from client WIN7HOST machine account WIN7HOST$
[2010/02/02 19:07:52, 0] auth/auth_sam.c:355(check_sam_security)
check_sam_security: make_server_info_sam() failed with
'NT_STATUS_NO_SUCH_USER'

This only occurs for the windows7 client (not XP clients).
What does this mean, is it a problem, and how do I fix it?!


3 - periodic errors reported by nmbd:
Packet send failed to 192.168.10.8(138) ERRNO=Operation not permitted

That's the ipaddress of the windows7 client.
Actually, looking back in the logs I see this has occasionally
happened for all but one of the xp clients too.
Again, what does this error mean, is it a problem, how would I fix it?


4 - windows7 client bombards the server on port 389 (ldap)
No idea why, no other (xp) clients do this. I'm guessing it /might/ be
part of question 2 above ,ie. maybe the win7 client is trying to
authenticate against ldap??

rgds all,
graham.








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


[Samba] Problem with Excel

2010-02-03 Thread Claudio Guzman
To try to overwrite, download and copy an excel file in a shared
folder on Samba, gives me error that the operation can not be done or
not have permissions to perform the task. This problem happens to me
with this type of format office2003 Excel SP3

Any idea to this error or bug fixed

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


[Samba] WG: Problem with Excel

2010-02-03 Thread Daniel Müller

What is your samba version?
You need at least 3.28
There is a bug concerning execl files acls. Look at your linux/unix box when 
you
save your exel files in the share it will loose their ownership and 
permissions.

Or try this:

http://support.microsoft.com/?id=812937

Von: Claudio Guzman cguzm...@gmail.com
An: samba@lists.samba.org
Gesendet: Mittwoch, 3. Februar 2010 20:32
Betreff: [Samba] Problem with Excel



To try to overwrite, download and copy an excel file in a shared
folder on Samba, gives me error that the operation can not be done or
not have permissions to perform the task. This problem happens to me
with this type of format office2003 Excel SP3

Any idea to this error or bug fixed

Best Regards.
--
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] Domain login delays w2k8 R2

2010-02-03 Thread Jeremy Allison
On Wed, Feb 03, 2010 at 03:19:36PM +0100, Åke Holmlund wrote:
 Hello!

 From what I can see, there is no DNS-traffic around the time of the
 gaps and the DNS-activity I can see in onther places seems ok. There
 is almost no network traffic and no CPU activity during the gaps so
 it looks like some kind of timeout issue.

 It may be of interest that, for the moment, IPv6 is beeing used.
 Sometimes we also have quite a long delay if we click on the View
 computers and devices link in the Network and Sharing Center.

Is there any other traffic coming out of the client box around the delay
time ?

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


Re: [Samba] windows 7 machine account fails to authenticate against samba PDC

2010-02-03 Thread graham

Gaiseric Vandal wrote on 03/02/2010 19:15:

it looks like from the log entries that the samba can't find an account
for the machine. The machine- if it is a domain member- does need to
have an account. Were you able to join the machine to the domain? if so
there should be both a samba (windows) account (verify with pdbedit
-Lv) and a unix account (verify with getent passwd.)


Hi Gaiseric , thanks for getting back to me.

Yes, it appeared to join the domain correctly.
There is an appropriate machine account and entry in/etc/passwd, and it 
looks identical to a working xp client's:



pdbedit -Lv:

Unix username:XPHOST$
NT username:
Account Flags:[W  ]
User SID: S-1-5-21-764034647-1846980996-1928349337-1028
Primary Group SID:S-1-5-21-764034647-1846980996-1928349337-513
Full Name:XPHOST$
Home Directory:
HomeDir Drive:
Logon Script: logon.bat
Profile Path:
Domain:   SMBDOMAIN
Account desc:
Workstations:
Munged dial:
Logon time:   0
Logoff time:  never
Kickoff time: never
Password last set:Tue, 19 Jan 2010 12:21:19 GMT
Password can change:  Tue, 19 Jan 2010 12:21:19 GMT
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours : FF
---
Unix username:WIN7HOST$
NT username:
Account Flags:[W  ]
User SID: S-1-5-21-764034647-1846980996-1928349337-1031
Primary Group SID:S-1-5-21-764034647-1846980996-1928349337-513
Full Name:WIN7HOST$
Home Directory:
HomeDir Drive:
Logon Script: logon.bat
Profile Path:
Domain:   SMBDOMAIN
Account desc:
Workstations:
Munged dial:
Logon time:   0
Logoff time:  never
Kickoff time: never
Password last set:Tue, 02 Feb 2010 19:04:05 GMT
Password can change:  Tue, 02 Feb 2010 19:04:05 GMT
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours : FF

getent passwd:
XPHOST$:x:1011:102:Machine:/dev/null:/bin/false
WIN7HOST$:x:1012:102:Machine:/dev/null:/bin/false







On 02/03/10 12:42, graham wrote:

Gaiseric Vandal wrote on 03/02/2010 17:27:

What samba version?


version 3.4.5


 After you login from Win 7 can you actually open

and save files?


yes. I'm not familiar enough with smb etc. to understand why the
machine itself is trying to authenticate in addition to the user, and
whether it matters.



It does seem like it is trying to reauthenticate as an
active directory client.

Maybe config samba to only listen on port 139 and not 445 (smb ports
in smb.conf.) That might force the Win 7 client to treat the samba
server as a NT4 server. I believe port 445 is for Smb-over-tcp while
139 is for smb-over-netbios-over-tcp.


I do have that set.
For completeness, the [global] config is:
workgroup = SMBDOMAIN
netbios name = SAMBASERVER
server string =
map to guest = Bad User
username map = /etc/samba/username-map
restrict anonymous = 1
log level = 1
smb ports = 139
name resolve order = wins lmhosts
time server = Yes
printcap name = cups
add machine script = /usr/sbin/useradd -d /dev/null -g sambausers -c
Machine -s /bin/false %u
logon script = logon.bat
logon path =
logon home =
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
wins support = Yes





On 02/03/10 12:09, graham wrote:

Hello all,

I've added my windows7 client to the domain (samba running as pdc),
having applied the registry changes identified here
(http://wiki.samba.org/index.php/Windows7).

Partial success - domain users can login and see shares etc, BUT:

1 - the registry settings in ntlogon/NTConfig.POL are not applied. Am
I right in thinking that windows 7 ignores this policy?
And if so I therefore need to put the appropriate registry settings
into a logon script?


2 - every time a domain user logs in to the windows7 host smbd reports
an error:

[2010/02/02 19:07:51, 0]
rpc_server/srv_netlog_nt.c:603(_netr_ServerAuthenticate3)
_netr_ServerAuthenticate3: netlogon_creds_server_check failed.
Rejecting auth request from client WIN7HOST machine account WIN7HOST$
[2010/02/02 19:07:52, 0] auth/auth_sam.c:355(check_sam_security)
check_sam_security: make_server_info_sam() failed with
'NT_STATUS_NO_SUCH_USER'

This only occurs for the windows7 client (not XP clients).
What does this mean, is it a problem, and how do I fix it?!


3 - periodic errors reported by nmbd:
Packet send failed to 192.168.10.8(138) ERRNO=Operation not permitted

That's the ipaddress of the windows7 client.
Actually, looking back in the logs I see this has occasionally
happened for all but one of the xp clients too.
Again, what does this error mean, is it a problem, how would I fix it?


4 - windows7 client bombards the server on port 389 (ldap)
No idea why, no other (xp) clients do this. I'm guessing it /might/ be
part of question 2 above ,ie. maybe the win7 client is 

[Samba] Winbind Auth - prevent some users from logging on

2010-02-03 Thread Eddy Sturg
Hey folks,

New to the list - and I hope this isn't a dumb question.

I am in the process of revamping the way we authenticate to our Linux
servers.  Moving away from pam_ldap and pam_nss, in favor of winbind and
pam_nss.  The reason for this is that I feel winbindd does a better job of
failing over from a unavailable authentication server than pam_ldap.

In any case - I have it all working well on CentOS 5.4, but my only delimma
is how to prevent unwanted users from logging onto servers.  Using pam_ldap
we would use the pam_filter option in ldap.conf to define who we wanted to
allow to login using an LDAP attribute.

Is there a setting in smb.conf or some other winbind mechanism for defining
who is allowed to login?

Note - this should include not only console, but ssh and any other service
that uses the system-auth PAM.

Many thanks in advance,

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


Re: [Samba] Winbind Auth - prevent some users from logging on

2010-02-03 Thread Jeremy Allison
On Wed, Feb 03, 2010 at 04:11:02PM -0700, Eddy Sturg wrote:
 Hey folks,
 
 New to the list - and I hope this isn't a dumb question.
 
 I am in the process of revamping the way we authenticate to our Linux
 servers.  Moving away from pam_ldap and pam_nss, in favor of winbind and
 pam_nss.  The reason for this is that I feel winbindd does a better job of
 failing over from a unavailable authentication server than pam_ldap.
 
 In any case - I have it all working well on CentOS 5.4, but my only delimma
 is how to prevent unwanted users from logging onto servers.  Using pam_ldap
 we would use the pam_filter option in ldap.conf to define who we wanted to
 allow to login using an LDAP attribute.
 
 Is there a setting in smb.conf or some other winbind mechanism for defining
 who is allowed to login?
 
 Note - this should include not only console, but ssh and any other service
 that uses the system-auth PAM.

Doesn't pam_listfile do what you want ?

http://www.cyberciti.biz/tips/howto-deny-allow-linux-user-group-login.html

No dependencies on Samba.

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


[Samba] Error code 0x80070035 (The network path was not found]

2010-02-03 Thread Francis Goh
Hi,

Does anyone know the possible causes or where to go about troubleshooting this, 
besides
looking at the samba log file? I tried looking at the log files but couldn't 
really find anything
from there.

I am encountering error when trying to map network drive :-

Network Error
Windows cannot access \\server\sharedfolder...
Error code : 0x80070035
The network path was not found.

The client workstation is on Windows Vista. Think there is some settings / 
policies enforced from the domain side,
where I have no control that is preventing it as I have tested on a 'clean' 
installed Vista machine (and not connected
to the domain) and is able to map to the network drive.

Please advise.

Thanks so much in advance!

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


Re: [Samba] Vista clients having Issues Copying files from SambaServer

2010-02-03 Thread Anthony Giggins

 Finally got around to upgrading this to 3.4.5 from the sernet repo
 above, but I'm still seeing the same issues, I'm guessing this is
 pointing to a Switch issue? But is there anything else it could be
 before going down this route?

 Cheers,

 Anthony

I did some further troubleshooting and found that this appears to be cause
by power management on the Network Device in Vista, I have disabled the
option to allow the OS manage this device to reduce power.

Now that this is working I'm now having issues renaming folders but I'll
do some more investigation before posting about this

Thanks for everyone's ideas and suggestions.

Regards,

Anthony



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


[Samba] smbpasswd vs passwd to change

2010-02-03 Thread Nickolas Gray
Not sure if someone here can answer this for me. The OpenLDAP guys  
have blown me off on this one.


I have a standalone server which is using ldap as the passdb backend.  
I can ssh into an account.  I can show that smbclient works  -L  
localhost -U ldaptestuser works. If I change the password using  
smbpasswd both still work with new password. If i change the password  
using /usr/bin/passwd I can login interactively with the new password  
but samba still uses the old password.



The relevant part of the smb.conf is

[global]
workgroup = ISLANDS
server string = Samba Server Version %v on Kailua
netbios name = kailua
hosts allow = 192.168.136. 127.
log file = /var/log/samba/%m.log
max log size = 50
log level = 10
debug timestamp = yes

security = user

passdb backend = ldapsam:ldap://127.0.0.1
ldap suffix = dc=local,dc=austin,dc=rr,dc=com
ldap user suffix = ou=users
ldap group suffix = ou=groups
ldap admin dn = cn=root,dc=local,dc=austin,dc=rr,dc=com
ldap delete dn = no
ldap ssl = no
ldap passwd sync = yes
local master = yes
os level = 33
preferred master = yes
load printers = yes
cups options = raw
restrict anonymous = 2


Thanks, Nick Gray
--
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-03 Thread Volker Lendecke
The branch, master has been updated
   via  e1a1468... update samba schema for IBM Directory Server
  from  de24209... Fix bug 7081 - vfs_expand_msdfs doesn't work correctly 
(with fix identified)

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


- Log -
commit e1a1468dd73e1e1edb2cf2d8a09dffebb49e56b6
Author: Christian Ambach christian.amb...@de.ibm.com
Date:   Wed Feb 3 14:20:16 2010 +0100

update samba schema for IBM Directory Server

this increases the sambapasswordhistory field length to 64 and
fixes a warning about a wrong booleanmatch setting

Signed-off-by: Christian Ambach christian.amb...@de.ibm.com

---

Summary of changes:
 examples/LDAP/samba.schema.at.IBM-DS |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/LDAP/samba.schema.at.IBM-DS 
b/examples/LDAP/samba.schema.at.IBM-DS
index 3730a92..85860f9 100644
--- a/examples/LDAP/samba.schema.at.IBM-DS
+++ b/examples/LDAP/samba.schema.at.IBM-DS
@@ -50,7 +50,7 @@ attributetypes=( 1.3.6.1.4.1.7165.2.1.41 NAME 
'sambaShareName' DESC 'Share Name'
 
 attributetypes=( 1.3.6.1.4.1.7165.2.1.42 NAME 'sambaOptionName' DESC 'Option 
Name' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 
1.3.6.1.4.1.1466.115.121.1.15{256} )
 
-attributetypes=( 1.3.6.1.4.1.7165.2.1.43 NAME 'sambaBoolOption' DESC 'A 
boolean option' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 
SINGLE-VALUE )
+attributetypes=( 1.3.6.1.4.1.7165.2.1.43 NAME 'sambaBoolOption' DESC 'A 
boolean option' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 
SINGLE-VALUE )
 
 attributetypes=( 1.3.6.1.4.1.7165.2.1.44 NAME 'sambaIntegerOption' DESC 'An 
integer option' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 
SINGLE-VALUE )
 
@@ -68,7 +68,7 @@ attributetypes=( 1.3.6.1.4.1.7165.2.1.51 NAME 'sambaSIDList' 
DESC 'Security ID L
 
 attributetypes=( 1.3.6.1.4.1.7165.2.1.53 NAME 'sambaTrustFlags' DESC 'Trust 
Password Flags' EQUALITY caseIgnoreIA5Match SYNTAX 
1.3.6.1.4.1.1466.115.121.1.26 )
 
-attributetypes=( 1.3.6.1.4.1.7165.2.1.54 NAME 'sambaPasswordHistory' DESC 
'Concatenated MD4 hashes of the unicode passwords used on this account' 
EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} )
+attributetypes=( 1.3.6.1.4.1.7165.2.1.54 NAME 'sambaPasswordHistory' DESC 
'Concatenated MD4 hashes of the unicode passwords used on this account' 
EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{64} )
 IBMAttributetypes=( 1.3.6.1.4.1.7165.2.1.54 DBNAME( 'sambaPasswordHistory'  
'sambaPasswordHistory' ) ACCESS-CLASS critical )
 
 attributetypes=( 1.3.6.1.4.1.7165.2.1.55 NAME 'sambaLogonHours' DESC 'Logon 
Hours' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{42} 
SINGLE-VALUE )


-- 
Samba Shared Repository


[SCM] CTDB repository - branch 1.0.112 updated - ctdb-1.0.111-19-g4af34ca

2010-02-03 Thread Ronnie Sahlberg
The branch, 1.0.112 has been updated
   via  4af34ca1bdb4895c2dd1ec280ef14cffab7fc815 (commit)
  from  04e40deac8d0c7edf907135ae81ac961c23135c3 (commit)

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


- Log -
commit 4af34ca1bdb4895c2dd1ec280ef14cffab7fc815
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Thu Feb 4 06:37:41 2010 +1100

Drop the debug level for logging fd creation to DEBUG_DEBUG

---

Summary of changes:
 common/system_linux.c|4 ++--
 server/ctdb_lockwait.c   |2 +-
 server/ctdb_logging.c|2 +-
 server/ctdb_persistent.c |2 +-
 server/ctdb_recover.c|2 +-
 server/ctdb_recoverd.c   |2 +-
 server/ctdb_traverse.c   |2 +-
 server/ctdb_vacuum.c |2 +-
 tcp/tcp_connect.c|2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common/system_linux.c b/common/system_linux.c
index d8229de..b8aace4 100644
--- a/common/system_linux.c
+++ b/common/system_linux.c
@@ -186,7 +186,7 @@ int ctdb_sys_send_arp(const ctdb_sock_addr *addr, const 
char *iface)
return -1;
}
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created SOCKET FD:%d for 
sending arp\n, s));
+   DEBUG(DEBUG_DEBUG, (__location__  Created SOCKET FD:%d for 
sending arp\n, s));
strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name));
if (ioctl(s, SIOCGIFINDEX, ifr)  0) {
DEBUG(DEBUG_CRIT,(__location__  interface '%s' not 
found\n, iface));
@@ -427,7 +427,7 @@ int ctdb_sys_open_capture_socket(const char *iface, void 
**private_data)
return -1;
}
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created RAW SOCKET FD:%d for tcp 
tickle\n, s));
+   DEBUG(DEBUG_DEBUG, (__location__  Created RAW SOCKET FD:%d for tcp 
tickle\n, s));
 
set_nonblocking(s);
set_close_on_exec(s);
diff --git a/server/ctdb_lockwait.c b/server/ctdb_lockwait.c
index e02cd21..afbb921 100644
--- a/server/ctdb_lockwait.c
+++ b/server/ctdb_lockwait.c
@@ -148,7 +148,7 @@ struct lockwait_handle *ctdb_lockwait(struct 
ctdb_db_context *ctdb_db,
close(result-fd[1]);
set_close_on_exec(result-fd[0]);
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created PIPE FD:%d to child 
lockwait process\n, result-fd[0]));
+   DEBUG(DEBUG_DEBUG, (__location__  Created PIPE FD:%d to child lockwait 
process\n, result-fd[0]));
 
talloc_set_destructor(result, lockwait_destructor);
 
diff --git a/server/ctdb_logging.c b/server/ctdb_logging.c
index 56dcfa2..a7ca1a1 100644
--- a/server/ctdb_logging.c
+++ b/server/ctdb_logging.c
@@ -530,7 +530,7 @@ int ctdb_set_child_logging(struct ctdb_context *ctdb)
 ctdb_log_handler, ctdb-log);
ctdb-log-pfd = p[0];
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created PIPE FD:%d for logging\n, 
p[0]));
+   DEBUG(DEBUG_DEBUG, (__location__  Created PIPE FD:%d for logging\n, 
p[0]));
 
return 0;
 }
diff --git a/server/ctdb_persistent.c b/server/ctdb_persistent.c
index b686cbd..d38aa8d 100644
--- a/server/ctdb_persistent.c
+++ b/server/ctdb_persistent.c
@@ -563,7 +563,7 @@ struct childwrite_handle *ctdb_childwrite(struct 
ctdb_db_context *ctdb_db,
 
talloc_set_destructor(result, childwrite_destructor);
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created PIPE FD:%d for 
ctdb_childwrite\n, result-fd[0]));
+   DEBUG(DEBUG_DEBUG, (__location__  Created PIPE FD:%d for 
ctdb_childwrite\n, result-fd[0]));
 
result-fde = event_add_fd(ctdb_db-ctdb-ev, result, result-fd[0],
   EVENT_FD_READ|EVENT_FD_AUTOCLOSE, 
childwrite_handler,
diff --git a/server/ctdb_recover.c b/server/ctdb_recover.c
index ecc01e6..9020363 100644
--- a/server/ctdb_recover.c
+++ b/server/ctdb_recover.c
@@ -748,7 +748,7 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
 
talloc_set_destructor(state, set_recmode_destructor);
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created PIPE FD:%d for 
setrecmode\n, state-fd[0]));
+   DEBUG(DEBUG_DEBUG, (__location__  Created PIPE FD:%d for 
setrecmode\n, state-fd[0]));
 
state-te = event_add_timed(ctdb-ev, state, timeval_current_ofs(5, 0),
ctdb_set_recmode_timeout, state);
diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index 4b407c3..80dbc1e 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -3390,7 +3390,7 @@ int ctdb_start_recoverd(struct ctdb_context *ctdb)
exit(1);
}
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created PIPE FD:%d to recovery 
daemon\n, fd[0]));
+   DEBUG(DEBUG_DEBUG, (__location__  Created PIPE FD:%d to recovery 
daemon\n, fd[0]));
 
event_add_fd(ctdb-ev, ctdb, fd[0], 

[SCM] CTDB repository - branch master updated - ctdb-1.0.113-67-geae1d4f

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

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


- Log -
commit eae1d4f9e52e73b4d8769868fffdafa590d03784
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Thu Feb 4 06:37:41 2010 +1100

Drop the debug level for logging fd creation to DEBUG_DEBUG

---

Summary of changes:
 common/system_linux.c|4 ++--
 server/ctdb_lockwait.c   |2 +-
 server/ctdb_logging.c|2 +-
 server/ctdb_persistent.c |2 +-
 server/ctdb_recover.c|2 +-
 server/ctdb_recoverd.c   |2 +-
 server/ctdb_traverse.c   |2 +-
 server/ctdb_vacuum.c |2 +-
 tcp/tcp_connect.c|2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common/system_linux.c b/common/system_linux.c
index d8229de..b8aace4 100644
--- a/common/system_linux.c
+++ b/common/system_linux.c
@@ -186,7 +186,7 @@ int ctdb_sys_send_arp(const ctdb_sock_addr *addr, const 
char *iface)
return -1;
}
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created SOCKET FD:%d for 
sending arp\n, s));
+   DEBUG(DEBUG_DEBUG, (__location__  Created SOCKET FD:%d for 
sending arp\n, s));
strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name));
if (ioctl(s, SIOCGIFINDEX, ifr)  0) {
DEBUG(DEBUG_CRIT,(__location__  interface '%s' not 
found\n, iface));
@@ -427,7 +427,7 @@ int ctdb_sys_open_capture_socket(const char *iface, void 
**private_data)
return -1;
}
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created RAW SOCKET FD:%d for tcp 
tickle\n, s));
+   DEBUG(DEBUG_DEBUG, (__location__  Created RAW SOCKET FD:%d for tcp 
tickle\n, s));
 
set_nonblocking(s);
set_close_on_exec(s);
diff --git a/server/ctdb_lockwait.c b/server/ctdb_lockwait.c
index e02cd21..afbb921 100644
--- a/server/ctdb_lockwait.c
+++ b/server/ctdb_lockwait.c
@@ -148,7 +148,7 @@ struct lockwait_handle *ctdb_lockwait(struct 
ctdb_db_context *ctdb_db,
close(result-fd[1]);
set_close_on_exec(result-fd[0]);
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created PIPE FD:%d to child 
lockwait process\n, result-fd[0]));
+   DEBUG(DEBUG_DEBUG, (__location__  Created PIPE FD:%d to child lockwait 
process\n, result-fd[0]));
 
talloc_set_destructor(result, lockwait_destructor);
 
diff --git a/server/ctdb_logging.c b/server/ctdb_logging.c
index 56dcfa2..a7ca1a1 100644
--- a/server/ctdb_logging.c
+++ b/server/ctdb_logging.c
@@ -530,7 +530,7 @@ int ctdb_set_child_logging(struct ctdb_context *ctdb)
 ctdb_log_handler, ctdb-log);
ctdb-log-pfd = p[0];
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created PIPE FD:%d for logging\n, 
p[0]));
+   DEBUG(DEBUG_DEBUG, (__location__  Created PIPE FD:%d for logging\n, 
p[0]));
 
return 0;
 }
diff --git a/server/ctdb_persistent.c b/server/ctdb_persistent.c
index b686cbd..d38aa8d 100644
--- a/server/ctdb_persistent.c
+++ b/server/ctdb_persistent.c
@@ -563,7 +563,7 @@ struct childwrite_handle *ctdb_childwrite(struct 
ctdb_db_context *ctdb_db,
 
talloc_set_destructor(result, childwrite_destructor);
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created PIPE FD:%d for 
ctdb_childwrite\n, result-fd[0]));
+   DEBUG(DEBUG_DEBUG, (__location__  Created PIPE FD:%d for 
ctdb_childwrite\n, result-fd[0]));
 
result-fde = event_add_fd(ctdb_db-ctdb-ev, result, result-fd[0],
   EVENT_FD_READ|EVENT_FD_AUTOCLOSE, 
childwrite_handler,
diff --git a/server/ctdb_recover.c b/server/ctdb_recover.c
index ecc01e6..9020363 100644
--- a/server/ctdb_recover.c
+++ b/server/ctdb_recover.c
@@ -748,7 +748,7 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
 
talloc_set_destructor(state, set_recmode_destructor);
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created PIPE FD:%d for 
setrecmode\n, state-fd[0]));
+   DEBUG(DEBUG_DEBUG, (__location__  Created PIPE FD:%d for 
setrecmode\n, state-fd[0]));
 
state-te = event_add_timed(ctdb-ev, state, timeval_current_ofs(5, 0),
ctdb_set_recmode_timeout, state);
diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index f910b3e..ebcca1b 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -3496,7 +3496,7 @@ int ctdb_start_recoverd(struct ctdb_context *ctdb)
exit(1);
}
 
-   DEBUG(DEBUG_NOTICE, (__location__  Created PIPE FD:%d to recovery 
daemon\n, fd[0]));
+   DEBUG(DEBUG_DEBUG, (__location__  Created PIPE FD:%d to recovery 
daemon\n, fd[0]));
 
event_add_fd(ctdb-ev, ctdb, fd[0], 

[SCM] Samba Shared Repository - branch master updated

2010-02-03 Thread Jeremy Allison
The branch, master has been updated
   via  e00e6a2... s3: Simplify the code a bit: Catch (len==0) early
  from  e1a1468... update samba schema for IBM Directory Server

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


- Log -
commit e00e6a2c96760b4c64a3a0badefdb582caabd31a
Author: Volker Lendecke v...@samba.org
Date:   Wed Feb 3 07:37:29 2010 +0100

s3: Simplify the code a bit: Catch (len==0) early

---

Summary of changes:
 source3/modules/vfs_expand_msdfs.c |   11 ---
 1 files changed, 4 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_expand_msdfs.c 
b/source3/modules/vfs_expand_msdfs.c
index 177ebdb..0772215 100644
--- a/source3/modules/vfs_expand_msdfs.c
+++ b/source3/modules/vfs_expand_msdfs.c
@@ -187,7 +187,7 @@ static int expand_msdfs_readlink(struct vfs_handle_struct 
*handle,
result = SMB_VFS_NEXT_READLINK(handle, path, target,
   PATH_MAX);
 
-   if (result  0)
+   if (result = 0)
return result;
 
target[result] = '\0';
@@ -202,12 +202,9 @@ static int expand_msdfs_readlink(struct vfs_handle_struct 
*handle,
}
 
len = MIN(bufsiz, strlen(target));
-   if (len) {
-   memcpy(buf, target, len);
-   } else {
-   errno = ENOENT;
-   return -1;
-   }
+
+   memcpy(buf, target, len);
+
TALLOC_FREE(target);
return len;
 }


-- 
Samba Shared Repository


[SCM] CTDB repository - branch master updated - ctdb-1.0.113-68-g8c89aac

2010-02-03 Thread Ronnie Sahlberg
The branch, master has been updated
   via  8c89aac20260dc7f3746e29fe99f17422a77cb88 (commit)
  from  eae1d4f9e52e73b4d8769868fffdafa590d03784 (commit)

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


- Log -
commit 8c89aac20260dc7f3746e29fe99f17422a77cb88
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Thu Feb 4 09:45:32 2010 +1100

add two new debug controls to send and receive messages

ctdb msglisten and msgsend

---

Summary of changes:
 tools/ctdb.c |   65 ++
 1 files changed, 65 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/tools/ctdb.c b/tools/ctdb.c
index 00bef82..9d6547c 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -4119,6 +4119,69 @@ static int control_rddumpmemory(struct ctdb_context 
*ctdb, int argc, const char
 }
 
 /*
+  send a message to a srvid
+ */
+static int control_msgsend(struct ctdb_context *ctdb, int argc, const char 
**argv)
+{
+   unsigned long srvid;
+   int ret;
+   TDB_DATA data;
+
+   if (argc  2) {
+   usage();
+   }
+
+   srvid  = strtoul(argv[0], NULL, 0);
+
+   data.dptr = (uint8_t *)discard_const(argv[1]);
+   data.dsize= strlen(argv[1]);
+
+   ret = ctdb_send_message(ctdb, CTDB_BROADCAST_CONNECTED, srvid, data);
+   if (ret != 0) {
+   DEBUG(DEBUG_ERR,(Failed to send memdump request message to 
%u\n, options.pnn));
+   return -1;
+   }
+
+   return 0;
+}
+
+/*
+  handler for msglisten
+*/
+static void msglisten_handler(struct ctdb_context *ctdb, uint64_t srvid, 
+TDB_DATA data, void *private_data)
+{
+   int i;
+
+   printf(Message received: );
+   for (i=0;idata.dsize;i++) {
+   printf(%c, data.dptr[i]);
+   }
+   printf(\n);
+}
+
+/*
+  listen for messages on a messageport
+ */
+static int control_msglisten(struct ctdb_context *ctdb, int argc, const char 
**argv)
+{
+   uint64_t srvid;
+
+   srvid = getpid();
+
+   /* register a message port and listen for messages
+   */
+   ctdb_set_message_handler(ctdb, srvid, msglisten_handler, NULL);
+   printf(Listening for messages on srvid:%d\n, (int)srvid);
+
+   while (1) { 
+   event_loop_once(ctdb-ev);
+   }
+
+   return 0;
+}
+
+/*
   list all nodes in the cluster
   if the daemon is running, we read the data from the daemon.
   if the daemon is not running we parse the nodes file directly
@@ -4316,6 +4379,8 @@ static const struct {
{ setrecmasterrole, control_setrecmasterrole, false,  false, Set 
RECMASTER role to on/off, {on|off}},
{ setdbprio,control_setdbprio,false,  false, Set DB 
priority, dbid prio:1-3},
{ getdbprio,control_getdbprio,false,  false, Get DB 
priority, dbid},
+   { msglisten,control_msglisten,false,  false, Listen 
on a srvid port for messages, msg srvid},
+   { msgsend,  control_msgsend,  false,  false, Send a message 
to srvid, srvid message},
 };
 
 /*


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated

2010-02-03 Thread Jelmer Vernooij
The branch, master has been updated
   via  bb83ffd... net: Fix python 2.4 compatibility.
  from  e00e6a2... s3: Simplify the code a bit: Catch (len==0) early

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


- Log -
commit bb83ffdc21a05e7b1d47e34400a466aa1ba88793
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Feb 3 23:55:58 2010 +0100

net: Fix python 2.4 compatibility.

---

Summary of changes:
 source4/utils/net/net.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c
index 2d45a4b..3709b0a 100644
--- a/source4/utils/net/net.c
+++ b/source4/utils/net/net.c
@@ -52,6 +52,11 @@
 #include auth/credentials/credentials.h
 #include scripting/python/modules.h
 
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2  PY_MINOR_VERSION  5
+typedef int Py_ssize_t;
+#endif
+
 static PyObject *py_tuple_from_argv(int argc, const char *argv[])
 {
PyObject *l;


-- 
Samba Shared Repository


[SCM] CTDB repository - branch master updated - ctdb-1.0.113-69-g59ba5d7

2010-02-03 Thread Ronnie Sahlberg
The branch, master has been updated
   via  59ba5d7f80e0465e5076533374fb9ee862ed7bb6 (commit)
  from  8c89aac20260dc7f3746e29fe99f17422a77cb88 (commit)

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


- Log -
commit 59ba5d7f80e0465e5076533374fb9ee862ed7bb6
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Thu Feb 4 09:54:06 2010 +1100

We only queued up to 1000 packets per queue before we start dropping
packets, to avoid the queue to grow excessively if smbd has blocked.

This could cause traverse packets to become discarded in case the main
smbd daemon does a traverse of a database while there is a recovery
(sending a erconfigured message to smbd, causing an avalanche of unlock
messages to be sent across the cluster.)

This avalance of messages could cause also the tranversal message to be
discarded  causing the main smbd process to hang indefinitely waiting
for the traversal message that will never arrive.

Bump the maximum queue length before starting to discard messages from
1000 to 100 and at the same time rework the queueing slightly so we
can append messages cheaply to the queue instead of walking the list
from head to tail every time.

---

Summary of changes:
 common/ctdb_io.c   |   19 ++-
 server/ctdb_tunables.c |2 +-
 2 files changed, 19 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common/ctdb_io.c b/common/ctdb_io.c
index 28830d5..47681d2 100644
--- a/common/ctdb_io.c
+++ b/common/ctdb_io.c
@@ -46,6 +46,12 @@ struct ctdb_queue {
struct ctdb_context *ctdb;
struct ctdb_partial partial; /* partial input packet */
struct ctdb_queue_pkt *out_queue;
+   /* This field is used to track the last added item so we
+  can append new items to the end cheaply.
+  This relies of that items are always appended to the tail
+  and that when reamoving items we only remove the head.
+   */
+   struct ctdb_queue_pkt *out_queue_last_added;
uint32_t out_queue_length;
struct fd_event *fde;
int fd;
@@ -294,7 +300,18 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t 
*data, uint32_t length)
EVENT_FD_WRITEABLE(queue-fde);
}
 
-   DLIST_ADD_END(queue-out_queue, pkt, struct ctdb_queue_pkt *);
+   /* This relies on that when adding items to the queue, we always add
+  them to the tail and that when removing items we only remove
+  the head of queue item.
+  The last_added item thus allows non n^2 behaviour when appending to
+  very long queues.
+   */
+   if (queue-out_queue == NULL) {
+   DLIST_ADD(queue-out_queue, pkt);
+   } else {
+   DLIST_ADD_END(queue-out_queue_last_added, pkt, struct 
ctdb_queue_pkt *);
+   }
+   queue-out_queue_last_added = pkt;
queue-out_queue_length++;
 
if (queue-ctdb-tunable.verbose_memory_names != 0) {
diff --git a/server/ctdb_tunables.c b/server/ctdb_tunables.c
index e75dcbd..cca270b 100644
--- a/server/ctdb_tunables.c
+++ b/server/ctdb_tunables.c
@@ -62,7 +62,7 @@ static const struct {
{ VacuumLimit,   5000,  offsetof(struct ctdb_tunable, 
vacuum_limit) },
{ VacuumMinInterval,   60,  offsetof(struct ctdb_tunable, 
vacuum_min_interval) },
{ VacuumMaxInterval,  600,  offsetof(struct ctdb_tunable, 
vacuum_max_interval) },
-   { MaxQueueDropMsg,  1000,  offsetof(struct ctdb_tunable, 
max_queue_depth_drop_msg) },
+   { MaxQueueDropMsg,  100, offsetof(struct ctdb_tunable, 
max_queue_depth_drop_msg) },
{ UseStatusEvents, 0,  offsetof(struct ctdb_tunable, 
use_status_events_for_monitoring) },
{ AllowUnhealthyDBRead, 0,  offsetof(struct ctdb_tunable, 
allow_unhealthy_db_read) }
 };


-- 
CTDB repository


[SCM] CTDB repository - branch master updated - ctdb-1.0.113-70-gc3eec8f

2010-02-03 Thread Ronnie Sahlberg
The branch, master has been updated
   via  c3eec8f10764a647106087099eeb47b7196f7aac (commit)
  from  59ba5d7f80e0465e5076533374fb9ee862ed7bb6 (commit)

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


- Log -
commit c3eec8f10764a647106087099eeb47b7196f7aac
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Thu Feb 4 10:03:21 2010 +1100

When trying to enable/disable a node.
Check if the node is already enabled/disabled and log an information
message if so.

---

Summary of changes:
 tools/ctdb.c |   20 
 1 files changed, 20 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/tools/ctdb.c b/tools/ctdb.c
index 9d6547c..1c760d4 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -2085,6 +2085,16 @@ static int control_disable(struct ctdb_context *ctdb, 
int argc, const char **arg
int ret;
struct ctdb_node_map *nodemap=NULL;
 
+   /* check if the node is already disabled */
+   if (ctdb_ctrl_getnodemap(ctdb, TIMELIMIT(), CTDB_CURRENT_NODE, ctdb, 
nodemap) != 0) {
+   DEBUG(DEBUG_ERR, (Unable to get nodemap from local node\n));
+   exit(10);
+   }
+   if (nodemap-nodes[options.pnn].flags  
NODE_FLAGS_PERMANENTLY_DISABLED) {
+   DEBUG(DEBUG_ERR,(Node %d is already disabled.\n, 
options.pnn));
+   return 0;
+   }
+
do {
ret = ctdb_ctrl_modflags(ctdb, TIMELIMIT(), options.pnn, 
NODE_FLAGS_PERMANENTLY_DISABLED, 0);
if (ret != 0) {
@@ -2119,6 +2129,16 @@ static int control_enable(struct ctdb_context *ctdb, int 
argc, const char **argv
 
struct ctdb_node_map *nodemap=NULL;
 
+   /* check if the node is already enabled */
+   if (ctdb_ctrl_getnodemap(ctdb, TIMELIMIT(), CTDB_CURRENT_NODE, ctdb, 
nodemap) != 0) {
+   DEBUG(DEBUG_ERR, (Unable to get nodemap from local node\n));
+   exit(10);
+   }
+   if (!(nodemap-nodes[options.pnn].flags  
NODE_FLAGS_PERMANENTLY_DISABLED)) {
+   DEBUG(DEBUG_ERR,(Node %d is already enabled.\n, options.pnn));
+   return 0;
+   }
+
do {
ret = ctdb_ctrl_modflags(ctdb, TIMELIMIT(), options.pnn, 0, 
NODE_FLAGS_PERMANENTLY_DISABLED);
if (ret != 0) {


-- 
CTDB repository


[SCM] CTDB repository - branch master updated - e459a947395e9aba50eba6cbf8f13ee803856314

2010-02-03 Thread Andrew Tridgell
The branch, master has been updated
  discards  d5eaddff89ab3a5f75b2db7708ebbce5a0d213a5 (commit)
  discards  4232cfcbb730b9af2b693a518000693b7b4de90d (commit)
  discards  4274e07ed22f63c473d484a8d9345473b0aa9afd (commit)
   via  e459a947395e9aba50eba6cbf8f13ee803856314 (commit)
   via  a46cb23168e83f818097c5f66bec7edee501250b (commit)
   via  46cd20ebe9b0933ba663dad342661a7dc0a3926f (commit)
  from  d5eaddff89ab3a5f75b2db7708ebbce5a0d213a5 (commit)

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


- Log -
commit e459a947395e9aba50eba6cbf8f13ee803856314
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:36:14 2010 +1100

ctdb: when we fill the client packet queue we need to drop the client

We can't just drop packets to the list, as those packets could be part
of the core protocol the client is using. This happens (for example)
when Samba is doing a traverse. If we drop a traverse packet then
Samba hangs indefinately. We are better off dropping the ctdb socket
to Samba.

commit a46cb23168e83f818097c5f66bec7edee501250b
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:14:18 2010 +1100

ctdb: move ctdb_io.c to use TLIST_*() macros

This will make large packet queues much more efficient

commit 46cd20ebe9b0933ba663dad342661a7dc0a3926f
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:13:49 2010 +1100

util: added TLIST_*() macros

The TLIST_*() macros are like the DLIST_*() macros, but take both a
head and tail pointer for the list. This means that adding an element
to the end of the list is efficient (it doesn't need to walk the
list).

We should move all uses of the DLIST_*() macros which use
DLIST_ADD_END() to use the TLIST_*() macros instead.

---

Summary of changes:
 lib/util/dlinklist.h |   12 
 1 files changed, 8 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/dlinklist.h b/lib/util/dlinklist.h
index c06845e..c877537 100644
--- a/lib/util/dlinklist.h
+++ b/lib/util/dlinklist.h
@@ -136,10 +136,14 @@ do { \
 /* TLIST_ADD_END adds elements to the end of the list. */
 #define TLIST_ADD_END(listhead, listtail, p) \
 do { \
-   DLIST_ADD(listtail, p); \
-   (listtail) = (p); \
-   if (NULL == (listhead)) { \
-   (listhead) = (p); \
+   if ((listtail) == NULL) { \
+   DLIST_ADD(listhead, p); \
+   (listtail) = (listhead); \
+   } else { \
+   (listtail)-next = (p); \
+   (p)-prev = (listtail); \
+   (p)-next = NULL; \
+   (listtail) = (p); \
} \
 } while (0)
 


-- 
CTDB repository


[SCM] CTDB repository - branch master updated - 2e0deb561088c0b162e9c6e50a47c63fb831ee52

2010-02-03 Thread Andrew Tridgell
The branch, master has been updated
  discards  e459a947395e9aba50eba6cbf8f13ee803856314 (commit)
  discards  a46cb23168e83f818097c5f66bec7edee501250b (commit)
  discards  46cd20ebe9b0933ba663dad342661a7dc0a3926f (commit)
   via  2e0deb561088c0b162e9c6e50a47c63fb831ee52 (commit)
   via  ba656785f9685954bf84ff2ff6ec51cc59c91f54 (commit)
   via  d14f81fab7d62eee1af2a7bfbac04b6926ca60c3 (commit)
  from  e459a947395e9aba50eba6cbf8f13ee803856314 (commit)

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


- Log -
commit 2e0deb561088c0b162e9c6e50a47c63fb831ee52
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:36:14 2010 +1100

ctdb: when we fill the client packet queue we need to drop the client

We can't just drop packets to the list, as those packets could be part
of the core protocol the client is using. This happens (for example)
when Samba is doing a traverse. If we drop a traverse packet then
Samba hangs indefinately. We are better off dropping the ctdb socket
to Samba.

commit ba656785f9685954bf84ff2ff6ec51cc59c91f54
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:14:18 2010 +1100

ctdb: move ctdb_io.c to use TLIST_*() macros

This will make large packet queues much more efficient

commit d14f81fab7d62eee1af2a7bfbac04b6926ca60c3
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:13:49 2010 +1100

util: added TLIST_*() macros

The TLIST_*() macros are like the DLIST_*() macros, but take both a
head and tail pointer for the list. This means that adding an element
to the end of the list is efficient (it doesn't need to walk the
list).

We should move all uses of the DLIST_*() macros which use
DLIST_ADD_END() to use the TLIST_*() macros instead.

---

Summary of changes:
 common/ctdb_io.c |2 +-
 lib/util/dlinklist.h |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common/ctdb_io.c b/common/ctdb_io.c
index 64e1872..3fa784d 100644
--- a/common/ctdb_io.c
+++ b/common/ctdb_io.c
@@ -194,7 +194,7 @@ static void queue_io_write(struct ctdb_queue *queue)
if (n == -1  errno != EAGAIN  errno != EWOULDBLOCK) {
if (pkt-length != pkt-full_length) {
/* partial packet sent - we have to drop it */
-   TLIST_REMOVE(queue-out_queue, 
queue-out_queue_tail, 
+   TLIST_REMOVE(queue-out_queue, 
queue-out_queue_tail,
 pkt);
queue-out_queue_length--;
talloc_free(pkt);
diff --git a/lib/util/dlinklist.h b/lib/util/dlinklist.h
index c877537..44747d6 100644
--- a/lib/util/dlinklist.h
+++ b/lib/util/dlinklist.h
@@ -110,11 +110,11 @@ do { \
} \
 } while (0)
 
-/* 
+/*
The TLIST_*() macros are meant for when you have two list pointers,
one pointing at the head of the list and one pointing at the tail
of the list. This makes the common case of adding to the end of the
-   list and removing from the front of the list efficient 
+   list and removing from the front of the list efficient
 
TLIST stands for tailed list
 


-- 
CTDB repository


[SCM] CTDB repository - branch 1.0.112 updated - ctdb-1.0.111-23-g82f2ed8

2010-02-03 Thread Ronnie Sahlberg
The branch, 1.0.112 has been updated
   via  82f2ed827caab8999cb3f958c70821a23490fdde (commit)
   via  ac885788678255f0c8a091f88ee4d440edf818a9 (commit)
   via  a781f05f9b80e288ae43ca16f109890942937e62 (commit)
   via  3ec469339e56f5221960ac5b3a69bf8fb553b8f5 (commit)
  from  4af34ca1bdb4895c2dd1ec280ef14cffab7fc815 (commit)

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


- Log -
commit 82f2ed827caab8999cb3f958c70821a23490fdde
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:36:14 2010 +1100

ctdb: when we fill the client packet queue we need to drop the client

We can't just drop packets to the list, as those packets could be part
of the core protocol the client is using. This happens (for example)
when Samba is doing a traverse. If we drop a traverse packet then
Samba hangs indefinately. We are better off dropping the ctdb socket
to Samba.

commit ac885788678255f0c8a091f88ee4d440edf818a9
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:14:18 2010 +1100

ctdb: move ctdb_io.c to use TLIST_*() macros

This will make large packet queues much more efficient

commit a781f05f9b80e288ae43ca16f109890942937e62
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:13:49 2010 +1100

util: added TLIST_*() macros

The TLIST_*() macros are like the DLIST_*() macros, but take both a
head and tail pointer for the list. This means that adding an element
to the end of the list is efficient (it doesn't need to walk the
list).

We should move all uses of the DLIST_*() macros which use
DLIST_ADD_END() to use the TLIST_*() macros instead.

commit 3ec469339e56f5221960ac5b3a69bf8fb553b8f5
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Thu Feb 4 09:54:06 2010 +1100

We only queued up to 1000 packets per queue before we start dropping
packets, to avoid the queue to grow excessively if smbd has blocked.

This could cause traverse packets to become discarded in case the main
smbd daemon does a traverse of a database while there is a recovery
(sending a erconfigured message to smbd, causing an avalanche of unlock
messages to be sent across the cluster.)

This avalance of messages could cause also the tranversal message to be
discarded  causing the main smbd process to hang indefinitely waiting
for the traversal message that will never arrive.

Bump the maximum queue length before starting to discard messages from
1000 to 100 and at the same time rework the queueing slightly so we
can append messages cheaply to the queue instead of walking the list
from head to tail every time.

---

Summary of changes:
 common/ctdb_io.c   |   10 ++
 lib/util/dlinklist.h   |   46 ++
 server/ctdb_daemon.c   |   17 -
 server/ctdb_tunables.c |2 +-
 4 files changed, 65 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common/ctdb_io.c b/common/ctdb_io.c
index 28830d5..3fa784d 100644
--- a/common/ctdb_io.c
+++ b/common/ctdb_io.c
@@ -45,7 +45,7 @@ struct ctdb_queue_pkt {
 struct ctdb_queue {
struct ctdb_context *ctdb;
struct ctdb_partial partial; /* partial input packet */
-   struct ctdb_queue_pkt *out_queue;
+   struct ctdb_queue_pkt *out_queue, *out_queue_tail;
uint32_t out_queue_length;
struct fd_event *fde;
int fd;
@@ -194,7 +194,8 @@ static void queue_io_write(struct ctdb_queue *queue)
if (n == -1  errno != EAGAIN  errno != EWOULDBLOCK) {
if (pkt-length != pkt-full_length) {
/* partial packet sent - we have to drop it */
-   DLIST_REMOVE(queue-out_queue, pkt);
+   TLIST_REMOVE(queue-out_queue, 
queue-out_queue_tail,
+pkt);
queue-out_queue_length--;
talloc_free(pkt);
}
@@ -213,7 +214,7 @@ static void queue_io_write(struct ctdb_queue *queue)
return;
}
 
-   DLIST_REMOVE(queue-out_queue, pkt);
+   TLIST_REMOVE(queue-out_queue, queue-out_queue_tail, pkt);
queue-out_queue_length--;
talloc_free(pkt);
}
@@ -294,7 +295,8 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t 
*data, uint32_t length)
EVENT_FD_WRITEABLE(queue-fde);
}
 
-   DLIST_ADD_END(queue-out_queue, pkt, struct ctdb_queue_pkt *);
+   TLIST_ADD_END(queue-out_queue, queue-out_queue_tail, pkt);
+
queue-out_queue_length++;
 
if (queue-ctdb-tunable.verbose_memory_names != 0) {
diff 

[SCM] CTDB repository - branch master updated - ctdb-1.0.113-73-ga7a86da

2010-02-03 Thread Ronnie Sahlberg
The branch, master has been updated
   via  a7a86dafa4d88a6bbc6a71b77ed79a178fd802a6 (commit)
   via  e3f198056230073135ea6354bbef30c5bb022f8f (commit)
   via  2d05a71349e9ade869b62cf261c2a9a21818a474 (commit)
  from  c3eec8f10764a647106087099eeb47b7196f7aac (commit)

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


- Log -
commit a7a86dafa4d88a6bbc6a71b77ed79a178fd802a6
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:36:14 2010 +1100

ctdb: when we fill the client packet queue we need to drop the client

We can't just drop packets to the list, as those packets could be part
of the core protocol the client is using. This happens (for example)
when Samba is doing a traverse. If we drop a traverse packet then
Samba hangs indefinately. We are better off dropping the ctdb socket
to Samba.

commit e3f198056230073135ea6354bbef30c5bb022f8f
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:14:18 2010 +1100

ctdb: move ctdb_io.c to use TLIST_*() macros

This will make large packet queues much more efficient

commit 2d05a71349e9ade869b62cf261c2a9a21818a474
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 4 14:13:49 2010 +1100

util: added TLIST_*() macros

The TLIST_*() macros are like the DLIST_*() macros, but take both a
head and tail pointer for the list. This means that adding an element
to the end of the list is efficient (it doesn't need to walk the
list).

We should move all uses of the DLIST_*() macros which use
DLIST_ADD_END() to use the TLIST_*() macros instead.

---

Summary of changes:
 common/ctdb_io.c |   27 ++-
 lib/util/dlinklist.h |   46 ++
 server/ctdb_daemon.c |   17 -
 3 files changed, 64 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common/ctdb_io.c b/common/ctdb_io.c
index 47681d2..3fa784d 100644
--- a/common/ctdb_io.c
+++ b/common/ctdb_io.c
@@ -45,13 +45,7 @@ struct ctdb_queue_pkt {
 struct ctdb_queue {
struct ctdb_context *ctdb;
struct ctdb_partial partial; /* partial input packet */
-   struct ctdb_queue_pkt *out_queue;
-   /* This field is used to track the last added item so we
-  can append new items to the end cheaply.
-  This relies of that items are always appended to the tail
-  and that when reamoving items we only remove the head.
-   */
-   struct ctdb_queue_pkt *out_queue_last_added;
+   struct ctdb_queue_pkt *out_queue, *out_queue_tail;
uint32_t out_queue_length;
struct fd_event *fde;
int fd;
@@ -200,7 +194,8 @@ static void queue_io_write(struct ctdb_queue *queue)
if (n == -1  errno != EAGAIN  errno != EWOULDBLOCK) {
if (pkt-length != pkt-full_length) {
/* partial packet sent - we have to drop it */
-   DLIST_REMOVE(queue-out_queue, pkt);
+   TLIST_REMOVE(queue-out_queue, 
queue-out_queue_tail,
+pkt);
queue-out_queue_length--;
talloc_free(pkt);
}
@@ -219,7 +214,7 @@ static void queue_io_write(struct ctdb_queue *queue)
return;
}
 
-   DLIST_REMOVE(queue-out_queue, pkt);
+   TLIST_REMOVE(queue-out_queue, queue-out_queue_tail, pkt);
queue-out_queue_length--;
talloc_free(pkt);
}
@@ -300,18 +295,8 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t 
*data, uint32_t length)
EVENT_FD_WRITEABLE(queue-fde);
}
 
-   /* This relies on that when adding items to the queue, we always add
-  them to the tail and that when removing items we only remove
-  the head of queue item.
-  The last_added item thus allows non n^2 behaviour when appending to
-  very long queues.
-   */
-   if (queue-out_queue == NULL) {
-   DLIST_ADD(queue-out_queue, pkt);
-   } else {
-   DLIST_ADD_END(queue-out_queue_last_added, pkt, struct 
ctdb_queue_pkt *);
-   }
-   queue-out_queue_last_added = pkt;
+   TLIST_ADD_END(queue-out_queue, queue-out_queue_tail, pkt);
+
queue-out_queue_length++;
 
if (queue-ctdb-tunable.verbose_memory_names != 0) {
diff --git a/lib/util/dlinklist.h b/lib/util/dlinklist.h
index f018d87..44747d6 100644
--- a/lib/util/dlinklist.h
+++ b/lib/util/dlinklist.h
@@ -110,4 +110,50 @@ do { \
} \
 } while (0)
 
+/*
+   The TLIST_*() macros are meant for when you have two list pointers,
+   one pointing at the head of the list 

Build status as of Thu Feb 4 07:00:04 2010

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

--- /home/build/master/cache/broken_results.txt.old 2010-02-03 
00:00:05.0 -0700
+++ /home/build/master/cache/broken_results.txt 2010-02-04 00:00:05.0 
-0700
@@ -1,21 +1,21 @@
-Build status as of Wed Feb  3 07:00:04 2010
+Build status as of Thu Feb  4 07:00:04 2010
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   0  0  0 
-ldb  20 20 0 
-libreplace   19 8  0 
+ccache   35 6  0 
+ldb  35 34 0 
+libreplace   35 12 0 
 lorikeet 0  0  0 
-pidl 14 14 0 
-ppp  0  0  0 
-rsync1  0  0 
+pidl 25 23 0 
+ppp  17 1  0 
+rsync35 11 0 
 samba-docs   0  0  0 
 samba-web0  0  0 
-samba_3_current 0  0  0 
-samba_3_master 17 16 1 
-samba_3_next 0  0  0 
-samba_4_0_test 20 20 1 
-talloc   19 3  0 
-tdb  18 8  0 
+samba_3_current 33 32 1 
+samba_3_master 33 31 5 
+samba_3_next 29 28 4 
+samba_4_0_test 35 34 1 
+talloc   35 12 0 
+tdb  33 21 0