RE: [Samba] Acces denied with usrmgr.exe

2009-03-12 Thread HB
Hi 

No solution for that question ?  

Henri 

 -Message d'origine-
 De : HB [mailto:ciradhb.forw...@laposte.net] 
 Envoyé : jeudi 26 février 2009 11:59
 À : 'samba@lists.samba.org'
 Objet : RE: [Samba] Acces denied with usrmgr.exe
 
 Hi all,
 
 I have migrated to 3.3.0 and it works as expected. I can now 
 use usrmgr.exe why any account of the Domain Admins group. 
 Thanks for your help. 
 
 I have another question related to this (I use passdb backend 
 = tdbsam) . 
 When I create a new user with smbpasswd -a foo on the Linux 
 box , the account created is initialized with the following 
 values (pdbedit -v foo) : 
 - Home directory : (\\myserver\foo)
 - Home Drive : H: 
 - Logon Script : logonUNKNOWN.cmd 
 
 When I open the user foo in usrmgr.exe - profile, the fields 
 are ok, great. 
 
 Now, if I create a user with usrmgr.exe from a windows box, 
 all the fields are left to blank, and I have to complete the 
 profile manually. 
 
 Is there a way to have the account initialized exactly like 
 it were created with smbpasswd, some kind of a profile skeleton ? 
 
 Thanks in advance. 
 
 Henri 
 
  -Message d'origine-
  De : 
  samba-bounces+ciradhb.forward=laposte@lists.samba.org
  [mailto:samba-bounces+ciradhb.forward=laposte@lists.samba.
  org] De la part de HB
  Envoyé : mardi 17 février 2009 09:29
  À : samba@lists.samba.org
  Objet : RE: [Samba] Acces denied with usrmgr.exe
  
  
  
   
  
   -Message d'origine-
   De : jmcdo...@gmail.com [mailto:jmcdo...@gmail.com] De la
  part de Jim
   McDonough Envoyé : lundi 16 février 2009 21:38 À : HB Cc : 
   samba@lists.samba.org Objet : Re: [Samba] Acces denied with
  usrmgr.exe
   
   
   
   On Mon, Feb 16, 2009 at 8:53 AM, HB
   ciradhb.forw...@laposte.net wrote:
[2009/02/16 17:18:40,  2]
rpc_server/srv_samr_nt.c:access_check_samr_function(246)
 _samr__LookupRids: ACCESS DENIED (granted: 0x000d067a;
   required: 0x0100)
*   The only account that can fully use usrmgr.exe is 
   the samba root account , everything works well under that account.
   Jeremy has fixed this in current code.  It's just a matter
  of getting
   the latest packages for whatever your distro is.
  
  You're right. In 3.3.0 release notes I can read : 
  * Fix usrmgr opening a user object as non-root.
  
  I guess I have to recompile and upgrade to 3.3.0 (I am in 3.2.7) . 
  Thanks. 
  
  Henri
  
  
   
   
   --
   Jim McDonough
   Samba Team
   jmcd at samba dot org
   jmcd at themcdonoughs dot org
   
  
  --
  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] smbstatus behavior

2009-03-12 Thread plug bert

Hello All,

   smbstatus only seems to report users that are logged on to the server where 
it is being run. i observed this when i tried running smbstatus across  
member/PDB/BDC servers; is this expected behavior?

   Is there a utility/command that can show me *all* of the currently logged on 
users across the domain?

tia



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


[Samba] Binary Packages SuSE9.0 != SLES9

2009-03-12 Thread Sebastian Ries
Hi

I need to install a current version of samba on a server running
SuSE9.0 :-/

My Idea was to use the binary package provided at samba.org for SLES9
but I do not have the exact libraries that are needed:

libtalloc.so.1 is needed by samba-3.2.8-2.1.140
libtdb.so.1 is needed by samba-3.2.8-2.1.140
libwbclient.so.0 is needed by samba-3.2.8-2.1.140
- these are also provided on samba.org so there should be no problem

liblber.so.199 is needed by samba-3.2.8-2.1.140
libldap.so.199 is needed by samba-3.2.8-2.1.140
libpopt.so.0 is needed by samba-3.2.8-2.1.140

All of these are located on the system but with another version in the
name e.g.:
server:~ # ll /usr/lib/liblber*
-rw-r--r--1 root root61606 Oct  3
2003 /usr/lib/liblber.a
-rw-r--r--1 root root  785 Oct  3
2003 /usr/lib/liblber.la
lrwxrwxrwx1 root root   18 Mar 12
09:59 /usr/lib/liblber.so - liblber.so.2.0.122
lrwxrwxrwx1 root root   18 Aug 23
2004 /usr/lib/liblber.so.2 - liblber.so.2.0.122
-rwxr-xr-x1 root root56275 Sep 23
2003 /usr/lib/liblber.so.2.0.122

Does someone have experiences with these libraries?
Will (should) samba run when I just create the needed names as links to
the available libraries?

Any hint is welcome.

Regards
Sebastian Ries

-- 

DT Netsolution GmbH -  Talaeckerstr. 30 -  D-70437 Stuttgart
Tel: +49-711-849910-36   Fax: +49-711-849910-936
WEB: http://www.dtnet.de/ email: sebastian.r...@dtnet.de
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Something weird about pdbedit.

2009-03-12 Thread BOURIAUD
On Wednesday 11 March 2009 16:44:48 Harry Jede wrote:
 Am Mittwoch, 11. März 2009 15:38 schrieb BOURIAUD:

Hello again !

 You can only have ONE group with ONE gidNumber.

 BAD SETUP begin:
 dn: cn=cdti,ou=Group,BASEDN
 objectClass: posixGroup
 objectClass: top
 cn: cdti
 userPassword: {crypt}x
 gidNumber: 666

 Here is how the samba group is defined :

 dn: cn=CDTI,ou=Groups,BASEDN
 objectClass: top
 objectClass: posixGroup
 objectClass: sambaGroupMapping
 cn: CDTI
 description::
 Q2VudHJlIGTDqXBhcnRlbWVudGFsIGRlIHRyYWl0ZW1lbnQgZGUgbCdpbmZvcm
  1hdGlvbg==
 sambaGroupType: 2
 memberUid: david
 gidNumber: 666
 sambaSID: S-1-5-21-215069222-2822928016-2390355089-666
 BAD SETUP end:

 Combine these in a way, that you have only one group with the name cdti.

Thanks for your clear explanations. I see now where my mistake is and I'll try 
to correct them.
There seems to be something somehow cloudy in my mind about all that. Since 
I'm working on a server that serves all our users, I can't afford to put it 
down or to break everything while people are working. So, I just make few 
tries, and if it's wrong, I go back. Here is what I've tried :
I just changed CDTI gid from 666 to 10666. Since my account was linked to 666 
group, I changed the value of my gidNumber to 10666. Everything went then find 
according to pdbedit. No error occured when I did a pdbedit -v on my username.
But after that, I couldn't access files on the samba shares. I got a 
NT_STATUS_PERMISSION_DENIED.

 for example:
 delete cn=cdti,ou=Group,BASEDN
 and it may be fine.


So, I then went back to the original settings, and as you suggested, deleted 
the cdti entry.
With this setup, I have a group called CDTI, with gid 666 and sambaSID = 
SSID-666.
My user has group gid set to 666. So this should be fine.
But, once again when I try a pdbedit -v user, I get, among other things the 
following :

lookup_global_sam_rid: looking up RID 666.
smbldap_search_ext: base = [BASEDN], filter = 
[((sambaSID=S-1-5-21-215069222-2822928016-2390355089-666)
(objectclass=sambaSamAccount))], scope = [2]
ldapsam_getsampwsid: Unable to locate SID 
[S-1-5-21-215069222-2822928016-2390355089-666] count=0
smbldap_search_ext: base = [ou=Groups,BASEDN], filter = 
[((objectClass=sambaGroupMapping)
(sambaSID=S-1-5-21-215069222-2822928016-2390355089-666))], scope = [2]
init_group_from_ldap: Entry found for group: 666
lookup_rids: CDTI:2

Is the Unable to locate SID normal ?

And why the hell does pdbedit find two rids for CDTI since I deleted all that 
refered to the group I deleted ?
There are so many things I don't understand about all this.
If one can explain to me, that would be great. Thanks in advance for any help 
or any link to a comprehensive doc one would give me.
I've read many a doc, but all the one I've read take it plain that the reader 
knows at least many things about how to setup a samba pdc controller with 
ldap, which is not my case.
I really wish I hadn't any windows machine on my network, things would be 
easier for me.


 You should not have different groups with the same name, even if one is
 in uppercase and the other in lowercase letters.

I really thought that a lowercase and an uppercase name was not the same, 
thanks for this. And thanks again for your answer, I understand things more 
clearly now, even if it's not perfect.

 Gruss
   Harry Jede

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


Re: [Samba] smbstatus behavior

2009-03-12 Thread Volker Lendecke
On Thu, Mar 12, 2009 at 02:36:29AM -0700, plug bert wrote:
smbstatus only seems to report users that are logged on
to the server where it is being run. i observed this
when i tried running smbstatus across  member/PDB/BDC
servers; is this expected behavior?
 
Is there a utility/command that can show me *all* of
the currently logged on users across the domain?

No.

Volker


pgpYXUw22tJfD.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] Something weird about pdbedit.

2009-03-12 Thread Harry Jede
Am Donnerstag, 12. März 2009 11:15 schrieb BOURIAUD:
 On Wednesday 11 March 2009 16:44:48 Harry Jede wrote:
  Am Mittwoch, 11. März 2009 15:38 schrieb BOURIAUD:

 Hello again !

  You can only have ONE group with ONE gidNumber.
 
  BAD SETUP begin:
  dn: cn=cdti,ou=Group,BASEDN
  objectClass: posixGroup
  objectClass: top
  cn: cdti
  userPassword: {crypt}x
  gidNumber: 666
 
  Here is how the samba group is defined :
 
  dn: cn=CDTI,ou=Groups,BASEDN
  objectClass: top
  objectClass: posixGroup
  objectClass: sambaGroupMapping
  cn: CDTI
  description::
  Q2VudHJlIGTDqXBhcnRlbWVudGFsIGRlIHRyYWl0ZW1lbnQgZGUgbCdpbmZvcm
   1hdGlvbg==
  sambaGroupType: 2
  memberUid: david
  gidNumber: 666
  sambaSID: S-1-5-21-215069222-2822928016-2390355089-666
  BAD SETUP end:
 
  Combine these in a way, that you have only one group with the name
  cdti.

 Thanks for your clear explanations. I see now where my mistake is and
 I'll try to correct them.
 There seems to be something somehow cloudy in my mind about all that.
 Since I'm working on a server that serves all our users, I can't
 afford to put it down or to break everything while people are
 working.
Hmmh...
common praxis is this not. Almost all admins use test systems. May be 
some virtual systems. 

 So, I just make few tries, and if it's wrong, I go back. 
 Here is what I've tried : I just changed CDTI gid from 666 to 10666.
 Since my account was linked to 666 group, I changed the value of my
 gidNumber to 10666. Everything went then find according to pdbedit.
 No error occured when I did a pdbedit -v on my username. But after
 that, I couldn't access files on the samba shares. I got a
 NT_STATUS_PERMISSION_DENIED.
May be you have a caching daemon like nscd on your system. If so, you 
must invalidate the group cache.
 nscd -i group
will do this normaly.

  for example:
  delete cn=cdti,ou=Group,BASEDN
  and it may be fine.

 So, I then went back to the original settings, and as you suggested,
 deleted the cdti entry.
 With this setup, I have a group called CDTI, with gid 666 and
 sambaSID = SSID-666.
 My user has group gid set to 666. So this should be fine.
 But, once again when I try a pdbedit -v user, I get, among other
 things the following :

 lookup_global_sam_rid: looking up RID 666.
 smbldap_search_ext: base = [BASEDN], filter =
 [((sambaSID=S-1-5-21-215069222-2822928016-2390355089-666)
 (objectclass=sambaSamAccount))], scope = [2]
 ldapsam_getsampwsid: Unable to locate SID
 [S-1-5-21-215069222-2822928016-2390355089-666] count=0
 smbldap_search_ext: base = [ou=Groups,BASEDN], filter =
 [((objectClass=sambaGroupMapping)
 (sambaSID=S-1-5-21-215069222-2822928016-2390355089-666))], scope =
 [2] init_group_from_ldap: Entry found for group: 666
 lookup_rids: CDTI:2

 Is the Unable to locate SID normal ?
