Re: [Samba] Samba Versions

2010-11-06 Thread Volker Lendecke
On Fri, Nov 05, 2010 at 02:26:17PM -0500, Gilmartin, Niall wrote:
 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?

At least we intend to make latest Samba 3.5.6 to work on
HP/UX. Due to lack of resources we don't provide binaries.
If the compile does not work, we will fix those problems
though.

Volker
-- 
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-06 Thread Derek Lewis
I could still be missing a dependency.

Most likely, I am not patching and compiling correctly.

-Original Message-
From: Miguel Medalha [mailto:miguelmeda...@sapo.pt] 
Sent: Friday, November 05, 2010 2:31 AM
To: Derek Lewis
Cc: samba@lists.samba.org
Subject: Re: [Samba] Problems with ACL jumbo patch


 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


Build status as of Sat Nov 6 06:00:02 2010

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

--- /home/build/master/cache/broken_results.txt.old 2010-11-05 
00:00:04.0 -0600
+++ /home/build/master/cache/broken_results.txt 2010-11-06 00:00:03.0 
-0600
@@ -1,4 +1,4 @@
-Build status as of Fri Nov  5 06:00:02 2010
+Build status as of Sat Nov  6 06:00:02 2010
 
 Build counts:
 Tree Total  Broken Panic 
@@ -15,8 +15,8 @@
 samba-web0  0  0 
 samba_3_current 37 33 3 
 samba_3_master 37 20 0 
-samba_3_next 37 34 0 
-samba_4_0_test 42 34 0 
-talloc   37 19 0 
+samba_3_next 37 35 0 
+samba_4_0_test 42 31 1 
+talloc   37 17 0 
 tdb  35 13 0 
 


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

2010-11-06 Thread Matthieu Patou

Hi Jelmer,

On 06/11/2010 05:26, Jelmer Vernooij wrote:

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 Vernooijjel...@samba.org
Date:   Fri Nov 5 20:29:36 2010 +0100

 Inline test data.

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

 PEP8

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

 Add more tests.

commit a72e3d2abecf16202750a8a4b448a6fe5a1c0786
Author: Jelmer Vernooijjel...@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)


Frankly speaking I thinking having a dictionnary/hash as we can extend 
without problem the structure to add more status ...


--
Matthieu Patou
Samba Teamhttp://samba.org
Private repo  http://git.samba.org/?p=mat/samba.git;a=summary




Re: [SCM] Samba Shared Repository - branch master updated

2010-11-06 Thread Stefan (metze) Metzmacher
Hi Tridge,

 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
 

Does the python join code, use the same network operations
as the C code (and as Windows servers)?

I mean first join as workstation and then promote as dc
and all other details like using dcerpc assoc groups id's
across multiple drsuapi connections.

I think we should make sure a network capture of a samba dc join
and a windows dc join look exactly the same.


metze



signature.asc
Description: OpenPGP digital signature


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

2010-11-06 Thread Matthieu Patou
The branch, master has been updated
   via  0732b86 Add tests for build_status_from_logs
   via  da03099 Be constant: return always integer if value
  from  6505499 Inline test data.

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


- Log -
commit 0732b861752b26d21bb2743526e349eae30f82a7
Author: Matthieu Patou m...@matws.net
Date:   Sat Nov 6 14:16:26 2010 +0300

Add tests for build_status_from_logs

commit da03099513b77b0631d72af298382119d5937ac4
Author: Matthieu Patou m...@matws.net
Date:   Sat Nov 6 14:13:10 2010 +0300

Be constant: return always integer if value

---

Summary of changes:
 buildfarm/data.py|   20 ++--
 buildfarm/tests/test_data.py |   41 +
 2 files changed, 51 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 8a2ce6c..0e1e94f 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -36,9 +36,9 @@ def check_dir_exists(kind, path):
 
 def build_status_from_logs(log, err):
 get status of build
-m = re.search(TEST STATUS:(.*), log)
+m = re.search(TEST STATUS:(\s*\d+), log)
 if m:
-tstatus = m.group(1)
+tstatus = int(m.group(1).strip())
 else:
 m = re.search(ACTION (PASSED|FAILED): test, log)
 if m:
@@ -51,21 +51,21 @@ def build_status_from_logs(log, err):
 else:
 tstatus = None
 
-m = re.search(INSTALL STATUS:(.*), log)
+m = re.search(INSTALL STATUS:(\s*\d+), log)
 if m:
-istatus = m.group(1)
+istatus = int(m.group(1).strip())
 else:
 istatus = None
 
-m = re.search(BUILD STATUS:(.*), log)
+m = re.search(BUILD STATUS:(\s*\d+), log)
 if m:
-bstatus = m.group(1)
+bstatus = int(m.group(1).strip())
 else:
 bstatus = None
 
-m = re.search(CONFIGURE STATUS:(.*), log)
+m = re.search(CONFIGURE STATUS:(\s*\d+), log)
 if m:
-cstatus = m.group(1)
+cstatus = int(m.group(1).strip())
 else:
 cstatus = None
 
@@ -80,9 +80,9 @@ def build_status_from_logs(log, err):
 if maximum runtime exceeded in log:
 other_failures.add(timeout)
 
-m = re.search(CC_CHECKER STATUS: (.*), log)
+m = re.search(CC_CHECKER STATUS:(\s*\d+), log)
 if m:
-sstatus = m.group(1)
+sstatus = int(m.group(1).strip())
 else:
 sstatus = None
 
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index 2ce5198..6ef0a18 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -32,6 +32,47 @@ class NonexistantTests(unittest.TestCase):
 self.assertRaises(
 Exception, data.BuildResultStore, somedirthatdoesn'texist, None)
 
+class BuildStatusFromLogs(testtools.TestCase):
+
+
+def test_build_status_from_logs(self):
+log = 
+TEST STATUS:1
+
+res = data.build_status_from_logs(log, )
+self.assertEquals(res[0][3], 1)
+log = 
+TEST STATUS:  1
+
+res = data.build_status_from_logs(log, )
+self.assertEquals(res[0][3], 1)
+log = 
+CONFIGURE STATUS: 2
+TEST STATUS:  1
+CC_CHECKER STATUS: 2
+
+res = data.build_status_from_logs(log, )
+self.assertEquals(res[0][4], 2)
+log = 
+CONFIGURE STATUS: 2
+ACTION PASSED: test
+CC_CHECKER STATUS: 2
+
+res = data.build_status_from_logs(log, )
+self.assertEquals(res[0][4], 2)
+self.assertEquals(res[0][3], 255)
+log = 
+CONFIGURE STATUS: 2
+ACTION PASSED: test
+testsuite-success: toto
+testsuite-failure: foo
+testsuite-failure: bar
+testsuite-failure: biz
+CC_CHECKER STATUS: 2
+
+res = data.build_status_from_logs(log, )
+self.assertEquals(res[0][0], 2)
+self.assertEquals(res[0][3], 3)
 
 class ReadTreesFromConfTests(testtools.TestCase):
 


-- 
build.samba.org


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

2010-11-06 Thread Matthieu Patou
The branch, master has been updated
   via  ddf0115 Fix permuted host and tree
   via  34e8d27 Split long line, add more information in asserts
  from  0732b86 Add tests for build_status_from_logs

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


- Log -
commit ddf01153d012539718cb23e0b35d70a85f575ccb
Author: Matthieu Patou m...@matws.net
Date:   Sat Nov 6 14:42:36 2010 +0300

Fix permuted host and tree

commit 34e8d279fd40760e36d6b50ce7952780a65abb8c
Author: Matthieu Patou m...@matws.net
Date:   Sat Nov 6 14:38:44 2010 +0300

Split long line, add more information in asserts

---

Summary of changes:
 web/build.py |   26 +-
 1 files changed, 13 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/web/build.py b/web/build.py
index 399e005..bc04126 100755
--- a/web/build.py
+++ b/web/build.py
@@ -75,16 +75,11 @@ def build_link(myself, tree, host, compiler, rev, status):
 else:
 opt_rev = ''
 return a 
href='%s?function=View+Build;host=%s;tree=%s;compiler=%s%s'%s/a % (
-myself, tree, host, compiler, opt_rev, status)
+   myself, host, tree, compiler, opt_rev, status)
 
 
 def html_build_status(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)
+((cstatus, bstatus, istatus, tstatus, sstatus), other_failures) = status
 def span(classname, contents):
 return span class=\%s\%s/span % (classname, contents)
 
@@ -375,9 +370,9 @@ def show_oldrevs(myself, tree, host, compiler):
 def view_build(myself, tree, host, compiler, rev, plain_logs=False):
 view one build in detail
 # ensure the params are valid before using them
-assert host in hosts, unknown host
-assert compiler in compilers, unknown compiler
-assert tree in trees, not a build tree
+assert host in hosts, unknown host %s % host
+assert compiler in compilers, unknown compiler %s % compiler
+assert tree in trees, not a build tree %s % tree
 
 uname = 
 cflags = 
@@ -413,7 +408,8 @@ def view_build(myself, tree, host, compiler, rev, 
plain_logs=False):
 yield util.FileLoad(../web/%s.html % host)
 
 yield table clas='real'
-yield trtdHost:/tdtda 
href='%s?function=View+Host;host=%s;tree=%s;compiler=%s#'%s/a - 
%s/td/tr % (myself, host, tree, compiler, host, hosts[host])
+yield trtdHost:/tdtda 
href='%s?function=View+Host;host=%s;tree=%s;\
+  compiler=%s#'%s/a - %s/td/tr % (myself, host, tree, 
compiler, host, hosts[host])
 yield trtdUname:/tdtd%s/td/tr % uname
 yield trtdTree:/tdtd%s/td/tr % tree_link(myself, tree)
 yield trtdBuild Revision:/tdtd%s/td/tr % 
revision_link(myself, revision, tree)
@@ -433,7 +429,9 @@ def view_build(myself, tree, host, compiler, rev, 
plain_logs=False):
 yield div id='log'
 
 if not plain_logs:
-yield pSwitch to the a 
href='%s?function=View+Build;host=%s;tree=%s;compiler=%s%s;plain=true' 
title='Switch to bland, non-javascript, unstyled view'Plain View/a/p % 
(myself, host, tree, compiler, rev_var)
+yield pSwitch to the a 
href='%s?function=View+Build;host=%s;tree=%s\
+  ;compiler=%s%s;plain=true' title='Switch to bland, 
non-javascript,\
+   unstyled view'Plain View/a/p % (myself, host, tree, 
compiler, rev_var)
 
 yield div id='actionList'
 # These can be pretty wide -- perhaps we need to 
@@ -453,7 +451,9 @@ def view_build(myself, tree, host, compiler, rev, 
plain_logs=False):
 yield psmallSome of the above icons derived from the a 
href='http://www.gnome.org'Gnome Project/a's stock icons./small/p
 yield /div
 else:
-yield pSwitch to the a 
href='%s?function=View+Build;host=%s;tree=%s;compiler=%s%s' title='Switch to 
colourful, javascript-enabled, styled view'Enhanced View/a/p % (myself, 
host, tree, compiler, rev_var)
+yield pSwitch to the a 
href='%s?function=View+Build;host=%s;tree=%s;\
+  compiler=%s%s' title='Switch to colourful, javascript-enabled, 
styled\
+   view'Enhanced View/a/p % (myself, host, tree, compiler, 
rev_var)
 if err == :
 yield h2No error log available/h2
 else:


-- 
build.samba.org


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

2010-11-06 Thread Matthieu Patou
The branch, master has been updated
   via  448ed75 Add my copyright
   via  c0bf364 Various fix for removing errors while accessing the build 
page
  from  ddf0115 Fix permuted host and tree

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


- Log -
commit 448ed75f8b1b6125c07ae78faa40bcc020478586
Author: Matthieu Patou m...@matws.net
Date:   Sat Nov 6 16:25:48 2010 +0300

Add my copyright

commit c0bf364b2176965a73f059454a07e5f91cef6f55
Author: Matthieu Patou m...@matws.net
Date:   Sat Nov 6 16:25:34 2010 +0300

Various fix for removing errors while accessing the build page

---

Summary of changes:
 web/build.py |   31 ++-
 1 files changed, 18 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/web/build.py b/web/build.py
index bc04126..7c4c44a 100755
--- a/web/build.py
+++ b/web/build.py
@@ -6,6 +6,7 @@
 # Copyright (C) Vance Lankhaar  va...@samba.org  2002-2005
 # Copyright (C) Martin Pool m...@samba.org2001
 # Copyright (C) Jelmer Vernooij jel...@samba.org 2007-2010
+# Copyright (C) Matthieu Patou m...@matws.net 2010-2010
 #
 #   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
@@ -382,7 +383,8 @@ def view_build(myself, tree, host, compiler, rev, 
plain_logs=False):
 (revision, revision_time) = build.revision_details()
 status = build_status(myself, tree, host, compiler, rev)
 
