Re: [Samba] Update/Repost: Kerberos works, but net ads join fails

2007-05-04 Thread Martin Zielinski

Hi!

Just to clearify previous posts about join problems:

Please make sure, that your /etc/hosts file contains the *long* name and
not only the short name.

E.g.: 10.10.12.1 mycomputer mycomputer.whatever.org

If the file only contains the short name, net will use the same name 
for the dNSHostName and the servicePrincipalName and than the ADS server

responses with an error.

~ Martin

Paolo Staboli schrieb:

I have same problem...

You have positive response ?

Paolo




--
Martin Zielinski [EMAIL PROTECTED]
Software Development
SEH Computertechnik GmbH www.seh.de

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


Re: [Samba] Device WinDfs error

2007-05-04 Thread Kevin Bailey

Jeremy Allison wrote:


On Sun, Apr 29, 2007 at 07:59:00PM +0100, Kevin Bailey wrote:
 


\Device\WinDfs\H:00186bf9\psctpdc\bpeters\thunderbird\ImapMail\10.1.1.10\INBOX.msf
The data has been lost.
This error may be caused by a failure of your computer hardware or 
network connection.


[2007/04/23 14:38:26, 0] lib/util_sock.c:write_data(562)
write_data: write failure in writing to client 10.1.1.144. Error 
Connection reset by peer

[2007/04/23 14:38:26, 0] lib/util_sock.c:send_smb(769)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2007/04/23 14:57:23, 0] lib/util_sock.c:read_data(534)
read_data: read failure for 4 bytes to client 10.1.1.144. Error = 
Connection timed out
   



Your tcp connection failed. We (smbd) don't know why.

Check your networking hardware + cables.

Jeremy.
 




Thanks for the reply.

This error has occured since we upgraded to Samba 3 but we also turned off 
roaming profiles at the same time.


Since the Thunderbird profile is now stored in the users H: drive and not being 
downloaded from the server to the PC at logon it sounds like Thunderbird is 
having a glitch.


(We don't want to turn profiles back on as loading the NTConfig.POL file gives 
us all the control we need).


Thanks again for all the hard work!

Kevin





Jeremy Allison wrote:


On Sun, Apr 29, 2007 at 07:59:00PM +0100, Kevin Bailey wrote:
 


\Device\WinDfs\H:00186bf9\psctpdc\bpeters\thunderbird\ImapMail\10.1.1.10\INBOX.msf
The data has been lost.
This error may be caused by a failure of your computer hardware or 
network connection.


[2007/04/23 14:38:26, 0] lib/util_sock.c:write_data(562)
write_data: write failure in writing to client 10.1.1.144. Error 
Connection reset by peer

[2007/04/23 14:38:26, 0] lib/util_sock.c:send_smb(769)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2007/04/23 14:57:23, 0] lib/util_sock.c:read_data(534)
read_data: read failure for 4 bytes to client 10.1.1.144. Error = 
Connection timed out
   



Your tcp connection failed. We (smbd) don't know why.

Check your networking hardware + cables.

Jeremy.
 



--
Kevin Bailey
IT Consultant

Email: [EMAIL PROTECTED]
Tel: 01752 268923
W: www.freewayprojects.com

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


[Samba] Problem when importing via tdbedit and then picking up NTConfig.POL

2007-05-04 Thread Kevin Bailey

Hi,

Just found this out - is it a bug which I should register or is this by design?

We had been running a Samba 2.2 server for a few years with a domain called PSCT 
- everybody very happy (well done guys!).  Installed a new server with Samba 3 
based on Debian Etch.  The new server was set as the domain PSCT2 to keep things 
clear.


Copied all data across to the new server. 

The new server has a tdbsam back end - and the accounts from the old server were 
imported using tdbedit (see man tdbedit) were imported.  So tdbedit was used to 
import the records from the smbpasswd file from the old server.


What happened was that the user accounts in the tdbsam database were set up with 
the old PSCT domain and not the domain of the new server which is PSCT2.  And 
tdbedit can not be used to change the Domain value.


The users logons would still work - but

but - when users logged on they would not pick up the NTConfig.POL file and 
load it.

What I had to do was to use smbpasswd to delete each account individually and 
then readd them.  It would then show that the acounts were now created with the 
PSCT2 domain value.


And NTConfig.POL would then be picked up.

(BTW - I used smbpasswd and not tdbedit to delete/add the accounts as using 
smbpasswd seemed to keep the original UID at the end of the SID.  Maybe it was 
picking up something from /etc/passwd. This helped because it meant the users 
used the same local profile on their PC's as when they forst logged on to the 
new server/domain.  BTW - profiles are not used).


Is this something I should register as a bug or is it by design?

Kevin
**

--
Kevin Bailey
IT Consultant

Email: [EMAIL PROTECTED]
Tel: 01752 268923
W: www.freewayprojects.com

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


R: R: R: [Samba] duplicate group in NET GROUPMAP LIST (almost solved)

2007-05-04 Thread Gianluca Culot
 -Messaggio originale-
 Da: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 conto di John H Terpstra
 Inviato: giovedì 3 maggio 2007 2.28
 A: samba@lists.samba.org
 Oggetto: Re: R: R: [Samba] duplicate group in NET GROUPMAP LIST


 On Wednesday 02 May 2007 10:21, Gianluca Culot wrote:
   -Messaggio originale-
   Da: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]
   conto di Gianluca Culot
   Inviato: mercoledì 2 maggio 2007 15.09
   A: samba@lists.samba.org
   Oggetto: R: R: [Samba] duplicate group in NET GROUPMAP LIST
  
-Messaggio originale-
Da: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
conto di John H Terpstra
Inviato: mercoledì 2 maggio 2007 14.56
A: samba@lists.samba.org
Oggetto: Re: R: [Samba] duplicate group in NET GROUPMAP LIST
   
On Wednesday 02 May 2007 07:40, Gianluca Culot wrote:
 ...

   the strange fact is the Domain Users appear to have a TWO sids
   Domain Users (S-1-5-21-531635747-2076120898-3807014553-2801)
   Domain Users (S-1-5-21-531635747-2076120898-3807014553-513)
  
   The first appear to be correctly mapped to the local
 users group
   the latter has no mapping (-1)
  
   that's to me appeares really odd
  
   Can somebody explain me this old fact ?
  
   My actual Samba server (with smtp, pop3, wibind, sshd,
   
apache21) works
   
   perefctly and every user can authenticate correctly on every
 
  service with
 
   his/her own AD domain user and password
  
   Any Hint?
   PLEASE !?!
 
  Execute
   net groupmap cleanup
 
  then reset your mappings.
 
  - John T.
  --
  To unsubscribe from this list go to the following URL
 and read the
  instructions:  https://lists.samba.org/mailman/listinfo/samba

 Looks loke
 net groupmap cleanup
 has no effect on my system

 here is the copy of action from my terminal

 mail# /home  net groupmap delete ntgroup=domain users
 Sucessfully removed domain users from the mapping db

 mail# /home  net groupmap list
 System Operators (S-1-5-32-549) - -1
 Domain Guests (S-1-5-21-531635747-2076120898-3807014553-514) - -1
 Replicators (S-1-5-32-552) - -1
 Guests (S-1-5-32-546) - -1
 BUILTIN (S-1-5-21-531635747-2076120898-3807014553-2001) - 500
 Domain Guests (S-1-5-21-531635747-2076120898-3807014553-132069)
   
- nobody
   
 Power Users (S-1-5-32-547) - -1
 Print Operators (S-1-5-32-550) - -1
 Administrators (S-1-5-32-544) - -1
 Account Operators (S-1-5-32-548) - -1
 Domain Users
 (S-1-5-21-531635747-2076120898-3807014553-3001) - 1000
 Domain Admins (S-1-5-21-531635747-2076120898-3807014553-1001) -
 wheel Backup Operators (S-1-5-32-551) - -1
 Users (S-1-5-32-545) - -1
 Domain Users (S-1-5-21-531635747-2076120898-3807014553-513) - -1
 Domain Admins (S-1-5-21-531635747-2076120898-3807014553-512) - -1

 mail# /home  net groupmap cleanup
 Group Domain Guests is not mapped
 Group Domain Users is not mapped
 Group Domain Admins is not mapped

 mail# /home  net groupmap add ntgroup=Domain Users
  
   unixgroup=users
  
 type=b
 No rid or sid specified, choosing algorithmic mapping
 Successfully added group Domain Users to the mapping db

 mail# /home  net groupmap list
 System Operators (S-1-5-32-549) - -1
 Domain Guests (S-1-5-21-531635747-2076120898-3807014553-514) - -1
 Replicators (S-1-5-32-552) - -1
 Domain Users
 (S-1-5-21-531635747-2076120898-3807014553-2801) - users
 Guests (S-1-5-32-546) - -1
 BUILTIN (S-1-5-21-531635747-2076120898-3807014553-2001) - 500
 Domain Guests (S-1-5-21-531635747-2076120898-3807014553-132069)
   
- nobody
   
 Power Users (S-1-5-32-547) - -1
 Print Operators (S-1-5-32-550) - -1
 Administrators (S-1-5-32-544) - -1
 Account Operators (S-1-5-32-548) - -1
 Domain Users
 (S-1-5-21-531635747-2076120898-3807014553-3001) - 1000
 Domain Admins (S-1-5-21-531635747-2076120898-3807014553-1001) -
 wheel Backup Operators (S-1-5-32-551) - -1
 Users (S-1-5-32-545) - -1
 Domain Users (S-1-5-21-531635747-2076120898-3807014553-513) - -1
 Domain Admins (S-1-5-21-531635747-2076120898-3807014553-512) - -1
 mail# /home 

 Maybe Domain Users is NOT to be mapped ?
 is of any use mapping Domain Users and Users ? I would say YES
   
as I want to
   
 set permissions based on AD groups
   
What version of Samba do you have?
   
For now, stop Samba, remove the group_mapping,tdb file,
 then remap your
groups. In the long run suggest you update to the latest release.
   
- John T.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba
  
   Sorry... I forgot
  
   I'm running Samba 3.0.14a
  
   mail# /home  

Re: [Samba] Problem with printer drivers downloading

2007-05-04 Thread Marc Muehlfeld
Hi,

Karl Banasky schrieb:
 ... I get a message that the
 drivers cannot be found.  looking in the logs I see a permissions error
 but I cannot for the life of me see why I get that.

 [print$]
 comment = Printer Drivers
 path = /share/scripts/cups/drivers
 browseable = yes
 #Valid users = @Domain Users, @Domain Admins
 guest ok = yes
 read only = yes
 write list = karl, @Domain Admins

What are the permissions on /share/scripts/cups/drivers? The user must
have the change to read this files. Maybe there are some permission
problems with higher levels directories in your case, too.

These are the permissions on my Printer Driver share:

# ls -lad /shares/Printer/
drwxrwsr-x  4 root Print Operators 4096 2006-10-02 13:33 /shares/Printer/



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


[Samba] Problem with dfs-share and hidden directory

2007-05-04 Thread Holger Biber
Hallo,

I'm using samba 3.0.20b-3.11-SUSE on a SLES-based system.
My system has two NICs in this configuration
eth0  Protokoll:Ethernet  Hardware Adresse 00:0A:5E:24:xx:xx
  inet Adresse:172.16.0.2  Bcast:172.16.255.255  Maske:255.255.0.0

eth1  Protokoll:Ethernet  Hardware Adresse 00:0A:5E:1B:xx:xx
  inet Adresse:172.18.160.11  Bcast:172.18.255.255 Maske:255.255.224.0

eth0 points to the internal network with several WinXP(pro) clients, eth1
points to a dmz with an Windows2003 server (IP: 172.18.160.10) with
several shares. I want to distribute some of these shares to the
WinXP-clients in my network.
I've modified smb.conf as mentioned in the docs and HowTos, made the
links to the dfsroot.

Here's my smb.conf:

[global]
  
  host msdfs = yes
  

[agbschueler]
  browsable = no
  msdfs root = yes
  comment = Schueler-Bereich im AGB-LAN
  msdfs proxy = \172.18.160.11\schueler
  path = /export/dfsroot
  valid users = @teachers

[agblehrer]
  browsable = no
  msdfs root = yes
  comment = Lehrer-Bereich im AGB-LAN
  msdfs proxy = \172.18.160.11\lehrer$\_lehrerbereich_
  path = /export/dfsroot
  valid users = @teachers

[agbhome]
  browsable = no
  msdfs root = yes
  comment = HOME im AGB-LAN
  msdfs proxy = \172.18.160.11\%U$
  path = /export/dfsroot
  valid users = @teachers


The shares agbschueler and agblehrer work very fine, i.e. no problem.
But when trying to connect to agbhome the user is prompted for a login
and password. But with correct login/password the share wasn't connected.

admin:~ # ls -lgG /export/dfsroot/
lrwxrwxrwx  1  20 2007-03-28 09:36 home - msdfs:172.18.160.10\
lrwxrwxrwx  1  43 2007-02-04 11:44 lehrer -
   msdfs:172.18.160.10\lehrer$\_Lehrerbereich_
lrwxrwxrwx  1  28 2007-03-28 09:35 schueler - msdfs:172.18.160.10\schueler


Thanks for any hints why agbhome couldn't be connected.
Bye
Holger


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


[Samba] strict allocate = no does not work

2007-05-04 Thread Markus Knapp
Hi!

I've got Debian 4.0 on an NSLU2 with Samba. The system is on an
USB-Stick, the Samba share is on an USB-Disk.

Copying files to the samba share make some problems here.
I get a large delay before the transfer starts and I get timeouts with
files larger than 150MB.
I found out, that samba is writing a dump file on the disc before the
transfer starts, which causes the delay/timeout. This should be the
right behaviour if strict allocate = yes is set, but my samba runs
with defaults which means strict allocate = no.
Is there another setting in samba which can cause this effect?

Here is my testparm -v:

