Re: [Samba] FreeBSD 7.2 domain member problem - partially SOLVED

2009-11-23 Thread Daniel O'Connor
On Mon, 23 Nov 2009, Diego Zuccato wrote:
  The problem with not working pw user / group show -a or getent
  passwd / group was that nss_winbind.so was not where it supposed
  to. To correct this I used:
  ln -s /usr/local/lib/nss_winbind.so.1 /usr/lib/
  ln -s /usr/local/lib/nss_winbind.so.1 /usr/lib/nss_winbind.so.2

 That's really ugly and shouldn't be needed on ANY distro. And it
 seems you're looking for troubles (.1 and .2 IIRC have different
 ABI).

Indeed, that certainly shouldn't be necessary..

I use nss/pam_ldap (on FreeBSD) and it works just fine living 
in /usr/local/lib as you'd expect.

I don't know why you'd need nss_winbind.so.2 either.

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
The nice thing about standards is that there
are so many of them to choose from.
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


signature.asc
Description: This is a digitally signed message part.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] probleme samba login domain

2009-11-23 Thread azzouz

azzouz wrote:

Hi,

Until now I can no longer connect to my samba domain.
I don't know what happened.

What this ( below in the log) means:

dump workgroup on subnet  UNICAST_SUBNET: netmask= 192.168.10.253:
Nov 22 13:20:30 localhost nmbd.bis[3275]:   #*011ETUDIANT(1) current 
master browser = UNKNOWN


*Some help ?

here is the log:



announce_myself_to_domain_master_browser: t (1258892410) - 
last(1258891660)  900
Nov 22 13:20:20 localhost nmbd.bis[3275]: [2009/11/22 13:20:20,  4] 
nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(170)
Nov 22 13:20:20 localhost nmbd.bis[3275]:   find_workgroup_on_subnet: 
workgroup search for ETUDIANT on subnet UNICAST_SUBNET: found.
Nov 22 13:20:20 localhost nmbd.bis[3275]: [2009/11/22 13:20:20,  4] 
nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(170)
Nov 22 13:20:20 localhost nmbd.bis[3275]:   find_workgroup_on_subnet: 
workgroup search for ETUDIANT on subnet UNICAST_SUBNET: found.
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30,  4] 
nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(170)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   find_workgroup_on_subnet: 
workgroup search for ETUDIANT on subnet 192.168.10.253: found.
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 10] 
nmbd/nmbd_sendannounce.c:announce_myself_to_domain_master_browser(381)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   
announce_myself_to_domain_master_browser: t (1258892420) - 
last(1258891660)  900
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30,  4] 
nmbd/nmbd_workgroupdb.c:dump_workgroups(281)

Nov 22 13:20:30 localhost nmbd.bis[3275]:   dump_workgroups()
Nov 22 13:20:30 localhost nmbd.bis[3275]:dump workgroup on subnet  
192.168.10.253: netmask=  255.255.255.0:
Nov 22 13:20:30 localhost nmbd.bis[3275]:   #011ETUDIANT(1) current 
master browser = PALMIER
Nov 22 13:20:30 localhost nmbd.bis[3275]:   #011#011PALMIER 400c9b0b 
(bouleau server (Samba, Ubuntu))
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30,  4] 
nmbd/nmbd_workgroupdb.c:dump_workgroups(281)

Nov 22 13:20:30 localhost nmbd.bis[3275]:   dump_workgroups()
Nov 22 13:20:30 localhost nmbd.bis[3275]:dump workgroup on subnet  
UNICAST_SUBNET: netmask= 192.168.10.253:
Nov 22 13:20:30 localhost nmbd.bis[3275]:   #011ETUDIANT(1) current 
master browser = UNKNOWN
Nov 22 13:20:30 localhost nmbd.bis[3275]:   #011#011PALMIER 40099b0b 
(bouleau server (Samba, Ubuntu))
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 18] 
lib/util_tdb.c:tdb_unpack(655)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   tdb_unpack(wbddd, 35) 
- 31
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 18] 
lib/util_tdb.c:tdb_unpack(655)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   tdb_unpack(wbddd, 35) 
- 31
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 18] 
lib/util_tdb.c:tdb_unpack(655)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   tdb_unpack(wbddd, 35) 
- 31
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 18] 
lib/util_tdb.c:tdb_unpack(655)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   tdb_unpack(wbddd, 35) 
- 31
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 18] 
lib/util_tdb.c:tdb_unpack(655)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   tdb_unpack(wbddd, 35) 
- 31
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 18] 
lib/util_tdb.c:tdb_unpack(655)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   tdb_unpack(wbddd, 35) 
- 31
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 18] 
lib/util_tdb.c:tdb_unpack(655)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   tdb_unpack(wbddd, 35) 
- 31
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 18] 
lib/util_tdb.c:tdb_unpack(655)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   tdb_unpack(wbddd, 35) 
- 31
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 18] 
lib/util_tdb.c:tdb_unpack(655)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   tdb_unpack(wbddd, 35) 
- 31
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 18] 
lib/util_tdb.c:tdb_unpack(655)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   tdb_unpack(wbddd, 35) 
- 31
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30, 18] 
lib/util_tdb.c:tdb_unpack(655)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   tdb_unpack(wbddd, 35) 
- 31
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30,  4] 
nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(170)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   find_workgroup_on_subnet: 
workgroup search for ETUDIANT on subnet UNICAST_SUBNET: found.
Nov 22 13:20:30 localhost nmbd.bis[3275]: [2009/11/22 13:20:30,  4] 
nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(170)
Nov 22 13:20:30 localhost nmbd.bis[3275]:   find_workgroup_on_subnet: 
workgroup search for ETUDIANT on subnet UNICAST_SUBNET: found.
Nov 22 13:20:30 localhost nmbd.bis[3439]: [2009/11/22 13:20:30,  4] 

Re: [Samba] FreeBSD 7.2 domain member problem - partially SOLVED

2009-11-23 Thread Ivo Karabojkov

Without links (maybe just 1 is enough, I'll test) no resolution to the OS
occurred at all - users and groups were visible via wbinfo, but not with
getent or pw.

With RID I tried a lot of combinations (including shown by you or just
idmap backend = rid:DOMAIN:1-2) with totally no success.

I should try this again with linked .so.1 library and I'll write back



Diego Zuccato-2 wrote:
 
 Ivo Karabojkov wrote:
 
 I was totally unable to get idmap_rid working! So I am using the default
 IDMAP backend - tdb.
 Not good if you need that the same user receives the same UID on 
 different machines.
 
 The problem with not working pw user / group show -a or getent passwd /
 group was that nss_winbind.so was not where it supposed to. To correct
 this
 I used:
 ln -s /usr/local/lib/nss_winbind.so.1 /usr/lib/
 ln -s /usr/local/lib/nss_winbind.so.1 /usr/lib/nss_winbind.so.2 
 That's really ugly and shouldn't be needed on ANY distro. And it seems 
 you're looking for troubles (.1 and .2 IIRC have different ABI).
 
 Now all my users and groups are visible with pw or getent!
 rid backend would give predictable sid - uid/gid mapping, with this
 solution mapping changes every time server is joined to AD domain. But I
 failed setting it up - it seems idmap_rid does not map anything...
 
 If someone may help with better solution I will be grateful.
 In my config I map users in two domains to different UID/GID values with 
 the following config:
  winbind uid = 10-1
  winbind gid = 10-1
 
  idmap config DOM1:backend = rid
  idmap config DOM1:base_rid  = 500
  idmap config DOM1:range = 10 - 4999
  idmap config DOM2:backend = rid
  idmap config DOM2:base_rid  = 500
  idmap config DOM2:range = 5000 - 
 
 Maybe you need just:
  winbind uid = 10-1
  winbind gid = 10-1
  idmap config backend = rid
 
 And be sure to testparm -v any changes to smb.conf
 
 -- 
 Diego Zuccato
 Servizi Informatici
 Dip. di Astronomia - Università di Bologna
 Via Ranzani, 1 - 40126 Bologna - Italy
 tel.: +39 051 20 95786
 mail: diego.zucc...@unibo.it
 -- 
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba
 
 

-- 
View this message in context: 
http://old.nabble.com/FreeBSD-7.2-domain-member-problem-tp26204285p26476164.html
Sent from the Samba - General mailing list archive at Nabble.com.

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

[Samba] Samba 3.0.33/3.2.15 AD joined slow initial connect with LDAP backend

2009-11-23 Thread Hoogstraten, Ton
I'm hoping someone can help me with the following. I currently have 2
Samba fileservers version 3.0.23d joined to our corporate Active
Directory. Clients currently are Windows XP. I'm asked to prepare to
migrate XP to Windows 7. From testing it looks like Samba 3.0.23d is not
compatible with Windows 7. Therefor I started testing with the latest
RHEL5 version 3.0.33-3.1e.el5 on RHEL5. Enabling 'client ntlmv2 auth =
yes' seems to be key to make this work for Windows 7.

 

However on the test 3.0.33 system I'm experiencing a problem that I
can't solve. The initial connect from either a XP or 7 client is slow
when not in the Samba cache (even when changing the config to the same
as the production server for XP, removing the ntlmv2 option). It depends
on the user connecting how slow. For example my own user account
requires an average of 40 seconds before displaying the Samba shares on
a fresh connect. The 3.0.23d server remains fast talking to same domain
controllers.

 

The following settings I think I got from the Redhat Knowledgebase for
performance make no difference in this matter. They have been enabled
and disabled with no effect.

 

client schannel = no

client use spnego = no

server signing = auto

large readwrite = no

 

The client spnego setting however does get in your way when trying to
join a system to Active Directory when set to 'no'!

 

I think the explanation for the difference in slowness per user is based
on the group membership of that user. For example an user that is only a
member of Domain Users takes about 10 seconds to display the shares
(still to slow in my opinion). For testing purpose I've reduced the
cache for winbind and idmap so the server needs to keep looking up the
user and SID information.

 

idmap cache time = 120

winbind cache time = 120

 

The SID to UID/GID mappings are stored in an openldap database so both
servers have the same UID/GID mappings. For the test server this is
running on the localhost. I have updated the backend config to the
following on the test server to use the new idmap_ldap setup.

 

idmap domains = ALLDOMAINS

idmap config ALLDOMAINS:default  = yes

idmap config ALLDOMAINS:backend  = ldap

idmap config ALLDOMAINS:ldap_base_dn =
ou=Idmap,dc=example,dc=com

idmap config ALLDOMAINS:ldap_user_dn =
cn=Manager,dc=example,dc=com

idmap config ALLDOMAINS:ldap_url = ldap://127.0.0.1/

idmap config ALLDOMAINS:range= 1 - 200

 

#idmap backend where we write new entries:

idmap alloc backend = ldap

idmap alloc config:ldap_base_dn = ou=Idmap,dc=example,dc=com

idmap alloc config:ldap_user_dn = cn=Manager,dc=example,dc=com

idmap alloc config:ldap_url = ldap://127.0.0.1/

idmap alloc config:range= 1 - 200

 

The 'password server' option is set to a local Domain Controller. either
by DNS name or IP. This seems to be making no difference. Additional the
DNS name is als stored in /etc/hosts. I'm trying to keep the server
connecting on the local LAN instead of wandering to the nearest server
for example in Germany.

 

When I set the winbind logging to level 10 I see the server connecting
to the Domain Controller LDAP and retrieve the SID information and store
it in the local TDB files. Depending on the user more SIDs needs to be
resolved making the process slower.

 

Does anybody know what could be causing this? Has the caching method
changed since version 3.0.23d? I can try increasing the caching to cache
the information for days to try and reduce the queries for the Domain
Controller. But there must be a reason why the default settings are kept
low and I don't know if this will bring any other side affects.

 

It is worth to mention that the production server started when we had a
NT domain. In order to migrate we had double SID's resolving to single
UID/GIDs during the move between domains. When testing this with version
3.0.33 this could crash and make the winbind daemon coredump. I have
cleaned out all duplicate entries since the NT domain is gone now.

 

Can it be that I'm missing Indexes/config on my idmap openldap config
from version 3.0.23d? Does anybody know how I can optimize that if
possible?

 

Currently I have the following in my slapd.conf:

index sambaSID  eq

index sambaPrimaryGroupSID  eq

index sambaDomainName   eq

 

Last I can mentioned that upgrading the server to Samba version 3.2.15
to see if that solves anything is also not working. I have 2 test
servers now. One being version 3.0.33 and one being 3.2.15 displaying
the same problem. When connecting with empty cache the lookups are slow.

 

Kind regards,

 

Ton

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


Re: [Samba] FreeBSD 7.2 domain member problem - partially SOLVED

2009-11-23 Thread Ivo Karabojkov

I am sure it should work without these strange links I've made.
I don't know what is the problem. I use ports, just to keep my installations
more standard.

May you point me a good manual how to set up nss/ldap with Samba? 


Daniel O'Connor-2 wrote:
 
 Indeed, that certainly shouldn't be necessary..
 
 I use nss/pam_ldap (on FreeBSD) and it works just fine living 
 in /usr/local/lib as you'd expect.
 
 I don't know why you'd need nss_winbind.so.2 either.
  
 

-- 
View this message in context: 
http://old.nabble.com/FreeBSD-7.2-domain-member-problem-tp26204285p26476306.html
Sent from the Samba - General mailing list archive at Nabble.com.

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


[Samba] home directories ask user for password

2009-11-23 Thread Massimo
Hi to all,
I have Samba configured as domain member with winbind and kerberos, I can 
access all share but I have some problem with the home directories because it 
ask me for password.

This is my smb.conf
[global]
workgroup = domain
netbios name = Manufac
server string = Server di rete
comment = server di rete
encrypt passwords = true
realm = DOMAIN..LOCAL
password server = pdc01.domain.local
security = ADS
winbind enum users = yes
winbind enum groups = yes
winbind separator= +
idmap uid = 500-1
idmap gid = 500-1
template shell = /bin/true
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
ldap ssl = no
panic action = /usr/share/samba/panic-action %d
invalid users = root
template homedir = /home/%U
[homes] 
comment = Home Directories
browseable = no
writable = yes
public = no
valid users = DOMAIN/%U
create mode = 0777
directory mode = 0777

I have the home directory created in /home/ with domain user right

Thank you in advance.

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


Re: [Samba] FreeBSD 7.2 domain member problem - partially SOLVED

2009-11-23 Thread Daniel O'Connor
On Mon, 23 Nov 2009, Ivo Karabojkov wrote:
 I am sure it should work without these strange links I've made.
 I don't know what is the problem. I use ports, just to keep my
 installations more standard.

 May you point me a good manual how to set up nss/ldap with Samba?

I used the samba how to guide and googled, the net/smbldap-tools is 
pretty helpful.

That said it wasn't especially simple to setup :(

However I don't use winbind on my FreeBSD machine, I use nss/pam_ldap 
and Samba talks to the LDAP server as well.

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
The nice thing about standards is that there
are so many of them to choose from.
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


signature.asc
Description: This is a digitally signed message part.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Samba 3.0.33/3.2.15 AD joined slow initial connect with LDAP backend

2009-11-23 Thread Hoogstraten, Ton
Diego,

Thank you for your reply. I'm testing with 3.0.33 since that's the latest 
version Redhat is using in RHEL5 (Redhat has the habbit of holding a version 
and do backport patching). The 3.2.x version was marked for production and what 
I saw in FAQ was that the 3.4.x was still to experiment with?

If you mean the 'winbind enum users/groups' setting that has been turned off as 
suggested in the man pages. If activated it could crash a certain role AD 
controller. That's not something I can risk. But would that in normal behaviour 
not fill somekind of cache? If I increase the caching in theory that would 
perhaps reduce the numer of queries required for a user at a given time. I 
don't know if it would be a problem setting this to 3 days so the cache could 
also pass over the weekend. Does not take away why it takes so long to query 
the AD.

What do you mean with:

Looking up group names is really slow (up to a couple of minutes when using id 
user.name or groups user.name).

Is it always slow to query the AD? Would the 3.0.23d server that I need to 
upgrade be using more caching then the later versions by default?

To answer your last question. Yes, the ldap is running on the local system for 
the idmaps. In production I have one samba server running a master ldap idmap 
backend and the other samba server configured as slave.

Kind regards,

Ton


-Original Message-
From: Diego Zuccato [mailto:diego.zucc...@unibo.it] 
Sent: maandag 23 november 2009 12:42
To: Hoogstraten, Ton
Subject: Re: [Samba] Samba 3.0.33/3.2.15 AD joined slow initial connect with 
LDAP backend

Hoogstraten, Ton wrote:

 However on the test 3.0.33 system I'm experiencing a problem that I
Why are you using such an ancient version? What about 3.4.x ?

 I think the explanation for the difference in slowness per user is based
 on the group membership of that user. For example an user that is only a
 member of Domain Users takes about 10 seconds to display the shares
 (still to slow in my opinion). For testing purpose I've reduced the
 cache for winbind and idmap so the server needs to keep looking up the
 user and SID information.
Looking up group names is really slow (up to a couple of minutes when 
using id user.name or groups user.name).

Have you tried playing with enum users/groups ? If activated on large AD 
trees, it could impact performances a lot!

 idmap alloc config:ldap_url = ldap://127.0.0.1/
Are you using a locally running (on localhost!) ldap server?

-- 
Diego Zuccato
Servizi Informatici
Dip. di Astronomia - Università di Bologna
Via Ranzani, 1 - 40126 Bologna - Italy
tel.: +39 051 20 95786
mail: diego.zucc...@unibo.it
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] home directories ask user for password

2009-11-23 Thread Hoogstraten, Ton
Massimo,

Perhaps removing the 'valid users' solves your problem. In theory it can
only display the homedir of the user connecting. The 'homes' share is
translated to the user name. Below if my current config that is working
for me. The preexec that I have is creating the homedir if it does not
exist (Perhaps that may be another possible cause of your error?).
Script is included. Make sure you change $path to your homedir location.
For quota uncomment and change the quota function for a given device.

Regards,

Ton


[homes]
comment = Home Directories
read only = No
browseable = No
root preexec = /etc/samba/homedir.pl %U
create mask = 0664
directory mask = 0775


homedir.pl:

#!/usr/bin/perl -w
use strict;

my $user = shift;
my $path = path to your homedir locations;
my $logfile = /var/log/samba/homedir.log;

if (! -d $path/$user  $user) {

if (my $uid = getpwnam($user)) {

if ((mkdir $path/$user,0750)  (chown $uid, -1,
$path/$user)) { 

open(LOG, $logfile);
my $time = localtime;

print LOG $time: Homedir $path/$user for
uid:$uid created.\n;

#Set default quota for mount points:
#quota($user,15000,/dev/sda);

close(LOG);
}
}
}



sub quota {
my $user = shift;
my $quota = shift;
my $mount = shift;

if (system(/usr/sbin/setquota -u $user 0 $quota 0 0 $mount) ==
0)
{
my $time = localtime;
print LOG $time: Updated quota settings for user $user on
$mount\n;
}

}

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


Re: [Samba] home directories ask user for password

2009-11-23 Thread Massimo
Perhaps removing the 'valid users' solves your problem. In theory it can
only display the homedir of the user connecting. The 'homes' share is
translated to the user name. Below if my current config that is working
for me. The preexec that I have is creating the homedir if it does not
exist (Perhaps that may be another possible cause of your error?).
Script is included. Make sure you change $path to your homedir location.
For quota uncomment and change the quota function for a given device.

Hi Ton, Thank you for the help.
I tryed to set your configuration.
It creates the home directories but I receive access denied, wathching into the 
log I found that it looking for username.dll file but I don't know the matter.
Below the log ...
Bye 
Massimo



[2009/11/23 14:43:05, 0] param/loadparm.c:process_usershare_file(4611)
  process_usershare_file: stat of /var/lib/samba/usershares/massimo.dll failed. 
Permission denied
[2009/11/23 14:43:07, 0] param/loadparm.c:process_usershare_file(4611)
  process_usershare_file: stat of /var/lib/samba/usershares/massimo.dll failed. 
No such file or directory
[2009/11/23 14:43:07, 0] smbd/service.c:make_connection(1200)
  kdgp3fb (10.29.30.1) couldn't find service massimo.dll
[2009/11/23 14:43:07, 0] smbd/service.c:set_current_service(184)
  chdir (/home/massimo) failed
[2009/11/23 14:43:07, 0] param/loadparm.c:process_usershare_file(4611)
  process_usershare_file: stat of /var/lib/samba/usershares/massimo.dll failed. 
Permission denied
[2009/11/23 14:43:09, 0] param/loadparm.c:process_usershare_file(4611)
  process_usershare_file: stat of /var/lib/samba/usershares/massimo.dll failed. 
No such file or directory
[2009/11/23 14:43:09, 0] smbd/service.c:make_connection(1200)
  kdgp3fb (10.29.30.1) couldn't find service massimo.dll
[2009/11/23 14:43:09, 0] smbd/service.c:set_current_service(184)
  chdir (/home/massimo) failed
[2009/11/23 14:43:09, 0] smbd/service.c:set_current_service(184)
  chdir (/home/massimo) failed
