Re: [Samba] Samba Freezes accessing shares/ low performance

2012-01-04 Thread Volker Lendecke
On Tue, Jan 03, 2012 at 11:26:06PM +, Vasco Leal wrote:
 When accessing the shares on my samba server, it sometimes freezes,
 i have the lateste version, 3.6.1, mas since version 3.4 wish was
 the first i used, i've been running into this problems. When i try
 to browse the shares, many times, like 1 in 10, it freezes and
 sometimes, when saving files, it fails at the first command and only
 at the second command to save it does so.
 
 My other problem is with samba very low performance, i have 50
 computers on the office, have 1000mbps connections, 3 1000mbps ports
 being used just for samba as a bond, and still the performance is
 very low, my server is a hp dl380 g6 with 24GB of memory, dual xeon
 at 2.4Ghz and 2 Sas controllers with 1024MB memory each, so i
 shouldn't be experiencing any delay. I'll Put a dump of both my
 smb.conf  and smbd.log.
 
 Hope to get Some Help cause this is driving me crazy!!!
 
 *smb.conf*
 
 #Date: 2011/02/19 00:34:22
 
 [global]
 
 security = user
 
 workgroup = NLAdomain
 
 netbios aliases = NLSRV
 
 server string = NLSRV
 
 name resolve order = wins host bcast
 
 socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
 SO_RCVBUF=65536 SO_SNDBUF=65536

Please remove the SO_RCVBUF and SO_SNDBUF options.

 log level = 4

For maximum performance, log level = 1 is sufficient,
although 4 should not affect it badly yet.
 
 max log size = 50

This is very, very small.

 max xmit = 65535

Please remove this parameter.

If transfers are still slow or stall, I would investigate
the hardware you are using. It can be anything from bad
network cables to flaky disks, something which is difficult
to judge without direct machine access. Trying transfer via
ftp might give you hints.

With best regards,

Volker Lendecke

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-37-0, fax: +49-551-37-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kont...@sernet.de
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] The Group Policy Client service failed the logon. Access is denied.

2012-01-04 Thread TAKAHASHI Motonobu
From: Mat Enders mat.end...@gmail.com
Date: Wed, 4 Jan 2012 02:38:57 -0500

   Let give the background.  We replaced our PDC with a new
 machine.  Both old and new machines are running Debian 6.0 Squeeze and
 Samba 3.5.6.  moved all data and user accounts to new server.
(snip)
 However on the Win7 machines none
 of the network users can log in to the machine.  Upon attempting you
 get the this error The Group Policy Client service failed the logon.
 Access is denied.  After Googling around for a solution I have
 attempted the following solutions:

You re-created all Samba users?
I met same issue when I re-used passdb.tdb from old machine, because
old machine's SID and new machine's SID was not same.

Or to edit all users' SID manually, the issue will be solved, I think.

---
TAKAHASHI Motonobu mo...@samba.gr.jp
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] The Group Policy Client service failed the logon. Access is denied.

2012-01-04 Thread Vasco Leal

Hey There Mat,

Have You Changed The Windows 7 Laman Compatilibility and that stuff on 
Windows 7?


Best Regards,
Vasco Leónidas Pinto Leal
IT Director
JUZO - Informática e Serviços, Lda

Mozilla Thunderbird, The Mail Rebirth!

Still Stucked With Windows? Give Linux a Try And Enhance Your Work!


Em 04-01-2012 07:38, Mat Enders escreveu:

Hello all,

   Let give the background.  We replaced our PDC with a new
machine.  Both old and new machines are running Debian 6.0 Squeeze and
Samba 3.5.6.  moved all data and user accounts to new server.  New
server has the exact same configuration files as the old server.  All
machines have been rejoined to the domain both WinXP and Win7.  The
WinXP machines work perfectly all domain users can login with their
roaming profiles and all is good.  However on the Win7 machines none
of the network users can log in to the machine.  Upon attempting you
get the this error The Group Policy Client service failed the logon.
Access is denied.  After Googling around for a solution I have
attempted the following solutions:

1) Delete the roaming profile
Machine recreates the roaming profile but denies login
2) Delete registry key from
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrent
VersionProfilelist[USERSKEY]
Machine recreates the key but denies login
3) Both 12 at the same time
Machine recreates the roaming profile and the key but denies login

Any pointers would be greatly appreciated see smb.conf file below.


[global]
smb passwd file = /etc/samba/passdb.tdb
enable privileges = yes
logon drive = H:
domain master = yes
encrypt passwords = true
logon home = \\%L\%U
netbios name = ARDVARC
server string = Gaudior's PDC
logon script = logon.bat
local master = yes
workgroup = GAUACA
logon path = \\%L\%U\profile
os level = 99
security = user
add machine script = /usr/sbin/useradd -s /bin/false \-d /dev/null %u
preferred master = yes
domain logons = yes
hide files = /desktop.ini/$RECYCLE.BIN/profile/profile.V2/
guest account = nobody
map to guest = bad user
wins support = yes

[staff]
comment = staff share drive
path = /home/staff/share
read only = no
;valid users =

[student]
comment = student share by level
path = /home/student/share
read only = no

[netlogon]
comment = Net Logon Service
path = /home/netlogon
read only = yes
write list = root
public = yes
guest ok = yes
browsable = no

[homes]
comment = Home
valid users = %S
read only = no
browsable = no



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


[Samba] issues with printing

2012-01-04 Thread Tom Ryan
We have recently started having an odd problem with printing via samba (3.6.1). 
Samba is joined via security = ads to our domain. We do not use winbind on this 
system. Our account usernames are provided via openldap.

User starts system (generally windows 7 64bit, but we've seen it on 32bit 
windows 7 and XP), sometimes they can print, sometimes they can't. If they 
reboot, they can almost always print.

I've turned the logging up to level 3 and have noticed repeated errors like

[2012/01/04 09:10:32.252107,  2] auth/auth.c:319(check_ntlm_password)
  check_ntlm_password:  Authentication for user [MACHINENAME$] - 
[MACHINENAME$] FAILED with error NT_STATUS_NO_SUCH_USER
[2012/01/04 09:10:32.252212,  3] smbd/error.c:81(error_packet_set)
  error packet at smbd/sesssetup.c(124) cmd=115 (SMBsesssetupX) 
NT_STATUS_LOGON_FAILURE

Which I suspect has to do with the lack of winbind and not having machine names 
in our ldap service.

I should note that this all worked perfectly up until a few weeks ago and then 
just started breaking randomly.. Isn't that always the case?

I appreciate any pointers.

Thanks.

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


Re: [Samba] issues with printing

2012-01-04 Thread Tom Ryan


On 1/4/12 9:13 AM, Tom Ryan tomr...@camlaw.rutgers.edu wrote:

We have recently started having an odd problem with printing via samba
(3.6.1). Samba is joined via security = ads to our domain. We do not use
winbind on this system. Our account usernames are provided via openldap.

User starts system (generally windows 7 64bit, but we've seen it on 32bit
windows 7 and XP), sometimes they can print, sometimes they can't. If
they reboot, they can almost always print.

I've turned the logging up to level 3 and have noticed repeated errors
like

[2012/01/04 09:10:32.252107,  2] auth/auth.c:319(check_ntlm_password)
  check_ntlm_password:  Authentication for user [MACHINENAME$] -
[MACHINENAME$] FAILED with error NT_STATUS_NO_SUCH_USER
[2012/01/04 09:10:32.252212,  3] smbd/error.c:81(error_packet_set)
  error packet at smbd/sesssetup.c(124) cmd=115 (SMBsesssetupX)
NT_STATUS_LOGON_FAILURE

Which I suspect has to do with the lack of winbind and not having machine
names in our ldap service.

I should note that this all worked perfectly up until a few weeks ago and
then just started breaking randomly.. Isn't that always the case?

I appreciate any pointers.
Thanks.

Tom

I've included a full log from a failed print session here:

http://pastebin.com/WBA4PEnG

Thanks for any consideration.

Tom

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


[Samba] Integrate windows ADS Connection

2012-01-04 Thread Jessica Guynn
Creating a samba connection through windows 2008 ADS.  I was able to add my
ubuntu machine as a member of the windows 2008 domain but after following
this tutorial to create the samba connection
http://www.ubuntugeek.com/how-to-integrate-windows-active-directory-and-samba-in-ubuntu.html
I
can no longer login with domain users.  My nsswitch.conf, krb5.conf, and
smb.conf files are pasted in:  http://pastebin.com/VKphVVwg
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Integrate windows ADS Connection

2012-01-04 Thread Jessica Guynn
Forgot to add, using likewise-open to add the ubuntu machine to the windows
ads.

On Wed, Jan 4, 2012 at 7:20 AM, Jessica Guynn jessgu...@gmail.com wrote:

 Creating a samba connection through windows 2008 ADS.  I was able to add
 my ubuntu machine as a member of the windows 2008 domain but after
 following this tutorial to create the samba connection
 http://www.ubuntugeek.com/how-to-integrate-windows-active-directory-and-samba-in-ubuntu.html
  I
 can no longer login with domain users.  My nsswitch.conf, krb5.conf, and
 smb.conf files are pasted in:  http://pastebin.com/VKphVVwg



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


Re: [Samba] Integrate windows ADS Connection

2012-01-04 Thread Volker Lendecke
On Wed, Jan 04, 2012 at 07:29:11AM -0800, Jessica Guynn wrote:
 Forgot to add, using likewise-open to add the ubuntu machine to the windows
 ads.
 
 On Wed, Jan 4, 2012 at 7:20 AM, Jessica Guynn jessgu...@gmail.com wrote:
 
  Creating a samba connection through windows 2008 ADS.  I was able to add
  my ubuntu machine as a member of the windows 2008 domain but after
  following this tutorial to create the samba connection
  http://www.ubuntugeek.com/how-to-integrate-windows-active-directory-and-samba-in-ubuntu.html
   I
  can no longer login with domain users.  My nsswitch.conf, krb5.conf, and
  smb.conf files are pasted in:  http://pastebin.com/VKphVVwg

Can you try to take likewise-open out of the picture? Samba
with winbind has excellent domain membership features. What
are the specific likewise open features that you require
that winbind can not provide to you?

With best regards,

Volker Lendecke

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-37-0, fax: +49-551-37-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kont...@sernet.de
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] The Group Policy Client service failed the logon. Access is denied.

2012-01-04 Thread Mat Enders
I did not ruse the old tdb I recreated all of the users from scratch and moved 
their home directory data then chown their home directories to give correct 
owner and group of files. I do not create the  Samba users I have it set so 
when I create a new Linux user the Samba user is created. If it where the tdb 
wouldn't their be problems when logging in to an XP machine. 
--Original Message--
From: TAKAHASHI Motonobu
To: Menders
Cc: samba@lists.samba.org
Subject: Re: [Samba] The Group Policy Client service failed the logon. Access 
is denied.
Sent: Jan 4, 2012 04:20

From: Mat Enders mat.end...@gmail.com
Date: Wed, 4 Jan 2012 02:38:57 -0500

   Let give the background.  We replaced our PDC with a new
 machine.  Both old and new machines are running Debian 6.0 Squeeze and
 Samba 3.5.6.  moved all data and user accounts to new server.
(snip)
 However on the Win7 machines none
 of the network users can log in to the machine.  Upon attempting you
 get the this error The Group Policy Client service failed the logon.
 Access is denied.  After Googling around for a solution I have
 attempted the following solutions:

You re-created all Samba users?
I met same issue when I re-used passdb.tdb from old machine, because
old machine's SID and new machine's SID was not same.

Or to edit all users' SID manually, the issue will be solved, I think.

---
TAKAHASHI Motonobu mo...@samba.gr.jp

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


Re: [Samba] The Group Policy Client service failed the logon. Access is denied.

2012-01-04 Thread Mat Enders
Yes all machines worked with the old PDC. And the Win7 machines joined the 
domain. User just cannot login. 
Mat Enders from my BlackBerry®

-Original Message-
From: Vasco Leal vl...@juzo-informatica.pt
Sender: samba-boun...@lists.samba.org
Date: Wed, 04 Jan 2012 10:35:44 
To: samba@lists.samba.org
Subject: Re: [Samba] The Group Policy Client service failed the logon.
 Access is denied.

Hey There Mat,

Have You Changed The Windows 7 Laman Compatilibility and that stuff on 
Windows 7?