-assert re.match(^[0-9a-fA-F]*$, rev)
+if rev:
+assert re.match(^[0-9a-fA-F]*$, rev)
 
 log = build.read_log()
 err = build.read_err()
@@ -402,12 +404,13 @@ def view_build(myself, tree, host, compiler, rev, 
plain_logs=False):
 
 if err:
 err = cgi.escape(err)
-
 yield 'h2Host information:/h2'
 
-yield util.FileLoad(../web/%s.html % host)
+host_web_file = ../web/%s.html % host
+if os.path.exists(host_web_file):
+yield util.FileLoad(host_web_file)
 
-yield table clas='real'
+yield table class='real'
 yield trtdHost:/tdtda 
href='%s?function=View+Host;host=%s;tree=%s;\
   compiler=%s#'%s/a - %s/td/tr % (myself, host, tree, 
compiler, host, hosts[host])
 yield trtdUname:/tdtd%s/td/tr % uname
@@ -419,7 +422,7 @@ def view_build(myself, tree, host, compiler, rev, 
plain_logs=False):
 yield trtdCFLAGS:/tdtd%s/td/tr % cflags
 yield trtdconfigure options:/tdtd%s/td/tr % config
 
-yield show_oldrevs(tree, host, compiler)
+yield show_oldrevs(myself, tree, host, compiler) or 
 
 # check the head of the output for our magic string
 rev_var = 
@@ -562,6 +565,8 @@ def format_subunit_reason(reason):
 
 def print_log_pretty(log):
 # prints the log in a visually appealing manner
+global indice
+indice = 0
 
 # do some pretty printing for the actions
 def pretty_print(m):
@@ -572,17 +577,16 @@ def print_log_pretty(log):
 if actionName == 'cc_checker':
  output = print_log_cc_checker(output)
 
-id+=1
-make_collapsible_html('action', actionName, output, id, status)
+indice +=1
+make_collapsible_html('action', actionName, output, indice, status)
 return output
-id = 1
 log = re.sub((Running\ action\s+([\w\-]+) .*? ACTION\ (PASSED|FAILED):\ 
([\w\-]+)),
  pretty_print, log)
 
 # log is already CGI-escaped, so handle '' in test name by handling gt
 def format_stage(m):
-id += 1
-return make_collapsible_html('test', m.group(1), m.group(2), id, 
m.group(3))
+indice += 1
+return make_collapsible_html('test', m.group(1), m.group(2), indice, 
m.group(3))
 log = re.sub(
   --==--==--==--==--==--==--==--==--==--==--.*?
   Running\ test\ ([\w\-=,_:\ /.;]+).*?
@@ -594,8 +598,9 @@ def print_log_pretty(log):
 , format_stage, log)
 
 def format_skip_testsuite(m):
-id += 1
-return make_collapsible_html('test', m.group(1), '', id, 'skipped'),
+global indice
+indice += 1
+return make_collapsible_html('test', m.group(1), '', indice, 'skipped')
 
 log = re.sub(skip-testsuite: ([\w\-=,_:\ /.; \(\)]+).*?,
 format_skip_testsuite, log)