[2009/11/23 14:43:09, 0] smbd/service.c:set_current_service(184)
  chdir (/home/massimo) failed
[2009/11/23 14:43:09, 0] smbd/service.c:set_current_service(184)
  chdir (/home/massimo) failed
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Vista laptop in Samba 3.3.4 domain suddenly trying to use roaming profiles?

2009-11-23 Thread David Whitney
Grettings, all

I have a bizarre problem on a laptop in my Samba 3.3.4 domain. This domain
includes a mixture of XP Pro and Vista Ultimate clients.

I had just completed a migration to this new domain (from a Samba 2.2.8a
domain), and all seemed happy and well - machines had rebooted and were
still active in the domain, users were logging in with no problem, shares
were working perfectly - all over the span of a week or so - until last
night.

Trying to log into my wife's laptop (Vista Ultimate) under her account, I
got an odd message that said Your roaming profile was not completely
synchronized. Please contact your administrator. The only problem is I am
*not* using roaming profiles in my Samba domain! And this account had logged
into the domain several times on this laptop with no problem after the
migration.

I looked on the home shares for the particular account, and surely enough
there is the profile.V2 folder indicating what I understand is the attempt
by a Vista box to build a first-time Vista-style roaming profile on my
Samba-defined user share. I logged in under a different account that has
admin privs, and sure enough, it tried to load a roaming profile there, too.
That told me, additionally, that Vista thought this was the first time this
user had logged into that box/domain, which was obviously incorrect. The
profiles for each user that had used until that point were on the machine,
intact.

I've changed the local policy on that box to disallow roaming profiles
expressly, but now the local profiles that had been working just fine are no
longer associated with their proper users, and I'm not sure how to restore
the association (or even if I can). I can browse the machine remotely and
copy the files from that local profile if I have to, but I'd like to avoid
it.
Could the learned folks here offer any suggestions on why this laptop would
suddenly think it was supposed to use roaming profiles on my
non-roaming-profile Samba domain? Is there some mystery setting in smb.conf
I might possibly have set (or perhaps deleted??) that would leave Samba
thinking was trying to use roaming profiles? Based on late-night research, I
expressly set logon path to be blank in smb.conf, which is supposed to
disable Samba roaming profiles. It had not been expressly set before. I have
logged into a desktop box and it worked normally.

Appreciate any thoughts or suggestions. The desktop boxes, so far, seem
unaffected and are working normally. I'm thinking my next step is to copy
the files from the particular profile in question, remove the machine from
the domain, and then rejoin it, but I'm not sure I still won't have the same
problem.

The only other problem I've had in this migration was in getting logon
scripts to work (which I never did), but I don't think this is related to
that issueand the fact that other than scripts the domain was working
fine is what really has me puzzled.

Any thoughts or suggestions appreciated.
-David
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Vista laptop in Samba 3.3.4 domain suddenly trying to use roaming profiles?

2009-11-23 Thread Gaiseric Vandal
This happened to us when we switched from TDB to LDAP backend.   (Samba 
3.03x)   I suspect that for some users sambaProfilePath may have had 
space  character but wasn't actually  null.   For some users we just 
deleted the sambaProfilePath attribute.


You may need to change the profile type on the users computer from 
roaming back to local.  (On XP, right-click My Computer- 
Properties-Advanced-User Profiles.)



