[Samba] Samba User password problem

2009-05-14 Thread Chris Roubekas
Dear list,

I have recently installed Ubuntu 8.04 Server on a machine which I want to be
a domain controler for a small network of 5 PCs, each of them running WinXP
Pro SP2.

I have read and followed all the instructions on Samba's site and have
generated machine trust accounts and usernames/passwords for the users of
the local net. There is no firewall installed on Ubuntu.

Althought I have done this task a few times by now for various networks, the
odd thing about this installation is that the passwords that the users use
keep reseting, meaning that although I set the passwords for them with
smbpasswd -a username and then input their passwords and the users do not
change them, after a few successful logins, WinXP complains that
username/password might be incorect.

What I have done that seems to work is to execute a smbpasswd username and
place the same passwd again which seems to solve the issue, but for only a
few logins.

I have tried to re-join the computers to the domain and the process of
joining runs smoothly without any errors. However after a few logins, the
problem prevails.

Samba version is 3.0.28a.
Passwd backend is smbpasswd.

Any help would be greatly appreciated as this server is a production server
and users keep sending requests that their passwds don't work and I have
re-set their passwords almost on a daily basis.

Thank you !!
Chris
 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4073 (20090513) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

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


[Samba] Samba User password problem

2009-05-14 Thread Chris Roubekas
Dear list,

I have recently installed Ubuntu 8.04 Server on a machine which I want to be
a domain controler for a small network of 5 PCs, each of them running WinXP
Pro SP2.

I have read and followed all the instructions on Samba's site and have
generated machine trust accounts and usernames/passwords for the users of
the local net. There is no firewall installed on Ubuntu.

Althought I have done this task a few times by now for various networks, the
odd thing about this installation is that the passwords that the users use
keep reseting, meaning that although I set the passwords for them with
smbpasswd -a username and then input their passwords and the users do not
change them, after a few successful logins, WinXP complains that
username/password might be incorect.

What I have done that seems to work is to execute a smbpasswd username and
place the same passwd again which seems to solve the issue, but for only a
few logins.

I have tried to re-join the computers to the domain and the process of
joining runs smoothly without any errors. However after a few logins, the
problem prevails.

Samba version is 3.0.28a.
Passwd backend is smbpasswd.

Any help would be greatly appreciated as this server is a production server
and users keep sending requests that their passwds don't work and I have
re-set their passwords almost on a daily basis.

Thank you !!
Chris
 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4073 (20090513) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

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


[Samba] parameter default devmode missing in man pages and other docs

2009-05-14 Thread Axel Werner
Why is the smb.conf  Parameter default devmode missing in pretty much 
any samba documentation like man page etc ??


does someone have a good official  explaination about this parameter ?


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


Re: [Samba] NTFS Attributes

2009-05-14 Thread Mark Adams
Hi Dale,

Thanks for your config -- unfortunately still getting the errors with my
backup software.

I'll look in to Volker's earlier suggestions in more detail.

Cheers all
Mark

On Tue, May 12, 2009 at 12:53:15PM -0500, Dale Schroeder wrote:
 Mark,

 I use this combination.  See if it works for you.

store dos attributes = yes
ea support = yes
map hidden = no
map system = no
map archive = no
map readonly = no

 nt acl support = yes is the default.  It doesn't appear in a standard  
 testparm.
 Use testparm -v for this option to display.

 Dale


 Mark Adams wrote:
 Hi,

 This definately sounds like what I'm after, However I've added installed
 acl, and added the required options to no avail. 

 The file server is mounted with acl
 /dev/hda1 on / type ext3 (rw,errors=remount-ro,user_xattr,acl)

 and the samba share has nt acl support = yes
 [test_backup2]
comment = Test Backup 2
path = /home/it/test_dir/
browseable = yes
create mask = 0770
directory mask = 2770
valid users = test
nt acl support = yes
store dos attributes = yes
write list = test

 When I run a testparm, the nt acl support line doesn't show.

 I still get the error regarding the destination not supporting copying
 of NTFS attributes.

 Can anyone see what I am missing or point me in any other directions?

 Thanks for the replies so far
 Mark

 On Fri, May 08, 2009 at 09:51:37AM +, Wikked one wrote:
   
 Hi Mark,
I think this is what you're looking for?
 http://www.debianhelp.co.uk/acl.htm
 http://aisalen.wordpress.com/2007/08/10/acls-on-samba/


 This will allow you to emulate most NTFS attributes with your back up.









 
 Date: Thu, 7 May 2009 16:51:49 +0100
 From: m...@campbell-lange.net
 To: volker.lende...@sernet.de
 Subject: Re: [Samba] NTFS Attributes
 CC: samba@lists.samba.org

 Hi, Thanks for your response.

 This has correced the errors regarding hidden and system attributes,
 however the error regarding NTFS Attributes still persists. Are their
 any other options that I may be missing?

 Best Regards,
 Mark

 On Wed, May 06, 2009 at 11:29:00AM +0200, Volker Lendecke wrote:
   
 On Wed, May 06, 2009 at 09:52:35AM +0100, Mark Adams wrote:
 
 Hi There,

 Debian squeeze, samba 3.3.3-1

 I am currently trying to use a samba partition to backup windows
 machines to, and am always warned that the destination does not support
 NTFS attributes, hidden attributes and system attributes.

 Are there any config options to enable these in samba? or does samba not
 support mapping these to something on the linux side?

 Any help or links to documentation would be appreciated.
   
 store dos attributes = yes

 Volker
 
 -- 
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba
   
 _
 Hotmail® has a new way to see what's up with your friends.
 http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] parameter default devmode missing in man pages and other docs

2009-05-14 Thread Karolin Seeger
Hi Axel,

On Thu, May 14, 2009 at 10:15:59AM +0200, Axel Werner wrote:
 Why is the smb.conf  Parameter default devmode missing in pretty much any 
 samba documentation like man page etc ??

 does someone have a good official  explaination about this parameter ?

man smm.conf (3.3.4):
-8--snip--8--
default devmode (S)

   This parameter is only applicable to printable services. When
smbd is serving Printer Drivers to
   Windows NT/2k/XP clients, each printer on the Samba server has
a Device Mode which defines
   things such as paper size and orientation and duplex settings.
The device mode can only
   correctly be generated by the printer driver itself (which can
only be executed on a Win32
   platform). Because smbd is unable to execute the driver code to
generate the device mode, the
   default behavior is to set this field to NULL.

   Most problems with serving printer drivers to Windows NT/2k/XP
clients can be traced to a
   problem with the generated device mode. Certain drivers will do
things such as crashing the
   clientŽs Explorer.exe with a NULL devmode. However, other
printer drivers can cause the clientŽs
   spooler service (spoolsv.exe) to die if the devmode was not
created by the driver itself (i.e.
   smbd generates a default devmode).

   This parameter should be used with care and tested with the
printer driver in question. It is
   better to leave the device mode to NULL and let the Windows
client set the correct values.
   Because drivers do not do this all the time, setting default
devmode = yes will instruct smbd to
   generate a default one.

   For more information on Windows NT/2k printing and Device
Modes, see the MSDN documentation.

   Default: default devmode = yes
-8--snap--8--

Cheers,
Karolin

-- 
Samba   http://www.samba.org
SerNet  http://www.sernet.de
sambaXP http://www.sambaxp.org



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

Re: [Samba] Moving premises, new server at new building

2009-05-14 Thread Adam Williams
I'd just have your current samba server as the master ldap server and 
PDC, and have the server at the other location be a BDC, and it can 
either be a slave ldap server, master/master ldap configuration, or just 
connect to the master ldap server directly for queries.  i have a few 
remote sites on dsl or t-1 and they just query the LDAP server 
directly.  also, with ldap you can specify the roaming profile location 
so just have the users at the remote site load their roaming profiles 
from the remote servers.




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


Re: [Samba] Samba and ACL and automatic inheriting

2009-05-14 Thread Karl Koch

Scott Lovenberg schrieb:

Karl Koch wrote:

hello,

i use samba with acl bound into a w2k3 ads domain.
i have set the option inherit acls = yes and when i change a acl on a 
folder the new folders i create have the same acls.
But when i change the acl on a folder the subdirectorys of this 
folder wont update automatic like under a win ntfs system.
i controll the acls through a windows machine an so it is not so good 
that i musst inherit the acls manually.


Is there any option i can do this?
And yes i know setfacl -R :-) But i want i more comfortable so other 
useres can controll it.



Have you set a default ACL entry for the top level directory? ie, 
setfacl d:user:perm
Yes and it works for directories that i create after that. but when i 
change something on the top level directory then i musst inherit the 
acls manually.

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


Re: [Samba] Samba and ACL and automatic inheriting

2009-05-14 Thread mallapadi niranjan
What is the version of samba ?

On Thu, May 14, 2009 at 5:56 PM, Karl Koch ka...@nospam.de wrote:
 Scott Lovenberg schrieb:

 Karl Koch wrote:

 hello,

 i use samba with acl bound into a w2k3 ads domain.
 i have set the option inherit acls = yes and when i change a acl on a
 folder the new folders i create have the same acls.
 But when i change the acl on a folder the subdirectorys of this folder
 wont update automatic like under a win ntfs system.
 i controll the acls through a windows machine an so it is not so good
 that i musst inherit the acls manually.

 Is there any option i can do this?
 And yes i know setfacl -R :-) But i want i more comfortable so other
 useres can controll it.


 Have you set a default ACL entry for the top level directory? ie, setfacl
 d:user:perm

 Yes and it works for directories that i create after that. but when i change
 something on the top level directory then i musst inherit the acls manually.
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

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


