Re: [Samba] Samba4 questions?

2010-11-05 Thread Michael Wood
On 4 November 2010 16:35, Charles Tryon charles.tr...@gmail.com wrote:
 I have been doing some work with the new Samba4 version and have some
 questions.  Is this the right list to ask on, or is there a development list
 that would be better?

The Samba4 HOWTO still says While Samba4 is still in alpha release we
would encourage you to report both your successes and failures to the
samba-technical mailing list on http://lists.samba.org;.

I've copied my reply there.

  (I am currently following the Samba4 HOWTO Wiki at:
 http://wiki.samba.org/index.php/Samba4/HOWTO, and building from the git
 repository.  The system seems to be working well, but I have some questions
 about migrating users from an existing Samba3 domain and specifying a

There have been some messages on both the samba and samba-technical
lists recently about migrating from Samba3.  There's a script in
development to do the migration from an LDAP directory, referred to as
myldap-pub.py in the archives.  It will likely be committed to the
Samba repository soon under a different name.

 SID/RID instead of just taking whatever value the system hands out to me.
  I've spent weeks trying to find answers on Google, but have turned up empty
 so far.)

The provision script does have a --domain-sid option.  I've never
tried it, though.

See source4/setup/provision for the list of options.

-- 
Michael Wood esiot...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] 3.5.6 rpcclient settdriver error

2010-11-05 Thread Veiko Kukk

On 04/11/10 19:04, Daniel Deptuła wrote:

net rpc rights grant veiko SePrintOperatorPrivilege


That helped, thank you very much! Thought I had to add -Uveiko to the 
end of that line.


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

[Samba] Problems with ACL jumbo patch

2010-11-05 Thread Derek Lewis
I still cannot get a successful build with either the original set of patch
files or the diff file.  Although I can compile samba without the patch,
could I this be dependency problem or an out of date git version?

 

Derek

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


Re: [Samba] samba and OpenLDAP ppolicy

2010-11-05 Thread Daniel Müller
sambaMaxPwdAge: 5184000  --this is your entry in openldap that manges the
age of your passwords
If you do not set it it would not function

---
EDV Daniel Müller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen

Tel.: 07071/206-463, Fax: 07071/206-499
eMail: muel...@tropenklinik.de
Internet: www.tropenklinik.de
---

-Ursprüngliche Nachricht-
Von: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org] Im
Auftrag von Donny Brooks
Gesendet: Donnerstag, 4. November 2010 18:46
An: samba@lists.samba.org
Betreff: [Samba] samba and OpenLDAP ppolicy

I am looking for a way to enforce our password policy using our PDC with 
OpenLDAP. I have already configured ppolicy, just can not find a way to 
make it enforce it on the windows clients. Searches turn up little to go 
on. I must be searching for the wrong terms. Anyone have any pointers?
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

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


Re: [Samba] Problems with ACL jumbo patch

2010-11-05 Thread Miguel Medalha



I still cannot get a successful build with either the original set of patch
files or the diff file.  Although I can compile samba without the patch,
could I this be dependency problem or an out of date git version?


It worked for me in both cases. I did it from the sources for 3.5.6 
available from the Samba site:


www.samba.org

The only problems I found were some glitches in the RPM spec file when 
building RPMs for RHEL/CentOS, but those were easily corrected.


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


Re: [Samba] getting error with setfacl

2010-11-05 Thread Bruce Richardson
On Thu, Nov 04, 2010 at 11:50:03AM -0700, James D. Parra wrote:
 Hello Bruce, 
 
 Still can't get setfacl to get group or user info from the AD (Windows 2003)
 
 I have the following in nsswitch.conf;
 
 passwd: compat ldap
 group:  files ldap

Have you put the correct details into the nss_ldap configuration file?
On RedHat and Centos, this is /etc/ldap.conf (NOT /etc/ldap/ldap.conf),
while on Debian-derived distributions it is /etc/libnss-ldap.conf.  You
will need to set the uri and basedn configuration options.  You will
also either have to enable anonymous LDAP searches on your domain
controllers or (the more secure route) create a user with read-only
access to the relevant parts of your active directory tree and add their
details to the nss_ldap configuration file (binddn and bindpw).

-- 
Bruce

I must admit that the existence of Disneyland (which I know is real)
proves that we are not living in Judea in AD 50. -- Philip K. Dick
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] How to enable smb signing on samba

2010-11-05 Thread Shuaib Ilyas (shilyas)
Hi All,

I am running samba server version samba  (3.0.33-3.7.el5_3.1) on Fedora
core. This is working fine and I can access the server share from the
clients. I need to do some tests using this samba server with SMB
signing enabled. How can I enable smb signing on my samba server?

I have searched over web but have not found the procedure to do it.

Any pointers will be helpful.

Appreciate it.

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


Re: [Samba] How to enable smb signing on samba

2010-11-05 Thread Volker Lendecke
On Fri, Nov 05, 2010 at 11:13:39AM -0700, Shuaib Ilyas (shilyas) wrote:
 I am running samba server version samba  (3.0.33-3.7.el5_3.1) on Fedora
 core. This is working fine and I can access the server share from the
 clients. I need to do some tests using this samba server with SMB
 signing enabled. How can I enable smb signing on my samba server?
 
 I have searched over web but have not found the procedure to do it.
 
 Any pointers will be helpful.

server signing = mandatory

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


Re: [Samba] samba and OpenLDAP ppolicy

2010-11-05 Thread Björn Jacke
On 2010-11-04 at 12:45 -0500 Donny Brooks sent off:
 I am looking for a way to enforce our password policy using our PDC
 with OpenLDAP. I have already configured ppolicy, just can not find
 a way to make it enforce it on the windows clients. Searches turn up
 little to go on. I must be searching for the wrong terms. Anyone
 have any pointers?

this should be working with 3.6. I'd be happy if you try and say it actually
works for you :-)

Cheers
Björn
-- 
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
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Samba Versions

2010-11-05 Thread Gilmartin, Niall
We are using Samba Version 2.2.5 on a HP D Class Server running HP-UX 10.20. 
Anyway my question is does anybody happen to know what is the latest version of 
Samba that will operate with HP-UX 10.20?

Regards

Niall


BancTec Limited.
Registered Office: Jarman House, Mathisen Way, Poyle Road, Colnbrook, Berkshire 
SL3 0HF. Incorporated in England  Wales : 1283512. VAT : GB 228 4783 38.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] How to enable smb signing on samba

2010-11-05 Thread Shuaib Ilyas (shilyas)
Thanks, Volker.

After making this change, when client is sending Negotiate protocol
Request, server is not responding to this request.

Is it something to do with workgroup/domain?
In my setup, this samba server is in a workgroup not part of the domain.

Shuaib


[global]

workgroup = wrkgrp

netbios name = smbserver

security = SHARE

load printers = No

default service = global

path = /home

available = yes

encrypt passwords = yes
server signing = mandatory



-Original Message-
From: Volker Lendecke [mailto:volker.lende...@sernet.de] 
Sent: Friday, November 05, 2010 12:01 PM
To: Shuaib Ilyas (shilyas)
Cc: samba@lists.samba.org
Subject: Re: [Samba] How to enable smb signing on samba

On Fri, Nov 05, 2010 at 11:13:39AM -0700, Shuaib Ilyas (shilyas) wrote:
 I am running samba server version samba  (3.0.33-3.7.el5_3.1) on
Fedora
 core. This is working fine and I can access the server share from the
 clients. I need to do some tests using this samba server with SMB
 signing enabled. How can I enable smb signing on my samba server?
 
 I have searched over web but have not found the procedure to do it.
 
 Any pointers will be helpful.

server signing = mandatory

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


Re: [Samba] How to enable smb signing on samba

2010-11-05 Thread Andrew Bartlett
On Fri, 2010-11-05 at 12:52 -0700, Shuaib Ilyas (shilyas) wrote:
 Thanks, Volker.
 
 After making this change, when client is sending Negotiate protocol
 Request, server is not responding to this request.
 
 Is it something to do with workgroup/domain?
 In my setup, this samba server is in a workgroup not part of the domain.
 
 Shuaib
 
 
 [global]
 
 workgroup = wrkgrp
 
 netbios name = smbserver
 
 security = SHARE
 
 load printers = No
 
 default service = global
 
 path = /home
 
 available = yes
 
 encrypt passwords = yes
 server signing = mandatory

You cannot use security=share and smb signing at the same time. 

Andrew Bartlett

-- 
Andrew Bartletthttp://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org
Samba Developer, Cisco Inc.


signature.asc
Description: This is a digitally signed message part
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Build status as of Fri Nov 5 06:00:02 2010

2010-11-05 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2010-11-04 
00:00:04.0 -0600
+++ /home/build/master/cache/broken_results.txt 2010-11-05 00:00:04.0 
-0600
@@ -1,22 +1,22 @@
-Build status as of Thu Nov  4 06:00:02 2010
+Build status as of Fri Nov  5 06:00:02 2010
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   37 3  0 
+ccache   37 4  0 
 ccache-maint 36 2  0 
-ldb  37 20 0 
-libreplace   37 36 0 
+ldb  37 26 0 
+libreplace   37 37 0 
 lorikeet 0  0  0 
 pidl 21 21 0 
 ppp  15 0  0 
 rsync37 16 0 
 samba-docs   0  0  0 
 samba-web0  0  0 
-samba_3_current 37 34 3 
+samba_3_current 37 33 3 
 samba_3_master 37 20 0 
-samba_3_next 37 35 0 
-samba_4_0_test 42 35 0 
+samba_3_next 37 34 0 
+samba_4_0_test 42 34 0 
 talloc   37 19 0 
 tdb  35 13 0 
 


[SCM] Samba Shared Repository - branch master updated

2010-11-05 Thread Anatoliy Atanasov
The branch, master has been updated
   via  211f6d5 s4/auth: Add logon_parameters to authenticate_username_pw
   via  d952f6c s4/test: Added test for simple bind with machine account
  from  cd172e7 talloc: Add python talloc module, move convenience 
functions to it.

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


- Log -
commit 211f6d5f557c7a737f3ccc1b4ef592c0ea8d7b94
Author: Anatoliy Atanasov anatoliy.atana...@postpath.com
Date:   Fri Nov 5 00:00:13 2010 +0200

s4/auth: Add logon_parameters to authenticate_username_pw

We need to be able to set the logon parameters in the same way as in the
ntlm server so we can handle openldap simple authentication call correctly.

Autobuild-User: Anatoliy Atanasov anato...@samba.org
Autobuild-Date: Fri Nov  5 06:32:43 UTC 2010 on sn-devel-104

commit d952f6c3918c1bbc96a55ded2e03e4695448a46d
Author: Anatoliy Atanasov anatoliy.atana...@postpath.com
Date:   Thu Nov 4 23:57:48 2010 +0200

s4/test: Added test for simple bind with machine account

Samba4 returns error on simple bind, when we do it using openldap
simple_bind_s api.

---

Summary of changes:
 source4/auth/auth.h|   15 ++--
 source4/auth/credentials/tests/bind.py |  116 
 source4/auth/ntlm/auth_simple.c|5 +-
 source4/ldap_server/ldap_bind.c|2 +
 4 files changed, 130 insertions(+), 8 deletions(-)
 create mode 100755 source4/auth/credentials/tests/bind.py