Yes, it is. Samba is searching for a user (objectclass=sambaSamAccount) 
with this rid.
So you see, you MUST also have uniq RIDs. You cannot have a user and a 
group with identical SID/RID. This comes from the M$-World, I 
believe :-( .

 And why the hell does pdbedit find two rids for CDTI since I deleted
 all that refered to the group I deleted ?
Has samba really found 2 groups with the same RID, or has samba found 2 
groups with the same name, ctdi and CTDI?

Try a ldapsearch:
ldapsearch -x -LLL -b BASEDN -s sub sambasid=*-666

ldapsearch -x -LLL -b BASEDN -s sub '(|(cn=ctdi)(uid=ctdi))' dn

By the way, ldap is case insensitive.

 There are so many things I don't understand about all this.
 If one can explain to me, that would be great. Thanks in advance for
 any help or any link to a comprehensive doc one would give me.
 I've read many a doc, but all the one I've read take it plain that
 the reader knows at least many things about how to setup a samba pdc
 controller with ldap, which is not my case.
I prefere to read the original documentation first. Even if its more 
work.

 I really wish I hadn't any windows machine on my network, things
 would be easier for me.
No way, our users like this kind of programms :-( .

  You should not have different groups with the same name, even if
  one is in uppercase and the other in lowercase letters.

 I really thought that a lowercase and an uppercase name was not the
 same, thanks for this.
In reality it is surely not the same. But do all programs, tools and 
their developer know this? 

 And thanks again for your answer, I understand 
 things more clearly now, even if it's not perfect.

  Gruss
  Harry Jede

-- 

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


[Samba] Joining Samba 3 domain from Windows Vista

2009-03-12 Thread ldard...@tiscali.it
Hi,
I want to join a Samba 3 domain using Windows Vista and I am unable 
because trying it I get the message An Active Directory Domain 
Controller for the domain MYDOMAIN could not be contacted. Vista can 
correctly browse all the shares of Samba and use the account defined on 
it.

I know Samba 3 provide an NT4 Domain, so maybe this is the 
problem.

I know Vista uses NTLMv2 protocol so I downgrade it to NTLMv1 
using secpol.msc

I know so little about Microsoft product, so forget 
me if this is an obvious thing. 

The exact version of Samba I am using 
is samba-3.0.28 from CentOS 5, but I am ready to upgrade wherever is 
needed.

Leandro


Con Tiscali Tutto Incluso telefoni e navighi senza limiti A SOLI €10 AL MESE 
FINO ALL’ESTATE. 

Attiva entro il 12/03/09! http://abbonati.tiscali.it/promo/tuttoincluso/
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Binary Packages SuSE9.0 != SLES9

2009-03-12 Thread Adam Tauno Williams
 I need to install a current version of samba on a server running
 SuSE9.0 :-/
 My Idea was to use the binary package provided at samba.org for SLES9

As your subject states SuSE 9.0 != SLES9 :)

 but I do not have the exact libraries that are needed:
 libtalloc.so.1 is needed by samba-3.2.8-2.1.140
 libtdb.so.1 is needed by samba-3.2.8-2.1.140
 libwbclient.so.0 is needed by samba-3.2.8-2.1.140
 - these are also provided on samba.org so there should be no problem
 liblber.so.199 is needed by samba-3.2.8-2.1.140
 libldap.so.199 is needed by samba-3.2.8-2.1.140
 libpopt.so.0 is needed by samba-3.2.8-2.1.140
 All of these are located on the system but with another version in the
 name e.g.:
 server:~ # ll /usr/lib/liblber*
 -rw-r--r--1 root root61606 Oct  3
 2003 /usr/lib/liblber.a
 -rw-r--r--1 root root  785 Oct  3
 2003 /usr/lib/liblber.la
 lrwxrwxrwx1 root root   18 Mar 12
 09:59 /usr/lib/liblber.so - liblber.so.2.0.122
 lrwxrwxrwx1 root root   18 Aug 23
 2004 /usr/lib/liblber.so.2 - liblber.so.2.0.122
 -rwxr-xr-x1 root root56275 Sep 23
 2003 /usr/lib/liblber.so.2.0.122
 Does someone have experiences with these libraries?

I'd be skeptical about faking/linking a liblber.so.199 to a
libliber.so.2*;  perhaps SuSE 9.0 had ldap/lber-compat packages that
provided the older LDAP  LBER libraries (both are probably provided
under openldap packages - don't recall, haven't seen a SuSE 9.0 box in a
*long* time).

 Will (should) samba run when I just create the needed names as links to
 the available libraries?

*maybe*
-- 
OpenGroupware developer: awill...@whitemice.org
http://whitemiceconsulting.blogspot.com/
OpenGroupare  Cyrus IMAPd documenation @
http://docs.opengroupware.org/Members/whitemice/wmogag/file_view

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


[Samba] Implimenting MSDFS Issue

2009-03-12 Thread Russ Lavoy

Hello,

I am running the following

OS
CentOS 5.2

Samba Release
samba-3.0.28

Kernel
2.6.18-92.1.22 (latest from CentOS)
I also tried compiling a custom kernel with the experimental MSDFS option in 
kernel version 2.6.28.7 to no avail.

Microsoft Server OS
Windows Server 2003 R2

My Samba server has winbind enabled and the following smb.conf configuration.

[global]
socket options = TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384
idmap uid = 2-3
winbind enum users = yes
winbind gid = 2-3
os level = 20
winbind enum groups = yes
preferred master = no
winbind separator = +
max log size = 50
encrypt passwords = yes
dns proxy = no
wins proxy = no
workgroup = DOMAIN
security = ads
realm =  domain.com
use kerberos keytab = true
password server = domain.com
host msdfs = yes

[dfs]
path = /export/dfsroot
msdfs root = yes
valid users =  @Group1
write list =  @Group1

My permissions on /export is 777 and I also tried 755 (shouldn't matter though) 
and is owned by root.

Inside the /export/dfsroot directory I executed the following:

ln -s 'msdfs:server1\share1' share1
ln -s 'msdfs:server2\share2' share2

To make sure it linked correctly I checked with a listing:

[r...@dfsbox dfsroot]# ls -l

drwxrwxrwx 2 root root 4096 Mar 12 12:12 New Folder
lrwxrwxrwx 1 root root   31 Mar 11 20:57 share1 - msdfs:domain.com\folders

That is the DFS root of the Microsoft Server.  Everything looks good up to this 
point.

But when I access the share via UNC on a Windows box I get an error of share 
refers to a location that is unavailable  But in that same directory I have 
another folder I can access and write to with no issues (same permissions on 
that folder as the dfsroot folder).  When I mount it on a Linux machine and do 
a directory listing I get the following:

[r...@dfsclient mnt]# ls -l
ls: cannot read symbolic link share1: Object is remote
total 0
drwxrwxrwx 2 root root  0 Mar 12 07:12 New Folder
lrwxrwxrwx 1 root root 26 Mar 12 07:26 share

For the client side has the exact same OS, kernel and samba version as the 
server does.

Can anyone shine any light on this for me?

Thanks,

Russ


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


Re: [Samba] Something weird about pdbedit.

2009-03-12 Thread BOURIAUD
On Thursday 12 March 2009 12:36:07 Harry Jede wrote:
Hi !
It is great to work with you. At least, you know what you're talking about, 
which is not my case on this peculiar point.

 Hmmh...
 common praxis is this not. Almost all admins use test systems. May be
 some virtual systems.

I know that, but I found the mistake after the system was put in place of the 
old one, and you know, what is done is done. I must go on with that.


 May be you have a caching daemon like nscd on your system. If so, you
 must invalidate the group cache.
  nscd -i group
 will do this normaly.

I've checked it up : no nscd daemon running on the machines. Did I write it 
anywhere that the samba machine and the ldap one were not the same ? Though it 
shouldn't change anything, I think it is worth say it now /o\


  Is the Unable to locate SID normal ?

 Yes, it is. Samba is searching for a user (objectclass=sambaSamAccount)
 with this rid.
 So you see, you MUST also have uniq RIDs. You cannot have a user and a
 group with identical SID/RID. This comes from the M$-World, I
 believe :-( .

  And why the hell does pdbedit find two rids for CDTI since I deleted
  all that refered to the group I deleted ?

 Has samba really found 2 groups with the same RID, or has samba found 2
 groups with the same name, ctdi and CTDI?

 Try a ldapsearch:
 ldapsearch -x -LLL -b BASEDN -s sub sambasid=*-666

 ldapsearch -x -LLL -b BASEDN -s sub '(|(cn=ctdi)(uid=ctdi))' dn

I've tried both searches, and in every case, only one entry is found, the one 
that is expected. It belongs to ou=Groups and is defined like this :

dn: cn=CDTI,BASEDN
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
cn: CDTI
description:: Q2VudHJlIGTDqXBhcnRlbWVudGFsIGRlIHRyYWl0ZW1lbnQgZGUgbCdpbmZvcm1h
 dGlvbg==
sambaGroupType: 2
displayName: CDTI
gidNumber: 666
SambaSID: S-1-5-21-215069222-2822928016-2390355089-666

I've also rebuild the ldap indexes, but nothing changes this behaviour. (on 
the ldap machine, as root, I went to the ldap db directory, and typed in : 
$ service ldap stop  slapindex  chown ldap:ldap *  service ldap start
)

So on, with all your great help, I'll take some time to check up once again 
all the configuration of both machines, the samba one and the ldap one.

Thanks again.

 Gruss
   Harry Jede

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


[Samba] Error compiling Samba 3.3.2 on Solaris 10

2009-03-12 Thread Wilfred Gander
Samba 3.3.2, Solaris 10 x86, gcc 3.4.3 or cc (SunStudio 12) give the
following compile error:

Compiling nsswitch/wbinfo.c
Linking bin/wbinfo
Undefined   first referenced
 symbol in file
wbcChangeUserPassword   nsswitch/wbinfo.o
wbcRemoveUidMapping nsswitch/wbinfo.o
wbcRemoveGidMapping nsswitch/wbinfo.o
wbcGetDisplayName   nsswitch/wbinfo.o
ld: fatal: Symbol referencing errors. No output written to bin/wbinfo
collect2: ld returned 1 exit status
gmake: *** [bin/wbinfo] Error 1


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


[Samba] updating samba/ldap: do I need new attributes?

2009-03-12 Thread lacoste

Hello,

I plan to update my samba-3.0.22/openldap-2.3.24
to samba-3.0.34/openldap-2.4.15 and I'm currently testing it.
This is on FreeBSD.

My idea is :
1) slapcat the openldap server and save the various tdb files.
2) deinstall samba and openldap and wipe out the bdb files
3) install the newer versions
4) slapadd to the new openldap server

This seems to work in my test lab.
During my tests I also built a new domain afresh and realized that the
sambaDomainName ldap entry has some attributes that are not in my
production server: sambaMinPwdLength, sambaLogonToChgPwd,  
sambaLockoutDuration,

sambaLockoutObservationWindow, sambaLockoutThreshold, sambaForceLogoff.

Do I have to add these attributes to my ldif file before slapadd?
More generally, do I have to add some attributes to my ldap entries?

Regards,
Thierry



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


Re: [Samba] Unix permissions mapping query

2009-03-12 Thread David Markey


I've been on #samba about this.

The UNIX mappings aren't being mapped for folders, but they are being
mapped for files. heres what it looks like:

http://dmarkey.com/~dmarkey/snapshot1.png

As I'm the owner for the directory I would have thought that all the boxes
should be ticked as I have full permissions. Am I incorrect?


Thanks.




On Wed, 11 Mar 2009 23:55:54 +, David Markey
dmar...@dodds.dmarkey.com wrote:
 
 
 When i have a file in a share and go to check its permissions in the
 permissions tab, all the entries are blank. But if i click advanced
 then the permissions are shown properly(but in advanced mode). 
 Is there a reason the permissions arent shown on the basic security
 tab? 
 Thanks.


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


Re: [Samba] Install of Samba 3.2.8-2 rpms failed to restart smbd and nmbd

2009-03-12 Thread Volker Lendecke
On Mon, Mar 09, 2009 at 01:13:15PM -0500, David C. Rankin wrote:
 Listmates:
 
   An update of samba via the binary rpms Samba 
 3.2.8-2.1.140-2082-SUSE-SL11.0
 failed to restart the server? This is the first time in years this has
 happened. Was Lars checking out skirts while building the rpms? Or, was there
 another problem:
 
 Mar  9 11:41:53 ecstasy nmbd[2842]: [2009/03/09 11:41:53,  0]
 nmbd/nmbd.c:terminate(68)
 Mar  9 11:41:53 ecstasy nmbd[2842]:   Got SIGTERM: going down...
 Mar  9 11:41:53 ecstasy smbd[24505]: [2009/03/09 11:41:53,  0]
 lib/fault.c:fault_report(40)
 Mar  9 11:41:53 ecstasy smbd[24505]:
 ===
 Mar  9 11:41:53 ecstasy smbd[24505]: [2009/03/09 11:41:53,  0]
 lib/fault.c:fault_report(41)
 Mar  9 11:41:53 ecstasy smbd[24505]:   INTERNAL ERROR: Signal 7 in pid 24505
 (3.2.7-0.1.135-2042-SUSE-SL11.0)

SIGBUS?? On a 386? Or is this sparc?

Volker


pgpUzsIKcxM60.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] Re: Can not clear Read-only attribute

2009-03-12 Thread Jeremy Allison
On Thu, Mar 12, 2009 at 02:56:59AM +0100, Günter Kukkukk wrote:
 Am Donnerstag, 12. März 2009 schrieb Jeremy Allison:
  On Thu, Mar 12, 2009 at 12:56:27AM +, tom m. wrote:
   
   I'm not against doing that, but does add some work: rebuild extended 
   attribute
   support in kernel, change fstab, etc.  But if I do this, what will be the 
   state
   of all the attribute bits of existing files?  That is, will files marked
   Read-only now suddenly be not Read-only?  How about System/Hidden files?
  
  Yes, you'll lose current DOS attribute mapping, but you'll
  be much happier in the long run :-).
  
  Jeremy.
 
 Hi Jeremy,
 but we have a bug here - the old wellknown map readonly = Yes stuff isn't 
 working
 anymore. Just did a test on latest v3-3-test.
 Digging deeper now ... it's related to (current) NTCreateAndX

Reproduced - here's the fix. Didn't make 3.3.2 unfortunately, but I'll
create the bug and attach the patch.