Re: [Samba] Samba User password problem

2009-05-14 Thread Nick Pappin
The first problem I think you are running into is you are using a smbpasswd
backend. Unfortunatly this doesn't have the support for the attributes you
need to run a domain. To fix this you need to be running a TDBSAM backend.
You would probably find the samba 3 by example handy, (
http://us1.samba.org/samba/docs/man/Samba-Guide/) and the offical howto (
http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/).

On Wed, May 13, 2009 at 11:52 PM, Chris Roubekas croube...@gmail.comwrote:

 Dear list,

 I have recently installed Ubuntu 8.04 Server on a machine which I want to
 be
 a domain controler for a small network of 5 PCs, each of them running WinXP
 Pro SP2.

 I have read and followed all the instructions on Samba's site and have
 generated machine trust accounts and usernames/passwords for the users of
 the local net. There is no firewall installed on Ubuntu.

 Althought I have done this task a few times by now for various networks,
 the
 odd thing about this installation is that the passwords that the users use
 keep reseting, meaning that although I set the passwords for them with
 smbpasswd -a username and then input their passwords and the users do not
 change them, after a few successful logins, WinXP complains that
 username/password might be incorect.

 What I have done that seems to work is to execute a smbpasswd username
 and
 place the same passwd again which seems to solve the issue, but for only a
 few logins.

 I have tried to re-join the computers to the domain and the process of
 joining runs smoothly without any errors. However after a few logins, the
 problem prevails.

 Samba version is 3.0.28a.
 Passwd backend is smbpasswd.

 Any help would be greatly appreciated as this server is a production server
 and users keep sending requests that their passwds don't work and I have
 re-set their passwords almost on a daily basis.

 Thank you !!
 Chris


 __ Information from ESET NOD32 Antivirus, version of virus
 signature
 database 4073 (20090513) __

 The message was checked by ESET NOD32 Antivirus.

 http://www.eset.com


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

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


[Samba] 2003 server member of a SMB3 domain

2009-05-14 Thread aurelien sergent
Hi all

I am facing the following issue :

I 've just installed a fresh windows 2003 server and want to add it to a
samba 3 domain.
netbios is ok on windows, I can log onto the smb server shares... but if I
try to add the 2003 server to the domain it echoes the an error saying that
the PDC for the domain XXX (netbios domain format, not dns) can't be found.

I don't understand why because I have another 2003 server which has joined
the smb domain without any issue some month ago.

client : windows 2003 SP2 (not R2)
server PDC :  Version 3.2.7

global part of smb.conf below :

workgroup = xxx
netbios aliases = yyy01
server string = yyy01
allow trusted domains = No
passdb backend = tdbsam:/etc/samba/passdb.tdb
passwd program = /usr/bin/passwd %u
username map = /etc/samba/smbusers
unix password sync = Yes
log file = /var/log/samba/%m.log
log level = 1
max log size = 50
announce version = 6
name resolve order = wins lmhosts  host bcast
time server = Yes
socket options = SO_KEEPALIVE SO_REUSEADDR SO_BROADCAST TCP_NODELAY
IPTOS_LOWDELAY IPTOS_THROUGHPUT
load printers = No
add user script = /usr/sbin/useradd -m %u
delete user script = /usr/sbin/userdel -r %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/sbin/groupmod -A %u %g
delete user from group script = /usr/sbin/groupmod -R %u %g
add machine script = /usr/sbin/adduser -n -g grp_machines -c
grp_machines -d /dev/null -s /bin/false %u
logon script = logon.bat
logon path = \\%L\Profiles\%u\%m
logon home = \\%L\%u\.win_profile\%m
domain logons = Yes
os level = 255
lm announce = Yes
domain master = Yes
preferred master = Yes
remote announce = 172.27.137.255
bind interfaces only = True
interfaces = eth0 172.27.137.201
wins support = Yes
ldap ssl = no
default service = global
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
winbind enum users = Yes
winbind enum groups = Yes
winbind use default domain = Yes
winbind trusted domains only = Yes
admin users = ase, smb-adm
cups options = raw
host msdfs = Yes
msdfs root = Yes
deadtime = 60




any help?

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


[Samba] Secure client to Windows server

2009-05-14 Thread Hillel S.

Hello Everyone,

I am looking at the need to look at a directory on a Windows server  
from a Unix box, but that particular data cannot be transmitted  
unencrypted across the network.  Is there a way to set up the Samba  
client to encrypt all traffic to a share on a Windows 2000 or 2003  
server?  That also means somehow setting up the Windows server to  
encrypt a particular share without messing up the other normal shares  
on the same server.


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


[Samba] authenticate Linux users to AD on Windows 2003R2

2009-05-14 Thread James D. Parra
Hello,
 
I have enough details on how to have Linux users authenticate to a 2003r2
AD, but I need help getting their home dir's to automatically mount to a
windows share. Any details would be greatly appreciated.
 
Many thanks,
 
James 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] how to debug permission denied errors

2009-05-14 Thread przemek
I need to access several Windows domain shares from my linux box. I can access 
both shares from 
a Win box where I use my domain login. I placed my domain credentials in 
/home/przemek/.smb_credentials 
and I can successfully mount one of the shares:

  mount.cifs '//elwood.nist.gov/61_NCNR/610'  /mnt/ --verbose -o 
uid=przemek,credentials=/home/przemek/.smb_credentials 
parsing options: uid=przemek,credentials=/home/przemek/.smb_credentials

Domain NIST

mount.cifs kernel mount options 
unc=//elwood.nist.gov\61_NCNR,user=przemek,domain=NIST,pass=mypass,ver=1,credentials=/home/przemek/.smb_credentials,uid=500,prefixpath=610
 

  df
//elwood.nist.gov/61_NCNR/610  21893480448 14847986400 7045494048  68% /mnt
  umount /mnt

but not the other one:


  mount.cifs '//ociosfs.nist.gov/plan$/NCNR'  /mnt/ --verbose -o 
uid=przemek,credentials=/home/przemek/.smb_credentials 
parsing options: uid=przemek,credentials=/home/przemek/.smb_credentials

Domain NIST

mount.cifs kernel mount options 
unc=//ociosfs.nist.gov\plan$,user=przemek,domain=NIST,pass=mypass,ver=1,credentials=/home/przemek/.smb_credentials,uid=500,prefixpath=NCNR
 
mount error(13): Permission denied

How could I check what is going on? Is there more info to collect on
the Linux end on why it's denied? Are there questions to ask the
Windows domain/server admins?  The two shares are on different
servers, and the failing one is a hidden share (plan$), but as I said,
they are both simply visible within Windows.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] authenticate Linux users to AD on Windows 2003R2

2009-05-14 Thread Robert LeBlanc
I am interested in this as well, but not all our users have home directory
set. Let me know if you find any way to do this. What I've found so far is
not very appealing.


On 5/14/09 2:19 PM, James D. Parra jam...@musicreports.com wrote:

 Hello,
  
 I have enough details on how to have Linux users authenticate to a 2003r2
 AD, but I need help getting their home dir's to automatically mount to a
 windows share. Any details would be greatly appreciated.
  
 Many thanks,
  
 James 

-- 
Robert LeBlanc
Life Sciences Computer Support
Brigham Young University

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


Re: [Samba] Moving premises, new server at new building

2009-05-14 Thread Michael Heydon

Adam Williams wrote:
I'd just have your current samba server as the master ldap server and 
PDC, and have the server at the other location be a BDC, and it can 
either be a slave ldap server, master/master ldap configuration, or 
just connect to the master ldap server directly for queries.  i have a 
few remote sites on dsl or t-1 and they just query the LDAP server 
directly.  also, with ldap you can specify the roaming profile 
location so just have the users at the remote site load their roaming 
profiles from the remote servers.


Sorry, that's not quite what I meant. We are moving everyone to the new 
premises but the people in charge want a fully functioning system at the 
new location before the PCs are moved over. The old site (along with the 
current PDC and all our other servers) will be shut down after the move 
is complete.


The other thing I should probably have mentioned is that we also have a 
remote office which is running as an LDAP slave+BDC. The remote office 
can suffer some down time during the move without too much trouble but 
obviously they need to be up and running with what ever we use at the 
new site.


We aren't using roaming profiles.

*Michael Heydon - IT Administrator *
micha...@jaswin.com.au mailto:micha...@jaswin.com.au

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


[Samba] Re: Moving premises, new server at new building