Changeset truncated at 500 lines:

diff --git a/source4/auth/auth.h b/source4/auth/auth.h
index 2f0af02..0f6386f 100644
--- a/source4/auth/auth.h
+++ b/source4/auth/auth.h
@@ -248,13 +248,14 @@ NTSTATUS auth_init(void);
 NTSTATUS auth_register(const struct auth_operations *ops);
 NTSTATUS server_service_auth_init(void);
 NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx,
-  struct tevent_context *ev,
-  struct messaging_context *msg,
-  struct loadparm_context *lp_ctx,
-  const char *nt4_domain,
-  const char *nt4_username,
-  const char *password,
-  struct auth_session_info 
**session_info);
+ struct tevent_context *ev,
+ struct messaging_context *msg,
+ struct loadparm_context *lp_ctx,
+ const char *nt4_domain,
+ const char *nt4_username,
+ const char *password,
+ const uint32_t logon_parameters,
+ struct auth_session_info **session_info);
 
 struct tevent_req *auth_check_password_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
diff --git a/source4/auth/credentials/tests/bind.py 
b/source4/auth/credentials/tests/bind.py
new file mode 100755
index 000..231852c
--- /dev/null
+++ b/source4/auth/credentials/tests/bind.py
@@ -0,0 +1,116 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# This is unit with tests for LDAP access checks
+
+import optparse
+import sys
+import base64
+import re
+import os
+
+sys.path.append(bin/python)
+import samba
+samba.ensure_external_module(subunit, subunit/python)
+samba.ensure_external_module(testtools, testtools)
+
+import samba.getopt as options
+
+from ldb import (
+SCOPE_BASE, SCOPE_SUBTREE, LdbError, ERR_NO_SUCH_OBJECT)
+from samba.dcerpc import security
+
+from samba.auth import system_session
+from samba import gensec
+from samba.samdb import SamDB
+from samba.credentials import Credentials
+import samba.tests
+from subunit.run import SubunitTestRunner
+import unittest
+
+parser = optparse.OptionParser(ldap [options] host)
+sambaopts = options.SambaOptions(parser)
+parser.add_option_group(sambaopts)
+
+# use command line creds if available
+credopts = options.CredentialsOptions(parser)
+parser.add_option_group(credopts)
+opts, args = parser.parse_args()
+
+if len(args)  1:
+parser.print_usage()
+sys.exit(1)
+
+host = args[0]
+lp = sambaopts.get_loadparm()
+creds = credopts.get_credentials(lp)
+creds.set_gensec_features(creds.get_gensec_features() | gensec.FEATURE_SEAL)
+creds_machine = creds
+
+class BindTests(samba.tests.TestCase):
+def delete_force(self, ldb, dn):
+try:
+ldb.delete(dn)
+except LdbError, (num, _):
+self.assertEquals(num, ERR_NO_SUCH_OBJECT)
+
+def find_basedn(self, ldb):
+res = ldb.search(base=, expression=, scope=SCOPE_BASE,
+ attrs=[defaultNamingContext])

[SCM] Samba Shared Repository - branch master updated

2010-11-05 Thread Stefan Metzmacher
The branch, master has been updated
   via  578a37e s4:dsdb/drepl_notify: reuse dreplsrv_notify_operation 
structures
  from  211f6d5 s4/auth: Add logon_parameters to authenticate_username_pw

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


- Log -
commit 578a37e806ff1c1194a694dc39f65fdd1cbf7b11
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Nov 4 18:07:18 2010 +0100

s4:dsdb/drepl_notify: reuse dreplsrv_notify_operation structures

Otherwise we'll requeue the same notify events on and on.

(gdb) p *((struct dreplsrv_service *) 0x1b52190)-ops.notifies
$8 = {prev = 0xe4cb30, next = 0x1a25440, service = 0x1b52190, uSN = 123905,
source_dsa = 0x164c100, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *) 0x1b52190)-ops.notifies-next
$9 = {prev = 0x80e000, next = 0x1b7bf70, service = 0x1b52190, uSN = 123589,
source_dsa = 0x1a2d930, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *) 0x1b52190)-ops.notifies-next-next
$10 = {prev = 0x1a25440, next = 0x1d0c310, service = 0x1b52190, uSN = 1587,
source_dsa = 0x13d3210, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *) 
0x1b52190)-ops.notifies-next-next-next
$11 = {prev = 0x1b7bf70, next = 0x1ba1420, service = 0x1b52190, uSN = 
123905,
source_dsa = 0x164c100, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *)
0x1b52190)-ops.notifies-next-next-next-next
$12 = {prev = 0x1d0c310, next = 0x1c43510, service = 0x1b52190, uSN = 
123589,
source_dsa = 0x1a2d930, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *)
0x1b52190)-ops.notifies-next-next-next-next-next
$13 = {prev = 0x1ba1420, next = 0xed97b0, service = 0x1b52190, uSN = 1587,
source_dsa = 0x13d3210, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *)
0x1b52190)-ops.notifies-next-next-next-next-next-next
$14 = {prev = 0x1c43510, next = 0xe4ce80, service = 0x1b52190, uSN = 123905,
source_dsa = 0x164c100, is_urgent = false, replica_flags = 29}

We can reuse this operations, while they're not yet started.

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Fri Nov  5 07:15:04 UTC 2010 on sn-devel-104

---

Summary of changes:
 source4/dsdb/repl/drepl_notify.c |   22 ++
 1 files changed, 22 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/repl/drepl_notify.c b/source4/dsdb/repl/drepl_notify.c
index 5d4ed6a..836509b 100644
--- a/source4/dsdb/repl/drepl_notify.c
+++ b/source4/dsdb/repl/drepl_notify.c
@@ -305,6 +305,28 @@ static WERROR dreplsrv_schedule_notify_sync(struct 
dreplsrv_service *service,
return WERR_DS_UNAVAILABLE;
}
 
+   /* first try to find an existing notify operation */
+   for (op = service-ops.notifies; op; op = op-next) {
+   if (op-source_dsa != s) {
+   continue;
+   }
+
+   if (op-is_urgent != is_urgent) {
+   continue;
+   }
+
+   if (op-replica_flags != replica_flags) {
+   continue;
+   }
+
+   if (op-uSN  uSN) {
+   op-uSN = uSN;
+   }
+
+   /* reuse the notify operation, as it's not yet started */
+   return WERR_OK;
+   }
+
op = talloc_zero(mem_ctx, struct dreplsrv_notify_operation);
W_ERROR_HAVE_NO_MEMORY(op);
 


-- 
Samba Shared Repository


[SCM] build.samba.org - branch master updated

2010-11-05 Thread Matthieu Patou
The branch, master has been updated
   via  5129e80 Add doc
   via  2495a59 More reformat
   via  b9c813f add .pyc to gitignore
   via  3f25051 Allow Solaris to build the file and make it run
   via  df2e202 quiet stderr
   via  ca5178c test if file exists before mv or cmp
   via  79e242f Reformat
  from  43cebea add some more discontinued build trees

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


- Log -
commit 5129e80d45a3eda2e4abfde32ce107c1d49b0600
Author: Matthieu Patou m...@matws.net
Date:   Fri Nov 5 09:36:00 2010 +0300

Add doc

commit 2495a59b76a53bfee5c92baf958e19df7facec66
Author: Matthieu Patou m...@matws.net
Date:   Fri Nov 5 09:27:03 2010 +0300

More reformat

commit b9c813f6986736de5a88752db6a72c242ad40b4d
Author: Matthieu Patou m...@matws.net
Date:   Fri Nov 5 09:05:51 2010 +0300

add .pyc to gitignore

commit 3f2505127825a6fc4045a0e58892e104194d230e
Author: Matthieu Patou m...@matws.net
Date:   Fri Nov 5 08:54:58 2010 +0300

Allow Solaris to build the file and make it run

Fix the MAX_PATH to 1024 if it hasn't been defined before,
avoid the use of asprintf as it's not available.

Also /proc/pid/cwd never point to the current working directory, instead
some version have /proc/pid/path/cwd so let's use it !

commit df2e202b86b73d7f80db4fb326922662424562d8
Author: Matthieu Patou m...@matws.net
Date:   Fri Nov 5 00:24:22 2010 +0300

quiet stderr

commit ca5178c2e5ce5cc1411dfede69368e588732daf3
Author: Matthieu Patou m...@matws.net
Date:   Thu Nov 4 23:32:58 2010 +0300

test if file exists before mv or cmp

commit 79e242fe6a78ba64eb1d2d2b539f3c1f944ecf25
Author: Matthieu Patou m...@matws.net
Date:   Thu Nov 4 23:19:32 2010 +0300

Reformat

---

Summary of changes:
 .gitignore |1 +
 build_test.fns |  690 +++-
 killbysubdir.c |   25 ++-
 3 files changed, 402 insertions(+), 314 deletions(-)


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index 222c794..8945e11 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 hostdb.sqlite
 _trial_temp
+*.pyc
diff --git a/build_test.fns b/build_test.fns
index 33f22ab..7ed0ed0 100644
--- a/build_test.fns
+++ b/build_test.fns
@@ -1,4 +1,4 @@
-#!/bin/sh -*- mode: shell-script; sh-indentation: 8; indent-tabs-mode: t; -*-
+#!/bin/sh -*- mode: shell-script; -*-
 
 # build_farm -- distributed build/test architecture for samba, rsync, etc
 
@@ -17,11 +17,22 @@ deptrees=;
 
 build_test_fns_id='$Id$'
 
+copy_dir() {
+   Tsrc=$1
+   Tdst=$2
+   pwd
+   echo rsync -a --delete $Tsrc/ $Tdst
+   rsync -a --delete $Tsrc/ $Tdst || return 1
+   return 0
+}
+
 #
 # build a signature of a tree, used to see if we
 # need to rebuild 