Load smb config files from /etc/samba/smb.conf
Processing section [Netzlaufwerk]
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
 dos charset = CP850
 unix charset = UTF-8
 display charset = LOCALE
 workgroup = UNDERWORLD
 realm =
 netbios name = AMELIA
 netbios aliases =
 netbios scope =
 server string = %h server
 interfaces =
 bind interfaces only = No
 security = SHARE
 auth methods =
 encrypt passwords = Yes
 update encrypted = No
 client schannel = Auto
 server schannel = Auto
 allow trusted domains = Yes
 map to guest = Never
 null passwords = No
 obey pam restrictions = Yes
 password server = *
 smb passwd file = /etc/samba/smbpasswd
 private dir = /etc/samba
 passdb backend = tdbsam
 algorithmic rid base = 1000
 root directory =
 guest account = nobody
 enable privileges = Yes
 pam password change = No
 passwd program = /usr/bin/passwd %u
 passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
 passwd chat debug = No
 passwd chat timeout = 2
 check password script =
 username map =
 password level = 0
 username level = 0
 unix password sync = No
 restrict anonymous = 0
 lanman auth = Yes
 ntlm auth = Yes
 client NTLMv2 auth = No
 client lanman auth = Yes
 client plaintext auth = Yes
 preload modules =
 use kerberos keytab = No
 log level = 0
 syslog = 0
 syslog only = No
 log file = /var/log/samba/log.%m
 max log size = 1000
 debug timestamp = Yes
 debug hires timestamp = No
 debug pid = No
 debug uid = No
 enable core files = Yes
 smb ports = 445 139
 large readwrite = Yes
 max protocol = NT1
 min protocol = CORE
 read bmpx = No
 read raw = Yes
 write raw = Yes
 disable netbios = No
 reset on zero vc = No
 acl compatibility = auto
 defer sharing violations = Yes
 nt pipe support = Yes
 nt status support = Yes
 announce version = 4.9
 announce as = NT
 max mux = 50
 max xmit = 16644
 name resolve order = lmhosts wins host bcast
 max ttl = 259200
 max wins ttl = 518400
 min wins ttl = 21600
 time server = No
 unix extensions = Yes
 use spnego = Yes
 client signing = auto
 server signing = No
 client use spnego = Yes
 enable asu support = No
 svcctl list =
 deadtime = 0
 getwd cache = Yes
 keepalive = 300
 kernel change notify = Yes
 fam change notify = Yes
 lpq cache time = 30
 max smbd processes = 0
 paranoid server security = Yes
 max disk size = 0
 max open files = 1
 open files database hash size = 10007
 socket options = TCP_NODELAY
 use mmap = Yes
 hostname lookups = No
 name cache timeout = 660
 load printers = Yes
 printcap cache time = 750
 printcap name =
 cups server =
 iprint server =
 disable spoolss = No
 addport command =
 enumports command =
 addprinter command =
 deleteprinter command =
 show add printer wizard = Yes
 os2 driver map =
 mangling method = hash2
 mangle prefix = 1
 max stat cache size = 0
 stat cache = Yes
 machine password timeout = 604800
 add user script =
 rename user script =
 delete user script =
 add group script =
 delete group script =
 add user to group script =
 delete user from group script =
 set primary group script =
 add machine script =
 shutdown script =
 abort shutdown script =
 username map script =
 logon script =
 logon path = \\%N\%U\profile
 logon drive =
 logon home = \\%N\%U
 domain logons = No
 os level = 20
 lm announce = Auto
 lm interval = 60
 preferred master = Auto
 local master = Yes
 domain master = Auto
 browse list = Yes
 enhanced browsing = Yes
 dns proxy = No
 wins proxy = No
 wins server =
 wins support = No
 wins hook =
 kernel oplocks = Yes
 lock spin count = 3
 lock spin time = 10
 oplock break wait time = 0
 ldap admin dn =
 ldap delete dn = No
 ldap group suffix =
 ldap idmap 

Re: [Samba] how to setup ldap for samba.

2007-05-04 Thread Adam Williams
 I am using the latest Samba ... RC3 release.
 I want to build a samba server to join existing windows domain controller.
 I know I have to build Samba with ADS enable. But I can't find any
 info for setting up ldap and kerberos for this integration.
 Can anyone please send me a link where I can refer to for building up
 Samba with Ldap and Kerberos in Linux or BSD or whatever other Unixs
 enviornment?

Gee, Hmmm, I don't know... maybe... 
http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/domain-member.html#ads-member

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


Re: [Samba] Can vista client can negotiage smb2 protocol with the samba server?

2007-05-04 Thread Aravinda Guzzar

Hi Andrew,

thank you very much for the information.

Is there any plans to backport smb 2.0 to the 3.0. releases of samba in
future?

What will be the repercussion of using Vista client which has smb
2.0protocol support aganist non Smb
2.0 server? Currently it Negotiates with the earlier version of the
protocol.

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


Re: [Samba] Old problem with get_file_version , Windows 2003 x64 (Jerry, you know this one!)

2007-05-04 Thread Alex Crow

On Mon, 2007-04-30 at 13:28 -0500, Gerald (Jerry) Carter wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Alex Crow wrote:
  Jerry, All,
  
  I am trying to get x64 drivers installed onto a Samba 3.0.24 server,
 
 Fixed in 3,.0.25.

Jerry,

I can upload the drivers now, but I cannot print to either a laserjet
5100 or 5200 printer from XP64/Server 2003 x64.  A test page fails with
the generic error The test page failed to print. I have attached a log
when opening the properties page for the printer, trying to print a test
page, and closing the dialog.

Cheers

Alex



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

[Samba] Re: mount windows xp share

2007-05-04 Thread Akemi Yagi
On Thu, 03 May 2007 14:27:53 +0300, Wael Yaseen wrote:

 Please how to share between Linux and  xp
  
 Please help me
 
 thanks

Take a look at this CentOS wiki page:

http://wiki.centos.org/TipsAndTricks/WindowsShares

Akemi


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


Re: [Samba] Can vista client can negotiage smb2 protocol with the samba server?

2007-05-04 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Aravinda Guzzar wrote:
 Hi Andrew,
 
 thank you very much for the information.
 
 Is there any plans to backport smb 2.0 to the 3.0. releases 
 of samba in future?


To clarify, Samba'4s SMB2 implementation is incomplete.  We will
implement SMB2 support in Samba 3 when it is absolutely necessary.

 What will be the repercussion of using Vista client which has smb
 2.0protocol support aganist non Smb
 2.0 server? Currently it Negotiates with the earlier version of the
 protocol.

There are no repercussions that we are aware of.  The Vista
clients simply negotiates NTLM 0.12 (like when connecting to
a Windows 2003 server).




cheers, jerry
=
Samba--- http://www.samba.org
Centeris ---  http://www.centeris.com
What man is a man who does not make the world better?  --Balian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGOzdFIR7qMdg1EfYRAmwYAJ45ySQoN2+354N3k2PhsNMEwh/BjgCg1XDZ
vKEuHw+WUdGl89Vc3YdaH7Y=
=3v4P
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Automatic printer download

2007-05-04 Thread stephen mulcahy
Hi Bjorn,

I blogged about this a while back at
http://blog.aplpi.com/index.php/2007/03/30/simple-samba-printserver-on-debian-gnulinux-40-etch/

That might help you.

-stephen

[EMAIL PROTECTED] wrote:
 Hallo!
 
 I am running samba-3.0.10-1.4E.11 on centOS. I want to enable the
 automatic printer download feature, but are running into problems.
 
 I have tried to work it out from samba by example, but since the automatic
 driver download is bundeled togehter with ldap (which I am not using),
 this does not get me anywhere.
 
 Can anyone direct me to a good howto on this - one that will make things
 work! I have found many howtos - but they are too incomplete and
 fragmented.
 
 Thanks!
 
 Sincerly,
 Bjorn
 
 

-- 
Stephen Mulcahy, Applepie Solutions Ltd., Innovation in Business Center,
GMIT, Dublin Rd, Galway, Ireland.  +353.91.751262  http://www.aplpi.com
Registered in Ireland, no. 289353 (5 Woodlands Avenue, Renmore, Galway)
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Server String not taking affect

2007-05-04 Thread Dennis McLeod

Chris Smith wrote:

On Thursday 03 May 2007, Will Holmes wrote:

Changing the Server String option in the smb.conf does not change this
text, but only changes what is displayed when browsing the domain from
network neighborhood.


I think the server string tattoos the registry and you need to delete it 
before a new one will take effect.


Chris

Yes, it's the client caching the string in the registry. (At least on XP.)

http://readlist.com/lists/lists.samba.org/samba/2/12188.html

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


Re: [Samba] strict allocate = no does not work

2007-05-04 Thread James Peach

On 04/05/07, Markus Knapp [EMAIL PROTECTED] wrote:

Hi!

I've got Debian 4.0 on an NSLU2 with Samba. The system is on an
USB-Stick, the Samba share is on an USB-Disk.


If the filesystem some version of FAT? If so, FAT does not support
holey files, so  you will always get strict allocation.

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Mac - Filesystem Size Limit?

2007-05-04 Thread Michael Gasch
know prob on OSX - try to limit the share size on samba seen by OSX 
(1.9TB will do)


the list should have an old thread about that!

micha

Sean DiZazzo wrote:

We are on 10.4.x on brand new Intel macs.  We are mounting a samba
share that is approx 4.8TB, but only 1.9TB shows as the size of the
disk.

Is this a known limitation of samba on the Mac, or can it be fixed by
upgrading to a newer version of the client?

I found a bit of info stating that there _used_ to be a problem
(2004), but it would be fixed in the 10.4 series of MacOSX.

http://lists.apple.com/archives/Darwin-userlevel/2004/Jul/msg4.html

I couldn't find any other info.  Anybody have any ideas?

~Sean


--
Michael Gasch
Max Planck Institute for Evolutionary Anthropology
Department of Human Evolution (IT Staff)
Deutscher Platz 6
D-04103 Leipzig
Germany

Phone: 49 (0)341 - 3550 137
   49 (0)341 - 3550 374

Fax:   49 (0)341 - 3550 399

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


Re: [Samba] Can vista client can negotiage smb2 protocol with the samba server?

2007-05-04 Thread Jeremy Allison
On Fri, May 04, 2007 at 05:17:21PM +0530, Aravinda Guzzar wrote:
 Hi Andrew,
 
 thank you very much for the information.
 
 Is there any plans to backport smb 2.0 to the 3.0. releases of samba in
 future?

Probably.

 What will be the repercussion of using Vista client which has smb
 2.0protocol support aganist non Smb
 2.0 server? Currently it Negotiates with the earlier version of the
 protocol.

Vista uses SMB/CIFS if the server doesn't reply with SMB2.

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


[Samba] problems accessing printers by UNC path

2007-05-04 Thread Ray Klassen

Recently switched main samba servers and turned up a problem

CUPS printers are all published and can be connected to by browsing the 
server, but if, as I was used to doing, you connect by entering the UNC 
of the printer directly in the run dialog in windows. you get


\\server\printershare is not accessible. You might not have permission 
to use this network resource. Contact the administrator of this server 
to find out if you have access permissions


and the log on the samba box
says
printershare is not a valid printer name
couldn't find service printershare


I've set up lot's of samba boxes before and never seen this.


Non-printer UNC's work fine.

--
Ray Klassen
Computer SysAdmin
MCC Supportive Care Services
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] mount.cifs and sec=krb5

2007-05-04 Thread Ben Vaughan

Hello fellow Samba folks,

I am attempting to mount a cifs share on a RHEL 5 box using  
mount.cifs.  The server is another RHEL 5 box.  Both boxes are joined  
to the same Kerberos realm (AD).


I kinit to get my Kerberos tickets.

This is the mount command I'm using:

mount.cifs  //rhel5.server.iastate.edu/benvon ./mnt -o  
user=benvon,sec=krb5


This results in a password prompt, then a permission denied message  
(even if the password was correct).


The interesting thing to see is the log on the server (log level 10  
excerpt):


[2007/05/04 15:10:30, 3] smbd/sesssetup.c:reply_sesssetup_and_X(1010)
  sesssetupX:name=[]\[湥潶n䰀湩硵瘠牥楳湯㈠㘮 
ㄮⴸ⸸⸱⸱汥5䥃卆嘠卆䌠楬湥⁴潦⁲楌畮x]@ 
[129.186.196.8]

[2007/05/04 15:10:30, 6] param/loadparm.c:lp_file_list_changed(3001)
  lp_file_list_changed()
  file /etc/samba/smb.conf - /etc/samba/smb.conf  last mod_time:  
Fri May  4 10:59:44 2007


[2007/05/04 15:10:30, 5] auth/auth_util.c:make_user_info_map(161)
  make_user_info_map: Mapping user []\[湥潶n䰀湩硵瘠牥楳湯 
㈠㘮ㄮⴸ⸸⸱⸱汥5䥃卆嘠卆䌠楬湥⁴潦⁲楌畮x] from  
workstation [129.186.196.8]

[2007/05/04 15:10:30, 5] auth/auth_util.c:make_user_info(75)
  attempting to make a user_info for 湥潶n䰀湩硵瘠牥楳湯㈠ 
㘮ㄮⴸ⸸⸱⸱汥5䥃卆嘠卆䌠楬湥⁴潦⁲楌畮x (湥潶n 
䰀湩硵瘠牥楳湯㈠㘮ㄮⴸ⸸⸱⸱汥5䥃卆嘠卆䌠楬湥 
⁴潦⁲楌畮x)

[2007/05/04 15:10:30, 5] auth/auth_util.c:make_user_info(85)
  making strings for 湥潶n䰀湩硵瘠牥楳湯㈠㘮 
ㄮⴸ⸸⸱⸱汥5䥃卆嘠卆䌠楬湥⁴潦⁲楌畮x's user_info  
struct

[2007/05/04 15:10:30, 5] auth/auth_util.c:make_user_info(117)
  making blobs for 湥潶n䰀湩硵瘠牥楳湯㈠㘮ㄮⴸ⸸⸱⸱ 
汥5䥃卆嘠卆䌠楬湥⁴潦⁲楌畮x's user_info struct

[2007/05/04 15:10:30, 10] auth/auth_util.c:make_user_info(135)
  made an encrypted user_info for 湥潶n䰀湩硵瘠牥楳湯㈠㘮 
ㄮⴸ⸸⸱⸱汥5䥃卆嘠卆䌠楬湥⁴潦⁲楌畮x (湥潶n䰀 
湩硵瘠牥楳湯㈠㘮ㄮⴸ⸸⸱⸱汥5䥃卆嘠卆䌠楬湥⁴ 
潦⁲楌畮x)