Login scripts could be several things
-  share and file permissions for the netlogon directory should 
probably allow everyone read-only.
-  I usually add a pause command in the login script when 
troubleshooting
-  You need to specify the logon script as part of the user's 
account.  (In LDAP, SambaLogonScript attribute  I don't think you can a 
default logon script.



From an XP session, can you go to the netlogon share and run the logon 
script?


On 11/23/09 10:03, David Whitney wrote:

Grettings, all

I have a bizarre problem on a laptop in my Samba 3.3.4 domain. This domain
includes a mixture of XP Pro and Vista Ultimate clients.

I had just completed a migration to this new domain (from a Samba 2.2.8a
domain), and all seemed happy and well - machines had rebooted and were
still active in the domain, users were logging in with no problem, shares
were working perfectly - all over the span of a week or so - until last
night.

Trying to log into my wife's laptop (Vista Ultimate) under her account, I
got an odd message that said Your roaming profile was not completely
synchronized. Please contact your administrator. The only problem is I am
*not* using roaming profiles in my Samba domain! And this account had logged
into the domain several times on this laptop with no problem after the
migration.

I looked on the home shares for the particular account, and surely enough
there is the profile.V2 folder indicating what I understand is the attempt
by a Vista box to build a first-time Vista-style roaming profile on my
Samba-defined user share. I logged in under a different account that has
admin privs, and sure enough, it tried to load a roaming profile there, too.
That told me, additionally, that Vista thought this was the first time this
user had logged into that box/domain, which was obviously incorrect. The
profiles for each user that had used until that point were on the machine,
intact.

I've changed the local policy on that box to disallow roaming profiles
expressly, but now the local profiles that had been working just fine are no
longer associated with their proper users, and I'm not sure how to restore
the association (or even if I can). I can browse the machine remotely and
copy the files from that local profile if I have to, but I'd like to avoid
it.
Could the learned folks here offer any suggestions on why this laptop would
suddenly think it was supposed to use roaming profiles on my
non-roaming-profile Samba domain? Is there some mystery setting in smb.conf
I might possibly have set (or perhaps deleted??) that would leave Samba
thinking was trying to use roaming profiles? Based on late-night research, I
expressly set logon path to be blank in smb.conf, which is supposed to
disable Samba roaming profiles. It had not been expressly set before. I have
logged into a desktop box and it worked normally.

Appreciate any thoughts or suggestions. The desktop boxes, so far, seem
unaffected and are working normally. I'm thinking my next step is to copy
the files from the particular profile in question, remove the machine from
the domain, and then rejoin it, but I'm not sure I still won't have the same
problem.

The only other problem I've had in this migration was in getting logon
scripts to work (which I never did), but I don't think this is related to
that issueand the fact that other than scripts the domain was working
fine is what really has me puzzled.

Any thoughts or suggestions appreciated.
-David
   


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


[Samba] Fwd: Vista laptop in Samba 3.3.4 domain suddenly trying to use roaming profiles?

2009-11-23 Thread David Whitney
 Hi, and thanks for your interest!

I am still using an smbpasswd backend because this is a very small home
network I maintain for my own educational purposes, although I might migrate
to LDAP at some point for the same reason.

I have manually changed the troublesome profile type from roaming to local,
but when I logged back in from that same profile, it switched back to
roaming! The more I read about this bizarre behavior, the more I start to
suspect the possibility of malware or virus, which is what I plan to
investigate tonight.

As far as the logon scripts go, the irony is that the script actually fired
from my admin-prived logon, but could not access/load the right profile
from the local box. They still don't fire from my desktop boxes. Per your
question, I can access and execute the scripts from the desktop with no
problem. Per other sources, it appears that the necessary privs to the
netlogon directory should be 755, (rwxr-xr-x), which is what I have set and
verified.

Again, many thanks for your interest and suggestions.



On Mon, Nov 23, 2009 at 1:16 PM, Gaiseric Vandal
gaiseric.van...@gmail.comwrote:

 This happened to us when we switched from TDB to LDAP backend.   (Samba
 3.03x)   I suspect that for some users sambaProfilePath may have had space
  character but wasn't actually  null.   For some users we just deleted the
 sambaProfilePath attribute.

 You may need to change the profile type on the users computer from roaming
 back to local.  (On XP, right-click My Computer- Properties-Advanced-User
 Profiles.)


 Login scripts could be several things
-  share and file permissions for the netlogon directory should probably
 allow everyone read-only.
-  I usually add a pause command in the login script when
 troubleshooting
-  You need to specify the logon script as part of the user's account.
  (In LDAP, SambaLogonScript attribute  I don't think you can a default logon
 script.


 From an XP session, can you go to the netlogon share and run the logon
 script?


 On 11/23/09 10:03, David Whitney wrote:

 Grettings, all

 I have a bizarre problem on a laptop in my Samba 3.3.4 domain. This domain
 includes a mixture of XP Pro and Vista Ultimate clients.

 I had just completed a migration to this new domain (from a Samba 2.2.8a
 domain), and all seemed happy and well - machines had rebooted and were
 still active in the domain, users were logging in with no problem, shares
 were working perfectly - all over the span of a week or so - until last
 night.

 Trying to log into my wife's laptop (Vista Ultimate) under her account, I
 got an odd message that said Your roaming profile was not completely
 synchronized. Please contact your administrator. The only problem is I am
 *not* using roaming profiles in my Samba domain! And this account had
 logged
 into the domain several times on this laptop with no problem after the
 migration.

 I looked on the home shares for the particular account, and surely enough
 there is the profile.V2 folder indicating what I understand is the
 attempt
 by a Vista box to build a first-time Vista-style roaming profile on my
 Samba-defined user share. I logged in under a different account that has
 admin privs, and sure enough, it tried to load a roaming profile there,
 too.
 That told me, additionally, that Vista thought this was the first time
 this
 user had logged into that box/domain, which was obviously incorrect. The
 profiles for each user that had used until that point were on the machine,
 intact.

 I've changed the local policy on that box to disallow roaming profiles
 expressly, but now the local profiles that had been working just fine are
 no
 longer associated with their proper users, and I'm not sure how to restore
 the association (or even if I can). I can browse the machine remotely and
 copy the files from that local profile if I have to, but I'd like to avoid
 it.
 Could the learned folks here offer any suggestions on why this laptop
 would
 suddenly think it was supposed to use roaming profiles on my
 non-roaming-profile Samba domain? Is there some mystery setting in
 smb.conf
 I might possibly have set (or perhaps deleted??) that would leave Samba
 thinking was trying to use roaming profiles? Based on late-night research,
 I
 expressly set logon path to be blank in smb.conf, which is supposed to
 disable Samba roaming profiles. It had not been expressly set before. I
 have
 logged into a desktop box and it worked normally.

 Appreciate any thoughts or suggestions. The desktop boxes, so far, seem
 unaffected and are working normally. I'm thinking my next step is to copy
 the files from the particular profile in question, remove the machine from
 the domain, and then rejoin it, but I'm not sure I still won't have the
 same
 problem.

 The only other problem I've had in this migration was in getting logon
 scripts to work (which I never did), but I don't think this is related to
 that issueand the fact that other than scripts the domain 

[Samba] samba 3.4.3 DC breaks Windows groups

2009-11-23 Thread Gaiseric Vandal

I have the following setup:

PDC:  Samba 3.0.37 on Solaris 10
BDC1: Samba 3.0.37 on Solaris 10
BDC2: Samba 3.4.3 on Solaris 10


Samba 3.0.37 is the bundled version of Samba.
Samba 3.4.3 is compiled from source.

BDC2 is a recent addition to the network.
All machine use LDAP as the backend for everything.  They use winbind to
handle a domain trust with another domain, but otherwise isn't needed.

On BDC2,  users do not appear to be in any groups  beyond Domain Users.


Group mapping seems OK on each DC.

BDC2# net groupmap list
Domain Admins (S-1-5-21-x-x-512) - smb_domadmins
Domain Users (S-1-5-21-x-x-513) - smb_domusers
Domain Guests (S-1-5-21-x-x9-514) - smb_domguests
Domain Computers (S-1-5-21-x-x-515) - smb_machines
Domain Controllers (S-1-5-21-x-x-516) - smb_dc
Domain Certificate Admins (S-1-5-21-x-x-517) - smb_domcertadmins
Builtin Admins (S-1-5-21-x-x-544) - smb_admins
Builtin users (S-1-5-21-x-x-545) - smb_users
Builtin Guests (S-1-5-21-x-x-546) - smb_guests
Administrators (S--544) - 
Users (S--545) - 
BDC2#

The last two in the listing above were automatically created by 
winbind/idmap for a trusted domain.




Unix level group memberships are OK

BDC2# groups Administrator
smb_domadmins smb_domusers
BDC2#

Windows/Samba level group memberships are not

BDC2# net rpc user info Administrator -U Administrator -S PDC
Enter Administrator's password:
Domain Admins
Domain Users
BDC2#


BDC2# net rpc user info Administrator -U Administrator -S BDC2
Enter Administrator's password:
Domain Users
BDC2#


Same deal with regular users



Nt.  Not all unix groups are mapped to Windows groups.  However I 
believe all required well known windows groups are.


Ldap structure includes
ou=people
ou=group
ou=smb_groups (where samba stores group mappings, ldap 
objectClass=sambaGroupMapping)






You can verify machine PDC or BDC is being used by an Windows client 
with the echo %LOGONSERVER% command.



If I logon as Domain Administrator to an  XP or Win 2003 machine that is 
using BDC2, I will not have any Administrator privileges.



smb.conf includes
ldap group suffix = ou=smb_groups


(When I converted from tdb to ldap backend,  I already had unix groups 
in ldap and wasn't sure how stuff would import. I don't think 
existing groups or group mappings imported so I had to manually retype 
the net group map commands.  )


The Domain Admins sambaGroupMapping does include Administrator as a 
member.




BDC2# net rpc group members Domain Admins -U Administrator -S PDC
MYDOMAIN\Administrator
MYDOMAIN\jsmith


BDC2# net rpc group members Domain Admins -U Administrator -S BDC2
Enter Administrator's password:
MYDOMAIN\Administrator
MYDOMAIN\jsmith





Thanks





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


[Samba] migrating NT4 PDC net rpc vampire errors with capital letters

2009-11-23 Thread Ryan Davis
Hi,

I have searched for days on Google and can't find a clear answer to my
question.  I have a  NT4 PDC which I am migrating to Samba 3 (Version
3.4.2-47.fc12) on FC12 with kernel(2.6.31.5-127.fc12.i686).  I am using
tdbsam as my passdb backend.

I setup Samba as a BDC and then joined to NT4 Domain succesfully.  When I go
to vampire the accounts I get lots of errors and some user accounts get
transfered over.  It turns that all the user accounts that transfer are
those that don't have a capital letter in their username on the NT4 domain
server.  Most do and don't get transfered.  There seems to be errors with my
groups and Computer accounts.  I was able in the past to vampire all the
accounts (even capital letters) so any ideas would be great.

Thanks in advance.

Here is a type of error I get:

Creating account: Ryan
useradd: invalid user name 'Ryan'
fetch_account: Running the command `/usr/sbin/useradd -m 'Ryan'' gave 3
Could not create posix account info for 'Ryan'

I get this error for groups:

Creating unix group: 'SophosDomainPowerUser'
groupadd: 'SophosDomainPowerUser' is not a valid group name
smb_create_group: Running the command `/usr/sbin/groupadd
'SophosDomainPowerUser'' gave 3

and for Computer names:
Creating account: LIMS1$
useradd: invalid user name 'LIMS1$'
fetch_account: Running the command `/usr/sbin/useradd -s /bin/false -d
/dev/null 'LIMS1$'' gave 3


Here is my smb.conf

[global]
 workgroup = GENOME1
 netbios name = HERCULES
 passdb backend = tdbsam
 domain master = No
 domain logons = Yes
 os level = 40
 add user script = /usr/sbin/useradd %u -n -g users
 delete user script = /usr/sbin/userdel %u
 add group script = /usr/sbin/groupadd %g
 delete group script = /usr/sbin/groupdel %g
 add machine script = /usr/sbin/useradd -n -c Workstation (%u) -M -d
/nohome -s /bin/false %u
# username map = /etc/samba/smbusers
 logon path =
 logon home =
# wins support = yes

[files]
comment = SAMBA File Server
path = /files
read only = No
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] migrating NT4 PDC net rpc vampire errors with capital letters

2009-11-23 Thread John H Terpstra
Ryan Davis wrote:
 Hi,

 I have searched for days on Google and can't find a clear answer to my
 question.  I have a  NT4 PDC which I am migrating to Samba 3 (Version
 3.4.2-47.fc12) on FC12 with kernel(2.6.31.5-127.fc12.i686).  I am using
 tdbsam as my passdb backend.

 I setup Samba as a BDC and then joined to NT4 Domain succesfully.  When I go
 to vampire the accounts I get lots of errors and some user accounts get
 transfered over.  It turns that all the user accounts that transfer are
 those that don't have a capital letter in their username on the NT4 domain
 server.  Most do and don't get transfered.  There seems to be errors with my
 groups and Computer accounts.  I was able in the past to vampire all the
 accounts (even capital letters) so any ideas would be great.
   

Some Linux systems will not allow creation of user or group accounts
that have uppercase characters or spaces in them.  OpenSUSE 11.2 does
not have this limitation.  Perhaps you can ask on the FedoraProject list
to find how to disable the restriction against uppercase characters in
user and group names.  While it is an admirable intention of some Linux
distros to stop users from creating stupid account names, when migrating
from MS Windows this is a real handicap.

- John T.

 Thanks in advance.

 Here is a type of error I get:

 Creating account: Ryan
 useradd: invalid user name 'Ryan'
 fetch_account: Running the command `/usr/sbin/useradd -m 'Ryan'' gave 3
 Could not create posix account info for 'Ryan'

 I get this error for groups:

 Creating unix group: 'SophosDomainPowerUser'
 groupadd: 'SophosDomainPowerUser' is not a valid group name
 smb_create_group: Running the command `/usr/sbin/groupadd
 'SophosDomainPowerUser'' gave 3

 and for Computer names:
 Creating account: LIMS1$
 useradd: invalid user name 'LIMS1$'
 fetch_account: Running the command `/usr/sbin/useradd -s /bin/false -d
 /dev/null 'LIMS1$'' gave 3


 Here is my smb.conf

 [global]
  workgroup = GENOME1
  netbios name = HERCULES
  passdb backend = tdbsam
  domain master = No
  domain logons = Yes
  os level = 40
  add user script = /usr/sbin/useradd %u -n -g users
  delete user script = /usr/sbin/userdel %u
  add group script = /usr/sbin/groupadd %g
  delete group script = /usr/sbin/groupdel %g
  add machine script = /usr/sbin/useradd -n -c Workstation (%u) -M -d
 /nohome -s /bin/false %u
 # username map = /etc/samba/smbusers
  logon path =
  logon home =
 # wins support = yes

 [files]
 comment = SAMBA File Server
 path = /files
 read only = No
   

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


Re: [Samba] samba 3.4.3 DC breaks Windows groups

2009-11-23 Thread Gaiseric Vandal
On the assumption that Unix systems (solaris and linux) will not like spaces
in names, I never created unix groups called Domain Admins and Domain
Users etc.  Instead I had  created smb_domadmins and smb_domusers etc
instead.   

I don't know if Windows systems actually pay attention to the name of the
group (e.g. Domain Admins) or just the SID (e.g. S-1-5-21--512.)
We would have a similar issue with a group like Human Resources but not
with Marketing.


On samba 3.0.x, setting ldap group suffix parameter is honored.  On Samba
3.4.x it seems to be ignored-  instead samba seems to read the entire ldap
tree (or at least from the ldap suffix parameter down.) pbedit -Lv
Administrator on samba 3.4 will then complain about duplicate entries

BDC2# pdbedit -Lv Administrator
smbldap_search_domain_info: Searching
for:[((objectClass=sambaDomain)(sambaDomainName=MYDOMAIN))]
smbldap_open_connection: connection opened
ldap_connect_system: successful connection to the LDAP server
init_sam_from_ldap: Entry found for user: Administrator
ldapsam_getgroup: Duplicate entries for filter
((objectClass=sambaGroupMapping)
(gidNumber=512)): count=2



Since in this case if have both of the following objects in ldap

dn: cn=Domain Admins,ou=smb_groups,o=mydomain.com
objectClass: posixGroup
objectClass: sambaGroupMapping
objectClass: top
cn: Domain Admins
description: Domain Admins
displayName: Domain Admins
gidNumber: 512
sambaGroupType: 2
sambaSID: S-1-5-21-**-512

AND

dn: cn=smb_domadmins,ou=group,o=mydomain.com
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
objectClass: groupOfUniqueNames
cn: domadmins
description: domadmins
displayName: domadmins
gidNumber: 512
memberUid: Administrator
.
sambaGroupType: 2
sambaSID:
...


I also noticed the following

Output from pdbedit on samba 3.4.x  includes

ldapsam_getgroup

Output from pdbedit on samba 3.0.x includes

   init_group_from_ldap



I am not sure if that is somehow related.  

Thanks







-Original Message-
From: Gaiseric Vandal [mailto:gaiseric.van...@gmail.com] 
Sent: Monday, November 23, 2009 4:41 PM
To: samba@lists.samba.org
Subject: samba 3.4.3 DC breaks Windows groups

I have the following setup:

 PDC:  Samba 3.0.37 on Solaris 10
 BDC1: Samba 3.0.37 on Solaris 10
 BDC2: Samba 3.4.3 on Solaris 10


Samba 3.0.37 is the bundled version of Samba.
Samba 3.4.3 is compiled from source.

BDC2 is a recent addition to the network.
All machine use LDAP as the backend for everything.  They use winbind to
handle a domain trust with another domain, but otherwise isn't needed.

On BDC2,  users do not appear to be in any groups  beyond Domain Users.


Group mapping seems OK on each DC.

BDC2# net groupmap list
Domain Admins (S-1-5-21-x-x-512) - smb_domadmins
Domain Users (S-1-5-21-x-x-513) - smb_domusers
Domain Guests (S-1-5-21-x-x9-514) - smb_domguests
Domain Computers (S-1-5-21-x-x-515) - smb_machines
Domain Controllers (S-1-5-21-x-x-516) - smb_dc
Domain Certificate Admins (S-1-5-21-x-x-517) - smb_domcertadmins
Builtin Admins (S-1-5-21-x-x-544) - smb_admins
Builtin users (S-1-5-21-x-x-545) - smb_users
Builtin Guests (S-1-5-21-x-x-546) - smb_guests
Administrators (S--544) - 
Users (S--545) - 
BDC2#

The last two in the listing above were automatically created by 
winbind/idmap for a trusted domain.



Unix level group memberships are OK

BDC2# groups Administrator
smb_domadmins smb_domusers
BDC2#

Windows/Samba level group memberships are not

BDC2# net rpc user info Administrator -U Administrator -S PDC
Enter Administrator's password:
Domain Admins
Domain Users
BDC2#


BDC2# net rpc user info Administrator -U Administrator -S BDC2
Enter Administrator's password:
Domain Users
BDC2#


Same deal with regular users



Nt.  Not all unix groups are mapped to Windows groups.  However I 
believe all required well known windows groups are.

Ldap structure includes
 ou=people
 ou=group
 ou=smb_groups (where samba stores group mappings, ldap 
objectClass=sambaGroupMapping)





You can verify machine PDC or BDC is being used by an Windows client 
with the echo %LOGONSERVER% command.


If I logon as Domain Administrator to an  XP or Win 2003 machine that is 
using BDC2, I will not have any Administrator privileges.


smb.conf includes
 ldap group suffix = ou=smb_groups


(When I converted from tdb to ldap backend,  I already had unix groups 
in ldap and wasn't sure how stuff would import. I don't think 
existing groups or group mappings imported so I had to manually retype 
the net group map commands.  )

The Domain Admins sambaGroupMapping does include Administrator as a 
member.



BDC2# net rpc group members Domain Admins -U Administrator -S PDC
MYDOMAIN\Administrator
MYDOMAIN\jsmith


BDC2# net rpc group members Domain Admins -U Administrator -S BDC2
Enter Administrator's password:
MYDOMAIN\Administrator
MYDOMAIN\jsmith


Re: [Samba] Fwd: Vista laptop in Samba 3.3.4 domain suddenly trying to use roaming profiles?

2009-11-23 Thread Paul Venzke
On Mon November 23 2009 15:27, David Whitney wrote:
  Hi, and thanks for your interest!

 I am still using an smbpasswd backend because this is a very small
 home network I maintain for my own educational purposes, although I
 might migrate to LDAP at some point for the same reason.

 I have manually changed the troublesome profile type from roaming
 to local, but when I logged back in from that same profile, it
 switched back to roaming! The more I read about this bizarre
 behavior, the more I start to suspect the possibility of malware or
 virus, which is what I plan to investigate tonight.

 As far as the logon scripts go, the irony is that the script
 actually fired from my admin-prived logon, but could not
 access/load the right profile from the local box. They still
 don't fire from my desktop boxes. Per your question, I can access
 and execute the scripts from the desktop with no problem. Per other
 sources, it appears that the necessary privs to the netlogon
 directory should be 755, (rwxr-xr-x), which is what I have set and
 verified.

 Again, many thanks for your interest and suggestions.



 On Mon, Nov 23, 2009 at 1:16 PM, Gaiseric Vandal

 gaiseric.van...@gmail.comwrote:
  This happened to us when we switched from TDB to LDAP backend.  
  (Samba 3.03x)   I suspect that for some users sambaProfilePath
  may have had space character but wasn't actually  null.   For
  some users we just deleted the sambaProfilePath attribute.
 
  You may need to change the profile type on the users computer
  from roaming back to local.  (On XP, right-click My Computer-
  Properties-Advanced-User Profiles.)
 
 
  Login scripts could be several things
 -  share and file permissions for the netlogon directory
  should probably allow everyone read-only.
 -  I usually add a pause command in the login script when
  troubleshooting
 -  You need to specify the logon script as part of the user's
  account. (In LDAP, SambaLogonScript attribute  I don't think you
  can a default logon script.
 
 
  From an XP session, can you go to the netlogon share and run the
  logon script?
 
  On 11/23/09 10:03, David Whitney wrote:
  Grettings, all
 
  I have a bizarre problem on a laptop in my Samba 3.3.4 domain.
  This domain includes a mixture of XP Pro and Vista Ultimate
  clients.
 
  I had just completed a migration to this new domain (from a
  Samba 2.2.8a domain), and all seemed happy and well - machines
  had rebooted and were still active in the domain, users were
  logging in with no problem, shares were working perfectly - all
  over the span of a week or so - until last night.
 
  Trying to log into my wife's laptop (Vista Ultimate) under her
  account, I got an odd message that said Your roaming profile
  was not completely synchronized. Please contact your
  administrator. The only problem is I am *not* using roaming
  profiles in my Samba domain! And this account had logged
  into the domain several times on this laptop with no problem
  after the migration.
 
  I looked on the home shares for the particular account, and
  surely enough there is the profile.V2 folder indicating what I
  understand is the attempt
  by a Vista box to build a first-time Vista-style roaming profile
  on my Samba-defined user share. I logged in under a different
  account that has admin privs, and sure enough, it tried to load
  a roaming profile there, too.
  That told me, additionally, that Vista thought this was the
  first time this
  user had logged into that box/domain, which was obviously
  incorrect. The profiles for each user that had used until that
  point were on the machine, intact.
 
  I've changed the local policy on that box to disallow roaming
  profiles expressly, but now the local profiles that had been
  working just fine are no
  longer associated with their proper users, and I'm not sure how
  to restore the association (or even if I can). I can browse the
  machine remotely and copy the files from that local profile if I
  have to, but I'd like to avoid it.
  Could the learned folks here offer any suggestions on why this
  laptop would
  suddenly think it was supposed to use roaming profiles on my
  non-roaming-profile Samba domain? Is there some mystery setting
  in smb.conf
  I might possibly have set (or perhaps deleted??) that would
  leave Samba thinking was trying to use roaming profiles? Based
  on late-night research, I
  expressly set logon path to be blank in smb.conf, which is
  supposed to disable Samba roaming profiles. It had not been
  expressly set before. I have
  logged into a desktop box and it worked normally.
 
  Appreciate any thoughts or suggestions. The desktop boxes, so
  far, seem unaffected and are working normally. I'm thinking my
  next step is to copy the files from the particular profile in
  question, remove the machine from the domain, and then rejoin
  it, but I'm not sure I still won't have the same
  problem.
 
  The only other problem I've had in this migration was in 

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

2009-11-23 Thread Karolin Seeger
The branch, v3-4-test has been updated
   via  d96bc12... s3:fix endianness bug in dbwrap_change_int32_atomic() 
(bug #6901)
   via  d3db4b2... s3:fix endianness bug in dbwrap_change_uint32_atomic() 
(bug #6901)
  from  a23ff8b... s3/docs: Document enable spoolss.

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


- Log -
commit d96bc12a8634d50c0c74f583c264cf8f89e22637
Author: Michael Adam ob...@samba.org
Date:   Sat Nov 21 00:23:22 2009 +0100

s3:fix endianness bug in dbwrap_change_int32_atomic() (bug #6901)

Michael

commit d3db4b2d3a56975b0170714828921e0871bfa4a2
Author: Michael Adam ob...@samba.org
Date:   Sat Nov 21 00:21:56 2009 +0100

s3:fix endianness bug in dbwrap_change_uint32_atomic() (bug #6901)

Michael

---

Summary of changes:
 source3/lib/dbwrap_util.c |   18 ++
 1 files changed, 10 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c
index 3be3a49..728eb99 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -110,7 +110,7 @@ uint32_t dbwrap_change_uint32_atomic(struct db_context *db, 
const char *keystr,
 {
struct db_record *rec;
uint32 val = -1;
-   TDB_DATA data;
+   uint32_t v_store;
 
if (!(rec = db-fetch_locked(db, NULL,
 string_term_tdb_data(keystr {
@@ -128,10 +128,11 @@ uint32_t dbwrap_change_uint32_atomic(struct db_context 
*db, const char *keystr,
 
val += change_val;
 
-   data.dsize = sizeof(val);
-   data.dptr = (uint8 *)val;
+   SIVAL(v_store, 0, val);
 
-   rec-store(rec, data, TDB_REPLACE);
+   rec-store(rec,
+  make_tdb_data((const uint8_t *)v_store, sizeof(v_store)),
+  TDB_REPLACE);
 
TALLOC_FREE(rec);
 
@@ -150,7 +151,7 @@ int32 dbwrap_change_int32_atomic(struct db_context *db, 
const char *keystr,
 {
struct db_record *rec;
int32 val = -1;
-   TDB_DATA data;
+   int32_t v_store;
 
if (!(rec = db-fetch_locked(db, NULL,
 string_term_tdb_data(keystr {
@@ -168,10 +169,11 @@ int32 dbwrap_change_int32_atomic(struct db_context *db, 
const char *keystr,
 
val += change_val;
 
-   data.dsize = sizeof(val);
-   data.dptr = (uint8 *)val;
+   SIVAL(v_store, 0, val);
 
-   rec-store(rec, data, TDB_REPLACE);
+   rec-store(rec,
+  make_tdb_data((const uint8_t *)v_store, sizeof(v_store)),
+  TDB_REPLACE);
 
TALLOC_FREE(rec);
 


-- 
Samba Shared Repository


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

2009-11-23 Thread Karolin Seeger
The branch, v3-4-test has been updated
   via  5d6ea13... s3:idmap_ldap: trim the  chars from the location string 
in idmap_ldap_db_init
   via  210fc5a... s3:idmap_ldap: trim the  chars from the location string 
in idmap_ldap_alloc_init
  from  d96bc12... s3:fix endianness bug in dbwrap_change_int32_atomic() 
(bug #6901)

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


- Log -
commit 5d6ea139d413cb05370137e4d04c4db391a06ac1
Author: Michael Adam ob...@samba.org
Date:   Fri Nov 20 12:44:43 2009 +0100

s3:idmap_ldap: trim the  chars from the location string in 
idmap_ldap_db_init

Fix bug #6910 (idmap_ldap stumbles over idmap backend = ldap:ldap://ldap1
ldap://ldap2=.

When idmap backend is specified as
idmap backend = ldap:ldap://server1 ldap://server2;
then currently ldap://server1 ldap://server2; was passed to
ldap_initialize including the quotes, leading to an ldap error.

Michael

commit 210fc5a8cf384eea62cd51d398523d37723f72fb
Author: Michael Adam ob...@samba.org
Date:   Fri Nov 20 12:38:44 2009 +0100

s3:idmap_ldap: trim the  chars from the location string in 
idmap_ldap_alloc_init

When idmap alloc backend is specified as
idmap alloc backend = ldap:ldap://server1 ldap://server2;
then currently ldap://server1 ldap://server2; was passed to
ldap_initialize including the quotes, leading to an ldap error.

Michael

---

Summary of changes:
 source3/winbindd/idmap_ldap.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index 3d1dd48..cdab0f0 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -305,6 +305,8 @@ static NTSTATUS idmap_ldap_alloc_init(const char *params)
}
CHECK_ALLOC_DONE( idmap_alloc_ldap-url );
 
+   trim_char(idmap_alloc_ldap-url, '\', '\');
+
tmp = lp_parm_const_string(-1, idmap alloc config,
   ldap_base_dn, NULL);
if ( ! tmp || ! *tmp) {
@@ -853,6 +855,8 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom,
}
CHECK_ALLOC_DONE(ctx-url);
 
+   trim_char(ctx-url, '\', '\');
+
 tmp = lp_parm_const_string(-1, config_option, ldap_base_dn, NULL);
 if ( ! tmp || ! *tmp) {
 tmp = lp_ldap_idmap_suffix();


-- 
Samba Shared Repository


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

2009-11-23 Thread Karolin Seeger
The branch, v3-4-test has been updated
   via  8c2dfcd... s3: fixed krb5 build problem on ubuntu karmic
  from  5d6ea13... s3:idmap_ldap: trim the  chars from the location string 
in idmap_ldap_db_init

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


- Log -
commit 8c2dfcd24f69aa8d71a2854feaf2e8ea1802537e
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Oct 16 10:40:50 2009 +1100

s3: fixed krb5 build problem on ubuntu karmic

Karmic has MIT krb5 1.7-beta3, which has the symbol
krb5_auth_con_set_req_cksumtype but no prototype for it.

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531635
(cherry picked from commit a6e4cb500b4162cae1d906a1762507370b4ee89e)

Part of a fix for bug #6918.

---

Summary of changes:
 source3/configure.in |4 
 source3/libsmb/clikrb5.c |9 +
 2 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 6644bdd..70a8fe8 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -3384,6 +3384,10 @@ if test x$with_ads_support != xno; then
   AC_CHECK_FUNC_EXT(krb5_fwd_tgt_creds, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_auth_con_set_req_cksumtype, $KRB5_LIBS)
 
+  # MIT krb5 1.7beta3 (in Ubuntu Karmic) does not have this declaration
+  # but does have the symbol
+  AC_CHECK_DECLS(krb5_auth_con_set_req_cksumtype, [], [], [#include krb5.h])
+
   LIBS=$KRB5_LIBS $LIBS
 
   AC_CACHE_CHECK(whether krb5_ticket contains kvno and enctype,
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index aa98d76..76d99c1 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -1853,6 +1853,15 @@ static krb5_error_code ads_krb5_get_fwd_ticket( 
krb5_context context,
char *pChksum = NULL;
char *p = NULL;
 
+/* MIT krb5 1.7beta3 (in Ubuntu Karmic) is missing the prototype,
+   but still has the symbol */
+#if !HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE
+krb5_error_code krb5_auth_con_set_req_cksumtype(  
+   krb5_context context,
+   krb5_auth_context  auth_context,  
+   krb5_cksumtype cksumtype);
+#endif
+
ZERO_STRUCT(fwdData);
ZERO_STRUCTP(authenticator);
 


-- 
Samba Shared Repository


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

2009-11-23 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  fbaed41... s3: fixed krb5 build problem on ubuntu karmic
  from  b6f1ece... s3-rpc_client: make sure cli_rpc_pipe_open_schannel() 
does not always return NT_STATUS_OK.

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


- Log -
commit fbaed41c8f583f633673aca2f600c517744d28b5
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Oct 16 10:40:50 2009 +1100

s3: fixed krb5 build problem on ubuntu karmic

Karmic has MIT krb5 1.7-beta3, which has the symbol
krb5_auth_con_set_req_cksumtype but no prototype for it.

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531635
(cherry picked from commit a6e4cb500b4162cae1d906a1762507370b4ee89e)

Part of a fix for bug #6918.

---

Summary of changes:
 source/configure.in |4 
 source/libsmb/clikrb5.c |9 +
 2 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/configure.in b/source/configure.in
index 462b112..cf46405 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -3627,6 +3627,10 @@ if test x$with_ads_support != xno; then
   AC_CHECK_FUNC_EXT(krb5_fwd_tgt_creds, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_auth_con_set_req_cksumtype, $KRB5_LIBS)
 
+  # MIT krb5 1.7beta3 (in Ubuntu Karmic) does not have this declaration
+  # but does have the symbol
+  AC_CHECK_DECLS(krb5_auth_con_set_req_cksumtype, [], [], [#include krb5.h])
+
   LIBS=$KRB5_LIBS $LIBS
 
   AC_CACHE_CHECK(whether krb5_ticket contains kvno and enctype,
diff --git a/source/libsmb/clikrb5.c b/source/libsmb/clikrb5.c
index 1e2fe01..d8fe40b 100644
--- a/source/libsmb/clikrb5.c
+++ b/source/libsmb/clikrb5.c
@@ -1842,6 +1842,15 @@ static krb5_error_code ads_krb5_get_fwd_ticket( 
krb5_context context,
char *pChksum = NULL;
char *p = NULL;
 
+/* MIT krb5 1.7beta3 (in Ubuntu Karmic) is missing the prototype,
+   but still has the symbol */
+#if !HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE
+krb5_error_code krb5_auth_con_set_req_cksumtype(
+   krb5_context context,
+   krb5_auth_context  auth_context,
+   krb5_cksumtype cksumtype);
+#endif
+
ZERO_STRUCT(fwdData);
ZERO_STRUCTP(authenticator);
 


-- 
Samba Shared Repository


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

2009-11-23 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  67f1d0a... s3:idmap_ldap: trim the  chars from the location string 
in idmap_ldap_db_init
  from  fbaed41... s3: fixed krb5 build problem on ubuntu karmic

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


- Log -
commit 67f1d0ac6edecec4efb100ae61bc23bd321f518f
Author: Michael Adam ob...@samba.org
Date:   Fri Nov 20 12:44:43 2009 +0100

s3:idmap_ldap: trim the  chars from the location string in 
idmap_ldap_db_init

Fix bug #6910 (idmap_ldap stumbles over idmap backend = ldap:ldap://ldap1
ldap://ldap2=.

When idmap backend is specified as
idmap backend = ldap:ldap://server1 ldap://server2;
then currently ldap://server1 ldap://server2; was passed to
ldap_initialize including the quotes, leading to an ldap error.

Michael

---

Summary of changes:
 source/winbindd/idmap_ldap.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/idmap_ldap.c b/source/winbindd/idmap_ldap.c
index 7a0e32b..ac5f7c8 100644
--- a/source/winbindd/idmap_ldap.c
+++ b/source/winbindd/idmap_ldap.c
@@ -853,6 +853,8 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom,
}
CHECK_ALLOC_DONE(ctx-url);
 
+   trim_char(ctx-url, '\', '\');
+
 tmp = lp_parm_const_string(-1, config_option, ldap_base_dn, NULL);
 if ( ! tmp || ! *tmp) {
 tmp = lp_ldap_idmap_suffix();


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Günther Deschner
The branch, master has been updated
   via  d464151... s3-spoolss: fix spoolss_EnumPrinterKey client and server 
code.
   via  366946f... spoolss: fix spoolss_EnumPrinterKey IDL.
  from  579bb30... s3: Fix bug 6338 -- net rpc trustdom list always display 
none

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


- Log -
commit d464151f3b47c675664f464b1645ca85de663655
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 20 16:34:00 2009 +0100

s3-spoolss: fix spoolss_EnumPrinterKey client and server code.

Guenther

commit 366946f29b58a6efa7acbfe2a74b2ddbad4d32a2
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 20 12:57:13 2009 +0100

spoolss: fix spoolss_EnumPrinterKey IDL.

Guenther

---

Summary of changes:
 librpc/gen_ndr/cli_spoolss.c|8 ++--
 librpc/gen_ndr/cli_spoolss.h|4 +-
 librpc/gen_ndr/ndr_spoolss.c|   80 +--
 librpc/gen_ndr/spoolss.h|2 +-
 librpc/gen_ndr/srv_spoolss.c|4 +-
 librpc/idl/spoolss.idl  |2 +-
 source3/rpc_client/cli_spoolss.c|   24 +-
 source3/rpc_server/srv_spoolss_nt.c |   23 --
 8 files changed, 80 insertions(+), 67 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index fc2b8f0..d9bbe52 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -12207,7 +12207,7 @@ struct tevent_req 
*rpccli_spoolss_EnumPrinterKey_send(TALLOC_CTX *mem_ctx,
  struct rpc_pipe_client 
*cli,
  struct policy_handle 
*_handle /* [in] [ref] */,
  const char *_key_name /* 
[in] [charset(UTF16)] */,
- const char ** 
*_key_buffer /* [out] 
[subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
+ uint16_t *_key_buffer /* 
[out] [ref,size_is(offered/2)] */,
  uint32_t _offered /* [in] 
 */,
  uint32_t *_needed /* 
[out] [ref] */)
 {
@@ -12278,7 +12278,7 @@ static void rpccli_spoolss_EnumPrinterKey_done(struct 
tevent_req *subreq)
}
 
/* Copy out parameters */
-   *state-orig.out.key_buffer = *state-tmp.out.key_buffer;
+   memcpy(state-orig.out.key_buffer, state-tmp.out.key_buffer, 
state-tmp.in.offered / 2 * sizeof(*state-orig.out.key_buffer));
*state-orig.out.needed = *state-tmp.out.needed;
 
/* Copy result */
@@ -12317,7 +12317,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterKey(struct 
rpc_pipe_client *cli,
   TALLOC_CTX *mem_ctx,
   struct policy_handle *handle /* [in] 
[ref] */,
   const char *key_name /* [in] 
[charset(UTF16)] */,
-  const char ** *key_buffer /* [out] 
[subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
+  uint16_t *key_buffer /* [out] 
[ref,size_is(offered/2)] */,
   uint32_t offered /* [in]  */,
   uint32_t *needed /* [out] [ref] */,
   WERROR *werror)
@@ -12345,7 +12345,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterKey(struct 
rpc_pipe_client *cli,
}
 
/* Return variables */
-   *key_buffer = *r.out.key_buffer;
+   memcpy(key_buffer, r.out.key_buffer, r.in.offered / 2 * 
sizeof(*key_buffer));
*needed = *r.out.needed;
 
/* Return result */
diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h
index 985337d..943cbce 100644
--- a/librpc/gen_ndr/cli_spoolss.h
+++ b/librpc/gen_ndr/cli_spoolss.h
@@ -1262,7 +1262,7 @@ struct tevent_req 
*rpccli_spoolss_EnumPrinterKey_send(TALLOC_CTX *mem_ctx,
  struct rpc_pipe_client 
*cli,
  struct policy_handle 
*_handle /* [in] [ref] */,
  const char *_key_name /* 
[in] [charset(UTF16)] */,
- const char ** 
*_key_buffer /* [out] 
[subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
+ uint16_t *_key_buffer /* 
[out] [ref,size_is(offered/2)] */,
  uint32_t _offered /* [in] 
 */,
  uint32_t 

[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Günther Deschner
The branch, master has been updated
   via  d66b7d8... s4-smbtorture: add tests for spoolss_EnumPrinterKey to 
RPC-SPOOLSS-PRINTER.
  from  d464151... s3-spoolss: fix spoolss_EnumPrinterKey client and server 
code.

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


- Log -
commit d66b7d80d5ae1a0bf2e3d1e6718f569726da7734
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 20 16:33:29 2009 +0100

s4-smbtorture: add tests for spoolss_EnumPrinterKey to RPC-SPOOLSS-PRINTER.

Guenther

---

Summary of changes:
 source4/torture/rpc/spoolss.c |   81 +
 1 files changed, 81 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index ddc14f3..2a74131 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -24,7 +24,9 @@
 #include includes.h
 #include torture/torture.h
 #include torture/rpc/rpc.h
+#include librpc/gen_ndr/ndr_misc.h
 #include librpc/gen_ndr/ndr_spoolss_c.h
+#include param/param.h
 
 #define TORTURE_WELLKNOWN_PRINTER  torture_wkn_printer
 #define TORTURE_PRINTERtorture_printer
@@ -3033,6 +3035,77 @@ static bool test_printer_info(struct torture_context 
*tctx,
return ret;
 }
 
+bool test_printer_keys(struct torture_context *tctx,
+  struct dcerpc_pipe *p,
+  struct policy_handle *handle)
+{
+   DATA_BLOB blob;
+   const char **key_array = NULL;
+   int i;
+
+   {
+   struct spoolss_EnumPrinterKey r;
+   uint32_t needed;
+   uint16_t *key_buffer = talloc_zero_array(tctx, uint16_t, 0);
+
+   r.in.handle = handle;
+   r.in.key_name = ;
+   r.in.offered = 0;
+   r.out.key_buffer = key_buffer;
+   r.out.needed = needed;
+
+   torture_assert_ntstatus_ok(tctx, 
dcerpc_spoolss_EnumPrinterKey(p, tctx, r),
+   failed to call EnumPrinterKey);
+   if (W_ERROR_EQUAL(r.out.result, WERR_MORE_DATA)) {
+   r.in.offered = needed;
+   key_buffer = talloc_zero_array(tctx, uint16_t, 
needed/2);
+   r.out.key_buffer = key_buffer;
+   torture_assert_ntstatus_ok(tctx, 
dcerpc_spoolss_EnumPrinterKey(p, tctx, r),
+   failed to call EnumPrinterKey);
+   }
+   torture_assert_werr_ok(tctx, r.out.result,
+   failed to call EnumPrinterKey);
+
+   blob = data_blob_const(key_buffer, needed);
+   }
+
+   {
+   union winreg_Data data;
+   enum ndr_err_code ndr_err;
+   ndr_err = ndr_pull_union_blob(blob, tctx, 
lp_iconv_convenience(tctx-lp_ctx),
+   data, REG_MULTI_SZ,
+   
(ndr_pull_flags_fn_t)ndr_pull_winreg_Data);
+   torture_assert_ndr_success(tctx, ndr_err, failed to pull 
REG_MULTI_SZ);
+   key_array = data.string_array;
+   }
+
+   for (i=0; key_array[i]; i++) {
+   struct spoolss_EnumPrinterDataEx r;
+   uint32_t count;
+   struct spoolss_PrinterEnumValues *info;
+   uint32_t needed;
+
+   r.in.handle = handle;
+   r.in.key_name = key_array[i];
+   r.in.offered = 0;
+   r.out.count = count;
+   r.out.info = info;
+   r.out.needed = needed;
+
+   torture_assert_ntstatus_ok(tctx, 
dcerpc_spoolss_EnumPrinterDataEx(p, tctx, r),
+   failed to call EnumPrinterDataEx);
+   if (W_ERROR_EQUAL(r.out.result, WERR_MORE_DATA)) {
+   r.in.offered = needed;
+   torture_assert_ntstatus_ok(tctx, 
dcerpc_spoolss_EnumPrinterDataEx(p, tctx, r),
+   failed to call EnumPrinterDataEx);
+   }
+   torture_assert_werr_ok(tctx, r.out.result,
+   failed to call EnumPrinterDataEx);
+   }
+
+   return true;
+}
+
 static bool test_printer(struct torture_context *tctx,
 struct dcerpc_pipe *p)
 {
@@ -3052,6 +3125,10 @@ static bool test_printer(struct torture_context *tctx,
ret = false;
}
 
+   if (!test_printer_keys(tctx, p, handle[0])) {
+   ret = false;
+   }
+
if (!test_DeletePrinter(tctx, p, handle[0])) {
ret = false;
}
@@ -3073,6 +3150,10 @@ static bool test_printer(struct torture_context *tctx,
ret = false;
}
 
+   if (!test_printer_keys(tctx, p, handle[1])) {
+   ret = false;
+   }
+
 

[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Günther Deschner
The branch, master has been updated
   via  6364c27... s3-printing: remove unused NT_PRINTER_DRIVER_INFO_LEVEL 
structs.
   via  ec56895... s3-printing: use spoolss types and structs while getting 
and deleting drivers.
   via  68cc116... s3-printing: use spoolss types and structs while adding 
drivers.
  from  d66b7d8... s4-smbtorture: add tests for spoolss_EnumPrinterKey to 
RPC-SPOOLSS-PRINTER.

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


- Log -
commit 6364c271c4daff94c641eb9e7030f3c9a7ff1ced
Author: Günther Deschner g...@samba.org
Date:   Tue Nov 17 12:55:45 2009 +0100

s3-printing: remove unused NT_PRINTER_DRIVER_INFO_LEVEL structs.

Guenther

commit ec56895bdec90cc671a0d562749b3caf161dbdf8
Author: Günther Deschner g...@samba.org
Date:   Tue Nov 17 12:54:02 2009 +0100

s3-printing: use spoolss types and structs while getting and deleting 
drivers.

Guenther

commit 68cc1166d96ac81abce78a7eb60b7b86d0eb4eda
Author: Günther Deschner g...@samba.org
Date:   Mon Nov 16 15:52:31 2009 +0100

s3-printing: use spoolss types and structs while adding drivers.

Guenther

---

Summary of changes:
 source3/include/nt_printing.h   |   41 --
 source3/include/proto.h |   27 +-
 source3/printing/nt_printing.c  |  763 +--
 source3/registry/reg_backend_printing.c |   31 +-
 source3/rpc_server/srv_spoolss_nt.c |  521 +++---
 source3/smbd/lanman.c   |   61 ++--
 6 files changed, 545 insertions(+), 899 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 12096c8..c074c8e 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -22,47 +22,6 @@
 #ifndef NT_PRINTING_H_
 #define NT_PRINTING_H_
 
-typedef struct nt_printer_driver_info_level_3
-{
-   uint32 cversion;
-
-   fstring name;
-   fstring environment;
-   fstring driverpath;
-   fstring datafile;
-   fstring configfile;
-   fstring helpfile;
-   fstring monitorname;
-   fstring defaultdatatype;
-   fstring *dependentfiles;
-} NT_PRINTER_DRIVER_INFO_LEVEL_3;
-
-/* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
-typedef struct {
-   uint32  version;
-   fstring name;
-   fstring environment;
-   fstring driverpath;
-   fstring datafile;
-   fstring configfile;
-   fstring helpfile;
-   fstring monitorname;
-   fstring defaultdatatype;
-   fstring mfgname;
-   fstring oemurl;
-   fstring hardwareid;
-   fstring provider;
-   fstring *dependentfiles;
-   fstring *previousnames;
-} NT_PRINTER_DRIVER_INFO_LEVEL_6;
-
-
-typedef struct nt_printer_driver_info_level
-{
-   NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
-   NT_PRINTER_DRIVER_INFO_LEVEL_6 *info_6;
-} NT_PRINTER_DRIVER_INFO_LEVEL;
-
 /* predefined registry key names for printer data */
 
 #define SPOOL_PRINTERDATA_KEY  PrinterDriverData
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 970c8af..b708c26 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4839,11 +4839,10 @@ void update_a_form(nt_forms_struct **list, struct 
spoolss_AddFormInfo1 *form, in
 int get_ntdrivers(fstring **list, const char *architecture, uint32 version);
 const char *get_short_archi(const char *long_archi);
 WERROR clean_up_driver_struct(struct pipes_struct *rpc_pipe,
- NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
- uint32 level);
+ struct spoolss_AddDriverInfoCtr *r);
 WERROR move_driver_to_download_area(struct pipes_struct *p,
-   NT_PRINTER_DRIVER_INFO_LEVEL 
driver_abstract,
-   uint32 level, WERROR *perr);
+   struct spoolss_AddDriverInfoCtr *r,
+   WERROR *perr);
 int pack_devicemode(NT_DEVICEMODE *nt_devmode, uint8 *buf, int buflen);
 uint32 del_a_printer(const char *sharename);
 NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename);
@@ -4879,14 +4878,20 @@ WERROR get_a_printer_search( Printer_entry *print_hnd,
uint32 level,
const char *sharename);
 uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level);
-uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
-WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32_t 
level,
-   const char *drivername, const char *architecture, 
uint32_t version);
-uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 
level);
-bool printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 

[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Günther Deschner
The branch, master has been updated
   via  800d6b7... s3-spoolss: move more defines out of nt_printing.h to 
spoolss.idl where they belong.
  from  6364c27... s3-printing: remove unused NT_PRINTER_DRIVER_INFO_LEVEL 
structs.

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


- Log -
commit 800d6b7820bb949588a799f2835a3d6c07815571
Author: Günther Deschner g...@samba.org
Date:   Wed Nov 18 15:39:52 2009 +0100

s3-spoolss: move more defines out of nt_printing.h to spoolss.idl where 
they belong.

Guenther

---

Summary of changes:
 librpc/gen_ndr/spoolss.h  |   62 +
 librpc/idl/spoolss.idl|   68 +
 source3/include/nt_printing.h |   67 
 3 files changed, 130 insertions(+), 67 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h
index af7536b..a4c0010 100644
--- a/librpc/gen_ndr/spoolss.h
+++ b/librpc/gen_ndr/spoolss.h
@@ -23,6 +23,68 @@
 #define SPOOLSS_ARCHITECTURE_ALL   ( all )
 #define SPOOLSS_ARCHITECTURE_NT_X86( Windows NT x86 )
 #define SPOOLSS_DEFAULT_SERVER_PATH( C:\\WINDOWS\\system32\\spool )
+#define SPOOL_PRINTERDATA_KEY  ( PrinterDriverData )
+#define SPOOL_DSSPOOLER_KEY( DsSpooler )
+#define SPOOL_DSDRIVER_KEY ( DsDriver )
+#define SPOOL_DSUSER_KEY   ( DsUser )
+#define SPOOL_PNPDATA_KEY  ( PnPData )
+#define SPOOL_OID_KEY  ( OID )
+#define SPOOL_REG_ASSETNUMBER  ( assetNumber )
+#define SPOOL_REG_BYTESPERMINUTE   ( bytesPerMinute )
+#define SPOOL_REG_DEFAULTPRIORITY  ( defaultPriority )
+#define SPOOL_REG_DESCRIPTION  ( description )
+#define SPOOL_REG_DRIVERNAME   ( driverName )
+#define SPOOL_REG_DRIVERVERSION( driverVersion )
+#define SPOOL_REG_FLAGS( flags )
+#define SPOOL_REG_LOCATION ( location )
+#define SPOOL_REG_OPERATINGSYSTEM  ( operatingSystem )
+#define SPOOL_REG_OPERATINGSYSTEMHOTFIX( operatingSystemHotfix )
+#define SPOOL_REG_OPERATINGSYSTEMSERVICEPACK   ( operatingSystemServicePack )
+#define SPOOL_REG_OPERATINGSYSTEMVERSION   ( operatingSystemVersion )
+#define SPOOL_REG_PORTNAME ( portName )
+#define SPOOL_REG_PRINTATTRIBUTES  ( printAttributes )
+#define SPOOL_REG_PRINTBINNAMES( printBinNames )
+#define SPOOL_REG_PRINTCOLLATE ( printCollate )
+#define SPOOL_REG_PRINTCOLOR   ( printColor )
+#define SPOOL_REG_PRINTDUPLEXSUPPORTED ( printDuplexSupported )
+#define SPOOL_REG_PRINTENDTIME ( printEndTime )
+#define SPOOL_REG_PRINTERNAME  ( printerName )
+#define SPOOL_REG_PRINTFORMNAME( printFormName )
+#define SPOOL_REG_PRINTKEEPPRINTEDJOBS ( printKeepPrintedJobs )
+#define SPOOL_REG_PRINTLANGUAGE( printLanguage )
+#define SPOOL_REG_PRINTMACADDRESS  ( printMACAddress )
+#define SPOOL_REG_PRINTMAXCOPIES   ( printMaxCopies )
+#define SPOOL_REG_PRINTMAXRESOLUTIONSUPPORTED  ( printMaxResolutionSupported 
)
+#define SPOOL_REG_PRINTMAXXEXTENT  ( printMaxXExtent )
+#define SPOOL_REG_PRINTMAXYEXTENT  ( printMaxYExtent )
+#define SPOOL_REG_PRINTMEDIAREADY  ( printMediaReady )
+#define SPOOL_REG_PRINTMEDIASUPPORTED  ( printMediaSupported )
+#define SPOOL_REG_PRINTMEMORY  ( printMemory )
+#define SPOOL_REG_PRINTMINXEXTENT  ( printMinXExtent )
+#define SPOOL_REG_PRINTMINYEXTENT  ( printMinYExtent )
+#define SPOOL_REG_PRINTNETWORKADDRESS  ( printNetworkAddress )
+#define SPOOL_REG_PRINTNOTIFY  ( printNotify )
+#define SPOOL_REG_PRINTNUMBERUP( printNumberUp )
+#define SPOOL_REG_PRINTORIENTATIONSSUPPORTED   ( printOrientationsSupported )
+#define SPOOL_REG_PRINTOWNER   ( printOwner )
+#define SPOOL_REG_PRINTPAGESPERMINUTE  ( printPagesPerMinute )
+#define SPOOL_REG_PRINTRATE( printRate )
+#define SPOOL_REG_PRINTRATEUNIT( printRateUnit )
+#define SPOOL_REG_PRINTSEPARATORFILE   ( printSeparatorFile )
+#define SPOOL_REG_PRINTSHARENAME   ( printShareName )
+#define SPOOL_REG_PRINTSPOOLING( printSpooling )
+#define SPOOL_REGVAL_PRINTWHILESPOOLING( PrintWhileSpooling )
+#define SPOOL_REGVAL_PRINTAFTERSPOOLED ( PrintAfterSpooled )
+#define SPOOL_REGVAL_PRINTDIRECT   ( PrintDirect )
+#define SPOOL_REG_PRINTSTAPLINGSUPPORTED   ( printStaplingSupported )
+#define SPOOL_REG_PRINTSTARTTIME   ( printStartTime )
+#define SPOOL_REG_PRINTSTATUS  ( printStatus )
+#define SPOOL_REG_PRIORITY ( priority )
+#define SPOOL_REG_SERVERNAME   ( serverName )
+#define SPOOL_REG_SHORTSERVERNAME  ( shortServerName )
+#define SPOOL_REG_UNCNAME  ( uNCName )
+#define SPOOL_REG_URL  ( url )
+#define SPOOL_REG_VERSIONNUMBER( versionNumber )
 #define SPL_LOCAL_PORT ( Local Port )
 #define SPL_TCPIP_PORT ( Standard TCP/IP Port )
 #define SPL_XCV_MONITOR_LOCALMON   ( ,XcvMonitor 

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

2009-11-23 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  4eb7c54... s3-spoolss: move more defines out of nt_printing.h to 
spoolss.idl where they belong.
   via  4d640c4... s3-printing: remove unused NT_PRINTER_DRIVER_INFO_LEVEL 
structs.
   via  450a644... s3-printing: use spoolss types and structs while getting 
and deleting drivers.
   via  6de2a26... s3-printing: use spoolss types and structs while adding 
drivers.
   via  9dcb99a... s4-smbtorture: add tests for spoolss_EnumPrinterKey to 
RPC-SPOOLSS-PRINTER.
   via  f8d0eae... s3-spoolss: fix spoolss_EnumPrinterKey client and server 
code.
   via  b61da25... spoolss: fix spoolss_EnumPrinterKey IDL.
   via  9b1294c... s3-build: delete more object files for make clean.
   via  f9b1682... s3-build: really fix build of winbind_krb5_locator.
   via  05689c6... s3-build: make sure to remove libds and client object 
files on make clean.
   via  6f76254... s3-rpcclient: use the parsed binding string flags for 
auth choice.
  from  3fcf1a8... s3: Fix bug 6338 -- net rpc trustdom list always display 
none

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


- Log -
commit 4eb7c5472f84edd298cd0fc8fdffa6cfd8702304
Author: Günther Deschner g...@samba.org
Date:   Wed Nov 18 15:39:52 2009 +0100

s3-spoolss: move more defines out of nt_printing.h to spoolss.idl where 
they belong.

Guenther
(cherry picked from commit 800d6b7820bb949588a799f2835a3d6c07815571)

commit 4d640c449f74ebabb8d1d4003719a5b2735006e9
Author: Günther Deschner g...@samba.org
Date:   Tue Nov 17 12:55:45 2009 +0100

s3-printing: remove unused NT_PRINTER_DRIVER_INFO_LEVEL structs.

Guenther
(cherry picked from commit 6364c271c4daff94c641eb9e7030f3c9a7ff1ced)

commit 450a644e462073a371a8e465c16abf74fd0abdfe
Author: Günther Deschner g...@samba.org
Date:   Tue Nov 17 12:54:02 2009 +0100

s3-printing: use spoolss types and structs while getting and deleting 
drivers.

Guenther
(cherry picked from commit ec56895bdec90cc671a0d562749b3caf161dbdf8)

commit 6de2a26cc1c18b08555ff42513c7f2a685feea55
Author: Günther Deschner g...@samba.org
Date:   Mon Nov 16 15:52:31 2009 +0100

s3-printing: use spoolss types and structs while adding drivers.

Guenther
(cherry picked from commit 68cc1166d96ac81abce78a7eb60b7b86d0eb4eda)

commit 9dcb99af64eca362873220d5f03d04d63cf2b0de
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 20 16:33:29 2009 +0100

s4-smbtorture: add tests for spoolss_EnumPrinterKey to RPC-SPOOLSS-PRINTER.

Guenther
(cherry picked from commit d66b7d80d5ae1a0bf2e3d1e6718f569726da7734)

commit f8d0eae87453015b9fabc511a09079ea9c14b265
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 20 16:34:00 2009 +0100

s3-spoolss: fix spoolss_EnumPrinterKey client and server code.

Guenther
(cherry picked from commit d464151f3b47c675664f464b1645ca85de663655)

commit b61da25c37a715782a2edb9afddb0e9a8fdb45ee
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 20 12:57:13 2009 +0100

spoolss: fix spoolss_EnumPrinterKey IDL.

Guenther
(cherry picked from commit 366946f29b58a6efa7acbfe2a74b2ddbad4d32a2)

commit 9b1294c4111fd3d8805e9ea4147ac714de943059
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 20 12:54:19 2009 +0100

s3-build: delete more object files for make clean.

Guenther
(cherry picked from commit eea5a166e79b6945bb62c9202fb385179cd1)

commit f9b1682cf2d55d3c255e8a69a2b04d8f0d8fd9b1
Author: Günther Deschner g...@samba.org
Date:   Thu Nov 19 13:44:33 2009 +0100

s3-build: really fix build of winbind_krb5_locator.

Guenther
(cherry picked from commit fc9f199f2619635f73e8ee7f3b5359521d63f325)

commit 05689c61609e075b64f3a01ba1e81646fda3b9d1
Author: Günther Deschner g...@samba.org
Date:   Thu Nov 19 13:39:24 2009 +0100

s3-build: make sure to remove libds and client object files on make clean.

Guenther
(cherry picked from commit bf45447aaa35ee3b26fe76af3c73a77d7b10c2ac)

commit 6f76254c31bc61805eca2f5dd8c524ac64577b1f
Author: Günther Deschner g...@samba.org
Date:   Thu Nov 12 16:45:33 2009 +0100

s3-rpcclient: use the parsed binding string flags for auth choice.

This allows rpcclient to be called like this:

rpcclient ncacn_ip_tcp:w2k8r2[sign,seal] -U administrator%secret -c 
dscracknames gd

Guenther
(cherry picked from commit 3732798008f26052c030e8a8fc9c9404fd6f5669)

---

Summary of changes:
 librpc/gen_ndr/cli_spoolss.c|8 +-
 librpc/gen_ndr/cli_spoolss.h|4 +-
 librpc/gen_ndr/ndr_spoolss.c|   80 ++--
 librpc/gen_ndr/spoolss.h|   64 +++-
 librpc/gen_ndr/srv_spoolss.c|4 +-
 librpc/idl/spoolss.idl  |   70 +++-
 

[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Günther Deschner
The branch, master has been updated
   via  0608d6b... s4-smbtorture: fix spoolss_EnumPrinterKey client in 
RPC-SPOOLSS-WIN.
   via  513d6da... s3-printing: remove duplicate code while cleaning up 
driver structs.
  from  800d6b7... s3-spoolss: move more defines out of nt_printing.h to 
spoolss.idl where they belong.

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


- Log -
commit 0608d6b125d379221bff801a7bcc1c930bb4ed67
Author: Günther Deschner g...@samba.org
Date:   Mon Nov 23 13:35:32 2009 +0100

s4-smbtorture: fix spoolss_EnumPrinterKey client in RPC-SPOOLSS-WIN.

Guenther

commit 513d6da404fb37f87e5b658198ecfd9e35985353
Author: Günther Deschner g...@samba.org
Date:   Mon Nov 23 12:57:46 2009 +0100

s3-printing: remove duplicate code while cleaning up driver structs.

Guenther

---

Summary of changes:
 source3/printing/nt_printing.c|  107 +---
 source4/torture/rpc/spoolss_win.c |   23 +++--
 2 files changed, 58 insertions(+), 72 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 8fa29aa..7c449f9 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1608,10 +1608,17 @@ static uint32 get_correct_cversion(struct pipes_struct 
*p,
} \
 } while (0);
 
-static WERROR clean_up_driver_struct_level_3(struct pipes_struct *rpc_pipe,
-struct spoolss_AddDriverInfo3 
*driver)
+static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
+  struct pipes_struct *rpc_pipe,
+  const char *architecture,
+  const char **driver_path,
+  const char **data_file,
+  const char **config_file,
+  const char **help_file,
+  struct spoolss_StringArray 
*dependent_files,
+  uint32_t *version)
 {
-   const char *architecture;
+   const char *short_architecture;
int i;
WERROR err;
char *_p;
@@ -1622,19 +1629,19 @@ static WERROR clean_up_driver_struct_level_3(struct 
pipes_struct *rpc_pipe,
 */
/* using an intermediate string to not have overlaping memcpy()'s */
 
-   strip_driver_path(driver, driver-driver_path);
-   strip_driver_path(driver, driver-data_file);
-   strip_driver_path(driver, driver-config_file);
-   strip_driver_path(driver, driver-help_file);
+   strip_driver_path(mem_ctx, *driver_path);
+   strip_driver_path(mem_ctx, *data_file);
+   strip_driver_path(mem_ctx, *config_file);
+   strip_driver_path(mem_ctx, *help_file);
 
-   if (driver-dependent_files  driver-dependent_files-string) {
-   for (i=0; driver-dependent_files-string[i]; i++) {
-   strip_driver_path(driver, 
driver-dependent_files-string[i]);
+   if (dependent_files  dependent_files-string) {
+   for (i=0; dependent_files-string[i]; i++) {
+   strip_driver_path(mem_ctx, dependent_files-string[i]);
}
}
 
-   architecture = get_short_archi(driver-architecture);
-   if (!architecture) {
+   short_architecture = get_short_archi(architecture);
+   if (!short_architecture) {
return WERR_UNKNOWN_PRINTER_DRIVER;
}
 
@@ -1650,76 +1657,40 @@ static WERROR clean_up_driver_struct_level_3(struct 
pipes_struct *rpc_pipe,
 *  NT2K: cversion=3
 */
 
-   if ((driver-version = get_correct_cversion(rpc_pipe, architecture,
-driver-driver_path,
-err)) == -1)
+   *version = get_correct_cversion(rpc_pipe, short_architecture,
+   *driver_path, err);
+   if (*version == -1) {
return err;
-
-   return WERR_OK;
-}
-
-/
-/
-static WERROR clean_up_driver_struct_level_6(struct pipes_struct *rpc_pipe,
-struct spoolss_AddDriverInfo6 
*driver)
-{
-   const char *architecture;
-   char *_p;
-   int i;
-   WERROR err;
-
-   /* clean up the driver name.
-* we can get .\driver.dll
-* or worse c:\windows\system\driver.dll !
-*/
-   /* using an intermediate string to not have overlaping memcpy()'s */
-
-   strip_driver_path(driver, driver-driver_path);
- 

[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Stefan Metzmacher
The branch, master has been updated
   via  401ba9c... s4:dsdb Move module configuration from each ldb into 
samba_dsdb.c
   via  e297af0... s4:provision Simplify the module list
   via  83b41aa... s4/schema(tort): Refactor DSDB-SYNTAX test for better 
performance
   via  cf2bb28... s4/schema: Handle Object(OR-Name) syntax in 
extended_dn_out module
   via  1bf31f3... s4/schema: Object(OR-Name) syntax handling for DRS calls
   via  bef4e25... s4/schema(tort): Inject authOrig attribute into schema 
loaded for tests
   via  d03d15d... s4/schema(tort): Add test for Object(OR-Name) syntax
   via  aa238ff... s4/schema(tort): Test LDB_SYNTAX_DN with extended_dn in 
[GUID;SID;DN] form
   via  65e95b8... s4/drs(tort): DSSYNC test to print what is different in 
drs_msg also
  from  0608d6b... s4-smbtorture: fix spoolss_EnumPrinterKey client in 
RPC-SPOOLSS-WIN.

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


- Log -
commit 401ba9c9cf357d6b420a7401fc1a915871d96f8d
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Nov 23 20:30:35 2009 +1100

s4:dsdb Move module configuration from each ldb into samba_dsdb.c

This makes getting the module order correct, the obligation of Samba4
developers, and not system administrators.  In particular, once an ldb
is updated to use only the 'samba_dsdb' module, no further changes to the
ldb should be required when upgrading to later Samba4 versions.

(thanks to metze for the suggestion of samba_dsdb as a long-term
stable name for the module)

Andrew Bartlett

commit e297af00fad2032e79f1889fd6d2713932249bb0
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Nov 20 12:16:33 2009 +1100

s4:provision Simplify the module list

This makes the member server much more like the DC, the objectGUID
module replaces the repl_meta_data module.

We also generally rework the construction of the list, building a full
list in python, and then transforming it into a string, rather than
playing string concatonation games

Andrew Bartlett

commit 83b41aa959d1c71b26f7e9c327b5956ddfe0a267
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Sun Nov 22 22:21:12 2009 +0200

s4/schema(tort): Refactor DSDB-SYNTAX test for better performance

Test was implemented as a test fixture so that setup/teardown
occurs only once.
This should impact test performace as long as provision_get_schema()
is a slow function (especially when debugging)

commit cf2bb28014b2687bc5d971bf47f57aeb75b600c0
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Sun Nov 22 17:48:32 2009 +0200

s4/schema: Handle Object(OR-Name) syntax in extended_dn_out module

Windows displays attribute values with Object(OR-Name) syntax
in plain DN format when queried through LDAP.
Hence, we need to post-process such values specially
in extended_dn_out.c module so they are always shown as plain DN,
no matter what controls are passed for search request.

commit 1bf31f343c1e01b970a9f887bf7a8bac6334e54a
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Sun Nov 22 14:41:25 2009 +0200

s4/schema: Object(OR-Name) syntax handling for DRS calls

OR-Name syntax through DRS calls looks like DN-Binary syntax

commit bef4e25b1f1c82b49029e7d0d46b386395a4c10e
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Fri Nov 20 03:07:41 2009 +0200

s4/schema(tort): Inject authOrig attribute into schema loaded for tests

commit d03d15d0cb9003fa92be5d6d8dfb5fb652a354ae
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Sun Nov 22 14:46:09 2009 +0200

s4/schema(tort): Add test for Object(OR-Name) syntax

commit aa238ff6ea64b50027542563418d27fab2c3556c
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Fri Nov 20 03:15:38 2009 +0200

s4/schema(tort): Test LDB_SYNTAX_DN with extended_dn in [GUID;SID;DN] form

commit 65e95b8aa91cdd4de99bb3b698687e425026021f
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Mon Nov 16 23:49:51 2009 +0200

s4/drs(tort): DSSYNC test to print what is different in drs_msg also

---

Summary of changes:
 source4/dsdb/common/dsdb_dn.c|2 +
 source4/dsdb/common/dsdb_dn.h|5 +-
 source4/dsdb/samdb/ldb_modules/config.mk |   11 +
 source4/dsdb/samdb/ldb_modules/extended_dn_out.c |   16 +-
 source4/dsdb/samdb/ldb_modules/partition.h   |2 +
 source4/dsdb/samdb/ldb_modules/partition_init.c  |   27 ++-
 source4/dsdb/samdb/ldb_modules/samba_dsdb.c  |  360 ++
 source4/dsdb/samdb/samdb.h   |2 +
 source4/dsdb/schema/schema_syntax.c  |   10 +-
 source4/dsdb/schema/tests/schema_syntax.c|  168 +--
 

[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Volker Lendecke
The branch, master has been updated
   via  664bc88... s3-winbind: In _wbint_CheckMachineAccount, there is only 
one child domain ever
   via  e8ef799... s3: Move a variable declaration to its only use
  from  401ba9c... s4:dsdb Move module configuration from each ldb into 
samba_dsdb.c

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


- Log -
commit 664bc885d9a7b1be5a9aacc2681ca8774d3324eb
Author: Volker Lendecke v...@samba.org
Date:   Mon Nov 23 13:58:23 2009 +0100

s3-winbind: In _wbint_CheckMachineAccount, there is only one child domain 
ever

commit e8ef799c4b6d8da0104b52ebbbf9d96d2b3a8fe7
Author: Volker Lendecke v...@samba.org
Date:   Mon Nov 23 11:54:19 2009 +0100

s3: Move a variable declaration to its only use

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index e9e632a..f8e1927 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1470,7 +1470,6 @@ static NTSTATUS open_file_ntcreate(connection_struct 
*conn,
struct share_mode_lock *lck = NULL;
uint32 open_access_mask = access_mask;
NTSTATUS status;
-   int ret_flock;
char *parent_dir;
 
ZERO_STRUCT(id);
@@ -2092,6 +2091,7 @@ static NTSTATUS open_file_ntcreate(connection_struct 
*conn,
   note that GPFS supports it as well - jmcd */
 
if (fsp-fh-fd != -1) {
+   int ret_flock;
ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, share_access, 
access_mask);
if(ret_flock == -1 ){
 
diff --git a/source3/winbindd/winbindd_dual_srv.c 
b/source3/winbindd/winbindd_dual_srv.c
index f0bbee9..49463d6 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -404,12 +404,12 @@ NTSTATUS _wbint_CheckMachineAccount(pipes_struct *p,
int num_retries = 0;
NTSTATUS status;
 
-again:
domain = wb_child_domain();
if (domain == NULL) {
return NT_STATUS_REQUEST_NOT_ACCEPTED;
}
 
+again:
invalidate_cm_connection(domain-conn);
 
{


-- 
Samba Shared Repository


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

2009-11-23 Thread Volker Lendecke
The branch, v3-5-test has been updated
   via  7009361... s3-winbind: In _wbint_CheckMachineAccount, there is only 
one child domain ever
   via  e6e439f... s3: Move a variable declaration to its only use
  from  4eb7c54... s3-spoolss: move more defines out of nt_printing.h to 
spoolss.idl where they belong.

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


- Log -
commit 7009361f391176c8e9e3a6fac3fbf5d7dab7fcb9
Author: Volker Lendecke v...@samba.org
Date:   Mon Nov 23 13:58:23 2009 +0100

s3-winbind: In _wbint_CheckMachineAccount, there is only one child domain 
ever

commit e6e439f0a4d6d1b9ffb9c5b055f5fecec3259795
Author: Volker Lendecke v...@samba.org
Date:   Mon Nov 23 11:54:19 2009 +0100

s3: Move a variable declaration to its only use

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 98984b8..911e8fd 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1470,7 +1470,6 @@ static NTSTATUS open_file_ntcreate(connection_struct 
*conn,
struct share_mode_lock *lck = NULL;
uint32 open_access_mask = access_mask;
NTSTATUS status;
-   int ret_flock;
char *parent_dir;
 
ZERO_STRUCT(id);
@@ -2091,6 +2090,7 @@ static NTSTATUS open_file_ntcreate(connection_struct 
*conn,
   note that GPFS supports it as well - jmcd */
 
if (fsp-fh-fd != -1) {
+   int ret_flock;
ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, share_access, 
access_mask);
if(ret_flock == -1 ){
 
diff --git a/source3/winbindd/winbindd_dual_srv.c 
b/source3/winbindd/winbindd_dual_srv.c
index f0bbee9..49463d6 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -404,12 +404,12 @@ NTSTATUS _wbint_CheckMachineAccount(pipes_struct *p,
int num_retries = 0;
NTSTATUS status;
 
-again:
domain = wb_child_domain();
if (domain == NULL) {
return NT_STATUS_REQUEST_NOT_ACCEPTED;
}
 
+again:
invalidate_cm_connection(domain-conn);
 
{


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  81c4668... s4:ldap.py - Add a check for the generated schemaIDGUID
  from  664bc88... s3-winbind: In _wbint_CheckMachineAccount, there is only 
one child domain ever

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


- Log -
commit 81c46686db36eaffd25c013f19094b01a8406c6a
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Mon Nov 23 16:20:07 2009 +0100

s4:ldap.py - Add a check for the generated schemaIDGUID

I've forgotten to add this when checking in the reworked SAMLDB module

---

Summary of changes:
 source4/lib/ldb/tests/python/ldap.py |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/tests/python/ldap.py 
b/source4/lib/ldb/tests/python/ldap.py
index f9801e2..94bdf7e 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -1990,6 +1990,7 @@ name:  + object_name + 
 res = self.ldb.search(cn=%s,%s % (attr_name, self.schema_dn), 
scope=SCOPE_BASE, attrs=[*])
 self.assertEquals(len(res), 1)
 self.assertEquals(res[0][lDAPDisplayName][0], attr_ldap_display_name)
+self.assertTrue(schemaIDGUID in res[0])
 
 # Search for created objectclass
 res = []
@@ -1997,6 +1998,7 @@ name:  + object_name + 
 self.assertEquals(len(res), 1)
 self.assertEquals(res[0][lDAPDisplayName][0], 
class_ldap_display_name)
 self.assertEquals(res[0][defaultObjectCategory][0], 
res[0][distinguishedName][0])
+self.assertTrue(schemaIDGUID in res[0])
 
 # Search for created object
 res = []


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Volker Lendecke
The branch, master has been updated
   via  a1a81ef... Revert s3: Make the implicit reference to Protocol in 
mask_match() explicit
   via  d6e55d8... Revert s3: Make the implicit reference to Protocol in 
mask_match_list() explicit
   via  5c4885a... Revert s3: Make the implicit reference to Protocol in 
is_in_path() explicit
   via  7930206... Revert s3: Make the implicit reference to get_Protocol 
in lp_use_sendfile() explicit
   via  0f8e2a6... Revert s3: Move the global variable Protocol to struct 
smbd_server_connection
  from  81c4668... s4:ldap.py - Add a check for the generated schemaIDGUID

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


- Log -
commit a1a81ef785b2372bd4aab0304150b0f8b0fac247
Author: Volker Lendecke v...@samba.org
Date:   Mon Nov 23 16:34:07 2009 +0100

Revert s3: Make the implicit reference to Protocol in mask_match() 
explicit

This reverts commit e23d8a3d1f558a7e98ef2afd71e1d15c5b3a71bc.

commit d6e55d8ec0335cd2494ca54f1471fad4e2b69795
Author: Volker Lendecke v...@samba.org
Date:   Mon Nov 23 16:34:00 2009 +0100

Revert s3: Make the implicit reference to Protocol in mask_match_list() 
explicit

This reverts commit 1e22899d268ae5a089f941a204413c07ee64fc78.

commit 5c4885a26bbdc1a5086417b63395debd2670db85
Author: Volker Lendecke v...@samba.org
Date:   Mon Nov 23 16:33:53 2009 +0100

Revert s3: Make the implicit reference to Protocol in is_in_path() 
explicit

This reverts commit f7b4151a64d8c6851e62255a7139fd00a5fc63a3.

commit 7930206f5c80b15aded213c3f438ff0120fdea2c
Author: Volker Lendecke v...@samba.org
Date:   Mon Nov 23 16:33:45 2009 +0100

Revert s3: Make the implicit reference to get_Protocol in 
lp_use_sendfile() explicit

This reverts commit 6a149022976fe6a5579ec9afc7a4d2dcb44dc8af.

commit 0f8e2a6ebb716588e741c2cdd8e9918262fdd4c6
Author: Volker Lendecke v...@samba.org
Date:   Mon Nov 23 16:33:26 2009 +0100

Revert s3: Move the global variable Protocol to struct 
smbd_server_connection

This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.

---

Summary of changes:
 source3/client/client.c   |3 +--
 source3/client/clitar.c   |9 ++---
 source3/include/proto.h   |   16 ++--
 source3/include/smb.h |1 -
 source3/include/smb_macros.h  |3 +++
 source3/lib/util.c|   29 ++---
 source3/modules/onefs_open.c  |3 +--
 source3/modules/vfs_preopen.c |3 +--
 source3/param/loadparm.c  |5 ++---
 source3/smbd/dir.c|4 +---
 source3/smbd/dosmode.c|   12 
 source3/smbd/filename.c   |3 +--
 source3/smbd/globals.c|   10 --
 source3/smbd/globals.h|1 -
 source3/smbd/negprot.c|   13 ++---
 source3/smbd/nttrans.c|2 +-
 source3/smbd/open.c   |5 ++---
 source3/smbd/process.c|1 -
 source3/smbd/reply.c  |   28 +---
 source3/smbd/sesssetup.c  |4 ++--
 source3/smbd/smb2_negprot.c   |2 +-
 source3/smbd/trans2.c |   11 ---
 22 files changed, 65 insertions(+), 103 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/client.c b/source3/client/client.c
index 19efa03..6773e6d 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -472,8 +472,7 @@ static bool do_this_one(file_info *finfo)
}
 
if (*client_get_fileselection() 
-   !mask_match(finfo-name, client_get_fileselection(),
-   PROTOCOL_NONE, false)) {
+   !mask_match(finfo-name,client_get_fileselection(),false)) {
DEBUG(3,(mask_match %s failed\n, finfo-name));
return false;
}
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 7a956f9..d973329 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -827,9 +827,7 @@ static void do_tar(file_info *finfo, const char *dir)
DEBUG(5, (...tar_re_search: %d\n, tar_re_search));
 
if ((!tar_re_search  clipfind(cliplist, clipn, exclaim)) ||
-   (tar_re_search
- mask_match_list(exclaim, cliplist, clipn,
-   PROTOCOL_NONE, True))) {
+   (tar_re_search  mask_match_list(exclaim, 
cliplist, clipn, True))) {
DEBUG(3,(Skipping file %s\n, exclaim));
TALLOC_FREE(exclaim);
return;
@@ -1212,10 +1210,7 @@ static void do_tarput(void)
/* Well, now we have a header, process the file ...
*/
/* Should we skip the file? We have the long name as well here 
*/
skip = clipn  ((!tar_re_search  

[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Günther Deschner
The branch, master has been updated
   via  a614298... s3-spoolss: Fix GetPrinter level 101.
  from  a1a81ef... Revert s3: Make the implicit reference to Protocol in 
mask_match() explicit

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


- Log -
commit a6142987ac164318f5023eaa91e4e65efada4423
Author: Günther Deschner g...@samba.org
Date:   Mon Nov 23 16:54:34 2009 +0100

s3-spoolss: Fix GetPrinter level 101.

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 4f3bf73..072090b 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -4946,7 +4946,7 @@ static WERROR 
spoolss_DriverFileInfo_from_driver(TALLOC_CTX *mem_ctx,
count++;
}
 
-   for (i=0; driver-info3.dependent_files[i][0] != '\0'; i++) {
+   for (i=0; driver-info3.dependent_files[i]  
driver-info3.dependent_files[i][0] != '\0'; i++) {
info = TALLOC_REALLOC_ARRAY(mem_ctx, info,
struct spoolss_DriverFileInfo,
count + 1);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Jeremy Allison
The branch, master has been updated
   via  7ebe5b1... Fix bug #6898 - Samba duplicates file content on 
appending Clients using a Windows open call should not be able to set 
FILE_FLAG_POSIX_SEMANTICS in an open. Jeremy.
  from  a614298... s3-spoolss: Fix GetPrinter level 101.

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


- Log -
commit 7ebe5b16416a3a09ff8840ab84079fde022a957c
Author: Jeremy Allison j...@samba.org
Date:   Mon Nov 23 10:09:47 2009 -0800

Fix bug #6898 - Samba duplicates file content on appending
Clients using a Windows open call should not be able to set
FILE_FLAG_POSIX_SEMANTICS in an open.
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index bacb9cb..5c6d780 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -418,6 +418,11 @@ void reply_ntcreate_and_X(struct smb_request *req)
flags = IVAL(req-vwv+3, 1);
access_mask = IVAL(req-vwv+7, 1);
file_attributes = IVAL(req-vwv+13, 1);
+   /*
+* Bug #6898 - clients using Windows opens should
+* never be able to set this attribute.
+*/
+   file_attributes = ~FILE_FLAG_POSIX_SEMANTICS;
share_access = IVAL(req-vwv+15, 1);
create_disposition = IVAL(req-vwv+17, 1);
create_options = IVAL(req-vwv+19, 1);
@@ -913,6 +918,11 @@ static void call_nt_transact_create(connection_struct 
*conn,
flags = IVAL(params,0);
access_mask = IVAL(params,8);
file_attributes = IVAL(params,20);
+   /*
+* Bug #6898 - clients using Windows opens should
+* never be able to set this attribute.
+*/
+   file_attributes = ~FILE_FLAG_POSIX_SEMANTICS;
share_access = IVAL(params,24);
create_disposition = IVAL(params,28);
create_options = IVAL(params,32);


-- 
Samba Shared Repository


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

2009-11-23 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  b0fc15e... Fix bug #6898 - Samba duplicates file content on 
appending Clients using a Windows open call should not be able to set 
FILE_FLAG_POSIX_SEMANTICS in an open. Jeremy. (cherry picked from commit 
7ebe5b16416a3a09ff8840ab84079fde022a957c)
  from  7009361... s3-winbind: In _wbint_CheckMachineAccount, there is only 
one child domain ever

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


- Log -
commit b0fc15e36714302cd398c4da52673fd1b4361fba
Author: Jeremy Allison j...@samba.org
Date:   Mon Nov 23 10:09:47 2009 -0800

Fix bug #6898 - Samba duplicates file content on appending
Clients using a Windows open call should not be able to set
FILE_FLAG_POSIX_SEMANTICS in an open.
Jeremy.
(cherry picked from commit 7ebe5b16416a3a09ff8840ab84079fde022a957c)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index bacb9cb..5c6d780 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -418,6 +418,11 @@ void reply_ntcreate_and_X(struct smb_request *req)
flags = IVAL(req-vwv+3, 1);
access_mask = IVAL(req-vwv+7, 1);
file_attributes = IVAL(req-vwv+13, 1);
+   /*
+* Bug #6898 - clients using Windows opens should
+* never be able to set this attribute.
+*/
+   file_attributes = ~FILE_FLAG_POSIX_SEMANTICS;
share_access = IVAL(req-vwv+15, 1);
create_disposition = IVAL(req-vwv+17, 1);
create_options = IVAL(req-vwv+19, 1);
@@ -913,6 +918,11 @@ static void call_nt_transact_create(connection_struct 
*conn,
flags = IVAL(params,0);
access_mask = IVAL(params,8);
file_attributes = IVAL(params,20);
+   /*
+* Bug #6898 - clients using Windows opens should
+* never be able to set this attribute.
+*/
+   file_attributes = ~FILE_FLAG_POSIX_SEMANTICS;
share_access = IVAL(params,24);
create_disposition = IVAL(params,28);
create_options = IVAL(params,32);


-- 
Samba Shared Repository


[SCM] CTDB repository - branch status-test updated - ctdb-1.0.104-10-gc5f7981

2009-11-23 Thread Ronnie Sahlberg
The branch, status-test has been updated
   via  c5f798116bf3b7954e23c7267b056ee1f5560f45 (commit)
  from  f1e350f9edb74cc44b6c5be4c062fd93e98ba8c4 (commit)

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


- Log -
commit c5f798116bf3b7954e23c7267b056ee1f5560f45
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Nov 24 07:40:51 2009 +1100

rework and simplify the eventscript handling

---

Summary of changes:
 include/ctdb_private.h |   11 ++-
 server/eventscript.c   |  251 +++
 2 files changed, 109 insertions(+), 153 deletions(-)


Changeset truncated at 500 lines:

diff --git a/include/ctdb_private.h b/include/ctdb_private.h
index ba6a675..bee921d 100644
--- a/include/ctdb_private.h
+++ b/include/ctdb_private.h
@@ -448,12 +448,15 @@ struct ctdb_context {
int start_as_disabled;
int start_as_stopped;
uint32_t event_script_timeouts; /* counting how many consecutive times 
an eventscript has timedout */
-   TALLOC_CTX *eventscripts_ctx; /* a context to hold data for the 
RUN_EVENTSCRIPTS control */
uint32_t *recd_ping_count;
TALLOC_CTX *release_ips_ctx; /* a context used to automatically drop 
all IPs if we fail to recover the node */
-   TALLOC_CTX *script_monitor_ctx; /* a context where we store results 
while running the monitor event */
-   TALLOC_CTX *last_monitor_ctx; 
-   TALLOC_CTX *event_script_ctx;  /* non-monitoring events */
+
+   TALLOC_CTX *monitor_event_script_ctx;
+   TALLOC_CTX *other_event_script_ctx;
+
+   struct ctdb_monitor_script_status_ctx *current_monitor_status_ctx; 
+   struct ctdb_monitor_script_status_ctx *last_monitor_status_ctx; 
+
TALLOC_CTX *banning_ctx;
 };
 
diff --git a/server/eventscript.c b/server/eventscript.c
index 4c193c8..1e76cd6 100644
--- a/server/eventscript.c
+++ b/server/eventscript.c
@@ -65,7 +65,6 @@ struct ctdb_event_script_state {
int fd[2];
void *private_data;
const char *options;
-struct timed_event *te;
struct timeval timeout;
 };
 
@@ -81,28 +80,22 @@ struct ctdb_monitor_script_status {
char *output;
 };
 
-struct ctdb_monitor_status {
-   struct timeval start;
-   struct timeval finished;
-   int32_t status;
+struct ctdb_monitor_script_status_ctx {
struct ctdb_monitor_script_status *scripts;
-   struct ctdb_event_script_state *state;
 };
 
-
 /* called from ctdb_logging when we have received output on STDERR from
  * one of the eventscripts
  */
 int ctdb_log_event_script_output(struct ctdb_context *ctdb, char *str, 
uint16_t len)
 {
-   struct ctdb_monitor_status *monitoring_status = (struct 
ctdb_monitor_status *)ctdb-script_monitor_ctx;
struct ctdb_monitor_script_status *script;
 
-   if (monitoring_status == NULL) {
+   if (ctdb-current_monitor_status_ctx == NULL) {
return -1;
}
 
-   script = monitoring_status-scripts;
+   script = ctdb-current_monitor_status_ctx-scripts;
if (script == NULL) {
return -1;
}
@@ -121,17 +114,13 @@ int ctdb_log_event_script_output(struct ctdb_context 
*ctdb, char *str, uint16_t
  */
 int32_t ctdb_control_event_script_init(struct ctdb_context *ctdb)
 {
-   struct ctdb_monitor_status *monitoring_status = (struct 
ctdb_monitor_status *)ctdb-script_monitor_ctx;
-
DEBUG(DEBUG_INFO, (event script init called\n));
 
-   if (monitoring_status == NULL) {
-   DEBUG(DEBUG_ERR,(__location__  Init called when context is 
NULL\n));
-   return 0;
+   if (ctdb-current_monitor_status_ctx == NULL) {
+   DEBUG(DEBUG_ERR,(__location__  current_monitor_status_ctx is 
NULL when initing script\n));
+   return -1;
}
 
-   monitoring_status-start = timeval_current();   
-
return 0;
 }
 
@@ -142,41 +131,26 @@ int32_t ctdb_control_event_script_init(struct 
ctdb_context *ctdb)
 int32_t ctdb_control_event_script_start(struct ctdb_context *ctdb, TDB_DATA 
indata)
 {
const char *name = (const char *)indata.dptr;
-   struct ctdb_monitor_status *monitoring_status = (struct 
ctdb_monitor_status *)ctdb-script_monitor_ctx;
-   struct ctdb_event_script_state *state;
struct ctdb_monitor_script_status *script;
 
DEBUG(DEBUG_INFO, (event script start called : %s\n, name));
 
-   if (monitoring_status == NULL) {
-   DEBUG(DEBUG_ERR,(__location__  script_status is NULL when 
starting to run script %s\n, name));
+   if (ctdb-current_monitor_status_ctx == NULL) {
+   DEBUG(DEBUG_ERR,(__location__  current_monitor_status_ctx is 
NULL when starting script\n));
return -1;
}
 
-   script = talloc_zero(monitoring_status, struct 

[SCM] CTDB repository - branch master updated - ctdb-1.0.105-2-gfbc4537

2009-11-23 Thread Ronnie Sahlberg
The branch, master has been updated
   via  fbc453733d53359b9eba34a7ca9123237a7ecca5 (commit)
  from  c4b05a731e1bee8f5b46529773a4f5389b2b6064 (commit)

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


- Log -
commit fbc453733d53359b9eba34a7ca9123237a7ecca5
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Nov 24 09:27:22 2009 +1100

reduce the log level for three vacuuming related log messages

---

Summary of changes:
 server/ctdb_vacuum.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_vacuum.c b/server/ctdb_vacuum.c
index da887db..97a7dfb 100644
--- a/server/ctdb_vacuum.c
+++ b/server/ctdb_vacuum.c
@@ -725,7 +725,7 @@ static int vacuum_child_destructor(struct 
ctdb_vacuum_child_context *child_ctx)
struct ctdb_db_context *ctdb_db = child_ctx-vacuum_handle-ctdb_db;
struct ctdb_context *ctdb = ctdb_db-ctdb;
 
-   DEBUG(DEBUG_ERR,(Vacuuming took %.3f seconds for database %s\n, l, 
ctdb_db-db_name));
+   DEBUG(DEBUG_INFO,(Vacuuming took %.3f seconds for database %s\n, l, 
ctdb_db-db_name));
 
if (child_ctx-child_pid != -1) {
kill(child_ctx-child_pid, SIGKILL);
@@ -764,7 +764,7 @@ static void vacuum_child_handler(struct event_context *ev, 
struct fd_event *fde,
char c = 0;
int ret;
 
-   DEBUG(DEBUG_NOTICE,(Vacuuming child process %d finished for db %s\n, 
child_ctx-child_pid, child_ctx-vacuum_handle-ctdb_db-db_name));
+   DEBUG(DEBUG_INFO,(Vacuuming child process %d finished for db %s\n, 
child_ctx-child_pid, child_ctx-vacuum_handle-ctdb_db-db_name));
child_ctx-child_pid = -1;
 
ret = read(child_ctx-fd[0], c, 1);
@@ -827,7 +827,7 @@ ctdb_vacuum_event(struct event_context *ev, struct 
timed_event *te,
char cc = 0;
close(child_ctx-fd[0]);
 
-   DEBUG(DEBUG_NOTICE,(Vacuuming child process %d for db %s 
started\n, getpid(), ctdb_db-db_name));
+   DEBUG(DEBUG_INFO,(Vacuuming child process %d for db %s 
started\n, getpid(), ctdb_db-db_name));

if (switch_from_server_to_client(ctdb) != 0) {
DEBUG(DEBUG_CRIT, (__location__ ERROR: failed to 
switch vacuum daemon into client mode. Shutting down.\n));


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Michael Adam
The branch, master has been updated
   via  632e4af... s3:idmap_ldap: fix indentation: tab/space mixup
  from  7ebe5b1... Fix bug #6898 - Samba duplicates file content on 
appending Clients using a Windows open call should not be able to set 
FILE_FLAG_POSIX_SEMANTICS in an open. Jeremy.

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


- Log -
commit 632e4afc3611511f78a1d5c45e0a91cd00334d28
Author: Michael Adam ob...@samba.org
Date:   Fri Nov 20 15:03:59 2009 +0100

s3:idmap_ldap: fix indentation: tab/space mixup

Michael

---

Summary of changes:
 source3/winbindd/idmap_ldap.c |   28 ++--
 1 files changed, 14 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index cf32238..22736c6 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -571,9 +571,9 @@ static NTSTATUS idmap_ldap_get_hwm(struct unixid *xid)
CHECK_ALLOC_DONE(attr_list);
 
rc = smbldap_search(idmap_alloc_ldap-smbldap_state,
-   idmap_alloc_ldap-suffix,
-  LDAP_SCOPE_SUBTREE, filter,
-  attr_list, 0, result);
+   idmap_alloc_ldap-suffix,
+   LDAP_SCOPE_SUBTREE, filter,
+   attr_list, 0, result);
 
if (rc != LDAP_SUCCESS) {
DEBUG(0,(%s object not found\n, LDAP_OBJ_IDPOOL));
@@ -858,15 +858,15 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain 
*dom,
 
trim_char(ctx-url, '\', '\');
 
-tmp = lp_parm_const_string(-1, config_option, ldap_base_dn, NULL);
-if ( ! tmp || ! *tmp) {
-tmp = lp_ldap_idmap_suffix();
-if ( ! tmp) {
-DEBUG(1, (ERROR: missing idmap ldap suffix\n));
-ret = NT_STATUS_UNSUCCESSFUL;
-goto done;
+   tmp = lp_parm_const_string(-1, config_option, ldap_base_dn, NULL);
+   if ( ! tmp || ! *tmp) {
+   tmp = lp_ldap_idmap_suffix();
+   if ( ! tmp) {
+   DEBUG(1, (ERROR: missing idmap ldap suffix\n));
+   ret = NT_STATUS_UNSUCCESSFUL;
+   goto done;
}
-}
+   }
 
ctx-suffix = talloc_strdup(ctx, tmp);
CHECK_ALLOC_DONE(ctx-suffix);
@@ -878,7 +878,7 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom,
goto done;
}
 
-ret = get_credentials( ctx, ctx-smbldap_state, config_option,
+   ret = get_credentials( ctx, ctx-smbldap_state, config_option,
   dom, ctx-user_dn );
if ( !NT_STATUS_IS_OK(ret) ) {
DEBUG(1,(idmap_ldap_db_init: Failed to get connection 
@@ -1025,7 +1025,7 @@ again:
 
for (i = 0; i  count; i++) {
char *sidstr = NULL;
-   char *tmp = NULL;
+   char *tmp = NULL;
enum id_type type;
struct id_map *map;
uint32_t id;
@@ -1164,7 +1164,7 @@ static struct id_map *find_map_by_sid(struct id_map 
**maps, DOM_SID *sid)
 static NTSTATUS idmap_ldap_sids_to_unixids(struct idmap_domain *dom,
   struct id_map **ids)
 {
-   LDAPMessage *entry = NULL;
+   LDAPMessage *entry = NULL;
NTSTATUS ret;
TALLOC_CTX *memctx;
struct idmap_ldap_context *ctx;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Michael Adam
The branch, master has been updated
   via  8353d47... s3: add dbwrap_torture - a tool to stress test tdb 
transactions through dbwrap
   via  63a801e... s3:torture: move the torture-specific headers to new 
torture/torture.h
  from  632e4af... s3:idmap_ldap: fix indentation: tab/space mixup

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


- Log -
commit 8353d47e9b2eda9d5711610b672a183eb414c6a3
Author: Michael Adam ob...@samba.org
Date:   Sat Nov 21 00:48:40 2009 +0100

s3: add dbwrap_torture - a tool to stress test tdb transactions through 
dbwrap

This can be used to also test tdb transactions on clustered installations
throught ctdb. The test is modeled after the ctdb_transaction.c test program
from the ctdb source code. It runs transactions in a tight loop on a test
database called transactions.tdb (by default), increasing a counter in 
each
iteration. In a clustered environment, a counter is maintained for each 
node.

Michael

commit 63a801e5c931e401351b02445704800d1103417c
Author: Michael Adam ob...@samba.org
Date:   Fri Nov 20 17:47:21 2009 +0100

s3:torture: move the torture-specific headers to new torture/torture.h

Michael

---

Summary of changes:
 source3/Makefile.in|   20 +++-
 source3/include/proto.h|   55 ---
 source3/torture/denytest.c |1 +
 source3/torture/mangle_test.c  |1 +
 source3/torture/nbio.c |1 +
 source3/torture/scanner.c  |1 +
 source3/torture/torture.c  |1 +
 source3/torture/torture.h  |   81 +
 source3/torture/utable.c   |1 +
 source3/utils/dbwrap_torture.c |  350 
 10 files changed, 456 insertions(+), 56 deletions(-)
 create mode 100644 source3/torture/torture.h
 create mode 100644 source3/utils/dbwrap_torture.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 724c221..28be9d1 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -234,7 +234,8 @@ EVERYTHING_PROGS = bin/debug2h...@exeext@ 
bin/smbfil...@exeext@ \
$(TALLOCTORT) bin/replacet...@exeext@ \
bin/log2p...@exeext@ \
bin/v...@exeext@ bin/smbic...@exeext@ \
-   bin/dbwrap_t...@exeext@
+   bin/dbwrap_t...@exeext@ \
+   bin/dbwrap_tort...@exeext@
 
 PAM_MODULES = @PAM_MODULES@
 
@@ -1338,6 +1339,12 @@ DBWRAP_TOOL_OBJ = utils/dbwrap_tool.o \
  $(LIB_NONSMBD_OBJ) \
  $(LIBSAMBA_OBJ)
 
+DBWRAP_TORTURE_OBJ = utils/dbwrap_torture.o \
+$(PARAM_OBJ) \
+$(LIB_NONSMBD_OBJ) \
+$(LIBSAMBA_OBJ) \
+$(POPT_LIB_OBJ)
+
 ##
 # now the rules...
 ##
@@ -2912,6 +2919,17 @@ bin/dbwrap_t...@exeext@: $(DBWRAP_TOOL_OBJ) $(LIBTALLOC) 
$(LIBTDB)
 install-dbwrap_tool:: bin/dbwrap_t...@exeext@
@$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) 
$(BINDIR) $
 
+bin/dbwrap_tort...@exeext@: $(DBWRAP_TORTURE_OBJ) $(LIBTALLOC) $(LIBTDB)
+   @echo Linking $@
+   @$(CC) -o $@ $(DBWRAP_TORTURE_OBJ)\
+   $(LDFLAGS) $(DYNEEXP) $(LIBS) \
+   $(LDAP_LIBS) \
+   $(POPT_LIBS) \
+   $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+
+install-dbwrap_torture:: bin/dbwrap_tort...@exeext@
+   @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) 
$(BINDIR) $
+
 install:: installservers installbin @INSTALL_CIFSMOUNT@ @INSTALL_CIFSUMOUNT@ 
@INSTALL_CIFSUPCALL@ installman \
installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ 
\
@INSTALL_PAM_MODULES@ installlibs installmo
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 88f6dd5..5b1ce74 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -7163,61 +7163,6 @@ int vfs_lstat_smb_fname(struct connection_struct *conn, 
const char *fname,
SMB_STRUCT_STAT *psbuf);
 NTSTATUS vfs_stat_fsp(files_struct *fsp);
 
-/* The following definitions come from torture/denytest.c  */
-
-bool torture_denytest1(int dummy);
-bool torture_denytest2(int dummy);
-
-/* The following definitions come from torture/mangle_test.c  */
-
-bool torture_mangle(int dummy);
-
-/* The following definitions come from torture/nbio.c  */
-
-double nbio_total(void);
-void nb_alarm(int ignore);
-void nbio_shmem(int n);
-void nb_setup(struct cli_state *cli);
-void nb_unlink(const char *fname);
-void nb_createx(const char *fname, 
-   unsigned create_options, unsigned create_disposition, int 
handle);
-void nb_writex(int handle, int offset, int size, int ret_size);
-void nb_readx(int handle, int offset, int 

[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Jeremy Allison
The branch, master has been updated
   via  f8bd055... Proper fix for #6898 - Samba duplicates file content on 
appending. Pointed out by Volker.Restores the pathname handling for 
FILE_FLAG_POSIX_SEMANTICS but still prevents the O_APPEND problems. Jeremy.
  from  8353d47... s3: add dbwrap_torture - a tool to stress test tdb 
transactions through dbwrap

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


- Log -
commit f8bd0559ada056722d7d5ae0286753e7c591650b
Author: Jeremy Allison j...@samba.org
Date:   Mon Nov 23 15:01:34 2009 -0800

Proper fix for #6898 - Samba duplicates file content on appending. Pointed 
out by Volker.Restores the pathname handling for FILE_FLAG_POSIX_SEMANTICS but 
still prevents the O_APPEND problems. Jeremy.

---

Summary of changes:
 source3/include/smb.h   |1 +
 source3/smbd/filename.c |3 ++-
 source3/smbd/nttrans.c  |   30 ++
 3 files changed, 21 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index a3acb7c..0968984 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1954,6 +1954,7 @@ struct smb_file_time {
 #define UCF_SAVE_LCOMP 0x0001
 #define UCF_ALWAYS_ALLOW_WCARD_LCOMP   0x0002
 #define UCF_COND_ALLOW_WCARD_LCOMP 0x0004
+#define UCF_POSIX_PATHNAMES0x0008
 
 /*
  * smb_filename
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 5d6661d..16e3631 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -238,7 +238,8 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
}
}
 
-   posix_pathnames = lp_posix_pathnames();
+   posix_pathnames = (lp_posix_pathnames() ||
+   (ucf_flags  UCF_POSIX_PATHNAMES));
 
/*
 * Strip off the stream, and add it back when we're done with the
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 5c6d780..9e98291 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -418,11 +418,6 @@ void reply_ntcreate_and_X(struct smb_request *req)
flags = IVAL(req-vwv+3, 1);
access_mask = IVAL(req-vwv+7, 1);
file_attributes = IVAL(req-vwv+13, 1);
-   /*
-* Bug #6898 - clients using Windows opens should
-* never be able to set this attribute.
-*/
-   file_attributes = ~FILE_FLAG_POSIX_SEMANTICS;
share_access = IVAL(req-vwv+15, 1);
create_disposition = IVAL(req-vwv+17, 1);
create_options = IVAL(req-vwv+19, 1);
@@ -483,7 +478,8 @@ void reply_ntcreate_and_X(struct smb_request *req)
conn,
req-flags2  FLAGS2_DFS_PATHNAMES,
fname,
-   0,
+   (file_attributes  FILE_FLAG_POSIX_SEMANTICS) ?
+   UCF_POSIX_PATHNAMES : 0,
NULL,
smb_fname);
 
@@ -498,6 +494,13 @@ void reply_ntcreate_and_X(struct smb_request *req)
goto out;
}
 
+   /*
+* Bug #6898 - clients using Windows opens should
+* never be able to set this attribute into the
+* VFS.
+*/
+   file_attributes = ~FILE_FLAG_POSIX_SEMANTICS;
+
status = SMB_VFS_CREATE_FILE(
conn,   /* conn */
req,/* req */
@@ -918,11 +921,6 @@ static void call_nt_transact_create(connection_struct 
*conn,
flags = IVAL(params,0);
access_mask = IVAL(params,8);
file_attributes = IVAL(params,20);
-   /*
-* Bug #6898 - clients using Windows opens should
-* never be able to set this attribute.
-*/
-   file_attributes = ~FILE_FLAG_POSIX_SEMANTICS;
share_access = IVAL(params,24);
create_disposition = IVAL(params,28);
create_options = IVAL(params,32);
@@ -1004,7 +1002,8 @@ static void call_nt_transact_create(connection_struct 
*conn,
conn,
req-flags2  FLAGS2_DFS_PATHNAMES,
fname,
-   0,
+   (file_attributes  FILE_FLAG_POSIX_SEMANTICS) ?
+   UCF_POSIX_PATHNAMES : 0,
NULL,
smb_fname);
 
@@ -1025,6 +1024,13 @@ static void call_nt_transact_create(connection_struct 
*conn,
? BATCH_OPLOCK : 0;
}
 
+   /*
+* Bug #6898 - clients using Windows opens should
+* never be able to set this attribute into the
+* VFS.
+*/
+   

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

2009-11-23 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  450... Proper fix for #6898 - Samba duplicates file content on 
appending. Pointed out by Volker.Restores the pathname handling for 
FILE_FLAG_POSIX_SEMANTICS but still prevents the O_APPEND problems. Jeremy. 
(cherry picked from commit f8bd0559ada056722d7d5ae0286753e7c591650b)
  from  b0fc15e... Fix bug #6898 - Samba duplicates file content on 
appending Clients using a Windows open call should not be able to set 
FILE_FLAG_POSIX_SEMANTICS in an open. Jeremy. (cherry picked from commit 
7ebe5b16416a3a09ff8840ab84079fde022a957c)

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


- Log -
commit 4504fb9a8ff8eaa3b64c8cae42c5b8a77027
Author: Jeremy Allison j...@samba.org
Date:   Mon Nov 23 15:01:34 2009 -0800

Proper fix for #6898 - Samba duplicates file content on appending. Pointed 
out by Volker.Restores the pathname handling for FILE_FLAG_POSIX_SEMANTICS but 
still prevents the O_APPEND problems. Jeremy.
(cherry picked from commit f8bd0559ada056722d7d5ae0286753e7c591650b)

---

Summary of changes:
 source3/include/smb.h   |1 +
 source3/smbd/filename.c |3 ++-
 source3/smbd/nttrans.c  |   30 ++
 3 files changed, 21 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index a3acb7c..0968984 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1954,6 +1954,7 @@ struct smb_file_time {
 #define UCF_SAVE_LCOMP 0x0001
 #define UCF_ALWAYS_ALLOW_WCARD_LCOMP   0x0002
 #define UCF_COND_ALLOW_WCARD_LCOMP 0x0004
+#define UCF_POSIX_PATHNAMES0x0008
 
 /*
  * smb_filename
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 5d6661d..16e3631 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -238,7 +238,8 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
}
}
 
-   posix_pathnames = lp_posix_pathnames();
+   posix_pathnames = (lp_posix_pathnames() ||
+   (ucf_flags  UCF_POSIX_PATHNAMES));
 
/*
 * Strip off the stream, and add it back when we're done with the
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 5c6d780..9e98291 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -418,11 +418,6 @@ void reply_ntcreate_and_X(struct smb_request *req)
flags = IVAL(req-vwv+3, 1);
access_mask = IVAL(req-vwv+7, 1);
file_attributes = IVAL(req-vwv+13, 1);
-   /*
-* Bug #6898 - clients using Windows opens should
-* never be able to set this attribute.
-*/
-   file_attributes = ~FILE_FLAG_POSIX_SEMANTICS;
share_access = IVAL(req-vwv+15, 1);
create_disposition = IVAL(req-vwv+17, 1);
create_options = IVAL(req-vwv+19, 1);
@@ -483,7 +478,8 @@ void reply_ntcreate_and_X(struct smb_request *req)
conn,
req-flags2  FLAGS2_DFS_PATHNAMES,
fname,
-   0,
+   (file_attributes  FILE_FLAG_POSIX_SEMANTICS) ?
+   UCF_POSIX_PATHNAMES : 0,
NULL,
smb_fname);
 
@@ -498,6 +494,13 @@ void reply_ntcreate_and_X(struct smb_request *req)
goto out;
}
 
+   /*
+* Bug #6898 - clients using Windows opens should
+* never be able to set this attribute into the
+* VFS.
+*/
+   file_attributes = ~FILE_FLAG_POSIX_SEMANTICS;
+
status = SMB_VFS_CREATE_FILE(
conn,   /* conn */
req,/* req */
@@ -918,11 +921,6 @@ static void call_nt_transact_create(connection_struct 
*conn,
flags = IVAL(params,0);
access_mask = IVAL(params,8);
file_attributes = IVAL(params,20);
-   /*
-* Bug #6898 - clients using Windows opens should
-* never be able to set this attribute.
-*/
-   file_attributes = ~FILE_FLAG_POSIX_SEMANTICS;
share_access = IVAL(params,24);
create_disposition = IVAL(params,28);
create_options = IVAL(params,32);
@@ -1004,7 +1002,8 @@ static void call_nt_transact_create(connection_struct 
*conn,
conn,
req-flags2  FLAGS2_DFS_PATHNAMES,
fname,
-   0,
+   (file_attributes  FILE_FLAG_POSIX_SEMANTICS) ?
+   UCF_POSIX_PATHNAMES : 0,
NULL,
smb_fname);
 
@@ 

[SCM] SAMBA-CTDB repository - branch v3-4-ctdb updated - 3.4.2-ctdb-12-10-g62f594d

2009-11-23 Thread Michael Adam
The branch, v3-4-ctdb has been updated
   via  62f594d732f28a8341ccc93e0ddade9286c6abf7 (commit)
   via  c814b84835af8daf9580d21a435c3212bd35c1de (commit)
  from  833f9f89f8ce8ad447ad79e6ab6c9b3a5479d16d (commit)

http://gitweb.samba.org/?p=obnox/samba-ctdb.git;a=shortlog;h=v3-4-ctdb


- Log -
commit 62f594d732f28a8341ccc93e0ddade9286c6abf7
Author: Michael Adam ob...@samba.org
Date:   Mon Nov 23 15:40:36 2009 +0100

s3: add dbwrap_torture - a tool to stress test tdb transactions through 
dbwrap

This can be used to also test tdb transactions on clustered installations
throught ctdb. The test is modeled after the ctdb_transaction.c test program
from the ctdb source code. It runs transactions in a tight loop on a test
database called transactions.tdb (by default), increasing a counter in 
each
iteration. In a clustered environment, a counter is maintained for each 
node.

Michael

commit c814b84835af8daf9580d21a435c3212bd35c1de
Author: Michael Adam ob...@samba.org
Date:   Fri Nov 20 17:47:21 2009 +0100

s3:torture: move the torture-specific headers to new torture/torture.h

Michael

---

Summary of changes:
 source3/Makefile.in|   20 +++-
 source3/include/proto.h|   55 ---
 source3/torture/denytest.c |1 +
 source3/torture/mangle_test.c  |1 +
 source3/torture/nbio.c |1 +
 source3/torture/scanner.c  |1 +
 source3/torture/torture.c  |1 +
 source3/torture/torture.h  |   81 +
 source3/torture/utable.c   |1 +
 source3/utils/dbwrap_torture.c |  350 
 10 files changed, 456 insertions(+), 56 deletions(-)
 create mode 100644 source3/torture/torture.h
 create mode 100644 source3/utils/dbwrap_torture.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 0190e54..50aedb0 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -223,7 +223,8 @@ EVERYTHING_PROGS = bin/debug2h...@exeext@ 
bin/smbfil...@exeext@ \
bin/talloct...@exeext@ bin/replacet...@exeext@ \
bin/log2p...@exeext@ \
bin/v...@exeext@ bin/smbic...@exeext@ \
-   bin/dbwrap_t...@exeext@
+   bin/dbwrap_t...@exeext@ \
+   bin/dbwrap_tort...@exeext@
 
 PAM_MODULES = @PAM_MODULES@
 
@@ -1206,6 +1207,12 @@ DBWRAP_TOOL_OBJ = utils/dbwrap_tool.o \
  $(LIB_NONSMBD_OBJ) \
  $(LIBSAMBA_OBJ)
 
+DBWRAP_TORTURE_OBJ = utils/dbwrap_torture.o \
+$(PARAM_OBJ) \
+$(LIB_NONSMBD_OBJ) \
+$(LIBSAMBA_OBJ) \
+$(POPT_LIB_OBJ)
+
 ##
 # now the rules...
 ##
@@ -2775,6 +2782,17 @@ bin/dbwrap_t...@exeext@: $(DBWRAP_TOOL_OBJ) 
@LIBTALLOC_TARGET@ @LIBTDB_TARGET@
 install-dbwrap_tool:: bin/dbwrap_t...@exeext@
@$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) 
$(BINDIR) $
 
+bin/dbwrap_tort...@exeext@: $(DBWRAP_TORTURE_OBJ) $(LIBTALLOC) $(LIBTDB)
+   @echo Linking $@
+   @$(CC) -o $@ $(DBWRAP_TORTURE_OBJ)\
+   $(LDFLAGS) $(DYNEEXP) $(LIBS) \
+   $(LDAP_LIBS) \
+   $(POPT_LIBS) \
+   $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+
+install-dbwrap_torture:: bin/dbwrap_tort...@exeext@
+   @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) 
$(BINDIR) $
+
 install:: installservers installbin @INSTALL_CIFSMOUNT@ @INSTALL_CIFSUPCALL@ 
installman \
installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ 
\
@INSTALL_PAM_MODULES@ installlibs installmo
diff --git a/source3/include/proto.h b/source3/include/proto.h
index bf9164b..e06ffbf 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -7140,61 +7140,6 @@ int vfs_ChDir(connection_struct *conn, const char *path);
 char *vfs_GetWd(TALLOC_CTX *ctx, connection_struct *conn);
 NTSTATUS check_reduced_name(connection_struct *conn, const char *fname);
 
-/* The following definitions come from torture/denytest.c  */
-
-bool torture_denytest1(int dummy);
-bool torture_denytest2(int dummy);
-
-/* The following definitions come from torture/mangle_test.c  */
-
-bool torture_mangle(int dummy);
-
-/* The following definitions come from torture/nbio.c  */
-
-double nbio_total(void);
-void nb_alarm(int ignore);
-void nbio_shmem(int n);
-void nb_setup(struct cli_state *cli);
-void nb_unlink(const char *fname);
-void nb_createx(const char *fname, 
-   unsigned create_options, unsigned create_disposition, int 
handle);
-void nb_writex(int handle, int offset, int size, int ret_size);
-void nb_readx(int handle, int offset, int size, int ret_size);
-void nb_close(int 

[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Andrew Bartlett
The branch, master has been updated
   via  4f64bc7... heimdal Fix invalid format string
   via  4062d2b... s4:dsdb Handle LDAP backends correctly with new 
samba_dsdb system
   via  fdb5914... s4:provision Move exceptions into a new file
   via  5ea6f79... s4:provision Don't bother with a template for the LDAP 
backend startup script.
   via  625856f... s4:provision Move secrets.ldb over to .c file module 
lists, like sam.ldb
   via  9aeaf31... s4:ldap.py - activate test for operational attributes
   via  dcee196... s4:operational LDB module - Prevent the modification of 
operational attributes
   via  cec473e... s4:ldap.py Add tests for subSchemaSubEntry
   via  cfad782... s4:dsdb Use new helper function to obtain CN=Aggregate 
schema DN in schema_data
   via  e0b1edf... s4:dsdb Return the subSchemaSubEntry operational 
attribute on every object
   via  7b2bd93... s4:dsdb Add function to return the CN=Aggregate schema DN
   via  90d7399... s4:provision Remove 'operational' from secrets.ldb 
module list
  from  f8bd055... Proper fix for #6898 - Samba duplicates file content on 
appending. Pointed out by Volker.Restores the pathname handling for 
FILE_FLAG_POSIX_SEMANTICS but still prevents the O_APPEND problems. Jeremy.

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


- Log -
commit 4f64bc7125014af4871c753c9321e219ee7b4ae9
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 24 11:38:41 2009 +1100

heimdal Fix invalid format string

commit 4062d2b3763c65c81bccf74cd2899d8c156ae99d
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 24 11:36:34 2009 +1100

s4:dsdb Handle LDAP backends correctly with new samba_dsdb system

The original code had the wrong module names, and use strcasecmp()
incorrectly.

Andrew Bartlett

commit fdb5914b278f19dea20ca9a7ae5e8b9557f5c70b
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 24 11:09:30 2009 +1100

s4:provision Move exceptions into a new file

This allows provisionbackend and provision to both raise ProvisionException

commit 5ea6f7977506b2d8da02b4bcd083cc04f267ee4f
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 24 11:00:12 2009 +1100

s4:provision Don't bother with a template for the LDAP backend startup 
script.

commit 625856f2cf784f5ba39929567796d3225e1c6c3f
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 24 10:36:28 2009 +1100

s4:provision Move secrets.ldb over to .c file module lists, like sam.ldb

commit 9aeaf31cfe338b0e7f5b7fe243190f38ce09d9ac
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Sun Nov 22 14:59:21 2009 +0100

s4:ldap.py - activate test for operational attributes

Signed-off-by: Andrew Bartlett abart...@samba.org

commit dcee196f3e5d5673282aaa19fbbb7696d2c1aa0a
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 24 10:22:10 2009 +1100

s4:operational LDB module - Prevent the modification of operational 
attributes

(merged by Andrew Bartlett)

Signed-off-by: Andrew Bartlett abart...@samba.org

commit cec473e72826af09fdf84eee2731ad0c2b193dfc
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 24 10:18:33 2009 +1100

s4:ldap.py Add tests for subSchemaSubEntry

commit cfad782c9e422f11d6faa5a7e2b1b94400fe04bc
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 24 10:18:02 2009 +1100

s4:dsdb Use new helper function to obtain CN=Aggregate schema DN in 
schema_data

commit e0b1edf013fec7682903d7190bc221b6f24626c3
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 24 10:17:18 2009 +1100

s4:dsdb Return the subSchemaSubEntry operational attribute on every object

commit 7b2bd93635637015eb0bd853c767ac0785e02854
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 24 10:16:56 2009 +1100

s4:dsdb Add function to return the CN=Aggregate schema DN

commit 90d739990a5e17d1f2a7246287b6220534d9aae0
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 24 10:15:28 2009 +1100

s4:provision Remove 'operational' from secrets.ldb module list

---

Summary of changes:
 source4/dsdb/common/util.c |   18 
 source4/dsdb/samdb/ldb_modules/config.mk   |   11 ++
 source4/dsdb/samdb/ldb_modules/operational.c   |   60 +++-
 source4/dsdb/samdb/ldb_modules/samba_dsdb.c|   10 +-
 source4/dsdb/samdb/ldb_modules/samba_secrets.c |  100 
 source4/dsdb/samdb/ldb_modules/schema_data.c   |   12 +-
 source4/heimdal/kdc/krb5tgs.c  |2 +-
 source4/lib/ldb/tests/python/ldap.py   |   28 --
 source4/scripting/python/samba/provision.py|   10 +--
 source4/scripting/python/samba/provisionbackend.py |4 +-
 .../scripting/python/samba/provisionexceptions.py  |   34 +++
 

[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Jeremy Allison
The branch, master has been updated
   via  4b88598... Remove unused code. Jeremy.
  from  4f64bc7... heimdal Fix invalid format string

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


- Log -
commit 4b8859840be2aacc90a2779820e08a09c793df3b
Author: Jeremy Allison j...@samba.org
Date:   Mon Nov 23 18:00:36 2009 -0800

Remove unused code.
Jeremy.

---

Summary of changes:
 source3/include/proto.h |3 ---
 source3/smbd/open.c |   46 --
 2 files changed, 0 insertions(+), 49 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 5b1ce74..8951e73 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6643,9 +6643,6 @@ void msg_file_was_renamed(struct messaging_context *msg,
  uint32_t msg_type,
  struct server_id server_id,
  DATA_BLOB *data);
-struct case_semantics_state;
-struct case_semantics_state *set_posix_case_semantics(TALLOC_CTX *mem_ctx,
- connection_struct *conn);
 NTSTATUS open_streams_for_delete(connection_struct *conn,
 const char *fname);
 NTSTATUS create_file_default(connection_struct *conn,
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 911e8fd..420b41c 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2770,52 +2770,6 @@ void msg_file_was_renamed(struct messaging_context *msg,
return;
 }
 
-struct case_semantics_state {
-   connection_struct *conn;
-   bool case_sensitive;
-   bool case_preserve;
-   bool short_case_preserve;
-};
-
-/
- Restore case semantics.
-/
-static int restore_case_semantics(struct case_semantics_state *state)
-{
-   state-conn-case_sensitive = state-case_sensitive;
-   state-conn-case_preserve = state-case_preserve;
-   state-conn-short_case_preserve = state-short_case_preserve;
-   return 0;
-}
-
-/
- Save case semantics.
-/
-struct case_semantics_state *set_posix_case_semantics(TALLOC_CTX *mem_ctx,
- connection_struct *conn)
-{
-   struct case_semantics_state *result;
-
-   if (!(result = talloc(mem_ctx, struct case_semantics_state))) {
-   DEBUG(0, (talloc failed\n));
-   return NULL;
-   }
-
-   result-conn = conn;
-   result-case_sensitive = conn-case_sensitive;
-   result-case_preserve = conn-case_preserve;
-   result-short_case_preserve = conn-short_case_preserve;
-
-   /* Set to POSIX. */
-   conn-case_sensitive = True;
-   conn-case_preserve = True;
-   conn-short_case_preserve = True;
-
-   talloc_set_destructor(result, restore_case_semantics);
-
-   return result;
-}
-
 /*
  * If a main file is opened for delete, all streams need to be checked for
  * !FILE_SHARE_DELETE. Do this by opening with DELETE_ACCESS.


-- 
Samba Shared Repository


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

2009-11-23 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  d87c261... Remove unused code. Jeremy. (cherry picked from commit 
4b8859840be2aacc90a2779820e08a09c793df3b)
  from  450... Proper fix for #6898 - Samba duplicates file content on 
appending. Pointed out by Volker.Restores the pathname handling for 
FILE_FLAG_POSIX_SEMANTICS but still prevents the O_APPEND problems. Jeremy. 
(cherry picked from commit f8bd0559ada056722d7d5ae0286753e7c591650b)

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


- Log -
commit d87c26171b757c3a0471edac4fb982c3f8d0dc35
Author: Jeremy Allison j...@samba.org
Date:   Mon Nov 23 18:00:36 2009 -0800

Remove unused code.
Jeremy.
(cherry picked from commit 4b8859840be2aacc90a2779820e08a09c793df3b)

---

Summary of changes:
 source3/include/proto.h |3 ---
 source3/smbd/open.c |   46 --
 2 files changed, 0 insertions(+), 49 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 341a4ab..1c10578 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6627,9 +6627,6 @@ void msg_file_was_renamed(struct messaging_context *msg,
  uint32_t msg_type,
  struct server_id server_id,
  DATA_BLOB *data);
-struct case_semantics_state;
-struct case_semantics_state *set_posix_case_semantics(TALLOC_CTX *mem_ctx,
- connection_struct *conn);
 NTSTATUS open_streams_for_delete(connection_struct *conn,
 const char *fname);
 NTSTATUS create_file_default(connection_struct *conn,
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 911e8fd..420b41c 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2770,52 +2770,6 @@ void msg_file_was_renamed(struct messaging_context *msg,
return;
 }
 
-struct case_semantics_state {
-   connection_struct *conn;
-   bool case_sensitive;
-   bool case_preserve;
-   bool short_case_preserve;
-};
-
-/
- Restore case semantics.
-/
-static int restore_case_semantics(struct case_semantics_state *state)
-{
-   state-conn-case_sensitive = state-case_sensitive;
-   state-conn-case_preserve = state-case_preserve;
-   state-conn-short_case_preserve = state-short_case_preserve;
-   return 0;
-}
-
-/
- Save case semantics.
-/
-struct case_semantics_state *set_posix_case_semantics(TALLOC_CTX *mem_ctx,
- connection_struct *conn)
-{
-   struct case_semantics_state *result;
-
-   if (!(result = talloc(mem_ctx, struct case_semantics_state))) {
-   DEBUG(0, (talloc failed\n));
-   return NULL;
-   }
-
-   result-conn = conn;
-   result-case_sensitive = conn-case_sensitive;
-   result-case_preserve = conn-case_preserve;
-   result-short_case_preserve = conn-short_case_preserve;
-
-   /* Set to POSIX. */
-   conn-case_sensitive = True;
-   conn-case_preserve = True;
-   conn-short_case_preserve = True;
-
-   talloc_set_destructor(result, restore_case_semantics);
-
-   return result;
-}
-
 /*
  * If a main file is opened for delete, all streams need to be checked for
  * !FILE_SHARE_DELETE. Do this by opening with DELETE_ACCESS.


-- 
Samba Shared Repository


[SCM] CTDB repository - branch status-test updated - ctdb-1.0.104-19-g66b2298

2009-11-23 Thread Ronnie Sahlberg
The branch, status-test has been updated
   via  66b22980b14601f29fe8cc64bd8f29883c7ca1c0 (commit)
   via  a6d353519932eee48f9241ad8887b692882906c9 (commit)
   via  b0648c7f08eba87ec3c9714e2525c9b621bfb4ef (commit)
   via  834c93b3e1b8f4151b8a2cd82c2dd8bacc17f66c (commit)
   via  470822b329f9d3ca9bef518b56e9ce28d5fedda2 (commit)
   via  fe8027309c1f7b987cd368fa98f9b28741baa786 (commit)
   via  e7d57d7ae678b24dab3364a348838c6a3398942c (commit)
   via  20b15de068d042b292725945927ceda1b01d07c0 (commit)
   via  c715746c2f40eb9b21dbf011d16f1f1b0b53fdf9 (commit)
  from  c5f798116bf3b7954e23c7267b056ee1f5560f45 (commit)

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


- Log -
commit 66b22980b14601f29fe8cc64bd8f29883c7ca1c0
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Tue Nov 24 11:24:22 2009 +1030

eventscript: check that ctdb forced script events correct

Now we're doing checking, we might as well make sure the commands from
ctdb eventscripts are valid.

This gets rid of the UNKNOWN event type.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

commit a6d353519932eee48f9241ad8887b692882906c9
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Tue Nov 24 11:23:13 2009 +1030

eventscript: check that internal script events are being invoked correctly

This is not as good as a compile-time check, but at least we count the
number of arguments are correct.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

commit b0648c7f08eba87ec3c9714e2525c9b621bfb4ef
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Tue Nov 24 11:22:46 2009 +1030

eventscript: remove call name from state-options

Finally, we remove the call name (eg. monitor or start) from the
options field of the struct: it now contains only extra options.

This is clearer, and mainly involves adding some %s to debug statements.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

commit 834c93b3e1b8f4151b8a2cd82c2dd8bacc17f66c
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Tue Nov 24 11:19:58 2009 +1030

eventscript: put call type into state struct.

This means we can get rid of more strcmp; they can simply use the
state-call value instead.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

commit 470822b329f9d3ca9bef518b56e9ce28d5fedda2
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Tue Nov 24 11:16:49 2009 +1030

eventscript: introduce enum for different event script calls.

Rather than doing strcmp everywhere, pass an explicit enum around.  This
also subtly documents what options are available.  The options arg
is now used for extra arguments only.

Unfortunately, gcc complains on empty format strings, so we make
ctdb_event_script() take no varargs, and add ctdb_event_script_args().  We
leave ctdb_event_script_callback() taking varargs, which means callers
have to do %s, .

For the moment, we have CTDB_EVENT_UNKNOWN for handling forced scripts
from the ctdb tool.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

commit fe8027309c1f7b987cd368fa98f9b28741baa786
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Tue Nov 24 11:09:46 2009 +1030

eventscript: put timeout inside ctdb_event_script_callback_v

Everyone uses the same timeout value, so just remove it from the API.
If we ever need variable timeouts, that might as well be central too.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

commit e7d57d7ae678b24dab3364a348838c6a3398942c
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Tue Nov 24 11:08:39 2009 +1030

eventscript: typo cleanups

1) ctdb_event_script_v doesn't take varargs.  ctdb_run_event_script is
   a better name, and fix comment.
2) Fix indentation on allowed_scripts.
3) Comment on run_eventscripts_callback is wrong; it's the callback
   for any ctdb forced event.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

commit 20b15de068d042b292725945927ceda1b01d07c0
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Tue Nov 24 11:06:53 2009 +1030

eventscript: fix bug in timeouts on forced eventscripts.  Again.

In 15bc66ae801b0c69, Ronnie fixed a double-free race.  The problem was that
ctdb_run_eventscripts() hands a context to ctdb_event_script_callback() to
hang its data off, which gets freed in the callback.  This particularly
hurt in ctdb_event_script_timeout.

There's nothing wrong with this, but obviously we should make the callback
call last of all.  At the time, ctdb_event_script_timeout() carefully
extracted everything from the struct ctdb_event_script_state before
calling -callback.

This was cleaned up in 64da4402c6ad485f (Ronnie again), and now state
was referred to after the callback 

[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Andrew Bartlett
The branch, master has been updated
   via  840cdfa... s4:param remove reference to private header from 
source4/param/param.h
   via  3ed0cae... s4: Fix missing TLS dir when targetdir is not the 
default one
  from  4b88598... Remove unused code. Jeremy.

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


- Log -
commit 840cdfa2fabbb48d2f18dc3cea65ff8123bf6ca9
Author: Brad Hards br...@frogmouth.net
Date:   Tue Nov 24 13:43:59 2009 +1100

s4:param remove reference to private header from source4/param/param.h

source4/param/param.h has a

param.h is a public header (and parmlist isn't, even if the relative path
could work), so I suggest making it a forward declaration in the header, and
including parmlist.h in the implementation.

(commit message included from e-mail by Andrew Bartlett)
Signed-off-by: Andrew Bartlett abart...@samba.org

commit 3ed0cae14bdf88387abc016d678127d477d760b7
Author: Matthieu Patou m...@matws.net
Date:   Sun Nov 22 20:51:24 2009 +0300

s4: Fix missing TLS dir when targetdir is not the default one

---

Summary of changes:
 source4/param/generic.c |1 +
 source4/param/loadparm.c|1 +
 source4/param/param.h   |2 +-
 source4/scripting/python/samba/provision.py |2 ++
 4 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/param/generic.c b/source4/param/generic.c
index 41d01de..29b97bc 100644
--- a/source4/param/generic.c
+++ b/source4/param/generic.c
@@ -18,6 +18,7 @@
 
 #include includes.h
 #include ../lib/util/dlinklist.h
+#include ../lib/util/parmlist.h
 #include param/param.h
 #include param/loadparm.h
 #include system/filesys.h
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index f2e4ace..d65c3f9 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -61,6 +61,7 @@
 #include smb_server/smb_server.h
 #include libcli/raw/signing.h
 #include ../lib/util/dlinklist.h
+#include ../lib/util/parmlist.h
 #include param/param.h
 #include param/loadparm.h
 #include libcli/raw/libcliraw.h
diff --git a/source4/param/param.h b/source4/param/param.h
index 3ce5e93..5222425 100644
--- a/source4/param/param.h
+++ b/source4/param/param.h
@@ -20,7 +20,7 @@
 #ifndef _PARAM_H /* _PARAM_H */
 #define _PARAM_H 
 
-#include ../lib/util/parmlist.h
+struct parmlist_entry;
 
 struct param_context {
struct param_section *sections;
diff --git a/source4/scripting/python/samba/provision.py 
b/source4/scripting/python/samba/provision.py
index 01ffc16..242951d 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -1130,6 +1130,8 @@ def provision(setup_dir, message, session_info,
 
 if not os.path.exists(paths.private_dir):
 os.mkdir(paths.private_dir)
+if not os.path.exists(os.path.join(paths.private_dir,tls)):
+os.mkdir(os.path.join(paths.private_dir,tls))
 
 ldapi_url = ldapi://%s % urllib.quote(paths.s4_ldapi_path, safe=)
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-11-23 Thread Jeremy Allison
The branch, master has been updated
   via  a930e3e... Restore NtCreateX case handling with 
FILE_FLAG_POSIX_SEMANTICS to the way it worked in 3.3.x and 3.2.x. 
UCF_POSIX_PATHNAMES may no longer be needed, as lp_posix_pathnames() being set 
isn't the same as case handling from NtCreateX (lp_posix_pathnames() changes 
the STAT calls to LSTAT, not the case semantics). Jeremy.
  from  840cdfa... s4:param remove reference to private header from 
source4/param/param.h

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


- Log -
commit a930e3e4e140a133cb2ab59d20bda9e04b93cd7a
Author: Jeremy Allison j...@samba.org
Date:   Mon Nov 23 21:06:54 2009 -0800

Restore NtCreateX case handling with FILE_FLAG_POSIX_SEMANTICS to the way
it worked in 3.3.x and 3.2.x. UCF_POSIX_PATHNAMES may no longer be needed,
as lp_posix_pathnames() being set isn't the same as case handling from
NtCreateX (lp_posix_pathnames() changes the STAT calls to LSTAT, not
the case semantics).
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 9e98291..809c543 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -374,6 +374,53 @@ static void do_ntcreate_pipe_open(connection_struct *conn,
chain_reply(req);
 }
 
+struct case_semantics_state {
+   connection_struct *conn;
+   bool case_sensitive;
+   bool case_preserve;
+   bool short_case_preserve;
+};
+
+/
+ Restore case semantics.
+/
+
+static int restore_case_semantics(struct case_semantics_state *state)
+{
+   state-conn-case_sensitive = state-case_sensitive;
+   state-conn-case_preserve = state-case_preserve;
+   state-conn-short_case_preserve = state-short_case_preserve;
+   return 0;
+}
+
+/
+ Save case semantics.
+/
+
+static struct case_semantics_state *set_posix_case_semantics(TALLOC_CTX 
*mem_ctx,
+   connection_struct *conn)
+{
+   struct case_semantics_state *result;
+
+   if (!(result = talloc(mem_ctx, struct case_semantics_state))) {
+   return NULL;
+   }
+
+   result-conn = conn;
+   result-case_sensitive = conn-case_sensitive;
+   result-case_preserve = conn-case_preserve;
+   result-short_case_preserve = conn-short_case_preserve;
+
+   /* Set to POSIX. */
+   conn-case_sensitive = True;
+   conn-case_preserve = True;
+   conn-short_case_preserve = True;
+
+   talloc_set_destructor(result, restore_case_semantics);
+
+   return result;
+}
+
 /
  Reply to an NT create and X call.
 /
@@ -406,13 +453,14 @@ void reply_ntcreate_and_X(struct smb_request *req)
NTSTATUS status;
int oplock_request;
uint8_t oplock_granted = NO_OPLOCK_RETURN;
+   struct case_semantics_state *case_state = NULL;
TALLOC_CTX *ctx = talloc_tos();
 
START_PROFILE(SMBntcreateX);
 
if (req-wct  24) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
-   return;
+   goto out;
}
 
flags = IVAL(req-vwv+3, 1);
@@ -474,15 +522,22 @@ void reply_ntcreate_and_X(struct smb_request *req)
? BATCH_OPLOCK : 0;
}
 
+   case_state = set_posix_case_semantics(ctx, conn);
+   if (!case_state) {
+   reply_nterror(req, NT_STATUS_NO_MEMORY);
+   goto out;
+   }
+
status = filename_convert(ctx,
conn,
req-flags2  FLAGS2_DFS_PATHNAMES,
fname,
-   (file_attributes  FILE_FLAG_POSIX_SEMANTICS) ?
-   UCF_POSIX_PATHNAMES : 0,
+   0,
NULL,
smb_fname);
 
+   TALLOC_FREE(case_state);
+
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req,
@@ -887,6 +942,7 @@ static void call_nt_transact_create(connection_struct *conn,
uint64_t allocation_size;
int oplock_request;
uint8_t oplock_granted;
+   struct 

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

2009-11-23 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  3de925c... Restore NtCreateX case handling with 
FILE_FLAG_POSIX_SEMANTICS to the way it worked in 3.3.x and 3.2.x. 
UCF_POSIX_PATHNAMES may no longer be needed, as lp_posix_pathnames() being set 
isn't the same as case handling from NtCreateX (lp_posix_pathnames() changes 
the STAT calls to LSTAT, not the case semantics). Jeremy. (cherry picked from 
commit a930e3e4e140a133cb2ab59d20bda9e04b93cd7a)
  from  d87c261... Remove unused code. Jeremy. (cherry picked from commit 
4b8859840be2aacc90a2779820e08a09c793df3b)

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


- Log -
commit 3de925c3b74802b1f6b9b43e3c175fa2fb332182
Author: Jeremy Allison j...@samba.org
Date:   Mon Nov 23 21:06:54 2009 -0800

Restore NtCreateX case handling with FILE_FLAG_POSIX_SEMANTICS to the way
it worked in 3.3.x and 3.2.x. UCF_POSIX_PATHNAMES may no longer be needed,
as lp_posix_pathnames() being set isn't the same as case handling from
NtCreateX (lp_posix_pathnames() changes the STAT calls to LSTAT, not
the case semantics).
Jeremy.
(cherry picked from commit a930e3e4e140a133cb2ab59d20bda9e04b93cd7a)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 9e98291..809c543 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -374,6 +374,53 @@ static void do_ntcreate_pipe_open(connection_struct *conn,
chain_reply(req);
 }
 
+struct case_semantics_state {
+   connection_struct *conn;
+   bool case_sensitive;
+   bool case_preserve;
+   bool short_case_preserve;
+};
+
+/
+ Restore case semantics.
+/
+
+static int restore_case_semantics(struct case_semantics_state *state)
+{
+   state-conn-case_sensitive = state-case_sensitive;
+   state-conn-case_preserve = state-case_preserve;
+   state-conn-short_case_preserve = state-short_case_preserve;
+   return 0;
+}
+
+/
+ Save case semantics.
+/
+
+static struct case_semantics_state *set_posix_case_semantics(TALLOC_CTX 
*mem_ctx,
+   connection_struct *conn)
+{
+   struct case_semantics_state *result;
+
+   if (!(result = talloc(mem_ctx, struct case_semantics_state))) {
+   return NULL;
+   }
+
+   result-conn = conn;
+   result-case_sensitive = conn-case_sensitive;
+   result-case_preserve = conn-case_preserve;
+   result-short_case_preserve = conn-short_case_preserve;
+
+   /* Set to POSIX. */
+   conn-case_sensitive = True;
+   conn-case_preserve = True;
+   conn-short_case_preserve = True;
+
+   talloc_set_destructor(result, restore_case_semantics);
+
+   return result;
+}
+
 /
  Reply to an NT create and X call.
 /
@@ -406,13 +453,14 @@ void reply_ntcreate_and_X(struct smb_request *req)
NTSTATUS status;
int oplock_request;
uint8_t oplock_granted = NO_OPLOCK_RETURN;
+   struct case_semantics_state *case_state = NULL;
TALLOC_CTX *ctx = talloc_tos();
 
START_PROFILE(SMBntcreateX);
 
if (req-wct  24) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
-   return;
+   goto out;
}
 
flags = IVAL(req-vwv+3, 1);
@@ -474,15 +522,22 @@ void reply_ntcreate_and_X(struct smb_request *req)
? BATCH_OPLOCK : 0;
}
 
+   case_state = set_posix_case_semantics(ctx, conn);
+   if (!case_state) {
+   reply_nterror(req, NT_STATUS_NO_MEMORY);
+   goto out;
+   }
+
status = filename_convert(ctx,
conn,
req-flags2  FLAGS2_DFS_PATHNAMES,
fname,
-   (file_attributes  FILE_FLAG_POSIX_SEMANTICS) ?
-   UCF_POSIX_PATHNAMES : 0,
+   0,
NULL,
smb_fname);
 
+   TALLOC_FREE(case_state);
+
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req,
@@ -887,6 +942,7 @@ 

[SCM] CTDB repository - branch status-test updated - ctdb-1.0.104-20-g51f3dee

2009-11-23 Thread Ronnie Sahlberg
The branch, status-test has been updated
   via  51f3deee99d7c7367d42a6cf73b2dfbddb861e68 (commit)
  from  66b22980b14601f29fe8cc64bd8f29883c7ca1c0 (commit)

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


- Log -
commit 51f3deee99d7c7367d42a6cf73b2dfbddb861e68
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Nov 24 16:13:55 2009 +1100

dont recycle the other script context

make the script log a child of ctdb, not the monitor script context (which 
may be recycled)

---

Summary of changes:
 server/eventscript.c |   10 --
 1 files changed, 4 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/eventscript.c b/server/eventscript.c
index 24e08f0..aa9805d 100644
--- a/server/eventscript.c
+++ b/server/eventscript.c
@@ -714,7 +714,7 @@ static void ctdb_event_script_timeout(struct event_context 
*ev, struct timed_eve
talloc_free(ctdb-last_monitor_status_ctx);
ctdb-last_monitor_status_ctx = NULL;
}
-   ctdb-last_monitor_status_ctx = talloc_steal(ctdb, 
ctdb-current_monitor_status_ctx);
+   ctdb-last_monitor_status_ctx = 
ctdb-current_monitor_status_ctx;
ctdb-current_monitor_status_ctx = NULL;
}
 
@@ -809,7 +809,7 @@ static int ctdb_event_script_callback_v(struct ctdb_context 
*ctdb,
ctdb-current_monitor_status_ctx = NULL;
}
 
-   ctdb-current_monitor_status_ctx = 
talloc(ctdb-monitor_event_script_ctx, struct ctdb_monitor_script_status_ctx);
+   ctdb-current_monitor_status_ctx = talloc(ctdb, struct 
ctdb_monitor_script_status_ctx);
ctdb-current_monitor_status_ctx-scripts = NULL;
} else {
/* any other script will first terminate any monitor event */
@@ -818,11 +818,9 @@ static int ctdb_event_script_callback_v(struct 
ctdb_context *ctdb,
ctdb-monitor_event_script_ctx = NULL;
}
/* and then use a context common for all non-monitor events */
-   if (ctdb-other_event_script_ctx != NULL) {
-   talloc_free(ctdb-other_event_script_ctx);
-   ctdb-other_event_script_ctx = NULL;
+   if (ctdb-other_event_script_ctx == NULL) {
+   ctdb-other_event_script_ctx = talloc_new(ctdb);
}
-   ctdb-other_event_script_ctx = talloc_new(ctdb);
mem_ctx = ctdb-other_event_script_ctx;
}
 


-- 
CTDB repository


Build status as of Tue Nov 24 07:00:04 2009

2009-11-23 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-11-23 
00:00:08.0 -0700
+++ /home/build/master/cache/broken_results.txt 2009-11-24 00:00:05.0 
-0700
@@ -1,22 +1,22 @@
-Build status as of Mon Nov 23 07:00:05 2009
+Build status as of Tue Nov 24 07:00:04 2009
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   4  1  0 
+ccache   5  1  0 
 distcc   0  0  0 
 ldb  33 33 0 
-libreplace   5  2  0 
+libreplace   4  2  0 
 lorikeet 0  0  0 
 pidl 23 22 0 
-ppp  4  0  0 
-rsync8  2  0 
+ppp  2  0  0 
+rsync22 9  0 
 samba-docs   0  0  0 
 samba-web0  0  0 
-samba_3_current 7  6  0 
-samba_3_master 31 29 4 
-samba_3_next 8  7  1 
-samba_4_0_test 32 30 0 
-talloc   5  5  0 
+samba_3_current 22 20 0 
+samba_3_master 31 30 4 
+samba_3_next 24 23 5 
+samba_4_0_test 32 30 1 
+talloc   4  4  0 
 tdb  31 31 0