Best Regards,
Vasco Leónidas Pinto Leal
IT Director
JUZO - Informática e Serviços, Lda

Mozilla Thunderbird, The Mail Rebirth!

Still Stucked With Windows? Give Linux a Try And Enhance Your Work!


Em 04-01-2012 07:38, Mat Enders escreveu:
 Hello all,

Let give the background.  We replaced our PDC with a new
 machine.  Both old and new machines are running Debian 6.0 Squeeze and
 Samba 3.5.6.  moved all data and user accounts to new server.  New
 server has the exact same configuration files as the old server.  All
 machines have been rejoined to the domain both WinXP and Win7.  The
 WinXP machines work perfectly all domain users can login with their
 roaming profiles and all is good.  However on the Win7 machines none
 of the network users can log in to the machine.  Upon attempting you
 get the this error The Group Policy Client service failed the logon.
 Access is denied.  After Googling around for a solution I have
 attempted the following solutions:

 1) Delete the roaming profile
 Machine recreates the roaming profile but denies login
 2) Delete registry key from
 HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrent
 VersionProfilelist[USERSKEY]
 Machine recreates the key but denies login
 3) Both 12 at the same time
 Machine recreates the roaming profile and the key but denies login

 Any pointers would be greatly appreciated see smb.conf file below.


 [global]
   smb passwd file = /etc/samba/passdb.tdb
   enable privileges = yes
   logon drive = H:
   domain master = yes
   encrypt passwords = true
   logon home = \\%L\%U
   netbios name = ARDVARC
   server string = Gaudior's PDC
   logon script = logon.bat
   local master = yes
   workgroup = GAUACA
   logon path = \\%L\%U\profile
   os level = 99
   security = user
   add machine script = /usr/sbin/useradd -s /bin/false \-d /dev/null %u
   preferred master = yes
   domain logons = yes
   hide files = /desktop.ini/$RECYCLE.BIN/profile/profile.V2/
   guest account = nobody
   map to guest = bad user
   wins support = yes

 [staff]
   comment = staff share drive
   path = /home/staff/share
   read only = no
   ;valid users =

 [student]
   comment = student share by level
   path = /home/student/share
   read only = no

 [netlogon]
   comment = Net Logon Service
   path = /home/netlogon
   read only = yes
   write list = root
   public = yes
   guest ok = yes
   browsable = no

 [homes]
   comment = Home
   valid users = %S
   read only = no
   browsable = no


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


[Samba] Fwd: Re: Samba Freezes accessing shares/ low performance

2012-01-04 Thread Vasco Leal
Thanks Volker, I've Changed the values as you suggested, i noticed that 
the default value for max xmit is much less 16384! Still I feel like the 
performance is very slow indeed. This because on server, a can make 
copys arround 8gb/s! and in samba is all so slow and it freezes as i sad 
many times...


Can you have a second look to the log, to see if you see anything 
strange? I'm putting a dump off the level 1 log, for you to check, i 
know it's more general, but if you notice anything, then i will increase 
it to see it better!


 [2012/01/04 11:07:44.992938, 1] smbd/server.c:294(remove_child_pid) 
Scheduled cleanup of brl and lock database after unclean shutdown 
[2012/01/04 11:08:04.996512, 1] smbd/server.c:266(cleanup_timeout_fn) 
Cleaning up brl and lock database after unclean shutdown [2012/01/04 
11:08:41.711133, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
11:09:01.717859, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
12:01:53.685263, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
12:02:13.689221, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
12:07:36.437089, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
12:07:56.441751, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
12:17:37.812975, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
12:17:57.816510, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
13:02:45.073818, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
13:03:05.085521, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
13:07:18.905277, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
13:07:38.906269, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
13:14:37.957566, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
13:14:57.958360, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
13:17:40.097021, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
13:18:00.100073, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
14:02:39.801610, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
14:02:59.812268, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
14:03:18.601017, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
14:03:38.603099, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
14:11:43.877235, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
14:12:03.879569, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
15:07:39.429117, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
15:07:59.429898, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown [2012/01/04 
15:15:44.592951, 1] smbd/server.c:294(remove_child_pid) Scheduled 
cleanup of brl and lock database after unclean shutdown [2012/01/04 
15:16:04.596144, 1] smbd/server.c:266(cleanup_timeout_fn) Cleaning up 
brl and lock database after unclean shutdown Many Thanks! Vasco Leal 
Best Regards, Vasco Leónidas Pinto Leal IT Director JUZO - Informática e 
Serviços, Lda Mozilla Thunderbird, The Mail Rebirth! Still Stucked With 
Windows? Give Linux a Try And Enhance Your Work! Em 04-01-2012 08:57, 
Volker Lendecke escreveu:  On Tue, Jan 03, 2012 at 11:26:06PM +, 
Vasco Leal wrote:  When accessing the shares on my samba server, it 
sometimes freezes,  i have the lateste version, 3.6.1, mas since 
version 3.4 wish was  the first i used, i've been running into this 
problems. When i try  to browse the shares, many times, like 1 in 10, 
it freezes and  sometimes, when saving files, it fails at the first 
command and only  at the second command to save it does so.   My 
other problem is with 

Re: [Samba] The Group Policy Client service failed the logon. Access is denied.

2012-01-04 Thread TAKAHASHI Motonobu
hmm...

How about adding profile acls = yes to [homes] share?

From: Mat Enders mat.end...@gmail.com
Date: Wed, 4 Jan 2012 16:11:44 +

 I did not ruse the old tdb I recreated all of the users from scratch and 
 moved their home directory data then chown their home directories to give 
 correct owner and group of files. I do not create the  Samba users I have it 
 set so when I create a new Linux user the Samba user is created. If it where 
 the tdb wouldn't their be problems when logging in to an XP machine. 

---
TAKAHASHI Motonobu mo...@samba.gr.jp
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Fwd: Re: Samba Freezes accessing shares/ low performance

2012-01-04 Thread Volker Lendecke
On Wed, Jan 04, 2012 at 04:20:39PM +, Vasco Leal wrote:
 Thanks Volker, I've Changed the values as you suggested, i noticed that 
 the default value for max xmit is much less 16384! Still I feel like the 
 performance is very slow indeed. This because on server, a can make 
 copys arround 8gb/s! and in samba is all so slow and it freezes as i sad 
 many times...
 
 Can you have a second look to the log, to see if you see anything 
 strange? I'm putting a dump off the level 1 log, for you to check, i 
 know it's more general, but if you notice anything, then i will increase 
 it to see it better!
 
  [2012/01/04 11:07:44.992938, 1] smbd/server.c:294(remove_child_pid) 
 Scheduled cleanup of brl and lock database after unclean shutdown 
 [2012/01/04 11:08:04.996512, 1] smbd/server.c:266(cleanup_timeout_fn) 

These should never happen on a sane system. You need a
higher log level to diagnose why smbds die.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-37-0, fax: +49-551-37-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kont...@sernet.de
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Fwd: Re: Samba Freezes accessing shares/ low performance

2012-01-04 Thread Vasco Leal
I think this here is my major problem, i will change the log to level 5 
and soon as i get it i'll send you!


Best Regards,
Vasco Leónidas Pinto Leal
IT Director
JUZO - Informática e Serviços, Lda

Mozilla Thunderbird, The Mail Rebirth!

Still Stucked With Windows? Give Linux a Try And Enhance Your Work!


Em 04-01-2012 17:10, Volker Lendecke escreveu:

On Wed, Jan 04, 2012 at 04:20:39PM +, Vasco Leal wrote:

Thanks Volker, I've Changed the values as you suggested, i noticed that
the default value for max xmit is much less 16384! Still I feel like the
performance is very slow indeed. This because on server, a can make
copys arround 8gb/s! and in samba is all so slow and it freezes as i sad
many times...

Can you have a second look to the log, to see if you see anything
strange? I'm putting a dump off the level 1 log, for you to check, i
know it's more general, but if you notice anything, then i will increase
it to see it better!

  [2012/01/04 11:07:44.992938, 1] smbd/server.c:294(remove_child_pid)
Scheduled cleanup of brl and lock database after unclean shutdown
[2012/01/04 11:08:04.996512, 1] smbd/server.c:266(cleanup_timeout_fn)

These should never happen on a sane system. You need a
higher log level to diagnose why smbds die.

Volker


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


Re: [Samba] Integrate windows ADS Connection

2012-01-04 Thread Jessica Guynn
Used likewise-open because was following a tutorial on that same site.  So
better change to winbind?
On Wed, Jan 4, 2012 at 7:40 AM, Volker Lendecke
volker.lende...@sernet.dewrote:

 On Wed, Jan 04, 2012 at 07:29:11AM -0800, Jessica Guynn wrote:
  Forgot to add, using likewise-open to add the ubuntu machine to the
 windows
  ads.
 
  On Wed, Jan 4, 2012 at 7:20 AM, Jessica Guynn jessgu...@gmail.com
 wrote:
 
   Creating a samba connection through windows 2008 ADS.  I was able to
 add
   my ubuntu machine as a member of the windows 2008 domain but after
   following this tutorial to create the samba connection
  
 http://www.ubuntugeek.com/how-to-integrate-windows-active-directory-and-samba-in-ubuntu.htmlI
   can no longer login with domain users.  My nsswitch.conf, krb5.conf,
 and
   smb.conf files are pasted in:  http://pastebin.com/VKphVVwg

 Can you try to take likewise-open out of the picture? Samba
 with winbind has excellent domain membership features. What
 are the specific likewise open features that you require
 that winbind can not provide to you?

 With best regards,

 Volker Lendecke

 --
 SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
 phone: +49-551-37-0, fax: +49-551-37-9
 AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
 http://www.sernet.de, mailto:kont...@sernet.de

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


[Samba] subdirectories have incorrect sizes

2012-01-04 Thread John de la Garza
I am using Version 3.0.28a

I have a share setup a directory on my local file system.  In that
directory is another directory that is the mounted on a USB stick.

When using OS X I connect to there share its size is the size of the
directory on
the server (this is correct).  when I  change into a subfolder (actually mounted
on usb stick with larger size), I don't see the size change.

I am limited by the size of the containing folder.

here is some system stuff:

/tmp # df -h anon_smb/
FilesystemSize  Used Available Use% Mounted on
none  4.0M740.0K  3.3M  18% /tmp
/tmp # df -h anon_smb/sda1/
FilesystemSize  Used Available Use% Mounted on
/dev/sda1 3.7G 21.1M  3.7G   1% /tmp/sda1
/tmp #


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


Re: [Samba] subdirectories have incorrect sizes

2012-01-04 Thread Jeremy Allison
On Wed, Jan 04, 2012 at 10:36:20AM -0800, John de la Garza wrote:
 I am using Version 3.0.28a
 
 I have a share setup a directory on my local file system.  In that
 directory is another directory that is the mounted on a USB stick.
 
 When using OS X I connect to there share its size is the size of the
 directory on
 the server (this is correct).  when I  change into a subfolder (actually 
 mounted
 on usb stick with larger size), I don't see the size change.
 
 I am limited by the size of the containing folder.
 
 here is some system stuff:
 
 /tmp # df -h anon_smb/
 FilesystemSize  Used Available Use% Mounted on
 none  4.0M740.0K  3.3M  18% /tmp
 /tmp # df -h anon_smb/sda1/
 FilesystemSize  Used Available Use% Mounted on
 /dev/sda1 3.7G 21.1M  3.7G   1% /tmp/sda1
 /tmp #
 
 
 /dev/sda1 on /tmp/anon_smb/sda1

We don't guarentee size consistency when crossing mount
points. Use a separate share for the mount point if you
want an exact fs size.

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


[Samba] Samba 3.4 authentication suddenly very slow.

2012-01-04 Thread Don Krause
After a scheduled power outage, with all hosts cleanly shut down, I'm having a 
bad performance issue on my samba server.

This configuration has worked well for over a year, but after the power outage, 
attempting to access any share takes over a minute.

net ads testjoin is fine,
wbinfo -u and wbinfo -g returns the correct information.

The shares CAN be accessed, once accessed, read and write performance is fine.

The problem is the initial access. I can do \\filehost from the windows box, 
and it immediately returns a folder showing all shares. Clicking on any share 
however, pauses for more than a minute, before allowing access.

Prior to the power outage, typing \\filehost in the Windows run box would pop 
up an auto complete with all available shares, it does not do that now.

I'm stuck on where to look next. I have the log level set to 10 in my smb.conf 
file.

Clients are mixed Win7 and XP, AD is 2008R2, Samba is 3.4.0 on Ubuntu.

From smb.conf:

[global]
workgroup = OPTIVUS
realm = OPTIVUS.COM
security = ADS
password server = optad.optivus.com
log level = 10
log file = /var/log/samba/%m.log
max log size = 50
unix extensions = No
template shell = /bin/bash
winbind enum users = Yes
winbind enum groups = Yes
winbind use default domain = Yes
hosts allow = 143.197.0.0/16, 172.24.0.0/16

Thanks!
--
Don Krause   






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

[Samba] Samba Cluster integration with W2K8R2 ADS permission problems

2012-01-04 Thread Philipp Rusch - New Vision IT
We have a setup with three nodes - SLES 11 SP1 + HAE addon.
CTDB is managing SAMBA and winbind, I can see the shares on my shared
storage from my windows machines.
My problem is: CTDB-RA is inserting idmap backend = tdb2, this seems to
be needed for a clustered setup.
But how do I integrate with an ADS, then ?
I want to manage my users and groups from the Windows ADS controllers
and have SLES map them to the shares.
I don't want to create users on the linux side. Kerberos seems to work,
LDAP has problems.
I did not get a single userid to write to any share I defined. I can
only read from there, no modification is allowed.

We want to build a clustered fileserver for CIFS shares, therefore we
need a reliable way to integrate with an ADS.
Any hints highly appreciated.

- Philipp


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


[Samba] Samba Cluster Setup with CTDB problems

2012-01-04 Thread Philipp Rusch - New Vision IT
We have a setup with three nodes - SLES 11 SP1 + HAE addon.
This is running fine, wich means: OpenAIS ist starting, we have access
to a shared volume with OCFS2 filesystem,
have SBD running, quorum is working as expected. CTDB is managing SAMBA
and winbind.
OK - this runs as long as we do not try to restart CTDB. We always have
to restart the whole thing on all 3 nodes.
Then CTDB dies with an unknown error.
We want to build a clustered fileserver for CIFS shares, therefore we
need a reliable way to integrate with an ADS.
Any hints highly appreciated.

- Philipp



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


Re: [Samba] Samba Cluster Setup with CTDB problems

2012-01-04 Thread Philipp Rusch - New Vision IT
I have to rephrase a bit for clarification: (see below)

Am 04.01.2012 20:48, schrieb Philipp Rusch - New Vision IT:
 We have a setup with three nodes - SLES 11 SP1 + HAE addon.
 This is running fine, wich means: OpenAIS ist starting, we have access
 to a shared volume with OCFS2 filesystem,
 have SBD running, quorum is working as expected. CTDB is managing SAMBA
 and winbind.
 OK - this runs as long as we do not try to restart CTDB. We always have
 to restart the whole thing on all 3 nodes.
Otherwise CTDB dies with an unknown error.



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


Re: [Samba] subdirectories have incorrect sizes

2012-01-04 Thread John de la Garza
On Wed, Jan 4, 2012 at 11:26 AM, Jeremy Allison j...@samba.org wrote:
 On Wed, Jan 04, 2012 at 10:36:20AM -0800, John de la Garza wrote:
 I am using Version 3.0.28a

 I have a share setup a directory on my local file system.  In that
 directory is another directory that is the mounted on a USB stick.

 When using OS X I connect to there share its size is the size of the
 directory on
 the server (this is correct).  when I  change into a subfolder (actually 
 mounted
 on usb stick with larger size), I don't see the size change.

 I am limited by the size of the containing folder.

 here is some system stuff:

 /tmp # df -h anon_smb/
 Filesystem                Size      Used Available Use% Mounted on
 none                      4.0M    740.0K      3.3M  18% /tmp
 /tmp # df -h anon_smb/sda1/
 Filesystem                Size      Used Available Use% Mounted on
 /dev/sda1                 3.7G     21.1M      3.7G   1% /tmp/sda1
 /tmp #


 /dev/sda1 on /tmp/anon_smb/sda1

 We don't guarentee size consistency when crossing mount
 points. Use a separate share for the mount point if you
 want an exact fs size.

 Jeremy.

I have another box running (Version 3.2.15) and it doesn't get size
right, but if the size isn't too small it does allow uploads.  I mean
to say if there is enough backing space it will not prevent me from
uploading.  Does this make sense or am I probably missing something?
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] subdirectories have incorrect sizes