[2007/05/04 15:10:30, 3] auth/auth.c:check_ntlm_password(221)
  check_ntlm_password:  Checking password for unmapped user []\[湥潶 
n䰀湩硵瘠牥楳湯㈠㘮ㄮⴸ⸸⸱⸱汥5䥃卆嘠卆䌠楬湥 
[EMAIL PROTECTED] with the new password interface

[2007/05/04 15:10:30, 3] auth/auth.c:check_ntlm_password(224)
  check_ntlm_password:  mapped user is: [IASTATE]\[湥潶n䰀湩硵 
瘠牥楳湯㈠㘮ㄮⴸ⸸⸱⸱汥5䥃卆嘠卆䌠楬湥⁴潦⁲ 
[EMAIL PROTECTED]



Yah

Anyway, when leaving off the sec=krb5 or setting sec=ntlmv2,  
everything works as expected.


smbclient -k works as expected.

Does anyone have any advice?  I can produce as much logging as may be  
needed.


If this isn't the proper place to be asking questions about  
mount.cifs, please redirect me.


Many Thanks,

Ben Vaughan, RHCE
Engineering Computing Support Services
Iowa State University
[EMAIL PROTECTED]
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Possible problem w/ 'idmap restore' under 3.0.25rc3

2007-05-04 Thread Don Meyer

Folks,

Maybe it's me, or my systems, but I've found that idmap restore 
simply doesn't work under samba-3.0.25rc3.


When I try to import the idmap.dump file I create from one of my 
older systems into a fresh 3.0.25rc3 installation, I get a huge 
stream of errors along the line of could not set mapping of 
(UID|GID) to sid x.   This happened whether I was using 
idmap_tdb or idmap_ldap.   The same idmap.dump file restores 
successfully on my other 3.0.23  3.0.24 systems.


I went further and used getent passwd to populate the system's 
idmap from the AD (while using idmap_tdb, BTW), and then ran the 'net 
idmap dump' command, which generated a file that looked fairly 
identical in structure to the idmap.dump file I got from the previous 
version.   Following this, I tried to 'net idmap restore' the idmap 
dump file I had just created, and received the same long string of 
errors.   Thus, I suspect there is something not quite right in the 
'net idmap restore' functionality...


Cheers,
-D


Don Meyer   [EMAIL PROTECTED]
Network Manager, ACES Academic Computing Facility
Technical System Manager, ACES TeleNet System
UIUC College of ACES, Information Technology and Communication Services

  They that can give up essential liberty to obtain a little 
temporary safety,
deserve neither liberty or safety. -- Benjamin Franklin, 1759 


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


Re: [Samba] mount.cifs and sec=krb5

2007-05-04 Thread simo
On Fri, 2007-05-04 at 15:17 -0500, Ben Vaughan wrote:
 Hello fellow Samba folks,
 
 I am attempting to mount a cifs share on a RHEL 5 box using  
 mount.cifs.  The server is another RHEL 5 box.  Both boxes are joined  
 to the same Kerberos realm (AD).
 
 I kinit to get my Kerberos tickets.
 
 This is the mount command I'm using:
 
 mount.cifs  //rhel5.server.iastate.edu/benvon ./mnt -o  
 user=benvon,sec=krb5

[..]

 Does anyone have any advice?  I can produce as much logging as may be  
 needed.

Ben, the kernel module do not yet support kerberos, that's the problem.

 If this isn't the proper place to be asking questions about  
 mount.cifs, please redirect me.

mount.cifs is fine, it is the kernel module that is still not complete
(wrt kerberos), you may ask info on the cifs module to
[EMAIL PROTECTED]

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: [EMAIL PROTECTED]
http://samba.org

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


Re: [Samba] Possible problem w/ 'idmap restore' under 3.0.25rc3

2007-05-04 Thread simo
On Fri, 2007-05-04 at 14:36 -0500, Don Meyer wrote:
 Folks,
 
 Maybe it's me, or my systems, but I've found that idmap restore 
 simply doesn't work under samba-3.0.25rc3.
 
 When I try to import the idmap.dump file I create from one of my 
 older systems into a fresh 3.0.25rc3 installation, I get a huge 
 stream of errors along the line of could not set mapping of 
 (UID|GID) to sid x.   This happened whether I was using 
 idmap_tdb or idmap_ldap.   The same idmap.dump file restores 
 successfully on my other 3.0.23  3.0.24 systems.
 
 I went further and used getent passwd to populate the system's 
 idmap from the AD (while using idmap_tdb, BTW), and then ran the 'net 
 idmap dump' command, which generated a file that looked fairly 
 identical in structure to the idmap.dump file I got from the previous 
 version.   Following this, I tried to 'net idmap restore' the idmap 
 dump file I had just created, and received the same long string of 
 errors.   Thus, I suspect there is something not quite right in the 
 'net idmap restore' functionality...

Can you please send me the output with the errors at debug level 10
(just add -d10 to the command)?
I will try to fix this in time for 3.0.25 final if possible.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: [EMAIL PROTECTED]
http://samba.org

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


Re: [Samba] mount.cifs and sec=krb5

2007-05-04 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ben,


 I am attempting to mount a cifs share on a RHEL 5 box using mount.cifs. 
 The server is another RHEL 5 box.  Both boxes are joined to the same
 Kerberos realm (AD).
 
 I kinit to get my Kerberos tickets.
 
 This is the mount command I'm using:
 
 mount.cifs  //rhel5.server.iastate.edu/benvon ./mnt -o user=benvon,sec=krb5

The cifs.ko krb5 support does not work right now.

You can find more details (inlcuding a list ot the
cifs client ml at http://linux-cifs.samba.org/

We're working on it.




cheers, jerry
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGO6GYIR7qMdg1EfYRAm1/AJ9VAHGTuTQKUcUQCAbrVGxVZzTdFACglbhH
lnfmt5e1T2aSi4oNnSnhjyQ=
=yMyD
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


RE: [Samba] mount.cifs and sec=krb5

2007-05-04 Thread Vaughan, Ben R [ECSS]
Thanks to simo and Jerry for their excellent responses.

Ben

Ben Vaughan, RHCE
Engineering Computing Support Services
Iowa State University
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gerald (Jerry) 
Carter
Sent: Friday, May 04, 2007 4:12 PM
To: Ben Vaughan
Cc: Samba
Subject: Re: [Samba] mount.cifs and sec=krb5

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ben,


 I am attempting to mount a cifs share on a RHEL 5 box using mount.cifs. 
 The server is another RHEL 5 box.  Both boxes are joined to the same
 Kerberos realm (AD).
 
 I kinit to get my Kerberos tickets.
 
 This is the mount command I'm using:
 
 mount.cifs  //rhel5.server.iastate.edu/benvon ./mnt -o user=benvon,sec=krb5

The cifs.ko krb5 support does not work right now.

You can find more details (inlcuding a list ot the
cifs client ml at http://linux-cifs.samba.org/

We're working on it.




cheers, jerry
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGO6GYIR7qMdg1EfYRAm1/AJ9VAHGTuTQKUcUQCAbrVGxVZzTdFACglbhH
lnfmt5e1T2aSi4oNnSnhjyQ=
=yMyD
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

[Samba] problems accessing printers by UNC path --Help!

2007-05-04 Thread Ray Klassen
Further. What's a concise way to describe this problem. It must have 
been encountered before. I usually google all of my issues and find 
answers that way. I don't even know what search terms would help me...




 Original Message 
Subject: [Samba] problems accessing printers by UNC path
Date: Fri, 04 May 2007 11:40:47 -0700
From: Ray Klassen [EMAIL PROTECTED]
To: samba@lists.samba.org

Recently switched main samba servers and turned up a problem

CUPS printers are all published and can be connected to by browsing the
server, but if, as I was used to doing, you connect by entering the UNC
of the printer directly in the run dialog in windows. you get

\\server\printershare is not accessible. You might not have permission
to use this network resource. Contact the administrator of this server
to find out if you have access permissions

and the log on the samba box
says
printershare is not a valid printer name
couldn't find service printershare


I've set up lot's of samba boxes before and never seen this.


Non-printer UNC's work fine.

--
Ray Klassen
Computer SysAdmin
MCC Supportive Care Services
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

--
Ray Klassen
Computer SysAdmin
MCC Supportive Care Services
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Strange file listing with mounted REV drive

2007-05-04 Thread Kevin Bailey

Hi,

A client has an Iomega REV drive installed on a PC and this is used for 
the off-site backups.  This drive has disks left in and then that drive 
on the PC is shared out.


I mount the share with

mount -t cifs //10.1.1.20/XP61REV /mnt/xp61 -o 
username=user,password=password,rw


and this is mounted on to a Debian Etch / Samba 3.0.24-6 machine.

Now when I 'ls' or 'find' this share it only returns 43 file names.  If 
I delete a couple files at the begining of the list (alphanumerically) 
then the next 43 are shown.


I need to delete all of the existing files on the share before I then 
copy across the latest backup copies.


To delete all of the files I run

# find /mnt/xp61 -type f -print0 | xargs -0 --max-args=1 -r --verbose 
/bin/rm
# find /mnt/xp61 -type f -print0 | xargs -0 --max-args=1 -r --verbose 
/bin/rm


several times to make sure all files have been deleted.

OK - so I have a workaround but thought this needed clarifying.

Cheers,

Kevin


--
Kevin Bailey
IT Consultant

Email: [EMAIL PROTECTED]
Tel: 01752 268923
W: www.freewayprojects.com

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


[Samba] v3.0.25-final?

2007-05-04 Thread Guillermo Gutierrez
How close are we to seeing the final release of samba 3.0.25?

 

Guillermo Gutierrez

Network Administrator

Market Scan Information Systems, Inc.

(818) 575-2017

[EMAIL PROTECTED]

 

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


Re: [Samba] v3.0.25-final?

2007-05-04 Thread Res

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 4 May 2007, Guillermo Gutierrez wrote:


How close are we to seeing the final release of samba 3.0.25?


about a week






Guillermo Gutierrez

Network Administrator

Market Scan Information Systems, Inc.

(818) 575-2017

[EMAIL PROTECTED]



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



- -- 


Cheers
Res

Vote for your favourite MTA at  http://polls.ausics.net/v3.php
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGO7RHsWhAmSIQh7MRApsBAJ9LjdqOW+lzWEBjjlcYcGheoYH+gwCcCCnd
G+AWj7oKDlN/WwE9YzQENGM=
=I4xD
-END PGP SIGNATURE-
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] v3.0.25-final?

2007-05-04 Thread simo
On Fri, 2007-05-04 at 15:23 -0700, Guillermo Gutierrez wrote:
 How close are we to seeing the final release of samba 3.0.25?
 

  From: 
Gerald (Jerry) Carter
[EMAIL PROTECTED]
To: 
[EMAIL PROTECTED]
   Subject: 
Samba 3.0.25 and 3.0.26 updates
  Date: 
Fri, 04 May 2007 16:44:19 -0500
(17:44 EDT)
Mailer: 
Thunderbird 1.5.0.10
(X11/20070306)


Just some updates on what's going on before the weekend.

* SAMBA_3_0_RELEASE is 3.0.25 final.  There will
  be a few more minor changes  but right now I'm
  not inclined to do another RC4 in spite of the
  rather large diff between 3.0.25rc3 and the
  release tree.  Release is planned for May 14.

* The SAMBA_3_0_26 svn branch has been created and is
  now open for general developer churn.  The tree will
  be open for major changes until June 4.  After that
  we'll start locking down and moving towards a
  stable release in July.

* The SAMBA_3_0_26.bzr svn mirror has been pushed out
  to the normal place http://www.samba.org/~jerry/bzr/



-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: [EMAIL PROTECTED]
http://samba.org

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


Re: [Samba] Possible problem w/ 'idmap restore' under 3.0.25rc3

2007-05-04 Thread simo
On Fri, 2007-05-04 at 14:36 -0500, Don Meyer wrote:
 Folks,
 
 Maybe it's me, or my systems, but I've found that idmap restore 
 simply doesn't work under samba-3.0.25rc3.

True, 1 line fix here:
http://websvn.samba.org/cgi-bin/viewcvs.cgi/branches/SAMBA_3_0_25/source/nsswitch/winbindd_async.c?rev=22677r1=22675r2=22677

Sorry for the problem, this slipped through during recent patches to fix
the sid checking layer violation and the idmap offline code.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: [EMAIL PROTECTED]
http://samba.org

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


Re: [Samba] Possible problem w/ 'idmap restore' under 3.0.25rc3

2007-05-04 Thread Don Meyer

At 06:00 PM 5/4/2007, simo wrote:

Sorry for the problem, this slipped through during recent patches to fix
the sid checking layer violation and the idmap offline code.



No problem.

I may have another for you, however.   This patch enables me to 
successfully restore when using a tdb backend.  However, when using 
idmap_ldap, it seems that winbind is opening a connection to the ldap 
server and not closing it for many updates/queries.


When I try 'net idmap restore' when using idmap_ldap, the command 
will plug away until the ldap server starts complaining accept(8) 
failed errno=24 (Too many open files).   netstat -aln shows around 
1000 open connections from winbind on another system. (The one with 3.0.25rc3+)


When watching netstat on the ldap server system, each query to 
winbind that one would expect it to talk to the ldap server generates 
a new TCP session which hangs around until winbind is 
restarted.  (Granted, I have not wait more than 10 minutes yet, but 
this seems a bit extreme...)For instance, after winbindd restart, 
the first 'getent passwd user1' request opens a session.   Running 
that command again does not.  (Cached)  Running 'getent passwd user2' 
opens another session, etc.  This occurs whether the UID is already 
present, or if it needs to be added new.


If you need more information on any of this, just let me know.   It 
seems so close... ;-)


Cheers,
-D


Don Meyer   [EMAIL PROTECTED]
Network Manager, ACES Academic Computing Facility
Technical System Manager, ACES TeleNet System
UIUC College of ACES, Information Technology and Communication Services

  They that can give up essential liberty to obtain a little 
temporary safety,
deserve neither liberty or safety. -- Benjamin Franklin, 1759 


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


svn commit: samba r22658 - in branches/SAMBA_4_0/source/lib/replace: . test

2007-05-04 Thread metze
Author: metze
Date: 2007-05-04 06:59:02 + (Fri, 04 May 2007)
New Revision: 22658

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

Log:
- add AC_GNU_SOURCE macro for systems which don't have it
  (sles8)
- fix compiler warning on some systems

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4
   branches/SAMBA_4_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4
===
--- branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4  2007-05-03 
20:52:48 UTC (rev 22657)
+++ branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4  2007-05-04 
06:59:02 UTC (rev 22658)
@@ -1,3 +1,16 @@
+# AC_GNU_SOURCE
+# --
+AC_DEFUN([AC_GNU_SOURCE],
+[AH_VERBATIM([_GNU_SOURCE],
+[/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+AC_DEFINE([_GNU_SOURCE])
+])
+
 # _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST,
 #  ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE)
 # --

Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-05-03 
20:52:48 UTC (rev 22657)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-05-04 
06:59:02 UTC (rev 22658)
@@ -511,7 +511,7 @@
   \tptr: %p - %p = %d != %d\n \
   ]\n, \
   __STRING(func), __location__, __STRING(func), \
-  str, diff, base, res, _v, _ep, _p, diff - (_ep - _p), 
diff); \
+  str, diff, base, res, _v, _ep, _p, (int)(diff - (_ep - 
_p)), diff); \
return false; \
} \
 } while (0)



svn commit: samba r22659 - in branches/SAMBA_3_0/source/lib/replace: . test

2007-05-04 Thread metze
Author: metze
Date: 2007-05-04 06:59:26 + (Fri, 04 May 2007)
New Revision: 22659

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

Log:
merge from SAMBA_4_0:

- add AC_GNU_SOURCE macro for systems which don't have it
  (sles8)
- fix compiler warning on some systems

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/autoconf-2.60.m4
   branches/SAMBA_3_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/autoconf-2.60.m4
===
--- branches/SAMBA_3_0/source/lib/replace/autoconf-2.60.m4  2007-05-04 
06:59:02 UTC (rev 22658)
+++ branches/SAMBA_3_0/source/lib/replace/autoconf-2.60.m4  2007-05-04 
06:59:26 UTC (rev 22659)
@@ -1,3 +1,16 @@
+# AC_GNU_SOURCE
+# --
+AC_DEFUN([AC_GNU_SOURCE],
+[AH_VERBATIM([_GNU_SOURCE],
+[/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+AC_DEFINE([_GNU_SOURCE])
+])
+
 # _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST,
 #  ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE)
 # --

Modified: branches/SAMBA_3_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-05-04 
06:59:02 UTC (rev 22658)
+++ branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-05-04 
06:59:26 UTC (rev 22659)
@@ -511,7 +511,7 @@
   \tptr: %p - %p = %d != %d\n \
   ]\n, \
   __STRING(func), __location__, __STRING(func), \
-  str, diff, base, res, _v, _ep, _p, diff - (_ep - _p), 
diff); \
+  str, diff, base, res, _v, _ep, _p, (int)(diff - (_ep - 
_p)), diff); \
return false; \
} \
 } while (0)



svn commit: samba r22660 - in branches/SAMBA_3_0_25/source/lib/replace: . test

2007-05-04 Thread metze
Author: metze
Date: 2007-05-04 07:00:09 + (Fri, 04 May 2007)
New Revision: 22660

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

