Re: [Samba] Domain Joined Windows 7 and Roaming Profiles

2009-10-17 Thread Stephan Austermühle
Hi Matthias,

Matthias Grimm schrieb:

 Yes, since vista you'll need a share named profiles.v2 like this:
 
 [profiles.v2]
 path = /samba/profiles/.v2/%U
 read only = No
 create mask = 0700
 directory mask = 0700
 browseable = No
 csc policy = disable

Thanks for your mail but it does not help. My Windows Server 2008 has no 
problems loading the roaming profiles (even without the profiles.V2 share) but 
Windows 7 has.

Stephan


smime.p7s
Description: S/MIME Cryptographic Signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] nss_winbind / offline logon

2009-10-17 Thread Petteri Heinonen

James Zuelow wrote:

James Zuelow
Network Specialist
City and Borough of Juneau MIS (907)586-0236 

  

-Original Message-
From: samba-boun...@lists.samba.org 
[mailto:samba-boun...@lists.samba.org] On Behalf Of Petteri Heinonen

Sent: Friday, 16 October, 2009 03:37
To: samba@lists.samba.org
Subject: [Samba] nss_winbind / offline logon

Hello list users,

I have been struggling to make my AD integrated Debian Lenny 
box to work fluently also when network connectivity is down. 
What I would like to achieve:


1) When no network available, local user should still work normally
2) If possible, AD located users should still be able to 
login if they have previously logged in successfully (cached login)


Number 2 is more like optional, but number 1 would be very 
much needed. However, it seems that winbind somehow blocks 
login process for local accounts too if it is not able to get 
network connection to AD during system boot. These are the 
relevant lines in my nsswitch.conf:


passwd: files winbind
group:  files winbind
shadow: files

Now, I would think that with this configuration,  that no 
matter what is the status of winbindd daemon, local users 
like root should be able to login. But that is not the case 
here. The login hangs for about 5 minutes, and after that it 
succeeds. If I remove winbind from nsswitch.conf or configure 
init system so that winbindd is not started up during boot, 
then logins for local accounts go through normally.


a) make nsswitch understand that I do not want it to query 
anything from winbind if user is found from local files
b) make winbind even somehow responsive also upon the 
situation where it has to start up without network connection


Any help or pointers would be greatly appreciated.




So for goal number 1, local user logins (hopefully without a 5 minute pause) I 
would check your PAM configuration.

The first thing to look at is make sure that pam_winbind.so is set up as 
sufficient, and not required.

If it is sufficient and your pam is set up like this:

auth   sufficient   pam_winbind.so
auth   sufficient   pam_unix.so use_first_pass

What happens if you swap places, so that pam_unix comes before pam_winbind?

I no longer have a system set up for AD account logins, so I can't test.  This 
is from memory when I had a laptop (Debian Lenny even) that would do AD account 
logins, but it would always allow local account logins when the network was 
disconnected without a long pause.  HTH!

James
  

Hi James.

I have at least somehow ruled out the PAM as the source of this problem. 
As I explained, removing/adding winbind in nsswitch.conf has direct 
relation to the functionality: if winbind is in nsswitch.conf, logins 
take forever. If winbind is not listed in nsswitch.conf, logins of local 
users are fast as normal. But anyway, here are the relevant parts of my 
pam config:


authsufficient  pam_unix.so nullok_secure
authsufficient  pam_krb5.so debug minimum_uid=1 use_first_pass
authrequiredpam_deny.so

account sufficient  pam_unix.so
account sufficient  pam_krb5.so debug minimum_uid=1
account requiredpam_deny.so

session optionalpam_unix.so
session optionalpam_krb5.so debug minimum_uid=1
session requiredpam_mkhomedir.so umask=0022 skel=/etc/skel

I have also tried with PAM winbind module instead of krb5. That does not 
change the behavior. Here is also my smb.conf in case someone notices 
something being wrong there. Although I really think that it should not 
matter what is the winbind config in this case; nss_winbind should 
return something in reasonable time whatever the winbind/samba config 
is. Offline logon and refresh tickets have been disable there, as they 
are only related to PAM winbind module, which is not in use currently.


[global]
workgroup = COMPANY
netbios name = SMBTR01
domain master = no
local master = no
preferred master = no
server string =
wins support = no
wins server = dc1-fi.company.com
dns proxy = no
realm = COMPANY.COM
security = ads
encrypt passwords = yes
password server = dc1-fi.company.com
use kerberos keytab = yes
client use spnego = yes

# logging
log level = 2
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0

# disable printing
load printers = no
printing = bsd
printcap name = /dev/null
show add printer wizard = no
disable spoolss = yes

# winbind
#winbind separator = \
winbind use default domain = yes
idmap uid = 1-2
idmap gid = 1-2
idmap backend = ldap:ldaps://ldaptr01.company.com:636
idmap cache time = 300
idmap negative cache time = 300

winbind enum users = yes
winbind enum groups = yes
template homedir = /home/%D/%U
template shell = /bin/bash
winbind cache time = 300
winbind normalize names = yes
#winbind offline logon = yes
#winbind refresh tickets = yes

ldap suffix = dc=company,dc=com
ldap admin dn = cn=admin,dc=company,dc=com
ldap 

Re: [Samba] nss_winbind / offline logon

2009-10-17 Thread Petteri Heinonen

Steve Rippl wrote:

On Fri, 2009-10-16 at 14:37 +0300, Petteri Heinonen wrote:
  

Hello list users,

I have been struggling to make my AD integrated Debian Lenny box to work 
fluently also when network connectivity is down. What I would like to achieve:

1) When no network available, local user should still work normally
2) If possible, AD located users should still be able to login if they have 
previously logged in successfully (cached login)

Number 2 is more like optional, but number 1 would be very much needed. 
However, it seems that winbind somehow blocks login process for local accounts 
too if it is not able to get network connection to AD during system boot. These 
are the relevant lines in my nsswitch.conf:

passwd: files winbind
group:  files winbind
shadow: files





I think this does what you want allowing local account to still
function...

passwd: compat [!NOTFOUND=return] winbind
group:  compat winbind
shadow: compat


  
Thanks Steve, but didn't help. I have tried several combinations of 
NOTFOUND and SUCCESS etc here. Also, this is what man page of 
nsswitch.conf says:


success
 No error occurred and the wanted entry is returned.  The 
default

 action for this is 'return'.

So when user is found locally, the default action should anyway be 
'return', that is, NOT to continue to winbind module. That is exactly 
the problem I'm having; why does nsswitch continue to query anything 
from winbind because the user is already found from local database?


-Petteri


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


[Samba] Bind, DHCPD and Samba

2009-10-17 Thread Matt Delves
Hey Folks,
I currently have bind and dhcpd configured to allow for dynamic updates, though 
when I try to manually add in the srv records required for correctly 
identifying the samba pdc, they get overwritten when bind starts.

How can I modify the bind configuration so that it writes the correct 
information? Also, is there a way to have samba write the correct information 
to bind?

As for the samba version, I'm using the default that comes with OpenSuSE 11.1. 
The same goes with the packages for bind and dhcpd.

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


[Samba] Samba PDC upgrade / hardware replacement results

2009-10-17 Thread Michael Lueck

Greetings-

I am very pleased to report that the Samba upgrade went very well! The old server was running Debian Sarge w/ Samba 3.0.26a-1 and the new server is built on Ubuntu Server 9.04 and official Ubuntu 
builds of Samba packages.


The Samba server started right up with the exact smb.conf from the old server. Impressive that with all of the work done by the Samba team, not even a warning or note of deprecated something in the 
configuration! :-)


Thank you specifically to John, Eero, Zoolook, and Harry for replies regarding 
moving the Windows machine accounts to the new server! :-)

We use XFS filesystem, thus xfsdump / xfsrestore. All permissions / ownership 
survived beautifully.

Shortly I am thinking to power down the old server... One last check, sniff 
sniff for all of the memories of the old box.

Thanks once again!

--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

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


[Samba] New issue with a New Vista Client - couldn't find service

2009-10-17 Thread Brian
Sorry if this a duplicate, previous post was with a disfunctional email
address.

 

Running a samba server version 3.0.7 on a FreeBSD box

 

Life has been fine with XP and so forth

 

I added a new vista workstation to my small network

 

Vista found my shares and I am able to access them with no jerking around
with authentication types or such as I use appropriate pw and user name to
log into the vista box.

 

Problem is vista is spamming my server, taking up 50% cpu time and creating
a 500K log file every 2 min

 

it is filling the log file with

 

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

 

 

the service name is truncated also by on letter

 

thanks in advance for your help

 

Brian

 

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


Re: [Samba] Linux 2.6.31, samba server no longer working

2009-10-17 Thread Timothy Normand Miller
This is stand-alone.  It should be very simple, with just password
authentication.  I'm not seeing any permission denied in log files.
At least not smbd.log, and I can't seem to find anything in the system
log.

On Sat, Oct 17, 2009 at 12:39 AM, Robert LeBlanc rob...@leblancnet.us wrote:
 I wonder if this is similar to what I was seeing with 3.4.2 today. Are you
 bound to AD or is it stand alone? I kept seeing a permission denied message
 in the log files when trying to access the Kerberos keytab file. I coughed
 it up to backporting 3.4.2 to Debian Lenny and there was a problem with
 using krb5 1.6 instead of 1.7. I didn't feel like backporting Kerberos too
 to test that threory, I need to get these machines up, so I just installed
 my patched version of 3.2.5.

 Robert LeBlanc
 Life Sciences  Undergraduate Education Computer Support
 Brigham Young University


 On Fri, Oct 16, 2009 at 7:35 PM, Timothy Normand Miller theo...@gmail.com
 wrote:

 Sorry.  Not the kernel.  Samba 3.3.7 worked (with a bug fix I had
 added).  It's version 3.4.2 that doesn't work.  I've checked the
 config files.  I can't figure out why it doesn't work.  I just get
 connection refused.

 On Fri, Oct 16, 2009 at 12:26 PM, Timothy Normand Miller
 theo...@gmail.com wrote:
  Hi,
 
  Since upgrading to Linux 2.6.31, smb shares on my linux box are no
  longer mountable by other computers.  As far as the client is
  concerned, it looks like authentication is failing.  But when I look
  in /var/log/samba, I find absolutely nothing about any attempted or
  failed connections.  Both smbd and nmbd are still running, so they
  didn't crash.  I just can't find anything to help me diagnose the
  problem.
 
  Can anyone give me some suggestions about where to start looking for
  the cause of the trouble?
 
  Thanks!
 
  --
  Timothy Normand Miller
  http://www.cse.ohio-state.edu/~millerti
  Open Graphics Project
 



 --
 Timothy Normand Miller
 http://www.cse.ohio-state.edu/~millerti
 Open Graphics Project
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba





-- 
Timothy Normand Miller
http://www.cse.ohio-state.edu/~millerti
Open Graphics Project
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] New issue with a New Vista Client - couldn't find service

2009-10-17 Thread John Drescher
 Running a samba server version 3.0.7 on a FreeBSD box


You can not expect a version of samba produced over 5 years ago to
work with vista. Upgrade to 3.3.9 or 3.4.2.

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


Re: [Samba] New issue with a New Vista Client - couldn't find service

2009-10-17 Thread Matthew Dickinson
Likewise:

Situation:

I'm seeing lots (~500k per day) of log entries like:
smbd[13939]: itlab-pc06 (:::10.51.51.103) couldn't find service it261

In this case, the last character of the request is truncated - it should be
it2610

I'm seeing the same/similar issue to
http://lists.samba.org/archive/samba/2009-March/147277.html
And 
http://lists.samba.org/archive/samba/2009-October/150998.html

I've dismissed this over the last few weeks as a minor inconvenience, but
I'm now convinced that it's affecting the performance of the Windows client
machines that are connecting to it - a 30 second operation on local disk,
takes upwards of 5 mins over a network connection, generating thousands of
entries similar to the above.

This isn't unique - over the last 16 business hours (it's in a lab in a
university dept.), there have been ~900k similar entries. It's also not just
for this particular share, it's on all of the home shares that have been
accessed, and also all of the 4 defined shares in smb.conf. Also, it's
across many different hosts, and affecting different Windows OS's. My
primary testing has been using Windows7 - I have a lab of 33 machines with
this OS, but I believe I've also seen this from Windows XP and Vista hosts.