2012-01-04 Thread Jeremy Allison
On Wed, Jan 04, 2012 at 01:33:03PM -0800, John de la Garza wrote:
 
 I have another box running (Version 3.2.15) and it doesn't get size
 right, but if the size isn't too small it does allow uploads.  I mean
 to say if there is enough backing space it will not prevent me from
 uploading.  Does this make sense or am I probably missing something?

We don't check on writing to the file (we leave it to the OS to
report out of space). However if the client checks if there's
enough space before starting the copy it might fail.

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


Re: [Samba] issues with printing

2012-01-04 Thread Tom Ryan


On 1/4/12 9:57 AM, Tom Ryan tomr...@camlaw.rutgers.edu wrote:


I've included a full log from a failed print session here:

http://pastebin.com/WBA4PEnG

Some additional info..

On one of our interim firewalls, we're noticing various dropped
connections from our client hosts to this particular samba server's port
135.

Any comments or suggestions would be appreciated.

Thanks.

Tom

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


Re: [Samba] subdirectories have incorrect sizes

2012-01-04 Thread John de la Garza
On Wed, Jan 4, 2012 at 2:19 PM, Jeremy Allison j...@samba.org wrote:
 On Wed, Jan 04, 2012 at 01:33:03PM -0800, John de la Garza wrote:

 I have another box running (Version 3.2.15) and it doesn't get size
 right, but if the size isn't too small it does allow uploads.  I mean
 to say if there is enough backing space it will not prevent me from
 uploading.  Does this make sense or am I probably missing something?

 We don't check on writing to the file (we leave it to the OS to
 report out of space). However if the client checks if there's
 enough space before starting the copy it might fail.

 Jeremy.

It seems like I am seeing two different outcomes.  On Version 3.0.28a
I get a disk full if the containing directory for the mount point
(which is mounted to a usb stick with enough space) has too little
space.

on 3.2.15 it appears the same at first, but it doesn't actually stop
me if there is actually enough space on the dist (as opposed to the
reported space)



I am using the same client on both cases
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.4 authentication suddenly very slow.

2012-01-04 Thread Don Krause
Some additional info, I'm starting to believe that this is caused by an MS 
patch that was applied to our AD servers.

I've unarchived the original VMWare image of the test linux installation that 
we used to verify that 2008r2 AD and Samba would work with win7 clients, it 
behaves exactly the same way.

From windows, run \\test7 and it immediately returns the full list of available 
shares, however, click on a share, and it takes more than 1 full minute before 
access is granted.

Then, I set up a new VM, this time used Cent 6.2, with samba 3.5. Configured, 
joined the domain, etc.

net ads testjoin works, wbinfo works, kinit works, everything checks out, but 
this case, the problem is worse.

running \\test12 immediately brings up a list of all shares, attempting to 
click on any causes the  1 min what, but then access is denied.

Odd, the logs appear to say that access is granted.

[2012/01/04 16:14:40.004734,  3] lib/access.c:392(check_access)
  check_access: no hostnames in host allow/deny list.
[2012/01/04 16:14:40.004933,  2] lib/access.c:409(check_access)
  Allowed connection from  (:::172.24.143.3)
[2012/01/04 16:14:40.004981, 10] smbd/share_access.c:238(user_ok_token)
  user_ok_token: share scully is ok for unix user dkrause

But win7 says that access is denied.

Losing my hair here…

Thanks!

On Jan 4, 2012, at 11:00 AM, Don Krause wrote:

 After a scheduled power outage, with all hosts cleanly shut down, I'm having 
 a bad performance issue on my samba server.
 
 This configuration has worked well for over a year, but after the power 
 outage, attempting to access any share takes over a minute.
 
 net ads testjoin is fine,
 wbinfo -u and wbinfo -g returns the correct information.
 
 The shares CAN be accessed, once accessed, read and write performance is fine.
 
 The problem is the initial access. I can do \\filehost from the windows box, 
 and it immediately returns a folder showing all shares. Clicking on any share 
 however, pauses for more than a minute, before allowing access.
 
 Prior to the power outage, typing \\filehost in the Windows run box would 
 pop up an auto complete with all available shares, it does not do that now.
 
 I'm stuck on where to look next. I have the log level set to 10 in my 
 smb.conf file.
 
 Clients are mixed Win7 and XP, AD is 2008R2, Samba is 3.4.0 on Ubuntu.
 
 From smb.conf:
 
 [global]
workgroup = OPTIVUS
realm = OPTIVUS.COM
security = ADS
password server = optad.optivus.com
log level = 10
log file = /var/log/samba/%m.log
max log size = 50
unix extensions = No
template shell = /bin/bash
winbind enum users = Yes
winbind enum groups = Yes
winbind use default domain = Yes
hosts allow = 143.197.0.0/16, 172.24.0.0/16
 
 Thanks!
 --
 Don Krause   
 
 
 
 
 
 
 
 __
 This email has been scanned by the Symantec Email Security.cloud service.
 For more information please visit http://www.symanteccloud.com
 __-- 
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

--
Don Krause   
Head Systems Geek, 
Waver of Deceased Chickens.
Optivus Proton Therapy, Inc.
P.O. Box 608
Loma Linda, California 92354
909.799.8327 Tel
909.799.8366 Fax
dkra...@optivus.com
www.optivus.com
This message represents the official view of the voices in my head.






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

Re: [Samba] subdirectories have incorrect sizes

2012-01-04 Thread John de la Garza
On Wed, Jan 4, 2012 at 2:56 PM, John de la Garza j...@jjdev.com wrote:

 It seems like I am seeing two different outcomes.  On Version 3.0.28a
 I get a disk full if the containing directory for the mount point
 (which is mounted to a usb stick with enough space) has too little
 space.

 on 3.2.15 it appears the same at first, but it doesn't actually stop
 me if there is actually enough space on the dist (as opposed to the
 reported space)



 I am using the same client on both cases


I just found out that the code that kind of works was patched and not
the regular samba code.  Thanks for replying.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] subdirectories have incorrect sizes

2012-01-04 Thread Jeremy Allison
On Wed, Jan 04, 2012 at 05:48:53PM -0800, John de la Garza wrote:
 On Wed, Jan 4, 2012 at 2:56 PM, John de la Garza j...@jjdev.com wrote:
 
  It seems like I am seeing two different outcomes.  On Version 3.0.28a
  I get a disk full if the containing directory for the mount point
  (which is mounted to a usb stick with enough space) has too little
  space.
 
  on 3.2.15 it appears the same at first, but it doesn't actually stop
  me if there is actually enough space on the dist (as opposed to the
  reported space)
 
 
 
  I am using the same client on both cases
 
 
 I just found out that the code that kind of works was patched and not
 the regular samba code.  Thanks for replying.

Can you send us the patch please ! That way we'll get it fixed
for other users.

Thanks,

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


[SCM] CTDB repository - branch master updated - ctdb-1.12-155-gd0f8547

2012-01-04 Thread Ronnie Sahlberg
The branch, master has been updated
   via  d0f85478c37828eb8a24315d4326eb4eaedb9afc (commit)
  from  15d8ae8b0f80f95d7839528b8ac60aa0e2485c77 (commit)

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


- Log -
commit d0f85478c37828eb8a24315d4326eb4eaedb9afc
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Jan 4 21:41:12 2012 +1100

explain why we use FIONREAD

---

Summary of changes:
 common/ctdb_io.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common/ctdb_io.c b/common/ctdb_io.c
index 86e54e0..810fd41 100644
--- a/common/ctdb_io.c
+++ b/common/ctdb_io.c
@@ -78,6 +78,12 @@ static void queue_io_read(struct ctdb_queue *queue)
ssize_t nread;
uint8_t *data;
 
+   /* check how much data is available on the socket for immediately
+  guaranteed nonblocking access.
+  as long as we are careful never to try to read more than this
+  we know all reads will be successful and will neither block
+  nor fail with a data not available right now error
+   */
if (ioctl(queue-fd, FIONREAD, num_ready) != 0) {
return;
}


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated

2012-01-04 Thread Stefan Metzmacher
The branch, master has been updated
   via  bf0da0b LDAP-CLDAP: demonstrate that pdc name is an unc path
   via  f9b1fb0 s4:torture/nbt/dgram.c: NBT samlogon requests without _EX 
return the PDC name as UNC path
  from  6a1201a dlz_bind9: create session info from PAC using auth context

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


- Log -
commit bf0da0b4f7fcdc655def21f84619850c0d699c3e
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Jan 4 11:46:47 2012 +0100

LDAP-CLDAP: demonstrate that pdc name is an unc path

For LOGON_SAM_LOGON_RESPONSE and LOGON_SAM_LOGON_USER_UNKNOWN,
I assume all levels without _EX in the name, pdc name is
in unc path form.

[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Wed Jan  4 13:37:42 CET 2012 on sn-devel-104

commit f9b1fb02df8e9192ec4adb81b47a25942f4308a9
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jan 2 15:51:35 2012 +0100

s4:torture/nbt/dgram.c: NBT samlogon requests without _EX return the PDC 
name as UNC path

metze

---

Summary of changes:
 source4/torture/ldap/cldap.c |6 ++
 source4/torture/nbt/dgram.c  |   22 ++
 2 files changed, 28 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index 6de33b8..b3f6276 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -123,6 +123,9 @@ static bool test_cldap_netlogon(struct torture_context 
*tctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, 
LOGON_SAM_LOGON_RESPONSE);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, );
+   torture_assert(tctx,
+  strstr(search.out.netlogon.data.nt5_ex.pdc_name, ) 
!= NULL,
+  PDC name should be in UNC form);
 
printf(Trying with User=Administrator\n);
search.in.user = Administrator;
@@ -130,6 +133,9 @@ static bool test_cldap_netlogon(struct torture_context 
*tctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, 
LOGON_SAM_LOGON_USER_UNKNOWN);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, search.in.user);
+   torture_assert(tctx,
+  strstr(search.out.netlogon.data.nt5_ex.pdc_name, ) 
!= NULL,
+  PDC name should be in UNC form);
 
search.in.version = NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX;
 
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index 7678057..d25724e 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -289,6 +289,10 @@ static bool nbt_test_netlogon2(struct torture_context 
*tctx)
 
torture_assert_str_equal(tctx, 
response-data.samlogon.data.nt5_ex.user_name, TEST_NAME$, Got incorrect 
user in netlogon response);
 
+   torture_assert(tctx,
+  strstr(response-data.samlogon.data.nt5_ex.pdc_name, 
) != NULL,
+  PDC name should be in UNC form);
+
join_ctx = torture_join_domain(tctx, TEST_NAME, 
   ACB_WSTRUST, machine_credentials);
 
@@ -339,6 +343,10 @@ static bool nbt_test_netlogon2(struct torture_context 
*tctx)
 
torture_assert_int_equal(tctx, 
response-data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN, Got 
incorrect netlogon response command);
 
+   torture_assert(tctx,
+  strstr(response-data.samlogon.data.nt5_ex.pdc_name, 
) != NULL,
+  PDC name should be in UNC form);
+
/* setup (another) temporary mailslot listener for replies */
dgmslot = dgram_mailslot_temp(dgmsock, NBT_MAILSLOT_GETDC,
  netlogon_handler, NULL);
@@ -381,6 +389,10 @@ static bool nbt_test_netlogon2(struct torture_context 
*tctx)
 
torture_assert_int_equal(tctx, 
response-data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE, Got 
incorrect netlogon response command);
 
+   torture_assert(tctx,
+  strstr(response-data.samlogon.data.nt5_ex.pdc_name, 
) != NULL,
+  PDC name should be in UNC form);
+
dgmslot-private_data = NULL;
 
ZERO_STRUCT(logon);
@@ -420,6 +432,10 @@ static bool nbt_test_netlogon2(struct torture_context 
*tctx)
 
torture_assert_int_equal(tctx, 
response-data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN, Got 
incorrect netlogon response command);
 