Log:
merge from SAMBA_4_0:
- add AC_GNU_SOURCE macro for systems which don't have it
  (sles8)
- fix compiler warning on some systems

jerry: this should be in 3.0.25

metze
Modified:
   branches/SAMBA_3_0_25/source/lib/replace/autoconf-2.60.m4
   branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/lib/replace/autoconf-2.60.m4
===
--- branches/SAMBA_3_0_25/source/lib/replace/autoconf-2.60.m4   2007-05-04 
06:59:26 UTC (rev 22659)
+++ branches/SAMBA_3_0_25/source/lib/replace/autoconf-2.60.m4   2007-05-04 
07:00:09 UTC (rev 22660)
@@ -1,3 +1,16 @@
+# AC_GNU_SOURCE
+# --
+AC_DEFUN([AC_GNU_SOURCE],
+[AH_VERBATIM([_GNU_SOURCE],
+[/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+AC_DEFINE([_GNU_SOURCE])
+])
+
 # _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST,
 #  ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE)
 # --

Modified: branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c   2007-05-04 
06:59:26 UTC (rev 22659)
+++ branches/SAMBA_3_0_25/source/lib/replace/test/testsuite.c   2007-05-04 
07:00:09 UTC (rev 22660)
@@ -511,7 +511,7 @@
   \tptr: %p - %p = %d != %d\n \
   ]\n, \
   __STRING(func), __location__, __STRING(func), \
-  str, diff, base, res, _v, _ep, _p, diff - (_ep - _p), 
diff); \
+  str, diff, base, res, _v, _ep, _p, (int)(diff - (_ep - 
_p)), diff); \
return false; \
} \
 } while (0)



svn commit: samba r22661 - in branches/SAMBA_4_0/source/lib/events: .

2007-05-04 Thread metze
Author: metze
Date: 2007-05-04 09:22:52 + (Fri, 04 May 2007)
New Revision: 22661

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

Log:
optimize the handling of directly triggered timed events:

- if someone adds a timed_event with a zero timeval
  we now avoid serval gettimeofday() calls and the
  event handler doesn't get the current time when it's
  called, instead we also pass a zero timeval

- this also makes sure multiple timed events with a zero timeval
  are processed in the order there're added.

the little benchmark shows that processing 200 directly timed events
is now much faster, while avoiding syscalls at all!

 time ./evtest (with the old code)

real0m6.388s
user0m1.740s
sys 0m4.632s
 time ./evtest (with the new code)

real0m1.498s
user0m1.496s
sys 0m0.004s
[EMAIL PROTECTED]:~/devel/samba/4.0/samba4-ci/source cat evtest.c
#include stdio.h
#include stdint.h
#include sys/time.h
#include talloc.h
#include events.h

static void dummy_fde_handler(struct event_context *ev_ctx, struct fd_event 
*fde,
  uint16_t flags, void *private_data)
{
}

static void timeout_handler(struct event_context *ev, struct timed_event *te,
struct timeval tval, void *private_data)
{
uint32_t *countp = (uint32_t *)private_data;
(*countp)++;
if (*countp  200) exit(0);
event_add_timed(ev, ev, tval, timeout_handler, countp);
}

int main(void)
{
struct event_context *ev;
struct timeval tval =  { 0, 0 };
uint32_t count = 0;
ev = event_context_init(NULL);
event_add_fd(ev, ev, 0, 0, dummy_fde_handler, NULL);
event_add_timed(ev, ev, tval, timeout_handler, count);
return event_loop_wait(ev);
}
Modified:
   branches/SAMBA_4_0/source/lib/events/events_aio.c
   branches/SAMBA_4_0/source/lib/events/events_epoll.c
   branches/SAMBA_4_0/source/lib/events/events_internal.h
   branches/SAMBA_4_0/source/lib/events/events_select.c
   branches/SAMBA_4_0/source/lib/events/events_standard.c
   branches/SAMBA_4_0/source/lib/events/events_timed.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/events/events_aio.c
===
--- branches/SAMBA_4_0/source/lib/events/events_aio.c   2007-05-04 07:00:09 UTC 
(rev 22660)
+++ branches/SAMBA_4_0/source/lib/events/events_aio.c   2007-05-04 09:22:52 UTC 
(rev 22661)
@@ -250,7 +250,8 @@
}
 
if (ret == 0  tvalp) {
-   common_event_loop_timer(aio_ev-ev);
+   /* we don't care about a possible delay here */
+   common_event_loop_timer_delay(aio_ev-ev);
return 0;
}
 
@@ -431,10 +432,8 @@
   struct 
aio_event_context);
struct timeval tval;
 
-   tval = common_event_loop_delay(ev);
-
+   tval = common_event_loop_timer_delay(ev);
if (timeval_is_zero(tval)) {
-   common_event_loop_timer(ev);
return 0;
}
 

Modified: branches/SAMBA_4_0/source/lib/events/events_epoll.c
===
--- branches/SAMBA_4_0/source/lib/events/events_epoll.c 2007-05-04 07:00:09 UTC 
(rev 22660)
+++ branches/SAMBA_4_0/source/lib/events/events_epoll.c 2007-05-04 09:22:52 UTC 
(rev 22661)
@@ -233,7 +233,8 @@
}
 
if (ret == 0  tvalp) {
-   common_event_loop_timer(epoll_ev-ev);
+   /* we don't care about a possible delay here */
+   common_event_loop_timer_delay(epoll_ev-ev);
return 0;
}
 
@@ -376,10 +377,8 @@
   struct 
epoll_event_context);
struct timeval tval;
 
-   tval = common_event_loop_delay(ev);
-
+   tval = common_event_loop_timer_delay(ev);
if (timeval_is_zero(tval)) {
-   common_event_loop_timer(ev);
return 0;
}
 

Modified: branches/SAMBA_4_0/source/lib/events/events_internal.h
===
--- branches/SAMBA_4_0/source/lib/events/events_internal.h  2007-05-04 
07:00:09 UTC (rev 22660)
+++ branches/SAMBA_4_0/source/lib/events/events_internal.h  2007-05-04 
09:22:52 UTC (rev 22661)
@@ -117,8 +117,7 @@
 
 struct timed_event *common_event_add_timed(struct event_context *, TALLOC_CTX 
*,
   struct timeval, 
event_timed_handler_t, void *);
-void common_event_loop_timer(struct event_context *);
-struct timeval common_event_loop_delay(struct event_context *);
+struct timeval common_event_loop_timer_delay(struct event_context *);
 
 struct signal_event *common_event_add_signal(struct event_context *ev, 
 TALLOC_CTX *mem_ctx,

Modified: branches/SAMBA_4_0/source/lib/events/events_select.c

svn commit: samba r22662 - in branches/SAMBA_4_0/source/build/m4: .

2007-05-04 Thread metze
Author: metze
Date: 2007-05-04 09:35:01 + (Fri, 04 May 2007)
New Revision: 22662

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

Log:
disable shared library support on Tru64

metze 
Modified:
   branches/SAMBA_4_0/source/build/m4/check_ld.m4


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/check_ld.m4
===
--- branches/SAMBA_4_0/source/build/m4/check_ld.m4  2007-05-04 09:22:52 UTC 
(rev 22661)
+++ branches/SAMBA_4_0/source/build/m4/check_ld.m4  2007-05-04 09:35:01 UTC 
(rev 22662)
@@ -135,7 +135,8 @@
fi
;;
*osf*)
-   BLDSHARED=true
+   # disabled because tru64 fails to link libtorture.so
+   BLDSHARED=false
SONAMEFLAG=-Wl,-soname,
PICFLAG=-fPIC
;;



svn commit: samba r22663 - in branches/SAMBA_3_0/source/libads: .

2007-05-04 Thread gd
Author: gd
Date: 2007-05-04 09:46:17 + (Fri, 04 May 2007)
New Revision: 22663

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

Log:
Restructure kerberos_kinit_password_ext() error path.

Guenther

Modified:
   branches/SAMBA_3_0/source/libads/kerberos.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/kerberos.c
===
--- branches/SAMBA_3_0/source/libads/kerberos.c 2007-05-04 09:35:01 UTC (rev 
22662)
+++ branches/SAMBA_3_0/source/libads/kerberos.c 2007-05-04 09:46:17 UTC (rev 
22663)
@@ -73,14 +73,16 @@
krb5_context ctx = NULL;
krb5_error_code code = 0;
krb5_ccache cc = NULL;
-   krb5_principal me;
+   krb5_principal me = NULL;
krb5_creds my_creds;
krb5_get_init_creds_opt *opt = NULL;
smb_krb5_addresses *addr = NULL;
 
+   ZERO_STRUCT(my_creds);
+
initialize_krb5_error_table();
if ((code = krb5_init_context(ctx)))
-   return code;
+   goto out;
 
if (time_offset != 0) {
krb5_set_real_time(ctx, time(NULL) + time_offset, 0);
@@ -91,21 +93,15 @@
getenv(KRB5_CONFIG)));
 
if ((code = krb5_cc_resolve(ctx, cache_name ? cache_name : 
krb5_cc_default_name(ctx), cc))) {
-   krb5_free_context(ctx);
-   return code;
+   goto out;
}

if ((code = smb_krb5_parse_name(ctx, principal, me))) {
-   krb5_cc_close(ctx, cc);
-   krb5_free_context(ctx); 
-   return code;
+   goto out;
}
 