2009-05-14 Thread jamrock
Michael Heydon micha...@jaswin.com.au wrote in message
news:4a0b63cc.1080...@jaswin.com.au...
 Hi all,

 Our company is looking at moving premises some time next year, the plan
 at the moment is to have a new server room with all new servers set up
 at the new building prior to moving the workstations over. I'm wondering
 if anyone has done anything like this and what the best way to proceed is.

 We are using an LDAP backend. I am not completely averse to unix UIDs
 changing (although I would rather they didn't), I *REALLY* don't want to
 have to manually rejoin everyone to the domain though.

 We have two internet connections at the old building, one is slow and
 cheap, the other is faster and relatively expensive. The connection at
 the new building will be fast and cheap. So it would be possible to sync
 data between systems in the lead up to the change over as long as it
 wasn't too much data.


All the user/computer names and passwords are stored in your LDAP directory.
I would take the following approach.

Make sure the new server is not on the network.  You do not want two
machines with the same Netbios name on a network.

Install LDAP on a new machine

Install Samba on a new machine.

Copy across your smb.conf file to the new server

Use the net setlocalsid command to set the SID to the same one used by the
existing Samba machine.  See Managing Security Identifiers in the Official
How To.

Use the smbldap tools to create your intial LDAP entries.

Export your existing LDAP directory to a ldif file.  You may want to remove
the intial LDAP entries created by the smbldap tools.

Import your existing LDAP directory into LDAP on the new server.

You should now have a duplicate of your existing server.  You should not
need to re-add the machines to the network.

I used this approach when I needed to re-install my domain controller from
scratch.  Let us know if it works.



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


Re: [Samba] Samba 4 compile error

2009-05-14 Thread Andrew Bartlett
On Tue, 2009-04-21 at 14:00 +1000, Chris Smart wrote:
 Hi all,
 
 I'm trying to compile Samba 4 from Git source. I have checked the
 source using instructions in the wiki. I have the specified deps
 installed. This is on an Arch Linux box.
 
 From samba-master/source4 directory ./autogen.sh, ./configure, and make work.
 
 But make install fails after some time:
 Unable to map ../libcli/auth/credentials.h at ./script/installheader.pl line 
 82.

This happens from time to time when the 'headermap.txt' file is not kept
up to date.  Just try an earlier or later GIT snapshot.

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org
Samba Developer, Red Hat Inc.


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] authenticate Linux users to AD on Windows 2003R2

2009-05-14 Thread Steve Rippl
Well, not exactly Samba related... but we have a file server that runs 
Samba for Windows clients and NFS for the Linux ones on the same 
folders.  Both authenticate against AD (we're running 2003 with SFU 3.5, 
not R2).  We have uid/gid/home folder info in AD.  Linux machines mount 
the file share /home from the files server for all home folders (fstab 
on the local machine) and then we use ldap in nsswitch to get the 
correct path to the users home folder, which is then there for them and 
they have access to once they've logged in.  _GOT_ to make sure your 
uid/gid info in AD matches the uid/gid info on the nfs share, we use 
wbinfo and idmap=rid in smb.conf to script consistent uid/gids for our 
folders (Perl is your friend!)