+#
+
 sum_tree() {
-sum_tree_test_root=$1
+   sum_tree_test_root=$1
sum_tree_tree=$2
sum_tree_sum=$3
sum_tree_scm=$4
@@ -29,25 +40,27 @@ sum_tree() {
sum build_test build_test.fns  $sum_tree_sum
 
if [ -f $host.fns ]; then
-   sum $host.fns  $sum_tree_sum
+   sum $host.fns  $sum_tree_sum
else
-sum generic.fns  $sum_tree_sum
+   sum generic.fns  $sum_tree_sum
fi
 
if [ -f $test_root/$tree.$scm ]; then
-   sum $test_root/$tree.$scm  $sum_tree_sum
+   sum $test_root/$tree.$scm  $sum_tree_sum
fi
 
for d in $deptrees; do
-   dscm=`choose_scm $d`
-   if [ -f $test_root/$d.$dscm ]; then
+   dscm=`choose_scm $d`
+   if [ -f $test_root/$d.$dscm ]; then
sum $test_root/$d.$dscm  $sum_tree_sum
-   fi
+   fi
done
 }
 
 #
 # send the logs to the master site
+#
+
 send_logs() {
if [ $nologreturn = yes ]; then
echo skipping log transfer
@@ -76,7 +89,7 @@ send_logs() {
find $err -size +4 | $XARGS_I sh -c 'dd if={} bs=1024 
count=2 of={}.tmp  mv {}.tmp {}   echo \n***LOG TRUNCATED***  {}'
 
rsync $* -c -q --password-file=.password -z --timeout=200 \
-   $log $err $h...@build.samba.org::build_farm_data/
+   $log $err $h...@build.samba.org::build_farm_data/
fi
 }
 
@@ -85,13 +98,17 @@ send_logs() {
 # the aim is to just update the servers timestamp.
 # sending with a very large rsync block size does this
 # with minimal network traffic
+#
+
 send_logs_skip() {
-touch $1 $2
-send_logs $1 $2 -B 1000
+   touch $1 $2
+   send_logs $1 $2 -B 1000
 }
 
 
 # fetch the latest copy of the tree

[SCM] Samba Shared Repository - branch master updated

2010-11-05 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  90b3bf8 ldb:ldb.h - reorder extended operations list
  from  578a37e s4:dsdb/drepl_notify: reuse dreplsrv_notify_operation 
structures

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


- Log -
commit 90b3bf8f62465f4e9925232aacd2045136689bbc
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Nov 4 21:58:16 2010 +0100

ldb:ldb.h - reorder extended operations list

We always define the controls and operations with a comment block. The data
structure definitions lie a bit below.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Nov  5 08:44:14 UTC 2010 on sn-devel-104

---

Summary of changes:
 source4/lib/ldb/include/ldb.h |   14 ++
 1 files changed, 10 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 933ee93..eeb939a 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -683,7 +683,16 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, 
void *opaque);
 */
 #define LDB_CONTROL_RELAX_OID 1.3.6.1.4.1.4203.666.5.12
 
-/*
+/* Extended operations */
+
+/**
+   OID for LDAP Extended Operation SEQUENCE_NUMBER
+
+   This extended operation is used to retrieve the extended sequence number.
+*/
+#define LDB_EXTENDED_SEQUENCE_NUMBER   1.3.6.1.4.1.7165.4.4.3
+
+/**
OID for LDAP Extended Operation PASSWORD_CHANGE.
 
This Extended operation is used to allow user password changes by the user
@@ -691,7 +700,6 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
 */
 #define LDB_EXTENDED_PASSWORD_CHANGE_OID   1.3.6.1.4.1.4203.1.11.1
 
-/* Extended operations */
 
 /**
OID for LDAP Extended Operation FAST_BIND
@@ -849,8 +857,6 @@ struct ldb_extended {
void *data; /* NULL or a valid talloc pointer! talloc_get_type() will 
be used on it */
 };
 
-#define LDB_EXTENDED_SEQUENCE_NUMBER   1.3.6.1.4.1.7165.4.4.3
-
 enum ldb_sequence_type {
LDB_SEQ_HIGHEST_SEQ,
LDB_SEQ_HIGHEST_TIMESTAMP,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-11-05 Thread Stefan Metzmacher
The branch, master has been updated
   via  ac3f8d8 fix in_screen so that it works on os that don't chdir to 
$PWD
   via  c378835 tsocket: fill in sa.sa_len if the system supports it
  from  90b3bf8 ldb:ldb.h - reorder extended operations list

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


- Log -
commit ac3f8d859d1ab8b1bb9d41c465dd10499151a8c4
Author: Matthieu Patou m...@matws.net
Date:   Tue Nov 2 00:55:25 2010 +1100

fix in_screen so that it works on os that don't chdir to $PWD

That's the case on freebsd 7.2

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

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Fri Nov  5 09:27:19 UTC 2010 on sn-devel-104

commit c378835cb6d660bcd2e0bc6524fc7da5b29963ea
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Oct 21 07:00:34 2010 +0200

tsocket: fill in sa.sa_len if the system supports it

metze

---

Summary of changes:
 lib/tsocket/tsocket_bsd.c |   12 
 selftest/in_screen|1 +
 2 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index 019bf42..9e80065 100644
--- a/lib/tsocket/tsocket_bsd.c
+++ b/lib/tsocket/tsocket_bsd.c
@@ -263,6 +263,9 @@ int _tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
memcpy(bsda-u.ss, sa, sa_socklen);
 
bsda-sa_socklen = sa_socklen;
+#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+   bsda-u.sa.sa_len = bsda-sa_socklen;
+#endif
 
*_addr = addr;
return 0;
@@ -291,6 +294,9 @@ ssize_t tsocket_address_bsd_sockaddr(const struct 
tsocket_address *addr,
}
 
memcpy(sa, bsda-u.ss, sa_socklen);
+#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+   sa-sa_len = sa_socklen;
+#endif
return sa_socklen;
 }
 
@@ -900,6 +906,9 @@ static void tdgram_bsd_recvfrom_handler(void *private_data)
 
ZERO_STRUCTP(bsda);
bsda-sa_socklen = sizeof(bsda-u.ss);
+#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+   bsda-u.sa.sa_len = bsda-sa_socklen;
+#endif
 
ret = recvfrom(bsds-fd, state-buf, state-len, 0,
   bsda-u.sa, bsda-sa_socklen);
@@ -2095,6 +2104,9 @@ static struct tevent_req 
*tstream_bsd_connect_send(TALLOC_CTX *mem_ctx,
 
ZERO_STRUCTP(lrbsda);
lrbsda-sa_socklen = sizeof(lrbsda-u.ss);
+#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+   lrbsda-u.sa.sa_len = lrbsda-sa_socklen;
+#endif
}
 
state-fd = socket(sa_fam, SOCK_STREAM, 0);
diff --git a/selftest/in_screen b/selftest/in_screen
index 927d831..8bfbc01 100755
--- a/selftest/in_screen
+++ b/selftest/in_screen
@@ -39,6 +39,7 @@ printenv |
   sed s/\(^[^=]*=\)\(.*\)/export \1'\2'/g  $basedir/$SERVERNAME.vars
 
 cat EOF  $basedir/$SERVERNAME.launch
+cd $PWD
  echo \$\$  $basedir/$SERVERNAME.pid
  . $basedir/$SERVERNAME.vars
  echo \$(date) starting $SERVERNAME  $basedir/$SERVERNAME.log


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-11-05 Thread Volker Lendecke
The branch, master has been updated
   via  f2456cd s3: Allow disabling of mdns registrations
  from  ac3f8d8 fix in_screen so that it works on os that don't chdir to 
$PWD

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


- Log -
commit f2456cd5425b4d006cf35df9dc724d040558e0d6
Author: Volker Lendecke v...@samba.org
Date:   Fri Nov 5 11:41:09 2010 +0100

s3: Allow disabling of mdns registrations

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Fri Nov  5 11:24:41 UTC 2010 on sn-devel-104

---

Summary of changes:
 docs-xml/smbdotconf/base/multicastdnsregister.xml |   15 +++
 source3/include/proto.h   |1 +
 source3/param/loadparm.c  |   12 
 source3/smbd/server.c |2 +-
 4 files changed, 29 insertions(+), 1 deletions(-)
 create mode 100644 docs-xml/smbdotconf/base/multicastdnsregister.xml


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/base/multicastdnsregister.xml 
b/docs-xml/smbdotconf/base/multicastdnsregister.xml
new file mode 100644
index 000..32d9cfc
--- /dev/null
+++ b/docs-xml/smbdotconf/base/multicastdnsregister.xml
@@ -0,0 +1,15 @@
+samba:parameter name=multicast dns register
+   type=boolean
+ context=G
+ advanced=1
+ xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
+description
+paraIf compiled with proper support for it, Samba will
+announce itself with multicast DNS services like for example
+provided by the Avahi daemon./para
+
+   paraThis parameter allows disabling Samba to register
+   itself./para
+/description
+value type=defaultyes/value
+/samba:parameter
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1989fb1..6e14c33 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3419,6 +3419,7 @@ bool lp_dos_filetimes(int );
 bool lp_dos_filetime_resolution(int );
 bool lp_fake_dir_create_times(int);
 bool lp_async_smb_echo_handler(void);
+bool lp_multicast_dns_register(void);
 bool lp_blocking_locks(int );
 bool lp_inherit_perms(int );
 bool lp_inherit_acls(int );
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 1d3c735..f65682f 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -374,6 +374,7 @@ struct global {
char *szSMBPerfcountModule;
bool bMapUntrustedToDomain;
bool bAsyncSMBEchoHandler;
+   bool bMulticastDnsRegister;
int ismb2_max_read;
int ismb2_max_write;
int ismb2_max_trans;
@@ -4409,6 +4410,15 @@ static struct parm_struct parm_table[] = {
.flags  = FLAG_ADVANCED | FLAG_GLOBAL,
},
{
+   .label  = multicast dns register,
+   .type   = P_BOOL,
+   .p_class= P_GLOBAL,
+   .ptr= Globals.bMulticastDnsRegister,
+   .special= NULL,
+   .enum_list  = NULL,
+   .flags  = FLAG_ADVANCED | FLAG_GLOBAL,
+   },
+   {
.label  = panic action,
.type   = P_STRING,
.p_class= P_GLOBAL,
@@ -5372,6 +5382,7 @@ static void init_globals(bool reinit_globals)
Globals.iminreceivefile = 0;
 
Globals.bMapUntrustedToDomain = false;
+   Globals.bMulticastDnsRegister = true;
 
Globals.ismb2_max_read = 1024*1024;
Globals.ismb2_max_write = 1024*1024;
@@ -5857,6 +5868,7 @@ FN_LOCAL_BOOL(lp_dos_filetimes, bDosFiletimes)
 FN_LOCAL_BOOL(lp_dos_filetime_resolution, bDosFiletimeResolution)
 FN_LOCAL_BOOL(lp_fake_dir_create_times, bFakeDirCreateTimes)
 FN_GLOBAL_BOOL(lp_async_smb_echo_handler, Globals.bAsyncSMBEchoHandler)
+FN_GLOBAL_BOOL(lp_multicast_dns_register, Globals.bMulticastDnsRegister)
 FN_LOCAL_BOOL(lp_blocking_locks, bBlockingLocks)
 FN_LOCAL_BOOL(lp_inherit_perms, bInheritPerms)
 FN_LOCAL_BOOL(lp_inherit_acls, bInheritACLS)
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index dd3ae3a..c30b344 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -739,7 +739,7 @@ static bool open_sockets_smbd(struct smbd_parent_context 
*parent,
   msg_inject_fault);
 #endif
 
-   if (dns_port != 0) {
+   if (lp_multicast_dns_register()  (dns_port != 0)) {
 #ifdef WITH_DNSSD_SUPPORT
smbd_setup_mdns_registration(smbd_event_context(),
 parent, dns_port);


-- 
Samba Shared Repository


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

2010-11-05 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  169a637 s3: Allow disabling of mdns registrations
  from  e5226a3 librpc/ndr: use new strlen_m_ext_term() in 
ndr_charset_length(): fix bug #7594

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


- Log -
commit 169a637a4a3c441aae710f63074106c96e540324
Author: Volker Lendecke v...@samba.org
Date:   Fri Nov 5 11:41:09 2010 +0100

s3: Allow disabling of mdns registrations

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Fri Nov  5 11:24:41 UTC 2010 on sn-devel-104

---

Summary of changes:
 docs-xml/smbdotconf/base/multicastdnsregister.xml |   15 +++
 source3/include/proto.h   |1 +
 source3/param/loadparm.c  |   12 
 source3/smbd/server.c |2 +-
 4 files changed, 29 insertions(+), 1 deletions(-)
 create mode 100644 docs-xml/smbdotconf/base/multicastdnsregister.xml


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/base/multicastdnsregister.xml 
b/docs-xml/smbdotconf/base/multicastdnsregister.xml
new file mode 100644
index 000..32d9cfc
--- /dev/null
+++ b/docs-xml/smbdotconf/base/multicastdnsregister.xml
@@ -0,0 +1,15 @@
+samba:parameter name=multicast dns register
+   type=boolean
+ context=G
+ advanced=1
+ xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
+description
+paraIf compiled with proper support for it, Samba will
+announce itself with multicast DNS services like for example
+provided by the Avahi daemon./para
+
+   paraThis parameter allows disabling Samba to register
+   itself./para
+/description
+value type=defaultyes/value
+/samba:parameter
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 58abc58..010c3d1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3530,6 +3530,7 @@ bool lp_dos_filetimes(int );
 bool lp_dos_filetime_resolution(int );
 bool lp_fake_dir_create_times(int);
 bool lp_async_smb_echo_handler(void);
+bool lp_multicast_dns_register(void);
 bool lp_blocking_locks(int );
 bool lp_inherit_perms(int );
 bool lp_inherit_acls(int );
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index ebfe4ca..1552fae 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -371,6 +371,7 @@ struct global {
char *szSMBPerfcountModule;
bool bMapUntrustedToDomain;
bool bAsyncSMBEchoHandler;
+   bool bMulticastDnsRegister;
int ismb2_max_read;
int ismb2_max_write;
int ismb2_max_trans;
@@ -4413,6 +4414,15 @@ static struct parm_struct parm_table[] = {
.flags  = FLAG_ADVANCED | FLAG_GLOBAL,
},
{
+   .label  = multicast dns register,
+   .type   = P_BOOL,
+   .p_class= P_GLOBAL,
+   .ptr= Globals.bMulticastDnsRegister,
+   .special= NULL,
+   .enum_list  = NULL,
+   .flags  = FLAG_ADVANCED | FLAG_GLOBAL,
+   },
+   {
.label  = panic action,
.type   = P_STRING,
.p_class= P_GLOBAL,
@@ -5291,6 +5301,7 @@ static void init_globals(bool first_time_only)
Globals.iminreceivefile = 0;
 
Globals.bMapUntrustedToDomain = false;
+   Globals.bMulticastDnsRegister = true;
 
Globals.ismb2_max_read = 1024*1024;
Globals.ismb2_max_write = 1024*1024;
@@ -5774,6 +5785,7 @@ FN_LOCAL_BOOL(lp_dos_filetimes, bDosFiletimes)
 FN_LOCAL_BOOL(lp_dos_filetime_resolution, bDosFiletimeResolution)
 FN_LOCAL_BOOL(lp_fake_dir_create_times, bFakeDirCreateTimes)
 FN_GLOBAL_BOOL(lp_async_smb_echo_handler, Globals.bAsyncSMBEchoHandler)
+FN_GLOBAL_BOOL(lp_multicast_dns_register, Globals.bMulticastDnsRegister)
 FN_LOCAL_BOOL(lp_blocking_locks, bBlockingLocks)
 FN_LOCAL_BOOL(lp_inherit_perms, bInheritPerms)
 FN_LOCAL_BOOL(lp_inherit_acls, bInheritACLS)
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index b052a9a..04f0bc0 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -703,7 +703,7 @@ static bool open_sockets_smbd(struct smbd_parent_context 
*parent,
   MSG_SMB_INJECT_FAULT, msg_inject_fault);
 #endif
 
-   if (dns_port != 0) {
+   if (lp_multicast_dns_register()  (dns_port != 0)) {
 #ifdef WITH_DNSSD_SUPPORT
smbd_setup_mdns_registration(smbd_event_context(),
 parent, dns_port);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-11-05 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  6d53d9f s4:password_hash LDB module - fix indentation
  from  f2456cd s3: Allow disabling of mdns registrations

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


- Log -
commit 6d53d9f2ce68db1cc2cf6fc0ebaca548bcfb9a42
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Nov 5 12:49:42 2010 +0100

s4:password_hash LDB module - fix indentation

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Nov  5 12:31:28 UTC 2010 on sn-devel-104

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/password_hash.c |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c 
b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 2c7f436..7b02479 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -1300,11 +1300,11 @@ static int setup_given_passwords(struct 
setup_password_fields_io *io,
return ldb_oom(ldb);
}
if (!convert_string_talloc(io-ac,
-  CH_UTF8, CH_UTF16,
-  g-cleartext_utf8-data,
-  
g-cleartext_utf8-length,
-  (void 
*)cleartext_utf16_str,
-  converted_pw_len, 
false)) {
+  CH_UTF8, CH_UTF16,
+  g-cleartext_utf8-data,
+  g-cleartext_utf8-length,
+  (void *)cleartext_utf16_str,
+  converted_pw_len, false)) {
ldb_asprintf_errstring(ldb,
setup_password_fields: 
failed to generate UTF16 password from 
cleartext UTF8 password);
@@ -1323,11 +1323,11 @@ static int setup_given_passwords(struct 
setup_password_fields_io *io,
return ldb_oom(ldb);
}
if (!convert_string_talloc(io-ac,
-  CH_UTF16MUNGED, CH_UTF8,
-  g-cleartext_utf16-data,
-  
g-cleartext_utf16-length,
-  (void 
*)cleartext_utf8_str,
-  converted_pw_len, 
false)) {
+  CH_UTF16MUNGED, CH_UTF8,
+  g-cleartext_utf16-data,
+  g-cleartext_utf16-length,
+  (void *)cleartext_utf8_str,
+  converted_pw_len, false)) {
/* We can't bail out entirely, as these unconvertable 
passwords are frustratingly valid */
talloc_free(cleartext_utf8_blob);
} else {


-- 
Samba Shared Repository


[SCM] build.samba.org - branch master updated

2010-11-05 Thread Matthieu Patou
The branch, master has been updated
   via  6d5e933 Try to override make test that is broken
  from  5129e80 Add doc

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


- Log -
commit 6d5e933826b4032f081e33891313482ead6ebcd4
Author: Matthieu Patou m...@matws.net
Date:   Fri Nov 5 15:48:14 2010 +0300

Try to override make test that is broken

---

Summary of changes:
 buildsamba02.fns |   19 +--
 1 files changed, 17 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildsamba02.fns b/buildsamba02.fns
index bf87f4a..aff2672 100644
--- a/buildsamba02.fns
+++ b/buildsamba02.fns
@@ -4,10 +4,25 @@ global_lock
 
 #. install_python.fns
 
-for compiler in gcc cc; do
+action_test_samba() {
+do_make test
+totalstatus=$?
+
+# if we produced a test summary then show it
+[ -f st/summary ]  {
+echo TEST SUMMARY
+cat st/summary
+}
+
+return $totalstatus
+}
+echo PWD: `pwd`
+
+ls -l *.fns
+for compiler in gcc;  do
. common.fns
 
-#  test_tree samba_4_0_test source4 $compiler
+   test_tree samba_4_0_test source4 $compiler
 
test_tree samba_3_current source $compiler
test_tree samba_3_next source $compiler


-- 
build.samba.org


[SCM] Samba Shared Repository - branch master updated

2010-11-05 Thread Andrew Tridgell
The branch, master has been updated
   via  11ae104 s4-join: fixed secure_channel_type
   via  351312d s4-join: don't print all the NDR packets by default
   via  158ae8a s4-cldap: print all the DNS servers found
   via  eaabb59 s4-ldb: much more memory efficient msg filtering
   via  5fcb426 s4-drs: reduce the memory usage of the getncchanges server
   via  14f455b s4-kerberos Mention the remote address we fail to contact 
the KDC on
   via  0a2642c s4-ldb: show the reason for module initialization failure
   via  34ce183 s4: net - samba-tool
   via  506ffcf s4-join: added DC join to the python join code
   via  278778c s4-pydrs: added rodc option to python drs replication
   via  cbded38 s4-pydsdb: added DsReplicaAttribute()
   via  135756c pidl: use a union assignment instead of memmove
  from  6d53d9f s4:password_hash LDB module - fix indentation

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


- Log -
commit 11ae1046a00d858551692d9bd05935d16734a2ef
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 19:09:45 2010 +1100

s4-join: fixed secure_channel_type

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Nov  5 13:24:32 UTC 2010 on sn-devel-104

commit 351312d8b870698a44dc1a9766ce7aeec7028602
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 18:57:17 2010 +1100

s4-join: don't print all the NDR packets by default

commit 158ae8a1485a7d0d27b8a0cbdd98993f9a98ff67
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 18:56:46 2010 +1100

s4-cldap: print all the DNS servers found

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit eaabb5950fe89c15b575ffb37b35137d8a848c01
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 18:50:29 2010 +1100

s4-ldb: much more memory efficient msg filtering

this ensures we don't leave unnecessary attributes in returned ldb
objects

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 5fcb426d9a0bc4e2076a278babe3f0f2a550d54e
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 18:28:04 2010 +1100

s4-drs: reduce the memory usage of the getncchanges server

we now keep just a list of GUIDs around between getncchanges calls,
instead of an entire db search. This makes the overhead of having a
pending getncchanges call much smaller.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 14f455ba9955871fa8882edb8de788d2760c0cb0
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Nov 5 17:08:52 2010 +1100

s4-kerberos Mention the remote address we fail to contact the KDC on

commit 0a2642c7dc8589c2fc8524e370a2cfeb3064eb28
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 14:10:30 2010 +1100

s4-ldb: show the reason for module initialization failure

commit 34ce183d6cefe7bb332693d65f48dd1c96d7b7f7
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 14:10:11 2010 +1100

s4: net - samba-tool

commit 506ffcf86f19180a7beeaf3d290f6696a99d1788
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 14:09:49 2010 +1100

s4-join: added DC join to the python join code

this will replace the old vampire code

commit 278778c927b71847e87ce9b43e2a70665906befe
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 14:08:49 2010 +1100

s4-pydrs: added rodc option to python drs replication

commit cbded38ed5f319af4e9836039bfa16c6123e2ba7
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 14:06:10 2010 +1100

s4-pydsdb: added DsReplicaAttribute()

this allows us to form a DsReplicaAttribute structure from python

commit 135756c8ac34c4cf82992dce8c7218781e67f39b
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 11:52:20 2010 +1100

pidl: use a union assignment instead of memmove

this means we don't lose type checking

Pair-Programmed-With: Jelmer Vernooij jel...@samba.org

---

Summary of changes:
 pidl/lib/Parse/Pidl/Samba4/Python.pm  |6 +-
 source4/auth/kerberos/krb5_init_context.c |   11 +-
 source4/dsdb/pydsdb.c |   74 +
 source4/dsdb/wscript_build|2 +-
 source4/lib/ldb/common/ldb_modules.c  |3 +-
 source4/lib/ldb/ldb_tdb/ldb_search.c  |   23 ++-
 source4/libcli/finddcs_cldap.c|5 +
 source4/rpc_server/drsuapi/getncchanges.c |   90 --
 source4/scripting/devel/drs/vampire_ad.sh |2 +-
 source4/scripting/python/samba/drs_utils.py   |9 +-
 source4/scripting/python/samba/join.py|  422 -
 source4/scripting/python/samba/netcmd/join.py |   16 +-
 source4/scripting/python/samba/netcmd/rodc.py |2 +-
 

[SCM] Samba Shared Repository - branch master updated

2010-11-05 Thread Stefan Metzmacher
The branch, master has been updated
   via  c1e3c8b socket_wrapper: fill in sa.sa_len if the system supports it
  from  11ae104 s4-join: fixed secure_channel_type

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


- Log -
commit c1e3c8b550e10199ad29983cc759f6e259cac613
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Nov 5 09:43:05 2010 +0100

socket_wrapper: fill in sa.sa_len if the system supports it

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Fri Nov  5 14:40:00 UTC 2010 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c 
b/lib/socket_wrapper/socket_wrapper.c
index c52d98c..2985d00 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -584,10 +584,14 @@ static struct socket_info *find_socket_info(int fd)
 static int sockaddr_convert_to_un(struct socket_info *si, const struct 
sockaddr *in_addr, socklen_t in_len, 
  struct sockaddr_un *out_addr, int alloc_sock, 
int *bcast)
 {
+   struct sockaddr *out = (struct sockaddr *)(void *)out_addr;
if (!out_addr)
return 0;
 
-   out_addr-sun_family = AF_UNIX;
+   out-sa_family = AF_UNIX;
+#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+   out-sa_len = sizeof(*out_addr);
+#endif
 
switch (in_addr-sa_family) {
case AF_INET:
@@ -622,6 +626,8 @@ static int sockaddr_convert_from_un(const struct 
socket_info *si,
struct sockaddr *out_addr,
socklen_t *out_addrlen)
 {
+   int ret;
+
if (out_addr == NULL || out_addrlen == NULL) 
return 0;
 
@@ -643,7 +649,11 @@ static int sockaddr_convert_from_un(const struct 
socket_info *si,
errno = ESOCKTNOSUPPORT;
return -1;
}
-   return convert_un_in(in_addr, out_addr, out_addrlen);
+   ret = convert_un_in(in_addr, out_addr, out_addrlen);
+#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+   out_addr-sa_len = *out_addrlen;
+#endif
+   return ret;
default:
break;
}


-- 
Samba Shared Repository


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

2010-11-05 Thread Michael Adam
The branch, v3-6-test has been updated
   via  070664c s3-reg_parse: fix uninitialized variable in srprs_key().
   via  54f05bb s3-registry: fix some c++ build warnings.
   via  20e317e s3:registry: proposed aix build fix for reg_parse_internal
   via  966b983 s3:registry: try to fix the build of reg_parse_internal on 
HP-UX
   via  15d9959 s3:registry: remove unneeded TALLOC_CTX argument from 
reg_deletekey_recursive (cherry picked from commit 
7a25d13742fe190e2b8b97f62d7db85db4e816e9)
   via  7ce9821 s3:tests: fix misplaced '...' for grep pattern in 
test_net_registry.sh (cherry picked from commit 
a2ea85b68d86ed3651f00626b837cfa8184cc21b)
   via  6dd5575 s3-net: add command rpc registry import
   via  3746da1 s3-net: add command rpc registry export
   via  86fa623 s3-net: add command registry convert
   via  eb801a3 s3-net: add command registry export
   via  6e377c1 s3-net: add command registry import
   via  bc4e6ca s3-net: let rpccli_winreg_Connect optionally return WERROR
   via  7dc1d87 s3-registry: handle registration entries (.reg) files
   via  316828f s3-lib: add srprs, primitives to build simple recursive 
parsers
   via  c102ac7 s3-lib: add cbuf, a talloced character buffer
   via  16d2560 s3-docs: document net registry
  from  169a637 s3: Allow disabling of mdns registrations

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


- Log -
commit 070664c4f790687f319b301b8ff998a0290f829c
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 5 14:58:52 2010 +0200

s3-reg_parse: fix uninitialized variable in srprs_key().

Guenther
(cherry picked from commit caeb819861e0d87aebc6c1253102529cba6dec56)

commit 54f05bbe807d1f09b75e2a49bc559afc75b03bdd
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 22 12:40:42 2010 -0700

s3-registry: fix some c++ build warnings.

Guenther
(cherry picked from commit fe4576dff0dd949d87a099afc6b66e4763537fdd)

commit 20e317e5722cc634f4a38f7fe17636efff41d338
Author: Gregor Beck gb...@sernet.de
Date:   Fri Sep 24 11:29:09 2010 +0200

s3:registry: proposed aix build fix for reg_parse_internal

Signed-off-by: Michael Adam ob...@samba.org
(cherry picked from commit f4f5ad97741d4c6be32573338baa346808e1f108)

commit 966b98318a4410aec20cdf83b0aad04480cc811a
Author: Michael Adam ob...@samba.org
Date:   Thu Sep 23 18:48:25 2010 +0200

s3:registry: try to fix the build of reg_parse_internal on HP-UX

The HP compiler does not seem to like {} for char[4].
(cherry picked from commit c3f5d990652aec4b4f1f23a5e1c7b644cd46cbe7)

commit 15d9959d2bd7288b8884b9581bec3e12c688f8fa
Author: Michael Adam ob...@samba.org
Date:   Wed Sep 22 06:21:38 2010 +0200

s3:registry: remove unneeded TALLOC_CTX argument from 
reg_deletekey_recursive
(cherry picked from commit 7a25d13742fe190e2b8b97f62d7db85db4e816e9)

commit 7ce98216d0e14c1ba5f217ec7de1624226803fcb
Author: Michael Adam ob...@samba.org
Date:   Wed Sep 22 06:00:00 2010 +0200

s3:tests: fix misplaced '...' for grep pattern in test_net_registry.sh
(cherry picked from commit a2ea85b68d86ed3651f00626b837cfa8184cc21b)

commit 6dd55751750cd7ac754ee176ace71c8798edb7f7
Author: Gregor Beck gb...@sernet.de
Date:   Mon Sep 20 15:32:02 2010 +0200

s3-net: add command rpc registry import

Signed-off-by: Michael Adam ob...@samba.org
(cherry picked from commit a52b7e7229174500c8b8d5e52206e68749b99e2b)

commit 3746da177e472bd16c8d10b75b9f6edf9b58ac80
Author: Gregor Beck gb...@sernet.de
Date:   Mon Sep 20 16:45:57 2010 +0200

s3-net: add command rpc registry export

Signed-off-by: Michael Adam ob...@samba.org
(cherry picked from commit 96ba0cb8f2a02a5f991ef92ed9eeb81d1a42216b)

commit 86fa6231a42b61ef6fd62d0e1c5099074974d894
Author: Gregor Beck gb...@sernet.de
Date:   Mon Sep 20 15:01:40 2010 +0200

s3-net: add command registry convert

Signed-off-by: Michael Adam ob...@samba.org
(cherry picked from commit 0afc83c25556fc8162415738d1e8743009c4837c)

commit eb801a3b514676ab2776f7ffe14761d466cd1f3c
Author: Gregor Beck gb...@sernet.de
Date:   Mon Sep 20 15:01:01 2010 +0200

s3-net: add command registry export

Signed-off-by: Michael Adam ob...@samba.org
(cherry picked from commit e7c2724c8148d837d60b5e6cb6204ac5ea28164c)

commit 6e377c13f75522281e548205d872c70c3152e095
Author: Gregor Beck gb...@sernet.de
Date:   Mon Sep 20 14:54:30 2010 +0200

s3-net: add command registry import

Signed-off-by: Michael Adam ob...@samba.org
(cherry picked from commit 2a10fd769b3e2695433f579cd28c1a6f3bbce26e)

commit bc4e6caf69bb9231ae9e6592a53ac11d7af0f2b3
Author: Gregor Beck gb...@sernet.de
Date:   Mon Sep 20 15:24:03 2010 +0200

s3-net: let rpccli_winreg_Connect optionally return WERROR

Signed-off-by: Michael Adam ob...@samba.org
(cherry picked from commit 

[SCM] Samba Shared Repository - branch master updated

2010-11-05 Thread Volker Lendecke
The branch, master has been updated
   via  097be4b s3: Make proper use of sid_check_is_in_xx routines
   via  26b2a13 s3: Fix a typo
   via  5915d4a s3: Remove some duplicate prototypes
  from  c1e3c8b socket_wrapper: fill in sa.sa_len if the system supports it

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


- Log -
commit 097be4b10175c3b2f039f7406aac1d21bb7824b3
Author: Volker Lendecke v...@samba.org
Date:   Fri Nov 5 15:48:44 2010 +0100

s3: Make proper use of sid_check_is_in_xx routines

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Fri Nov  5 15:35:59 UTC 2010 on sn-devel-104

commit 26b2a132ffcd8485f06b349901796fb0367b62c7
Author: Volker Lendecke v...@samba.org
Date:   Fri Nov 5 15:44:55 2010 +0100

s3: Fix a typo

commit 5915d4a0b63882573a406a543f9cd5b72de061ff
Author: Volker Lendecke v...@samba.org
Date:   Fri Nov 5 15:38:28 2010 +0100

s3: Remove some duplicate prototypes

---

Summary of changes:
 source3/auth/server_info.c|6 +++---
 source3/utils/net_proto.h |   15 ---
 source3/winbindd/winbindd_proto.h |   16 
 3 files changed, 3 insertions(+), 34 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c
index c08c284..d288a0c 100644
--- a/source3/auth/server_info.c
+++ b/source3/auth/server_info.c
@@ -240,7 +240,7 @@ static NTSTATUS append_netr_SidAttr(TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
 }
 
-/* Fils the samr_RidWithAttributeArray with the provided sids.
+/* Fills the samr_RidWithAttributeArray with the provided sids.
  * If it happens that we have additional groups that do not belong
  * to the domain, add their sids as extra sids */
 static NTSTATUS group_sids_to_info3(struct netr_SamInfo3 *info3,
@@ -333,7 +333,7 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx,
 
/* check if this is a Unix Users domain user,
 * we need to handle it in a special way if that's the case */
-   if (dom_sid_compare_domain(user_sid, global_sid_Unix_Users) == 0) {
+   if (sid_check_is_in_unix_users(user_sid)) {
/* in info3 you can only set rids for the user and the
 * primary group, and the domain sid must be that of
 * the sam domain.
@@ -359,7 +359,7 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx,
 
/* check if this is a Unix Groups domain group,
 * if so we need special handling */
-   if (dom_sid_compare_domain(group_sid, global_sid_Unix_Groups) == 0) {
+   if (sid_check_is_in_unix_groups(group_sid)) {
/* in info3 you can only set rids for the user and the
 * primary group, and the domain sid must be that of
 * the sam domain.
diff --git a/source3/utils/net_proto.h b/source3/utils/net_proto.h
index 8422d28..9e9e82f 100644
--- a/source3/utils/net_proto.h
+++ b/source3/utils/net_proto.h
@@ -24,21 +24,6 @@
 #define _NET_PROTO_H_
 
 
-/* The following definitions come from auth/token_util.c  */
-
-bool nt_token_check_sid ( const struct dom_sid *sid, const struct 
security_token *token );
-bool nt_token_check_domain_rid( struct security_token *token, uint32 rid );
-struct security_token *get_root_nt_token( void );
-NTSTATUS add_aliases(const struct dom_sid *domain_sid,
-struct security_token *token);
-struct security_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
-   const struct dom_sid *user_sid,
-   bool is_guest,
-   int num_groupsids,
-   const struct dom_sid *groupsids);
-void debug_unix_user_token(int dbg_class, int dbg_lev, uid_t uid, gid_t gid,
-  int n_groups, gid_t *groups);
-
 /* The following definitions come from utils/net.c  */
 
 enum netr_SchannelType get_sec_channel_type(const char *param);
diff --git a/source3/winbindd/winbindd_proto.h 
b/source3/winbindd/winbindd_proto.h
index 3a7a298..ecdbdfe 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -23,22 +23,6 @@
 #ifndef _WINBINDD_PROTO_H_
 #define _WINBINDD_PROTO_H_
 
-
-/* The following definitions come from auth/token_util.c  */
-
-bool nt_token_check_sid ( const struct dom_sid *sid, const struct 
security_token *token );
-bool nt_token_check_domain_rid( struct security_token *token, uint32 rid );
-struct security_token *get_root_nt_token( void );
-NTSTATUS add_aliases(const struct dom_sid *domain_sid,
-struct security_token *token);
-struct security_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
-   const struct dom_sid *user_sid,
-   

[SCM] build.samba.org - branch master updated

2010-11-05 Thread Jelmer Vernooij
The branch, master has been updated
   via  73e47d1 Refactor html out of buildfarm.data.
   via  8ad36a0 Extract some generic functions.
  from  6d5e933 Try to override make test that is broken

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


- Log -
commit 73e47d19b2aaeb79cb7856251fa853c6bd77c561
Author: Jelmer Vernooij jel...@samba.org
Date:   Fri Nov 5 16:51:01 2010 +0100

Refactor html out of buildfarm.data.

commit 8ad36a03ef67addb7c7c5b07faa545121b4a2dc6
Author: Jelmer Vernooij jel...@samba.org
Date:   Fri Nov 5 16:42:39 2010 +0100

Extract some generic functions.

---

Summary of changes:
 buildfarm/data.py |  139 
 web/build.py  |   10 +++-
 2 files changed, 82 insertions(+), 67 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 0c0383d..665492f 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -34,6 +34,69 @@ def check_dir_exists(kind, path):
 raise Exception(%s directory %s does not exist % (kind, path))
 
 
+def build_status_from_logs(log, err):
+get status of build
+m = re.search(TEST STATUS:(.*), log)
+if m:
+tstatus = m.group(1)
+else:
+m = re.search(ACTION (PASSED|FAILED): test, log)
+if m:
+test_failures = len(re.findall(testsuite-(failure|error): , log))
+test_successes = len(re.findall(testsuite-success: , log))
+if test_successes  0:
+tstatus = test_failures
+else:
+tstatus = 255
+else:
+tstatus = None
+
+m = re.search(INSTALL STATUS:(.*), log)
+if m:
+istatus = m.group(1)
+else:
+istatus = None
+
+m = re.search(BUILD STATUS:(.*), log)
+if m:
+bstatus = m.group(1)
+else:
+bstatus = None
+
+m = re.search(CONFIGURE STATUS:(.*), log)
+if m:
+cstatus = m.group(1)
+else:
+cstatus = None
+
+other_failures = set()
+m = re.search((PANIC|INTERNAL ERROR):.*, log)
+if m:
+other_failures.add(panic)
+
+if No space left on device in err or No space left on device in log:
+other_failures.add(disk full)
+
+if maximum runtime exceeded in log:
+other_failures.add(timeout)
+
+m = re.search(CC_CHECKER STATUS: (.*), log)
+if m:
+sstatus = m.group(1)
+else:
+sstatus = None
+
+return ((cstatus, bstatus, istatus, tstatus, sstatus), other_failures)
+
+
+def lcov_extract_percentage(text):
+m = re.search('\td 
class=headerItem.*?\Code\nbsp\;covered\:\\/td\.*?\n.*?\td 
class=headerValue.*?\([0-9.]+) \%', text)
+if m:
+return m.group(1)
+else:
+return None
+
+
 class NoSuchBuildError(Exception):
 The build with the specified name does not exist.
 
@@ -126,14 +189,13 @@ class Build(object):
 def status(self):
 get status of build
 
-:return: string with build status
+:return: tuple with build status
 
-# FIXME: This should return a tuple
 
 log = self.read_log()
 err = self.read_err()
 
-return self._store.build_status_from_logs(log, err)
+return build_status_from_logs(log, err)
 
 def err_count(self):
 get status of build
@@ -283,60 +345,6 @@ class BuildResultStore(object):
 return os.path.join(self.datadir, oldrevs/build.%s.%s.%s-%s % 
(tree, host, compiler, rev))
 return os.path.join(self.datadir, upload/build.%s.%s.%s % (tree, 
host, compiler))
 
-def build_status_from_logs(self, log, err):
-get status of build
-m = re.search(TEST STATUS:(.*), log)
-if m:
-tstatus = m.group(1)
-else:
-m = re.search(ACTION (PASSED|FAILED): test, log)
-if m:
-test_failures = len(re.findall(testsuite-(failure|error): , 
log))
-test_successes = len(re.findall(testsuite-success: , log))
-if test_successes  0:
-tstatus = test_failures
-else:
-tstatus = 255
-else:
-tstatus = None
-
-m = re.search(INSTALL STATUS:(.*), log)
-if m:
-istatus = m.group(1)
-else:
-istatus = None
-
-m = re.search(BUILD STATUS:(.*), log)
-if m:
-bstatus = m.group(1)
-else:
-bstatus = None
-
-m = re.search(CONFIGURE STATUS:(.*), log)
-if m:
-cstatus = m.group(1)
-else:
-cstatus = None
-
-other_failures = set()
-m = re.search((PANIC|INTERNAL ERROR):.*, log)
-if m:
-other_failures.add(panic)
-
-if No space left on device in err or No space left on device in 

[SCM] build.samba.org - branch master updated

2010-11-05 Thread Jelmer Vernooij
The branch, master has been updated
   via  9dc4ebb add basic host database.
  from  73e47d1 Refactor html out of buildfarm.data.

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


- Log -
commit 9dc4ebb877c34d2d8efe6576213f07ee7f24e805
Author: Jelmer Vernooij jel...@samba.org
Date:   Fri Nov 5 17:44:03 2010 +0100

add basic host database.

---

Summary of changes:
 buildfarm/data.py  |1 +
 buildfarm/hostdb.py|  120 
 buildfarm/tests/test_hostdb.py |   47 
 3 files changed, 168 insertions(+), 0 deletions(-)
 create mode 100644 buildfarm/hostdb.py
 create mode 100644 buildfarm/tests/test_hostdb.py


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 665492f..b2c2aef 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -116,6 +116,7 @@ class Tree(object):
 self.branch = branch
 self.subdir = subdir
 self.srcdir = srcdir
+self.scm = scm
 
 def __repr__(self):
 return %s %r % (self.__class__.__name__, self.name)
diff --git a/buildfarm/hostdb.py b/buildfarm/hostdb.py
new file mode 100644
index 000..b2336b6
--- /dev/null
+++ b/buildfarm/hostdb.py
@@ -0,0 +1,120 @@
+#!/usr/bin/python
+
+# Samba.org buildfarm
+# Copyright (C) 2008 Andrew Bartlett abart...@samba.org
+# Copyright (C) 2008-2010 Jelmer Vernooij jel...@samba.org
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see http://www.gnu.org/licenses/.
+#
+
+
+import sqlite3
+import time
+
+
+class Host(object):
+A host in the buildfarm.
+
+def __init__(self, name, owner=None, owner_email=None, password=None, 
platform=None):
+self.name = name
+if owner:
+self.owner = (owner, owner_email)
+else:
+self.owner = None
+self.password = password
+self.platform = platform
+
+
+class HostDatabase(object):
+
+def __init__(self, filename=None):
+if filename is None:
+self.db = sqlite3.connect(:memory:)
+else:
+self.db = sqlite3.connect(filename)
+self.filename = filename
+self.db.executescript(
+CREATE TABLE IF NOT EXISTS host ( name text, owner text, 
owner_email text, password text, ssh_access int, fqdn text, platform text, 
permission text, last_dead_mail int, join_time int );
+CREATE UNIQUE INDEX IF NOT EXISTS unique_hostname ON host (name);
+CREATE TABLE IF NOT EXISTS build ( id integer primary key 
autoincrement, tree text, revision text, host text, compiler text, checksum 
text, age int, status text, commit_revision text);
+CREATE UNIQUE INDEX IF NOT EXISTS unique_checksum ON build 
(checksum);
+CREATE TABLE IF NOT EXISTS test_run ( build int, test text, result 
text, output text);
+)
+self.db.commit()
+
+def createhost(self, name, platform, owner, owner_email, password, 
permission):
+self.db.execute(INSERT INTO host (name, platform, owner, owner_email, 
password, permission, join_time) VALUES (?,?,?,?,?,?,?),
+(name, platform, owner, owner_email, password, permission, 
time.time()))
+self.db.commit()
+
+def deletehost(self, name):
+self.db.execute(DELETE FROM host WHERE name = ?, name)
+self.db.commit()
+
+def hosts(self):
+cursor = self.db.execute(SELECT name, owner, owner_email, password, 
platform FROM host ORDER BY name)
+for row in cursor.fetchall():
+yield Host(name=row[0], owner=row[1], owner_email=row[2], 
password=row[3], platform=row[4])
+
+def dead_hosts(self, age):
+dead_time = time.time() - age
+cursor = self.db.execute(SELECT host.name AS host, host.owner AS 
owner, host.owner_email AS owner_email, MAX(age) AS last_update FROM host LEFT 
JOIN build ON ( host.name == build.host) WHERE ifnull(last_dead_mail, 0)  %d 
AND ifnull(join_time, 0)  %d GROUP BY host.name having ifnull(MAX(age),0)  
%d % (dead_time, dead_time, dead_time))
+for row in cursor.fetchall():
+yield row[0]
+
+def host_ages(self):
+cursor = self.db.execute(SELECT host.name AS host, host.owner AS 
owner, host.owner_email AS owner_email, MAX(age) AS 

[SCM] build.samba.org - branch master updated

2010-11-05 Thread Matthieu Patou
The branch, master has been updated
   via  9ced472 Add unit tests for fixed bug
   via  fd66f7c Fix and improvements
   via  62611cc add test files
  from  9dc4ebb add basic host database.

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


- Log -
commit 9ced472403f0ba518b53589a31e58486afb472ff
Author: Matthieu Patou m...@matws.net
Date:   Fri Nov 5 22:09:24 2010 +0300

Add unit tests for fixed bug

commit fd66f7c6564e9551286ad5251fc41f7abb1994f6
Author: Matthieu Patou m...@matws.net
Date:   Fri Nov 5 22:07:42 2010 +0300

Fix and improvements

Fix pb with load_list and read_trees_from_conf
Make the standalone server serves static content too

commit 62611cc69ed7000ad03f79c15ce32a7a33cff7f2
Author: Matthieu Patou m...@matws.net
Date:   Fri Nov 5 22:07:16 2010 +0300

add test files

---

Summary of changes:
 buildfarm/data.py  |3 ++-
 buildfarm/tests/test_data.py   |   13 +
 buildfarm/tests/test_util.py   |8 
 buildfarm/tests/testlist   |5 +
 buildfarm/tests/testtree.conf  |9 +
 buildfarm/tests/testtree2.conf |   10 ++
 buildfarm/util.py  |4 +++-
 web/build.py   |   23 +++
 8 files changed, 69 insertions(+), 6 deletions(-)
 create mode 100644 buildfarm/tests/testlist
 create mode 100644 buildfarm/tests/testtree.conf
 create mode 100644 buildfarm/tests/testtree2.conf


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index b2c2aef..0593923 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -113,6 +113,7 @@ class Tree(object):
 def __init__(self, name, scm, repo, branch, subdir=, srcdir=):
 self.name = name
 self.repo = repo
+self.scm = scm
 self.branch = branch
 self.subdir = subdir
 self.srcdir = srcdir
@@ -291,7 +292,7 @@ def read_trees_from_conf(path):
 cfp.readfp(open(path))
 for s in cfp.sections():
 ret[s] = Tree(name=s, **dict(cfp.items(s)))
-return s
+return ret
 
 
 class BuildResultStore(object):
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index 42d06f0..c689261 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -30,6 +30,19 @@ class NonexistantTests(unittest.TestCase):
 self.assertRaises(
 Exception, data.BuildResultStore, somedirthatdoesn'texist, None)
 
+class MiscTests(unittest.TestCase):
+def test_read_trees_from_conf_ko(self):
+name = %s/testtree.conf % os.path.dirname(__file__)
+self.assertRaises(
+Exception, data.read_trees_from_conf, name, None)
+
+def test_read_trees_from_conf(self):
+name = %s/testtree2.conf % os.path.dirname(__file__)
+t = data.read_trees_from_conf(name)
+self.assertEquals(
+t[pidl].scm,
+git)
+
 
 class BuildResultStoreTests(BuildFarmTestCase):
 
diff --git a/buildfarm/tests/test_util.py b/buildfarm/tests/test_util.py
index eb2a475..b85c509 100755
--- a/buildfarm/tests/test_util.py
+++ b/buildfarm/tests/test_util.py
@@ -16,6 +16,7 @@
 #   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 import unittest
+import os
 from buildfarm import util
 
 class CountLinesTests(unittest.TestCase):
@@ -43,6 +44,13 @@ class DhmTimeTests(unittest.TestCase):
 self.assertEquals(1d 3h 1m, util.dhm_time(97265))
 self.assertEquals(3h 1m, util.dhm_time(10865))
 
+class LoadTests(unittest.TestCase):
+
+def test_simple(self):
+name = %s/testlist % os.path.dirname(__file__)
+l = util.load_list(name)
+self.assertEquals(4, len(l))
+self.assertEquals(three, l[2])
 
 class StripHtmlTests(unittest.TestCase):
 
diff --git a/buildfarm/tests/testlist b/buildfarm/tests/testlist
new file mode 100644
index 000..bdd1fd3
--- /dev/null
+++ b/buildfarm/tests/testlist
@@ -0,0 +1,5 @@
+one
+two
+three
+
+for
diff --git a/buildfarm/tests/testtree.conf b/buildfarm/tests/testtree.conf
new file mode 100644
index 000..7d0feb8
--- /dev/null
+++ b/buildfarm/tests/testtree.conf
@@ -0,0 +1,9 @@
+[foo]
+param1 = fooval1
+param2 = fooval2
+param3 = fooval3
+
+[bar]
+param1 = barval1
+param2 = barval2
+param3 = barval3
diff --git a/buildfarm/tests/testtree2.conf b/buildfarm/tests/testtree2.conf
new file mode 100644
index 000..09bc186
--- /dev/null
+++ b/buildfarm/tests/testtree2.conf
@@ -0,0 +1,10 @@
+[pidl]
+scm = git
+repo = samba.git
+branch = master
+subdir = pidl/
+
+[rsync]
+scm = git
+repo = rsync.git
+branch = HEAD
diff --git a/buildfarm/util.py b/buildfarm/util.py
index 4b24fe5..83346c1 100644
--- a/buildfarm/util.py
+++ b/buildfarm/util.py
@@ -26,7 +26,9 @@ def load_list(fname):
 try:
 for l in f.readlines():
 if l[0] != #:
-

[SCM] build.samba.org - branch master updated

2010-11-05 Thread Matthieu Patou
The branch, master has been updated
   via  9b50e55 Abstract compiler in a variable, add TDB_NO_FSYNC=1 for 
samba_* tests
  from  9ced472 Add unit tests for fixed bug

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


- Log -
commit 9b50e550f694ee59de8e7077ebd23f2a165095b6
Author: Matthieu Patou m...@matws.net
Date:   Fri Nov 5 22:44:04 2010 +0300

Abstract compiler in a variable, add TDB_NO_FSYNC=1 for samba_* tests

---

Summary of changes:
 SerNet-solaris8.fns |   13 -
 1 files changed, 8 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/SerNet-solaris8.fns b/SerNet-solaris8.fns
index 2272d5d..a096051 100644
--- a/SerNet-solaris8.fns
+++ b/SerNet-solaris8.fns
@@ -6,18 +6,21 @@ MAXTIME=36000
 TORTURE_MAXTIME=3600
 SMBD_MAXTIME=18000
 SAMBA_MAXTIME=18000
-export MAXTIME TORTURE_MAXTIME SMBD_MAXTIME SAMBA_MAXTIME
+LD_LIBRARY_PATH=/usr/local/ssl/lib
+export MAXTIME TORTURE_MAXTIME SMBD_MAXTIME SAMBA_MAXTIME LD_LIBRARY_PATH
+compilers=cc gcc
 
-for compiler in cc gcc; do
+for compiler in $compilers; do
#export config=--with-included-popt
. common.fns
-
+   TDB_NO_FSYNC=1
+   export TDB_NO_FSYNC
test_tree samba_4_0_test source4 $compiler
-
test_tree samba_3_current source $compiler
test_tree samba_3_next source $compiler
test_tree samba_3_master source $compiler
-
+   TDB_NO_FSYNC=0
+   export TDB_NO_FSYNC
 done
 
 global_unlock


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-05 Thread Matthieu Patou
The branch, master has been updated
   via  5fc89e9 try to force buildsamba02 to do what we want
  from  9b50e55 Abstract compiler in a variable, add TDB_NO_FSYNC=1 for 
samba_* tests

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


- Log -
commit 5fc89e9d60a816a58580f5666252daf30f09503a
Author: Matthieu Patou m...@matws.net
Date:   Fri Nov 5 23:21:39 2010 +0300

try to force buildsamba02 to do what we want

---

Summary of changes:
 buildsamba02.fns |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildsamba02.fns b/buildsamba02.fns
index aff2672..13663f5 100644
--- a/buildsamba02.fns
+++ b/buildsamba02.fns
@@ -4,7 +4,9 @@ global_lock
 
 #. install_python.fns
 
-action_test_samba() {
+action_mytest() {
+   echo PWD: `pwd`
+   ls -lrt ../../*.fns
 do_make test
 totalstatus=$?
 
@@ -16,13 +18,11 @@ action_test_samba() {
 
 return $totalstatus
 }
-echo PWD: `pwd`
 
-ls -l *.fns
 for compiler in gcc;  do
. common.fns
 
-   test_tree samba_4_0_test source4 $compiler
+   test_tree samba_4_0_test source4 $compiler configure config_log 
config_header build install mytest
 
test_tree samba_3_current source $compiler
test_tree samba_3_next source $compiler


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-05 Thread Matthieu Patou
The branch, master has been updated
   via  2b9b526 Fix a bug
   via  5c85dfd Make status easily marshallable and extensible, use the new 
format
  from  5fc89e9 try to force buildsamba02 to do what we want

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


- Log -
commit 2b9b526a47a334e37bb5e40d6c07f7e9a998f548
Author: Matthieu Patou m...@matws.net
Date:   Sat Nov 6 01:28:13 2010 +0300

Fix a bug

commit 5c85dfda386f72ba2bc7714d9ae71e05e353bd21
Author: Matthieu Patou m...@matws.net
Date:   Sat Nov 6 01:27:54 2010 +0300

Make status easily marshallable and extensible, use the new format

---

Summary of changes:
 buildfarm/data.py |   37 ++---
 web/build.py  |9 +++--
 2 files changed, 41 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 0593923..e2502d2 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -86,7 +86,8 @@ def build_status_from_logs(log, err):
 else:
 sstatus = None
 
-return ((cstatus, bstatus, istatus, tstatus, sstatus), other_failures)
+return {config: cstatus, build: bstatus, install: istatus,\
+test: tstatus, checker: sstatus, other: other_failures}
 
 
 def lcov_extract_percentage(text):
@@ -261,6 +262,34 @@ class CachingBuild(Build):
 
 return ret
 
+def unmarshall_status(self, cnt):
+tab = cnt.split('\n')
+hash = {}
+for l in tab:
+tab2 = l.split(':', 1)
+if tab2[0] == other:
+tab3 = []
+if len(tab2)  1:
+tab3 = tab2[1].split('%')
+hash[tab2[0]] = tab3
+else:
+if tab2[1] == None:
+hash[tab2[0]] = tab2[1]
+else:
+hash[tab2[0]] = None
+
+return hash
+
+def marshall_status(self, val):
+tab = []
+for k in val.keys():
+if k != other:
+tab.append(%s:%s % (k, val[k]))
+else:
+tab.append(%s:%s % (k, %.join(val[k])))
+
+return \n.join(tab)
+
 def status(self):
 file = self._store.build_fname(self.tree, self.host, self.compiler, 
self.rev)
 cachefile = self._store.cache_fname(self.tree, self.host, 
self.compiler, self.rev)+.status
@@ -274,12 +303,14 @@ class CachingBuild(Build):
 st2 = None
 
 if st2 and st1.st_ctime = st2.st_mtime:
-return util.FileLoad(cachefile)
+ cnt = util.FileLoad(cachefile)
+ return self.unmarshall_status(cnt)
 
 ret = super(CachingBuild, self).status()
 
 if not self._store.readonly:
-util.FileSave(cachefile, ret)
+cnt = self.marshall_status(ret)
+util.FileSave(cachefile, cnt)
 
 return ret
 
diff --git a/web/build.py b/web/build.py
index e31871d..399e005 100755
--- a/web/build.py
+++ b/web/build.py
@@ -79,7 +79,12 @@ def build_link(myself, tree, host, compiler, rev, status):
 
 
 def html_build_status(status):
-((cstatus, bstatus, istatus, tstatus, sstatus), other_failures) = status
+cstatus = status.get(config)
+bstatus = status.get(build)
+istatus = status.get(install)
+tstatus = status.get(test)
+sstatus = status.get(checker)
+other_failures = status.get(other)
 def span(classname, contents):
 return span class=\%s\%s/span % (classname, contents)
 
@@ -98,7 +103,7 @@ def html_build_status(status):
 if timeout in other_failures:
 ostatus += /+span(status failed, timeout)
 if sstatus is not None:
-ostatus += /.span(status checker, sstatus)
+ostatus += /+span(status checker, sstatus)
 return %s/%s/%s/%s%s % (span_status(cstatus), span_status(bstatus), 
span_status(istatus), span_status(tstatus), ostatus)
 
 


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-05 Thread Jelmer Vernooij
The branch, master has been updated
   via  6505499 Inline test data.
   via  9bce367 PEP8
   via  9f62c2b Add more tests.
   via  a72e3d2 Default rev to None, consistent with other code.
  from  2b9b526 Fix a bug

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


- Log -
commit 65054993bf7cf96f17517bcc7edcc3db32de0667
Author: Jelmer Vernooij jel...@samba.org
Date:   Fri Nov 5 20:29:36 2010 +0100

Inline test data.

commit 9bce36774b255246de091ad7a5810a72d9689d0c
Author: Jelmer Vernooij jel...@samba.org
Date:   Fri Nov 5 20:16:41 2010 +0100

PEP8

commit 9f62c2bee32bac90800a8925223c2ebb9491ad9d
Author: Jelmer Vernooij jel...@samba.org
Date:   Fri Nov 5 20:10:17 2010 +0100

Add more tests.

commit a72e3d2abecf16202750a8a4b448a6fe5a1c0786
Author: Jelmer Vernooij jel...@samba.org
Date:   Fri Nov 5 20:04:43 2010 +0100

Default rev to None, consistent with other code.

---

Summary of changes:
 buildfarm/data.py  |   37 ++-
 buildfarm/tests/test_data.py   |   63 ++--
 buildfarm/tests/test_util.py   |   24 ---
 buildfarm/tests/testlist   |5 ---
 buildfarm/tests/testtree.conf  |9 --
 buildfarm/tests/testtree2.conf |   10 --
 6 files changed, 82 insertions(+), 66 deletions(-)
 delete mode 100644 buildfarm/tests/testlist
 delete mode 100644 buildfarm/tests/testtree.conf
 delete mode 100644 buildfarm/tests/testtree2.conf


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index e2502d2..8a2ce6c 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -86,8 +86,7 @@ def build_status_from_logs(log, err):
 else:
 sstatus = None
 
-return {config: cstatus, build: bstatus, install: istatus,\
-test: tstatus, checker: sstatus, other: other_failures}
+return ((cstatus, bstatus, istatus, tstatus, sstatus), other_failures)
 
 
 def lcov_extract_percentage(text):
@@ -262,34 +261,6 @@ class CachingBuild(Build):
 
 return ret
 
-def unmarshall_status(self, cnt):
-tab = cnt.split('\n')
-hash = {}
-for l in tab:
-tab2 = l.split(':', 1)
-if tab2[0] == other:
-tab3 = []
-if len(tab2)  1:
-tab3 = tab2[1].split('%')
-hash[tab2[0]] = tab3
-else:
-if tab2[1] == None:
-hash[tab2[0]] = tab2[1]
-else:
-hash[tab2[0]] = None
-
-return hash
-
-def marshall_status(self, val):
-tab = []
-for k in val.keys():
-if k != other:
-tab.append(%s:%s % (k, val[k]))
-else:
-tab.append(%s:%s % (k, %.join(val[k])))
-
-return \n.join(tab)
-
 def status(self):
 file = self._store.build_fname(self.tree, self.host, self.compiler, 
self.rev)
 cachefile = self._store.cache_fname(self.tree, self.host, 
self.compiler, self.rev)+.status
@@ -303,14 +274,12 @@ class CachingBuild(Build):
 st2 = None
 
 if st2 and st1.st_ctime = st2.st_mtime:
- cnt = util.FileLoad(cachefile)
- return self.unmarshall_status(cnt)
+return eval(util.FileLoad(cachefile))
 
 ret = super(CachingBuild, self).status()
 
 if not self._store.readonly:
-cnt = self.marshall_status(ret)
-util.FileSave(cachefile, cnt)
+util.FileSave(cachefile, repr(ret))
 
 return ret
 
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index c689261..2ce5198 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -16,6 +16,8 @@
 #   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 import os
+import tempfile
+import testtools
 import time
 import unittest
 
@@ -30,14 +32,47 @@ class NonexistantTests(unittest.TestCase):
 self.assertRaises(
 Exception, data.BuildResultStore, somedirthatdoesn'texist, None)
 
-class MiscTests(unittest.TestCase):
+
+class ReadTreesFromConfTests(testtools.TestCase):
+
+def create_file(self, contents):
+(fd, path) = tempfile.mkstemp()
+f = os.fdopen(fd, 'w')
+self.addCleanup(os.remove, path)
+try:
+f.write(contents)
+finally:
+f.close()
+return path
+
 def test_read_trees_from_conf_ko(self):
-name = %s/testtree.conf % os.path.dirname(__file__)
+name = self.create_file(
+[foo]
+param1 = fooval1
+param2 = fooval2
+param3 = fooval3
+
+[bar]
+param1 = barval1
+param2 = barval2
+param3 = barval3
+)
 self.assertRaises(
 Exception, data.read_trees_from_conf, name, None)
 
 def test_read_trees_from_conf(self):
-name = 

[SCM] Samba Shared Repository - branch master updated

2010-11-05 Thread Andrew Tridgell
The branch, master has been updated
   via  ce203c0 s4-cldap: fixed debug message to match content
   via  2d52eea s4-join: fixed SPNs, invocationId and dnshostname and 
python join
   via  a162b1a s4-join: switch over to the new DC join in make test
   via  724599d samba-tool: deprecate samba-tool vampire command
  from  097be4b s3: Make proper use of sid_check_is_in_xx routines

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


- Log -
commit ce203c001db8d9598b6432738abd3081e8d658b8
Author: Andrew Tridgell tri...@samba.org
Date:   Sat Nov 6 14:44:33 2010 +1100

s4-cldap: fixed debug message to match content

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Sat Nov  6 04:26:45 UTC 2010 on sn-devel-104

commit 2d52eea0289e8c61282eba26b8dbb8036ca6a04b
Author: Andrew Tridgell tri...@samba.org
Date:   Sat Nov 6 14:35:30 2010 +1100

s4-join: fixed SPNs, invocationId and dnshostname and python join

- we need the GN/ SPN for replication.
- fixed the string form of the invocationId
- lowercase the dnshostname

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit a162b1a2d865c90441789640104adcd982e2bb75
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 18:57:36 2010 +1100

s4-join: switch over to the new DC join in make test

commit 724599de635608f13e0f2d500a59b8830ceede84
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Nov 5 14:16:49 2010 +1100

samba-tool: deprecate samba-tool vampire command

---

Summary of changes:
 selftest/target/Samba4.pm|2 +-
 source4/libcli/finddcs_cldap.c   |2 +-
 source4/scripting/devel/drs/vampire_ad.sh|2 +-
 source4/scripting/python/samba/join.py   |7 ---
 source4/scripting/python/samba/netcmd/vampire.py |6 +-
 5 files changed, 12 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 4676ad8..56b6186 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -995,7 +995,7 @@ sub provision_vampire_dc($$$)
my $cmd = ;
$cmd .= 
SOCKET_WRAPPER_DEFAULT_IFACE=\$ret-{SOCKET_WRAPPER_DEFAULT_IFACE}\ ;
$cmd .= KRB5_CONFIG=\$ret-{KRB5_CONFIG}\ ;
-   $cmd .= $samba_tool vampire $ret-{CONFIGURATION} $dcvars-{REALM} 
--realm=$dcvars-{REALM};
+   $cmd .= $samba_tool join $ret-{CONFIGURATION} $dcvars-{REALM} DC 
--realm=$dcvars-{REALM};
$cmd .=  -U$dcvars-{DC_USERNAME}\%$dcvars-{DC_PASSWORD};
 
unless (system($cmd) == 0) {
diff --git a/source4/libcli/finddcs_cldap.c b/source4/libcli/finddcs_cldap.c
index bbb221c..1928243 100644
--- a/source4/libcli/finddcs_cldap.c
+++ b/source4/libcli/finddcs_cldap.c
@@ -334,7 +334,7 @@ static void finddcs_cldap_srv_resolved(struct 
composite_context *ctx)
}
 
for (i=0; state-srv_addresses[i]; i++) {
-   DEBUG(4,(finddcs: DNS server %u at '%s'\n, i, 
state-srv_addresses[i]));
+   DEBUG(4,(finddcs: DNS SRV response %u at '%s'\n, i, 
state-srv_addresses[i]));
}
 
state-srv_address_index = 0;
diff --git a/source4/scripting/devel/drs/vampire_ad.sh 
b/source4/scripting/devel/drs/vampire_ad.sh
index ec14b24..5740ae1 100755
--- a/source4/scripting/devel/drs/vampire_ad.sh
+++ b/source4/scripting/devel/drs/vampire_ad.sh
@@ -23,6 +23,6 @@ nsupdate -g nsupdate.txt
 
 REALM=$(echo $DNSDOMAIN | tr '[a-z]' '[A-Z]')
 
-sudo $GDB bin/samba-tool vampire $DNSDOMAIN -Uadministrator%$pass -s 
$PREFIX/etc/smb.conf --option=realm=$REALM --option=ads:dc function level=4 
--option=ads:min function level=0 -d2 $@ || exit 1
+sudo $GDB bin/samba-tool join $DNSDOMAIN DC -Uadministrator%$pass -s 
$PREFIX/etc/smb.conf --option=realm=$REALM --option=ads:dc function level=4 
--option=ads:min function level=0 -d2 $@ || exit 1
 # PRIVATEDIR=$PREFIX/private sudo -E scripting/bin/setup_dns.sh $machine 
$DNSDOMAIN $machine_ip || exit 1
 #sudo rndc flush
diff --git a/source4/scripting/python/samba/join.py 
b/source4/scripting/python/samba/join.py
index d57eb58..7d3b6f2 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -85,7 +85,7 @@ class dc_join:
 
 ctx.dnsdomain = ldb.Dn(ctx.samdb, 
ctx.base_dn).canonical_str().split('/')[0]
 ctx.realm = ctx.dnsdomain
-ctx.dnshostname = %s.%s % (ctx.myname, ctx.dnsdomain)
+ctx.dnshostname = %s.%s % (ctx.myname.lower(), ctx.dnsdomain)
 
 ctx.acct_dn = CN=%s,OU=Domain Controllers,%s % (ctx.myname, 
ctx.base_dn)
 
@@ -93,7 +93,8 @@ class dc_join:
 ctx.tmp_samdb = None
 
 ctx.SPNs = [ HOST/%s % ctx.myname,
- HOST/%s % ctx.dnshostname ]
+