-   code = smb_krb5_get_init_creds_opt_alloc(ctx, opt);
-   if (code) {
-   krb5_cc_close(ctx, cc);
-   krb5_free_context(ctx); 
-   return code;
+   if ((code = smb_krb5_get_init_creds_opt_alloc(ctx, opt))) {
+   goto out;
}
 
krb5_get_init_creds_opt_set_renew_life(opt, renewable_time);
@@ -117,55 +113,29 @@
 
 #ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PAC_REQUEST
if (request_pac) {
-   code = krb5_get_init_creds_opt_set_pac_request(ctx, opt, 
(krb5_boolean)request_pac);
-   if (code) {
-   krb5_cc_close(ctx, cc);
-   krb5_free_principal(ctx, me);
-   krb5_free_context(ctx);
-   return code;
+   if ((code = krb5_get_init_creds_opt_set_pac_request(ctx, opt, 
(krb5_boolean)request_pac))) {
+   goto out;
}
}
 #endif
if (add_netbios_addr) {
-   code = smb_krb5_gen_netbios_krb5_address(addr);
-   if (code) {
-   krb5_cc_close(ctx, cc);
-   krb5_free_principal(ctx, me);
-   krb5_free_context(ctx); 
-   return code;
+   if ((code = smb_krb5_gen_netbios_krb5_address(addr))) {
+   goto out;
}
krb5_get_init_creds_opt_set_address_list(opt, addr-addrs);
}
 
if ((code = krb5_get_init_creds_password(ctx, my_creds, me, 
CONST_DISCARD(char *,password), 
-kerb_prompter, NULL, 0, NULL, 
opt)))
-   {
-   smb_krb5_get_init_creds_opt_free(ctx, opt);
-   smb_krb5_free_addresses(ctx, addr);
-   krb5_cc_close(ctx, cc);
-   krb5_free_principal(ctx, me);
-   krb5_free_context(ctx);
-   return code;
+kerb_prompter, NULL, 0, NULL, 
opt))) {
+   goto out;
}
 
-   smb_krb5_get_init_creds_opt_free(ctx, opt);
-
if ((code = krb5_cc_initialize(ctx, cc, me))) {
-   smb_krb5_free_addresses(ctx, addr);
-   krb5_free_cred_contents(ctx, my_creds);
-   krb5_cc_close(ctx, cc);
-   krb5_free_principal(ctx, me);
-   krb5_free_context(ctx); 
-   return code;
+   goto out;
}

if ((code = krb5_cc_store_cred(ctx, cc, my_creds))) {
-   krb5_cc_close(ctx, cc);
-   smb_krb5_free_addresses(ctx, addr);
-   krb5_free_cred_contents(ctx, my_creds);
-   krb5_free_principal(ctx, me);
-   krb5_free_context(ctx); 
-   return code;
+   goto out;
}
 
if (expire_time) {
@@ -175,14 +145,24 @@
if (renew_till_time) {
*renew_till_time = (time_t) my_creds.times.renew_till;
}
-
-   krb5_cc_close(ctx, cc);
-   smb_krb5_free_addresses(ctx, addr);
+ out:
krb5_free_cred_contents(ctx, my_creds);
-   krb5_free_principal(ctx, me);
-   krb5_free_context(ctx); 
-   
-   return 0;
+   if (me) {
+   

svn commit: samba r22664 - in branches/SAMBA_3_0/source: . include libads libsmb

2007-05-04 Thread gd
Author: gd
Date: 2007-05-04 09:55:40 + (Fri, 04 May 2007)
New Revision: 22664

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

Log:
When we have krb5_get_init_creds_opt_get_error() then try to get the NTSTATUS
codes directly out of the krb5_error edata.

Guenther

Modified:
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/include/ads.h
   branches/SAMBA_3_0/source/libads/kerberos.c
   branches/SAMBA_3_0/source/libsmb/clikrb5.c


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2007-05-04 09:46:17 UTC (rev 
22663)
+++ branches/SAMBA_3_0/source/configure.in  2007-05-04 09:55:40 UTC (rev 
22664)
@@ -3658,6 +3658,7 @@
   AC_CHECK_FUNC_EXT(initialize_krb5_error_table, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_get_init_creds_opt_alloc, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_get_init_creds_opt_free, $KRB5_LIBS)
+  AC_CHECK_FUNC_EXT(krb5_get_init_creds_opt_get_error, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_enctype_to_string, $KRB5_LIBS)
 
   LIBS=$KRB5_LIBS $LIBS

Modified: branches/SAMBA_3_0/source/include/ads.h
===
--- branches/SAMBA_3_0/source/include/ads.h 2007-05-04 09:46:17 UTC (rev 
22663)
+++ branches/SAMBA_3_0/source/include/ads.h 2007-05-04 09:55:40 UTC (rev 
22664)
@@ -298,6 +298,12 @@
 
 #ifdef HAVE_KRB5
 typedef struct {
+   NTSTATUS ntstatus;
+   uint32 unknown1;
+   uint32 unknown2; /* 0x0001 */
+} KRB5_EDATA_NTSTATUS;
+
+typedef struct {
 #if defined(HAVE_MAGIC_IN_KRB5_ADDRESS)  
defined(HAVE_ADDRTYPE_IN_KRB5_ADDRESS) /* MIT */
krb5_address **addrs;
 #elif defined(HAVE_KRB5_ADDRESSES) /* Heimdal */

Modified: branches/SAMBA_3_0/source/libads/kerberos.c
===
--- branches/SAMBA_3_0/source/libads/kerberos.c 2007-05-04 09:46:17 UTC (rev 
22663)
+++ branches/SAMBA_3_0/source/libads/kerberos.c 2007-05-04 09:55:40 UTC (rev 
22664)
@@ -55,6 +55,127 @@
return 0;
 }
 
+static BOOL smb_krb5_err_io_nstatus(TALLOC_CTX *mem_ctx, 
+   DATA_BLOB *edata_blob, 
+   KRB5_EDATA_NTSTATUS *edata)
+{
+   BOOL ret = False;
+   prs_struct ps;
+
+   if (!mem_ctx || !edata_blob || !edata) 
+   return False;
+
+   if (!prs_init(ps, edata_blob-length, mem_ctx, UNMARSHALL))
+   return False;
+
+   if (!prs_copy_data_in(ps, (char *)edata_blob-data, 
edata_blob-length))
+   goto out;
+
+   prs_set_offset(ps, 0);
+
+   if (!prs_ntstatus(ntstatus, ps, 1, edata-ntstatus))
+   goto out;
+
+   if (!prs_uint32(unknown1, ps, 1, edata-unknown1))
+   goto out;
+
+   if (!prs_uint32(unknown2, ps, 1, edata-unknown2)) /* only seen 
0001 here */
+   goto out;
+
+   ret = True;
+ out:
+   prs_mem_free(ps);
+
+   return ret;
+}
+
+ static BOOL smb_krb5_get_ntstatus_from_krb5_error(krb5_error *error,
+  NTSTATUS *nt_status)
+{
+   DATA_BLOB edata;
+   DATA_BLOB unwrapped_edata;
+   TALLOC_CTX *mem_ctx;
+   KRB5_EDATA_NTSTATUS parsed_edata;
+
+#ifdef HAVE_E_DATA_POINTER_IN_KRB5_ERROR
+   edata = data_blob(error-e_data-data, error-e_data-length);
+#else
+   edata = data_blob(error-e_data.data, error-e_data.length);
+#endif /* HAVE_E_DATA_POINTER_IN_KRB5_ERROR */
+
+#ifdef DEVELOPER
+   dump_data(10, edata.data, edata.length);
+#endif /* DEVELOPER */
+
+   mem_ctx = talloc_init(smb_krb5_get_ntstatus_from_krb5_error);
+   if (mem_ctx == NULL) {
+   data_blob_free(edata);
+   return False;
+   }
+
+   if (!unwrap_edata_ntstatus(mem_ctx, edata, unwrapped_edata)) {
+   data_blob_free(edata);
+   TALLOC_FREE(mem_ctx);
+   return False;
+   }
+
+   data_blob_free(edata);
+
+   if (!smb_krb5_err_io_nstatus(mem_ctx, unwrapped_edata, parsed_edata)) 
{
+   data_blob_free(unwrapped_edata);
+   TALLOC_FREE(mem_ctx);
+   return False;
+   }
+
+   data_blob_free(unwrapped_edata);
+
+   if (nt_status) {
+   *nt_status = parsed_edata.ntstatus;
+   }
+
+   TALLOC_FREE(mem_ctx);
+
+   return True;
+}
+
+ static BOOL smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt(krb5_context 
ctx, 
+ 
krb5_get_init_creds_opt *opt, 
+ NTSTATUS 
*nt_status)
+{
+   BOOL ret = False;
+   krb5_error *error = NULL;
+
+#ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_GET_ERROR
+   ret = krb5_get_init_creds_opt_get_error(ctx, opt, error);
+   if (ret) {
+   

Rev 12088: Change version back to 0.9. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-05-04 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 12088
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Fri 2007-05-04 13:02:19 +0200
message:
  Change version back to 0.9.
modified:
  source/lib/ldb/configure.acsvn-v2:[EMAIL PROTECTED]
=== modified file 'source/lib/ldb/configure.ac'
--- a/source/lib/ldb/configure.ac   2007-04-30 08:08:36 +
+++ b/source/lib/ldb/configure.ac   2007-05-04 11:02:19 +
@@ -11,7 +11,7 @@
 AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ])
 AC_DEFUN([SMB_EXT_LIB], [echo -n ])
 AC_DEFUN([SMB_ENABLE], [echo -n ])
-AC_INIT(ldb, 1.0)
+AC_INIT(ldb, 0.9.0)
 AC_CONFIG_SRCDIR([common/ldb.c])
 
 AC_LIBREPLACE_ALL_CHECKS
@@ -48,7 +48,9 @@
 EXTRA_OBJ=
 
 m4_include(libpopt.m4)
+PKG_CHECK_MODULES(TALLOC, talloc = 1.0)
 m4_include(libtalloc.m4)
+PKG_CHECK_MODULES(TDB, tdb = 1.1.0)
 m4_include(libtdb.m4)
 
 m4_include(ldap.m4)



svn commit: samba r22665 - in branches/SAMBA_4_0: . source/lib/ldb

2007-05-04 Thread jelmer
Author: jelmer
Date: 2007-05-04 10:02:47 + (Fri, 04 May 2007)
New Revision: 22665

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

Log:
Change version back to 0.9.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/ldb/configure.ac


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:merge
...skipped...

Modified: branches/SAMBA_4_0/source/lib/ldb/configure.ac
===
--- branches/SAMBA_4_0/source/lib/ldb/configure.ac  2007-05-04 09:55:40 UTC 
(rev 22664)
+++ branches/SAMBA_4_0/source/lib/ldb/configure.ac  2007-05-04 10:02:47 UTC 
(rev 22665)
@@ -11,7 +11,7 @@
 AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ])
 AC_DEFUN([SMB_EXT_LIB], [echo -n ])
 AC_DEFUN([SMB_ENABLE], [echo -n ])
-AC_INIT(ldb, 1.0)
+AC_INIT(ldb, 0.9.0)
 AC_CONFIG_SRCDIR([common/ldb.c])
 
 AC_LIBREPLACE_ALL_CHECKS
@@ -48,7 +48,9 @@
 EXTRA_OBJ=
 
 m4_include(libpopt.m4)
+PKG_CHECK_MODULES(TALLOC, talloc = 1.0)
 m4_include(libtalloc.m4)
+PKG_CHECK_MODULES(TDB, tdb = 1.1.0)
 m4_include(libtdb.m4)
 
 m4_include(ldap.m4)



svn commit: samba r22666 - in branches/SAMBA_3_0/source: libads nsswitch

2007-05-04 Thread gd
Author: gd
Date: 2007-05-04 10:21:39 + (Fri, 04 May 2007)
New Revision: 22666

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

Log:
Expand kerberos_kinit_password_ext() to return NTSTATUS codes and make
winbindd's kerberized pam_auth use that.

Guenther

Modified:
   branches/SAMBA_3_0/source/libads/kerberos.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/kerberos.c
===
--- branches/SAMBA_3_0/source/libads/kerberos.c 2007-05-04 10:02:47 UTC (rev 
22665)
+++ branches/SAMBA_3_0/source/libads/kerberos.c 2007-05-04 10:21:39 UTC (rev 
22666)
@@ -189,7 +189,8 @@
const char *cache_name,
BOOL request_pac,
BOOL add_netbios_addr,
-   time_t renewable_time)
+   time_t renewable_time,
+   NTSTATUS *ntstatus)
 {
krb5_context ctx = NULL;
krb5_error_code code = 0;
@@ -267,6 +268,29 @@
*renew_till_time = (time_t) my_creds.times.renew_till;
}
  out:
+   if (ntstatus) {
+
+   NTSTATUS status;
+
+   /* fast path */
+   if (code == 0) {
+   *ntstatus = NT_STATUS_OK;
+   goto cleanup;
+   }
+
+   /* try to get ntstatus code out of krb5_error when we have it
+* inside the krb5_get_init_creds_opt - gd */
+
+   if (opt  
smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt(ctx, opt, status)) {
+   *ntstatus = status;
+   goto cleanup;
+   }
+
+   /* fall back to self-made-mapping */
+   *ntstatus = krb5_to_nt_status(code);
+   }
+
+ cleanup:
krb5_free_cred_contents(ctx, my_creds);
if (me) {
krb5_free_principal(ctx, me);
@@ -321,7 +345,8 @@
}

ret = kerberos_kinit_password_ext(s, ads-auth.password, 
ads-auth.time_offset,
-   ads-auth.tgt_expire, NULL, NULL, False, False, 
ads-auth.renewable);
+   ads-auth.tgt_expire, NULL, NULL, False, False, 
ads-auth.renewable, 
+   NULL);
 
if (ret) {
DEBUG(0,(kerberos_kinit_password %s failed: %s\n, 
@@ -580,7 +605,8 @@
   cache_name,
   False,
   False,
-  0);
+  0,
+  NULL);
 }
 
 /

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2007-05-04 
10:02:47 UTC (rev 22665)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2007-05-04 
10:21:39 UTC (rev 22666)
@@ -111,7 +111,8 @@
  entry-ccname,
  False, /* no PAC required 
anymore */
  True,
- 
WINBINDD_PAM_AUTH_KRB5_RENEW_TIME);
+ 
WINBINDD_PAM_AUTH_KRB5_RENEW_TIME,
+ NULL);
gain_root_privilege();
 
if (ret) {
@@ -224,7 +225,8 @@
entry-ccname,
False, /* no PAC required 
anymore */
True,
-   
WINBINDD_PAM_AUTH_KRB5_RENEW_TIME);
+   
WINBINDD_PAM_AUTH_KRB5_RENEW_TIME,
+   NULL);
gain_root_privilege();
 
if (ret) {

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c   2007-05-04 10:02:47 UTC 
(rev 22665)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c   2007-05-04 10:21:39 UTC 
(rev 22666)
@@ -564,12 +564,12 @@
   cc, 
   True,
   True,
-  
WINBINDD_PAM_AUTH_KRB5_RENEW_TIME);
+  
WINBINDD_PAM_AUTH_KRB5_RENEW_TIME,
+

svn commit: samba r22667 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4: .

2007-05-04 Thread metze
Author: metze
Date: 2007-05-04 10:44:41 + (Fri, 04 May 2007)
New Revision: 22667

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

Log:
revert revision 22640 as it breaks nested structs in idl

metze
Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm  
2007-05-04 10:21:39 UTC (rev 22666)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm  
2007-05-04 10:44:41 UTC (rev 22667)
@@ -43,7 +43,7 @@
}
 
if ($ret) {
-   pidl  /* [ . substr($ret, 0, -1) . ] */;
+   pidl /* [ . substr($ret, 0, -1) . ] */;
}
 }
 
@@ -108,12 +108,10 @@
pidl tabs().char _empty_;\n;
 }
 $tab_depth--;
-
-pidl };;
+pidl tabs().};
if (defined $struct-{PROPERTIES}) {
HeaderProperties($struct-{PROPERTIES}, []);
}
-pidl \n\n;
 }
 
 #
@@ -134,10 +132,10 @@
}
pidl \n;
$tab_depth--;
-   pidl };\n;
+   pidl }\n;
pidl #else\n;
my $count = 0;
-   pidl enum $name { __donnot_use_enum_$name=0x7FFF};\n;
+   pidl enum $name { __donnot_use_enum_$name=0x7FFF}\n;
my $with_val = 0;
my $without_val = 0;
foreach my $e (@{$enum-{ELEMENTS}}) {
@@ -193,12 +191,11 @@
}
}
$tab_depth--;
+   pidl };
 
-   pidl };;
if (defined $union-{PROPERTIES}) {
HeaderProperties($union-{PROPERTIES}, []);
}
-   pidl \n\n;
 }
 
 #
@@ -300,7 +297,7 @@
HeaderFunctionInOut($fn, in);
HeaderFunctionInOut($fn, inout);
$tab_depth--;
-   pidl tabs().} in;\n;
+   pidl tabs().} in;\n\n;
$needed++;
 }
 
@@ -314,7 +311,7 @@
pidl tabs().mapTypeName($fn-{RETURN_TYPE}) .  result;\n;
}
$tab_depth--;
-   pidl tabs().} out;\n;
+   pidl tabs().} out;\n\n;
$needed++;
 }
 
@@ -365,6 +362,11 @@
HeaderUnion($d, $d-{NAME}) if ($d-{TYPE} eq UNION);
HeaderEnum($d, $d-{NAME}) if ($d-{TYPE} eq ENUM);
HeaderBitmap($d, $d-{NAME}) if ($d-{TYPE} eq BITMAP);
+   pidl ;\n\n if ($d-{TYPE} eq BITMAP or 
+$d-{TYPE} eq STRUCT or 
+$d-{TYPE} eq TYPEDEF or 
+$d-{TYPE} eq UNION or 
+$d-{TYPE} eq ENUM);
}
 