Shares on turing - Dell PE2950 connected to Equalogic PS6000 via iSCSI, 1TB
volume formatted EXT3 for /content and seperate 1TB EXT3 volume for
/students

[it2610]
comment = IT2610 AV1
path = /content/it/it2610
writable = yes
browseable = yes
create mask = 0600
directory mask = 0700

[homes]
comment = Home Directories
browseable = no
writable = yes
create mask = 0604
directory mask = 0704

Also, it's not restricted to this particular host:
Turing (RHEL5) - tried versions samba-3.0.33-3.14.el5 samba3x-3.3.5-0.40.el5
Babbage (RHEL4) exhibits the same, samba-3.0.33-0.17.el4

Babbage which has higher use (in the last 48 hours), has seen a total of 150
different host/service combinations from the logs, across different networks
with different clients and different OS's.

Matthew



On 10/17/09 8:59 AM, Brian bbayorg...@charter.net wrote:

 Sorry if this a duplicate, previous post was with a disfunctional email
 address.
 
  
 
 Running a samba server version 3.0.7 on a FreeBSD box
 
  
 
 Life has been fine with XP and so forth
 
  
 
 I added a new vista workstation to my small network
 
  
 
 Vista found my shares and I am able to access them with no jerking around
 with authentication types or such as I use appropriate pw and user name to
 log into the vista box.
 
  
 
 Problem is vista is spamming my server, taking up 50% cpu time and creating
 a 500K log file every 2 min
 
  
 
 it is filling the log file with
 
  
 
 [2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)
 
   dads-pc (10.0.2.124) couldn't find service roo
 
 [2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)
 
   dads-pc (10.0.2.124) couldn't find service roo
 
 [2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)
 
   dads-pc (10.0.2.124) couldn't find service roo
 
 [2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)
 
   dads-pc (10.0.2.124) couldn't find service roo
 
 [2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)
 
   dads-pc (10.0.2.124) couldn't find service roo
 
 [2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)
 
   dads-pc (10.0.2.124) couldn't find service roo
 
 [2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)
 
   dads-pc (10.0.2.124) couldn't find service roo
 
 [2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)
 
   dads-pc (10.0.2.124) couldn't find service roo
 
 [2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)
 
   dads-pc (10.0.2.124) couldn't find service roo
 
 [2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)
 
   dads-pc (10.0.2.124) couldn't find service roo
 
  
 
  
 
 the service name is truncated also by on letter
 
  
 
 thanks in advance for your help
 
  
 
 Brian
 
  


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


[Samba] New issue with a New Vista Client - couldn't find service

2009-10-17 Thread Brian
Running a samba server version 3.0.7 on a FreeBSD box

 

Life has been fine with XP and so forth

 

I added a new vista workstation to my small network

 

Vista found my shares and I am able to access them with no jerking around
with authentication types or such as I use appropriate pw and user name to
log into the vista box.

 

Problem is vista is spamming my server, taking up 50% cpu time and creating
a 500K log file every 2 min

 

it is filling the log file with

 

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

[2009/10/17 08:11:28, 0] smbd/service.c:make_connection(800)

  dads-pc (10.0.2.124) couldn't find service roo

 

 

the service name is truncated also by on letter

 

thanks in advance for your help

 

Brian

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


[Samba] Move samba server

2009-10-17 Thread Alejandro Rodriguez Luna
Hi everybody,

I got a new servers and I'd like to move the old ones to the news, I know that 
to move samba, I need to move the SID. anybody knows a howto, o where I can 
find documentation to move the SID along with the users and machines.

P.D. Currently the samba server is the PDC.

--

Alejandro Rodriguez Luna

Web: http://www.alexluna.org

E-mail: el_alexl...@yahoo.com.mx

MSN: el_alexl...@yahoo.com.mx

GTalk: alexl...@gmail.com

Movil: 044-311-112-86-41

--


  Encuentra las mejores recetas en Yahoo! Cocina.   
http://mx.mujer.yahoo.com/cocina/
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Linux 2.6.31, samba server no longer working

2009-10-17 Thread Timothy Normand Miller
I increased the log level and got something out of log.smbd.  It
claiming that the user millerti doesn't exist.  Some googling
suggested that samba is now using a new user database backend.  Using
smbpasswd, I added the missing user with the right password, and
voila, I am able to connect now.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Move samba server

2009-10-17 Thread Gary Dale

Alejandro Rodriguez Luna wrote:

Hi everybody,

I got a new servers and I'd like to move the old ones to the news, I know that 
to move samba, I need to move the SID. anybody knows a howto, o where I can 
find documentation to move the SID along with the users and machines.

P.D. Currently the samba server is the PDC.

--

Alejandro Rodriguez Luna

Web: http://www.alexluna.org

E-mail: el_alexl...@yahoo.com.mx

MSN: el_alexl...@yahoo.com.mx

GTalk: alexl...@gmail.com

Movil: 044-311-112-86-41

--


  Encuentra las mejores recetas en Yahoo! Cocina.   
http://mx.mujer.yahoo.com/cocina/
  

Basically, if your smb.conf and all the .tdb databases get moved, you
should be good to go. Just make sure that your local accounts and
machine name are the same as on the old server and the move should be
transparent to the users.

You can also look at the the vampire mode for moving your Samba setup
from one machine to another. It's been a while since I've done this, but
it wasn't overly difficult.


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


Build status as of Sat Oct 17 06:00:02 2009

2009-10-17 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-10-16 
00:00:04.0 -0600
+++ /home/build/master/cache/broken_results.txt 2009-10-17 00:00:03.0 
-0600
@@ -1,22 +1,22 @@
-Build status as of Fri Oct 16 06:00:03 2009
+Build status as of Sat Oct 17 06:00:02 2009
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
 ccache   2  1  0 
 distcc   0  0  0 
-ldb  28 28 0 
-libreplace   2  2  0 
+ldb  27 27 0 
+libreplace   1  1  0 
 lorikeet 0  0  0 
-pidl 18 17 0 
+pidl 1  1  0 
 ppp  0  0  0 
-rsync28 10 0 
+rsync27 10 0 
 samba-docs   0  0  0 
 samba-web0  0  0 
 samba_3_current 24 23 0 