We use ldap in nsswitch because we have a non-samba layout for our 
home folders, ie. it's not /home/yourdomain/username, but if you can 
have that setup then you can simplify things a bit by using winbind in 
nsswitch and you get the standard path for your home folder.  As I 
said, just make sure you've already mounted the /home on the client 
through fstab.  There are pretty good tutorials out there on most parts 
of this for Debian/Ubuntu if you Google it (probably other Distros too, 
I'm just biased!).


Of course I'm running a Linux File server, you'll need to use Server 
2003 R2's nfs abilities which I've never tried, but it claims to be able 
to do it.  Or you could move your file server over to Linux/Samba/nfs!!


Let me know how it works out!  I can give you more specific details if 
you want, but probably best off list I would think as it's not exactly 
Samba...


Steve


James D. Parra wrote:

Hello,
 
I have enough details on how to have Linux users authenticate to a 2003r2

AD, but I need help getting their home dir's to automatically mount to a
windows share. Any details would be greatly appreciated.
 
Many thanks,
 
James 
  


--
Steve Rippl
Technology Director
Woodland School District
360 225 9451 x326

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


[Samba] Re: authenticate Linux users to AD on Windows 2003R2

2009-05-14 Thread gints neimanis

Hello,

You can use pam-mount module
http://pam-mount.sourceforge.net/

Gints

James D. Parra rakstīja,  2009.05.14. 23:19:

Hello,
 
I have enough details on how to have Linux users authenticate to a 2003r2

AD, but I need help getting their home dir's to automatically mount to a
windows share. Any details would be greatly appreciated.
 
Many thanks,
 
James 


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


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5261-ga72e409

2009-05-14 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  a72e409bd1b9a9d91bd7311417d7175a64aa39b0 (commit)
  from  cb5c72c0a05a78ff1b86eb02cf5ecd3d7d69623d (commit)

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


- Log -
commit a72e409bd1b9a9d91bd7311417d7175a64aa39b0
Author: Michael Adam ob...@samba.org
Date:   Wed May 6 02:08:33 2009 +0200

s3:loadparm: handle registry config source in file_list - fixes bug #6320

I.e. does not require smbd restart after changing share default options
in the global registry section with include = registry.

Michael

This was commit 4842e45d59 in master.

---

Summary of changes:
 source/param/loadparm.c |   78 ++
 1 files changed, 44 insertions(+), 34 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index c7b06a4..3908aef 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -670,6 +670,8 @@ static void set_server_role(void);
 static void set_default_server_announce_type(void);
 static void set_allowed_client_auth(void);
 
+static void add_to_file_list(const char *fname, const char *subfname);
+
 static const struct enum_list enum_protocol[] = {
{PROTOCOL_NT1, NT1},
{PROTOCOL_LANMAN2, LANMAN2},
@@ -6606,6 +6608,8 @@ static bool process_registry_globals(void)
goto done;
}
 
+   add_to_file_list(INCLUDE_REGISTRY_NAME, INCLUDE_REGISTRY_NAME);
+
ret = do_parameter(registry shares, yes, NULL);
if (!ret) {
goto done;
@@ -6751,45 +6755,51 @@ bool lp_file_list_changed(void)
 
DEBUG(6, (lp_file_list_changed()\n));
 
-   if (lp_config_backend_is_registry()) {
-   struct smbconf_ctx *conf_ctx = lp_smbconf_ctx();
-
-   if (conf_ctx == NULL) {
-   return false;
-   }
-   if (smbconf_changed(conf_ctx, conf_last_csn, NULL, NULL)) {
-   DEBUGADD(6, (registry config changed\n));
-   return true;
-   }
-   }
-
while (f) {
char *n2 = NULL;
time_t mod_time;
 
-   n2 = alloc_sub_basic(get_current_username(),
-   current_user_info.domain,
-   f-name);
-   if (!n2) {
-   return false;
-   }
-   DEBUGADD(6, (file %s - %s  last mod_time: %s\n,
-f-name, n2, ctime(f-modtime)));
-
-   mod_time = file_modtime(n2);
-
-   if (mod_time  ((f-modtime != mod_time) || (f-subfname == 
NULL) || (strcmp(n2, f-subfname) != 0))) {
-   DEBUGADD(6,
-(file %s modified: %s\n, n2,
- ctime(mod_time)));
-   f-modtime = mod_time;
-   SAFE_FREE(f-subfname);
-   f-subfname = n2; /* Passing ownership of
-return from alloc_sub_basic
-above. */
-   return true;
+   if (strequal(f-name, INCLUDE_REGISTRY_NAME)) {
+   struct smbconf_ctx *conf_ctx = lp_smbconf_ctx();
+
+   if (conf_ctx == NULL) {
+   return false;
+   }
+   if (smbconf_changed(conf_ctx, conf_last_csn, NULL,
+   NULL))
+   {
+   DEBUGADD(6, (registry config changed\n));
+   return true;
+   }
+   } else {
+   n2 = alloc_sub_basic(get_current_username(),
+   current_user_info.domain,
+   f-name);
+   if (!n2) {
+   return false;
+   }
+   DEBUGADD(6, (file %s - %s  last mod_time: %s\n,
+f-name, n2, ctime(f-modtime)));
+
+   mod_time = file_modtime(n2);
+
+   if (mod_time 
+   ((f-modtime != mod_time) ||
+(f-subfname == NULL) ||
+(strcmp(n2, f-subfname) != 0)))
+   {
+   DEBUGADD(6,
+(file %s modified: %s\n, n2,
+ ctime(mod_time)));
+   f-modtime = mod_time;
+   SAFE_FREE(f-subfname);
+

[SCM] CTDB repository - branch master updated - ctdb-1.0.82-3-gafdbf3c

2009-05-14 Thread Ronnie Sahlberg
The branch, master has been updated
   via  afdbf3c0df02decd823615134294abf2c8a8a5f3 (commit)
   via  722171fc94a36ffe9e0a5c64502b916fde0a13a4 (commit)
   via  042377ed803bb8f7ca9d6ea1a387427b7b8ba45a (commit)
  from  82ee458329968001bb03b2aec42e65f532f007b3 (commit)

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


- Log -
commit afdbf3c0df02decd823615134294abf2c8a8a5f3
Author: Christian Ambach christian.amb...@de.ibm.com
Date:   Wed May 6 19:01:58 2009 +0200

Remove error messages about a non-existing /var/log/log.ctdb when running 
ctdb with logging to syslog

commit 722171fc94a36ffe9e0a5c64502b916fde0a13a4
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Thu May 14 18:25:00 2009 +1000

add additional log info to track if/why we cant switch to client mode.

commit 042377ed803bb8f7ca9d6ea1a387427b7b8ba45a
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Thu May 14 10:33:25 2009 +1000

Track how long it takes to take out the recovery lock from both the main 
dameon and also from the recovery daemon.
Log this in ctdb statistics.

Also add a varaible RecLockLatencyMs that will log an error everytime it 
takes longer than this to access the reclock file.

---

Summary of changes:
 client/ctdb_client.c   |   23 +++
 common/ctdb_util.c |   16 
 include/ctdb_private.h |8 
 server/ctdb_control.c  |4 
 server/ctdb_recover.c  |6 ++
 server/ctdb_recoverd.c |5 +
 server/ctdb_tunables.c |1 +
 tools/ctdb.c   |3 +++
 tools/ctdb_diagnostics |4 ++--
 9 files changed, 68 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/ctdb_client.c b/client/ctdb_client.c
index 3bdb4b2..df9fa06 100644
--- a/client/ctdb_client.c
+++ b/client/ctdb_client.c
@@ -263,6 +263,7 @@ int ctdb_socket_connect(struct ctdb_context *ctdb)
 
ctdb-daemon.sd = socket(AF_UNIX, SOCK_STREAM, 0);
if (ctdb-daemon.sd == -1) {
+   DEBUG(DEBUG_ERR,(__location__  Failed to open client socket. 
Errno:%s(%d)\n, strerror(errno), errno));
return -1;
}
 
@@ -272,6 +273,7 @@ int ctdb_socket_connect(struct ctdb_context *ctdb)
if (connect(ctdb-daemon.sd, (struct sockaddr *)addr, sizeof(addr)) == 
-1) {
close(ctdb-daemon.sd);
ctdb-daemon.sd = -1;
+   DEBUG(DEBUG_ERR,(__location__  Failed to connect client socket 
to daemon. Errno:%s(%d)\n, strerror(errno), errno));
return -1;
}
 
@@ -3615,3 +3617,24 @@ int ctdb_ctrl_getscriptstatus(struct ctdb_context *ctdb,
return 0;
 }
 
+/*
+  tell the main daemon how long it took to lock the reclock file
+ */
+int ctdb_ctrl_report_recd_lock_latency(struct ctdb_context *ctdb, struct 
timeval timeout, double latency)
+{
+   int ret;
+   int32_t res;
+   TDB_DATA data;
+
+   data.dptr = (uint8_t *)latency;
+   data.dsize = sizeof(latency);
+
+   ret = ctdb_control(ctdb, CTDB_CURRENT_NODE, 0, 
CTDB_CONTROL_RECD_RECLOCK_LATENCY, 0, data, 
+  ctdb, NULL, res, NULL, NULL);
+   if (ret != 0 || res != 0) {
+   DEBUG(DEBUG_ERR,(Failed to send recd reclock latency\n));
+   return -1;
+   }
+
+   return 0;
+}
diff --git a/common/ctdb_util.c b/common/ctdb_util.c
index a3f1731..3604cc8 100644
--- a/common/ctdb_util.c
+++ b/common/ctdb_util.c
@@ -138,6 +138,22 @@ void ctdb_latency(struct ctdb_db_context *ctdb_db, const 
char *name, double *lat
}
 }
 
+/*
+  update a reclock latency number
+ */
+void ctdb_reclock_latency(struct ctdb_context *ctdb, const char *name, double 
*latency, double l)
+{
+   if (l  *latency) {
+   *latency = l;
+   }
+
+   if (ctdb-tunable.reclock_latency_ms !=0) {
+   if (l*1000  ctdb-tunable.reclock_latency_ms) {
+   DEBUG(DEBUG_ERR, (High RECLOCK latency %fs for 
operation %s\n, l, name));
+   }
+   }
+}
+
 uint32_t ctdb_reqid_new(struct ctdb_context *ctdb, void *state)
 {
uint32_t id;
diff --git a/include/ctdb_private.h b/include/ctdb_private.h
index f37560a..5ecf8a6 100644
--- a/include/ctdb_private.h
+++ b/include/ctdb_private.h
@@ -105,6 +105,7 @@ struct ctdb_tunable {
uint32_t recd_ping_timeout;
uint32_t recd_ping_failcount;
uint32_t log_latency_ms;
+   uint32_t reclock_latency_ms;
uint32_t recovery_drop_all_ips;
uint32_t verify_recovery_lock;
 };
@@ -299,6 +300,10 @@ struct ctdb_statistics {
uint32_t control;
uint32_t traverse;
} timeouts;
+   struct {
+   double ctdbd;
+   double recd;
+   } reclock;
uint32_t total_calls;
uint32_t pending_calls;
   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1613-g0a5d99a

2009-05-14 Thread Volker Lendecke
The branch, master has been updated
   via  0a5d99ae7ddc6531895a8c34a922d17515f609bc (commit)
   via  9c23115cb887cfb8b872b4a28da9d54f44aad5af (commit)
   via  979f13b19e7558267529c42d4ca7e4373a78798e (commit)
  from  524a79b73509a356293603af83b01c98e6175a9a (commit)

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


- Log -
commit 0a5d99ae7ddc6531895a8c34a922d17515f609bc
Author: Volker Lendecke v...@samba.org
Date:   Thu May 14 11:47:25 2009 +0200

Fix a type-punned warning

commit 9c23115cb887cfb8b872b4a28da9d54f44aad5af
Author: Volker Lendecke v...@samba.org
Date:   Thu May 14 11:47:09 2009 +0200

Add some const

commit 979f13b19e7558267529c42d4ca7e4373a78798e
Author: Volker Lendecke v...@samba.org
Date:   Thu May 14 12:13:24 2009 +0200

Fix some nonempty blank lines

---

Summary of changes:
 source3/lib/system.c |   46 +++---
 source3/param/loadparm.c |3 ++-
 source3/smbd/reply.c |2 +-
 3 files changed, 26 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/system.c b/source3/lib/system.c
index 10b55f6..517e347 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -5,17 +5,17 @@
Copyright (C) Jeremy Allison  1998-2005
Copyright (C) Timur Bakeyev2005
Copyright (C) Bjoern Jacke2006-2007
-   
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-   
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
-   
+
You should have received a copy of the GNU General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
@@ -54,7 +54,7 @@ void *sys_memalign( size_t align, size_t size )
int ret = posix_memalign( p, align, size );
if ( ret == 0 )
return p;
-   
+
return NULL;
 #elif defined(HAVE_MEMALIGN)
return memalign( align, size );
@@ -814,7 +814,7 @@ static int sys_broken_setgroups(int setlen, gid_t *gidset)
DEBUG(0,(sys_setgroups: Malloc fail.\n));
return -1;
}
- 
+
for(i = 0; i  setlen; i++) 
group_list[i] = (GID_T) gidset[i]; 
 
@@ -824,7 +824,7 @@ static int sys_broken_setgroups(int setlen, gid_t *gidset)
errno = saved_errno;
return -1;
}
- 
+
SAFE_FREE(group_list);
return 0 ;
 }
@@ -1264,7 +1264,7 @@ ssize_t sys_getxattr (const char *path, const char *name, 
void *value, size_t si
int retval, flags = 0;
int valuelength = (int)size;
char *attrname = strchr(name,'.') + 1;
-   
+
if (strncmp(name, system, 6) == 0) flags |= ATTR_ROOT;
 
retval = attr_get(path, attrname, (char *)value, valuelength, flags);
@@ -1308,14 +1308,14 @@ ssize_t sys_lgetxattr (const char *path, const char 
*name, void *value, size_t s
if((retval=extattr_get_link(path, attrnamespace, attrname, 
value, size)) = 0)
return retval;
}
-   
+
DEBUG(10,(sys_lgetxattr: extattr_get_link() failed with: %s\n, 
strerror(errno)));
return -1;
 #elif defined(HAVE_ATTR_GET)
int retval, flags = ATTR_DONTFOLLOW;
int valuelength = (int)size;
char *attrname = strchr(name,'.') + 1;
-   
+
if (strncmp(name, system, 6) == 0) flags |= ATTR_ROOT;
 
retval = attr_get(path, attrname, (char *)value, valuelength, flags);
@@ -1361,14 +1361,14 @@ ssize_t sys_fgetxattr (int filedes, const char *name, 
void *value, size_t size)
if((retval=extattr_get_fd(filedes, attrnamespace, attrname, 
value, size)) = 0)
return retval;
}
-   
+
DEBUG(10,(sys_fgetxattr: extattr_get_fd() failed with: %s\n, 
strerror(errno)));
return -1;
 #elif defined(HAVE_ATTR_GETF)
int retval, flags = 0;
int valuelength = (int)size;
char *attrname = strchr(name,'.') + 1;
-   
+
if (strncmp(name, system, 6) == 0) flags |= ATTR_ROOT;
 
retval = attr_getf(filedes, attrname, (char *)value, valuelength, 
flags);
@@ -1661,7 +1661,7 @@ int sys_removexattr (const char *path, const char *name)
 #elif defined(HAVE_ATTR_REMOVE)
int flags = 0;
char *attrname = strchr(name,'.') + 1;
-   
+
if (strncmp(name, system, 6) == 0) flags |= ATTR_ROOT;
 
return attr_remove(path, attrname, flags);
@@ -1698,7 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1619-g8fdb499

2009-05-14 Thread Günther Deschner
The branch, master has been updated
   via  8fdb499497f8d4f4a1ca93ffc94de8b57c2c1568 (commit)
   via  80f0d819fb85bdfbd85e910fccc62e778bea3a83 (commit)
   via  1ddc4829aec61d952aaf3185cc56d53d4a9b5c3c (commit)
   via  8fd3c8902c5e953a0ddf184b08f9e37f954ee12e (commit)
   via  3a2c748cf4626266899103aa719ea6ac2eae3a9f (commit)
   via  e272acf4848b6c5944acc685b0738e520b3039fb (commit)
  from  0a5d99ae7ddc6531895a8c34a922d17515f609bc (commit)

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


- Log -
commit 8fdb499497f8d4f4a1ca93ffc94de8b57c2c1568
Author: Günther Deschner g...@samba.org
Date:   Wed May 13 16:38:26 2009 +0200

s3-netapi: implement NetShutdownInit_r and NetShutdownAbort_r.

Guenther

commit 80f0d819fb85bdfbd85e910fccc62e778bea3a83
Author: Günther Deschner g...@samba.org
Date:   Wed May 13 16:38:00 2009 +0200

s3-netapi: add example code for NetShutdownInit and NetShutdownAbort.

Guenther

commit 1ddc4829aec61d952aaf3185cc56d53d4a9b5c3c
Author: Günther Deschner g...@samba.org
Date:   Wed May 13 16:35:45 2009 +0200

s3-netapi: add NetShutdownInit and NetShutdownAbort to public API.

Guenther

commit 8fd3c8902c5e953a0ddf184b08f9e37f954ee12e
Author: Günther Deschner g...@samba.org
Date:   Wed May 13 16:27:58 2009 +0200

s3-netapi: add NetShutdownInit and NetShutdownAbort skeletons.

Guenther

commit 3a2c748cf4626266899103aa719ea6ac2eae3a9f
Author: Günther Deschner g...@samba.org
Date:   Wed May 13 16:17:36 2009 +0200

s3-build: re-run make samba3-idl.

Guenther

commit e272acf4848b6c5944acc685b0738e520b3039fb
Author: Günther Deschner g...@samba.org
Date:   Wed May 13 16:16:33 2009 +0200

s3-netapi: add NetShutdownInit and NetShutdownAbort.

I know, they don't exist as such calls on windows but having them in
libnetapi.so would be very handy.

Guenther

---

Summary of changes:
 source3/Makefile.in|3 +-
 source3/lib/netapi/examples/Makefile.in|   14 +++-
 .../lib/netapi/examples/shutdown/shutdown_abort.c  |   76 ++
 .../lib/netapi/examples/shutdown/shutdown_init.c   |   94 +
 source3/lib/netapi/libnetapi.c |   88 
 source3/lib/netapi/libnetapi.h |   14 +++
 source3/lib/netapi/netapi.h|   36 +++
 source3/lib/netapi/shutdown.c  |  108 
 source3/librpc/gen_ndr/libnetapi.h |   30 ++
 source3/librpc/gen_ndr/ndr_libnetapi.c |   50 +
 source3/librpc/gen_ndr/ndr_libnetapi.h |   12 ++-
 source3/librpc/idl/libnetapi.idl   |   21 
 12 files changed, 543 insertions(+), 3 deletions(-)
 create mode 100644 source3/lib/netapi/examples/shutdown/shutdown_abort.c
 create mode 100644 source3/lib/netapi/examples/shutdown/shutdown_init.c
 create mode 100644 source3/lib/netapi/shutdown.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 190560a..1e6f681 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -2035,7 +2035,8 @@ LIBNETAPI_OBJ0 = lib/netapi/netapi.o \
 lib/netapi/samr.o \
 lib/netapi/sid.o \
 lib/netapi/share.o \
-lib/netapi/file.o
+lib/netapi/file.o \
+lib/netapi/shutdown.o
 
 LIBNETAPI_OBJ  = $(LIBNETAPI_OBJ0) $(LIBNET_OBJ) \
 $(LIBSMBCONF_OBJ) \
diff --git a/source3/lib/netapi/examples/Makefile.in 
b/source3/lib/netapi/examples/Makefile.in
index 090bc50..5adedac 100644
--- a/source3/lib/netapi/examples/Makefile.in
+++ b/source3/lib/netapi/examples/Makefile.in
@@ -62,7 +62,9 @@ PROGS = bin/ge...@exeext@ \
bin/share_seti...@exeext@ \
bin/file_cl...@exeext@ \
bin/file_geti...@exeext@ \
-   bin/file_e...@exeext@
+   bin/file_e...@exeext@ \
+   bin/shutdown_i...@exeext@ \
+   bin/shutdown_ab...@exeext@
 
 all: $(PROGS)
 
@@ -137,6 +139,8 @@ SHARESETINFO_OBJ = share/share_setinfo.o $(CMDLINE_OBJ)
 FILECLOSE_OBJ = file/file_close.o $(CMDLINE_OBJ)
 FILEGETINFO_OBJ = file/file_getinfo.o $(CMDLINE_OBJ)
 FILEENUM_OBJ = file/file_enum.o $(CMDLINE_OBJ)
+SHUTDOWNINIT_OBJ = shutdown/shutdown_init.o $(CMDLINE_OBJ)
+SHUTDOWNABORT_OBJ = shutdown/shutdown_abort.o $(CMDLINE_OBJ)
 
 bin/ge...@exeext@: $(BINARY_PREREQS) $(GETDC_OBJ)
@echo Linking $@
@@ -322,6 +326,14 @@ bin/file_e...@exeext@: $(BINARY_PREREQS) $(FILEENUM_OBJ)
@echo Linking $@
@$(CC) $(CCFLAGS) -o $@ $(FILEENUM_OBJ) $(LDFLAGS) $(DYNEXP) 
$(CMDLINE_LIBS)
 
+bin/shutdown_i...@exeext@: $(BINARY_PREREQS) $(SHUTDOWNINIT_OBJ)
+   @echo Linking $@
+   @$(CC) $(CCFLAGS) -o $@ $(SHUTDOWNINIT_OBJ) $(LDFLAGS) $(DYNEXP) 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1620-g074890b

2009-05-14 Thread Volker Lendecke
The branch, master has been updated
   via  074890b39ea372a9559a4b040c15654829608ea2 (commit)
  from  8fdb499497f8d4f4a1ca93ffc94de8b57c2c1568 (commit)

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


- Log -
commit 074890b39ea372a9559a4b040c15654829608ea2
Author: Volker Lendecke v...@samba.org
Date:   Thu May 14 15:39:52 2009 +0200

Remove two unused variables

---

Summary of changes:
 lib/util/util_strlist.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/util_strlist.c b/lib/util/util_strlist.c
index 2fcbe18..844e8f2 100644
--- a/lib/util/util_strlist.c
+++ b/lib/util/util_strlist.c
@@ -33,7 +33,6 @@
 */
 _PUBLIC_ char **str_list_make_empty(TALLOC_CTX *mem_ctx)
 {
-   int num_elements = 0;
char **ret = NULL;
 
ret = talloc_array(mem_ctx, char *, 1);
@@ -51,7 +50,6 @@ _PUBLIC_ char **str_list_make_empty(TALLOC_CTX *mem_ctx)
 */
 _PUBLIC_ char **str_list_make_single(TALLOC_CTX *mem_ctx, const char *entry)
 {
-   int num_elements = 0;
char **ret = NULL;
 
ret = talloc_array(mem_ctx, char *, 2);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1621-gd73eab2

2009-05-14 Thread Andrew Bartlett
The branch, master has been updated
   via  d73eab2b33b5f9d8227199bfc06f28ae3787cea3 (commit)
  from  074890b39ea372a9559a4b040c15654829608ea2 (commit)

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


- Log -
commit d73eab2b33b5f9d8227199bfc06f28ae3787cea3
Author: Andrew Bartlett abart...@samba.org
Date:   Fri May 15 01:47:39 2009 +1000

Add extensive tests for str_list function behaviour

---

Summary of changes:
 lib/util/tests/strlist.c |  358 --
 1 files changed, 343 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/tests/strlist.c b/lib/util/tests/strlist.c
index 3f6cf27..877b671 100644
--- a/lib/util/tests/strlist.c
+++ b/lib/util/tests/strlist.c
@@ -4,6 +4,7 @@
util_strlist testing
 
Copyright (C) Jelmer Vernooij 2005
+   Copyright (C) Andrew Bartlett abart...@samba.org 2009

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,27 +23,94 @@
 #include includes.h
 #include torture/torture.h
 
-static const char *test_lists_shell_strings[] = {
-   ,
-   foo,
-   foo bar,
-   foo bar \bla \,
-   foo \\ bla,
-   bla  blie,
-   NULL
+struct test_list_element {
+   const char *list_as_string;
+   const char *seperators;
+   const char *list[5];
+};
+
+struct test_list_element test_lists_strings[] = {
+   {
+   .list_as_string = ,
+   .list = { NULL }
+   },
+   {
+   .list_as_string = foo,
+   .list = { foo, NULL }
+   },
+   {
+   .list_as_string = foo bar,
+   .list = { foo, bar, NULL }
+   },
+   {
+   .list_as_string = foo bar,
+   .list = { foo bar, NULL },
+   .seperators = ;
+   },
+   {
+   .list_as_string = \foo bar\,
+   .list = { \foo, bar\, NULL }
+   },
+   {
+   .list_as_string = \foo bar\,comma\ttab,
+   .list = { \foo, bar\, comma, tab, NULL }
+   },
+   {
+   .list_as_string = \foo bar\,comma;semicolon,
+   .list = { \foo bar\,comma, semicolon, NULL },
+   .seperators = ;
+   }
+};
+
+struct test_list_element test_lists_shell_strings[] = {
+   {
+   .list_as_string = ,
+   .list = { NULL }
+   },
+   {
+   .list_as_string = foo,
+   .list = { foo, NULL }
+   },
+   {
+   .list_as_string = foo bar,
+   .list = { foo, bar, NULL }
+   },
+   {
+   .list_as_string = foo bar,
+   .list = { foo bar, NULL },
+   .seperators = ;
+   },
+   {
+   .list_as_string = \foo bar\,
+   .list = { foo bar, NULL }
+   },
+   {
+   .list_as_string = foo bar \bla \,
+   .list = { foo, bar, bla , NULL }
+   },
+   {
+   .list_as_string = foo \\ bla,
+   .list = { foo, , bla, NULL },
+   },
+   {
+   .list_as_string = bla  blie,
+   .list = { bla, , , blie, NULL },
+   }
 };
 
 static bool test_lists_shell(struct torture_context *tctx,
-const void *test_data)
+const void *data)
 {
-   const char *data = (const char *)test_data;
+   const struct test_list_element *element = data;
const char **ret1, **ret2, *tmp;
bool match = true;
TALLOC_CTX *mem_ctx = tctx;
 
-   ret1 = str_list_make_shell(mem_ctx, data,  );
-   tmp = str_list_join_shell(mem_ctx, ret1, ' ');
-   ret2 = str_list_make_shell(mem_ctx, tmp,  );
+   ret1 = str_list_make_shell(mem_ctx, element-list_as_string, 
element-seperators);
+   
+   torture_assert(tctx, ret1, str_list_make_shell() must not return 
NULL);
+   tmp = str_list_join_shell(mem_ctx, ret1, element-seperators ? 
*element-seperators : ' ');
+   ret2 = str_list_make_shell(mem_ctx, tmp, element-seperators);
 
if ((ret1 == NULL || ret2 == NULL)  ret2 != ret1) {
match = false;
@@ -60,7 +128,25 @@ static bool test_lists_shell(struct torture_context *tctx,
}
 
torture_assert(tctx, match, talloc_asprintf(tctx, 
-   str_list_{make,join}_shell: Error double parsing, first 
run:\n%s\nSecond run: \n%s, data, tmp));
+   str_list_{make,join}_shell: Error double parsing, first 
run:\n%s\nSecond run: \n%s, element-list_as_string, tmp));
+   torture_assert(tctx, str_list_equal(ret1, element-list), 
+  talloc_asprintf(tctx, 
+  

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1622-gd35a395

2009-05-14 Thread sfrench
The branch, master has been updated
   via  d35a3952f091f4eaad43d1a3756c24e35b34c5bd (commit)
  from  d73eab2b33b5f9d8227199bfc06f28ae3787cea3 (commit)

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


- Log -
commit d35a3952f091f4eaad43d1a3756c24e35b34c5bd
Author: Steve French smfre...@gmail.com
Date:   Thu May 14 15:04:27 2009 -0500

Maximum password length check too short in mount.cifs

Windows allows up to 127 byte passwords, and we using a 64 byte limit
in most places and a 16 byte limit when using the pass= mount option

Acked-by: Jeff Layton jlay...@redhat.com
Signed-off-by: Steve French sfre...@us.ibm.com

---

Summary of changes:
 source3/client/mount.cifs.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index 0c551cc..a5d99dc 100644
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -77,7 +77,7 @@
 #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
 #endif
 
-#define MOUNT_PASSWD_SIZE 64
+#define MOUNT_PASSWD_SIZE 128
 #define DOMAIN_SIZE 64
 
 /* currently maximum length of IPv6 address string */
@@ -473,7 +473,7 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
printf(\npassword specified twice, 
ignoring second\n);
} else
got_password = 1;
-   } else if (strnlen(value, 17)  17) {
+   } else if (strnlen(value, MOUNT_PASSWD_SIZE)  
MOUNT_PASSWD_SIZE) {
if(got_password)
printf(\nmount.cifs warning - password 
specified twice\n);
got_password = 1;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1623-g57e03b6

2009-05-14 Thread Jeremy Allison
The branch, master has been updated
   via  57e03b6a1d98219d5adafff570d1cb01d8b5758e (commit)
  from  d35a3952f091f4eaad43d1a3756c24e35b34c5bd (commit)

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


- Log -
commit 57e03b6a1d98219d5adafff570d1cb01d8b5758e
Author: Jeremy Allison j...@samba.org
Date:   Thu May 14 15:11:50 2009 -0700

Fix the core of the SAMR access functions. This passes make test, but
usrmgr fails against it. The core of this patch is to move all the
access mask setup into the _samr_OpenXXX functions, and then have
each specific function check the attached access_mask against the
required bits. We can then go through the MS-SAMR doc and match
things up. Signed off by Guenther, and writespace cleanup removal
by Volker.
Jeremy.

---

Summary of changes:
 source3/rpc_server/srv_samr_nt.c |  353 +-
 1 files changed, 156 insertions(+), 197 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index dea1a8f..d27924f 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -185,7 +185,8 @@ static NTSTATUS access_check_samr_object( SEC_DESC *psd, 
NT_USER_TOKEN *token,
   by privileges (mostly having to do with creating/modifying/deleting
   users and groups) */
 
-   if ( rights  user_has_any_privilege( token, rights ) ) {
+   if (rights  !se_priv_equal(rights, se_priv_none) 
+   user_has_any_privilege(token, rights)) {
 
saved_mask = (des_access  rights_mask);
des_access = ~saved_mask;
@@ -552,11 +553,15 @@ NTSTATUS _samr_OpenDomain(pipes_struct *p,
make_samr_object_sd( p-mem_ctx, psd, sd_size, dom_generic_mapping, 
NULL, 0 );
se_map_generic( des_access, dom_generic_mapping );
 
+   /*
+* Users with SeMachineAccount or SeAddUser get additional
+* SAMR_DOMAIN_ACCESS_CREATE_USER access, but no more.
+*/
se_priv_copy( se_rights, se_machine_account );
se_priv_add( se_rights, se_add_users );
 
status = access_check_samr_object( psd, p-server_info-ptok,
-   se_rights, GENERIC_RIGHTS_DOMAIN_WRITE, des_access,
+   se_rights, SAMR_DOMAIN_ACCESS_CREATE_USER, des_access,
acc_granted, _samr_OpenDomain );
 
if ( !NT_STATUS_IS_OK(status) )
@@ -2207,6 +2212,7 @@ NTSTATUS _samr_OpenUser(pipes_struct *p,
SEC_DESC *psd = NULL;
uint32acc_granted;
uint32des_access = r-in.access_mask;
+   uint32_t extra_access = 0;
size_tsd_size;
bool ret;
NTSTATUS nt_status;
@@ -2236,8 +2242,70 @@ NTSTATUS _samr_OpenUser(pipes_struct *p,
make_samr_object_sd(p-mem_ctx, psd, sd_size, usr_generic_mapping, 
sid, SAMR_USR_RIGHTS_WRITE_PW);
se_map_generic(des_access, usr_generic_mapping);
 
-   se_priv_copy( se_rights, se_machine_account );
-   se_priv_add( se_rights, se_add_users );
+   /*
+* Get the sampass first as we need to check privilages
+* based on what kind of user object this is.
+* But don't reveal info too early if it didn't exist.
+*/
+
+   become_root();
+   ret=pdb_getsampwsid(sampass, sid);
+   unbecome_root();
+
+   se_priv_copy(se_rights, se_priv_none);
+
+   /*
+* We do the override access checks on *open*, not at
+* SetUserInfo time.
+*/
+   if (ret) {
+   uint32_t acb_info = pdb_get_acct_ctrl(sampass);
+
+   if ((acb_info  ACB_WSTRUST) 
+   user_has_any_privilege(p-server_info-ptok,
+   se_machine_account)) {
+   /*
+* SeMachineAccount is needed to add
+* GENERIC_RIGHTS_USER_WRITE to a machine
+* account.
+*/
+   se_priv_add(se_rights, se_machine_account);
+   DEBUG(10,(_samr_OpenUser: adding machine account 
+   rights to handle for user %s\n,
+   pdb_get_username(sampass) ));
+   }
+   if ((acb_info  ACB_NORMAL) 
+   user_has_any_privilege(p-server_info-ptok,
+   se_add_users)) {
+   /*
+* SeAddUsers is needed to add
+* GENERIC_RIGHTS_USER_WRITE to a normal
+* account.
+*/
+   se_priv_add(se_rights, se_add_users);
+   DEBUG(10,(_samr_OpenUser: adding add user 
+  

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-983-g18d9e70

2009-05-14 Thread Jeremy Allison
The branch, v3-4-test has been updated
   via  18d9e7074635c80052e8bb8d85ad5605663e2695 (commit)
   via  0e7f37336ec2d7e1158342fb855af3dff84a7d1e (commit)
  from  e6b6027218b96bf3357837d051ca5d2df0d88561 (commit)

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


- Log -
commit 18d9e7074635c80052e8bb8d85ad5605663e2695
Author: Jeremy Allison j...@samba.org
Date:   Thu May 14 15:56:13 2009 -0700

Add a test showing what ascii values cause an NTFS volume to
create a mangled name. We don't pass this yet, but it's not
run by default.
Jeremy.

commit 0e7f37336ec2d7e1158342fb855af3dff84a7d1e
Author: Jeremy Allison j...@samba.org
Date:   Thu May 14 12:34:28 2009 -0700

Remove one use of mangle_is_8_3(), not needed.
Jeremy.

---

Summary of changes:
 source3/smbd/reply.c  |6 +--
 source3/torture/torture.c |  131 +
 2 files changed, 133 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 9cf5280..66caa86 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -5919,8 +5919,6 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
/*
 * No wildcards - just process the one file.
 */
-   bool is_short_name = mangle_is_8_3(name, True, conn-params);
-
/* Add a terminating '/' to the directory name. */
directory = talloc_asprintf_append(directory,
/%s,
@@ -5942,10 +5940,10 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
DEBUG(3, (rename_internals: case_sensitive = %d, 
  case_preserve = %d, short case preserve = %d, 
  directory = %s, newname = %s, 
- last_component_dest = %s, is_8_3 = %d\n,
+ last_component_dest = %s\n,
  conn-case_sensitive, conn-case_preserve,
  conn-short_case_preserve, directory,
- newname, last_component_dest, is_short_name));
+ newname, last_component_dest));
 
/* The dest name still may have wildcards. */
if (dest_has_wild) {
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index b4e8700..619da05 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -5272,6 +5272,136 @@ static bool run_uid_regression_test(int dummy)
return correct;
 }
 
+
+static const char *illegal_chars = *\\/?|\:;
+static char force_shortname_chars[] =  +,.[];=\177;
+
+static void shortname_del_fn(const char *mnt, file_info *finfo, const char 
*mask, void *state)
+{
+   struct cli_state *pcli = (struct cli_state *)state;
+   fstring fname;
+   slprintf(fname, sizeof(fname), \\shortname\\%s, finfo-name);
+
+   if (strcmp(finfo-name, .) == 0 || strcmp(finfo-name, ..) == 0)
+   return;
+
+   if (finfo-mode  aDIR) {
+   if (!cli_rmdir(pcli, fname))
+   printf(del_fn: failed to rmdir %s\n,, fname );
+   } else {
+   if (!cli_unlink(pcli, fname))
+   printf(del_fn: failed to unlink %s\n,, fname );
+   }
+}
+
+struct sn_state {
+   int i;
+   bool val;
+};
+
+static void shortname_list_fn(const char *mnt, file_info *finfo, const char 
*name, void *state)
+{
+   struct sn_state *s = (struct sn_state  *)state;
+   int i = s-i;
+
+#if 0
+   printf(shortname list: i = %d, name = |%s|, shortname = |%s|\n,
+   i, finfo-name, finfo-short_name);
+#endif
+
+   if (strchr(force_shortname_chars, i)) {
+   if (!finfo-short_name[0]) {
+   /* Shortname not created when it should be. */
+   d_printf((%s) ERROR: Shortname was not created for 
file %s\n,
+   __location__, finfo-name);
+   s-val = true;
+   }
+   } else if (finfo-short_name[0]){
+   /* Shortname created when it should not be. */
+   d_printf((%s) ERROR: Shortname %s was created for file %s\n,
+   __location__, finfo-short_name, finfo-name);
+   s-val = true;
+   }
+}
+
+static bool run_shortname_test(int dummy)
+{
+   static struct cli_state *cli;
+   bool correct = True;
+   int i;
+   struct sn_state s;
+   char fname[20];
+
+   printf(starting shortname test\n);
+
+   if (!torture_open_connection(cli, 0)) {
+   return False;
+   }
+
+   cli_sockopt(cli, sockops);
+
+   cli_list(cli, \\shortname\\*, 0, shortname_del_fn, cli);
+   cli_list(cli, \\shortname\\*, aDIR, shortname_del_fn, cli);
+   cli_rmdir(cli, 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1625-g41aa7d7

2009-05-14 Thread Jeremy Allison
The branch, master has been updated
   via  41aa7d790a5140be2947781ea7def3a17b213a28 (commit)
   via  a84028590f0138bbb4db6ba22450f6d320fde83f (commit)
  from  57e03b6a1d98219d5adafff570d1cb01d8b5758e (commit)

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


- Log -
commit 41aa7d790a5140be2947781ea7def3a17b213a28
Author: Jeremy Allison j...@samba.org
Date:   Thu May 14 16:03:31 2009 -0700

Add a test showing what ascii values cause an NTFS volume to
create a mangled name. We don't pass this yet, but it's not
run by default.
Jeremy.

commit a84028590f0138bbb4db6ba22450f6d320fde83f
Author: Jeremy Allison j...@samba.org
Date:   Thu May 14 16:03:18 2009 -0700

Remove one use of mangle_is_8_3(), not needed.
Jeremy.

---

Summary of changes:
 source3/smbd/reply.c  |6 +--
 source3/torture/torture.c |  133 +
 2 files changed, 135 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 1f73b2f..a81c22b 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -6018,8 +6018,6 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
/*
 * No wildcards - just process the one file.
 */
-   bool is_short_name = mangle_is_8_3(name, True, conn-params);
-
/* Add a terminating '/' to the directory name. */
directory = talloc_asprintf_append(directory,
/%s,
@@ -6041,10 +6039,10 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
DEBUG(3, (rename_internals: case_sensitive = %d, 
  case_preserve = %d, short case preserve = %d, 
  directory = %s, newname = %s, 
- last_component_dest = %s, is_8_3 = %d\n,
+ last_component_dest = %s\n,
  conn-case_sensitive, conn-case_preserve,
  conn-short_case_preserve, directory,
- newname, last_component_dest, is_short_name));
+ newname, last_component_dest));
 
/* The dest name still may have wildcards. */
if (dest_has_wild) {
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 578f6a3..99bf378 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -5265,6 +5265,138 @@ static bool run_uid_regression_test(int dummy)
return correct;
 }
 
+
+static const char *illegal_chars = *\\/?|\:;
+static char force_shortname_chars[] =  +,.[];=\177;
+
+static void shortname_del_fn(const char *mnt, file_info *finfo, const char 
*mask, void *state)
+{
+   struct cli_state *pcli = (struct cli_state *)state;
+   fstring fname;
+   slprintf(fname, sizeof(fname), \\shortname\\%s, finfo-name);
+
+   if (strcmp(finfo-name, .) == 0 || strcmp(finfo-name, ..) == 0)
+   return;
+
+   if (finfo-mode  aDIR) {
+   if (!NT_STATUS_IS_OK(cli_rmdir(pcli, fname)))
+   printf(del_fn: failed to rmdir %s\n,, fname );
+   } else {
+   if (!NT_STATUS_IS_OK(cli_unlink(pcli, fname, aSYSTEM | 
aHIDDEN)))
+   printf(del_fn: failed to unlink %s\n,, fname );
+   }
+}
+
+struct sn_state {
+   int i;
+   bool val;
+};
+
+static void shortname_list_fn(const char *mnt, file_info *finfo, const char 
*name, void *state)
+{
+   struct sn_state *s = (struct sn_state  *)state;
+   int i = s-i;
+
+#if 0
+   printf(shortname list: i = %d, name = |%s|, shortname = |%s|\n,
+   i, finfo-name, finfo-short_name);
+#endif
+
+   if (strchr(force_shortname_chars, i)) {
+   if (!finfo-short_name[0]) {
+   /* Shortname not created when it should be. */
+   d_printf((%s) ERROR: Shortname was not created for 
file %s\n,
+   __location__, finfo-name);
+   s-val = true;
+   }
+   } else if (finfo-short_name[0]){
+   /* Shortname created when it should not be. */
+   d_printf((%s) ERROR: Shortname %s was created for file %s\n,
+   __location__, finfo-short_name, finfo-name);
+   s-val = true;
+   }
+}
+
+static bool run_shortname_test(int dummy)
+{
+   static struct cli_state *cli;
+   bool correct = True;
+   int i;
+   struct sn_state s;
+   char fname[20];
+
+   printf(starting shortname test\n);
+
+   if (!torture_open_connection(cli, 0)) {
+   return False;
+   }
+
+   cli_sockopt(cli, sockops);
+
+   cli_list(cli, \\shortname\\*, 0, shortname_del_fn, cli);
+   cli_list(cli, \\shortname\\*, aDIR, 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1626-gf61959e

2009-05-14 Thread Jeremy Allison
The branch, master has been updated
   via  f61959e87abdc85594cea83fadc9e173852cf8a6 (commit)
  from  41aa7d790a5140be2947781ea7def3a17b213a28 (commit)

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


- Log -
commit f61959e87abdc85594cea83fadc9e173852cf8a6
Author: Jeremy Allison j...@samba.org
Date:   Thu May 14 16:30:11 2009 -0700

Make error message clearer on fail.
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 99bf378..fa1a222 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -5305,8 +5305,8 @@ static void shortname_list_fn(const char *mnt, file_info 
*finfo, const char *nam
if (strchr(force_shortname_chars, i)) {
if (!finfo-short_name[0]) {
/* Shortname not created when it should be. */
-   d_printf((%s) ERROR: Shortname was not created for 
file %s\n,
-   __location__, finfo-name);
+   d_printf((%s) ERROR: Shortname was not created for 
file %s containing %d\n,
+   __location__, finfo-name, i);
s-val = true;
}
} else if (finfo-short_name[0]){


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-984-gf81698c

2009-05-14 Thread Jeremy Allison
The branch, v3-4-test has been updated
   via  f81698c70e2513c4699048263c0d6d57a5a9bc64 (commit)
  from  18d9e7074635c80052e8bb8d85ad5605663e2695 (commit)

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


- Log -
commit f81698c70e2513c4699048263c0d6d57a5a9bc64
Author: Jeremy Allison j...@samba.org
Date:   Thu May 14 16:30:11 2009 -0700

Make error message clearer on fail.
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 619da05..1f099da 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -5312,8 +5312,8 @@ static void shortname_list_fn(const char *mnt, file_info 
*finfo, const char *nam
if (strchr(force_shortname_chars, i)) {
if (!finfo-short_name[0]) {
/* Shortname not created when it should be. */
-   d_printf((%s) ERROR: Shortname was not created for 
file %s\n,
-   __location__, finfo-name);
+   d_printf((%s) ERROR: Shortname was not created for 
file %s containing %d\n,
+   __location__, finfo-name, i);
s-val = true;
}
} else if (finfo-short_name[0]){


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-986-g99771d2

2009-05-14 Thread Jeremy Allison
The branch, v3-4-test has been updated
   via  99771d2e23b476d1a7becd9f394421363dd0dffe (commit)
   via  82d9d7b2136a236d3f2b7b1255a920a1ef394ffe (commit)
  from  f81698c70e2513c4699048263c0d6d57a5a9bc64 (commit)

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


- Log -
commit 99771d2e23b476d1a7becd9f394421363dd0dffe
Author: Jeremy Allison j...@samba.org
Date:   Thu May 14 16:50:50 2009 -0700

Turn on SHORTNAME-TEST in torture.
Jeremy.

commit 82d9d7b2136a236d3f2b7b1255a920a1ef394ffe
Author: Jeremy Allison j...@samba.org
Date:   Thu May 14 16:49:18 2009 -0700

Make us pass SHORTNAME-TEST.
Jeremy

---

Summary of changes:
 source3/script/tests/test_smbtorture_s3.sh |1 +
 source3/smbd/mangle_hash2.c|   20 +---
 2 files changed, 18 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_smbtorture_s3.sh 
b/source3/script/tests/test_smbtorture_s3.sh
index 70c6d34..fee9260 100755
--- a/source3/script/tests/test_smbtorture_s3.sh
+++ b/source3/script/tests/test_smbtorture_s3.sh
@@ -28,6 +28,7 @@ tests=$tests OPLOCK1 OPLOCK2 OPLOCK3
 tests=$tests DIR DIR1 TCON TCONDEV RW1 RW2 RW3
 tests=$tests OPEN XCOPY RENAME DELETE PROPERTIES W2K
 tests=$tests TCON2 IOCTL CHKPATH FDSESS LOCAL-SUBSTITUTE CHAIN1
+tests=$tests POSIX UID-REGRESSION-TEST SHORTNAME-TEST
 
 skipped1=RANDOMIPC NEGNOWAIT NBENCH ERRMAPEXTRACT TRANS2SCAN NTTRANSSCAN
 skipped2=DENY1 DENY2 OPENATTR CASETABLE EATEST
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c
index 3a3939c..b9e7d63 100644
--- a/source3/smbd/mangle_hash2.c
+++ b/source3/smbd/mangle_hash2.c
@@ -250,12 +250,17 @@ static bool is_mangled(const char *name, const struct 
share_params *parm)
 
 
 /* 
-   see if a filename is an allowable 8.3 name.
+   see if a filename is an allowable 8.3 name to return to the client.
+   Note this is not testing if this is a valid Samba mangled name, so
+   the rules are different for is_mangled.
 
we are only going to allow ascii characters in 8.3 names, as this
simplifies things greatly (it means that we know the string won't
get larger when converted from UNIX to DOS formats)
 */
+
+static char force_shortname_chars[] =  +,[];=;
+
 static bool is_8_3(const char *name, bool check_case, bool allow_wildcards, 
const struct share_params *p)
 {
int len, i;
@@ -307,9 +312,18 @@ static bool is_8_3(const char *name, bool check_case, bool 
allow_wildcards, cons
 
/* the length are all OK. Now check to see if the characters themselves 
are OK */
for (i=0; name[i]; i++) {
+   if (FLAG_CHECK(name[i], FLAG_ILLEGAL)) {
+   return false;
+   }
/* note that we may allow wildcard petterns! */
-   if (!FLAG_CHECK(name[i], FLAG_ASCII|(allow_wildcards ? 
FLAG_WILDCARD : 0))  name[i] != '.') {
-   return False;
+   if (!allow_wildcards  FLAG_CHECK(name[i], FLAG_WILDCARD)) {
+   return false;
+   }
+   if (((unsigned char)name[i])  0x7e) {
+   return false;
+   }
+   if (strchr(force_shortname_chars, name[i])) {
+   return false;
}
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1628-g4dce2df

2009-05-14 Thread Jeremy Allison
The branch, master has been updated
   via  4dce2dfb5b547d90b13597672abc2cae1a062b53 (commit)
   via  ff9375a04c3f5ed088678b7915422eefed2e16b8 (commit)
  from  f61959e87abdc85594cea83fadc9e173852cf8a6 (commit)

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


- Log -
commit 4dce2dfb5b547d90b13597672abc2cae1a062b53
Author: Jeremy Allison j...@samba.org
Date:   Thu May 14 16:49:34 2009 -0700

Turn on SHORTNAME-TEST in torture.
Jeremy.

commit ff9375a04c3f5ed088678b7915422eefed2e16b8
Author: Jeremy Allison j...@samba.org
Date:   Thu May 14 16:49:18 2009 -0700

Make us pass SHORTNAME-TEST.
Jeremy

---

Summary of changes:
 source3/script/tests/test_smbtorture_s3.sh |2 +-
 source3/smbd/mangle_hash2.c|   20 +---
 2 files changed, 18 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_smbtorture_s3.sh 
b/source3/script/tests/test_smbtorture_s3.sh
index 8150b98..4e439fe 100755
--- a/source3/script/tests/test_smbtorture_s3.sh
+++ b/source3/script/tests/test_smbtorture_s3.sh
@@ -28,7 +28,7 @@ tests=$tests OPLOCK1 OPLOCK2 OPLOCK3
 tests=$tests DIR DIR1 TCON TCONDEV RW1 RW2 RW3
 tests=$tests OPEN XCOPY RENAME DELETE PROPERTIES W2K
 tests=$tests TCON2 IOCTL CHKPATH FDSESS LOCAL-SUBSTITUTE CHAIN1
-tests=$tests GETADDRINFO POSIX UID-REGRESSION-TEST
+tests=$tests GETADDRINFO POSIX UID-REGRESSION-TEST SHORTNAME-TEST
 
 skipped1=RANDOMIPC NEGNOWAIT NBENCH ERRMAPEXTRACT TRANS2SCAN NTTRANSSCAN
 skipped2=DENY1 DENY2 OPENATTR CASETABLE EATEST
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c
index 3a3939c..b9e7d63 100644
--- a/source3/smbd/mangle_hash2.c
+++ b/source3/smbd/mangle_hash2.c
@@ -250,12 +250,17 @@ static bool is_mangled(const char *name, const struct 
share_params *parm)
 
 
 /* 
-   see if a filename is an allowable 8.3 name.
+   see if a filename is an allowable 8.3 name to return to the client.
+   Note this is not testing if this is a valid Samba mangled name, so
+   the rules are different for is_mangled.
 
we are only going to allow ascii characters in 8.3 names, as this
simplifies things greatly (it means that we know the string won't
get larger when converted from UNIX to DOS formats)
 */
+
+static char force_shortname_chars[] =  +,[];=;
+
 static bool is_8_3(const char *name, bool check_case, bool allow_wildcards, 
const struct share_params *p)
 {
int len, i;
@@ -307,9 +312,18 @@ static bool is_8_3(const char *name, bool check_case, bool 
allow_wildcards, cons
 
/* the length are all OK. Now check to see if the characters themselves 
are OK */
for (i=0; name[i]; i++) {
+   if (FLAG_CHECK(name[i], FLAG_ILLEGAL)) {
+   return false;
+   }
/* note that we may allow wildcard petterns! */
-   if (!FLAG_CHECK(name[i], FLAG_ASCII|(allow_wildcards ? 
FLAG_WILDCARD : 0))  name[i] != '.') {
-   return False;
+   if (!allow_wildcards  FLAG_CHECK(name[i], FLAG_WILDCARD)) {
+   return false;
+   }
+   if (((unsigned char)name[i])  0x7e) {
+   return false;
+   }
+   if (strchr(force_shortname_chars, name[i])) {
+   return false;
}
}
 


-- 
Samba Shared Repository


Build status as of Fri May 15 00:00:02 2009

2009-05-14 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-05-14 
00:00:35.0 +
+++ /home/build/master/cache/broken_results.txt 2009-05-15 00:00:14.0 
+
@@ -1,22 +1,22 @@
-Build status as of Thu May 14 00:00:02 2009
+Build status as of Fri May 15 00:00:02 2009
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   31 6  0 
+ccache   33 6  0 
 distcc   0  0  0 
-ldb  31 31 0 
-libreplace   30 11 0 
+ldb  33 33 0 
+libreplace   33 12 0 
 lorikeet 0  0  0 
-pidl 21 3  0 
+pidl 23 3  0 
 ppp  15 0  0 
-rsync31 11 0 
+rsync33 12 0 
 samba-docs   0  0  0 
 samba-web0  0  0 
-samba_3_current 29 18 0 
-samba_3_master 30 23 1 
-samba_3_next 30 22 0 
-samba_4_0_test 31 30 1 
-talloc   31 31 0 
-tdb  29 11 0 
+samba_3_current 31 20 0 
+samba_3_master 32 24 1 
+samba_3_next 32 23 0 
+samba_4_0_test 33 32 3 
+talloc   33 33 0 
+tdb  31 12 0