Jeremy.
diff --git a/source/smbd/open.c b/source/smbd/open.c
index c89a5f6..064e17c 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -425,8 +425,26 @@ static NTSTATUS open_file(files_struct *fsp,
access_granted);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status, 
NT_STATUS_ACCESS_DENIED)) {
+   /*
+* On NT_STATUS_ACCESS_DENIED, 
access_granted
+* contains the denied bits.
+*/
+
+   if ((access_mask  
FILE_WRITE_ATTRIBUTES) 
+   (access_granted  
FILE_WRITE_ATTRIBUTES) 
+   
(lp_map_readonly(SNUM(conn)) ||
+
lp_map_archive(SNUM(conn)) ||
+
lp_map_hidden(SNUM(conn)) ||
+
lp_map_system(SNUM(conn {
+   access_granted = 
~FILE_WRITE_ATTRIBUTES;
+
+   DEBUG(10,(open_file: overrode 
FILE_WRITE_ATTRIBUTES 
+   on file %s\n,
+   path ));
+   }
+
if ((access_mask  DELETE_ACCESS) 
-   (access_granted == 
DELETE_ACCESS) 
+   (access_granted  
DELETE_ACCESS) 

can_delete_file_in_directory(conn, path)) {
/* Were we trying to do a stat 
open
 * for delete and didn't get 
DELETE
@@ -436,10 +454,14 @@ static NTSTATUS open_file(files_struct *fsp,
 * 
http://blogs.msdn.com/oldnewthing/archive/2004/06/04/148426.aspx
 * for details. */
 
-   DEBUG(10,(open_file: overrode 
ACCESS_DENIED 
+   access_granted = 
~DELETE_ACCESS;
+
+   DEBUG(10,(open_file: overrode 
DELETE_ACCESS 
on file %s\n,
path ));
-   } else {
+   }
+
+   if (access_granted != 0) {
DEBUG(10, (open_file: Access 
denied on 
file %s\n,
path));
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Re: Can not clear Read-only attribute

2009-03-12 Thread Jeremy Allison
On Thu, Mar 12, 2009 at 02:56:59AM +0100, Günter Kukkukk wrote:
 Am Donnerstag, 12. März 2009 schrieb Jeremy Allison:
  On Thu, Mar 12, 2009 at 12:56:27AM +, tom m. wrote:
   
   I'm not against doing that, but does add some work: rebuild extended 
   attribute
   support in kernel, change fstab, etc.  But if I do this, what will be the 
   state
   of all the attribute bits of existing files?  That is, will files marked
   Read-only now suddenly be not Read-only?  How about System/Hidden files?
  
  Yes, you'll lose current DOS attribute mapping, but you'll
  be much happier in the long run :-).
  
  Jeremy.
 
 Hi Jeremy,
 but we have a bug here - the old wellknown map readonly = Yes stuff isn't 
 working
 anymore. Just did a test on latest v3-3-test.
 Digging deeper now ... it's related to (current) NTCreateAndX

Logged it as bug #6186, I've attached the patch and described
the workaround.

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


Re: [Samba] Error compiling Samba 3.3.2 on Solaris 10

2009-03-12 Thread Jeremy Allison
On Thu, Mar 12, 2009 at 03:55:45PM +0100, Wilfred Gander wrote:
 Samba 3.3.2, Solaris 10 x86, gcc 3.4.3 or cc (SunStudio 12) give the
 following compile error:
 
 Compiling nsswitch/wbinfo.c
 Linking bin/wbinfo
 Undefined   first referenced
  symbol in file
 wbcChangeUserPassword   nsswitch/wbinfo.o
 wbcRemoveUidMapping nsswitch/wbinfo.o
 wbcRemoveGidMapping nsswitch/wbinfo.o
 wbcGetDisplayName   nsswitch/wbinfo.o
 ld: fatal: Symbol referencing errors. No output written to bin/wbinfo
 collect2: ld returned 1 exit status
 gmake: *** [bin/wbinfo] Error 1

Looks like you have an old version of libwbclient in
you linker path somewhere.

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


[Samba] Connection closing with close_cnum(1284)

2009-03-12 Thread Michael Muratet

Greetings

I am running SMB on OS X Server 10.5.6, it's not clear what version of  
SMB they use. I have a Windows XP box that mounts a network drive on  
the server. This mount disappears from time to time for no apparent  
reason:


[2009/03/12 08:35:54, 2, pid=23189] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/process.c:timeout_processing(1371)

  Closing idle connection
[2009/03/12 09:06:23, 0, pid=23693] /SourceCache/samba/samba-187.8/ 
samba/source/lib/util_sock.c:set_socket_options(261)

  Failed to set socket option SO_KEEPALIVE (Error Invalid argument)
[2009/03/12 09:06:23, 0, pid=23693] /SourceCache/samba/samba-187.8/ 
samba/source/lib/util_sock.c:set_socket_options(261)

  Failed to set socket option TCP_NODELAY (Error Invalid argument)
[2009/03/12 09:06:23, 0, pid=23693] /SourceCache/samba/samba-187.8/ 
samba/source/lib/util_sock.c:get_peer_addr(1224)

  getpeername failed. Error was Invalid argument
[2009/03/12 09:06:23, 2, pid=23693] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/reply.c:reply_special(328)

  netbios connect: name1=NEWYORK name2=BRITNEY-IPAR
[2009/03/12 09:06:23, 2, pid=23693] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/reply.c:reply_special(335)

  netbios connect: local=newyork remote=britney-ipar, name type = 0
[2009/03/12 09:06:23, 0, pid=23693] /SourceCache/samba/samba-187.8/ 
samba/source/lib/util_sock.c:write_data(562)
  write_data: write failure in writing to client 172.26.15.51. Error  
Broken pipe
[2009/03/12 09:06:23, 0, pid=23693] /SourceCache/samba/samba-187.8/ 
samba/source/lib/util_sock.c:send_smb(761)

  Error writing 4 bytes to client. -1. (Broken pipe)
[2009/03/12 09:06:23, 2, pid=23694] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/sesssetup.c:setup_new_vc_session(1260)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would  
close all old resources.
[2009/03/12 09:06:23, 2, pid=23694] /SourceCache/samba/samba-187.8/ 
samba/source/lib/module.c:do_smb_load_module(64)

  Module '/usr/lib/samba/auth/odsam.dylib' loaded
[2009/03/12 09:06:23, 2, pid=23694] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/sesssetup.c:setup_new_vc_session(1260)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would  
close all old resources.
[2009/03/12 09:08:34, 2, pid=23694] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/process.c:timeout_processing(1371)

  Closing idle connection
[2009/03/12 09:13:34, 1, pid=7541] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  hwi-eas149 (172.26.15.62) closed connection to service encodedrive8

--- here's where the network mount closes---
[2009/03/12 09:13:34, 1, pid=7539] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  172.26.13.68 (172.26.13.68) closed connection to service encodedisk2
[2009/03/12 09:13:34, 1, pid=20953] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  emperor (172.26.15.103) closed connection to service encodedisk6
[2009/03/12 09:13:34, 1, pid=7542] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  hwi-eas295 (172.26.15.50) closed connection to service encodedrive7
[2009/03/12 09:13:34, 1, pid=7543] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  usi-eas45 (172.26.15.104) closed connection to service encodedrive8
[2009/03/12 09:13:34, 1, pid=20953] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  emperor (172.26.15.103) closed connection to service encodedisk1
[2009/03/12 09:13:34, 0] /SourceCache/samba/samba-187.8/samba/source/ 
smbd/server.c:main(890)

  smbd version 3.0.25b-apple started.
  Copyright Andrew Tridgell and the Samba Team 1992-2007
[2009/03/12 09:13:34, 2, pid=23896] /SourceCache/samba/samba-187.8/ 
samba/source/param/loadparm.c:do_section(3804)

  Processing section [homes]
[2009/03/12 09:13:34, 2, pid=23896] /SourceCache/samba/samba-187.8/ 
samba/source/param/loadparm.c:do_section(3804)

  Processing section [printers]
[2009/03/12 09:13:34, 2, pid=23896] /SourceCache/samba/samba-187.8/ 
samba/source/lib/interface.c:add_interface(81)
  added interface ip=172.26.15.102 bcast=172.26.15.255  
nmask=255.255.252.0


The IP in the log is not the same as the static IP associated with the  
Windows box. Does Windows assign a new IP for a network mount?


Here is my smb.conf file:

cat smb.conf
; Configuration file for the Samba software suite.
;  
= 
= 
= 
= 


;
; For the format of this file and comprehensive descriptions of all the
; configuration option, please refer to the man page for smb.conf(5).
;
; The following configuration should suit most systems for basic usage  
and
; initial testing. It gives all clients access to their home  
directories and

; allows access to all printers specified in /etc/printcap.

; BEGIN required configuration

; Parameters inside the required 

[Samba] More on close_cnum(1284)

2009-03-12 Thread Michael Muratet

Hello again

I have one more followup question. it looks to me like the server is  
restarting here just after it closes the shares:


[2009/03/12 09:13:34, 1, pid=7541] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  hwi-eas149 (172.26.15.62) closed connection to service encodedrive8
[2009/03/12 09:13:34, 1, pid=7539] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  172.26.13.68 (172.26.13.68) closed connection to service encodedisk2
[2009/03/12 09:13:34, 1, pid=20953] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  emperor (172.26.15.103) closed connection to service encodedisk6
[2009/03/12 09:13:34, 1, pid=7542] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  hwi-eas295 (172.26.15.50) closed connection to service encodedrive7
[2009/03/12 09:13:34, 1, pid=7543] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  usi-eas45 (172.26.15.104) closed connection to service encodedrive8
[2009/03/12 09:13:34, 1, pid=20953] /SourceCache/samba/samba-187.8/ 
samba/source/smbd/service.c:close_cnum(1284)

  emperor (172.26.15.103) closed connection to service encodedisk1

*** rebooting  here ? ***

[2009/03/12 09:13:34, 0] /SourceCache/samba/samba-187.8/samba/source/ 
smbd/server.c:main(890)

  smbd version 3.0.25b-apple started.
  Copyright Andrew Tridgell and the Samba Team 1992-2007
[2009/03/12 09:13:34, 2, pid=23896] /SourceCache/samba/samba-187.8/ 
samba/source/param/loadparm.c:do_section(3804)

  Processing section [homes]
[2009/03/12 09:13:34, 2, pid=23896] /SourceCache/samba/samba-187.8/ 
samba/source/param/loadparm.c:do_section(3804)

  Processing section [printers]
[2009/03/12 09:13:34, 2, pid=23896] /SourceCache/samba/samba-187.8/ 
samba/source/lib/interface.c:add_interface(81)
  added interface ip=172.26.15.102 bcast=172.26.15.255  
nmask=255.255.252.0
[2009/03/12 09:13:34, 2, pid=23896] /SourceCache/samba/samba-187.8/ 
samba/source/lib/tallocmsg.c:register_msg_pool_usage(105)

  Registered MSG_REQ_POOL_USAGE

I've got the highest information content selected for the logging, but  
I see no reason for the server to restart. I check the system log at  
the same time and see:


Mar 12 09:13:01 newyork sshd[23806]: USER_PROCESS: 23821 ttys000
Mar 12 09:13:33 newyork servermgrd[47]: servermgr_sharing: Failed to  
remove the Spotlight store at /Volumes/EncodeDisk6 (error: -1)

Mar 12 09:13:33 newyork /sbin/nfsd[50]: Too many groups for root
Mar 12 09:13:34: --- last message repeated 6 times ---
Mar 12 09:13:34 newyork com.apple.launchd[1] (org.samba.smbd[7532]):  
Stray process with PGID equal to this dead job: PID 7543 PPID 1 smbd
Mar 12 09:13:34 newyork com.apple.launchd[1] (org.samba.smbd[7532]):  
Stray process with PGID equal to this dead job: PID 7542 PPID 1 smbd
Mar 12 09:13:34 newyork com.apple.launchd[1] (org.samba.smbd[7532]):  
Stray process with PGID equal to this dead job: PID 20953 PPID 1 smbd
Mar 12 09:13:34 newyork /usr/sbin/serveradmin[23842]: servermgr_smb: - 
[SCSMBConfigurationParser writeFile] kSMBPreferencesSyncTool

Mar 12 09:13:52 newyork login[23905]: USER_PROCESS: 23905 ttys004

I don't have Spotlight enabled. (Its presence is an nuisance on a  
server IMO.) Can someone help me to understand is the 'Stray process'  
error is a cause or an effect?


Thanks

Mike

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


Re: [Samba] updating samba/ldap: do I need new attributes?

2009-03-12 Thread Adam Williams
your steps are fine.  you don't need the samba LDAP entries you listed, 
when ou do smbpasswd -a user, it will add the minimum required LDAP 
entries for samba.


laco...@miage.univ-paris12.fr wrote:

Hello,

I plan to update my samba-3.0.22/openldap-2.3.24
to samba-3.0.34/openldap-2.4.15 and I'm currently testing it.
This is on FreeBSD.

My idea is :
1) slapcat the openldap server and save the various tdb files.
2) deinstall samba and openldap and wipe out the bdb files
3) install the newer versions
4) slapadd to the new openldap server

This seems to work in my test lab.
During my tests I also built a new domain afresh and realized that the
sambaDomainName ldap entry has some attributes that are not in my
production server: sambaMinPwdLength, sambaLogonToChgPwd, 
sambaLockoutDuration,

sambaLockoutObservationWindow, sambaLockoutThreshold, sambaForceLogoff.

Do I have to add these attributes to my ldif file before slapadd?
More generally, do I have to add some attributes to my ldap entries?

Regards,
Thierry




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


Re: [Samba] Error compiling Samba 3.3.2 on Solaris 10

2009-03-12 Thread Wilfred Gander
Thanks Jeremy, the problem is fixed!

Wilfred

On Thu, Mar 12, 2009 at 7:56 PM, Jeremy Allison j...@samba.org wrote:
 On Thu, Mar 12, 2009 at 03:55:45PM +0100, Wilfred Gander wrote:
 Samba 3.3.2, Solaris 10 x86, gcc 3.4.3 or cc (SunStudio 12) give the
 following compile error:

 Compiling nsswitch/wbinfo.c
 Linking bin/wbinfo
 Undefined                       first referenced
  symbol                             in file
 wbcChangeUserPassword               nsswitch/wbinfo.o
 wbcRemoveUidMapping                 nsswitch/wbinfo.o
 wbcRemoveGidMapping                 nsswitch/wbinfo.o
 wbcGetDisplayName                   nsswitch/wbinfo.o
 ld: fatal: Symbol referencing errors. No output written to bin/wbinfo
 collect2: ld returned 1 exit status
 gmake: *** [bin/wbinfo] Error 1

 Looks like you have an old version of libwbclient in
 you linker path somewhere.

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


Re: [Samba] Samba PDC - Kerberised CIFS access

2009-03-12 Thread Eduardo Sachs
Shahid,

I have same problem, but, I use Domain Heimdal Kerberos, look this bug ticket:

https://bugzilla.samba.org/show_bug.cgi?id=5810

The developers have not yet responded.

Thanks!

2009/3/11 Shahid M Shaikh shahid.sha...@in.ibm.com:
 Hi All,

 I have machine M1 hosting Samba PDC. It stores only user information.
 I have machine M2 acting as KDC server.
 I have machine M3 hosting CIFS shares and it joins into the domain hosted
 by PDC M1.
 I have machine M4 used as CIFS client.

 On M2, I have added users and cifs/host service principals for M3. Also
 added service principal in keytab file.
 I have added all the user and service principals using des-cbc-crc
 encryption triplet.

 M3 and M4 are KDC clients. I have scped the keytab file on M3 from M2.

 I have configured M3's smb.conf file to accept kerberos keytab and also for
 the kerberos realm.

       realm = SONAS.COM
       use kerberos keytab = yes
       client use spnego = yes


 From M4, I do kinit user and then try to see exported shares from M3.

 [r...@sofsedun3 ~]# kinit domuser
 Password for domu...@sonas.com:
 [r...@sofsedun3 ~]# smbclient -L sofsedun4 -U domuser
 [r...@sofsedun3 ~]# klist -e
 Ticket cache: FILE:/tmp/krb5cc_0
 Default principal: domu...@sonas.com

 Valid starting     Expires            Service principal
 03/11/09 21:36:54  03/12/09 21:36:54  krbtgt/sonas@sonas.com
        renew until 03/11/09 21:36:54, Etype (skey, tkt): DES cbc mode with
 CRC-32, DES cbc mode with CRC-32


 Kerberos 4 ticket cache: /tmp/tkt0
 klist: You have no tickets cached
 [r...@sofsedun3 ~]# smbclient -L sofsedun4 -U domuser
 Enter domuser's password:
 Anonymous login successful
 Domain=[VSOFS1.COM] OS=[Unix] Server=[Samba 3.2.8-ctdb-55]

        Sharename       Type      Comment
        -             ---
        share           Disk      test share
        IPC$            IPC       IPC Service (Samba 3.2.8-ctdb-55)
 Anonymous login successful
 Domain=[VSOFS1.COM] OS=[Unix] Server=[Samba 3.2.8-ctdb-55]

        Server               Comment
        -            ---

        Workgroup            Master
        -            ---

 It works with anonymous login. But when i try to use -k it fails. I tried
 smbclient with -k and debug level 3. I get these on console.

 [r...@sofsedun3 ~]# smbclient -d3 -L sofsedun4 -U domuser -k
 lp_load_ex: refreshing parameters
 Initialising global parameters
 params.c:pm_process() - Processing configuration file /etc/samba/smb.conf
 Processing section [global]
 added interface eth0 ip=10.0.0.23 bcast=10.0.0.255 netmask=255.255.255.0
 added interface eth1 ip=10.0.1.23 bcast=10.0.1.255 netmask=255.255.255.0
 added interface eth2 ip=10.0.2.23 bcast=10.0.2.255 netmask=255.255.255.0
 Client started (version 3.2.8-ctdb-55).
 Connecting to 10.0.0.24 at port 445
 Doing spnego session setup (blob length=111)
 got OID=1 2 840 113554 1 2 2
 got OID=1 2 840 48018 1 2 2
 got OID=1 3 6 1 4 1 311 2 2 10
 got principal=cifs/sofsedun4.vsofs1@sonas.com
 Doing kerberos session setup
 ads_cleanup_expired_creds: Ticket in ccache[FILE:/tmp/krb5cc_0] expiration
 Thu, 12 Mar 2009 21:36:54 TLT
 cli_session_setup_blob: receive failed (NT_STATUS_LOGON_FAILURE)
 SPNEGO login failed: Logon failure
 session setup failed: NT_STATUS_LOGON_FAILURE
 [r...@sofsedun3 ~]# klist -e
 Ticket cache: FILE:/tmp/krb5cc_0
 Default principal: domu...@sonas.com

 Valid starting     Expires            Service principal
 03/11/09 21:36:54  03/12/09 21:36:54  krbtgt/sonas@sonas.com
        renew until 03/11/09 21:36:54, Etype (skey, tkt): DES cbc mode with
 CRC-32, DES cbc mode with CRC-32
 03/11/09 21:39:15  03/12/09 21:36:54  cifs/sofsedun4.vsofs1@sonas.com
        renew until 03/11/09 21:36:54, Etype (skey, tkt): DES cbc mode with
 CRC-32, DES cbc mode with CRC-32

 Kerberos 4 ticket cache: /tmp/tkt0
 klist: You have no tickets cached


 On M3, I have enabled smbd logs with debug level 10. The corresponding
 errors for the above behavior are:

 [2009/03/11 21:58:54,  3] smbd/process.c:switch_message(1361)
  switch message SMBsesssetupX (pid 26858) conn 0x0
 [2009/03/11 21:58:54,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
 [2009/03/11 21:58:54,  3] smbd/sesssetup.c:reply_sesssetup_and_X(1409)
  wct=12 flg2=0xc801
 [2009/03/11 21:58:54,  3]
 smbd/sesssetup.c:reply_sesssetup_and_X_spnego(1173)
  Doing spnego session setup
 [2009/03/11 21:58:54,  3]
 smbd/sesssetup.c:reply_sesssetup_and_X_spnego(1208)
  NativeOS=[Unix] NativeLanMan=[Samba] PrimaryDomain=[]
 [2009/03/11 21:58:54,  3] smbd/sesssetup.c:reply_spnego_negotiate(800)
  reply_spnego_negotiate: Got secblob of size 466
 [2009/03/11 21:58:54,  3]
 libads/kerberos_verify.c:ads_secrets_verify_ticket(282)
  ads_secrets_verify_ticket: enc type [1] failed to decrypt with error
 Decrypt integrity check failed
 [2009/03/11 21:58:54,  3]
 libads/kerberos_verify.c:ads_keytab_verify_ticket(171)
  ads_keytab_verify_ticket: 

[Samba] PAM_WINBIND problem with sambaPwdMustChange

2009-03-12 Thread Eduardo Sachs
Hi People!

I use pam_winbind for authentication in my computer workstation using
Debian Lenny 5.0, Stable Version.

I configure my user with this option sambaPwdMustChange: 0, and I
logon in GDM without asking to change password. Who knows what can be?

I use Samba PDC with Heimdal Kerberos, but, I configure PAM with only
pam_winbind for tests...

Client versions:
ii  libwbclient0 2:3.2.5-4
client library for interfacing with winbind service
ii  samba2:3.2.5-4  a
LanManager-like file and printer server for Unix
ii  samba-common 2:3.2.5-4
Samba common files used by both the server and the client
ii  winbind  2:3.2.5-4
service to resolve user and group information from Windows NT

Server versions:
ii  samba2:3.2.5-4 a
LanManager-like file and printer server for Unix

My configuration of PAM is simple:
authsufficient  pam_winbind.so debug
authrequiredpam_unix.so nullok_secure use_first_pass
account sufficient  pam_unix.so
account sufficient  pam_winbind.so
account requiredpam_deny.so
passwordsufficient  pam_unix.so nullok obscure md5
passwordrequiredpam_winbind.so
session optionalpam_unix.so
session optionalpam_winbind.so
session optionalpam_mkhomedir.so skel=/etc/skel/ 
umask=077

Debug PAM:
pam_winbind(gdm:auth): [pamh: 0x88bcf70] ENTER: pam_sm_authenticate
(flags: 0x)
pam_winbind(gdm:auth): getting password (0x0181)
pam_winbind(gdm:auth): Verify user 'sachs'
pam_winbind(gdm:auth): CONFIG file: krb5_ccache_type 'FILE'
pam_winbind(gdm:auth): enabling krb5 login flag
pam_winbind(gdm:auth): enabling request for a FILE krb5 ccache
pam_winbind(gdm:auth): user 'sachs' granted access
pam_winbind(gdm:auth): Returned user was 'sachs'
pam_winbind(gdm:auth): [pamh: 0x88bcf70] LEAVE: pam_sm_authenticate 
returning 0
pam_winbind(gdm:account): user 'sachs' OK
pam_winbind(gdm:account): user 'sachs' granted access
pam_winbind(gdm:setcred): [pamh: 0x88bcf70] ENTER: pam_sm_setcred
(flags: 0x0002)
pam_winbind(gdm:setcred): PAM_ESTABLISH_CRED not implemented
pam_winbind(gdm:setcred): [pamh: 0x88bcf70] LEAVE: pam_sm_setcred 
returning 0

Some configurations:
1 - Nsswitch configure with LDAP, its work fine.

2 - smb.conf

[global]
workgroup = _LOCAL_
netbios name = debian-x11
realm = LOCAL.INT.BR
security = domain
wins server = 10.111.222.100
use kerberos keytab = yes
client use spnego = yes
client NTLMv2 auth = yes

bind interfaces only = yes
interfaces = eth0 10.111.222.103, lo 127.0.0.1
hosts allow = 10.111.222.0/24, 127.0.0.1

debug level = 2
log file = /var/log/samba/%m.log
max log size = 50
log level = 1
syslog = 0  
utmp = Yes

idmap uid = 1-15000
idmap gid = 1-15000
template shell = /bin/bash
template homedir = /home/users/%U
winbind separator = +
winbind enum users = yes
winbind enum groups = yes
winbind use default domain = yes

encrypt passwords = yes
invalid users = root
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 
SO_SNDBUF=8192
local master = no
domain master = no
dns proxy = no

preserve case = yes
short preserve case = no
default case = lower
case sensitive = no

dos charset = cp850
unix charset = iso8859-1
display charset = LOCALE
restrict anonymous = 0

Thanks!
-- 
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-5060-g9ba8978

2009-03-12 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  9ba89785982bc5cadbd9aa723271157114745595 (commit)
  from  eeaf0cb1572fff27df732714ddc192db2c8f9aff (commit)

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


- Log -
commit 9ba89785982bc5cadbd9aa723271157114745595
Author: Karolin Seeger ksee...@samba.org
Date:   Thu Mar 12 08:31:33 2009 +0100

VERSION: Raise version number up to 3.3.2.

Karolin

---

Summary of changes:
 source/VERSION |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/VERSION b/source/VERSION
index d248ea1..c7da103 100644
--- a/source/VERSION
+++ b/source/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=3
 SAMBA_VERSION_MINOR=3
-SAMBA_VERSION_RELEASE=1
+SAMBA_VERSION_RELEASE=2
 
 
 # Bug fix releases use a letter for the patch revision #


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-stable updated - release-3-3-1-45-g32a6a69

2009-03-12 Thread Karolin Seeger
The branch, v3-3-stable has been updated
   via  32a6a69aaa13986f513a89ec4adc50713576977b (commit)
  from  518b825b570d1678d4221bd0ecb9c45a7f651813 (commit)

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


- Log -
commit 32a6a69aaa13986f513a89ec4adc50713576977b
Author: Karolin Seeger ksee...@samba.org
Date:   Thu Mar 12 08:31:33 2009 +0100

VERSION: Raise version number up to 3.3.2.

Karolin
(cherry picked from commit 9ba89785982bc5cadbd9aa723271157114745595)

---

Summary of changes:
 source/VERSION |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/VERSION b/source/VERSION
index d626975..358c3af 100644
--- a/source/VERSION
+++ b/source/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=3
 SAMBA_VERSION_MINOR=3
-SAMBA_VERSION_RELEASE=1
+SAMBA_VERSION_RELEASE=2
 
 
 # Bug fix releases use a letter for the patch revision #


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-285-ga0a9c5d

2009-03-12 Thread Volker Lendecke
The branch, master has been updated
   via  a0a9c5d1709e81a1503c7326147b3d77ab4328c9 (commit)
   via  b17f9e15efcc5a826b07afa22c8321d2c653ae72 (commit)
  from  483525f73c5597c0c35de4288d97f53b9d3d262e (commit)

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


- Log -
commit a0a9c5d1709e81a1503c7326147b3d77ab4328c9
Author: Volker Lendecke v...@samba.org
Date:   Mon Mar 9 21:50:50 2009 +0100

Fix #6167: winbindd -n should disable the winbind idmap cache

commit b17f9e15efcc5a826b07afa22c8321d2c653ae72
Author: Volker Lendecke v...@samba.org
Date:   Thu Mar 12 10:12:58 2009 +0100

Make opt_nocache static to winbindd.c

---

Summary of changes:
 source3/winbindd/idmap_util.c |   70 ++--
 source3/winbindd/winbindd.c   |   12 ++-
 source3/winbindd/winbindd_cache.c |8 ++--
 source3/winbindd/winbindd_group.c |2 -
 source3/winbindd/winbindd_proto.h |2 +
 5 files changed, 67 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/idmap_util.c b/source3/winbindd/idmap_util.c
index 9abf425..ad4a7dd 100644
--- a/source3/winbindd/idmap_util.c
+++ b/source3/winbindd/idmap_util.c
@@ -18,6 +18,8 @@
along with this program.  If not, see http://www.gnu.org/licenses/.*/
 
 #include includes.h
+#include winbindd.h
+#include winbindd_proto.h
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_IDMAP
@@ -36,7 +38,8 @@ NTSTATUS idmap_uid_to_sid(const char *domname, DOM_SID *sid, 
uid_t uid)
DEBUG(10,(idmap_uid_to_sid: uid = [%lu], domain = '%s'\n,
  (unsigned long)uid, domname?domname:NULL));
 
-   if (idmap_cache_find_uid2sid(uid, sid, expired)) {
+   if (winbindd_use_idmap_cache()
+idmap_cache_find_uid2sid(uid, sid, expired)) {
DEBUG(10, (idmap_cache_find_uid2sid found %d%s\n, uid,
   expired ?  (expired): ));
if (expired  idmap_is_online()) {
@@ -63,14 +66,18 @@ backend:
}
 
if (map.status != ID_MAPPED) {
-   struct dom_sid null_sid;
-   ZERO_STRUCT(null_sid);
-   idmap_cache_set_sid2uid(null_sid, uid);
+   if (winbindd_use_idmap_cache()) {
+   struct dom_sid null_sid;
+   ZERO_STRUCT(null_sid);
+   idmap_cache_set_sid2uid(null_sid, uid);
+   }
DEBUG(10, (uid [%lu] not mapped\n, (unsigned long)uid));
return NT_STATUS_NONE_MAPPED;
}
 
-   idmap_cache_set_sid2uid(sid, uid);
+   if (winbindd_use_idmap_cache()) {
+   idmap_cache_set_sid2uid(sid, uid);
+   }
 
return NT_STATUS_OK;
 }
@@ -89,7 +96,8 @@ NTSTATUS idmap_gid_to_sid(const char *domname, DOM_SID *sid, 
gid_t gid)
DEBUG(10,(idmap_gid_to_si: gid = [%lu], domain = '%s'\n,
  (unsigned long)gid, domname?domname:NULL));
 
-   if (idmap_cache_find_gid2sid(gid, sid, expired)) {
+   if (winbindd_use_idmap_cache()
+idmap_cache_find_gid2sid(gid, sid, expired)) {
DEBUG(10, (idmap_cache_find_gid2sid found %d%s\n, gid,
   expired ?  (expired): ));
if (expired  idmap_is_online()) {
@@ -116,14 +124,18 @@ backend:
}
 
if (map.status != ID_MAPPED) {
-   struct dom_sid null_sid;
-   ZERO_STRUCT(null_sid);
-   idmap_cache_set_sid2uid(null_sid, gid);
+   if (winbindd_use_idmap_cache()) {
+   struct dom_sid null_sid;
+   ZERO_STRUCT(null_sid);
+   idmap_cache_set_sid2uid(null_sid, gid);
+   }
DEBUG(10, (gid [%lu] not mapped\n, (unsigned long)gid));
return NT_STATUS_NONE_MAPPED;
}
 
-   idmap_cache_set_sid2gid(sid, gid);
+   if (winbindd_use_idmap_cache()) {
+   idmap_cache_set_sid2gid(sid, gid);
+   }
 
return NT_STATUS_OK;
 }
@@ -142,7 +154,8 @@ NTSTATUS idmap_sid_to_uid(const char *dom_name, DOM_SID 
*sid, uid_t *uid)
DEBUG(10,(idmap_sid_to_uid: sid = [%s], domain = '%s'\n,
  sid_string_dbg(sid), dom_name));
 
-   if (idmap_cache_find_sid2uid(sid, uid, expired)) {
+   if (winbindd_use_idmap_cache()
+idmap_cache_find_sid2uid(sid, uid, expired)) {
DEBUG(10, (idmap_cache_find_sid2uid found %d%s\n,
   (int)(*uid), expired ?  (expired): ));
if (expired  idmap_is_online()) {
@@ -171,7 +184,9 @@ backend:
   map.status,
   map.xid.type,
   map.xid.id));
-   idmap_cache_set_sid2uid(sid, -1);
+   if 

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

2009-03-12 Thread Volker Lendecke
The branch, v3-3-test has been updated
   via  1bdd91cfab96a478de39bd44c8c3362eedef7f36 (commit)
   via  9ad5e570625acc76fad7f5cb8134461662ba857a (commit)
  from  9ba89785982bc5cadbd9aa723271157114745595 (commit)

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


- Log -
commit 1bdd91cfab96a478de39bd44c8c3362eedef7f36
Author: Volker Lendecke v...@samba.org
Date:   Mon Mar 9 21:50:50 2009 +0100

Fix #6167: winbindd -n should disable the winbind idmap cache

commit 9ad5e570625acc76fad7f5cb8134461662ba857a
Author: Volker Lendecke v...@samba.org
Date:   Mon Mar 9 21:46:59 2009 +0100

Make opt_nocache static to winbindd.c

---

Summary of changes:
 source/winbindd/idmap_util.c |   70 +++---
 source/winbindd/winbindd.c   |   12 ++-
 source/winbindd/winbindd_cache.c |8 ++--
 source/winbindd/winbindd_group.c |2 -
 source/winbindd/winbindd_proto.h |2 +
 5 files changed, 67 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/idmap_util.c b/source/winbindd/idmap_util.c
index 9abf425..ad4a7dd 100644
--- a/source/winbindd/idmap_util.c
+++ b/source/winbindd/idmap_util.c
@@ -18,6 +18,8 @@
along with this program.  If not, see http://www.gnu.org/licenses/.*/
 
 #include includes.h
+#include winbindd.h
+#include winbindd_proto.h
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_IDMAP
@@ -36,7 +38,8 @@ NTSTATUS idmap_uid_to_sid(const char *domname, DOM_SID *sid, 
uid_t uid)
DEBUG(10,(idmap_uid_to_sid: uid = [%lu], domain = '%s'\n,
  (unsigned long)uid, domname?domname:NULL));
 
-   if (idmap_cache_find_uid2sid(uid, sid, expired)) {
+   if (winbindd_use_idmap_cache()
+idmap_cache_find_uid2sid(uid, sid, expired)) {
DEBUG(10, (idmap_cache_find_uid2sid found %d%s\n, uid,
   expired ?  (expired): ));
if (expired  idmap_is_online()) {
@@ -63,14 +66,18 @@ backend:
}
 
if (map.status != ID_MAPPED) {
-   struct dom_sid null_sid;
-   ZERO_STRUCT(null_sid);
-   idmap_cache_set_sid2uid(null_sid, uid);
+   if (winbindd_use_idmap_cache()) {
+   struct dom_sid null_sid;
+   ZERO_STRUCT(null_sid);
+   idmap_cache_set_sid2uid(null_sid, uid);
+   }
DEBUG(10, (uid [%lu] not mapped\n, (unsigned long)uid));
return NT_STATUS_NONE_MAPPED;
}
 
-   idmap_cache_set_sid2uid(sid, uid);
+   if (winbindd_use_idmap_cache()) {
+   idmap_cache_set_sid2uid(sid, uid);
+   }
 
return NT_STATUS_OK;
 }
@@ -89,7 +96,8 @@ NTSTATUS idmap_gid_to_sid(const char *domname, DOM_SID *sid, 
gid_t gid)
DEBUG(10,(idmap_gid_to_si: gid = [%lu], domain = '%s'\n,
  (unsigned long)gid, domname?domname:NULL));
 
-   if (idmap_cache_find_gid2sid(gid, sid, expired)) {
+   if (winbindd_use_idmap_cache()
+idmap_cache_find_gid2sid(gid, sid, expired)) {
DEBUG(10, (idmap_cache_find_gid2sid found %d%s\n, gid,
   expired ?  (expired): ));
if (expired  idmap_is_online()) {
@@ -116,14 +124,18 @@ backend:
}
 
if (map.status != ID_MAPPED) {
-   struct dom_sid null_sid;
-   ZERO_STRUCT(null_sid);
-   idmap_cache_set_sid2uid(null_sid, gid);
+   if (winbindd_use_idmap_cache()) {
+   struct dom_sid null_sid;
+   ZERO_STRUCT(null_sid);
+   idmap_cache_set_sid2uid(null_sid, gid);
+   }
DEBUG(10, (gid [%lu] not mapped\n, (unsigned long)gid));
return NT_STATUS_NONE_MAPPED;
}
 
-   idmap_cache_set_sid2gid(sid, gid);
+   if (winbindd_use_idmap_cache()) {
+   idmap_cache_set_sid2gid(sid, gid);
+   }
 
return NT_STATUS_OK;
 }
@@ -142,7 +154,8 @@ NTSTATUS idmap_sid_to_uid(const char *dom_name, DOM_SID 
*sid, uid_t *uid)
DEBUG(10,(idmap_sid_to_uid: sid = [%s], domain = '%s'\n,
  sid_string_dbg(sid), dom_name));
 
-   if (idmap_cache_find_sid2uid(sid, uid, expired)) {
+   if (winbindd_use_idmap_cache()
+idmap_cache_find_sid2uid(sid, uid, expired)) {
DEBUG(10, (idmap_cache_find_sid2uid found %d%s\n,
   (int)(*uid), expired ?  (expired): ));
if (expired  idmap_is_online()) {
@@ -171,7 +184,9 @@ backend:
   map.status,
   map.xid.type,
   map.xid.id));
-   idmap_cache_set_sid2uid(sid, -1);
+   if 

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

2009-03-12 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  b41c0e965232a6f3c1cc2768ef39b6cf97d68634 (commit)
  from  1bdd91cfab96a478de39bd44c8c3362eedef7f36 (commit)

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


- Log -
commit b41c0e965232a6f3c1cc2768ef39b6cf97d68634
Author: Karolin Seeger ksee...@samba.org
Date:   Thu Mar 12 10:46:20 2009 +0100

WHATSNEW: Update WHATSNEW.

Karolin

---

Summary of changes:
 WHATSNEW.txt |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index da078b7..968fd37 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -58,6 +58,7 @@ o   Björn Jacke b...@sernet.de
 
 o   Volker Lendecke v...@samba.org
 * BUG 6124: Fix the build on IRIX.
+* BUG 6176: winbindd -n should disable the winbind idmap cache.
 * Add a vfs_preopen module to hide fs latencies.
 * Don't log NDR_PRINT_DEBUG at level 0, this always ends up in syslog.
 * Fix a valgrind error / segfault in dns_register_smbd().


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-stable updated - release-3-3-1-48-gd277da2

2009-03-12 Thread Karolin Seeger
The branch, v3-3-stable has been updated
   via  d277da2671f3be4e74be34d6b91b29e7ed01c195 (commit)
   via  532dd18a5a911e9772206cb60f220a75335186b9 (commit)
   via  290a7f02750d7146fe55fd400925bfaf9d5585b4 (commit)
  from  32a6a69aaa13986f513a89ec4adc50713576977b (commit)

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


- Log -
commit d277da2671f3be4e74be34d6b91b29e7ed01c195
Author: Karolin Seeger ksee...@samba.org
Date:   Thu Mar 12 10:46:20 2009 +0100

WHATSNEW: Update WHATSNEW.

Karolin
(cherry picked from commit b41c0e965232a6f3c1cc2768ef39b6cf97d68634)

commit 532dd18a5a911e9772206cb60f220a75335186b9
Author: Volker Lendecke v...@samba.org
Date:   Mon Mar 9 21:50:50 2009 +0100

Fix #6167: winbindd -n should disable the winbind idmap cache
(cherry picked from commit 1bdd91cfab96a478de39bd44c8c3362eedef7f36)

commit 290a7f02750d7146fe55fd400925bfaf9d5585b4
Author: Volker Lendecke v...@samba.org
Date:   Mon Mar 9 21:46:59 2009 +0100

Make opt_nocache static to winbindd.c
(cherry picked from commit 9ad5e570625acc76fad7f5cb8134461662ba857a)

---

Summary of changes:
 WHATSNEW.txt |1 +
 source/winbindd/idmap_util.c |   70 +++---
 source/winbindd/winbindd.c   |   12 ++-
 source/winbindd/winbindd_cache.c |8 ++--
 source/winbindd/winbindd_group.c |2 -
 source/winbindd/winbindd_proto.h |2 +
 6 files changed, 68 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index da078b7..968fd37 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -58,6 +58,7 @@ o   Björn Jacke b...@sernet.de
 
 o   Volker Lendecke v...@samba.org
 * BUG 6124: Fix the build on IRIX.
+* BUG 6176: winbindd -n should disable the winbind idmap cache.
 * Add a vfs_preopen module to hide fs latencies.
 * Don't log NDR_PRINT_DEBUG at level 0, this always ends up in syslog.
 * Fix a valgrind error / segfault in dns_register_smbd().
diff --git a/source/winbindd/idmap_util.c b/source/winbindd/idmap_util.c
index 9abf425..ad4a7dd 100644
--- a/source/winbindd/idmap_util.c
+++ b/source/winbindd/idmap_util.c
@@ -18,6 +18,8 @@
along with this program.  If not, see http://www.gnu.org/licenses/.*/
 
 #include includes.h
+#include winbindd.h
+#include winbindd_proto.h
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_IDMAP
@@ -36,7 +38,8 @@ NTSTATUS idmap_uid_to_sid(const char *domname, DOM_SID *sid, 
uid_t uid)
DEBUG(10,(idmap_uid_to_sid: uid = [%lu], domain = '%s'\n,
  (unsigned long)uid, domname?domname:NULL));
 
-   if (idmap_cache_find_uid2sid(uid, sid, expired)) {
+   if (winbindd_use_idmap_cache()
+idmap_cache_find_uid2sid(uid, sid, expired)) {
DEBUG(10, (idmap_cache_find_uid2sid found %d%s\n, uid,
   expired ?  (expired): ));
if (expired  idmap_is_online()) {
@@ -63,14 +66,18 @@ backend:
}
 
if (map.status != ID_MAPPED) {
-   struct dom_sid null_sid;
-   ZERO_STRUCT(null_sid);
-   idmap_cache_set_sid2uid(null_sid, uid);
+   if (winbindd_use_idmap_cache()) {
+   struct dom_sid null_sid;
+   ZERO_STRUCT(null_sid);
+   idmap_cache_set_sid2uid(null_sid, uid);
+   }
DEBUG(10, (uid [%lu] not mapped\n, (unsigned long)uid));
return NT_STATUS_NONE_MAPPED;
}
 
-   idmap_cache_set_sid2uid(sid, uid);
+   if (winbindd_use_idmap_cache()) {
+   idmap_cache_set_sid2uid(sid, uid);
+   }
 
return NT_STATUS_OK;
 }
@@ -89,7 +96,8 @@ NTSTATUS idmap_gid_to_sid(const char *domname, DOM_SID *sid, 
gid_t gid)
DEBUG(10,(idmap_gid_to_si: gid = [%lu], domain = '%s'\n,
  (unsigned long)gid, domname?domname:NULL));
 
-   if (idmap_cache_find_gid2sid(gid, sid, expired)) {
+   if (winbindd_use_idmap_cache()
+idmap_cache_find_gid2sid(gid, sid, expired)) {
DEBUG(10, (idmap_cache_find_gid2sid found %d%s\n, gid,
   expired ?  (expired): ));
if (expired  idmap_is_online()) {
@@ -116,14 +124,18 @@ backend:
}
 
if (map.status != ID_MAPPED) {
-   struct dom_sid null_sid;
-   ZERO_STRUCT(null_sid);
-   idmap_cache_set_sid2uid(null_sid, gid);
+   if (winbindd_use_idmap_cache()) {
+   struct dom_sid null_sid;
+   ZERO_STRUCT(null_sid);
+   idmap_cache_set_sid2uid(null_sid, gid);
+   }
DEBUG(10, (gid [%lu] not mapped\n, (unsigned long)gid));
return NT_STATUS_NONE_MAPPED;
}
 
-   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-286-g2fdbafb

2009-03-12 Thread Stefan Metzmacher
The branch, master has been updated
   via  2fdbafbf5475e8936fb5bc3e3bafc7ee19a9b705 (commit)
  from  a0a9c5d1709e81a1503c7326147b3d77ab4328c9 (commit)

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


- Log -
commit 2fdbafbf5475e8936fb5bc3e3bafc7ee19a9b705
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 09:02:02 2009 +0100

Revert s3:libsmb: add an option to cli_push to let the caller provide the 
buffers

This reverts commit 9579a6f193f570e4ce2af80f4aac7c2f25ae5b22.

It's confusing to have a boolean to alter the behavior of cli_push
and as the new feature isn't used yet I revert it.

We can readd a extra function later.

metze

---

Summary of changes:
 source3/client/client.c   |   10 --
 source3/include/proto.h   |9 ++---
 source3/libsmb/clireadwrite.c |   33 -
 source3/torture/torture.c |8 +++-
 4 files changed, 17 insertions(+), 43 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/client.c b/source3/client/client.c
index 67a2458..aaa9e35 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -220,9 +220,7 @@ struct push_state {
SMB_OFF_T nread;
 };
 
-static size_t push_source(uint8_t *inbuf, size_t n,
- const uint8_t **outbuf,
- void *priv)
+static size_t push_source(uint8_t *buf, size_t n, void *priv)
 {
struct push_state *state = (struct push_state *)priv;
int result;
@@ -231,7 +229,7 @@ static size_t push_source(uint8_t *inbuf, size_t n,
return 0;
}
 
-   result = readfile(inbuf, n, state-f);
+   result = readfile(buf, n, state-f);
state-nread += result;
return result;
 }
@@ -1683,8 +1681,8 @@ static int do_put(const char *rname, const char *lname, 
bool reput)
state.f = f;
state.nread = 0;
 
-   status = cli_push(targetcli, fnum, 0, 0, io_bufsize,
- false, push_source, state);
+   status = cli_push(targetcli, fnum, 0, 0, io_bufsize, push_source,
+ state);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, cli_push returned %s\n, nt_errstr(status));
}
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 794a006..a1cafb6 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2790,18 +2790,13 @@ struct async_req *cli_push_send(TALLOC_CTX *mem_ctx, 
struct event_context *ev,
struct cli_state *cli,
uint16_t fnum, uint16_t mode,
off_t start_offset, size_t window_size,
-   bool caller_buffers,
-   size_t (*source)(uint8_t *inbuf, size_t n,
-const uint8_t **outbuf,
+   size_t (*source)(uint8_t *buf, size_t n,
 void *priv),
void *priv);
 NTSTATUS cli_push_recv(struct async_req *req);
 NTSTATUS cli_push(struct cli_state *cli, uint16_t fnum, uint16_t mode,
  off_t start_offset, size_t window_size,
- bool caller_buffers,
- size_t (*source)(uint8_t *inbuf, size_t n,
-  const uint8_t **outbuf,
-  void *priv),
+ size_t (*source)(uint8_t *buf, size_t n, void *priv),
  void *priv);
 
 /* The following definitions come from libsmb/clisecdesc.c  */
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 7e7cf0d..f2f447b 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -930,11 +930,8 @@ struct cli_push_state {
uint16_t mode;
off_t start_offset;
size_t window_size;
-   bool caller_buffers;
 
-   size_t (*source)(uint8_t *inbuf, size_t n,
-const uint8_t **outbuf,
-void *priv);
+   size_t (*source)(uint8_t *buf, size_t n, void *priv);
void *priv;
 
bool eof;
@@ -966,21 +963,13 @@ static bool cli_push_write_setup(struct async_req *req,
substate-req = req;
substate-idx = idx;
substate-ofs = state-next_offset;
-   if (state-caller_buffers) {
-   substate-buf = NULL;
-   } else {
-   substate-buf = talloc_array(substate, uint8_t,
-state-chunk_size);
-   if (!substate-buf) {
-   talloc_free(substate);
-   return false;
-   }
+   substate-buf = talloc_array(substate, uint8_t, state-chunk_size);
+   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-297-gcb38888

2009-03-12 Thread Stefan Metzmacher
The branch, master has been updated
   via  cb32cf20a8bc8f20f1230bc22d1caff283dd (commit)
   via  7142ef49bdc5fe731c9140641e8e938ee999327d (commit)
   via  a3d5d8378c8edb6baa9ab42b02cee4711a58840b (commit)
   via  6802394212f7fefc21d1e2ad257fbeee26238b2d (commit)
   via  06f88fe7a2f9ce93f8cdbec0910cc8471c12b1c3 (commit)
   via  bd0f14c1d782b6afe9455e61819caeb2d480af1e (commit)
   via  9932fd2d9af3c71262c5cca61c3b38809b952d95 (commit)
   via  880d9d6d8c209c770185b9b1c9a3019cb56be763 (commit)
   via  43a7d48d24b357872dc31c1088e468ad2b719b73 (commit)
   via  7a8b97ec2bcedb18b56b54fbf61eb0d6e9005193 (commit)
   via  1e4f78cc41d7d44703bea238fee86da618d1587b (commit)
  from  2fdbafbf5475e8936fb5bc3e3bafc7ee19a9b705 (commit)

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


- Log -
commit cb32cf20a8bc8f20f1230bc22d1caff283dd
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 10:35:23 2009 +0100

tevent: add tevent_loop_until()

This is only a hack for samba4 and should not be used
in new code.

metze

commit 7142ef49bdc5fe731c9140641e8e938ee999327d
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 10:23:30 2009 +0100

tevent: add tevent_loop_set_nesting_hook()

This is an ugly hack to let the s4 server work arround
some bugs related to nested events and uid changing.

metze

commit a3d5d8378c8edb6baa9ab42b02cee4711a58840b
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 10:05:47 2009 +0100

s4:events: allow nested events until we fixed all code to avoid them

metze

commit 6802394212f7fefc21d1e2ad257fbeee26238b2d
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 10:05:05 2009 +0100

s4:ldb: allow nested events until the code is fixed to avoid them

metze

commit 06f88fe7a2f9ce93f8cdbec0910cc8471c12b1c3
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 09:51:33 2009 +0100

tevent: don't allow nested tevent_loop_once() anymore

Incompatible caller should use tevent_loop_allow_nesting()
function.

metze

commit bd0f14c1d782b6afe9455e61819caeb2d480af1e
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 09:33:58 2009 +0100

s3:events: pass __location__ to event_loop_*()

metze

commit 9932fd2d9af3c71262c5cca61c3b38809b952d95
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 09:33:26 2009 +0100

tevent: pass __location__ to tevent_loop_once/wait()

metze

commit 880d9d6d8c209c770185b9b1c9a3019cb56be763
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 09:22:41 2009 +0100

tevent: add tevent_set_abort_fn()

metze

commit 43a7d48d24b357872dc31c1088e468ad2b719b73
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 08:48:59 2009 +0100

tevent: add tevent_signal_support()

Not every tevent backend supports signal events.

metze

commit 7a8b97ec2bcedb18b56b54fbf61eb0d6e9005193
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 08:19:50 2009 +0100

talloc: add talloc_set_abort_fn()

metze

commit 1e4f78cc41d7d44703bea238fee86da618d1587b
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 10:04:02 2009 +0100

s4:ldb: setup tevent debug functions on a selfcreated event context

metze

---

Summary of changes:
 lib/talloc/talloc.c|   35 +++-
 lib/talloc/talloc.h|2 +
 lib/tevent/tevent.c|  170 +++-
 lib/tevent/tevent.h|   39 +-
 lib/tevent/tevent_epoll.c  |6 +-
 lib/tevent/tevent_internal.h   |   12 +++-
 lib/tevent/tevent_select.c |6 +-
 lib/tevent/tevent_standard.c   |6 +-
 source3/lib/events.c   |6 +-
 source4/lib/events/tevent_s4.c |2 +
 source4/lib/ldb/common/ldb.c   |   37 +
 11 files changed, 297 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index c472e9f..60a48ad 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -138,14 +138,30 @@ struct talloc_chunk {
 #define TC_HDR_SIZE ((sizeof(struct talloc_chunk)+15)~15)
 #define TC_PTR_FROM_CHUNK(tc) ((void *)(TC_HDR_SIZE + (char*)tc))
 
+static void (*talloc_abort_fn)(const char *reason);
+
+void talloc_set_abort_fn(void (*abort_fn)(const char *reason))
+{
+   talloc_abort_fn = abort_fn;
+}
+
+static void talloc_abort(const char *reason)
+{
+   if (!talloc_abort_fn) {
+   TALLOC_ABORT(reason);
+   }
+
+   talloc_abort_fn(reason);
+}
+
 static void talloc_abort_double_free(void)
 {
-   TALLOC_ABORT(Bad talloc magic value - double free); 
+   talloc_abort(Bad talloc magic value - double free);
 }
 
 static void 

[SCM] Samba Shared Repository - annotated tag release-3-3-2 created - release-3-3-2

2009-03-12 Thread Karolin Seeger
The annotated tag, release-3-3-2 has been created
at  a03a3abef2d278edcaed6de7fc5ab32c5c90017b (tag)
   tagging  d277da2671f3be4e74be34d6b91b29e7ed01c195 (commit)
  replaces  release-3-3-1
 tagged by  Karolin Seeger
on  Thu Mar 12 14:33:15 2009 +0100

- Log -
tag release-3-3-2
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)

iD8DBQBJuQ84bzORW2Vot+oRAjszAJ9Ls9EVzdiy5UD9cT3QEbvrWG+egwCffgzI
hs4hWhoPFf7HEhNoRyxXWdA=
=u/CL
-END PGP SIGNATURE-

Andrew Tridgell (1):
  fixed a bug in message handling for code the change notify code

Björn Jacke (1):
  prefer gssapi header files from subdirectory

Bo Yang (2):
  Initialize the id_map status in idmap_ldap to avoid surprise
  More fix to initialize idmap statuses

Dan Sledz (1):
  It appears that the first time we see a uid/gid that winbind can't map,

Derrell Lipman (1):
  Make char* parameters const

Jeremy Allison (19):
  Allow set attributes on a stream fnum to be redirected to the base 
filename.
  Fix some NetBSD warnings.
  Fix bug in processing of open modes in POSIX open.
  Make test for open modes more robust against other bits.
  Fix use of streams modules with CIFSFS client.
  Ensure ACL modules work with POSIX paths.
  Use fsp-posix_open in preference if we have it.
  Fix more POSIX path lstat calls. Fix bug where close can return
  Make us pass the RAW-RENAME torture test I just added.
  Fix bug #6082 - smbd_gpfs_getacl failed: Windows client can´t rename or
  Fix bug #6155 - force group is no longer working as expected.
  Fix crashes when running RAW-ACLs against system with tdb ACL modules
  Fix bug #6154 - zfs does not honor admin users.
  Second part of fix for #6154, ensure we return max access
  Fix bug #6160 - Office 2007 fails saving files to a Samba mapped drive.
  Last part of fix for #6154 - zfs does not honor admin users.
  Fix bug #6161 - smbclient corrupts source path in tar mode
  Now we're allowing a lower bound for auth_len, ensure we
  Get the sense of the integer wrap test the right way around. Sorry.

Karolin Seeger (9):
  s3/docs: Add missing full stop.
  s3/WHATSNEW: Update changes since 3.3.0.
  s3/packaging: Package new files properly.
  s3/packaging: Fix typo in comment.
  WHATSNEW: Update changes since 3.3.1.
  WHATSNEW: Update changes.
  WHATSNEW: Update changes.
  VERSION: Raise version number up to 3.3.2.
  WHATSNEW: Update WHATSNEW.

Stefan Metzmacher (2):
  s3:lib: interfaces.c isn't used in the configure tests anymore
  s3:signing: the seqnum should only be decremented by 1 for ntcancel 
requests

Steve French (2):
  cifs mount did not properly display version string when no other 
parameters passed in.
  Fix guest mounts

Steven Danneman (1):
  s3: fix guest auth when winbindd is running

Tim Prouty (2):
  Fix a bug that prevent core files from being created
  s3 passdb: Add back some useful debug statements

Volker Lendecke (7):
  Fix bug 6124: Attempt to fix the build on IRIX
  Complete the fix for bug 6100
  Fix a valgrind error / segfault in dns_register_smbd()
  Don't log NDR_PRINT_DEBUG at level 0, this always ends up in syslog
  Add a vfs_preopen module to hide fs latencies
  Make opt_nocache static to winbindd.c
  Fix #6167: winbindd -n should disable the winbind idmap cache

---


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-298-g2f57920

2009-03-12 Thread Stefan Metzmacher
The branch, master has been updated
   via  2f579200fb439693540ada6e098959aa2d5f414e (commit)
  from  cb32cf20a8bc8f20f1230bc22d1caff283dd (commit)

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


- Log -
commit 2f579200fb439693540ada6e098959aa2d5f414e
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 14:28:22 2009 +0100

s4:build: try to fix the build with the ibm checker in the build-farm

The problem is that the shell eats the quotes in -DFOO=foo, bar, NULL

metze

---

Summary of changes:
 source4/build/smb_build/main.pl |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 3c84a91..0d19e41 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -73,7 +73,7 @@ foreach my $key (values %$OUTPUT) {
$shared_libs_used = 1;
}
if ($key-{TYPE} eq MODULE and @{$key-{OUTPUT_TYPE}}[0] eq 
MERGED_OBJ and defined($key-{INIT_FUNCTION})) {
-   $mkenv-output($key-{SUBSYSTEM}_INIT_FUNCTIONS += 
$key-{INIT_FUNCTION},\n);
+   $mkenv-output($key-{SUBSYSTEM}_INIT_FUNCTIONS 
+=$key-{INIT_FUNCTION},\n);
}
$mkenv-CFlags($key);
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-299-g4b57f6d

2009-03-12 Thread Günther Deschner
The branch, master has been updated
   via  4b57f6dd34d1ddbdc7b011de1ea7041ec8215dec (commit)
  from  2f579200fb439693540ada6e098959aa2d5f414e (commit)

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


- Log -
commit 4b57f6dd34d1ddbdc7b011de1ea7041ec8215dec
Author: Günther Deschner g...@samba.org
Date:   Thu Mar 12 11:00:21 2009 +0100

s3-spoolss: make jobname a const char * in print_job_start().

Guenther

---

Summary of changes:
 source3/include/proto.h |2 +-
 source3/printing/printing.c |2 +-
 source3/rpc_server/srv_spoolss_nt.c |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index a1cafb6..c8a066f 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4928,7 +4928,7 @@ bool print_job_resume(struct auth_serversupplied_info 
*server_info, int snum,
 ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T 
pos, size_t size);
 int print_queue_length(int snum, print_status_struct *pstatus);
 uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum,
-  char *jobname, NT_DEVICEMODE *nt_devmode );
+  const char *jobname, NT_DEVICEMODE *nt_devmode );
 void print_job_endpage(int snum, uint32 jobid);
 bool print_job_end(int snum, uint32 jobid, enum file_close_type close_type);
 int print_queue_status(int snum, 
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index fc3667e..71c6344 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2407,7 +2407,7 @@ static bool add_to_jobs_changed(struct tdb_print_db *pdb, 
uint32 jobid)
 ***/
 
 uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum,
-  char *jobname, NT_DEVICEMODE *nt_devmode )
+  const char *jobname, NT_DEVICEMODE *nt_devmode )
 {
uint32 jobid;
char *path;
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 0a4f5ae..727f3c9 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5868,7 +5868,7 @@ WERROR _spoolss_StartDocPrinter(pipes_struct *p,
}
 
Printer-jobid = print_job_start(p-server_info, snum,
-CONST_DISCARD(char 
*,info_1-document_name),
+info_1-document_name,
 Printer-nt_devmode);
 
/* An error occured in print_job_start() so return an appropriate


-- 
Samba Shared Repository


svn commit: samba-web r1272 - in trunk: . devel history

2009-03-12 Thread kseeger
Author: kseeger
Date: 2009-03-12 14:00:50 + (Thu, 12 Mar 2009)
New Revision: 1272

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=1272

Log:
Announce Samba 3.3.2
Karolin
Added:
   trunk/history/samba-3.3.2.html
Modified:
   trunk/devel/index.html
   trunk/header_columns.html
   trunk/history/header_history.html
   trunk/index.html


Changeset:
Modified: trunk/devel/index.html
===
--- trunk/devel/index.html  2009-02-24 09:47:37 UTC (rev 1271)
+++ trunk/devel/index.html  2009-03-12 14:00:50 UTC (rev 1272)
@@ -20,8 +20,8 @@
 3.0.x and 2.2.x versions of Samba, which are no longer in active development.
 /p
 
-pThe latest production release is emSamba 3.3.1/em (a
-href=/samba/history/samba-3.3.1.htmlrelease notes/a and a
+pThe latest production release is emSamba 3.3.2/em (a
+href=/samba/history/samba-3.3.2.htmlrelease notes/a and a
 href=/samba/download/download/a)./p
 
 pWith the release of version 3 of the GPL, the Samba Team has decided to

Modified: trunk/header_columns.html
===
--- trunk/header_columns.html   2009-02-24 09:47:37 UTC (rev 1271)
+++ trunk/header_columns.html   2009-03-12 14:00:50 UTC (rev 1272)
@@ -130,9 +130,9 @@
   div class=releases
 h4Current Stable Release/h4
 ul
-lia href=/samba/ftp/stable/samba-3.3.1.tar.gzSamba 3.3.1 
(gzipped)/a/li
-lia href=/samba/history/samba-3.3.1.htmlRelease Notes/a/li
-lia href=/samba/ftp/stable/samba-3.3.1.tar.ascSignature/a/li
+lia href=/samba/ftp/stable/samba-3.3.2.tar.gzSamba 3.3.2 
(gzipped)/a/li
+lia href=/samba/history/samba-3.3.2.htmlRelease Notes/a/li
+lia href=/samba/ftp/stable/samba-3.3.2.tar.ascSignature/a/li
 /ul
 
 h4Historical/h4

Modified: trunk/history/header_history.html
===
--- trunk/history/header_history.html   2009-02-24 09:47:37 UTC (rev 1271)
+++ trunk/history/header_history.html   2009-03-12 14:00:50 UTC (rev 1272)
@@ -77,6 +77,7 @@
   div class=notes
 h6Release Notes/h6
 ul
+lia href=samba-3.3.2.htmlsamba-3.3.2/a/li
 lia href=samba-3.3.1.htmlsamba-3.3.1/a/li
 lia href=samba-3.3.0.htmlsamba-3.3.0/a/li
 lia href=samba-3.2.8.htmlsamba-3.2.8/a/li

Added: trunk/history/samba-3.3.2.html
===
--- trunk/history/samba-3.3.2.html  2009-02-24 09:47:37 UTC (rev 1271)
+++ trunk/history/samba-3.3.2.html  2009-03-12 14:00:50 UTC (rev 1272)
@@ -0,0 +1,100 @@
+!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
+http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
+html xmlns=http://www.w3.org/1999/xhtml;
+
+head
+titleSamba - Release Notes Archive/title
+/head
+
+body
+
+   H2Samba 3.3.2 Available for Download/H2
+
+p
+pre
+   =
+   Release Notes for Samba 3.3.2
+  March, 12 2009
+   =
+
+This is the latest bugfix release release of the Samba 3.3 series.
+
+Major enhancements in Samba 3.3.2 include:
+
+ * Fix force group (bug #6155).
+ * Fix saving of files on Samba share using MS Office 2007 (bug #6160).
+ * Fix guest authentication in setups with security = share and
+  guest ok = yes when Winbind is running.
+ * Fix corruptions of source path in tar mode of smbclient (bug #6161).
+
+
+##
+Changes
+###
+
+
+Changes since 3.3.1:
+
+
+
+o   Jeremy Allison j...@samba.org
+* BUG 6082: Fix renaming and deleting of directories using Windows clients.
+* BUG 6154: Make ZFS honor admin users.
+* BUG 6155: Fix force group.
+* BUG 6160: Fix saving of files on Samba share using MS Office 2007.
+* BUG 6161: Fix corruptions of source path in tar mode of smbclient.
+* Fix some NetBSD warnings.
+* Fix bug in processing of open modes in POSIX open.
+* Fix use of streams modules with CIFSFS client.
+* Ensure ACL modules work with POSIX paths.
+* Use fsp-posix_open in preference if we have it.
+* Fix more POSIX path lstat calls.
+
+
+o   Andrew Tridgell tri...@samba.org
+* Fix a bug in message handling for the change notify code.
+
+
+o   Steven Danneman steven.danne...@isilon.com
+* Fix guest authentication in setups with security = share and guest ok 
=
+  yes when Winbind is running.
+
+
+o   Steve French smfre...@gmail.com
+* BUG 4640: Fix guest mounts in mount.cifs.
+* Fix displaying the version string properly when no other parameters 
passed
+  in in mount.cifs.
+
+
+o   Björn Jacke b...@sernet.de
+* Prefer gssapi header files from subdirectory.
+
+
+o   Volker Lendecke v...@samba.org
+* BUG 6124: Fix the build on IRIX.
+* BUG 6176: winbindd -n should disable 

svn commit: samba-web r1273 - in trunk/docs/FAQ: .

2009-03-12 Thread kseeger
Author: kseeger
Date: 2009-03-12 14:44:50 + (Thu, 12 Mar 2009)
New Revision: 1273

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=1273

Log:
Fix typo.
Karolin
Modified:
   trunk/docs/FAQ/index.html


Changeset:
Modified: trunk/docs/FAQ/index.html
===
--- trunk/docs/FAQ/index.html   2009-03-12 14:00:50 UTC (rev 1272)
+++ trunk/docs/FAQ/index.html   2009-03-12 14:44:50 UTC (rev 1273)
@@ -64,7 +64,7 @@
 h3Which Samba version should I run?/h3
 pThe Samba 2.2 branch is no longer maintained.  It's EOL was October 1, 
2004./p
 
-pThe Samba 3.0 branch has been turned into maintainance mode. There will be
+pThe Samba 3.0 branch has been turned into maintenance mode. There will be
 only bug fix and security updates./p
 
 pSamba4 is a development branch that hasn't yet had an initial release.  If



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

2009-03-12 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  969f2aa114f8ede44c3e56ca52ce2d4b70e709ba (commit)
  from  b41c0e965232a6f3c1cc2768ef39b6cf97d68634 (commit)

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


- Log -
commit 969f2aa114f8ede44c3e56ca52ce2d4b70e709ba
Author: Jeremy Allison j...@samba.org
Date:   Thu Mar 12 10:56:09 2009 -0700

Fix bug #6186 - map readonly does not work
Jeremy.

---

Summary of changes:
 source/smbd/open.c |   28 +---
 1 files changed, 25 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/open.c b/source/smbd/open.c
index c89a5f6..064e17c 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -425,8 +425,26 @@ static NTSTATUS open_file(files_struct *fsp,
access_granted);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status, 
NT_STATUS_ACCESS_DENIED)) {
+   /*
+* On NT_STATUS_ACCESS_DENIED, 
access_granted
+* contains the denied bits.
+*/
+
+   if ((access_mask  
FILE_WRITE_ATTRIBUTES) 
+   (access_granted  
FILE_WRITE_ATTRIBUTES) 
+   
(lp_map_readonly(SNUM(conn)) ||
+
lp_map_archive(SNUM(conn)) ||
+
lp_map_hidden(SNUM(conn)) ||
+
lp_map_system(SNUM(conn {
+   access_granted = 
~FILE_WRITE_ATTRIBUTES;
+
+   DEBUG(10,(open_file: overrode 
FILE_WRITE_ATTRIBUTES 
+   on file %s\n,
+   path ));
+   }
+
if ((access_mask  DELETE_ACCESS) 
-   (access_granted == 
DELETE_ACCESS) 
+   (access_granted  
DELETE_ACCESS) 

can_delete_file_in_directory(conn, path)) {
/* Were we trying to do a stat 
open
 * for delete and didn't get 
DELETE
@@ -436,10 +454,14 @@ static NTSTATUS open_file(files_struct *fsp,
 * 
http://blogs.msdn.com/oldnewthing/archive/2004/06/04/148426.aspx
 * for details. */
 
-   DEBUG(10,(open_file: overrode 
ACCESS_DENIED 
+   access_granted = 
~DELETE_ACCESS;
+
+   DEBUG(10,(open_file: overrode 
DELETE_ACCESS 
on file %s\n,
path ));
-   } else {
+   }
+
+   if (access_granted != 0) {
DEBUG(10, (open_file: Access 
denied on 
file %s\n,
path));


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-300-g5c63388

2009-03-12 Thread Jeremy Allison
The branch, master has been updated
   via  5c63388f63028af9bac2acb2ef0a38736278823b (commit)
  from  4b57f6dd34d1ddbdc7b011de1ea7041ec8215dec (commit)

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


- Log -
commit 5c63388f63028af9bac2acb2ef0a38736278823b
Author: Jeremy Allison j...@samba.org
Date:   Thu Mar 12 10:57:31 2009 -0700

Fix bug #6186 - map readonly does not work
Jeremy.

---

Summary of changes:
 source3/nmbd/nmbd_nameregister.c |8 
 source3/smbd/open.c  |   28 +---
 2 files changed, 33 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/nmbd/nmbd_nameregister.c b/source3/nmbd/nmbd_nameregister.c
index 98f129a..d4359aa 100644
--- a/source3/nmbd/nmbd_nameregister.c
+++ b/source3/nmbd/nmbd_nameregister.c
@@ -104,6 +104,14 @@ static void register_name_response(struct subnet_record 
*subrec,
 subrec-subnet_name, nmb-header.rcode, 
inet_ntoa(p-ip)));
success = False;
} else {
+   if (!ip_equal_v4(rrec-packet-ip, p-ip)) {
+   DEBUG(5,(register_name_response: Ignoring WINS server 
response 
+   from IP %s, for name %s. We sent to IP %s\n,
+   inet_ntoa(p-ip),
+   nmb_namestr(answer_name),
+   inet_ntoa(rrec-packet-ip)));
+   return;
+   }
/* Unicast - check to see if the response allows us to have the 
name. */
if (nmb-header.opcode == NMB_WACK_OPCODE) {
/* WINS server is telling us to wait. Pretend we didn't 
get
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index c8cc2e6..d529b00 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -454,8 +454,26 @@ static NTSTATUS open_file(files_struct *fsp,
access_granted);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status, 
NT_STATUS_ACCESS_DENIED)) {
+   /*
+* On NT_STATUS_ACCESS_DENIED, 
access_granted
+* contains the denied bits.
+*/
+
+   if ((access_mask  
FILE_WRITE_ATTRIBUTES) 
+   (access_granted  
FILE_WRITE_ATTRIBUTES) 
+   
(lp_map_readonly(SNUM(conn)) ||
+
lp_map_archive(SNUM(conn)) ||
+
lp_map_hidden(SNUM(conn)) ||
+
lp_map_system(SNUM(conn {
+   access_granted = 
~FILE_WRITE_ATTRIBUTES;
+
+   DEBUG(10,(open_file: overrode 
FILE_WRITE_ATTRIBUTES 
+   on file %s\n,
+   path ));
+   }
+
if ((access_mask  DELETE_ACCESS) 
-   (access_granted == 
DELETE_ACCESS) 
+   (access_granted  
DELETE_ACCESS) 

can_delete_file_in_directory(conn, path)) {
/* Were we trying to do a stat 
open
 * for delete and didn't get 
DELETE
@@ -465,10 +483,14 @@ static NTSTATUS open_file(files_struct *fsp,
 * 
http://blogs.msdn.com/oldnewthing/archive/2004/06/04/148426.aspx
 * for details. */
 
-   DEBUG(10,(open_file: overrode 
ACCESS_DENIED 
+   access_granted = 
~DELETE_ACCESS;
+
+   DEBUG(10,(open_file: overrode 
DELETE_ACCESS 
on file %s\n,
path ));
-   } else {
+   }
+
+   if (access_granted != 0) {
DEBUG(10, (open_file: Access 
denied on 
file %s\n,
path));


-- 

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

2009-03-12 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  7bc42dc7ca39b84ce9ea20c422a9ef4463df9917 (commit)
  from  969f2aa114f8ede44c3e56ca52ce2d4b70e709ba (commit)

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


- Log -
commit 7bc42dc7ca39b84ce9ea20c422a9ef4463df9917
Author: Jeremy Allison j...@samba.org
Date:   Thu Mar 12 10:57:43 2009 -0700

Add simple POSIX open, mkdir and rmdir test.
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source/torture/torture.c b/source/torture/torture.c
index bc09e6b..b62d7f0 100644
--- a/source/torture/torture.c
+++ b/source/torture/torture.c
@@ -4155,6 +4155,119 @@ static bool run_opentest(int dummy)
return correct;
 }
 
+/*
+  Test POSIX open /mkdir calls.
+ */
+static bool run_simple_posix_open_test(int dummy)
+{
+   static struct cli_state *cli1;
+   const char *fname = \\posix.file;
+   const char *dname = \\posix.dir;
+   uint16 major, minor;
+   uint32 caplow, caphigh;
+   int fnum1;
+   bool correct = false;
+
+   printf(Starting simple POSIX open test\n);
+
+   if (!torture_open_connection(cli1, 0)) {
+   return false;
+   }
+
+   cli_sockopt(cli1, sockops);
+
+   if (!SERVER_HAS_UNIX_CIFS(cli1)) {
+   printf(Server doesn't support UNIX CIFS extensions.\n);
+   return false;
+   }
+
+   if (!cli_unix_extensions_version(cli1, major,
+   minor, caplow, caphigh)) {
+   printf(Server didn't return UNIX CIFS extensions.\n);
+   return false;
+   }
+
+   if (!cli_set_unix_extensions_capabilities(cli1,
+   major, minor, caplow, caphigh)) {
+   printf(Server doesn't support setting UNIX CIFS 
extensions.\n);
+   return false;
+}
+
+   cli_setatr(cli1, fname, 0, 0);
+   cli_posix_unlink(cli1, fname);
+   cli_setatr(cli1, dname, 0, 0);
+   cli_posix_rmdir(cli1, dname);
+
+   /* Create a directory. */
+   if (cli_posix_mkdir(cli1, dname, 0777) == -1) {
+   printf(Server doesn't support setting UNIX CIFS 
extensions.\n);
+   goto out;
+   }
+
+   fnum1 = cli_posix_open(cli1, fname, O_RDWR|O_CREAT|O_EXCL, 0600);
+   if (fnum1 == -1) {
+   printf(POSIX create of %s failed (%s)\n, fname, 
cli_errstr(cli1));
+   goto out;
+   }
+
+   if (!cli_close(cli1, fnum1)) {
+   printf(close failed (%s)\n, cli_errstr(cli1));
+   goto out;
+   }
+
+   /* Now open the file again for read only. */
+   fnum1 = cli_posix_open(cli1, fname, O_RDONLY, 0);
+   if (fnum1 == -1) {
+   printf(POSIX open of %s failed (%s)\n, fname, 
cli_errstr(cli1));
+   goto out;
+   }
+
+   /* Now unlink while open. */
+   if (!cli_posix_unlink(cli1, fname)) {
+   printf(POSIX unlink of %s failed (%s)\n, fname, 
cli_errstr(cli1));
+   goto out;
+   }
+
+   if (!cli_close(cli1, fnum1)) {
+   printf(close(2) failed (%s)\n, cli_errstr(cli1));
+   goto out;
+   }
+
+   /* Ensure the file has gone. */
+   fnum1 = cli_posix_open(cli1, fname, O_RDONLY, 0);
+   if (fnum1 != -1) {
+   printf(POSIX open of %s succeeded, should have been 
deleted.\n, fname);
+   goto out;
+   }
+
+   if (!cli_posix_rmdir(cli1, dname)) {
+   printf(POSIX rmdir failed (%s)\n, cli_errstr(cli1));
+   goto out;
+   }
+
+   printf(Simple POSIX open test passed\n);
+   correct = true;
+
+  out:
+
+   if (fnum1 != -1) {
+   cli_close(cli1, fnum1);
+   fnum1 = -1;
+   }
+
+   cli_setatr(cli1, fname, 0, 0);
+   cli_posix_unlink(cli1, fname);
+   cli_setatr(cli1, dname, 0, 0);
+   cli_posix_rmdir(cli1, dname);
+
+   if (!torture_close_connection(cli1)) {
+   correct = false;
+   }
+
+   return correct;
+}
+
+
 static uint32 open_attrs_table[] = {
FILE_ATTRIBUTE_NORMAL,
FILE_ATTRIBUTE_ARCHIVE,
@@ -5414,6 +5527,7 @@ static struct {
{RW2,  run_readwritemulti, FLAG_MULTIPROC},
{RW3,  run_readwritelarge, 0},
{OPEN, run_opentest, 0},
+   {POSIX, run_simple_posix_open_test, 0},
 #if 1
{OPENATTR, run_openattrtest, 0},
 #endif


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-301-ga84f939

2009-03-12 Thread Tim Prouty
The branch, master has been updated
   via  a84f939f4f90b829515808eed203cc6a32b4d8ae (commit)
  from  5c63388f63028af9bac2acb2ef0a38736278823b (commit)

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


- Log -
commit a84f939f4f90b829515808eed203cc6a32b4d8ae
Author: Tim Prouty tpro...@samba.org
Date:   Thu Mar 12 10:44:36 2009 -0700

tevent: Fix might be unitialized warning

---

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


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index a9e18c3..867cfc0 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -457,7 +457,7 @@ int _tevent_loop_until(struct tevent_context *ev,
   void *private_data,
   const char *location)
 {
-   int ret;
+   int ret = 0;
void *nesting_stack_ptr = NULL;
 
ev-nesting.level++;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-302-gb6616ca

2009-03-12 Thread Tim Prouty
The branch, master has been updated
   via  b6616ca8dc263da648b980ed7f18d88f850293d0 (commit)
  from  a84f939f4f90b829515808eed203cc6a32b4d8ae (commit)

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


- Log -
commit b6616ca8dc263da648b980ed7f18d88f850293d0
Author: Dan Sledz dan.sl...@isilon.com
Date:   Wed Mar 11 23:27:01 2009 +

s3 pdb_wbc_sam: LookupRids should return sAMAccountName, not NT4 names

Also fix an incorrect TALLOC_FREE

---

Summary of changes:
 source3/passdb/pdb_wbc_sam.c |   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/pdb_wbc_sam.c b/source3/passdb/pdb_wbc_sam.c
index d2c7fda..e8116d0 100644
--- a/source3/passdb/pdb_wbc_sam.c
+++ b/source3/passdb/pdb_wbc_sam.c
@@ -150,7 +150,6 @@ static NTSTATUS pdb_wbc_sam_lookup_rids(struct pdb_methods 
*methods,
NTSTATUS result = NT_STATUS_OK;
char *domain = NULL;
char **account_names = NULL;
-   char name[256];
enum lsa_SidType *attr_list = NULL;
int i;
 
@@ -168,16 +167,19 @@ static NTSTATUS pdb_wbc_sam_lookup_rids(struct 
pdb_methods *methods,
if (attrs[i] == SID_NAME_UNKNOWN) {
names[i] = NULL;
} else {
-   snprintf(name, sizeof(name), %s%c%s, domain,
-*lp_winbind_separator(), account_names[i]);
-   names[i] = talloc_strdup(names, name);
+   names[i] = talloc_strdup(names, account_names[i]);
+   if (names[i] == NULL) {
+   result = NT_STATUS_NO_MEMORY;
+   goto done;
+   }
+
}
}
 
 done:
TALLOC_FREE(account_names);
TALLOC_FREE(domain);
-   TALLOC_FREE(attrs);
+   TALLOC_FREE(attr_list);
return result;
 }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-303-gbace42d

2009-03-12 Thread Tim Prouty
The branch, master has been updated
   via  bace42d586f2e4364e5b66ccc80a0b19749b5e1c (commit)
  from  b6616ca8dc263da648b980ed7f18d88f850293d0 (commit)

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


- Log -
commit bace42d586f2e4364e5b66ccc80a0b19749b5e1c
Author: Tim Prouty tpro...@samba.org
Date:   Thu Mar 12 16:51:20 2009 -0700

s3 torture: Fix unitialized variable to avoid closing a random fnum

---

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


Changeset truncated at 500 lines:

diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 10e541f..64dfb52 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -4160,7 +4160,7 @@ static bool run_simple_posix_open_test(int dummy)
const char *dname = \\posix.dir;
uint16 major, minor;
uint32 caplow, caphigh;
-   int fnum1;
+   int fnum1 = -1;
bool correct = false;
 
printf(Starting simple POSIX open test\n);


-- 
Samba Shared Repository


Build status as of Fri Mar 13 00:00:02 2009

2009-03-12 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-03-12 
00:00:27.0 +
+++ /home/build/master/cache/broken_results.txt 2009-03-13 00:00:31.0 
+
@@ -1,4 +1,4 @@
-Build status as of Thu Mar 12 00:00:02 2009
+Build status as of Fri Mar 13 00:00:02 2009
 
 Build counts:
 Tree Total  Broken Panic 
@@ -7,7 +7,7 @@
 ctdb 0  0  0 
 distcc   0  0  0 
 ldb  28 28 0 
-libreplace   28 10 0 
+libreplace   27 10 0 
 lorikeet-heimdal 25 12 0 
 pidl 20 2  0 
 ppp  13 0  0 
@@ -15,9 +15,9 @@
 samba-docs   0  0  0 
 samba-gtk5  5  0 
 samba_3_X_devel 27 24 0 
-samba_3_X_test 26 22 1 
-samba_4_0_test 28 27 0 
-smb-build27 4  0 
+samba_3_X_test 26 24 0 
+samba_4_0_test 28 27 2 
+smb-build26 4  0 
 talloc   28 28 0 
-tdb  27 8  0 
+tdb  28 8  0 
 


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

2009-03-12 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  c8f001f9f4860c333b9c49c6e47e4be930b095da (commit)
  from  7bc42dc7ca39b84ce9ea20c422a9ef4463df9917 (commit)

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


- Log -
commit c8f001f9f4860c333b9c49c6e47e4be930b095da
Author: Tim Prouty tpro...@samba.org
Date:   Thu Mar 12 17:08:54 2009 -0700

s3 torture: Fix unitialized variable to avoid closing a random fnum

---

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


Changeset truncated at 500 lines:

diff --git a/source/torture/torture.c b/source/torture/torture.c
index b62d7f0..55b7673 100644
--- a/source/torture/torture.c
+++ b/source/torture/torture.c
@@ -4165,7 +4165,7 @@ static bool run_simple_posix_open_test(int dummy)
const char *dname = \\posix.dir;
uint16 major, minor;
uint32 caplow, caphigh;
-   int fnum1;
+   int fnum1 = -1;
bool correct = false;
 
printf(Starting simple POSIX open test\n);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-304-ge5136e9

2009-03-12 Thread Jeremy Allison
The branch, master has been updated
   via  e5136e984922570ce9992c642c340dd3e937fc4e (commit)
  from  bace42d586f2e4364e5b66ccc80a0b19749b5e1c (commit)

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


- Log -
commit e5136e984922570ce9992c642c340dd3e937fc4e
Author: Jeremy Allison j...@samba.org
Date:   Thu Mar 12 17:59:24 2009 -0700

Remove the static struct client_connection mess which is part of
the problem that stops libsmbclient being thread safe. Subsidiary
DFS connections are now hung off a list inside the cli_state struct.
Much more to do in order to get libsmbclient to thread safety, but
this is a good start.
Jeremy.

---

Summary of changes:
 source3/client/client.c|   22 +++---
 source3/include/client.h   |7 ++
 source3/include/proto.h|4 +-
 source3/lib/netapi/cm.c|   28 +---
 source3/libsmb/clidfs.c|  162 +++-
 source3/libsmb/clientgen.c |   28 +++-
 source3/libsmb/clilist.c   |5 +-
 7 files changed, 117 insertions(+), 139 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/client.c b/source3/client/client.c
index aaa9e35..6491f39 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1419,7 +1419,7 @@ static bool do_altname(const char *name)
 
 static int cmd_quit(void)
 {
-   cli_cm_shutdown();
+   cli_shutdown(cli);
exit(0);
/* NOTREACHED */
return 0;
@@ -1714,7 +1714,7 @@ static int do_put(const char *rname, const char *lname, 
bool reput)
}
 
if (f == x_stdin) {
-   cli_cm_shutdown();
+   cli_shutdown(cli);
exit(0);
}
 
@@ -3815,7 +3815,7 @@ static int cmd_logon(void)
 
 static int cmd_list_connect(void)
 {
-   cli_cm_display();
+   cli_cm_display(cli);
return 0;
 }
 
@@ -4526,7 +4526,7 @@ static int process(const char *base_directory)
if (base_directory  *base_directory) {
rc = do_cd(base_directory);
if (rc) {
-   cli_cm_shutdown();
+   cli_shutdown(cli);
return rc;
}
}
@@ -4537,7 +4537,7 @@ static int process(const char *base_directory)
process_stdin();
}
 
-   cli_cm_shutdown();
+   cli_shutdown(cli);
return rc;
 }
 
@@ -4568,7 +4568,7 @@ static int do_host_query(const char *query_host)
/* Workgroups simply don't make sense over anything
   else but port 139... */
 
-   cli_cm_shutdown();
+   cli_shutdown(cli);
cli = cli_cm_open(talloc_tos(), NULL,
query_host, IPC$, true, smb_encrypt,
max_protocol, 139, name_type);
@@ -4581,7 +4581,7 @@ static int do_host_query(const char *query_host)
 
list_servers(lp_workgroup());
 
-   cli_cm_shutdown();
+   cli_shutdown(cli);
 
return(0);
 }
@@ -4609,14 +4609,14 @@ static int do_tar_op(const char *base_directory)
if (base_directory  *base_directory)  {
ret = do_cd(base_directory);
if (ret) {
-   cli_cm_shutdown();
+   cli_shutdown(cli);
return ret;
}
}
 
ret=process_tar();
 
-   cli_cm_shutdown();
+   cli_shutdown(cli);
 
return(ret);
 }
@@ -4663,12 +4663,12 @@ static int do_message_op(struct user_auth_info 
*auth_info)
 
if (!cli_session_request(cli, calling, called)) {
d_printf(session request failed\n);
-   cli_cm_shutdown();
+   cli_shutdown(cli);
return 1;
}
 
send_message(get_cmdline_auth_info_username(auth_info));
-   cli_cm_shutdown();
+   cli_shutdown(cli);
 
return 0;
 }
diff --git a/source3/include/client.h b/source3/include/client.h
index 646d54a..eae22fd 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -167,6 +167,10 @@ struct smb_trans_enc_state {
 };
 
 struct cli_state {
+   /**
+* A list of subsidiary connections for DFS.
+*/
+struct cli_state *prev, *next;
int port;
int fd;
/* Last read or write error. */
@@ -276,6 +280,9 @@ struct cli_state {
 * chained async_req.
 */
struct cli_request *chain_accumulator;
+
+   /* Where (if anywhere) this is mounted under DFS. */
+   char *dfs_mountpoint;
 };
 
 typedef struct file_info {
diff --git a/source3/include/proto.h b/source3/include/proto.h
index c8a066f..40024c5 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2355,7 +2355,6 @@ NTSTATUS cli_cm_force_encryption(struct cli_state *c,