-samba_3_master 25 25 3 
-samba_3_next 25 24 1 
+samba_3_master 25 25 5 
+samba_3_next 25 24 0 
 samba_4_0_test 26 26 1 
-talloc   28 28 0 
-tdb  1  1  0 
+talloc   27 27 0 
+tdb  0  0  0 
 


[SCM] Samba Shared Repository - branch master updated

2009-10-17 Thread Volker Lendecke
The branch, master has been updated
   via  3e3214f... s3:winbind: Move fillup_pw_field() as static to 
wb_fill_pwent.c
  from  46b7938... s4-smbserver: removed bogus initialisation of two union 
arms

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


- Log -
commit 3e3214fd91471bca5b6c4d3782e922d252d588fb
Author: Volker Lendecke v...@samba.org
Date:   Sat Oct 17 17:00:13 2009 +0200

s3:winbind: Move fillup_pw_field() as static to wb_fill_pwent.c

---

Summary of changes:
 source3/winbindd/wb_fill_pwent.c  |   47 +
 source3/winbindd/winbindd_proto.h |8 --
 source3/winbindd/winbindd_user.c  |   39 --
 3 files changed, 47 insertions(+), 47 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/wb_fill_pwent.c b/source3/winbindd/wb_fill_pwent.c
index 4f4819c..8998bf9 100644
--- a/source3/winbindd/wb_fill_pwent.c
+++ b/source3/winbindd/wb_fill_pwent.c
@@ -27,6 +27,14 @@ struct wb_fill_pwent_state {
struct winbindd_pw *pw;
 };
 
+static bool fillup_pw_field(const char *lp_template,
+   const char *username,
+   const char *domname,
+   uid_t uid,
+   gid_t gid,
+   const char *in,
+   fstring out);
+
 static void wb_fill_pwent_sid2uid_done(struct tevent_req *subreq);
 static void wb_fill_pwent_sid2gid_done(struct tevent_req *subreq);
 
@@ -153,3 +161,42 @@ NTSTATUS wb_fill_pwent_recv(struct tevent_req *req)
 {
return tevent_req_simple_recv_ntstatus(req);
 }