+   torture_assert(tctx,
+  

[SCM] Samba Shared Repository - branch master updated

2012-01-04 Thread Jeremy Allison
The branch, master has been updated
   via  69a67a1 s3: Check for the packet size before accessing it
  from  bf0da0b LDAP-CLDAP: demonstrate that pdc name is an unc path

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


- Log -
commit 69a67a1b7358d45f7a75fe8f87f652fc237342f7
Author: Volker Lendecke v...@samba.org
Date:   Tue Jan 3 22:19:27 2012 +0100

s3: Check for the packet size before accessing it

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Wed Jan  4 15:16:20 CET 2012 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index c448267..f366600 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1409,8 +1409,7 @@ static connection_struct *switch_message(uint8 type, 
struct smb_request *req, in
 
/* Make sure this is an SMB packet. smb_size contains NetBIOS header
 * so subtract 4 from it. */
-   if (!valid_smb_header(sconn, req-inbuf)
-   || (size  (smb_size - 4))) {
+   if ((size  (smb_size - 4)) || !valid_smb_header(sconn, req-inbuf)) {
DEBUG(2,(Non-SMB packet of length %d. Terminating server\n,
 smb_len(req-inbuf)));
exit_server_cleanly(Non-SMB packet);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-01-04 Thread Günther Deschner
The branch, master has been updated
   via  bd5fe0a s3-perfcount: fix incorrect array length calculations
   via  a96a953 s3-perfcount: fix build for example perfcount daemon
  from  69a67a1 s3: Check for the packet size before accessing it

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


- Log -
commit bd5fe0ae5db49e74c982bcfef9737b65cc78
Author: David Disseldorp dd...@suse.de
Date:   Tue Jan 3 10:14:23 2012 +0100

s3-perfcount: fix incorrect array length calculations

As reported by Ismail Doenmez (idon...@suse.com), sizeof() is
incorrectly used by _reg_perfcount_init_data_block() in an attempt to
determine the length of a talloced array.

Signed-off-by: Günther Deschner g...@samba.org

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Wed Jan  4 16:54:37 CET 2012 on sn-devel-104

commit a96a9534ab688626232240fcb689c82d8f4c1902
Author: David Disseldorp dd...@suse.de
Date:   Tue Jan 3 10:13:02 2012 +0100

s3-perfcount: fix build for example perfcount daemon

Signed-off-by: Günther Deschner g...@samba.org

---

Summary of changes:
 examples/perfcounter/Makefile|2 +-
 source3/registry/reg_perfcount.c |   26 +-
 2 files changed, 18 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/perfcounter/Makefile b/examples/perfcounter/Makefile
index bb7022e..86e2190 100644
--- a/examples/perfcounter/Makefile
+++ b/examples/perfcounter/Makefile
@@ -26,7 +26,7 @@ TDB_OBJ = $(TDB_SRC_DIR)/common/tdb.o 
$(TDB_SRC_DIR)/common/dump.o \
$(TDB_SRC_DIR)/common/error.o $(TDB_SRC_DIR)/common/freelist.o \
$(TDB_SRC_DIR)/common/io.o $(TDB_SRC_DIR)/common/lock.o \
$(TDB_SRC_DIR)/common/open.o $(TDB_SRC_DIR)/common/transaction.o \
-   $(TDB_SRC_DIR)/common/traverse.o
+   $(TDB_SRC_DIR)/common/traverse.o $(TDB_SRC_DIR)/common/hash.o
 PERF_WRITER_OBJ = perf_writer.o perf_writer_mem.o perf_writer_util.o 
perf_writer_cpu.o perf_writer_process.o perf_writer_disk.o
 
 default: $(PROGS)
diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c
index 64e3cbe..3203e09 100644
--- a/source3/registry/reg_perfcount.c
+++ b/source3/registry/reg_perfcount.c
@@ -919,13 +919,13 @@ static bool _reg_perfcount_init_data_block(struct 
PERF_DATA_BLOCK *block,
   bool bigendian_data)
 {
smb_ucs2_t *temp = NULL;
+   TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
time_t tm;
+   size_t sz;
 
-   if (rpcstr_push_talloc(mem_ctx, temp, PERF)==(size_t)-1) {
-   return false;
-   }
-   if (!temp) {
-   return false;
+   sz = rpcstr_push_talloc(tmp_ctx, temp, PERF);
+   if ((sz == -1) || (temp == NULL)) {
+   goto err_out;
}
memcpy(block-Signature, temp, strlen_w(temp) *2);
 
@@ -942,12 +942,15 @@ static bool _reg_perfcount_init_data_block(struct 
PERF_DATA_BLOCK *block,
tm = time(NULL);
make_systemtime((block-SystemTime), gmtime(tm));
_reg_perfcount_init_data_block_perf(block, names);
-   memset(temp, 0, sizeof(temp));
-   rpcstr_push((void *)temp, lp_netbios_name(), sizeof(temp), 
STR_TERMINATE);
+
+   sz = rpcstr_push_talloc(tmp_ctx, temp, lp_netbios_name());
+   if ((sz == -1) || (temp == NULL)) {
+   goto err_out;
+   }
block-SystemNameLength = (strlen_w(temp) * 2) + 2;
block-data = talloc_zero_array(mem_ctx, uint8, block-SystemNameLength 
+ (8 - (block-SystemNameLength % 8)));
if (block-data == NULL) {
-   return False;
+   goto err_out;
}
memcpy(block-data, temp, block-SystemNameLength);
block-SystemNameOffset = sizeof(struct PERF_DATA_BLOCK) - 
sizeof(block-objects) - sizeof(block-data);
@@ -955,8 +958,13 @@ static bool _reg_perfcount_init_data_block(struct 
PERF_DATA_BLOCK *block,
/* Make sure to adjust for 64-bit alignment for when we finish writing 
the system name,
   so that the PERF_OBJECT_TYPE struct comes out 64-bit aligned */
block-HeaderLength += 8 - (block-HeaderLength % 8);
+   talloc_free(tmp_ctx);
 
-   return True;
+   return true;
+
+err_out:
+   talloc_free(tmp_ctx);
+   return false;
 }
 
 /*


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-01-04 Thread Andreas Schneider
The branch, master has been updated
   via  b9d208b s3-winbind: Fix segfault if we can't map the last user.
   via  5075e56 s3-winbind: Move finding the domain to it's own function.
  from  bd5fe0a s3-perfcount: fix incorrect array length calculations

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


- Log -
commit b9d208bdaa9da2a5ae534481865efc881b851b01
Author: Andreas Schneider a...@samba.org
Date:   Tue Jan 3 16:55:25 2012 +0100

s3-winbind: Fix segfault if we can't map the last user.

This fixes bug #8678.

The issue is caused by bug #8608.

Autobuild-User: Andreas Schneider a...@cryptomilk.org
Autobuild-Date: Wed Jan  4 18:30:53 CET 2012 on sn-devel-104

commit 5075e565684627dfbd23f715da344b4365351ccb
Author: Andreas Schneider a...@samba.org
Date:   Tue Jan 3 16:54:39 2012 +0100

s3-winbind: Move finding the domain to it's own function.

This the first part to fix bug #8678.

---

Summary of changes:
 source3/winbindd/wb_next_pwent.c |   50 +
 1 files changed, 39 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/wb_next_pwent.c b/source3/winbindd/wb_next_pwent.c
index d47b2fc..8104568 100644
--- a/source3/winbindd/wb_next_pwent.c
+++ b/source3/winbindd/wb_next_pwent.c
@@ -31,6 +31,26 @@ struct wb_next_pwent_state {
 static void wb_next_pwent_fetch_done(struct tevent_req *subreq);
 static void wb_next_pwent_fill_done(struct tevent_req *subreq);
 
+static struct winbindd_domain *wb_next_find_domain(struct winbindd_domain 
*domain)
+{
+   if (domain == NULL) {
+   domain = domain_list();
+   } else {
+   domain = domain-next;
+   }
+
+   if ((domain != NULL)
+sid_check_is_domain(domain-sid)) {
+   domain = domain-next;
+   }
+
+   if (domain == NULL) {
+   return NULL;
+   }
+
+   return domain;
+}
+
 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
  struct tevent_context *ev,
  struct getpwent_state *gstate,
@@ -50,17 +70,7 @@ struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
if (state-gstate-next_user = state-gstate-num_users) {
TALLOC_FREE(state-gstate-users);
 
-   if (state-gstate-domain == NULL) {
-   state-gstate-domain = domain_list();
-   } else {
-   state-gstate-domain = state-gstate-domain-next;
-   }
-
-   if ((state-gstate-domain != NULL)
-sid_check_is_domain(state-gstate-domain-sid)) {
-   state-gstate-domain = state-gstate-domain-next;
-   }
-
+   state-gstate-domain = 
wb_next_find_domain(state-gstate-domain);
if (state-gstate-domain == NULL) {
tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES);
return tevent_req_post(req, ev);
@@ -155,6 +165,24 @@ static void wb_next_pwent_fill_done(struct tevent_req 
*subreq)
if (NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) {
state-gstate-next_user += 1;
 
+   if (state-gstate-next_user = state-gstate-num_users) {
+   TALLOC_FREE(state-gstate-users);
+
+   state-gstate-domain = 
wb_next_find_domain(state-gstate-domain);
+   if (state-gstate-domain == NULL) {
+   tevent_req_nterror(req, 
NT_STATUS_NO_MORE_ENTRIES);
+   return;
+   }
+
+   subreq = wb_query_user_list_send(state, state-ev,
+   state-gstate-domain);
+   if (tevent_req_nomem(subreq, req)) {
+   return;
+   }
+   tevent_req_set_callback(subreq, 
wb_next_pwent_fetch_done, req);
+   return;
+   }
+
subreq = wb_fill_pwent_send(state,
state-ev,

state-gstate-users[state-gstate-next_user],


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-01-04 Thread Stefan Metzmacher
The branch, master has been updated
   via  6ee6283 LDAP-CLDAP: demonstrate that pdc name is not an unc path
   via  55db691 s4:torture/nbt/dgram.c - NBT samlogon requests don't return 
the PDC name as UNC path
   via  6b3404a s4:cldap_server/netlogon.c: it is wrong to specify \ in 
front of the hostname
  from  b9d208b s3-winbind: Fix segfault if we can't map the last user.

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


- Log -
commit 6ee628341fe25c258c49b43a111ff96b05dcd07b
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Jan 4 11:46:47 2012 +0100

LDAP-CLDAP: demonstrate that pdc name is not an unc path

For LOGON_SAM_LOGON_RESPONSE_EX and LOGON_SAM_LOGON_USER_UNKNOWN_EX,
pdc name is not in unc path form.

[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Wed Jan  4 20:06:14 CET 2012 on sn-devel-104

commit 55db69198b76daaaba4a1e3d5c7195e4056ebb2c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Dec 22 17:05:29 2011 +0100

s4:torture/nbt/dgram.c - NBT samlogon requests don't return the PDC name as 
UNC path

Signed-off-by: Stefan Metzmacher me...@samba.org

commit 6b3404ad95998351127a5d1b181a2825827c7bd5
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Nov 23 10:09:51 2011 +0100

s4:cldap_server/netlogon.c: it is wrong to specify \\ in front of the 
hostname

For LOGON_SAM_LOGON_RESPONSE_EX and LOGON_SAM_LOGON_USER_UNKNOWN_EX,
pdc name is not in unc path form.

[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.

Bases on a patch from Matthias Dieter Wallnöfer m...@samba.org.

metze

---

Summary of changes:
 source4/cldap_server/netlogon.c |8 ++--
 source4/torture/ldap/cldap.c|9 +
 source4/torture/nbt/dgram.c |5 +
 3 files changed, 20 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 9d9f45e..4777fcc 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -250,9 +250,13 @@ NTSTATUS fill_netlogon_samlogon_response(struct 
ldb_context *sam_ctx,
server_type |= DS_SERVER_WRITABLE;
}
 
-   pdc_name = talloc_asprintf(mem_ctx, %s,
+   if (version  
(NETLOGON_NT_VERSION_5EX|NETLOGON_NT_VERSION_5EX_WITH_IP)) {
+   pdc_name = lpcfg_netbios_name(lp_ctx);
+   } else {
+   pdc_name = talloc_asprintf(mem_ctx, %s,
   lpcfg_netbios_name(lp_ctx));
-   NT_STATUS_HAVE_NO_MEMORY(pdc_name);
+   NT_STATUS_HAVE_NO_MEMORY(pdc_name);
+   }
domain_uuid  = samdb_result_guid(dom_res-msgs[0], objectGUID);
dns_domain   = lpcfg_dnsdomain(lp_ctx);
forest_domain= samdb_forest_name(sam_ctx, mem_ctx);
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index b3f6276..fc8c337 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -105,6 +105,9 @@ static bool test_cldap_netlogon(struct torture_context 
*tctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, 
LOGON_SAM_LOGON_RESPONSE_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, );
+   torture_assert(tctx,
+  strstr(search.out.netlogon.data.nt5_ex.pdc_name, ) 
== NULL,
+  PDC name should not be in UNC form);
 
printf(Trying with User=Administrator\n);
search.in.user = Administrator;
@@ -112,6 +115,9 @@ static bool test_cldap_netlogon(struct torture_context 
*tctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, 
LOGON_SAM_LOGON_USER_UNKNOWN_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, search.in.user);
+   torture_assert(tctx,
+  strstr(search.out.netlogon.data.nt5_ex.pdc_name, ) 
== NULL,
+  PDC name should not be in UNC form);
 
search.in.version = NETLOGON_NT_VERSION_5;
status = cldap_netlogon(cldap, tctx, search);
@@ -146,6 +152,9 @@ static bool test_cldap_netlogon(struct torture_context 
*tctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, 
LOGON_SAM_LOGON_USER_UNKNOWN_EX);
CHECK_STRING(GUID_string(tctx, 
search.out.netlogon.data.nt5_ex.domain_uuid), search.in.domain_guid);
+   torture_assert(tctx,
+   

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

2012-01-04 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  16c0d52 Fix bug #8644 - vfs_acl_xattr and vfs_acl_tdb modules can 
fail to add inheritable entries on a directory with no stored ACL.
  from  ceeab5c s3/doc: document the ignore system acls option of 
vfs_acl_xattr and vfs_acl_tdb

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


- Log -
commit 16c0d52842386fc2ebf975166b57b888d36796c5
Author: Jeremy Allison j...@samba.org
Date:   Fri Dec 2 10:55:40 2011 -0800

Fix bug #8644 - vfs_acl_xattr and vfs_acl_tdb modules can fail to add 
inheritable entries on a directory with no stored ACL.

If referring to an fsp sbuf can be left as an uninitialized variable,
causing the 'is_directory' variable to be false when it should be true.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 81c734a..f82f031 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -378,7 +378,7 @@ static NTSTATUS get_nt_acl_internal(vfs_handle_struct 
*handle,
return map_nt_error_from_unix(errno);
}
}
-   is_directory = S_ISDIR(sbuf.st_ex_mode);
+   is_directory = S_ISDIR(psbuf-st_ex_mode);
 
if (ignore_file_system_acl) {
TALLOC_FREE(pdesc_next);


-- 
Samba Shared Repository


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

2012-01-04 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  c4e0462 Fix bug #8644 - vfs_acl_xattr and vfs_acl_tdb modules can 
fail to add inheritable entries on a directory with no stored ACL.
  from  1854e6a s3-winbind: Add an update function for winbind cache.

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


- Log -
commit c4e0462a9edfee64cba6cf5db18a54cc3c51c4f1
Author: Jeremy Allison j...@samba.org
Date:   Fri Dec 2 10:55:40 2011 -0800

Fix bug #8644 - vfs_acl_xattr and vfs_acl_tdb modules can fail to add 
inheritable entries on a directory with no stored ACL.

If referring to an fsp sbuf can be left as an uninitialized variable,
causing the 'is_directory' variable to be false when it should be true.
(cherry picked from commit 16c0d52842386fc2ebf975166b57b888d36796c5)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index ecc889a..e8c79e6 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -373,7 +373,7 @@ static NTSTATUS get_nt_acl_internal(vfs_handle_struct 
*handle,
return map_nt_error_from_unix(errno);
}
}
-   is_directory = S_ISDIR(sbuf.st_ex_mode);
+   is_directory = S_ISDIR(psbuf-st_ex_mode);
 
if (ignore_file_system_acl) {
TALLOC_FREE(pdesc_next);


-- 
Samba Shared Repository


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

2012-01-04 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  23db6e7 s3-winbind: Fix segfault if we can't map the last user.
   via  2fca06a s3-winbind: Move finding the domain to it's own function.
  from  16c0d52 Fix bug #8644 - vfs_acl_xattr and vfs_acl_tdb modules can 
fail to add inheritable entries on a directory with no stored ACL.

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


- Log -
commit 23db6e7cf65bdd3974a4857dda0be6ad7d758b9a
Author: Andreas Schneider a...@samba.org
Date:   Tue Jan 3 16:55:25 2012 +0100

s3-winbind: Fix segfault if we can't map the last user.

This fixes bug #8678.

The issue is caused by bug #8608.

Autobuild-User: Andreas Schneider a...@cryptomilk.org
Autobuild-Date: Wed Jan  4 18:30:53 CET 2012 on sn-devel-104
(cherry picked from commit b9d208bdaa9da2a5ae534481865efc881b851b01)

commit 2fca06a63d47619f2b6902b1c8601021843c4b95
Author: Andreas Schneider a...@samba.org
Date:   Tue Jan 3 16:54:39 2012 +0100

s3-winbind: Move finding the domain to it's own function.

This the first part to fix bug #8678.
(cherry picked from commit 5075e565684627dfbd23f715da344b4365351ccb)

---

Summary of changes:
 source3/winbindd/wb_next_pwent.c |   50 +
 1 files changed, 39 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/wb_next_pwent.c b/source3/winbindd/wb_next_pwent.c
index d47b2fc..8104568 100644
--- a/source3/winbindd/wb_next_pwent.c
+++ b/source3/winbindd/wb_next_pwent.c
@@ -31,6 +31,26 @@ struct wb_next_pwent_state {
 static void wb_next_pwent_fetch_done(struct tevent_req *subreq);
 static void wb_next_pwent_fill_done(struct tevent_req *subreq);
 
+static struct winbindd_domain *wb_next_find_domain(struct winbindd_domain 
*domain)
+{
+   if (domain == NULL) {
+   domain = domain_list();
+   } else {
+   domain = domain-next;
+   }
+
+   if ((domain != NULL)
+sid_check_is_domain(domain-sid)) {
+   domain = domain-next;
+   }
+
+   if (domain == NULL) {
+   return NULL;
+   }
+
+   return domain;
+}
+
 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
  struct tevent_context *ev,
  struct getpwent_state *gstate,
@@ -50,17 +70,7 @@ struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
if (state-gstate-next_user = state-gstate-num_users) {
TALLOC_FREE(state-gstate-users);
 
-   if (state-gstate-domain == NULL) {
-   state-gstate-domain = domain_list();
-   } else {
-   state-gstate-domain = state-gstate-domain-next;
-   }
-
-   if ((state-gstate-domain != NULL)
-sid_check_is_domain(state-gstate-domain-sid)) {
-   state-gstate-domain = state-gstate-domain-next;
-   }
-
+   state-gstate-domain = 
wb_next_find_domain(state-gstate-domain);
if (state-gstate-domain == NULL) {
tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES);
return tevent_req_post(req, ev);
@@ -155,6 +165,24 @@ static void wb_next_pwent_fill_done(struct tevent_req 
*subreq)
if (NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) {
state-gstate-next_user += 1;
 
+   if (state-gstate-next_user = state-gstate-num_users) {
+   TALLOC_FREE(state-gstate-users);
+
+   state-gstate-domain = 
wb_next_find_domain(state-gstate-domain);
+   if (state-gstate-domain == NULL) {
+   tevent_req_nterror(req, 
NT_STATUS_NO_MORE_ENTRIES);
+   return;
+   }
+
+   subreq = wb_query_user_list_send(state, state-ev,
+   state-gstate-domain);
+   if (tevent_req_nomem(subreq, req)) {
+   return;
+   }
+   tevent_req_set_callback(subreq, 
wb_next_pwent_fetch_done, req);
+   return;
+   }
+
subreq = wb_fill_pwent_send(state,
state-ev,

state-gstate-users[state-gstate-next_user],


-- 
Samba Shared Repository


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

2012-01-04 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  76137cb s3-winbind: Move finding the domain to it's own function.
   via  b16104d s3-winbind: Fix segfault if we can't map the last user.
  from  c4e0462 Fix bug #8644 - vfs_acl_xattr and vfs_acl_tdb modules can 
fail to add inheritable entries on a directory with no stored ACL.

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


- Log -
commit 76137cbcfa6f8ecae2417b034e3f08d43242f5fa
Author: Andreas Schneider a...@samba.org
Date:   Tue Jan 3 16:54:39 2012 +0100

s3-winbind: Move finding the domain to it's own function.

This the first part to fix bug #8678.
(cherry picked from commit 5075e565684627dfbd23f715da344b4365351ccb)
(cherry picked from commit 2fca06a63d47619f2b6902b1c8601021843c4b95)

commit b16104ddf431d81f673bc3cf5e998c0f9421f2e9
Author: Andreas Schneider a...@samba.org
Date:   Tue Jan 3 16:55:25 2012 +0100

s3-winbind: Fix segfault if we can't map the last user.

This fixes bug #8678.

The issue is caused by bug #8608.

Autobuild-User: Andreas Schneider a...@cryptomilk.org
Autobuild-Date: Wed Jan  4 18:30:53 CET 2012 on sn-devel-104
(cherry picked from commit b9d208bdaa9da2a5ae534481865efc881b851b01)
(cherry picked from commit 23db6e7cf65bdd3974a4857dda0be6ad7d758b9a)

---

Summary of changes:
 source3/winbindd/wb_next_pwent.c |   50 +
 1 files changed, 39 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/wb_next_pwent.c b/source3/winbindd/wb_next_pwent.c
index e5b5e29..8a7b006 100644
--- a/source3/winbindd/wb_next_pwent.c
+++ b/source3/winbindd/wb_next_pwent.c
@@ -30,6 +30,26 @@ struct wb_next_pwent_state {
 static void wb_next_pwent_fetch_done(struct tevent_req *subreq);
 static void wb_next_pwent_fill_done(struct tevent_req *subreq);
 
+static struct winbindd_domain *wb_next_find_domain(struct winbindd_domain 
*domain)
+{
+   if (domain == NULL) {
+   domain = domain_list();
+   } else {
+   domain = domain-next;
+   }
+
+   if ((domain != NULL)
+sid_check_is_domain(domain-sid)) {
+   domain = domain-next;
+   }
+
+   if (domain == NULL) {
+   return NULL;
+   }
+
+   return domain;
+}
+
 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
  struct tevent_context *ev,
  struct getpwent_state *gstate,
@@ -49,17 +69,7 @@ struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
if (state-gstate-next_user = state-gstate-num_users) {
TALLOC_FREE(state-gstate-users);
 
-   if (state-gstate-domain == NULL) {
-   state-gstate-domain = domain_list();
-   } else {
-   state-gstate-domain = state-gstate-domain-next;
-   }
-
-   if ((state-gstate-domain != NULL)
-sid_check_is_domain(state-gstate-domain-sid)) {
-   state-gstate-domain = state-gstate-domain-next;
-   }
-
+   state-gstate-domain = 
wb_next_find_domain(state-gstate-domain);
if (state-gstate-domain == NULL) {
tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES);
return tevent_req_post(req, ev);
@@ -154,6 +164,24 @@ static void wb_next_pwent_fill_done(struct tevent_req 
*subreq)
if (NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) {
state-gstate-next_user += 1;
 
+   if (state-gstate-next_user = state-gstate-num_users) {
+   TALLOC_FREE(state-gstate-users);
+
+   state-gstate-domain = 
wb_next_find_domain(state-gstate-domain);
+   if (state-gstate-domain == NULL) {
+   tevent_req_nterror(req, 
NT_STATUS_NO_MORE_ENTRIES);
+   return;
+   }
+
+   subreq = wb_query_user_list_send(state, state-ev,
+   state-gstate-domain);
+   if (tevent_req_nomem(subreq, req)) {
+   return;
+   }
+   tevent_req_set_callback(subreq, 
wb_next_pwent_fetch_done, req);
+   return;
+   }
+
subreq = wb_fill_pwent_send(state,
state-ev,

state-gstate-users[state-gstate-next_user],


-- 
Samba Shared Repository


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

2012-01-04 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  ab62ee6 s3-cli: fix bug 563, 8GB tar on BE machines
  from  23db6e7 s3-winbind: Fix segfault if we can't map the last user.

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


- Log -
commit ab62ee622358362d4d2b16c7fec9a1f2cf7b8d8d
Author: Masafumi Nakayama mas...@jp.ibm.com
Date:   Wed Nov 2 10:35:19 2011 +0100

s3-cli: fix bug 563, 8GB tar on BE machines

Borrows on existing patches proposed by Craig Barratt and Brad Ellis.

Signed-off-by: David Disseldorp dd...@suse.de

Autobuild-User: David Disseldorp dd...@samba.org
Autobuild-Date: Tue Jan  3 18:31:28 CET 2012 on sn-devel-104
(cherry picked from commit 909056a2daacd961b40158b86bc117650a897054)

---

Summary of changes:
 source3/client/clitar.c |   22 +-
 1 files changed, 17 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 542ecca..3c08734 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -208,8 +208,10 @@ static void writetarheader(int f, const char *aname, 
uint64_t size, time_t mtime
 
memset(hb.dbuf.size, 0, 4);
hb.dbuf.size[0]=128;
-   for (i = 8, jp=(char*)size; i; i--)
-   hb.dbuf.size[i+3] = *(jp++);
+   for (i = 8; i; i--) {
+   hb.dbuf.size[i+3] = size  0xff;
+   size = 8;
+   }
}
oct_it((uint64_t) mtime, 13, hb.dbuf.mtime);
memcpy(hb.dbuf.chksum, , sizeof(hb.dbuf.chksum));
@@ -311,7 +313,17 @@ of link other than a GNUtar Longlink - ignoring\n));
finfo-mtime_ts = finfo-ctime_ts =
convert_time_t_to_timespec((time_t)strtol(hb-dbuf.mtime, NULL, 
8));
finfo-atime_ts = convert_time_t_to_timespec(time(NULL));
-   finfo-size = unoct(hb-dbuf.size, sizeof(hb-dbuf.size));
+   if ((hb-dbuf.size[0]  0xff) == 0x80) {
+   /* This is a non-POSIX compatible extention to extract files
+   greater than 8GB. */
+   finfo-size = 0;
+   for (i = 0; i  8; i++) {
+   finfo-size = 8;
+   finfo-size |= hb-dbuf.size[i+4]  0xff;
+   }
+   } else {
+   finfo-size = unoct(hb-dbuf.size, sizeof(hb-dbuf.size));
+   }
 
return True;
 }
@@ -1018,8 +1030,8 @@ static int skip_file(int skipsize)
 static int get_file(file_info2 finfo)
 {
uint16_t fnum = (uint16_t) -1;
-   int pos = 0, dsize = 0, bpos = 0;
-   uint64_t rsize = 0;
+   int dsize = 0, bpos = 0;
+   uint64_t rsize = 0, pos = 0;
NTSTATUS status;
 
DEBUG(5, (get_file: file: %s, size %.0f\n, finfo.name, 
(double)finfo.size));


-- 
Samba Shared Repository


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

2012-01-04 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  b217fc3 s3-cli: fix bug 563, 8GB tar on BE machines
  from  76137cb s3-winbind: Move finding the domain to it's own function.

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


- Log -
commit b217fc3ac18c04011861217eb5e0b596554ab88a
Author: Masafumi Nakayama mas...@jp.ibm.com
Date:   Tue Jan 3 17:24:58 2012 -0800

s3-cli: fix bug 563, 8GB tar on BE machines

Borrows on existing patches proposed by Craig Barratt and Brad Ellis.

Signed-off-by: David Disseldorp dd...@suse.de

Back-ported to 3.5.x by Jeremy Allison j...@samba.org

---

Summary of changes:
 source3/client/clitar.c |   22 +-
 1 files changed, 17 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index fc98fa8..8440a46 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -204,8 +204,10 @@ static void writetarheader(int f, const char *aname, 
uint64_t size, time_t mtime
 
memset(hb.dbuf.size, 0, 4);
hb.dbuf.size[0]=128;
-   for (i = 8, jp=(char*)size; i; i--)
-   hb.dbuf.size[i+3] = *(jp++);
+   for (i = 8; i; i--) {
+   hb.dbuf.size[i+3] = size  0xff;
+   size = 8;
+   }
}
oct_it((uint64_t) mtime, 13, hb.dbuf.mtime);
memcpy(hb.dbuf.chksum, , sizeof(hb.dbuf.chksum));
@@ -307,7 +309,17 @@ of link other than a GNUtar Longlink - ignoring\n));
finfo-mtime_ts = finfo-ctime_ts =
convert_time_t_to_timespec((time_t)strtol(hb-dbuf.mtime, NULL, 
8));
finfo-atime_ts = convert_time_t_to_timespec(time(NULL));
-   finfo-size = unoct(hb-dbuf.size, sizeof(hb-dbuf.size));
+   if ((hb-dbuf.size[0]  0xff) == 0x80) {
+   /* This is a non-POSIX compatible extention to extract files
+   greater than 8GB. */
+   finfo-size = 0;
+   for (i = 0; i  8; i++) {
+   finfo-size = 8;
+   finfo-size |= hb-dbuf.size[i+4]  0xff;
+   }
+   } else {
+   finfo-size = unoct(hb-dbuf.size, sizeof(hb-dbuf.size));
+   }
 
return True;
 }
@@ -999,8 +1011,8 @@ static int skip_file(int skipsize)
 static int get_file(file_info2 finfo)
 {
uint16_t fnum;
-   int pos = 0, dsize = 0, bpos = 0;
-   uint64_t rsize = 0;
+   int dsize = 0, bpos = 0;
+   uint64_t rsize = 0, pos = 0;
 
DEBUG(5, (get_file: file: %s, size %.0f\n, finfo.name, 
(double)finfo.size));
 


-- 
Samba Shared Repository


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

2012-01-04 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  627f57f Final part of fix for bug #8679 - recvfile code path using 
splice() on Linux leaves data in the pipe on short write.
   via  ec9b07e Third part of fix for bug #8679 - recvfile code path using 
splice() on Linux leaves data in the pipe on short write.
   via  7924e45 Second part of fix for bug #8679 - recvfile code path using 
splice() on Linux leaves data in the pipe on short write.
   via  b3f344b Fix bug #8679 - recvfile code path using splice() on Linux 
leaves data in the pipe on short write
  from  ab62ee6 s3-cli: fix bug 563, 8GB tar on BE machines

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


- Log -
commit 627f57f0714f257c6082b21447d122935c6e92e2
Author: Jeremy Allison j...@samba.org
Date:   Fri Dec 30 21:19:08 2011 -0800

Final part of fix for bug #8679 - recvfile code path using splice() on 
Linux leaves data in the pipe on short write.

The code to set a DOS error on short writeX return is amazingly
legacy code, and also breaks the reply as fixup_chain_error_packet()
enforces a 2-byte wct on any reply where smb_rcls != 0.

Found in testing by Andrew Bartlett. Thanks Andrew !

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Sat Dec 31 08:05:35 CET 2011 on sn-devel-104
(cherry picked from commit e39df67669f61056692736db9c8dc16fbf2c3624)

commit ec9b07e84e806705e22f0cf2eb527fed14efac55
Author: Jeremy Allison j...@samba.org
Date:   Fri Dec 30 20:45:10 2011 -0800

Third part of fix for bug #8679 - recvfile code path using splice() on 
Linux leaves data in the pipe on short write.

Fix default_sys_recvfile() to correctly cope with
short writes. Return the amount written. Return
-1 and set errno if no data could be written.
(cherry picked from commit 5e6263960aaf1a5f9993cb7bb5646d36ff92b9cc)

commit 7924e459b6677ba3500afff4b78f797e1e0ad83d
Author: Jeremy Allison j...@samba.org
Date:   Fri Dec 30 20:23:00 2011 -0800

Second part of fix for bug #8679 - recvfile code path using splice() on 
Linux leaves data in the pipe on short write.

Split out the functionality of drain_socket() into a separate
function from default_sys_recvfile().
(cherry picked from commit a5715420e37b98038fe8f2c3028e4c6938400eed)

commit b3f344b5b52096715eb5670b146f477a67af8245
Author: Jeremy Allison j...@samba.org
Date:   Sat Dec 24 21:12:09 2011 -0800

Fix bug #8679 - recvfile code path using splice() on Linux leaves data in 
the pipe on short write

Bug found and fix suggested by Andrew Bartlett.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Sun Dec 25 07:46:38 CET 2011 on sn-devel-104
(cherry picked from commit eb617374a673bb1189dd9b6bccbf3f1d9fb91010)

---

Summary of changes:
 source3/lib/recvfile.c |   75 
 source3/smbd/reply.c   |5 ---
 2 files changed, 50 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/recvfile.c b/source3/lib/recvfile.c
index 7cbb8a0..c74cdd5 100644
--- a/source3/lib/recvfile.c
+++ b/source3/lib/recvfile.c
@@ -30,16 +30,10 @@
  * It's safe to make direct syscalls to lseek/write here
  * as we're below the Samba vfs layer.
  *
- * If tofd is -1 we just drain the incoming socket of count
- * bytes without writing to the outgoing fd.
- * If a write fails we do the same (to cope with disk full)
- * errors.
- *
  * Returns -1 on short reads from fromfd (read error)
  * and sets errno.
  *
  * Returns number of bytes written to 'tofd'
- * or thrown away if 'tofd == -1'.
  * return != count then sets errno.
  * Returns count if complete success.
  */
@@ -96,23 +90,26 @@ static ssize_t default_sys_recvfile(int fromfd,
 
num_written = 0;
 
-   while (num_written  read_ret) {
+   /* Don't write any more after a write error. */
+   while (tofd != -1  (num_written  read_ret)) {
ssize_t write_ret;
 
-   if (tofd == -1) {
-   write_ret = read_ret;
-   } else {
-   /* Write to file - ignore EINTR. */
-   write_ret = sys_write(tofd,
-   buffer + num_written,
-   read_ret - num_written);
-
-   if (write_ret = 0) {
-   /* write error - stop writing. */
-   tofd = -1;
-   saved_errno = errno;
-   continue;
-   }
+   /* Write to file - ignore EINTR. */
+  

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

2012-01-04 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  610053a Final part of fix for bug #8679 - recvfile code path using 
splice() on Linux leaves data in the pipe on short write.
   via  b0bc8be Third part of fix for bug #8679 - recvfile code path using 
splice() on Linux leaves data in the pipe on short write.
   via  1076d0d Second part of fix for bug #8679 - recvfile code path using 
splice() on Linux leaves data in the pipe on short write.
   via  e1cbc6b Fix bug #8679 - recvfile code path using splice() on Linux 
leaves data in the pipe on short write
  from  b217fc3 s3-cli: fix bug 563, 8GB tar on BE machines

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


- Log -
commit 610053a6dbe0fc109e3e73c1f7cb26ec8dc48c11
Author: Jeremy Allison j...@samba.org
Date:   Fri Dec 30 21:19:08 2011 -0800

Final part of fix for bug #8679 - recvfile code path using splice() on 
Linux leaves data in the pipe on short write.

The code to set a DOS error on short writeX return is amazingly
legacy code, and also breaks the reply as fixup_chain_error_packet()
enforces a 2-byte wct on any reply where smb_rcls != 0.

Found in testing by Andrew Bartlett. Thanks Andrew !

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Sat Dec 31 08:05:35 CET 2011 on sn-devel-104
(cherry picked from commit e39df67669f61056692736db9c8dc16fbf2c3624)
(cherry picked from commit 627f57f0714f257c6082b21447d122935c6e92e2)

commit b0bc8bec29bce808253adf2a95b7fdb7d36a176f
Author: Jeremy Allison j...@samba.org
Date:   Fri Dec 30 20:45:10 2011 -0800

Third part of fix for bug #8679 - recvfile code path using splice() on 
Linux leaves data in the pipe on short write.

Fix default_sys_recvfile() to correctly cope with
short writes. Return the amount written. Return
-1 and set errno if no data could be written.
(cherry picked from commit 5e6263960aaf1a5f9993cb7bb5646d36ff92b9cc)
(cherry picked from commit ec9b07e84e806705e22f0cf2eb527fed14efac55)

commit 1076d0d0491ca9d988c8095514838975e6fce4ec
Author: Jeremy Allison j...@samba.org
Date:   Fri Dec 30 20:23:00 2011 -0800

Second part of fix for bug #8679 - recvfile code path using splice() on 
Linux leaves data in the pipe on short write.

Split out the functionality of drain_socket() into a separate
function from default_sys_recvfile().
(cherry picked from commit a5715420e37b98038fe8f2c3028e4c6938400eed)
(cherry picked from commit 7924e459b6677ba3500afff4b78f797e1e0ad83d)

commit e1cbc6b4ac55d2cdb55bcfa4dbcd667cedf6ffb2
Author: Jeremy Allison j...@samba.org
Date:   Sat Dec 24 21:12:09 2011 -0800

Fix bug #8679 - recvfile code path using splice() on Linux leaves data in 
the pipe on short write

Bug found and fix suggested by Andrew Bartlett.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Sun Dec 25 07:46:38 CET 2011 on sn-devel-104
(cherry picked from commit eb617374a673bb1189dd9b6bccbf3f1d9fb91010)
(cherry picked from commit b3f344b5b52096715eb5670b146f477a67af8245)

---

Summary of changes:
 source3/lib/recvfile.c |   75 
 source3/smbd/reply.c   |5 ---
 2 files changed, 50 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/recvfile.c b/source3/lib/recvfile.c
index ea01596..cc69d42 100644
--- a/source3/lib/recvfile.c
+++ b/source3/lib/recvfile.c
@@ -29,16 +29,10 @@
  * It's safe to make direct syscalls to lseek/write here
  * as we're below the Samba vfs layer.
  *
- * If tofd is -1 we just drain the incoming socket of count
- * bytes without writing to the outgoing fd.
- * If a write fails we do the same (to cope with disk full)
- * errors.
- *
  * Returns -1 on short reads from fromfd (read error)
  * and sets errno.
  *
  * Returns number of bytes written to 'tofd'
- * or thrown away if 'tofd == -1'.
  * return != count then sets errno.
  * Returns count if complete success.
  */
@@ -95,23 +89,26 @@ static ssize_t default_sys_recvfile(int fromfd,
 
num_written = 0;
 
-   while (num_written  read_ret) {
+   /* Don't write any more after a write error. */
+   while (tofd != -1  (num_written  read_ret)) {
ssize_t write_ret;
 
-   if (tofd == -1) {
-   write_ret = read_ret;
-   } else {
-   /* Write to file - ignore EINTR. */
-   write_ret = sys_write(tofd,
-   buffer + num_written,
-   read_ret - num_written);
-
-   if (write_ret = 0) {
-   /* write 

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

2012-01-04 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  60cb113 s3-libsmb: Don't duplicate kerberos service tickets.
  from  627f57f Final part of fix for bug #8679 - recvfile code path using 
splice() on Linux leaves data in the pipe on short write.

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


- Log -
commit 60cb113d98d98200b1d8b279591c930e6b0d1857
Author: Andreas Schneider a...@samba.org
Date:   Mon Nov 21 18:19:43 2011 +0100

s3-libsmb: Don't duplicate kerberos service tickets.

This fixes bug #8628.

Each time we do a client connection. Each time we call to function to
get the service ticket from the cache we duplicate it. So with each
connection we end up with one or three duplicated tickets.

Autobuild-User: Andreas Schneider a...@cryptomilk.org
Autobuild-Date: Thu Dec 15 19:30:42 CET 2011 on sn-devel-104
(cherry picked from commit d0330c7dd64b320cd86e2341b31da6be81ba829b)

---

Summary of changes:
 source3/libsmb/clikrb5.c |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index 5e1f704..b0743e4 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -2107,11 +2107,6 @@ krb5_error_code smb_krb5_get_credentials(krb5_context 
context,
goto done;
}
 
-   ret = krb5_cc_store_cred(context, ccache, creds);
-   if (ret) {
-   goto done;
-   }
-
if (out_creds) {
*out_creds = creds;
}


-- 
Samba Shared Repository


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

2012-01-04 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  70bbd7a s3-libsmb: Don't duplicate kerberos service tickets.
  from  610053a Final part of fix for bug #8679 - recvfile code path using 
splice() on Linux leaves data in the pipe on short write.

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


- Log -
commit 70bbd7a208014be1cb7f0e58a830787920f1d54c
Author: Andreas Schneider a...@samba.org
Date:   Mon Nov 21 18:19:43 2011 +0100

s3-libsmb: Don't duplicate kerberos service tickets.

This fixes bug #8628.

Each time we do a client connection. Each time we call to function to
get the service ticket from the cache we duplicate it. So with each
connection we end up with one or three duplicated tickets.

Autobuild-User: Andreas Schneider a...@cryptomilk.org
Autobuild-Date: Thu Dec 15 19:30:42 CET 2011 on sn-devel-104
(cherry picked from commit d0330c7dd64b320cd86e2341b31da6be81ba829b)
(cherry picked from commit 60cb113d98d98200b1d8b279591c930e6b0d1857)

---

Summary of changes:
 source3/libsmb/clikrb5.c |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index 7b5cd09..a15fc38 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -2088,11 +2088,6 @@ krb5_error_code smb_krb5_get_credentials(krb5_context 
context,
goto done;
}
 
-   ret = krb5_cc_store_cred(context, ccache, creds);
-   if (ret) {
-   goto done;
-   }
-
if (out_creds) {
*out_creds = creds;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-01-04 Thread Stefan Metzmacher
The branch, master has been updated
   via  1b45f2a s4:pyrpc: add 'user_session_key' getter to the connection 
object
   via  9465b9c s4:pygensec/tests: check that the client and server have 
the same session key
   via  1d4cc2a s4:pygensec: add session_key() method
  from  6ee6283 LDAP-CLDAP: demonstrate that pdc name is not an unc path

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


- Log -
commit 1b45f2aed86dda9fda6e6bcf1c9c7cbdc471c18d
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Dec 16 10:55:46 2011 +0100

s4:pyrpc: add 'user_session_key' getter to the connection object

This gets the session key from gensec for usage in DRSUAPI.

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Wed Jan  4 22:31:52 CET 2012 on sn-devel-104

commit 9465b9ce6f26d5db0477110a59da1a9306567d7b
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Jan 4 20:49:08 2012 +0100

s4:pygensec/tests: check that the client and server have the same session 
key

metze

commit 1d4cc2a64f6c4df84ee70e0dd587c0987972
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Dec 16 10:37:51 2011 +0100

s4:pygensec: add session_key() method

metze

---

Summary of changes:
 source4/auth/gensec/pygensec.c |   29 +++
 source4/librpc/rpc/pyrpc.c |   44 
 source4/librpc/wscript_build   |2 +-
 source4/scripting/python/samba/tests/gensec.py |5 ++-
 4 files changed, 78 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c
index 858cbe9..a683daf 100644
--- a/source4/auth/gensec/pygensec.c
+++ b/source4/auth/gensec/pygensec.c
@@ -264,6 +264,33 @@ static PyObject *py_gensec_session_info(PyObject *self)
return py_session_info;
 }
 
+static PyObject *py_gensec_session_key(PyObject *self)
+{
+   TALLOC_CTX *mem_ctx;
+   NTSTATUS status;
+   struct gensec_security *security = pytalloc_get_type(self, struct 
gensec_security);
+   DATA_BLOB session_key = data_blob_null;
+   static PyObject *session_key_obj = NULL;
+
+   if (security-ops == NULL) {
+   PyErr_SetString(PyExc_RuntimeError, no mechanism selected);
+   return NULL;
+   }
+   mem_ctx = talloc_new(NULL);
+
+   status = gensec_session_key(security, mem_ctx, session_key);
+   if (!NT_STATUS_IS_OK(status)) {
+   talloc_free(mem_ctx);
+   PyErr_SetNTSTATUS(status);
+   return NULL;
+   }
+
+   session_key_obj = PyString_FromStringAndSize((const char 
*)session_key.data,
+session_key.length);
+   talloc_free(mem_ctx);
+   return session_key_obj;
+}
+
 static PyObject *py_gensec_start_mech_by_name(PyObject *self, PyObject *args)
 {
char *name;
@@ -472,6 +499,8 @@ static PyMethodDef py_gensec_security_methods[] = {
S.start_client(credentials) },
{ session_info, (PyCFunction)py_gensec_session_info, METH_NOARGS,
S.session_info() - info },
+   { session_key, (PyCFunction)py_gensec_session_key, METH_NOARGS,
+   S.session_key() - key },
{ start_mech_by_name, (PyCFunction)py_gensec_start_mech_by_name, 
METH_VARARGS,
 S.start_mech_by_name(name) },
{ start_mech_by_sasl_name, 
(PyCFunction)py_gensec_start_mech_by_sasl_name, METH_VARARGS,
diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c
index 7aa5ff5..23961e7 100644
--- a/source4/librpc/rpc/pyrpc.c
+++ b/source4/librpc/rpc/pyrpc.c
@@ -26,6 +26,7 @@
 #include librpc/rpc/dcerpc.h
 #include librpc/rpc/pyrpc_util.h
 #include auth/credentials/pycredentials.h
+#include auth/gensec/gensec.h
 
 void initbase(void);
 
@@ -128,6 +129,47 @@ static PyObject *py_iface_session_key(PyObject *obj, void 
*closure)
return PyString_FromStringAndSize((const char *)session_key.data, 
session_key.length);
 }
 
+static PyObject *py_iface_user_session_key(PyObject *obj, void *closure)
+{
+   dcerpc_InterfaceObject *iface = (dcerpc_InterfaceObject *)obj;
+   TALLOC_CTX *mem_ctx;
+   NTSTATUS status;
+   struct gensec_security *security = NULL;
+   DATA_BLOB session_key = data_blob_null;
+   static PyObject *session_key_obj = NULL;
+
+   if (iface-pipe == NULL) {
+   PyErr_SetNTSTATUS(NT_STATUS_NO_USER_SESSION_KEY);
+   return NULL;
+   }
+
+   if (iface-pipe-conn == NULL) {
+   PyErr_SetNTSTATUS(NT_STATUS_NO_USER_SESSION_KEY);
+   return NULL;
+   }
+
+   if (iface-pipe-conn-security_state.generic_state == NULL) {
+   PyErr_SetNTSTATUS(NT_STATUS_NO_USER_SESSION_KEY);
+ 

[SCM] Samba Shared Repository - branch master updated

2012-01-04 Thread Jelmer Vernooij
The branch, master has been updated
   via  d2d4dfd waf: Use git repository.
   via  4f4bce5 Include waf as an extracted source directory, rather than 
as a one-in-a-file script.
  from  1b45f2a s4:pyrpc: add 'user_session_key' getter to the connection 
object

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


- Log -
commit d2d4dfdfedc59cf2b4f4d667ae5c97bdd5df4b44
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Jan 4 21:00:42 2012 +0100

waf: Use git repository.

Autobuild-User: Jelmer Vernooij jel...@samba.org
Autobuild-Date: Thu Jan  5 00:10:24 CET 2012 on sn-devel-104

commit 4f4bce5301ffd8c12aed1b108affa1a75feefb67
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Jan 4 00:31:27 2012 +0100

Include waf as an extracted source directory, rather than as a 
one-in-a-file script.

---

Summary of changes:
 buildtools/README  |   12 +
 buildtools/bin/README  |   16 -
 buildtools/bin/waf |   78 ++-
 buildtools/bin/waf-svn |  Bin 109232 - 0 bytes
 buildtools/update-waf.sh   |   13 +
 buildtools/wafadmin/3rdparty/ParallelDebug.py  |  299 +
 buildtools/wafadmin/3rdparty/batched_cc.py |  183 +++
 buildtools/wafadmin/3rdparty/boost.py  |  343 ++
 buildtools/wafadmin/3rdparty/fluid.py  |   27 +
 .../{wafsamba = wafadmin/3rdparty}/gccdeps.py |0
 buildtools/wafadmin/3rdparty/go.py |  111 ++
 buildtools/wafadmin/3rdparty/lru_cache.py  |   97 ++
 buildtools/wafadmin/3rdparty/paranoid.py   |   35 +
 buildtools/wafadmin/3rdparty/swig.py   |  190 +++
 buildtools/wafadmin/3rdparty/valadoc.py|  113 ++
 buildtools/wafadmin/Build.py   | 1033 +
 buildtools/wafadmin/Configure.py   |  444 
 buildtools/wafadmin/Constants.py   |   76 ++
 buildtools/wafadmin/Environment.py |  210 
 buildtools/wafadmin/Logs.py|  134 +++
 buildtools/wafadmin/Node.py|  695 +++
 buildtools/wafadmin/Options.py |  288 +
 buildtools/wafadmin/Runner.py  |  236 
 buildtools/wafadmin/Scripting.py   |  586 ++
 buildtools/wafadmin/Task.py| 1200 
 buildtools/wafadmin/TaskGen.py |  612 ++
 buildtools/wafadmin/Tools/__init__.py  |4 +
 buildtools/wafadmin/Tools/ar.py|   36 +
 buildtools/wafadmin/Tools/bison.py |   38 +
 buildtools/wafadmin/Tools/cc.py|  100 ++
 buildtools/wafadmin/Tools/ccroot.py|  629 ++
 buildtools/wafadmin/Tools/compiler_cc.py   |   67 ++
 buildtools/wafadmin/Tools/compiler_cxx.py  |   62 +
 buildtools/wafadmin/Tools/compiler_d.py|   33 +
 buildtools/wafadmin/Tools/config_c.py  |  736 
 buildtools/wafadmin/Tools/cs.py|   68 ++
 buildtools/wafadmin/Tools/cxx.py   |  104 ++
 buildtools/wafadmin/Tools/d.py |  535 +
 buildtools/wafadmin/Tools/dbus.py  |   34 +
 buildtools/wafadmin/Tools/dmd.py   |   64 +
 buildtools/wafadmin/Tools/flex.py  |   25 +
 buildtools/wafadmin/Tools/gas.py   |   38 +
 buildtools/wafadmin/Tools/gcc.py   |  135 +++
 buildtools/wafadmin/Tools/gdc.py   |   52 +
 buildtools/wafadmin/Tools/glib2.py |  164 +++
 buildtools/wafadmin/Tools/gnome.py |  223 
 buildtools/wafadmin/Tools/gnu_dirs.py  |  111 ++
 buildtools/wafadmin/Tools/gob2.py  |   18 +
 buildtools/wafadmin/Tools/gxx.py   |  133 +++
 buildtools/wafadmin/Tools/icc.py   |   37 +
 buildtools/wafadmin/Tools/icpc.py  |   35 +
 buildtools/wafadmin/Tools/intltool.py  |  139 +++
 buildtools/wafadmin/Tools/javaw.py |  255 +
 buildtools/wafadmin/Tools/kde4.py  |   74 ++
 buildtools/wafadmin/Tools/libtool.py   |  330 ++
 buildtools/wafadmin/Tools/lua.py   |   25 +
 buildtools/wafadmin/Tools/misc.py  |  430 +++
 buildtools/wafadmin/Tools/msvc.py  |  797 +
 buildtools/wafadmin/Tools/nasm.py  |   49 +
 buildtools/wafadmin/Tools/ocaml.py |  298 +
 buildtools/wafadmin/Tools/osx.py   |  188 +++
 buildtools/wafadmin/Tools/perl.py  |  109 ++
 

[SCM] Samba Shared Repository - branch master updated

2012-01-04 Thread Jeremy Allison
The branch, master has been updated
   via  3a18a42 Add S3 vfs_aio_pthread module to replace broken glibc aio 
code.
  from  d2d4dfd waf: Use git repository.

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


- Log -
commit 3a18a42d13b87a5a6c41d8a70e961313fd6d0a86
Author: Jeremy Allison j...@samba.org
Date:   Wed Jan 4 12:54:16 2012 -0800

Add S3 vfs_aio_pthread module to replace broken glibc aio code.

Compiles but not yet tested.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Thu Jan  5 01:43:51 CET 2012 on sn-devel-104

---

Summary of changes:
 source3/Makefile.in   |5 +
 source3/configure.in  |4 +
 source3/modules/vfs_aio_pthread.c |  637 +
 source3/modules/wscript_build |   10 +
 source3/wscript   |3 +
 5 files changed, 659 insertions(+), 0 deletions(-)
 create mode 100644 source3/modules/vfs_aio_pthread.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index cd73263..4bd1b40 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -868,6 +868,7 @@ VFS_READAHEAD_OBJ = modules/vfs_readahead.o
 VFS_TSMSM_OBJ = modules/vfs_tsmsm.o
 VFS_FILEID_OBJ = modules/vfs_fileid.o
 VFS_AIO_FORK_OBJ = modules/vfs_aio_fork.o
+VFS_AIO_PTHREAD_OBJ = modules/vfs_aio_pthread.o
 VFS_PREOPEN_OBJ = modules/vfs_preopen.o
 VFS_SYNCOPS_OBJ = modules/vfs_syncops.o
 VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o
@@ -3054,6 +3055,10 @@ bin/aio_fork.@SHLIBEXT@: $(BINARY_PREREQS) 
$(VFS_AIO_FORK_OBJ)
@echo Building plugin $@
@$(SHLD_MODULE) $(VFS_AIO_FORK_OBJ)
 
+bin/aio_pthread.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_PTHREAD_OBJ)
+   @echo Building plugin $@
+   @$(SHLD_MODULE) $(VFS_AIO_PTHREAD_OBJ)
+
 bin/preopen.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_PREOPEN_OBJ)
@echo Building plugin $@
@$(SHLD_MODULE) $(VFS_PREOPEN_OBJ)
diff --git a/source3/configure.in b/source3/configure.in
index 6f4300c..7ed093c 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6724,6 +6724,9 @@ if test x$enable_pthreadpool = xyes -a 
x$samba_cv_HAVE_PTHREAD = xyes; t
 AC_SUBST(PTHREADPOOL_OBJ, lib/pthreadpool/pthreadpool.o)
 PTHREADPOOLTEST=bin/pthreadpooltest\$(EXEEXT)
 AC_SUBST(PTHREADPOOLTEST)
+if test x$samba_cv_HAVE_AIO = xyes; then
+default_shared_modules=$default_shared_modules vfs_aio_pthread
+fi
 fi
 
 #
@@ -6947,6 +6950,7 @@ SMB_MODULE(vfs_readahead, \$(VFS_READAHEAD_OBJ), 
bin/readahead.$SHLIBEXT, VFS)
 SMB_MODULE(vfs_tsmsm, \$(VFS_TSMSM_OBJ), bin/tsmsm.$SHLIBEXT, VFS)
 SMB_MODULE(vfs_fileid, \$(VFS_FILEID_OBJ), bin/fileid.$SHLIBEXT, VFS)
 SMB_MODULE(vfs_aio_fork, \$(VFS_AIO_FORK_OBJ), bin/aio_fork.$SHLIBEXT, VFS)
+SMB_MODULE(vfs_aio_pthread, \$(VFS_AIO_PTHREAD_OBJ), 
bin/aio_pthread.$SHLIBEXT, VFS)
 SMB_MODULE(vfs_preopen, \$(VFS_PREOPEN_OBJ), bin/preopen.$SHLIBEXT, VFS)
 SMB_MODULE(vfs_syncops, \$(VFS_SYNCOPS_OBJ), bin/syncops.$SHLIBEXT, VFS)
 SMB_MODULE(vfs_zfsacl, \$(VFS_ZFSACL_OBJ), bin/zfsacl.$SHLIBEXT, VFS)
diff --git a/source3/modules/vfs_aio_pthread.c 
b/source3/modules/vfs_aio_pthread.c
new file mode 100644
index 000..56a2abd
--- /dev/null
+++ b/source3/modules/vfs_aio_pthread.c
@@ -0,0 +1,637 @@
+/*
+ * Simulate Posix AIO using pthreads.
+ *
+ * Based on the aio_fork work from Volker and Volker's pthreadpool library.
+ *
+ * Copyright (C) Volker Lendecke 2008
+ * Copyright (C) Jeremy Allison 2012
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include includes.h
+#include system/filesys.h
+#include system/shmem.h
+#include smbd/smbd.h
+#include pthreadpool.h
+
+struct aio_extra;
+static struct pthreadpool *pool;
+static int aio_pthread_jobid;
+
+struct aio_private_data {
+   struct aio_private_data *prev, *next;
+   int jobid;
+   SMB_STRUCT_AIOCB *aiocb;
+   ssize_t ret_size;
+   int ret_errno;
+   bool cancelled;
+   bool write_command;
+};
+
+/* List of outstanding requests we have. */
+struct aio_private_data *pd_list;
+
+static void aio_pthread_handle_completion(struct event_context