@@ -918,7 +923,7 @@ def buildApp(environ, start_response):
 if fn_name == View_Build:
 plain_logs = (get_param(form, plain) is not None and 
get_param(form, plain).lower() in (yes, 1, on, true, y))
 yield .join(view_build(myself, get_param(form, tree), 
get_param(form, host),
-get_param(form, compiler), get_param(form, 'revision'), 
plain_logs))
+get_param(form, compiler), get_param(form, revision), 
plain_logs))
 elif fn_name == View_Host:
 yield .join(view_host(myself, html, 

[SCM] Samba Shared Repository - branch master updated

2010-11-06 Thread Stefan Metzmacher
The branch, master has been updated
   via  0980a34 s4:DRS-RPC-DSSYNC: don't try to decrypt secret attributes 
twice
  from  ce203c0 s4-cldap: fixed debug message to match content

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


- Log -
commit 0980a3471ed8fcc3a37296857285dc0235e0e0d2
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Nov 6 13:41:34 2010 +0100

s4:DRS-RPC-DSSYNC: don't try to decrypt secret attributes twice

dsdb_extended_replicated_objects_convert() already decrypts the
attributes in place.

This fixes the usage of --option=dssync:print_pwd_blobs=yes.

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Sat Nov  6 13:30:16 UTC 2010 on sn-devel-104

---

Summary of changes:
 source4/torture/drs/rpc/dssync.c |   22 +++---
 1 files changed, 3 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/drs/rpc/dssync.c b/source4/torture/drs/rpc/dssync.c
index 522123c..7d1c4ff 100644
--- a/source4/torture/drs/rpc/dssync.c
+++ b/source4/torture/drs/rpc/dssync.c
@@ -534,8 +534,6 @@ static bool test_analyse_objects(struct torture_context 
*tctx,
for (i=0; i  cur-object.attribute_ctr.num_attributes; i++) {
WERROR werr;
const char *name = NULL;
-   bool rcrypt = false;
-   DATA_BLOB *enc_data = NULL;
DATA_BLOB plain_data;
struct drsuapi_DsReplicaAttribute *attr;
ndr_pull_flags_fn_t pull_fn = NULL;
@@ -546,19 +544,15 @@ static bool test_analyse_objects(struct torture_context 
*tctx,
switch (attr-attid) {
case DRSUAPI_ATTID_dBCSPwd:
name= dBCSPwd;
-   rcrypt  = true;
break;
case DRSUAPI_ATTID_unicodePwd:
name= unicodePwd;
-   rcrypt  = true;
break;
case DRSUAPI_ATTID_ntPwdHistory:
name= ntPwdHistory;
-   rcrypt  = true;
break;
case DRSUAPI_ATTID_lmPwdHistory:
name= lmPwdHistory;
-   rcrypt  = true;
break;
case DRSUAPI_ATTID_supplementalCredentials:
name= supplementalCredentials;
@@ -598,23 +592,15 @@ static bool test_analyse_objects(struct torture_context 
*tctx,
 
if (!attr-value_ctr.values[0].blob) continue;
 
-   enc_data = attr-value_ctr.values[0].blob;
-   ZERO_STRUCT(plain_data);
+   plain_data = *attr-value_ctr.values[0].blob;
 
-   werr = drsuapi_decrypt_attribute_value(ctx, 
gensec_skey, rcrypt,
-  rid,
-  enc_data, 
plain_data);
-   if (!W_ERROR_IS_OK(werr)) {
-   DEBUG(0, (Failed to decrypt %s\n, name));
-   continue;
-   }
if (!dn_printed) {
object_id++;
DEBUG(0,(DN[%u] %s\n, object_id, dn));
dn_printed = true;
}
-   DEBUGADD(0,(ATTR: %s enc.length=%lu 
plain.length=%lu\n,
-   name, (long)enc_data-length, 
(long)plain_data.length));
+   DEBUGADD(0,(ATTR: %s plain.length=%lu\n,
+   name, (long)plain_data.length));
if (plain_data.length) {
enum ndr_err_code ndr_err;
dump_data(0, plain_data.data, 
plain_data.length);
@@ -643,8 +629,6 @@ static bool test_analyse_objects(struct torture_context 
*tctx,
DEBUG(0, (Failed to decode 
%s\n, name));
}
}
-   } else {
-   dump_data(0, enc_data-data, enc_data-length);
}
talloc_free(ptr);
}


-- 
Samba Shared Repository


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

2010-11-06 Thread Jelmer Vernooij
On Sat, 2010-11-06 at 11:17 +0300, Matthieu Patou wrote:
 Hi Jelmer,
 
 On 06/11/2010 05:26, Jelmer Vernooij wrote:
  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 Vernooijjel...@samba.org
  Date:   Fri Nov 5 20:29:36 2010 +0100
 
   Inline test data.
 
  commit 9bce36774b255246de091ad7a5810a72d9689d0c
  Author: Jelmer Vernooijjel...@samba.org
  Date:   Fri Nov 5 20:16:41 2010 +0100
 
   PEP8
 
  commit 9f62c2bee32bac90800a8925223c2ebb9491ad9d
  Author: Jelmer Vernooijjel...@samba.org
  Date:   Fri Nov 5 20:10:17 2010 +0100
 
   Add more tests.
 
  commit a72e3d2abecf16202750a8a4b448a6fe5a1c0786
  Author: Jelmer Vernooijjel...@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)
 
 
 Frankly speaking I thinking having a dictionnary/hash as we can extend 
 without problem the structure to add more status ...
The issue with a dictionary is that it's not ordered, with a tuple there
is an order in the statusses (configure, build, test, install, checker).
I'd be happy to change it to a namedtuple if you'd like to be able to
explicitly name the statusses.

I'd be happy to see the base type changed to a custom (BuildStatus ?)
class.

Cheers,

Jelmer


signature.asc
Description: This is a digitally signed message part


[SCM] Samba Shared Repository - branch master updated

2010-11-06 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  9ff8428 s4:samr RPC server - 
dcesrv_samr_RemoveMemberFromForeignDomain
  from  0980a34 s4:DRS-RPC-DSSYNC: don't try to decrypt secret attributes 
twice

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


- Log -
commit 9ff8428c6f5f965c0811218d0f202bdceb1f1a0f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Nov 6 18:18:44 2010 +0100

s4:samr RPC server - dcesrv_samr_RemoveMemberFromForeignDomain

- Remove TODO comment: MS-SAMR 3.1.5.8.7 explicitly states:
  The SamrRemoveMemberFromForeignDomain method removes a member from all
  aliases.

- Remove the search attributes since they aren't strictly needed.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Nov  6 18:07:57 UTC 2010 on sn-devel-104

---

Summary of changes:
 source4/rpc_server/samr/dcesrv_samr.c |   18 ++
 1 files changed, 6 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/samr/dcesrv_samr.c 
b/source4/rpc_server/samr/dcesrv_samr.c
index dbc9c1e..391bc7f 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -3890,14 +3890,15 @@ static NTSTATUS dcesrv_samr_GetUserPwInfo(struct 
dcesrv_call_state *dce_call, TA
 /*
   samr_RemoveMemberFromForeignDomain
 */
-static NTSTATUS dcesrv_samr_RemoveMemberFromForeignDomain(struct 
dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-  struct samr_RemoveMemberFromForeignDomain *r)
+static NTSTATUS dcesrv_samr_RemoveMemberFromForeignDomain(struct 
dcesrv_call_state *dce_call,
+ TALLOC_CTX *mem_ctx,
+ struct 
samr_RemoveMemberFromForeignDomain *r)
 {
struct dcesrv_handle *h;
struct samr_domain_state *d_state;
const char *memberdn;
struct ldb_message **res;
-   const char * const attrs[3] = { distinguishedName, objectSid, NULL 
};
+   const char *no_attrs[] = { NULL };
int i, count;
 
DCESRV_PULL_HANDLE(h, r-in.domain_handle, SAMR_HANDLE_DOMAIN);
@@ -3912,11 +3913,8 @@ static NTSTATUS 
dcesrv_samr_RemoveMemberFromForeignDomain(struct dcesrv_call_sta
return NT_STATUS_OK;
}
 
-   /* TODO: Does this call only remove alias members, or does it do this
-* for domain groups as well? */
-
count = samdb_search_domain(d_state-sam_ctx, mem_ctx,
-   d_state-domain_dn, res, attrs,
+   d_state-domain_dn, res, no_attrs,
d_state-domain_sid,
((member=%s)(objectClass=group)
(|(groupType=%d)(groupType=%d))),
@@ -3935,11 +3933,7 @@ static NTSTATUS 
dcesrv_samr_RemoveMemberFromForeignDomain(struct dcesrv_call_sta
return NT_STATUS_NO_MEMORY;
}
 
-   mod-dn = samdb_result_dn(d_state-sam_ctx, mod, res[i], 
distinguishedName, NULL);
-   if (mod-dn == NULL) {
-   talloc_free(mod);
-   continue;
-   }
+   mod-dn = res[i]-dn;
 
if (samdb_msg_add_delval(d_state-sam_ctx, mem_ctx, mod,
 member, memberdn) != LDB_SUCCESS)


-- 
Samba Shared Repository


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

2010-11-06 Thread Jelmer Vernooij
The branch, master has been updated
   via  7adca02 Add convenience class for build status.
   via  9ea3ef1 Merge build_status_from_logs tests.
  from  448ed75 Add my copyright

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


- Log -
commit 7adca02a235bd96ef30eb7182f817192ccd5b7f4
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Nov 6 19:14:45 2010 +0100

Add convenience class for build status.

commit 9ea3ef139887c465afa08fa68f670072f25a706c
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Nov 6 18:58:35 2010 +0100

Merge build_status_from_logs tests.

---

Summary of changes:
 buildfarm/data.py|   16 +-
 buildfarm/tests/test_data.py |  101 +-
 web/build.py |   12 ++---
 3 files changed, 68 insertions(+), 61 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 0e1e94f..2bbbd74 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -29,6 +29,16 @@ import time
 import util
 
 
+class BuildStatus(object):
+
+def __init__(self, stages, other_failures):
+self.stages = stages
+self.other_failures = other_failures
+
+def __str__(self):
+return repr((self.stages, self.other_failures))
+
+
 def check_dir_exists(kind, path):
 if not os.path.isdir(path):
 raise Exception(%s directory %s does not exist % (kind, path))
@@ -86,7 +96,7 @@ def build_status_from_logs(log, err):
 else:
 sstatus = None
 
-return ((cstatus, bstatus, istatus, tstatus, sstatus), other_failures)
+return BuildStatus((cstatus, bstatus, istatus, tstatus, sstatus), 
other_failures)
 
 
 def lcov_extract_percentage(text):
@@ -274,12 +284,12 @@ class CachingBuild(Build):
 st2 = None
 
 if st2 and st1.st_ctime = st2.st_mtime:
-return eval(util.FileLoad(cachefile))
+return BuildStatus(*eval(util.FileLoad(cachefile)))
 
 ret = super(CachingBuild, self).status()
 
 if not self._store.readonly:
-util.FileSave(cachefile, repr(ret))
+util.FileSave(cachefile, str(ret))
 
 return ret
 
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index 6ef0a18..b566c73 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -32,47 +32,6 @@ class NonexistantTests(unittest.TestCase):
 self.assertRaises(
 Exception, data.BuildResultStore, somedirthatdoesn'texist, None)
 
-class BuildStatusFromLogs(testtools.TestCase):
-
-
-def test_build_status_from_logs(self):
-log = 
-TEST STATUS:1
-
-res = data.build_status_from_logs(log, )
-self.assertEquals(res[0][3], 1)
-log = 
-TEST STATUS:  1
-
-res = data.build_status_from_logs(log, )
-self.assertEquals(res[0][3], 1)
-log = 
-CONFIGURE STATUS: 2
-TEST STATUS:  1
-CC_CHECKER STATUS: 2
-
-res = data.build_status_from_logs(log, )
-self.assertEquals(res[0][4], 2)
-log = 
-CONFIGURE STATUS: 2
-ACTION PASSED: test
-CC_CHECKER STATUS: 2
-
-res = data.build_status_from_logs(log, )
-self.assertEquals(res[0][4], 2)
-self.assertEquals(res[0][3], 255)
-log = 
-CONFIGURE STATUS: 2
-ACTION PASSED: test
-testsuite-success: toto
-testsuite-failure: foo
-testsuite-failure: bar
-testsuite-failure: biz
-CC_CHECKER STATUS: 2
-
-res = data.build_status_from_logs(log, )
-self.assertEquals(res[0][0], 2)
-self.assertEquals(res[0][3], 3)
 
 class ReadTreesFromConfTests(testtools.TestCase):
 
@@ -213,23 +172,63 @@ error3)
 self.assertTrue(self.x.has_host(charis))
 
 
-
-class LogParserTests(unittest.TestCase):
+class BuildStatusFromLogs(testtools.TestCase):
 
 def test_nothing(self):
-self.assertEquals(((None, None, None, None, None), set()),
-data.build_status_from_logs(, ))
+s = data.build_status_from_logs(, )
+self.assertEquals((None, None, None, None, None), s.stages)
+self.assertEquals(set(), s.other_failures)
 
 def test_disk_full(self):
-self.assertEquals(((None, None, None, None, None), set([disk full])),
+self.assertEquals(set([disk full]),
 data.build_status_from_logs(foo\nbar\nNo space left on 
device\nla\n,
-))
-self.assertEquals(((None, None, None, None, None), set([disk full])),
+).other_failures)
+self.assertEquals(set([disk full]),
 data.build_status_from_logs(
-, foo\nbar\nNo space left on device\nla\n))
+, foo\nbar\nNo space left on device\nla\n).other_failures)
 
 def test_timeout(self):
-self.assertEquals(((None, None, None, None, None), set([timeout])),
+

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

2010-11-06 Thread Jelmer Vernooij
The branch, master has been updated
   via  6ee58c0 Remove old admin script.
   via  42776b1 Add python version of admin.py.
   via  39ccbc1 Use iterators, proper booleans.
  from  7adca02 Add convenience class for build status.

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


- Log -
commit 6ee58c01e768e7f3844e166d0d5eb40238998eee
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Nov 6 20:59:25 2010 +0100

Remove old admin script.

commit 42776b1066ef4b7613aaf670bbfee9da7ee72159
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Nov 6 20:15:58 2010 +0100

Add python version of admin.py.

commit 39ccbc102dea09aefe866600a5b62b350070ecb1
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Nov 6 19:43:32 2010 +0100

Use iterators, proper booleans.

---

Summary of changes:
 admin.pl   |  217 
 admin.py   |  190 +++
 buildfarm/hostdb.py|   61 +---
 buildfarm/tests/test_hostdb.py |   60 +++-
 web/build.py   |   28 +++---
 5 files changed, 310 insertions(+), 246 deletions(-)
 delete mode 100755 admin.pl
 create mode 100755 admin.py


Changeset truncated at 500 lines:

diff --git a/admin.pl b/admin.pl
deleted file mode 100755
index 906d2b3..000
--- a/admin.pl
+++ /dev/null
@@ -1,217 +0,0 @@
-#!/usr/bin/perl
-# Samba.org buildfarm
-# Copyright (C) 2008 Andrew Bartlett abart...@samba.org
-# Copyright (C) 2008 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/.
-#
-
-use FindBin qw($RealBin);
-
-use hostdb;
-use Mail::Send;
-use warnings;
-use strict;
-use Data::Dumper;
-use util;
-
-my $hostname;
-
-my $db = new hostdb($RealBin/hostdb.sqlite) or die(Unable to connect to 
host database: $!);
-my $dry_run = 0;
-
-print Samba Build farm management tool\n;
-print \n;
-
-my $op;
-
-if ($#ARGV  -1) {
-   $op = shift(@ARGV);
-} else {
-   print Initialize host database:   init\n;
-   print Add Machine to build farm:  add\n;
-   print Remove Machine from build farm: remove\n;
-   print Modify build farm account:  modify\n;
-   print Print build farm host info: info\n;
-   print Print build farm host list: list\n;
-   print Select Operation: [add] ;
-
-   $op = lc(STDIN);
-   chomp($op);
-
-   if ($op eq ) {
-   $op = add;
-   }
-}
-
-if ($op eq remove) {
-   print Please enter hostname to delete: ;
-   $hostname = ;
-   chomp($hostname);
-   $db-deletehost($hostname) or die(Unable to delete host $hostname);
-} elsif ($op eq modify) {
-   print Please enter hostname to modify: ;
-   $hostname = ;
-   chomp($hostname);
-   my $host = $db-host($hostname);
-   print Owner: $host-{owner} $host-{owner_email}\n;
-   print Platform: $host-{platform}\n;
-   print \n;
-   print Modify owner or platform: [platform] ;
-   my $mod_op = ;
-   chomp($mod_op);
-   if ($mod_op eq ) {
-   $mod_op = platform;
-   }
-   if ($mod_op eq platform) {
-   print Enter new platform: ;
-   my $platform = ;
-   chomp($platform);
-   $db-update_platform($hostname, $platform) or die Unable to 
update platform;
-   } elsif ($mod_op eq owner) {
-   print Enter new owner's name: ;
-   my $owner = ;
-   chomp($owner);
-   print Enter new owner's e-mail address: ;
-   my $owner_email = ;
-   chomp($owner_email);
-   $db-update_owner($hostname, $owner, $owner_email) or die 
Unable to update owner;
-   
-   }   
-} elsif ($op eq add) {
-   print Machine hostname: ;
-   my $hostname = ;
-   chomp($hostname);
-   print Machine platform (eg Fedora 9 x86_64): ;
-   my $platform = ;
-   chomp($platform);
-   print Machine Owner Name: ;
-   my $owner = ;
-   chomp($owner);
-   print Machine Owner E-mail: ;
-   my $owner_email = ;
-   chomp($owner_email);
-   print Enter password: [generate random] ;
-   my 

[SCM] Samba Shared Repository - branch master updated

2010-11-06 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  acb8a8d s4:update_keytab LDB module - we don't need to search for 
the distinguishedName attribute
   via  a093e10 s4:operational LDB module - canonicalName doesn't make 
use of the distinguishedName attribute
   via  1688b71 ldb:ldb_tdb.c - ltdb_check_special_dn - fix indentation
   via  889fa1c ldb:ldb_tdb.c - make ltdb_add more similar to 
ltdb_modify
  from  9ff8428 s4:samr RPC server - 
dcesrv_samr_RemoveMemberFromForeignDomain

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


- Log -
commit acb8a8d3304c8060e6039eac53a564d86331e264
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Nov 6 20:23:35 2010 +0100

s4:update_keytab LDB module - we don't need to search for the 
distinguishedName attribute

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Nov  6 20:08:28 UTC 2010 on sn-devel-104

commit a093e10896a4768dba0cd793a04b7d5d1366fee2
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Nov 6 20:18:40 2010 +0100

s4:operational LDB module - canonicalName doesn't make use of the 
distinguishedName attribute

It uses the DN from the returned message

commit 1688b71ca4f762e61fde8c5f1bef9ceca6f694c9
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Nov 6 19:46:42 2010 +0100

ldb:ldb_tdb.c - ltdb_check_special_dn - fix indentation

commit 889fa1cac55b79a268dbbd63d836a0917b8a79a3
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Nov 6 19:38:47 2010 +0100

ldb:ldb_tdb.c - make ltdb_add more similar to ltdb_modify

And remove in ltdb_add_internal a cache loading call which has been 
present
twice.

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/operational.c   |4 ++--
 source4/dsdb/samdb/ldb_modules/update_keytab.c |4 ++--
 source4/lib/ldb/ldb_tdb/ldb_tdb.c  |   16 ++--
 3 files changed, 10 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/operational.c 
b/source4/dsdb/samdb/ldb_modules/operational.c
index 3151061..12edfc2 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -539,8 +539,8 @@ static const struct {
 } search_sub[] = {
{ createTimestamp, whenCreated, NULL , NULL },
{ modifyTimestamp, whenChanged, NULL , NULL },
-   { structuralObjectClass, objectClass, NULL , NULL },
-   { canonicalName, distinguishedName, NULL , construct_canonical_name 
},
+   { structuralObjectClass, NULL, NULL , NULL },
+   { canonicalName, NULL, NULL , construct_canonical_name },
{ primaryGroupToken, objectClass, objectSid, 
construct_primary_group_token },
{ tokenGroups, objectClass, NULL, construct_token_groups },
{ parentGUID, NULL, NULL, construct_parent_guid },
diff --git a/source4/dsdb/samdb/ldb_modules/update_keytab.c 
b/source4/dsdb/samdb/ldb_modules/update_keytab.c
index e39b260..6a9245f 100644
--- a/source4/dsdb/samdb/ldb_modules/update_keytab.c
+++ b/source4/dsdb/samdb/ldb_modules/update_keytab.c
@@ -237,7 +237,7 @@ static int ukt_search_modified_callback(struct ldb_request 
*req,
 static int ukt_search_modified(struct update_kt_ctx *ac)
 {
struct ldb_context *ldb;
-   static const char * const attrs[] = { distinguishedName, NULL };
+   static const char * const no_attrs[] = { NULL };
struct ldb_request *search_req;
int ret;
 
@@ -246,7 +246,7 @@ static int ukt_search_modified(struct update_kt_ctx *ac)
ret = ldb_build_search_req(search_req, ldb, ac,
   ac-dn, LDB_SCOPE_BASE,
   ((objectClass=kerberosSecret)
-(privateKeytab=*)), attrs,
+(privateKeytab=*)), no_attrs,
   NULL,
   ac, ukt_search_modified_callback,
   ac-req);
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c 
b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index a498d54..2e88989 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -175,7 +175,7 @@ failed:
   currently only @ATTRIBUTES is checked
 */
 static int ltdb_check_special_dn(struct ldb_module *module,
- const struct ldb_message *msg)
+const struct ldb_message *msg)
 {
struct ldb_context *ldb = ldb_module_get_ctx(module);
unsigned int i, j;
@@ -283,15 +283,6 @@ static int ltdb_add_internal(struct ldb_module *module,
int ret = LDB_SUCCESS;
unsigned int i;
 
-   ret = ltdb_check_special_dn(module, msg);
-   if (ret != LDB_SUCCESS) {
-   return ret;
-   }
-
-

[SCM] Samba Shared Repository - branch master updated

2010-11-06 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  3d443b3 ldb:ldb_parse.c - ldb_parse_hex2char - always initialise 
c
   via  39ed810 s4:ldap.py - enhance the distinguishedName tests
  from  acb8a8d s4:update_keytab LDB module - we don't need to search for 
the distinguishedName attribute

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


- Log -
commit 3d443b3797dd81133990a48b6021dcf529cc5497
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Nov 6 21:22:53 2010 +0100

ldb:ldb_parse.c - ldb_parse_hex2char - always initialise c

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Nov  6 21:04:58 UTC 2010 on sn-devel-104

commit 39ed810feb8b042faedaf7bc836f34162ce5fb67
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Nov 6 20:47:51 2010 +0100

s4:ldap.py - enhance the distinguishedName tests

The dn shortcut isn't supported by AD.

---

Summary of changes:
 source4/dsdb/tests/python/ldap.py  |   24 
 source4/lib/ldb/common/ldb_parse.c |2 +-
 2 files changed, 25 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/tests/python/ldap.py 
b/source4/dsdb/tests/python/ldap.py
index c3a4087..b4fe8cd 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -965,6 +965,18 @@ class BasicTests(unittest.TestCase):
 Tests the 'distinguishedName' attribute
 print Tests the 'distinguishedName' attribute
 
+# The dn shortcut isn't supported
+m = Message()
+m.dn = Dn(ldb, cn=ldaptestgroup,cn=users, + self.base_dn)
+m[objectClass] = MessageElement(group, 0, objectClass)
+m[dn] = MessageElement(cn=ldaptestgroup,cn=users, + self.base_dn, 
0,
+  dn)
+try:
+ldb.add(m)
+self.fail()
+except LdbError, (num, _):
+self.assertEquals(num, ERR_NO_SUCH_ATTRIBUTE)
+
 # a wrong distinguishedName attribute is obviously tolerated
 self.ldb.add({
   dn: cn=ldaptestgroup,cn=users, + self.base_dn,
@@ -979,6 +991,18 @@ class BasicTests(unittest.TestCase):
 self.assertTrue(Dn(ldb, res[0][distinguishedName][0])
== Dn(ldb, cn=ldaptestgroup, cn=users, + self.base_dn))
 
+# The dn shortcut isn't supported
+m = Message()
+m.dn = Dn(ldb, cn=ldaptestgroup,cn=users, + self.base_dn)
+m[dn] = MessageElement(
+  cn=ldaptestgroup,cn=users, + self.base_dn, FLAG_MOD_REPLACE,
+  dn)
+try:
+ldb.modify(m)
+self.fail()
+except LdbError, (num, _):
+self.assertEquals(num, ERR_NO_SUCH_ATTRIBUTE)
+
 m = Message()
 m.dn = Dn(ldb, cn=ldaptestgroup,cn=users, + self.base_dn)
 m[distinguishedName] = MessageElement(
diff --git a/source4/lib/ldb/common/ldb_parse.c 
b/source4/lib/ldb/common/ldb_parse.c
index 0203f32..16b3e21 100644
--- a/source4/lib/ldb/common/ldb_parse.c
+++ b/source4/lib/ldb/common/ldb_parse.c
@@ -47,7 +47,7 @@ static int ldb_parse_hex2char(const char *x)
 {
if (isxdigit(x[0])  isxdigit(x[1])) {
const char h1 = x[0], h2 = x[1];
-   int c;
+   int c = 0;
 
if (h1 = 'a') c = h1 - (int)'a' + 10;
else if (h1 = 'A') c = h1 - (int)'A' + 10;


-- 
Samba Shared Repository


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

2010-11-06 Thread Jelmer Vernooij
The branch, master has been updated
   via  5b7936c Add python version of mail-dead-hosts script.
   via  529cac0 directly access the hosts list from the sqlite database in 
the web build.
  from  6ee58c0 Remove old admin script.

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


- Log -
commit 5b7936c09dabcc645f63aa6c3ee04e44c141903b
Author: Jelmer Vernooij jel...@samba.org
Date:   Sun Nov 7 00:25:04 2010 +0100

Add python version of mail-dead-hosts script.

commit 529cac0e51d39601a9c91a21e01d09660fd83196
Author: Jelmer Vernooij jel...@samba.org
Date:   Sun Nov 7 00:14:43 2010 +0100

directly access the hosts list from the sqlite database in the web build.

---

Summary of changes:
 buildfarm/data.py|1 -
 buildfarm/hostdb.py  |2 +-
 buildfarm/tests/__init__.py  |8 
 buildfarm/tests/test_data.py |1 -
 mail-dead-hosts.py   |   73 ++
 web/build.py |   10 -
 6 files changed, 82 insertions(+), 13 deletions(-)
 create mode 100755 mail-dead-hosts.py


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 2bbbd74..437cd76 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -335,7 +335,6 @@ class BuildResultStore(object):
 check_dir_exists(lcov, self.lcovdir)
 
 self.compilers = util.load_list(os.path.join(self.webdir, 
compilers.list))
-self.hosts = util.load_hash(os.path.join(self.webdir, hosts.list))
 
 self.trees = read_trees_from_conf(os.path.join(self.webdir, 
trees.conf))
 
diff --git a/buildfarm/hostdb.py b/buildfarm/hostdb.py
index 51dafba..3c42757 100644
--- a/buildfarm/hostdb.py
+++ b/buildfarm/hostdb.py
@@ -108,7 +108,7 @@ class HostDatabase(object):
 yield Host(row[0], owner=row[1], owner_email=row[2], 
last_update=row[3])
 
 def sent_dead_mail(self, host):
-self.db.execute(UPDATE host SET last_dead_mail = ? WHERE name = ?, 
time.time(), host)
+self.db.execute(UPDATE host SET last_dead_mail = ? WHERE name = ?, 
(int(time.time()), host))
 self.db.commit()
 
 def host(self, name):
diff --git a/buildfarm/tests/__init__.py b/buildfarm/tests/__init__.py
index 130c3b9..260e006 100644
--- a/buildfarm/tests/__init__.py
+++ b/buildfarm/tests/__init__.py
@@ -46,14 +46,6 @@ class BuildFarmTestCase(TestCase):
 f.close()
 return path
 
-def write_hosts(self, hosts):
-f = open(os.path.join(self.path, web, hosts.list), w)
-try:
-for host in hosts:
-f.write(%s\n % host)
-finally:
-f.close()
-
 def write_compilers(self, compilers):
 f = open(os.path.join(self.path, web, compilers.list), w)
 try:
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index b566c73..71ad682 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -85,7 +85,6 @@ class BuildResultStoreTests(BuildFarmTestCase):
 super(BuildResultStoreTests, self).setUp()
 
 self.write_compilers([cc])
-self.write_hosts([gwenhwyvar, charis])
 self.write_trees({tdb: {scm: git, repo: tdb, branch: 
master}})
 
 self.x = data.BuildResultStore(self.path)
diff --git a/mail-dead-hosts.py b/mail-dead-hosts.py
new file mode 100755
index 000..ca42a3b
--- /dev/null
+++ b/mail-dead-hosts.py
@@ -0,0 +1,73 @@
+#!/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/.
+#
+
+from buildfarm import hostdb
+import smtplib
+from email.MIMEText import MIMEText
+import os
+import time
+
+db = hostdb.HostDatabase(os.path.join(os.path.dirname(__file__), 
hostdb.sqlite))
+dry_run = False
+
+hosts = db.dead_hosts(7 * 86400)
+for host in hosts:
+db.sent_dead_mail(host.name)
+
+if host.last_update:
+last_update = time.strftime (%a %b %e %H:%M:%S %Y, 
time.gmtime(host.last_update))
+else:
+last_update = a long time
+
+body = 
+Your host %s has been part of the Samba Build farm, hosted
+at http://build.samba.org.
+
+Sadly however we have not heard 

[SCM] Samba Shared Repository - branch master updated

2010-11-06 Thread Jelmer Vernooij
The branch, master has been updated
   via  4217734 credentials: Lowercase library name,
   via  e28cec7 ldbsamba: Lowercase library name.
   via  0878399 samdb: Lowercase library name.
   via  e7c3719 samdb: Make private (at least for the moment).
   via  0d6f1a1 pytalloc: Make some arguments optional.
  from  3d443b3 ldb:ldb_parse.c - ldb_parse_hex2char - always initialise 
c

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


- Log -
commit 4217734a51adbcdf3dcf45599e119247958802af
Author: Jelmer Vernooij jel...@samba.org
Date:   Sun Nov 7 02:05:51 2010 +0100

credentials: Lowercase library name,

Autobuild-User: Jelmer Vernooij jel...@samba.org
Autobuild-Date: Sun Nov  7 01:48:44 UTC 2010 on sn-devel-104

commit e28cec7817f17d31e054c021f39f13685c55eee9
Author: Jelmer Vernooij jel...@samba.org
Date:   Sun Nov 7 01:57:34 2010 +0100

ldbsamba: Lowercase library name.

commit 0878399bd57db88aa49ac2a0a139c269feda9137
Author: Jelmer Vernooij jel...@samba.org
Date:   Sun Nov 7 01:52:13 2010 +0100

samdb: Lowercase library name.

commit e7c371996deb2d1517d2a7b8d7aa0ff75d7138ce
Author: Jelmer Vernooij jel...@samba.org
Date:   Sun Nov 7 01:44:26 2010 +0100

samdb: Make private (at least for the moment).

commit 0d6f1a1630a3b26169fd68535d0ab97aa301913c
Author: Jelmer Vernooij jel...@samba.org
Date:   Fri Nov 5 13:48:34 2010 +0100

pytalloc: Make some arguments optional.

---

Summary of changes:
 lib/talloc/pytalloc.c|   12 +-
 source4/auth/credentials/wscript_build   |   20 ++--
 source4/auth/gensec/wscript_build|   10 +-
 source4/auth/ntlm/wscript_build  |4 +-
 source4/auth/ntlmssp/wscript_build   |2 +-
 source4/auth/wscript_build   |   12 +-
 source4/cldap_server/wscript_build   |2 +-
 source4/dns_server/wscript_build |2 +-
 source4/dsdb/samdb/ldb_modules/wscript_build |  154 +-
 source4/dsdb/wscript_build   |   38 +++---
 source4/kdc/wscript_build|   18 ++--
 source4/ldap_server/wscript_build|2 +-
 source4/lib/cmdline/wscript_build|4 +-
 source4/lib/ldb-samba/wscript_build  |   10 +-
 source4/lib/registry/wscript_build   |2 +-
 source4/libcli/wscript_build |4 +-
 source4/libnet/wscript_build |2 +-
 source4/librpc/wscript_build |2 +-
 source4/nbt_server/wscript_build |2 +-
 source4/ntp_signd/wscript_build  |2 +-
 source4/ntptr/wscript_build  |2 +-
 source4/ntvfs/posix/wscript_build|4 +-
 source4/ntvfs/unixuid/wscript_build  |2 +-
 source4/ntvfs/wscript_build  |2 +-
 source4/param/wscript_build  |2 +-
 source4/rpc_server/wscript_build |8 +-
 source4/samba_tool/wscript_build |2 +-
 source4/smb_server/smb/wscript_build |2 +-
 source4/smbd/wscript_build   |   10 +-
 source4/torture/drs/wscript_build|2 +-
 source4/torture/local/wscript_build  |2 +-
 source4/torture/wscript_build|2 +-
 source4/utils/wscript_build  |2 +-
 source4/winbind/wscript_build|2 +-
 34 files changed, 174 insertions(+), 174 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c
index 69a2c2f..96a6122 100644
--- a/lib/talloc/pytalloc.c
+++ b/lib/talloc/pytalloc.c
@@ -24,10 +24,10 @@
 /* print a talloc tree report for a talloc python object */
 static PyObject *py_talloc_report_full(PyObject *self, PyObject *args)
 {
-   PyObject *py_obj;
+   PyObject *py_obj = Py_None;
PyTypeObject *type;
 
-   if (!PyArg_ParseTuple(args, O, py_obj))
+   if (!PyArg_ParseTuple(args, |O, py_obj))
return NULL;
 
if (py_obj == Py_None) {
@@ -40,7 +40,7 @@ static PyObject *py_talloc_report_full(PyObject *self, 
PyObject *args)
 }
 
 /* enable null tracking */
-static PyObject *py_talloc_enable_null_tracking(PyObject *self, PyObject *args)
+static PyObject *py_talloc_enable_null_tracking(PyObject *self)
 {
talloc_enable_null_tracking();
return Py_None;
@@ -49,10 +49,10 @@ static PyObject *py_talloc_enable_null_tracking(PyObject 
*self, PyObject *args)
 /* return the number of talloc blocks */
 static PyObject *py_talloc_total_blocks(PyObject *self, PyObject *args)
 {
-   PyObject *py_obj;
+   PyObject *py_obj = Py_None;
PyTypeObject *type;
 
-   if (!PyArg_ParseTuple(args, O, py_obj))
+   if (!PyArg_ParseTuple(args, |O, py_obj))
return NULL;
 
if (py_obj == Py_None) {
@@