+
+static bool fillup_pw_field(const char *lp_template,
+   const char *username,
+   const char *domname,
+   uid_t uid,
+   gid_t gid,
+   const char *in,
+   fstring out)
+{
+   char *templ;
+
+   if (out == NULL)
+   return False;
+
+   /* The substitution of %U and %D in the 'template
+  homedir' is done by talloc_sub_specified() below.
+  If we have an in string (which means the value has already
+  been set in the nss_info backend), then use that.
+  Otherwise use the template value passed in. */
+
+   if ((in != NULL)  (in[0] != '\0')  (lp_security() == SEC_ADS)) {
+   templ = talloc_sub_specified(talloc_tos(), in,
+username, domname,
+uid, gid);
+   } else {
+   templ = talloc_sub_specified(talloc_tos(), lp_template,
+username, domname,
+uid, gid);
+   }
+
+   if (!templ)
+   return False;
+
+   safe_strcpy(out, templ, sizeof(fstring) - 1);
+   TALLOC_FREE(templ);
+
+   return True;
+
+}
diff --git a/source3/winbindd/winbindd_proto.h 
b/source3/winbindd/winbindd_proto.h
index 21feddf..6e232c9 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -545,14 +545,6 @@ enum winbindd_result winbindd_dual_allocate_gid(struct 
winbindd_domain *domain,
 
 /* The following definitions come from winbindd/winbindd_user.c  */
 
-bool fillup_pw_field(const char *lp_template,
-   const char *username,
-   const char *domname,
-   uid_t uid,
-   gid_t gid,
-   const char *in,
-fstring out);
-
 enum winbindd_result winbindd_dual_userinfo(struct winbindd_domain *domain,
struct winbindd_cli_state *state);
 void winbindd_getpwnam(struct winbindd_cli_state *state);
diff --git a/source3/winbindd/winbindd_user.c b/source3/winbindd/winbindd_user.c
index b709f4c..6afa941 100644
--- a/source3/winbindd/winbindd_user.c
+++ b/source3/winbindd/winbindd_user.c
@@ -27,45 +27,6 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
 
-bool fillup_pw_field(const char *lp_template,
-   const char *username,
-   const char *domname,
-   uid_t uid,
-   gid_t gid,
-   const char *in,
-   fstring out)
-{
-   char *templ;
-
-   if (out == NULL)
-   return False;
-
-   /* The substitution of %U and %D in the 'template
-  homedir' is done by talloc_sub_specified() below.
-  If we have an in string (which means the value has already
-  been set in the nss_info backend), then use that.
-  Otherwise use the template value passed in. */
-
-   if 

[SCM] Samba Shared Repository - branch master updated

2009-10-17 Thread Jeremy Allison
The branch, master has been updated
   via  096589a... Trying to find out why the posix_unlink test build farm 
is still failing even though we're now successfully deleting the symlink. 
Jeremy.
   via  7c51fa6... Merge branch 'master' of 
ssh://j...@git.samba.org/data/git/samba
   via  cc3a677... unlink defer torture test
  from  3e3214f... s3:winbind: Move fillup_pw_field() as static to 
wb_fill_pwent.c

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


- Log -
commit 096589aead97f52b5009970d28a00a6d1a205a7e
Author: Jeremy Allison j...@samba.org
Date:   Sat Oct 17 10:38:44 2009 -0700

Trying to find out why the posix_unlink test build farm is still failing 
even
though we're now successfully deleting the symlink.
Jeremy.

commit 7c51fa6d699a653cafa90df8e44911b576118ebd
Merge: cc3a6770c77ec8fe1cd63bf4c682853c56201f0c 
3e3214fd91471bca5b6c4d3782e922d252d588fb
Author: Jeremy Allison j...@samba.org
Date:   Sat Oct 17 10:36:33 2009 -0700

Merge branch 'master' of ssh://j...@git.samba.org/data/git/samba

commit cc3a6770c77ec8fe1cd63bf4c682853c56201f0c
Author: Tim Prouty tpro...@samba.org
Date:   Mon Sep 28 10:43:44 2009 -0700

unlink defer torture test

---

Summary of changes:
 source3/script/tests/test_smbclient_s3.sh |2 +-
 source4/torture/raw/unlink.c  |  100 +
 2 files changed, 101 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_smbclient_s3.sh 
b/source3/script/tests/test_smbclient_s3.sh
index f10bfea..3ff9597 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -108,7 +108,7 @@ EOF
 
 if [ $ret != 0 ] ; then
echo $out
-   echo failed create then delete bad symlink
+   echo failed create then delete bad symlink with error $ret
false
return
 fi
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index 699bc30..28218b2 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -435,6 +435,105 @@ done:
 }
 
 
+struct unlink_defer_cli_state {
+   struct torture_context *tctx;
+   struct smbcli_state *cli1;
+};
+
+/*
+ * A handler function for oplock break requests. Ack it as a break to none
+ */
+static bool oplock_handler_ack_to_none(struct smbcli_transport *transport,
+  uint16_t tid, uint16_t fnum,
+  uint8_t level, void *private_data)
+{
+   struct unlink_defer_cli_state *ud_cli_state =
+   (struct unlink_defer_cli_state *)private_data;
+   union smb_setfileinfo sfinfo;
+   NTSTATUS status;
+   bool ret;
+   struct smbcli_request *req = NULL;
+
+   torture_comment(ud_cli_state-tctx, delete the file before sending 
+   the ack.);
+
+   /* cli1: set delete on close */
+   sfinfo.disposition_info.level = RAW_SFILEINFO_DISPOSITION_INFO;
+   sfinfo.disposition_info.in.file.fnum = fnum;
+   sfinfo.disposition_info.in.delete_on_close = 1;
+   req = smb_raw_setfileinfo_send(ud_cli_state-cli1-tree, sfinfo);
+
+   smbcli_close(ud_cli_state-cli1-tree, fnum);
+
+   torture_comment(ud_cli_state-tctx, Acking the oplock to NONE\n);
+
+   ret = smbcli_oplock_ack(ud_cli_state-cli1-tree, fnum,
+OPLOCK_BREAK_TO_NONE);
+ done:
+   return ret;
+}
+
+static bool test_unlink_defer(struct torture_context *tctx,
+ struct smbcli_state *cli1,
+ struct smbcli_state *cli2)
+{
+   const char *fname = BASEDIR \\test_unlink_defer.dat;
+   NTSTATUS status;
+   bool ret = true;
+   union smb_open io;
+   union smb_unlink unl;
+   uint16_t fnum=0;
+   struct unlink_defer_cli_state ud_cli_state = {};
+
+   if (!torture_setup_dir(cli1, BASEDIR)) {
+   return false;
+   }
+
+   /* cleanup */
+   smbcli_unlink(cli1-tree, fname);
+
+   ud_cli_state.tctx = tctx;
+   ud_cli_state.cli1 = cli1;
+
+   smbcli_oplock_handler(cli1-transport, oplock_handler_ack_to_none,
+ ud_cli_state);
+
+   io.generic.level = RAW_OPEN_NTCREATEX;
+   io.ntcreatex.in.root_fid = 0;
+   io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
+   io.ntcreatex.in.alloc_size = 0;
+   io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
+   io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ |
+   NTCREATEX_SHARE_ACCESS_WRITE |
+   NTCREATEX_SHARE_ACCESS_DELETE;
+   io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN_IF;
+   io.ntcreatex.in.create_options = 0;
+   io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
+   io.ntcreatex.in.security_flags 

[SCM] Samba Shared Repository - branch master updated

2009-10-17 Thread Jeremy Allison
The branch, master has been updated
   via  d6351ad... Fix the smbtorture4 build. root_fid is a union 
smb_handle. tridge please check. Jeremy.
  from  096589a... Trying to find out why the posix_unlink test build farm 
is still failing even though we're now successfully deleting the symlink. 
Jeremy.

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


- Log -
commit d6351adca9c1eb6bc01ec5390abf8bc06b008de0
Author: Jeremy Allison j...@samba.org
Date:   Sat Oct 17 12:56:15 2009 -0700

Fix the smbtorture4 build. root_fid is a union smb_handle. tridge
please check.
Jeremy.

---

Summary of changes:
 source4/torture/raw/unlink.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index 28218b2..968a4a8 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -499,7 +499,7 @@ static bool test_unlink_defer(struct torture_context *tctx,
  ud_cli_state);
 
io.generic.level = RAW_OPEN_NTCREATEX;
-   io.ntcreatex.in.root_fid = 0;
+   io.ntcreatex.in.root_fid.fnum = 0;
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
io.ntcreatex.in.alloc_size = 0;
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-10-17 Thread Andrew Tridgell
The branch, master has been updated
   via  0463d69... s4-pvfs: change the handling of access checking on create
   via  d1efaf3... smb2-torture: samba4 allows SEC_FLAG_SECURITY to be used 
with privileges
   via  a319ba4... s4: fixed howto for new binary name
  from  d6351ad... Fix the smbtorture4 build. root_fid is a union 
smb_handle. tridge please check. Jeremy.

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


- Log -
commit 0463d698835053af680db4f388c732d2557f7c8a
Author: Andrew Tridgell tri...@samba.org
Date:   Sat Oct 17 21:17:29 2009 +1100

s4-pvfs: change the handling of access checking on create

Previously when a file was created, we produces the resulting access
mask based on an ACL check against the parent. This change means we
now calculate the inherited ACL much earlier, and produce the
resulting access mask from that ACL, or the user supplied ACL.

commit d1efaf39f51102835eda9aca12433e926354da77
Author: Andrew Tridgell tri...@samba.org
Date:   Sat Oct 17 21:14:59 2009 +1100

smb2-torture: samba4 allows SEC_FLAG_SECURITY to be used with privileges

commit a319ba49e79fdc6ed37996d185aece5dbb5a905e
Author: Andrew Tridgell tri...@samba.org
Date:   Sat Oct 17 20:10:03 2009 +1100

s4: fixed howto for new binary name

---

Summary of changes:
 howto4.txt |   10 +-
 source4/ntvfs/posix/pvfs_acl.c |  149 ++--
 source4/ntvfs/posix/pvfs_open.c|   22 +++---
 source4/ntvfs/posix/pvfs_resolve.c |   11 ++-
 source4/ntvfs/posix/pvfs_setfileinfo.c |2 +-
 source4/torture/smb2/create.c  |2 +
 6 files changed, 131 insertions(+), 65 deletions(-)


Changeset truncated at 500 lines:

diff --git a/howto4.txt b/howto4.txt
index 3ae225d..3ae5af1 100644
--- a/howto4.txt
+++ b/howto4.txt
@@ -101,18 +101,18 @@ example::
 Step 6: starting Samba4
 ---
 
-The simplest is to just run smbd, but as a developer you may find
+The simplest is to just run samba, but as a developer you may find
 the following more useful::
 
-   # smbd -i -M single
+   # samba -i -M single
 
-that means start smbd without messages in stdout, and running a
-single process. That mode of operation makes debugging smbd with gdb
+that means start samba without messages in stdout, and running a
+single process. That mode of operation makes debugging samba with gdb
 particularly easy.
 
 Note that now it is no longer necessary to have an instance of nmbd
 from Samba 3 running.  If you are running any smbd or nmbd processes
-they need to be stopped before starting smbd from Samba 4.
+they need to be stopped before starting samba from Samba 4.
 
 Make sure you put the bin and sbin directories from your new install
 in your $PATH. Make sure you run the right version!
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index 26515cf..842aced 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -485,6 +485,8 @@ static bool pvfs_group_member(struct pvfs_state *pvfs, 
gid_t gid)
   doing this saves on building a full security descriptor
   for the common case of access check on files with no 
   specific NT ACL
+
+  If name is NULL then treat as a new file creation
 */
 NTSTATUS pvfs_access_check_unix(struct pvfs_state *pvfs, 
struct ntvfs_request *req,
@@ -499,13 +501,14 @@ NTSTATUS pvfs_access_check_unix(struct pvfs_state *pvfs,
return NT_STATUS_ACCESS_DENIED;
}
 
-   if (uid == name-st.st_uid) {
+   if (name == NULL || uid == name-st.st_uid) {
max_bits |= SEC_STD_ALL;
} else if (security_token_has_privilege(token, SEC_PRIV_RESTORE)) {
max_bits |= SEC_STD_DELETE;
}
 
-   if ((name-st.st_mode  S_IWOTH) ||
+   if (name == NULL ||
+   (name-st.st_mode  S_IWOTH) ||
((name-st.st_mode  S_IWGRP)  
 pvfs_group_member(pvfs, name-st.st_gid))) {
max_bits |= SEC_STD_ALL;
@@ -540,7 +543,7 @@ NTSTATUS pvfs_access_check_unix(struct pvfs_state *pvfs,
 
if (*access_mask  ~max_bits) {
DEBUG(0,(__location__  denied access to '%s' - wanted 0x%08x 
but got 0x%08x (missing 0x%08x)\n,
-name-full_name, *access_mask, max_bits, *access_mask 
 ~max_bits));
+name?name-full_name:(new file), *access_mask, 
max_bits, *access_mask  ~max_bits));
return NT_STATUS_ACCESS_DENIED;
}
 
@@ -643,26 +646,47 @@ NTSTATUS pvfs_access_check_simple(struct pvfs_state *pvfs,
 NTSTATUS pvfs_access_check_create(struct pvfs_state *pvfs, 
  struct ntvfs_request *req,
  struct pvfs_filename *name,
- 

[SCM] Samba Shared Repository - branch master updated

2009-10-17 Thread Andrew Tridgell
The branch, master has been updated
   via  a2aa13d... s4-pvfs: more fixes for ACLs on file creation
   via  bae8c93... s4-smb2: fixed SMB2 find commands
  from  0463d69... s4-pvfs: change the handling of access checking on create

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


- Log -
commit a2aa13da3272b62b8d47d624a0d7fc65825adf6e
Author: Andrew Tridgell tri...@samba.org
Date:   Sun Oct 18 10:32:06 2009 +1100

s4-pvfs: more fixes for ACLs on file creation

The passed in SD is not used to limit the access mask allowed on file
create.

commit bae8c93d9b5b2ae9a028573559b2fd0d306c0530
Author: Andrew Tridgell tri...@samba.org
Date:   Sun Oct 18 10:30:10 2009 +1100

s4-smb2: fixed SMB2 find commands

The change to check for invalid \ prefix on SMB2 paths broke the
internal SMB2 code.

---

Summary of changes:
 source4/ntvfs/posix/pvfs_acl.c|   23 ---
 source4/ntvfs/posix/pvfs_search.c |4 ++--
 2 files changed, 14 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index 842aced..5931a38 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -659,14 +659,10 @@ NTSTATUS pvfs_access_check_create(struct pvfs_state *pvfs,
}
 
status = pvfs_resolve_parent(pvfs, req, name, parent);
-   if (!NT_STATUS_IS_OK(status)) {
-   return status;
-   }
+   NT_STATUS_NOT_OK_RETURN(status);
 
status = pvfs_access_check_simple(pvfs, req, parent, SEC_DIR_ADD_FILE);
-   if (!NT_STATUS_IS_OK(status)) {
-   return status;
-   }
+   NT_STATUS_NOT_OK_RETURN(status);
 
if (*sd == NULL) {
status = pvfs_acl_inherited_sd(pvfs, req, req, parent, 
container, sd);
@@ -679,14 +675,19 @@ NTSTATUS pvfs_access_check_create(struct pvfs_state *pvfs,
 
/* expand the generic access bits to file specific bits */
*access_mask = pvfs_translate_mask(*access_mask);
-   if (pvfs-ntvfs-ctx-protocol != PROTOCOL_SMB2) {
-   *access_mask = ~SEC_FILE_READ_ATTRIBUTE;
+
+   if (*access_mask  SEC_FLAG_MAXIMUM_ALLOWED) {
+   *access_mask |= SEC_RIGHTS_FILE_ALL;
+   *access_mask = ~SEC_FLAG_MAXIMUM_ALLOWED;
}
 
-   if (*sd == NULL) {
-   return pvfs_access_check_unix(pvfs, req, NULL, access_mask);
+   if (pvfs-ntvfs-ctx-protocol != PROTOCOL_SMB2) {
+   /* on SMB, this bit is always granted, even if not
+  asked for */
+   *access_mask |= SEC_FILE_READ_ATTRIBUTE;
}
-   return sec_access_check(*sd, token, *access_mask, access_mask);
+
+   return NT_STATUS_OK;
 }
 
 /*
diff --git a/source4/ntvfs/posix/pvfs_search.c 
b/source4/ntvfs/posix/pvfs_search.c
index dc4f86b..d0d2620 100644
--- a/source4/ntvfs/posix/pvfs_search.c
+++ b/source4/ntvfs/posix/pvfs_search.c
@@ -666,10 +666,10 @@ static NTSTATUS pvfs_search_first_smb2(struct 
ntvfs_module_context *ntvfs,
}
 
if (strequal(, f-handle-name-original_name)) {
-   pattern = talloc_asprintf(req, \\%s, io-in.pattern);
+   pattern = talloc_asprintf(req, %s, io-in.pattern);
NT_STATUS_HAVE_NO_MEMORY(pattern);
} else {
-   pattern = talloc_asprintf(req, \\%s\\%s,
+   pattern = talloc_asprintf(req, %s\\%s,
  f-handle-name-original_name,
  io-in.pattern);
NT_STATUS_HAVE_NO_MEMORY(pattern);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-10-17 Thread Jeremy Allison
The branch, master has been updated
   via  8d85757... Fix posix_unlink test. Was doing grep without quotes 
around the target string. Jeremy.
  from  a2aa13d... s4-pvfs: more fixes for ACLs on file creation

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


- Log -
commit 8d85757578a21ed93d7604d627e329ddf3e04067
Author: Jeremy Allison j...@samba.org
Date:   Sat Oct 17 20:46:22 2009 -0700

Fix posix_unlink test. Was doing grep without quotes around the
target string.
Jeremy.

---

Summary of changes:
 source3/script/tests/test_smbclient_s3.sh |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_smbclient_s3.sh 
b/source3/script/tests/test_smbclient_s3.sh
index 3ff9597..ff50220 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -113,14 +113,15 @@ EOF
return
 fi
 
-echo $out | grep $prompt /dev/null 21
+echo $out | grep $prompt /dev/null 21
 
-if [ $? = 0 ] ; then
+ret=$?
+if [ $ret = 0 ] ; then
# got the correct prompt .. succeed
true
 else
echo $out
-   echo failed create then delete bad symlink
+   echo failed create then delete bad symlink - grep failed with $ret
false
 fi
 }


-- 
Samba Shared Repository


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

2009-10-17 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  404f744... Fix posix_unlink test. Was doing grep without quotes 
around the target string. Jeremy.
  from  62620e9... Add comment explaining about symlink following  posix. 
Jeremy.

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


- Log -
commit 404f744772ab68ac5a4722818d447609c33a39b7
Author: Jeremy Allison j...@samba.org
Date:   Sat Oct 17 20:47:47 2009 -0700

Fix posix_unlink test. Was doing grep without quotes around the
target string.
Jeremy.

---

Summary of changes:
 source3/script/tests/test_smbclient_s3.sh |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_smbclient_s3.sh 
b/source3/script/tests/test_smbclient_s3.sh
index f10bfea..ff50220 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -108,19 +108,20 @@ EOF
 
 if [ $ret != 0 ] ; then
echo $out
-   echo failed create then delete bad symlink
+   echo failed create then delete bad symlink with error $ret
false
return
 fi
 
-echo $out | grep $prompt /dev/null 21
+echo $out | grep $prompt /dev/null 21
 
-if [ $? = 0 ] ; then
+ret=$?
+if [ $ret = 0 ] ; then
# got the correct prompt .. succeed
true
 else
echo $out
-   echo failed create then delete bad symlink
+   echo failed create then delete bad symlink - grep failed with $ret
false
 fi
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-10-17 Thread Andrew Tridgell
The branch, master has been updated
   via  9ae4dae... s4-torture: fixed the streams tests for Samba4
   via  764c09e... s4-streams: fixed handling of stream rename and overwrite
   via  44612c7... s4-pvfs: rename with full name gives SHARING_VIOLATION
   via  83db71e... s4-pvfs: when reporting the file name, don't include the 
:$DATA suffix
   via  2d4ad4f... s4-pvfs: the STREAM_INFORMATION calls don't need any 
access flags
   via  edd0ea5... s4-pvfs: fixed update of stream sizes
  from  8d85757... Fix posix_unlink test. Was doing grep without quotes 
around the target string. Jeremy.

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


- Log -
commit 9ae4daeb96ecf99f17f425678d2386758ab5aa35
Author: Andrew Tridgell tri...@samba.org
Date:   Sun Oct 18 14:22:42 2009 +1100

s4-torture: fixed the streams tests for Samba4

In some cases we were not doing streams tests on s4 that we should. In
others, we were calling tests that are known to fail on s4. Some of
those are a bit puzzling.

commit 764c09e6bc92d8ccd33b44d6cc80e82a9b4d76f0
Author: Andrew Tridgell tri...@samba.org
Date:   Sun Oct 18 14:19:27 2009 +1100

s4-streams: fixed handling of stream rename and overwrite

commit 44612c74a6de8becd8f8dc51590616ba792ca13f
Author: Andrew Tridgell tri...@samba.org
Date:   Sun Oct 18 14:15:48 2009 +1100

s4-pvfs: rename with full name gives SHARING_VIOLATION

commit 83db71e9a71f01d6a9eea2d1436bd9ee28c250a0
Author: Andrew Tridgell tri...@samba.org
Date:   Sun Oct 18 14:14:16 2009 +1100

s4-pvfs: when reporting the file name, don't include the :$DATA suffix

commit 2d4ad4f5048269afcfeece446780855dd3cd5649
Author: Andrew Tridgell tri...@samba.org
Date:   Sun Oct 18 14:13:45 2009 +1100

s4-pvfs: the STREAM_INFORMATION calls don't need any access flags

commit edd0ea5225c61b889e48034cc9e10f22006716ce
Author: Andrew Tridgell tri...@samba.org
Date:   Sun Oct 18 12:24:09 2009 +1100

s4-pvfs: fixed update of stream sizes

The data_blob_free() was changing the size we set the stream to

---

Summary of changes:
 source4/ntvfs/posix/pvfs_qfileinfo.c   |5 +++
 source4/ntvfs/posix/pvfs_rename.c  |3 +-
 source4/ntvfs/posix/pvfs_resolve.c |   10 ++
 source4/ntvfs/posix/pvfs_setfileinfo.c |7 +++-
 source4/ntvfs/posix/pvfs_streams.c |   26 +++-
 source4/torture/raw/streams.c  |   52 ++--
 source4/torture/smb2/streams.c |   34 ++--
 7 files changed, 86 insertions(+), 51 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c 
b/source4/ntvfs/posix/pvfs_qfileinfo.c
index bfc9a84..713925d 100644
--- a/source4/ntvfs/posix/pvfs_qfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_qfileinfo.c
@@ -45,6 +45,11 @@ static uint32_t pvfs_fileinfo_access(union smb_fileinfo 
*info)
needed = 0;
break;
 
+   case RAW_FILEINFO_STREAM_INFO:
+   case RAW_FILEINFO_STREAM_INFORMATION:
+   needed = 0;
+   break;
+
case RAW_FILEINFO_SEC_DESC:
needed = 0;
if (info-query_secdesc.in.secinfo_flags  
(SECINFO_OWNER|SECINFO_GROUP)) {
diff --git a/source4/ntvfs/posix/pvfs_rename.c 
b/source4/ntvfs/posix/pvfs_rename.c
index 0616d38..d963357 100644
--- a/source4/ntvfs/posix/pvfs_rename.c
+++ b/source4/ntvfs/posix/pvfs_rename.c
@@ -515,7 +515,8 @@ static NTSTATUS pvfs_rename_stream(struct 
ntvfs_module_context *ntvfs,
NT_STATUS_NOT_OK_RETURN(status);
 
status = pvfs_stream_rename(pvfs, name1, -1, 
-   ren-ntrename.in.new_name+1);
+   ren-ntrename.in.new_name+1, 
+   true);
NT_STATUS_NOT_OK_RETURN(status);

return NT_STATUS_OK;
diff --git a/source4/ntvfs/posix/pvfs_resolve.c 
b/source4/ntvfs/posix/pvfs_resolve.c
index 8c5806d..c01799e 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -263,6 +263,16 @@ static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, 
const char *cifs_name,
NTSTATUS status;
 
name-original_name = talloc_strdup(name, cifs_name);
+
+   /* remove any :$DATA */
+   p = strrchr(name-original_name, ':');
+   if (p  strcasecmp_m(p, :$DATA) == 0) {
+   if (p  name-original_name  p[-1] == ':') {
+   p--;
+   }
+   *p = 0;
+   }
+
name-stream_name = NULL;
name-stream_id = 0;
name-has_wildcard = false;
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c 
b/source4/ntvfs/posix/pvfs_setfileinfo.c
index 2445483..b40ae9c 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -89,8 

[SCM] Samba Shared Repository - branch master updated

2009-10-17 Thread Andrew Tridgell
The branch, master has been updated
   via  5d3659a... s4-test: SMB2 oplocks in s4 are a mess
   via  81eb31f... s4: spelling error
  from  9ae4dae... s4-torture: fixed the streams tests for Samba4

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


- Log -
commit 5d3659a8819bee6c5337c21f1148bc6658f7bb0a
Author: Andrew Tridgell tri...@samba.org
Date:   Sun Oct 18 15:57:21 2009 +1100

s4-test: SMB2 oplocks in s4 are a mess

I don't have time to fix these right now, and as we don't advertise
SMB2 by default I'll mark it as a known failure till we start enabling
SMB2 by default.

commit 81eb31f07b6c8802021ff524646323c2aa6e3af5
Author: Andrew Tridgell tri...@samba.org
Date:   Sun Oct 18 15:56:16 2009 +1100

s4: spelling error

---

Summary of changes:
 source4/lib/stream/packet.c |2 +-
 source4/selftest/knownfail  |1 +
 2 files changed, 2 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/stream/packet.c b/source4/lib/stream/packet.c
index f5e2b84..251d951 100644
--- a/source4/lib/stream/packet.c
+++ b/source4/lib/stream/packet.c
@@ -526,7 +526,7 @@ _PUBLIC_ void packet_queue_run(struct packet_context *pc)
   put a packet in the send queue.  When the packet is actually sent,
   call send_callback.  
 
-  Useful for operations that must occour after sending a message, such
+  Useful for operations that must occur after sending a message, such
   as the switch to SASL encryption after as sucessful LDAP bind relpy.
 */
 _PUBLIC_ NTSTATUS packet_send_callback(struct packet_context *pc, DATA_BLOB 
blob,
diff --git a/source4/selftest/knownfail b/source4/selftest/knownfail
index 5061171..a9192be 100644
--- a/source4/selftest/knownfail
+++ b/source4/selftest/knownfail
@@ -63,3 +63,4 @@ samba4.ntvfs.cifs.base.createx_access
 samba4.ntvfs.cifs.base.createx_sharemodes_dir
 samba4.ntvfs.cifs.base.maximum_allowed
 samba4.base.createx_access # this test is broken for non-administrator users
+samba4.smb2.oplock # oplocks in the s4 SMB2 server are a mess


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-10-17 Thread Andrew Tridgell
The branch, master has been updated
   via  bc2b419... s4-test: the ldap secdesc test is expected to fail for 
now
  from  5d3659a... s4-test: SMB2 oplocks in s4 are a mess

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


- Log -
commit bc2b4192c0e4e29ff8f698068bf5d6c04a96beab
Author: Andrew Tridgell tri...@samba.org
Date:   Sun Oct 18 16:32:01 2009 +1100

s4-test: the ldap secdesc test is expected to fail for now

Nadya, if this is not correct and you think this should be passing
already the please let me know. When I looked over it, it doesn't look
like it has a chance of passing until your acl module is in place and
enabled by default.

---

Summary of changes:
 source4/selftest/knownfail |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/selftest/knownfail b/source4/selftest/knownfail
index a9192be..4797985 100644
--- a/source4/selftest/knownfail
+++ b/source4/selftest/knownfail
@@ -64,3 +64,4 @@ samba4.ntvfs.cifs.base.createx_sharemodes_dir
 samba4.ntvfs.cifs.base.maximum_allowed
 samba4.base.createx_access # this test is broken for non-administrator users
 samba4.smb2.oplock # oplocks in the s4 SMB2 server are a mess
+samba4.ldap.secdesc.python # this is expected to fail until the acl module is 
complete


-- 
Samba Shared Repository