foreach my $d (@{$interface-{DATA}}) {



Rev 12090: Fix ldb build in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-05-04 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 12090
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Fri 2007-05-04 13:08:32 +0200
message:
  Fix ldb build
modified:
  source/lib/ldb/configure.acsvn-v2:[EMAIL PROTECTED]
=== modified file 'source/lib/ldb/configure.ac'
--- a/source/lib/ldb/configure.ac   2007-05-04 10:02:47 +
+++ b/source/lib/ldb/configure.ac   2007-05-04 11:08:32 +
@@ -48,9 +48,7 @@
 EXTRA_OBJ=
 
 m4_include(libpopt.m4)
-PKG_CHECK_MODULES(TALLOC, talloc = 1.0)
 m4_include(libtalloc.m4)
-PKG_CHECK_MODULES(TDB, tdb = 1.1.0)
 m4_include(libtdb.m4)
 
 m4_include(ldap.m4)



svn commit: samba r22668 - in branches/SAMBA_4_0: . source/lib/ldb

2007-05-04 Thread jelmer
Author: jelmer
Date: 2007-05-04 11:08:53 + (Fri, 04 May 2007)
New Revision: 22668

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

Log:
Fix ldb build
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/ldb/configure.ac


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:merge
...skipped...

Modified: branches/SAMBA_4_0/source/lib/ldb/configure.ac
===
--- branches/SAMBA_4_0/source/lib/ldb/configure.ac  2007-05-04 10:44:41 UTC 
(rev 22667)
+++ branches/SAMBA_4_0/source/lib/ldb/configure.ac  2007-05-04 11:08:53 UTC 
(rev 22668)
@@ -48,9 +48,7 @@
 EXTRA_OBJ=
 
 m4_include(libpopt.m4)
-PKG_CHECK_MODULES(TALLOC, talloc = 1.0)
 m4_include(libtalloc.m4)
-PKG_CHECK_MODULES(TDB, tdb = 1.1.0)
 m4_include(libtdb.m4)
 
 m4_include(ldap.m4)



svn commit: samba r22669 - in branches/SAMBA_4_0/source/libnet: .

2007-05-04 Thread metze
Author: metze
Date: 2007-05-04 11:26:25 + (Fri, 04 May 2007)
New Revision: 22669

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

Log:
fix uninitialized element which was causing a crash with 'net password set'

metze
Modified:
   branches/SAMBA_4_0/source/libnet/libnet_passwd.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_passwd.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_passwd.c2007-05-04 11:08:53 UTC 
(rev 22668)
+++ branches/SAMBA_4_0/source/libnet/libnet_passwd.c2007-05-04 11:26:25 UTC 
(rev 22669)
@@ -644,6 +644,7 @@
r2.samr_handle.in.newpassword   = r-samr.in.newpassword;
r2.samr_handle.in.user_handle   = u_handle;
r2.samr_handle.in.dcerpc_pipe   = c.out.dcerpc_pipe;
+   r2.samr_handle.in.info21= NULL;
 
status = libnet_SetPassword(ctx, mem_ctx, r2);
 



Rev 250: added seqnum propogation code to ctdb in http://samba.org/~tridge/ctdb

2007-05-04 Thread tridge

revno: 250
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Fri 2007-05-04 22:18:00 +1000
message:
  added seqnum propogation code to ctdb
modified:
  common/ctdb.c  ctdb.c-20061127094323-t50f58d65iaao5of-2
  common/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  common/ctdb_ltdb.c ctdb_ltdb.c-20061128065342-to93h6eejj5kon81-2
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  lib/tdb/common/tdb.c   tdb.c-20070220022425-m1wibgjq7n5hahs6-9
  lib/tdb/include/tdb.h  tdb.h-20070125040949-7t3f5zdl1q4z9hyv-101

Diff too large for email (236, the limit is 200).


svn commit: samba r22670 - in branches/SAMBA_4_0/source/torture/raw: .

2007-05-04 Thread tridge
Author: tridge
Date: 2007-05-04 12:41:28 + (Fri, 04 May 2007)
New Revision: 22670

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

Log:

changed the RAW-NOTIFY test to support clustered testing (two nodes)

Modified:
   branches/SAMBA_4_0/source/torture/raw/notify.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/notify.c
===
--- branches/SAMBA_4_0/source/torture/raw/notify.c  2007-05-04 11:26:25 UTC 
(rev 22669)
+++ branches/SAMBA_4_0/source/torture/raw/notify.c  2007-05-04 12:41:28 UTC 
(rev 22670)
@@ -55,7 +55,8 @@
 /* 
basic testing of change notify on directories
 */
-static BOOL test_notify_dir(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
+static BOOL test_notify_dir(struct smbcli_state *cli, struct smbcli_state 
*cli2, 
+   TALLOC_CTX *mem_ctx)
 {
BOOL ret = True;
NTSTATUS status;
@@ -110,7 +111,7 @@
printf(testing notify mkdir\n);
 
req = smb_raw_changenotify_send(cli-tree, notify);
-   smbcli_mkdir(cli-tree, BASEDIR \\subdir-name);
+   smbcli_mkdir(cli2-tree, BASEDIR \\subdir-name);
 
status = smb_raw_changenotify_recv(req, mem_ctx, notify);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -122,7 +123,7 @@
printf(testing notify rmdir\n);
 
req = smb_raw_changenotify_send(cli-tree, notify);
-   smbcli_rmdir(cli-tree, BASEDIR \\subdir-name);
+   smbcli_rmdir(cli2-tree, BASEDIR \\subdir-name);
 
status = smb_raw_changenotify_recv(req, mem_ctx, notify);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -132,10 +133,10 @@
 
printf(testing notify mkdir - rmdir - mkdir - rmdir\n);
 
-   smbcli_mkdir(cli-tree, BASEDIR \\subdir-name);
-   smbcli_rmdir(cli-tree, BASEDIR \\subdir-name);
-   smbcli_mkdir(cli-tree, BASEDIR \\subdir-name);
-   smbcli_rmdir(cli-tree, BASEDIR \\subdir-name);
+   smbcli_mkdir(cli2-tree, BASEDIR \\subdir-name);
+   smbcli_rmdir(cli2-tree, BASEDIR \\subdir-name);
+   smbcli_mkdir(cli2-tree, BASEDIR \\subdir-name);
+   smbcli_rmdir(cli2-tree, BASEDIR \\subdir-name);
req = smb_raw_changenotify_send(cli-tree, notify);
status = smb_raw_changenotify_recv(req, mem_ctx, notify);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -174,11 +175,14 @@
notify.nttrans.in.file.fnum = fnum;
req = smb_raw_changenotify_send(cli-tree, notify);
 
+   status = smbcli_unlink(cli-tree, BASEDIR \\nonexistant.txt);
+   CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
+
/* (1st unlink) as the 2nd notify directly returns,
   this unlink is only seen by the 1st notify and 
   the 3rd notify (later) */
printf(testing notify on unlink for the first file\n);
-   status = smbcli_unlink(cli-tree, BASEDIR \\test0.txt);
+   status = smbcli_unlink(cli2-tree, BASEDIR \\test0.txt);
CHECK_STATUS(status, NT_STATUS_OK);
 
/* receive the reply from the 2nd notify */
@@ -186,24 +190,27 @@
CHECK_STATUS(status, NT_STATUS_OK);
 
CHECK_VAL(notify.nttrans.out.num_changes, count);
-   for (i=1;inotify.nttrans.out.num_changes;i++) {
+   for (i=1;icount;i++) {
CHECK_VAL(notify.nttrans.out.changes[i].action, 
NOTIFY_ACTION_ADDED);
}
CHECK_WSTR(notify.nttrans.out.changes[0].name, test0.txt, 
STR_UNICODE);
 
-   /* and now from the 1st notify */
+   printf(and now from the 1st notify\n);
status = smb_raw_changenotify_recv(req2, mem_ctx, notify);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(notify.nttrans.out.num_changes, 1);
CHECK_VAL(notify.nttrans.out.changes[0].action, NOTIFY_ACTION_REMOVED);
CHECK_WSTR(notify.nttrans.out.changes[0].name, test0.txt, 
STR_UNICODE);
 
-   /* (3rd notify) this notify will only see the 1st unlink */
+   printf((3rd notify) this notify will only see the 1st unlink\n);
req = smb_raw_changenotify_send(cli-tree, notify);
 
+   status = smbcli_unlink(cli-tree, BASEDIR \\nonexistant.txt);
+   CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
+
printf(testing notify on wildcard unlink for %d files\n, count-1);
/* (2nd unlink) do a wildcard unlink */
-   status = smbcli_unlink(cli-tree, BASEDIR \\test*.txt);
+   status = smbcli_unlink(cli2-tree, BASEDIR \\test*.txt);
CHECK_STATUS(status, NT_STATUS_OK);
 
/* receive the 3rd notify */
@@ -1149,13 +1156,16 @@
 */
 BOOL torture_raw_notify(struct torture_context *torture)
 {
-   struct smbcli_state *cli;
+   struct smbcli_state *cli, *cli2;
BOOL ret = True;
TALLOC_CTX *mem_ctx;

if (!torture_open_connection(cli, 0)) {
return False;
}
+   if (!torture_open_connection(cli2, 0)) {
+   return False;
+   }
 
mem_ctx = 

svn commit: samba r22671 - in branches/SAMBA_3_0_RELEASE/source/lib/replace: . test

2007-05-04 Thread jerry
Author: jerry
Date: 2007-05-04 18:18:53 + (Fri, 04 May 2007)
New Revision: 22671

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

Log:
merge metze's change in svn r22660
Modified:
   branches/SAMBA_3_0_RELEASE/source/lib/replace/autoconf-2.60.m4
   branches/SAMBA_3_0_RELEASE/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0_RELEASE/source/lib/replace/autoconf-2.60.m4
===
--- branches/SAMBA_3_0_RELEASE/source/lib/replace/autoconf-2.60.m4  
2007-05-04 12:41:28 UTC (rev 22670)
+++ branches/SAMBA_3_0_RELEASE/source/lib/replace/autoconf-2.60.m4  
2007-05-04 18:18:53 UTC (rev 22671)
@@ -1,3 +1,16 @@
+# AC_GNU_SOURCE
+# --
+AC_DEFUN([AC_GNU_SOURCE],
+[AH_VERBATIM([_GNU_SOURCE],
+[/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+AC_DEFINE([_GNU_SOURCE])
+])
+
 # _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST,
 #  ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE)
 # --

Modified: branches/SAMBA_3_0_RELEASE/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0_RELEASE/source/lib/replace/test/testsuite.c  
2007-05-04 12:41:28 UTC (rev 22670)
+++ branches/SAMBA_3_0_RELEASE/source/lib/replace/test/testsuite.c  
2007-05-04 18:18:53 UTC (rev 22671)
@@ -511,7 +511,7 @@
   \tptr: %p - %p = %d != %d\n \
   ]\n, \
   __STRING(func), __location__, __STRING(func), \
-  str, diff, base, res, _v, _ep, _p, diff - (_ep - _p), 
diff); \
+  str, diff, base, res, _v, _ep, _p, (int)(diff - (_ep - 
_p)), diff); \
return false; \
} \
 } while (0)



Re: svn commit: samba r22660 - in branches/SAMBA_3_0_25/source/lib/replace: . test

2007-05-04 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] wrote:
 Author: metze
 Date: 2007-05-04 07:00:09 + (Fri, 04 May 2007)
 New Revision: 22660
 
 WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22660
 
 Log:
 merge from SAMBA_4_0:
 - add AC_GNU_SOURCE macro for systems which don't have it
   (sles8)
 - fix compiler warning on some systems
 
 jerry: this should be in 3.0.25

Got it.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGO3kqIR7qMdg1EfYRAhcIAKDIJrrAfB/2pYAheXi3/owDMF6klQCgt6Po
nP3i/tdgNlldTiReWp4viOk=
=0pP3
-END PGP SIGNATURE-


svn commit: samba r22672 - in branches/SAMBA_4_0/source/libnet: .

2007-05-04 Thread mimir
Author: mimir
Date: 2007-05-04 18:59:51 + (Fri, 04 May 2007)
New Revision: 22672

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

Log:
use composite_create calls instead of talloc_zero.


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/libnet_rpc.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_rpc.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_rpc.c   2007-05-04 18:18:53 UTC 
(rev 22671)
+++ branches/SAMBA_4_0/source/libnet/libnet_rpc.c   2007-05-04 18:59:51 UTC 
(rev 22672)
@@ -57,15 +57,13 @@
struct composite_context *pipe_connect_req;
 
/* composite context allocation and setup */
-   c = talloc_zero(mem_ctx, struct composite_context);
-   if (c == NULL) return NULL;
+   c = composite_create(ctx, ctx-event_ctx);
+   if (c == NULL) return c;
 
s = talloc_zero(c, struct rpc_connect_srv_state);
if (composite_nomem(s, c)) return c;
 
-   c-state = COMPOSITE_STATE_IN_PROGRESS;
c-private_data = s;
-   c-event_ctx = ctx-event_ctx;
 
s-ctx = ctx;
s-r = *r;
@@ -218,15 +216,13 @@
struct composite_context *lookup_dc_req;
 
/* composite context allocation and setup */
-   c = talloc_zero(mem_ctx, struct composite_context);
-   if (c == NULL) return NULL;
+   c = composite_create(ctx, ctx-event_ctx);
+   if (c == NULL) return c;
 
s = talloc_zero(c, struct rpc_connect_dc_state);
if (composite_nomem(s, c)) return c;
 
-   c-state = COMPOSITE_STATE_IN_PROGRESS;
c-private_data = s;
-   c-event_ctx = ctx-event_ctx;
 
s-ctx = ctx;
s-r   = *r;
@@ -433,15 +429,13 @@
struct rpc_connect_dci_state *s;
 
/* composite context allocation and setup */
-   c = talloc_zero(mem_ctx, struct composite_context);
-   if (c == NULL) return NULL;
+   c = composite_create(ctx, ctx-event_ctx);
+   if (c == NULL) return c;
 
s = talloc_zero(c, struct rpc_connect_dci_state);
if (composite_nomem(s, c)) return c;
 
-   c-state = COMPOSITE_STATE_IN_PROGRESS;
c-private_data = s;
-   c-event_ctx = ctx-event_ctx;
 
s-ctx = ctx;
s-r   = *r;



svn commit: samba r22673 - in branches: SAMBA_3_0/source/rpc_parse SAMBA_3_0_25/source/rpc_parse SAMBA_3_0_26/source/rpc_parse

2007-05-04 Thread jra
Author: jra
Date: 2007-05-04 19:14:51 + (Fri, 04 May 2007)
New Revision: 22673

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

Log:
Fix for Jerry's reversion. We still need to check size
before talloc.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_samr.c
   branches/SAMBA_3_0_25/source/rpc_parse/parse_samr.c
   branches/SAMBA_3_0_26/source/rpc_parse/parse_samr.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_samr.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_samr.c2007-05-04 18:59:51 UTC 
(rev 22672)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_samr.c2007-05-04 19:14:51 UTC 
(rev 22673)
@@ -4838,9 +4838,14 @@
if(!prs_uint32(num_sids1, ps, depth, r_u-num_sids1))
return False;
 
-   ptr_sid = TALLOC_ARRAY(ps-mem_ctx, uint32, r_u-num_sids1);
-   if (!ptr_sid) {
-   return False;
+   /* We must always use talloc here even when marshalling. */
+   if (r_u-num_sids1) {
+   ptr_sid = TALLOC_ARRAY(ps-mem_ctx, uint32, 
r_u-num_sids1);
+   if (!ptr_sid) {
+   return False;
+   }
+   } else {
+   ptr_sid = NULL;
}

for (i = 0; i  r_u-num_sids1; i++) {
@@ -4850,7 +4855,14 @@
}

if (UNMARSHALLING(ps)) {
-   r_u-sid = TALLOC_ARRAY(ps-mem_ctx, DOM_SID2, 
r_u-num_sids1);
+   if (r_u-num_sids1) {
+   r_u-sid = TALLOC_ARRAY(ps-mem_ctx, DOM_SID2, 
r_u-num_sids1);
+   if (!r_u-sid) {
+   return False;
+   }
+   } else {
+   r_u-sid = NULL;
+   }
}

for (i = 0; i  r_u-num_sids1; i++) {

Modified: branches/SAMBA_3_0_25/source/rpc_parse/parse_samr.c
===
--- branches/SAMBA_3_0_25/source/rpc_parse/parse_samr.c 2007-05-04 18:59:51 UTC 
(rev 22672)
+++ branches/SAMBA_3_0_25/source/rpc_parse/parse_samr.c 2007-05-04 19:14:51 UTC 
(rev 22673)
@@ -4768,9 +4768,14 @@
if(!prs_uint32(num_sids1, ps, depth, r_u-num_sids1))
return False;
 
-   ptr_sid = TALLOC_ARRAY(ps-mem_ctx, uint32, r_u-num_sids1);
-   if (!ptr_sid) {
-   return False;
+   /* We must always use talloc here even when marshalling. */
+   if (r_u-num_sids1) {
+   ptr_sid = TALLOC_ARRAY(ps-mem_ctx, uint32, 
r_u-num_sids1);
+   if (!ptr_sid) {
+   return False;
+   }
+   } else {
+   ptr_sid = NULL;
}

for (i = 0; i  r_u-num_sids1; i++) {
@@ -4780,7 +4785,14 @@
}

if (UNMARSHALLING(ps)) {
-   r_u-sid = TALLOC_ARRAY(ps-mem_ctx, DOM_SID2, 
r_u-num_sids1);
+   if (r_u-num_sids1) {
+   r_u-sid = TALLOC_ARRAY(ps-mem_ctx, DOM_SID2, 
r_u-num_sids1);
+   if (!r_u-sid) {
+   return False;
+   }
+   } else {
+   r_u-sid = NULL;
+   }
}

for (i = 0; i  r_u-num_sids1; i++) {

Modified: branches/SAMBA_3_0_26/source/rpc_parse/parse_samr.c
===
--- branches/SAMBA_3_0_26/source/rpc_parse/parse_samr.c 2007-05-04 18:59:51 UTC 
(rev 22672)
+++ branches/SAMBA_3_0_26/source/rpc_parse/parse_samr.c 2007-05-04 19:14:51 UTC 
(rev 22673)
@@ -4768,9 +4768,14 @@
if(!prs_uint32(num_sids1, ps, depth, r_u-num_sids1))
return False;
 
-   ptr_sid = TALLOC_ARRAY(ps-mem_ctx, uint32, r_u-num_sids1);
-   if (!ptr_sid) {
-   return False;
+   /* We must always use talloc here even when marshalling. */
+   if (r_u-num_sids1) {
+   ptr_sid = TALLOC_ARRAY(ps-mem_ctx, uint32, 
r_u-num_sids1);
+   if (!ptr_sid) {
+   return False;
+   }
+   } else {
+   ptr_sid = NULL;
}

for (i = 0; i  r_u-num_sids1; i++) {
@@ -4780,7 +4785,14 @@
}

if 

svn commit: samba r22674 - in branches/SAMBA_3_0_RELEASE/source/rpc_parse: .

2007-05-04 Thread jerry
Author: jerry
Date: 2007-05-04 19:44:30 + (Fri, 04 May 2007)
New Revision: 22674

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

Log:
grab jra's samr parsing fix
Modified:
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_samr.c


Changeset:
Modified: branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_samr.c
===
--- branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_samr.c2007-05-04 
19:14:51 UTC (rev 22673)
+++ branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_samr.c2007-05-04 
19:44:30 UTC (rev 22674)
@@ -4768,9 +4768,14 @@
if(!prs_uint32(num_sids1, ps, depth, r_u-num_sids1))
return False;
 
-   ptr_sid = TALLOC_ARRAY(ps-mem_ctx, uint32, r_u-num_sids1);
-   if (!ptr_sid) {
-   return False;
+   /* We must always use talloc here even when marshalling. */
+   if (r_u-num_sids1) {
+   ptr_sid = TALLOC_ARRAY(ps-mem_ctx, uint32, 
r_u-num_sids1);
+   if (!ptr_sid) {
+   return False;
+   }
+   } else {
+   ptr_sid = NULL;
}

for (i = 0; i  r_u-num_sids1; i++) {
@@ -4780,7 +4785,14 @@
}

if (UNMARSHALLING(ps)) {
-   r_u-sid = TALLOC_ARRAY(ps-mem_ctx, DOM_SID2, 
r_u-num_sids1);
+   if (r_u-num_sids1) {
+   r_u-sid = TALLOC_ARRAY(ps-mem_ctx, DOM_SID2, 
r_u-num_sids1);
+   if (!r_u-sid) {
+   return False;
+   }
+   } else {
+   r_u-sid = NULL;
+   }
}

for (i = 0; i  r_u-num_sids1; i++) {



Rev 251: merged from ronnie in http://samba.org/~tridge/ctdb

2007-05-04 Thread tridge

revno: 251
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Sat 2007-05-05 07:39:23 +1000
message:
  merged from ronnie
modified:
  common/ctdb_client.c   ctdb_client.c-20070411010216-3kd8v37k61steeya-1
  common/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  direct/recoverd.c  recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
  include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  tests/ctdb_test.c  ctdb_test.c-20061117234101-o3qt14umlg9en8z0-16
  tools/ctdb_control.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1

revno: 197.1.55
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Sat 2007-05-05 01:22:30 +1000
message:
  merge from tridge

revno: 197.1.54
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Fri 2007-05-04 17:05:28 +1000
message:
  merge from tridge

revno: 197.1.53
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Fri 2007-05-04 15:25:57 +1000
message:
  remove a exit from the test script

revno: 197.1.52
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Fri 2007-05-04 15:21:40 +1000
message:
  recovery daemon
  
  this program is a client to the local ctdb daemon
  
  every second it pulls all vnnmap and nodemaps from all nodes that are 
  available and checks if a recovery is required
  
  a recovery is required if :
  * all nodes do NOT have an identical vnnmap and generation
  * all nodes do NOT have an identical nodemap
  * there are active nodes that are NOT in the nodemap
  * there are nodes in the nodemap that are NOT active
  
  During recovery,  the recovery tool will also make sure that all nodes 
  know about and have created all databases.

revno: 197.1.51
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Fri 2007-05-04 11:57:45 +1000
message:
  also verify that the generation id is the same on all the nodes and if 
  not, trigger a recovery

revno: 197.1.50
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Fri 2007-05-04 11:51:07 +1000
message:
  merge from tridge

Diff too large for email (845, the limit is 200).


svn commit: samba r22675 - in branches: SAMBA_3_0/source/modules SAMBA_3_0/source/nsswitch SAMBA_3_0/source/rpc_client SAMBA_3_0/source/rpc_server SAMBA_3_0_25/source/modules SAMBA_3_0_25/source/nsswi

2007-05-04 Thread jra
Author: jra
Date: 2007-05-04 22:01:26 + (Fri, 04 May 2007)
New Revision: 22675

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

Log:
Simo's patch for 0 size allocation. Still need
to examine parse_misc.c fix.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/modules/vfs_afsacl.c
   branches/SAMBA_3_0/source/nsswitch/idmap.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_async.c
   branches/SAMBA_3_0/source/rpc_client/cli_svcctl.c
   branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c
   branches/SAMBA_3_0_25/source/modules/vfs_afsacl.c
   branches/SAMBA_3_0_25/source/nsswitch/idmap.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_async.c
   branches/SAMBA_3_0_25/source/rpc_client/cli_svcctl.c
   branches/SAMBA_3_0_25/source/rpc_server/srv_lsa_nt.c
   branches/SAMBA_3_0_26/source/modules/vfs_afsacl.c
   branches/SAMBA_3_0_26/source/nsswitch/idmap.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_async.c
   branches/SAMBA_3_0_26/source/rpc_client/cli_svcctl.c
   branches/SAMBA_3_0_26/source/rpc_server/srv_lsa_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/modules/vfs_afsacl.c
===
--- branches/SAMBA_3_0/source/modules/vfs_afsacl.c  2007-05-04 19:44:30 UTC 
(rev 22674)
+++ branches/SAMBA_3_0/source/modules/vfs_afsacl.c  2007-05-04 22:01:26 UTC 
(rev 22675)
@@ -616,7 +616,7 @@
uid_to_sid(owner_sid, sbuf.st_uid);
gid_to_sid(group_sid, sbuf.st_gid);
 
-   if (num_aces) {
+   if (afs_acl-num_aces) {
nt_ace_list = TALLOC_ARRAY(mem_ctx, SEC_ACE, afs_acl-num_aces);
 
if (nt_ace_list == NULL)

Modified: branches/SAMBA_3_0/source/nsswitch/idmap.c
===
--- branches/SAMBA_3_0/source/nsswitch/idmap.c  2007-05-04 19:44:30 UTC (rev 
22674)
+++ branches/SAMBA_3_0/source/nsswitch/idmap.c  2007-05-04 22:01:26 UTC (rev 
22675)
@@ -1025,17 +1025,16 @@
DEBUG(10, (Query backends to map sids-ids\n));
 
/* split list per domain */
-
-   if (num_domains) {
-   dom_ids = TALLOC_ZERO_ARRAY(ctx, struct id_map **, num_domains);
-   IDMAP_CHECK_ALLOC(dom_ids);
-   counters = TALLOC_ZERO_ARRAY(ctx, int, num_domains);
-   IDMAP_CHECK_ALLOC(counters);
-   } else {
-   dom_ids = NULL;
-   counters = NULL;
+   if (num_domains == 0) {
+   DEBUG(1, (No domains available?\n));
+   return NT_STATUS_UNSUCCESSFUL;
}
 
+   dom_ids = TALLOC_ZERO_ARRAY(ctx, struct id_map **, num_domains);
+   IDMAP_CHECK_ALLOC(dom_ids);
+   counters = TALLOC_ZERO_ARRAY(ctx, int, num_domains);
+   IDMAP_CHECK_ALLOC(counters);
+
/* partition the requests by domain */
 
for (i = 0; ids[i]; i++) {

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_async.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_async.c 2007-05-04 19:44:30 UTC 
(rev 22674)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_async.c 2007-05-04 22:01:26 UTC 
(rev 22675)
@@ -273,6 +273,11 @@
 
DEBUG(3, ([%5lu]: sids to unix ids\n, (unsigned long)state-pid));
 
+   if (state-request.extra_len == 0) {
+   DEBUG(0, (Invalid buffer size!\n));
+   return WINBINDD_ERROR;
+   }
+
sids = (DOM_SID *)state-request.extra_data.data;
num = state-request.extra_len / sizeof(DOM_SID);
 

Modified: branches/SAMBA_3_0/source/rpc_client/cli_svcctl.c
===
--- branches/SAMBA_3_0/source/rpc_client/cli_svcctl.c   2007-05-04 19:44:30 UTC 
(rev 22674)
+++ branches/SAMBA_3_0/source/rpc_client/cli_svcctl.c   2007-05-04 22:01:26 UTC 
(rev 22675)
@@ -209,8 +209,12 @@
return out.status;

/* pull out the data */
-   if ( !(services = TALLOC_ARRAY( mem_ctx, ENUM_SERVICES_STATUS, 
out.returned )) ) 
-   return WERR_NOMEM;
+   if (out.returned) {
+   if ( !(services = TALLOC_ARRAY( mem_ctx, ENUM_SERVICES_STATUS, 
out.returned )) ) 
+   return WERR_NOMEM;
+   } else {
+   services = NULL;
+   }

for ( i=0; iout.returned; i++ ) {
svcctl_io_enum_services_status( , services[i], out.buffer, 
0 );

Modified: branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c   2007-05-04 19:44:30 UTC 
(rev 22674)
+++ branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c   2007-05-04 22:01:26 UTC 
(rev 22675)
@@ -825,7 +825,11 @@
*pp_mapped_count = 0;
*pp_ref = NULL;
*pp_names = NULL;
-   
+
+   if (num_sids == 0) {
+   return NT_STATUS_OK;
+   }
+
names = 

svn commit: samba r22676 - in branches: SAMBA_3_0/source/rpc_parse SAMBA_3_0_25/source/rpc_parse SAMBA_3_0_26/source/rpc_parse

2007-05-04 Thread jra
Author: jra
Date: 2007-05-04 22:15:33 + (Fri, 04 May 2007)
New Revision: 22676

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

Log:
Fix zero alloc with create_rpc_blob().
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
   branches/SAMBA_3_0_25/source/rpc_parse/parse_misc.c
   branches/SAMBA_3_0_26/source/rpc_parse/parse_misc.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_misc.c2007-05-04 22:01:26 UTC 
(rev 22675)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_misc.c2007-05-04 22:15:33 UTC 
(rev 22676)
@@ -483,12 +483,17 @@
  Allocate the RPC_DATA_BLOB memory.
 /
 
-size_t create_rpc_blob(RPC_DATA_BLOB *str, size_t len)
+static void create_rpc_blob(RPC_DATA_BLOB *str, size_t len)
 {
-   str-buffer = (uint8 *)TALLOC_ZERO(get_talloc_ctx(), len);
-   if (str-buffer == NULL)
-   smb_panic(create_rpc_blob: talloc fail\n);
-   return len;
+   if (len) {
+   str-buffer = (uint8 *)TALLOC_ZERO(get_talloc_ctx(), len);
+   if (str-buffer == NULL)
+   smb_panic(create_rpc_blob: talloc fail\n);
+   str-buf_len = len;
+   } else {
+   str-buffer = NULL;
+   str-buf_len = 0;
+   }
 }
 
 /***
@@ -500,7 +505,7 @@
ZERO_STRUCTP(str);
 
/* set up string lengths. */
-   str-buf_len = create_rpc_blob(str, sizeof(uint32));
+   create_rpc_blob(str, sizeof(uint32));
SIVAL(str-buffer, 0, val);
 }
 
@@ -513,9 +518,10 @@
ZERO_STRUCTP(str);
 
/* set up string lengths. */
-   str-buf_len = create_rpc_blob(str, len*2);
-   rpcstr_push(str-buffer, buf, (size_t)str-buf_len, STR_TERMINATE);
-   
+   if (len) {
+   create_rpc_blob(str, len*2);
+   rpcstr_push(str-buffer, buf, (size_t)str-buf_len, 
STR_TERMINATE);
+   }
 }
 
 /***
@@ -525,8 +531,10 @@
 void init_rpc_blob_hex(RPC_DATA_BLOB *str, const char *buf)
 {
ZERO_STRUCTP(str);
-   str-buf_len = create_rpc_blob(str, strlen(buf));
-   str-buf_len = strhex_to_str((char *)str-buffer, str-buf_len, buf);
+   if (buf  *buf) {
+   create_rpc_blob(str, strlen(buf));
+   str-buf_len = strhex_to_str((char *)str-buffer, str-buf_len, 
buf);
+   }
 }
 
 /***
@@ -538,8 +546,8 @@
ZERO_STRUCTP(str);
 
/* max buffer size (allocated size) */
-   if (buf != NULL) {
-   len = create_rpc_blob(str, len);
+   if (buf != NULL  len) {
+   create_rpc_blob(str, len);
memcpy(str-buffer, buf, len);
}
str-buf_len = len;

Modified: branches/SAMBA_3_0_25/source/rpc_parse/parse_misc.c
===
--- branches/SAMBA_3_0_25/source/rpc_parse/parse_misc.c 2007-05-04 22:01:26 UTC 
(rev 22675)
+++ branches/SAMBA_3_0_25/source/rpc_parse/parse_misc.c 2007-05-04 22:15:33 UTC 
(rev 22676)
@@ -530,12 +530,17 @@
  Allocate the RPC_DATA_BLOB memory.
 /
 
-size_t create_rpc_blob(RPC_DATA_BLOB *str, size_t len)
+static void create_rpc_blob(RPC_DATA_BLOB *str, size_t len)
 {
-   str-buffer = (uint8 *)TALLOC_ZERO(get_talloc_ctx(), len);
-   if (str-buffer == NULL)
-   smb_panic(create_rpc_blob: talloc fail\n);
-   return len;
+   if (len) {
+   str-buffer = (uint8 *)TALLOC_ZERO(get_talloc_ctx(), len);
+   if (str-buffer == NULL)
+   smb_panic(create_rpc_blob: talloc fail\n);
+   str-buf_len = len;
+   } else {
+   str-buffer = NULL;
+   str-buf_len = 0;
+   }
 }
 
 /***
@@ -547,7 +552,7 @@
ZERO_STRUCTP(str);
 
/* set up string lengths. */
-   str-buf_len = create_rpc_blob(str, sizeof(uint32));
+   create_rpc_blob(str, sizeof(uint32));
SIVAL(str-buffer, 0, val);
 }
 
@@ -560,9 +565,10 @@
ZERO_STRUCTP(str);
 
/* set up string lengths. */
-   str-buf_len = create_rpc_blob(str, len*2);
-   rpcstr_push(str-buffer, buf, (size_t)str-buf_len, STR_TERMINATE);
-   
+   if (len) {
+   create_rpc_blob(str, len*2);
+   rpcstr_push(str-buffer, buf, (size_t)str-buf_len, 
STR_TERMINATE);
+   }
 }
 
 /***
@@ -572,8 +578,10 @@
 void init_rpc_blob_hex(RPC_DATA_BLOB *str, const char *buf)
 {

svn commit: samba r22677 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_26/source/nsswitch

2007-05-04 Thread idra
Author: idra
Date: 2007-05-04 22:41:35 + (Fri, 04 May 2007)
New Revision: 22677

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

Log:

One line fix to make net idmap restore work again

Jerry, please add this for 3.0.25 final


Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_async.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_async.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_async.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_async.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_async.c 2007-05-04 22:15:33 UTC 
(rev 22676)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_async.c 2007-05-04 22:41:35 UTC 
(rev 22677)
@@ -163,6 +163,7 @@
map.sid = sid;
map.xid.id = state-request.data.dual_idmapset.id;
map.xid.type = state-request.data.dual_idmapset.type;
+   map.status = ID_MAPPED;
 
result = idmap_set_mapping(map);
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;

Modified: branches/SAMBA_3_0_25/source/nsswitch/winbindd_async.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/winbindd_async.c  2007-05-04 
22:15:33 UTC (rev 22676)
+++ branches/SAMBA_3_0_25/source/nsswitch/winbindd_async.c  2007-05-04 
22:41:35 UTC (rev 22677)
@@ -163,6 +163,7 @@
map.sid = sid;
map.xid.id = state-request.data.dual_idmapset.id;
map.xid.type = state-request.data.dual_idmapset.type;
+   map.status = ID_MAPPED;
 
result = idmap_set_mapping(map);
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;

Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd_async.c
===
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd_async.c  2007-05-04 
22:15:33 UTC (rev 22676)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd_async.c  2007-05-04 
22:41:35 UTC (rev 22677)
@@ -163,6 +163,7 @@
map.sid = sid;
map.xid.id = state-request.data.dual_idmapset.id;
map.xid.type = state-request.data.dual_idmapset.type;
+   map.status = ID_MAPPED;
 
result = idmap_set_mapping(map);
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;



Build status as of Sat May 5 00:00:02 2007

2007-05-04 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-05-04 
00:00:46.0 +
+++ /home/build/master/cache/broken_results.txt 2007-05-05 00:01:20.0 
+
@@ -1,25 +1,25 @@
-Build status as of Fri May  4 00:00:02 2007
+Build status as of Sat May  5 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   36 5  0 
+ccache   35 5  0 
 ctdb 0  0  0 
 distcc   3  0  0 
-ldb  35 10 0 
-libreplace   33 11 0 
-lorikeet-heimdal 31 16 0 
-pidl 19 16 0 
+ldb  34 10 0 
+libreplace   32 12 0 
+lorikeet-heimdal 29 14 0 
+pidl 18 7  0 
 ppp  15 0  0 
 python   0  0  0 
-rsync36 19 0 
+rsync35 19 0 
 samba0  0  0 
 samba-docs   0  0  0 
 samba-gtk4  4  0 
-samba4   37 33 4 
-samba_3_041 41 1 
-smb-build32 31 0 
-talloc   36 2  0 
-tdb  35 3  0 
+samba4   36 29 4 
+samba_3_040 40 1 
+smb-build31 30 0 
+talloc   35 3  0 
+tdb  33 5  0 
 


Rev 12009: Merge upstream. in file:///home/jelmer/bzr.samba/python/

2007-05-04 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 12009
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: python
timestamp: Sat 2007-05-05 02:02:47 +0200
message:
  Merge upstream.
added:
  source/lib/ldb/external/   svn-v2:[EMAIL PROTECTED]
  source/lib/ldb/external/libpopt.m4 svn-v2:[EMAIL PROTECTED]
  source/lib/ldb/external/libtalloc.m4 svn-v2:[EMAIL PROTECTED]
  source/lib/ldb/external/libtdb.m4 svn-v2:[EMAIL PROTECTED]
  source/lib/ldb/external/pkg.m4 svn-v2:[EMAIL PROTECTED]
modified:
  .bzrignore svn-v2:[EMAIL PROTECTED]
  source/auth/gensec/gensec_gssapi.c svn-v2:[EMAIL PROTECTED]
  source/auth/kerberos/krb5_init_context.c svn-v2:[EMAIL PROTECTED]
  source/build/m4/check_ld.m4svn-v2:[EMAIL PROTECTED]
  source/lib/events/events_aio.c svn-v2:[EMAIL PROTECTED]
  source/lib/events/events_epoll.c svn-v2:[EMAIL PROTECTED]
  source/lib/events/events_internal.h svn-v2:[EMAIL PROTECTED]
  source/lib/events/events_select.c svn-v2:[EMAIL PROTECTED]
  source/lib/events/events_standard.c svn-v2:[EMAIL PROTECTED]
  source/lib/events/events_timed.c svn-v2:[EMAIL PROTECTED]
  source/lib/ldb/autogen.sh  svn-v2:[EMAIL PROTECTED]
  source/lib/ldb/configure.acsvn-v2:[EMAIL PROTECTED]
  source/lib/ldb/include/includes.h svn-v2:[EMAIL PROTECTED]
  source/lib/replace/autoconf-2.60.m4 svn-v2:[EMAIL PROTECTED]
  source/lib/replace/test/testsuite.c svn-v2:[EMAIL PROTECTED]
  source/lib/tdb/Makefile.in svn-v2:[EMAIL PROTECTED]
  source/lib/tdb/configure.acsvn-v2:[EMAIL PROTECTED]
  source/libnet/libnet_passwd.c  svn-v2:[EMAIL PROTECTED]
  source/libnet/libnet_rpc.c svn-v2:[EMAIL PROTECTED]
  source/torture/raw/notify.csvn-v2:[EMAIL PROTECTED]

revno: 11989.1.104
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: mimir
timestamp: Fri 2007-05-04 18:59:51 +
message:
  use composite_create calls instead of talloc_zero.
  
  
  rafal

revno: 11989.1.103
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: tridge
timestamp: Fri 2007-05-04 12:41:28 +
message:
  
  changed the RAW-NOTIFY test to support clustered testing (two nodes)

revno: 11989.1.102
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: metze
timestamp: Fri 2007-05-04 11:26:25 +
message:
  fix uninitialized element which was causing a crash with 'net password 
set'
  
  metze

revno: 11989.1.101
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: jelmer
timestamp: Fri 2007-05-04 11:08:53 +
message:
  Fix ldb build

revno: 11989.1.100.1.1
merged: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Fri 2007-05-04 13:08:32 +0200
message:
  Fix ldb build

revno: 11989.1.100
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: metze
timestamp: Fri 2007-05-04 10:44:41 +
message:
  revert revision 22640 as it breaks nested structs in idl
  
  metze

revno: 11989.1.99
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: jelmer
timestamp: Fri 2007-05-04 10:02:47 +
message:
  Change version back to 0.9.

revno: 11989.1.98.1.1
merged: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Fri 2007-05-04 13:02:19 +0200
message:
  Change version back to 0.9.

revno: 11989.1.98
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: metze
timestamp: Fri 2007-05-04 09:35:01 +
message:
  disable shared library support on Tru64
  
  metze 

revno: 11989.1.97
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: metze
timestamp: Fri 

Rev 252: - added counters for controls in ctdb_control status in http://samba.org/~tridge/ctdb

2007-05-04 Thread tridge

revno: 252
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Sat 2007-05-05 08:11:54 +1000
message:
  - added counters for controls in ctdb_control status
modified:
  common/ctdb.c  ctdb.c-20061127094323-t50f58d65iaao5of-2
  common/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  tools/ctdb_control.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1

Diff too large for email (306, the limit is 200).


Rev 253: - fixed a crash bug after client disconnect in ctdb_control in http://samba.org/~tridge/ctdb

2007-05-04 Thread tridge

revno: 253
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Sat 2007-05-05 08:33:35 +1000
message:
  - fixed a crash bug after client disconnect in ctdb_control
  - added total memory used to ctdb_control status output
modified:
  common/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  tools/ctdb_control.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1
=== modified file 'common/ctdb_control.c'
--- a/common/ctdb_control.c 2007-05-04 22:11:54 +
+++ b/common/ctdb_control.c 2007-05-04 22:33:35 +
@@ -158,6 +158,7 @@
case CTDB_CONTROL_STATUS: {
CHECK_CONTROL_DATA_SIZE(0);
ctdb-status.controls.status++;
+   ctdb-status.memory_used = talloc_total_size(ctdb);
outdata-dptr = (uint8_t *)ctdb-status;
outdata-dsize = sizeof(ctdb-status);
return 0;
@@ -499,8 +500,11 @@
data.dptr = c-data[0];
data.dsize = c-datalen;
 
+   /* make state a child of the packet, so it goes away when the packet
+  is freed. */
+   talloc_steal(hdr, state);
+
state-callback(ctdb, c-status, data, state-private_data);
-   talloc_free(state);
 }
 
 static int ctdb_control_destructor(struct ctdb_control_state *state)
@@ -528,7 +532,9 @@
return -1;
}
 
-   state = talloc(ctdb, struct ctdb_control_state);
+   /* the state is made a child of private_data if possible. This means 
any reply
+  will be discarded if the private_data goes away */
+   state = talloc(private_data?private_data:ctdb, struct 
ctdb_control_state);
CTDB_NO_MEMORY(ctdb, state);
 
state-reqid = ctdb_reqid_new(ctdb, state);

=== modified file 'include/ctdb_private.h'
--- a/include/ctdb_private.h2007-05-04 22:11:54 +
+++ b/include/ctdb_private.h2007-05-04 22:33:35 +
@@ -175,6 +175,7 @@
uint32_t lockwait_calls;
uint32_t traverse_calls;
uint32_t pending_lockwait_calls;
+   uint32_t memory_used;
uint32_t __last_counter; /* hack for control_status_all */
uint32_t max_hop_count;
double max_call_latency;

=== modified file 'tools/ctdb_control.c'
--- a/tools/ctdb_control.c  2007-05-04 22:11:54 +
+++ b/tools/ctdb_control.c  2007-05-04 22:33:35 +
@@ -135,6 +135,7 @@
STATUS_FIELD(lockwait_calls),
STATUS_FIELD(traverse_calls),
STATUS_FIELD(pending_lockwait_calls),
+   STATUS_FIELD(memory_used),
STATUS_FIELD(max_hop_count),
};
printf(CTDB version %u\n, CTDB_VERSION);



Rev 254: added a dumpmemory control, used to find memory leaks in http://samba.org/~tridge/ctdb

2007-05-04 Thread tridge

revno: 254
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Sat 2007-05-05 11:03:10 +1000
message:
  added a dumpmemory control, used to find memory leaks
modified:
  common/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  tools/ctdb_control.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1
=== modified file 'common/ctdb_control.c'
--- a/common/ctdb_control.c 2007-05-04 22:33:35 +
+++ b/common/ctdb_control.c 2007-05-05 01:03:10 +
@@ -164,6 +164,12 @@
return 0;
}
 
+   case CTDB_CONTROL_DUMP_MEMORY: {
+   CHECK_CONTROL_DATA_SIZE(0);
+   talloc_report_full(ctdb, stdout);
+   return 0;
+   }
+
case CTDB_CONTROL_STATUS_RESET: {
CHECK_CONTROL_DATA_SIZE(0);
ZERO_STRUCT(ctdb-status);

=== modified file 'include/ctdb_private.h'
--- a/include/ctdb_private.h2007-05-04 22:33:35 +
+++ b/include/ctdb_private.h2007-05-05 01:03:10 +
@@ -306,6 +306,7 @@
CTDB_CONTROL_ENABLE_SEQNUM,
CTDB_CONTROL_UPDATE_SEQNUM,
CTDB_CONTROL_SET_SEQNUM_FREQUENCY,
+   CTDB_CONTROL_DUMP_MEMORY,
 };
 
 

=== modified file 'tools/ctdb_control.c'
--- a/tools/ctdb_control.c  2007-05-04 22:33:35 +
+++ b/tools/ctdb_control.c  2007-05-05 01:03:10 +
@@ -935,6 +935,28 @@
 }
 
 /*
+  dump memory usage
+ */
+static int control_dumpmemory(struct ctdb_context *ctdb, int argc, const char 
**argv)
+{
+
+   uint32_t vnn;
+   if (argc  1) {
+   usage();
+   }
+   if (strcmp(argv[0], all) == 0) {
+   vnn = CTDB_BROADCAST_VNN;
+   } else {
+   vnn = strtoul(argv[0], NULL, 0);
+   }
+
+   ctdb_control(ctdb, vnn, 0, CTDB_CONTROL_DUMP_MEMORY,
+CTDB_CTRL_FLAG_NOREPLY, tdb_null, NULL, NULL, NULL, NULL);
+
+   return 0;
+}
+
+/*
   main program
 */
 int main(int argc, const char *argv[])
@@ -976,6 +998,7 @@
{ recover, control_recover },
{ writerecord, control_writerecord },
{ attach, control_attach },
+   { dumpmemory, control_dumpmemory },
};
 
pc = poptGetContext(argv[0], argc, argv, popt_options, 
POPT_CONTEXT_KEEP_FIRST);



Rev 255: show number of connected clients in status output in http://samba.org/~tridge/ctdb

2007-05-04 Thread tridge

revno: 255
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Sat 2007-05-05 14:09:46 +1000
message:
  show number of connected clients in status output
modified:
  common/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  common/ctdb_daemon.c   ctdb_daemon.c-20070409200331-3el1kqgdb9m4ib0g-1
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  tools/ctdb_control.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1
=== modified file 'common/ctdb_control.c'
--- a/common/ctdb_control.c 2007-05-05 01:03:10 +
+++ b/common/ctdb_control.c 2007-05-05 04:09:46 +
@@ -359,7 +359,7 @@
case CTDB_CONTROL_PING:
CHECK_CONTROL_DATA_SIZE(0);
ctdb-status.controls.ping++;
-   return ctdb-num_clients;
+   return ctdb-status.num_clients;
 
case CTDB_CONTROL_GET_DBNAME: {
uint32_t db_id;

=== modified file 'common/ctdb_daemon.c'
--- a/common/ctdb_daemon.c  2007-05-04 01:41:29 +
+++ b/common/ctdb_daemon.c  2007-05-05 04:09:46 +
@@ -248,7 +248,7 @@
 static int ctdb_client_destructor(struct ctdb_client *client)
 {
ctdb_reqid_remove(client-ctdb, client-client_id);
-   client-ctdb-num_clients--;
+   client-ctdb-status.num_clients--;
close(client-fd);
client-fd = -1;
return 0;
@@ -559,7 +559,7 @@
client-ctdb = ctdb;
client-fd = fd;
client-client_id = ctdb_reqid_new(ctdb, client);
-   ctdb-num_clients++;
+   ctdb-status.num_clients++;
 
client-queue = ctdb_queue_setup(ctdb, client, fd, CTDB_DS_ALIGNMENT, 
 ctdb_daemon_read_cb, client);

=== modified file 'include/ctdb_private.h'
--- a/include/ctdb_private.h2007-05-05 01:03:10 +
+++ b/include/ctdb_private.h2007-05-05 04:09:46 +
@@ -131,6 +131,7 @@
   ctdb status information
  */
 struct ctdb_status {
+   uint32_t num_clients;
uint32_t client_packets_sent;
uint32_t client_packets_recv;
uint32_t node_packets_sent;

=== modified file 'tools/ctdb_control.c'
--- a/tools/ctdb_control.c  2007-05-05 01:03:10 +
+++ b/tools/ctdb_control.c  2007-05-05 04:09:46 +
@@ -97,6 +97,7 @@
uint32_t offset;
} fields[] = {
 #define STATUS_FIELD(n) { #n, offsetof(struct ctdb_status, n) }
+   STATUS_FIELD(num_clients),
STATUS_FIELD(client_packets_sent),
STATUS_FIELD(client_packets_recv),
STATUS_FIELD(node_packets_sent),