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

2010-11-08 Thread Jelmer Vernooij
The branch, master has been updated
   via  3da72d3 Remove svn/cvs support.
  from  4bb4b4c Force to have a ldb backend for make test

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


- Log -
commit 3da72d3597747ff3a2a493df9871c37b0f37876c
Author: Jelmer Vernooij 
Date:   Tue Nov 9 08:32:23 2010 +0100

Remove svn/cvs support.

---

Summary of changes:
 buildfarm/history.py |   96 ++
 web/build.py |   11 ++
 2 files changed, 6 insertions(+), 101 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/history.py b/buildfarm/history.py
index 9a074fe..51e35f4 100644
--- a/buildfarm/history.py
+++ b/buildfarm/history.py
@@ -1,5 +1,5 @@
 #!/usr/bin/python
-# script to show recent checkins in cvs / svn / git
+# script to show recent checkins in git
 #
 # Copyright (C) Andrew Tridgell  2001
 # Copyright (C) Martin Pool 2003
@@ -24,7 +24,6 @@ from buildfarm import util
 
 import commands
 import os
-import time
 
 BASEDIR = "/home/build/master"
 HISTORYDIR = "/home/build/master/cache"
@@ -41,104 +40,15 @@ class History(object):
 return util.LoadStructure(os.path.join(HISTORYDIR, "history.%s" % 
tree))
 
 def diff(self, author, date, tree, revision):
-"""get recent cvs/svn entries"""
+"""get recent git entries"""
 # validate the tree
 t = self.db.trees[tree]
 
-if t.scm == "cvs":
-self._cvs_diff(t, author, date, tree)
-elif t.scm == "svn":
-self._svn_diff(t, revision, tree)
-elif t.scm == "git":
+if t.scm == "git":
 self._git_diff(t, revision, tree)
 else:
 raise Exception("Unknown VCS %s" % t.scm)
 
-def _svn_diff(self, t, revision, tree):
-"""show recent svn entries"""
-
-os.chdir(os.path.join(UNPACKED_DIR, tree))
-
-# determine the most recent version known to this database
-for l in commands.getoutput("svn info").splitlines():
-if l.startswith("Revision"):
-current_revision = l.strip().split(":")
-break
-else:
-raise Exception("Unable to find current revision")
-
-if (not revision.isdigit() or int(revision) < 0 or
-int(revision) > int(current_revision)):
-raise Exception("unknown revision[%s]" % revision)
-
-log = self._log(tree)
-
-# backwards? why? well, usually our users are looking for the newest
-# stuff, so it's most likely to be found sooner
-for i in range(len(log), 0, -1):
-if log[i]["REVISION"] == revision:
-entry = log[i]
-break
-else:
-raise Exception("Unable to locate commit information 
revision[%s]." % revision)
-
-# get information about the current diff
-title = "SVN Diff in %s:%s for revision r%s" % (
-tree, t.branch, revision)
-
-old_revision = revision - 1
-cmd = "svn diff -r %s:%s" % (old_revision, revision)
-
-return (title, entry, tree, [(cmd, commands.getoutput("%s 2> 
/dev/null" % cmd))])
-
-def _cvs_diff(self, t, author, date, tree):
-"""show recent cvs entries"""
-os.chdir(os.path.join(UNPACKED_DIR, tree))
-
-log = self._log(tree)
-
-# for paranoia, check that the date string is a valid date
-if not date[0].isdigit():
-raise Exception("unknown date")
-
-for i in range(log):
-if author == log[i]["AUTHOR"] and date == log[i]["DATE"]:
-entry = log[i]
-break
-else:
-raise Exception("Unable to locate commit information author[%s] 
data[%s]." % (
-author, date))
-
-t1 = time.ctime(date-60+(TIMEOFFSET*60*60)).strip()
-t2 = time.ctime(date+60+(TIMEOFFSET*60*60)).strip()
-
-title = "CVS Diff in %s:%s for %s" % (tree, t.branch, t1)
-
-if entry["TAG"] != "" and entry["REVISIONS"] != "":
-raise Exception("sorry, cvs diff on branches not currently 
possible due to a limitation in cvs")
-
-os.environ['CVS_PASSFILE'] = os.path.join(BASEDIR, ".cvspass")
-
-if entry["REVISIONS"]:
-diffs = []
-for f in entry["REVISIONS"].keys():
-if entry["REVISIONS"][f]["REV1"] == "NONE":
-cmd = "cvs rdiff -u -r 0 -r %s %s" % 
(entry["REVISIONS"][f]["REV2"], f)
-elif entry["REVISIONS"][f]["REV2"] == "NONE":
-cmd = "cvs rdiff -u -r %s -r 0 %s" % (
-entry["REVISIONS"][f]["REV1"], f)
-else:
-cmd = "cvs diff -b -u -r %s -r %s %s" % (
-entry["REVISIONS"][f]["REV1"], 
entry["REVISIONS"][f]["REV2"]

Build status as of Tue Nov 9 07:00:02 2010

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

--- /home/build/master/cache/broken_results.txt.old 2010-11-08 
00:00:07.0 -0700
+++ /home/build/master/cache/broken_results.txt 2010-11-09 00:00:20.0 
-0700
@@ -1,4 +1,4 @@
-Build status as of Mon Nov  8 07:00:01 2010
+Build status as of Tue Nov  9 07:00:02 2010
 
 Build counts:
 Tree Total  Broken Panic 
@@ -13,10 +13,10 @@
 rsync37 15 0 
 samba-docs   0  0  0 
 samba-web0  0  0 
-samba_3_current 37 33 3 
+samba_3_current 37 33 1 
 samba_3_master 37 20 0 
 samba_3_next 37 35 0 
-samba_4_0_test 42 32 2 
+samba_4_0_test 42 34 0 
 talloc   37 16 0 
 tdb  35 13 0 
 


[SCM] Samba Shared Repository - branch master updated

2010-11-08 Thread Andrew Tridgell
The branch, master has been updated
   via  d1d585e s4-test: make sure the selftest prefix exists
   via  9c7228d s4-drs: reduce verbosity of dreplsrv_out_connection_attach
   via  eee2742 heimdal: fixed a shadowed variable warning for error_message
  from  0aeb08e s4-attid: Uppercase ATTID type constants

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


- Log -
commit d1d585e208bf60729e0c064be7f419ead02875b8
Author: Andrew Tridgell 
Date:   Tue Nov 9 10:22:48 2010 +1100

s4-test: make sure the selftest prefix exists

Autobuild-User: Andrew Tridgell 
Autobuild-Date: Tue Nov  9 00:05:22 UTC 2010 on sn-devel-104

commit 9c7228d6aa5e63d4d14cce84349edef04f61bf68
Author: Andrew Tridgell 
Date:   Tue Nov 9 10:05:49 2010 +1100

s4-drs: reduce verbosity of dreplsrv_out_connection_attach

commit eee27427d23608522f2b20e7bf348a0dd790e643
Author: Andrew Tridgell 
Date:   Tue Nov 9 08:51:20 2010 +1100

heimdal: fixed a shadowed variable warning for error_message

Pair-Programmed-With: Andrew Bartlett 

---

Summary of changes:
 source4/dsdb/repl/drepl_partitions.c   |4 +-
 source4/heimdal/lib/krb5/config_file.c |   46 
 source4/selftest/wscript   |3 ++
 3 files changed, 28 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/repl/drepl_partitions.c 
b/source4/dsdb/repl/drepl_partitions.c
index d4511f6..ee9210d 100644
--- a/source4/dsdb/repl/drepl_partitions.c
+++ b/source4/dsdb/repl/drepl_partitions.c
@@ -208,9 +208,9 @@ WERROR dreplsrv_out_connection_attach(struct 
dreplsrv_service *s,
 
DLIST_ADD_END(s->connections, conn, struct 
dreplsrv_out_connection *);
 
-   DEBUG(2,("dreplsrv_out_connection_attach(%s): create\n", 
conn->binding->host));
+   DEBUG(4,("dreplsrv_out_connection_attach(%s): create\n", 
conn->binding->host));
} else {
-   DEBUG(2,("dreplsrv_out_connection_attach(%s): attach\n", 
conn->binding->host));
+   DEBUG(4,("dreplsrv_out_connection_attach(%s): attach\n", 
conn->binding->host));
}
 
*_conn = conn;
diff --git a/source4/heimdal/lib/krb5/config_file.c 
b/source4/heimdal/lib/krb5/config_file.c
index 22d0b90..5840b8d 100644
--- a/source4/heimdal/lib/krb5/config_file.c
+++ b/source4/heimdal/lib/krb5/config_file.c
@@ -75,14 +75,14 @@ config_fgets(char *str, size_t len, struct fileptr *ptr)
 
 static krb5_error_code parse_section(char *p, krb5_config_section **s,
 krb5_config_section **res,
-const char **error_message);
+const char **err_message);
 static krb5_error_code parse_binding(struct fileptr *f, unsigned *lineno, char 
*p,
 krb5_config_binding **b,
 krb5_config_binding **parent,
-const char **error_message);
+const char **err_message);
 static krb5_error_code parse_list(struct fileptr *f, unsigned *lineno,
  krb5_config_binding **parent,
- const char **error_message);
+ const char **err_message);
 
 static krb5_config_section *
 get_entry(krb5_config_section **parent, const char *name, int type)
@@ -119,25 +119,25 @@ get_entry(krb5_config_section **parent, const char *name, 
int type)
  *
  * starting at the line in `p', storing the resulting structure in
  * `s' and hooking it into `parent'.
- * Store the error message in `error_message'.
+ * Store the error message in `err_message'.
  */
 
 static krb5_error_code
 parse_section(char *p, krb5_config_section **s, krb5_config_section **parent,
- const char **error_message)
+ const char **err_message)
 {
 char *p1;
 krb5_config_section *tmp;
 
 p1 = strchr (p + 1, ']');
 if (p1 == NULL) {
-   *error_message = "missing ]";
+   *err_message = "missing ]";
return KRB5_CONFIG_BADFORMAT;
 }
 *p1 = '\0';
 tmp = get_entry(parent, p + 1, krb5_config_list);
 if(tmp == NULL) {
-   *error_message = "out of memory";
+   *err_message = "out of memory";
return KRB5_CONFIG_BADFORMAT;
 }
 *s = tmp;
@@ -147,12 +147,12 @@ parse_section(char *p, krb5_config_section **s, 
krb5_config_section **parent,
 /*
  * Parse a brace-enclosed list from `f', hooking in the structure at
  * `parent'.
- * Store the error message in `error_message'.
+ * Store the error message in `err_message'.
  */
 
 static krb5_error_code
 parse_list(struct fileptr *f, unsigned *lineno, krb5_config_binding **parent,
-  const char **error_message)
+  const char **err_message)
 {
 

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

2010-11-08 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  9efb0d0 s3/configure: fix typo and warning
  from  925b777 Second part of fix for bug # - When requesting lookups 
for BUILTIN sids, winbindd allocates new uids/gids in error.

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


- Log -
commit 9efb0d0cb8e6470d508be1ec066eb24afa7d6a10
Author: Björn Jacke 
Date:   Mon Nov 8 21:14:44 2010 +0100

s3/configure: fix typo and warning

Autobuild-User: Björn Jacke 
Autobuild-Date: Mon Nov  8 20:58:20 UTC 2010 on sn-devel-104
(cherry picked from commit 842a8e43129d821ebf08cdf4fcba54d3789de756)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index a7de49b..2014ae8 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -836,7 +836,7 @@ if test x$enable_cups != xno; then
# dendencies including thread libraries - use 
cups-config only if really
# required. 
AC_CHECK_LIB_EXT(cups, ac_save_PRINT_LIBS , httpConnect,
-   [PRINT_LIBS"$ac_save_PRINT_LIBS -lcups"],
+   [PRINT_LIBS="$ac_save_PRINT_LIBS -lcups"],
[AC_MSG_WARN([your cups library doesn't link 
with -lcups alone, it might be underlinked.]) ;
 PRINT_LIBS="$ac_save_PRINT_LIBS `$CUPS_CONFIG 
--libs`"])
 


-- 
Samba Shared Repository


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

2010-11-08 Thread Matthieu Patou
The branch, master has been updated
   via  4bb4b4c Force to have a ldb backend for make test
  from  3043234 Fix syntax error.

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


- Log -
commit 4bb4b4c8e6c2201d5c53916ce4123eae539dbb97
Author: Matthieu Patou 
Date:   Tue Nov 9 02:22:49 2010 +0300

Force to have a ldb backend for make test

---

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


Changeset truncated at 500 lines:

diff --git a/buildsamba02.fns b/buildsamba02.fns
index 3cef2ad..365331c 100644
--- a/buildsamba02.fns
+++ b/buildsamba02.fns
@@ -5,12 +5,12 @@ global_lock
 #. install_python.fns
 
 action_test() {
-   echo "PWD: "`pwd`
-   ls -lrta ../../
set
env
case $tree in
samba_4*)
+ unset TEST_LDAP
+ unset TEST_OPTIONS
../buildtools/bin/waf test
;;
*)


-- 
build.samba.org


[SCM] Samba Shared Repository - branch master updated

2010-11-08 Thread Kamen Mazdrashki
The branch, master has been updated
   via  0aeb08e s4-attid: Uppercase ATTID type constants
   via  ee34e2c s4-test: Initial implementation for Schema replication 
black box test
  from  3a5f030 Second part of fix for bug # - When requesting lookups 
for BUILTIN sids, winbindd allocates new uids/gids in error.

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


- Log -
commit 0aeb08e2eb1725ef41b6796a55a020520d13c6f7
Author: Kamen Mazdrashki 
Date:   Mon Nov 8 16:27:22 2010 +0200

s4-attid: Uppercase ATTID type constants

Thanks Metze for noting this!

Autobuild-User: Kamen Mazdrashki 
Autobuild-Date: Mon Nov  8 23:06:41 UTC 2010 on sn-devel-104

commit ee34e2c94bccb90f6518c401192c5f04ae509d25
Author: Kamen Mazdrashki 
Date:   Sun Nov 7 04:41:50 2010 +0200

s4-test: Initial implementation for Schema replication black box test

---

Summary of changes:
 source4/dsdb/schema/prefixmap.h   |8 +-
 source4/dsdb/schema/schema_prefixmap.c|   10 +-
 source4/dsdb/schema/schema_query.c|2 +-
 source4/torture/drs/python/repl_schema.py |  174 +
 4 files changed, 184 insertions(+), 10 deletions(-)
 create mode 100644 source4/torture/drs/python/repl_schema.py


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/schema/prefixmap.h b/source4/dsdb/schema/prefixmap.h
index 74acecb..339a221 100644
--- a/source4/dsdb/schema/prefixmap.h
+++ b/source4/dsdb/schema/prefixmap.h
@@ -27,10 +27,10 @@
  * Ref: MS-ADTS, 3.1.1.2.6 ATTRTYP
  */
 enum dsdb_attid_type {
-   dsdb_attid_type_pfm = 1,/* attid in [0x..0x7FFF] */
-   dsdb_attid_type_intid = 2,  /* attid in [0x8000..0xBFFF] */
-   dsdb_attid_type_reserved = 3,   /* attid in [0xC000..0xFFFE] */
-   dsdb_attid_type_internal = 4,   /* attid in [0x..0x] */
+   DSDB_ATTID_TYPE_PFM = 1,/* attid in [0x..0x7FFF] */
+   DSDB_ATTID_TYPE_INTID = 2,  /* attid in [0x8000..0xBFFF] */
+   DSDB_ATTID_TYPE_RESERVED = 3,   /* attid in [0xC000..0xFFFE] */
+   DSDB_ATTID_TYPE_INTERNAL = 4,   /* attid in [0x..0x] */
 };
 
 /**
diff --git a/source4/dsdb/schema/schema_prefixmap.c 
b/source4/dsdb/schema/schema_prefixmap.c
index 1892050..371ec88 100644
--- a/source4/dsdb/schema/schema_prefixmap.c
+++ b/source4/dsdb/schema/schema_prefixmap.c
@@ -32,16 +32,16 @@
 enum dsdb_attid_type dsdb_pfm_get_attid_type(uint32_t attid)
 {
if (attid <= 0x7FFF) {
-   return dsdb_attid_type_pfm;
+   return DSDB_ATTID_TYPE_PFM;
}
else if (attid <= 0xBFFF) {
-   return dsdb_attid_type_intid;
+   return DSDB_ATTID_TYPE_INTID;
}
else if (attid <= 0xFFFE) {
-   return dsdb_attid_type_reserved;
+   return DSDB_ATTID_TYPE_RESERVED;
}
else {
-   return dsdb_attid_type_internal;
+   return DSDB_ATTID_TYPE_INTERNAL;
}
 }
 
@@ -361,7 +361,7 @@ WERROR dsdb_schema_pfm_oid_from_attid(struct 
dsdb_schema_prefixmap *pfm, uint32_
WERROR werr = WERR_OK;
 
/* sanity check for attid requested */
-   if (dsdb_pfm_get_attid_type(attid) != dsdb_attid_type_pfm) {
+   if (dsdb_pfm_get_attid_type(attid) != DSDB_ATTID_TYPE_PFM) {
return WERR_INVALID_PARAMETER;
}
 
diff --git a/source4/dsdb/schema/schema_query.c 
b/source4/dsdb/schema/schema_query.c
index 8ea79ff..c92d273 100644
--- a/source4/dsdb/schema/schema_query.c
+++ b/source4/dsdb/schema/schema_query.c
@@ -64,7 +64,7 @@ const struct dsdb_attribute 
*dsdb_attribute_by_attributeID_id(const struct dsdb_
if (id == 0x) return NULL;
 
/* check for msDS-IntId type attribute */
-   if (dsdb_pfm_get_attid_type(id) == dsdb_attid_type_intid) {
+   if (dsdb_pfm_get_attid_type(id) == DSDB_ATTID_TYPE_INTID) {
BINARY_ARRAY_SEARCH_P(schema->attributes_by_msDS_IntId,
  schema->num_int_id_attr, msDS_IntId, id, 
uint32_cmp, c);
return c;
diff --git a/source4/torture/drs/python/repl_schema.py 
b/source4/torture/drs/python/repl_schema.py
new file mode 100644
index 000..b407dfb
--- /dev/null
+++ b/source4/torture/drs/python/repl_schema.py
@@ -0,0 +1,174 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Tests various schema replication scenarios
+#
+# Copyright (C) Kamen Mazdrashki  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
+# 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

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

2010-11-08 Thread Jelmer Vernooij
The branch, master has been updated
   via  3043234 Fix syntax error.
  from  7483d6c Do explicit cast to string of Host attributes

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


- Log -
commit 30432342dc5f982da05e6c0ce31dc1cdc7d99d9a
Author: Jelmer Vernooij 
Date:   Mon Nov 8 23:44:20 2010 +0100

Fix syntax error.

---

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


Changeset truncated at 500 lines:

diff --git a/web/build.py b/web/build.py
index 4a49798..0ef018c 100755
--- a/web/build.py
+++ b/web/build.py
@@ -531,7 +531,9 @@ def view_host(myself, output_type, *requested_hosts):
 except data.NoSuchBuildError:
 pass
 else:
-revision, revision_time = build.revision_details()
+(revision, commit_revision, revision_time) = 
build.revision_details()
+if commit_revision:
+revision = commit_revision
 age_mtime = build.age_mtime()
 age_ctime = build.age_ctime()
 warnings = build.err_count()


-- 
build.samba.org


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

2010-11-08 Thread Matthieu Patou
The branch, master has been updated
   via  7483d6c Do explicit cast to string of Host attributes
  from  9e6974d Make build_status_from_logs take files rather than huge 
strings.

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


- Log -
commit 7483d6c76101cfa93232b4f57ec70daeccef145d
Author: Matthieu Patou 
Date:   Tue Nov 9 01:37:10 2010 +0300

Do explicit cast to string of Host attributes

---

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


Changeset truncated at 500 lines:

diff --git a/web/build.py b/web/build.py
index 48239aa..4a49798 100755
--- a/web/build.py
+++ b/web/build.py
@@ -166,7 +166,7 @@ def view_summary(myself, output_type):
 for compiler in compilers:
 for tree in trees:
 try:
-build = db.get_build(tree, host.name, compiler)
+build = db.get_build(tree, str(host.name), compiler)
 status = build_status_html(myself, build)
 except data.NoSuchBuildError:
 continue
@@ -291,7 +291,7 @@ def view_recent_builds(myself, tree, sort_by):
 for host in hosts.values():
 for compiler in compilers:
 try:
-build = db.get_build(tree, host.name, compiler)
+build = db.get_build(tree, str(host.name), compiler)
 status = build_status_html(myself, build)
 except data.NoSuchBuildError:
 pass
@@ -302,7 +302,7 @@ def view_recent_builds(myself, tree, sort_by):
 if commit_revision:
 revision = commit_revision
 if revision:
-all_builds.append([age_ctime, str(host.platform), "%s" % (myself, 
host.name, tree, compiler, host.name, host.name), compiler, tree, status, 
revision_link(myself, revision, tree), revision_time])
+all_builds.append([age_ctime, str(host.platform), "%s" % (myself, 
str(host.name), tree, compiler, str(host.name), str(host.name)), compiler, 
tree, status, revision_link(myself, revision, tree), revision_time])
 
 all_builds.sort(cmp_funcs[sort_by])
 
@@ -543,7 +543,7 @@ def view_host(myself, output_type, *requested_hosts):
 else:
 yield ""
 yield ""
-yield "%s - %s" % (host, 
hosts[host].platform)
+yield "%s - %s" % (host, 
str(hosts[host].platform))
 yield ""
 yield 
"TargetBuildRevisionBuildAgeStatusconfig/buildinstall/testWarnings"
 yield ""


-- 
build.samba.org


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

2010-11-08 Thread Jelmer Vernooij
The branch, master has been updated
   via  9e6974d Make build_status_from_logs take files rather than huge 
strings.
  from  5471061 Remove updating of samba-docs and lorikeet. Move samba-web 
and build-farm to git.

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


- Log -
commit 9e6974dc5ba1e112a1c35893858e9d90d9ba4961
Author: Jelmer Vernooij 
Date:   Mon Nov 8 23:33:11 2010 +0100

Make build_status_from_logs take files rather than huge strings.

---

Summary of changes:
 buildfarm/data.py|   26 ++
 buildfarm/tests/test_data.py |   22 +-
 2 files changed, 27 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 5fe1fea..0b30cdc 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -48,6 +48,7 @@ def check_dir_exists(kind, path):
 
 def build_status_from_logs(log, err):
 """get status of build"""
+log = log.read()
 m = re.search("TEST STATUS:(\s*\d+)", log)
 other_failures = set()
 if m:
@@ -89,7 +90,7 @@ def build_status_from_logs(log, err):
 if m:
 other_failures.add("panic")
 
-if "No space left on device" in err or "No space left on device" in log:
+if "No space left on device" in log:
 other_failures.add("disk full")
 
 if "maximum runtime exceeded" in log:
@@ -101,6 +102,11 @@ def build_status_from_logs(log, err):
 if m:
 stages = stages + (int(m.group(1).strip()),)
 
+# Scan err file for specific
+for l in err:
+if "No space left on device" in l:
+other_failures.add("disk full")
+
 return BuildStatus(stages, other_failures)
 
 
@@ -217,19 +223,15 @@ class Build(object):
 
 :return: tuple with build status
 """
-
-f = self.read_log()
+log = self.read_log()
 try:
-log = f.read()
-finally:
-f.close()
-f = self.read_err()
-try:
-err = f.read()
+err = self.read_err()
+try:
+return build_status_from_logs(log, err)
+finally:
+err.close()
 finally:
-f.close()
-
-return build_status_from_logs(log, err)
+log.close()
 
 def err_count(self):
 """get status of build"""
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index 6184a64..7db834d 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -15,6 +15,7 @@
 #   along with this program; if not, write to the Free Software
 #   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
+from cStringIO import StringIO
 import os
 import tempfile
 import testtools
@@ -178,48 +179,51 @@ error3""")
 
 class BuildStatusFromLogs(testtools.TestCase):
 
+def parse_logs(self, log, err):
+return data.build_status_from_logs(StringIO(log), StringIO(err))
+
 def test_nothing(self):
-s = data.build_status_from_logs("", "")
+s = self.parse_logs("", "")
 self.assertEquals((None, None, None, None), s.stages)
 self.assertEquals(set(), s.other_failures)
 
 def test_disk_full(self):
 self.assertEquals(set(["disk full"]),
-data.build_status_from_logs("foo\nbar\nNo space left on 
device\nla\n",
+self.parse_logs("foo\nbar\nNo space left on device\nla\n",
 "").other_failures)
 self.assertEquals(set(["disk full"]),
-data.build_status_from_logs(
+self.parse_logs(
 "", "foo\nbar\nNo space left on device\nla\n").other_failures)
 
 def test_timeout(self):
 self.assertEquals(set(["timeout"]),
-data.build_status_from_logs("foo\nbar\nmaximum runtime 
exceeded\nla\n",
+self.parse_logs("foo\nbar\nmaximum runtime exceeded\nla\n",
 "").other_failures)
 
 def test_status(self):
 log = """
 TEST STATUS:1
 """
-res = data.build_status_from_logs(log, "")
+res = self.parse_logs(log, "")
 self.assertEquals(res.stages[3], 1)
 log = """
 TEST STATUS:  1
 """
-res = data.build_status_from_logs(log, "")
+res = self.parse_logs(log, "")
 self.assertEquals(res.stages[3], 1)
 log = """
 CONFIGURE STATUS: 2
 TEST STATUS:  1
 CC_CHECKER STATUS: 2
 """
-res = data.build_status_from_logs(log, "")
+res = self.parse_logs(log, "")
 self.assertEquals(res.stages[4], 2)
 log = """
 CONFIGURE STATUS: 2
 ACTION PASSED: test
 CC_CHECKER STATUS: 2
 """
-res = data.build_status_from_logs(log, "")
+res = self.parse_logs(log, "")
 self.assertEquals(res.stages[4], 2)
 self.assertEquals(res.stages[3], 255)
 log = """
@@ -231,7 +235,7 @@ 

[SCM] Samba Shared Repository - branch master updated

2010-11-08 Thread Jeremy Allison
The branch, master has been updated
   via  3a5f030 Second part of fix for bug # - When requesting lookups 
for BUILTIN sids, winbindd allocates new uids/gids in error.
   via  092507c Ensure we always have a mapped group for "Domain Users". 
Needed for DC tests to pass with bugfix for bug #.
   via  42f9ae8 First part of fix for bug # - When requesting lookups 
for BUILTIN sids, winbindd allocates new uids/gids in error.
  from  842a8e4 s3/configure: fix typo and warning

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


- Log -
commit 3a5f03015bf400268eb9d00747189aa5aefdeda9
Author: Jeremy Allison 
Date:   Mon Nov 8 13:41:34 2010 -0800

Second part of fix for bug # - When requesting lookups for BUILTIN 
sids, winbindd allocates new uids/gids in error.

Ensure we return after calling passdb for SID lookups for which we are
authoritative.

Jeremy.

Autobuild-User: Jeremy Allison 
Autobuild-Date: Mon Nov  8 22:24:34 UTC 2010 on sn-devel-104

commit 092507c65a1a2fe2c3731248578a265a20bbe14e
Author: Jeremy Allison 
Date:   Mon Nov 8 13:39:51 2010 -0800

Ensure we always have a mapped group for "Domain Users".
Needed for DC tests to pass with bugfix for bug #.

Jeremy.

commit 42f9ae875659e9e698a2875cf313c0d2173f94b2
Author: Jeremy Allison 
Date:   Mon Nov 8 13:38:13 2010 -0800

First part of fix for bug # - When requesting lookups for BUILTIN sids, 
winbindd allocates new uids/gids in error.

Ensure idmap_init_passdb_domain() correctly initialized the default
domain first.

Jeremy.

---

Summary of changes:
 selftest/target/Samba3.pm |7 ++-
 source3/winbindd/idmap.c  |   14 +-
 2 files changed, 19 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 4c554b5..f1387d9 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -444,7 +444,7 @@ sub provision($$)
 
my ($max_uid, $max_gid);
my ($uid_nobody, $uid_root);
-   my ($gid_nobody, $gid_nogroup, $gid_root);
+   my ($gid_nobody, $gid_nogroup, $gid_root, $gid_domusers);
 
if ($unix_uid < 0x - 2) {
$max_uid = 0x;
@@ -464,6 +464,7 @@ sub provision($$)
$gid_nobody = $max_gid - 1;
$gid_nogroup = $max_gid - 2;
$gid_root = $max_gid - 3;
+   $gid_domusers = $max_gid - 4;
 
##
## create conffile
@@ -605,6 +606,7 @@ $unix_name:x:$unix_uid:$unix_gids[0]:$unix_name 
gecos:$prefix_abs:/bin/false
print GROUP "nobody:x:$gid_nobody:
 nogroup:x:$gid_nogroup:nobody
 $unix_name-group:x:$unix_gids[0]:
+domusers:X:$gid_domusers:
 ";
if ($unix_gids[0] != 0) {
print GROUP "root:x:$gid_root:";
@@ -672,6 +674,9 @@ sub wait_for_start($$)
system($self->binpath("smbclient") ." $envvars->{CONFIGURATION} -L 
$envvars->{SERVER_IP} -U% -p 139 | head -2");
system($self->binpath("smbclient") ." $envvars->{CONFIGURATION} -L 
$envvars->{SERVER_IP} -U% -p 139 | head -2");
 
+   # Ensure we have domain users mapped.
+   system($self->binpath("net") ." $envvars->{CONFIGURATION} groupmap add 
rid=513 unixgroup=domusers type=domain");
+
print $self->getlog_env($envvars);
 }
 
diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c
index 102f4eb..102ae8a 100644
--- a/source3/winbindd/idmap.c
+++ b/source3/winbindd/idmap.c
@@ -448,6 +448,16 @@ static struct idmap_domain 
*idmap_init_passdb_domain(TALLOC_CTX *mem_ctx)
 {
idmap_init();
 
+   /*
+* Always init the default domain, we can't go without one
+*/
+   if (default_idmap_domain == NULL) {
+   default_idmap_domain = idmap_init_default_domain(NULL);
+   }
+   if (default_idmap_domain == NULL) {
+   return NULL;
+   }
+
if (passdb_idmap_domain != NULL) {
return passdb_idmap_domain;
}
@@ -633,7 +643,9 @@ NTSTATUS idmap_backends_sid_to_unixid(const char *domain, 
struct id_map *id)
return status;
}
 
-   DEBUG(10, ("passdb could not map, asking backends...\n"));
+   DEBUG(10, ("passdb could not map.\n"));
+
+   return NT_STATUS_NONE_MAPPED;
}
 
dom = idmap_find_domain(domain);


-- 
Samba Shared Repository


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

2010-11-08 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  925b777 Second part of fix for bug # - When requesting lookups 
for BUILTIN sids, winbindd allocates new uids/gids in error.
   via  b751c99 Ensure we always have a mapped group for "Domain Users". 
Needed for DC tests to pass with bugfix for bug #.
   via  3017bd9 First part of fix for bug # - When requesting lookups 
for BUILTIN sids, winbindd allocates new uids/gids in error.
  from  1b3caef s3: Fix an uninitialized variable

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


- Log -
commit 925b777b4b4d25f553b78546eb208a2235cfbce1
Author: Jeremy Allison 
Date:   Mon Nov 8 13:41:34 2010 -0800

Second part of fix for bug # - When requesting lookups for BUILTIN 
sids, winbindd allocates new uids/gids in error.

Ensure we return after calling passdb for SID lookups for which we are
authoritative.

Jeremy.
(cherry picked from commit c33cf595cd5a98051fb2751a01a86aaa96c97413)

commit b751c99153df2b55eddd931b5882c456148eae5e
Author: Jeremy Allison 
Date:   Mon Nov 8 13:39:51 2010 -0800

Ensure we always have a mapped group for "Domain Users".
Needed for DC tests to pass with bugfix for bug #.

Jeremy.
(cherry picked from commit 092507c65a1a2fe2c3731248578a265a20bbe14e)

commit 3017bd99d6807c1ac6650a0dbb370d427ef6a950
Author: Jeremy Allison 
Date:   Mon Nov 8 13:38:13 2010 -0800

First part of fix for bug # - When requesting lookups for BUILTIN sids, 
winbindd allocates new uids/gids in error.

Ensure idmap_init_passdb_domain() correctly initialized the default
domain first.

Jeremy.
(cherry picked from commit 42f9ae875659e9e698a2875cf313c0d2173f94b2)

---

Summary of changes:
 selftest/target/Samba3.pm |7 ++-
 source3/winbindd/idmap.c  |   14 +-
 2 files changed, 19 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 39057ec..9eb3ccd 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -448,7 +448,7 @@ sub provision($$)
 
my ($max_uid, $max_gid);
my ($uid_nobody, $uid_root);
-   my ($gid_nobody, $gid_nogroup, $gid_root);
+   my ($gid_nobody, $gid_nogroup, $gid_root, $gid_domusers);
 
if ($unix_uid < 0x - 2) {
$max_uid = 0x;
@@ -468,6 +468,7 @@ sub provision($$)
$gid_nobody = $max_gid - 1;
$gid_nogroup = $max_gid - 2;
$gid_root = $max_gid - 3;
+   $gid_domusers = $max_gid - 4;
 
##
## create conffile
@@ -608,6 +609,7 @@ $unix_name:x:$unix_uid:$unix_gids[0]:$unix_name 
gecos:$prefix_abs:/bin/false
print GROUP "nobody:x:$gid_nobody:
 nogroup:x:$gid_nogroup:nobody
 $unix_name-group:x:$unix_gids[0]:
+domusers:X:$gid_domusers:
 ";
if ($unix_gids[0] != 0) {
print GROUP "root:x:$gid_root:";
@@ -675,6 +677,9 @@ sub wait_for_start($$)
system($self->binpath("smbclient") ." $envvars->{CONFIGURATION} -L 
$envvars->{SERVER_IP} -U% -p 139 | head -2");
system($self->binpath("smbclient") ." $envvars->{CONFIGURATION} -L 
$envvars->{SERVER_IP} -U% -p 139 | head -2");
 
+   # Ensure we have domain users mapped.
+   system($self->binpath("net") ." $envvars->{CONFIGURATION} groupmap add 
rid=513 unixgroup=domusers type=domain");
+
print $self->getlog_env($envvars);
 }
 
diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c
index 102f4eb..102ae8a 100644
--- a/source3/winbindd/idmap.c
+++ b/source3/winbindd/idmap.c
@@ -448,6 +448,16 @@ static struct idmap_domain 
*idmap_init_passdb_domain(TALLOC_CTX *mem_ctx)
 {
idmap_init();
 
+   /*
+* Always init the default domain, we can't go without one
+*/
+   if (default_idmap_domain == NULL) {
+   default_idmap_domain = idmap_init_default_domain(NULL);
+   }
+   if (default_idmap_domain == NULL) {
+   return NULL;
+   }
+
if (passdb_idmap_domain != NULL) {
return passdb_idmap_domain;
}
@@ -633,7 +643,9 @@ NTSTATUS idmap_backends_sid_to_unixid(const char *domain, 
struct id_map *id)
return status;
}
 
-   DEBUG(10, ("passdb could not map, asking backends...\n"));
+   DEBUG(10, ("passdb could not map.\n"));
+
+   return NT_STATUS_NONE_MAPPED;
}
 
dom = idmap_find_domain(domain);


-- 
Samba Shared Repository


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

2010-11-08 Thread Jelmer Vernooij
The branch, master has been updated
   via  5471061 Remove updating of samba-docs and lorikeet. Move samba-web 
and build-farm to git.
   via  7d275bf Remove obsolete trees samba-docs and lorikeet. Move 
build_farm and samba-web to git.
  from  8fa1f09 Simplify build_status() code. Return all found revisions in 
revision_details().

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


- Log -
commit 547106195d1bd1889396b031274463019f30bc91
Author: Jelmer Vernooij 
Date:   Mon Nov 8 23:08:55 2010 +0100

Remove updating of samba-docs and lorikeet. Move samba-web and build-farm 
to git.

commit 7d275bfb76b8e737693afb56b9e9984f1cc93055
Author: Jelmer Vernooij 
Date:   Mon Nov 8 23:08:02 2010 +0100

Remove obsolete trees samba-docs and lorikeet. Move build_farm and 
samba-web to git.

---

Summary of changes:
 history|7 ++-
 web/trees.conf |   14 ++
 2 files changed, 4 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/history b/history
index 1d65da5..590c387 100755
--- a/history
+++ b/history
@@ -7,11 +7,6 @@
 
 (
 
-./svnlog.pl svn://svnanon.samba.org/samba-docs trunk 60 samba-docs 
cache/history.samba-docs
-./svnlog.pl svn://svnanon.samba.org/samba-web trunk 60 samba-web 
cache/history.samba-web
-./svnlog.pl svn://svnanon.samba.org/lorikeet trunk 60 lorikeet 
cache/history.lorikeet
-./svnlog.pl svn://svnanon.samba.org/build-farm trunk 60 build_farm 
cache/history.build_farm
-
 ./gitlog.pl /data/git/ppp.git/ 60 master cache/history.ppp
 ./gitlog.pl /data/git/ccache.git/ 60 master cache/history.ccache
 ./gitlog.pl /data/git/rsync.git/ 60 master cache/history.rsync
@@ -27,5 +22,7 @@
 ./gitlog.pl /data/git/samba.git/ 60 master cache/history.pidl pidl
 
 ./gitlog.pl /data/git/ctdb.git/ 60 master cache/history.ctdb
+./gitlog.pl /data/git/build-farm.git/ 60 master cache/history.build_farm
+./gitlog.pl /data/git/samba-web.git/ 60 master cache/history.samba-web
 
 ) > history.log 2>&1
diff --git a/web/trees.conf b/web/trees.conf
index 23866a0..de50306 100644
--- a/web/trees.conf
+++ b/web/trees.conf
@@ -14,25 +14,15 @@ repo = ppp
 branch = master
 
 [build_farm]
-scm = svn
+scm = git
 repo = build-farm
 branch = trunk
 
 [samba-web]
-scm = svn
+scm = git
 repo = samba-web
 branch = trunk
 
-[samba-docs]
-scm = svn
-repo = samba-docs
-branch = trunk
-
-[lorikeet]
-scm = svn
-repo = lorikeeet
-branch = trunk
-
 [samba_3_current]
 scm = git
 repo = samba.git


-- 
build.samba.org


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

2010-11-08 Thread Jelmer Vernooij
The branch, master has been updated
   via  8fa1f09 Simplify build_status() code. Return all found revisions in 
revision_details().
  from  0367b80 Force the string conversion to avoid write() argument must 
be string error

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


- Log -
commit 8fa1f097b77493aaefb6e792f5ab97f666c5badc
Author: Jelmer Vernooij 
Date:   Mon Nov 8 22:57:02 2010 +0100

Simplify build_status() code. Return all found revisions in 
revision_details().

---

Summary of changes:
 buildfarm/data.py|   24 ++--
 buildfarm/tests/test_data.py |4 ++--
 web/build.py |   21 -
 3 files changed, 28 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index d5e936a..5fe1fea 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -196,20 +196,21 @@ class Build(object):
 file = self._store.build_fname(self.tree, self.host, self.compiler, 
self.rev)
 
 revid = None
+commit_revid = None
 timestamp = None
 f = open("%s.log" % file, 'r')
 try:
 for l in f.readlines():
 if l.startswith("BUILD COMMIT REVISION: "):
-revid = l.split(":", 1)[1].strip()
-elif l.startswith("BUILD REVISION: ") and not revid:
+commit_revid = l.split(":", 1)[1].strip()
+elif l.startswith("BUILD REVISION: "):
 revid = l.split(":", 1)[1].strip()
 elif l.startswith("BUILD COMMIT TIME"):
 timestamp = l.split(":", 1)[1].strip()
 finally:
 f.close()
 
-return (revid, timestamp)
+return (revid, commit_revid, timestamp)
 
 def status(self):
 """get status of build
@@ -261,15 +262,18 @@ class CachingBuild(Build):
 # the ctime/mtime asymmetry is needed so we don't get fooled by
 # the mtime update from rsync
 if st2 and st1.st_ctime <= st2.st_mtime:
-(revid, timestamp) = util.FileLoad("%s.revision" % 
cachef).split(":", 1)
+(revid, commit_revid, timestamp) = util.FileLoad("%s.revision" % 
cachef).split(":", 2)
 if timestamp == "":
-return (revid, None)
-else:
-return (revid, timestamp)
-(revid, timestamp) = super(CachingBuild, self).revision_details()
+timestamp = None
+if revid == "":
+revid = None
+if commit_revid == "":
+commit_revid = None
+return (revid, commit_revid, timestamp)
+(revid, commit_revid, timestamp) = super(CachingBuild, 
self).revision_details()
 if not self._store.readonly:
-util.FileSave("%s.revision" % cachef, "%s:%s" % (revid, timestamp 
or ""))
-return (revid, timestamp)
+util.FileSave("%s.revision" % cachef, "%s:%s:%s" % (revid, 
commit_revid or "", timestamp or ""))
+return (revid, commit_revid, timestamp)
 
 def err_count(self):
 file = self._store.build_fname(self.tree, self.host, self.compiler, 
self.rev)
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index 3043b4c..6184a64 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -151,7 +151,7 @@ BUILD REVISION: 42
 BUILD COMMIT TIME: 3 August 2010
 """)
 build = self.x.get_build("tdb", "charis", "cc")
-self.assertEquals(("43", "3 August 2010"), build.revision_details())
+self.assertEquals(("42", "43", "3 August 2010"), 
build.revision_details())
 
 def test_revision_details_no_timestamp(self):
 self.create_mock_logfile("tdb", "charis", "cc", contents="""
@@ -160,7 +160,7 @@ BUILD REVISION: 42
 BLA
 """)
 build = self.x.get_build("tdb", "charis", "cc")
-self.assertEquals(("43", None), build.revision_details())
+self.assertEquals(("42", "43", None), build.revision_details())
 
 def test_err_count(self):
 self.create_mock_logfile("tdb", "charis", "cc")
diff --git a/web/build.py b/web/build.py
index 8f8a293..48239aa 100755
--- a/web/build.py
+++ b/web/build.py
@@ -112,11 +112,10 @@ def html_build_status(status):
 return bstatus + ostatus
 
 
-def build_status(myself, tree, host, compiler, rev=None):
-build = db.get_build(tree, host, compiler, rev)
+def build_status_html(myself, build):
 rawstatus = build.status()
 status = html_build_status(rawstatus)
-return build_link(myself, tree, host, compiler, rev, status)
+return build_link(myself, build.tree, build.host, build.compiler, 
build.rev, status)
 
 
 def red_age(age):
@@ -168,7 +167,7 @@ def view_summary(myself, output_type):
 for tree in trees:
   

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

2010-11-08 Thread Matthieu Patou
The branch, master has been updated
   via  0367b80 Force the string conversion to avoid write() argument must 
be string error
   via  7f1938e Display more clearly when make test returns an error with 
no failed tests
  from  bc21f20 Unbreak the testsuite, rename cache2 back to cache.

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


- Log -
commit 0367b808e7effeef4272e89ad7a769581b147ccb
Author: Matthieu Patou 
Date:   Tue Nov 9 00:21:21 2010 +0300

Force the string conversion to avoid write() argument must be string error

commit 7f1938edfd688d8f798042a5817ad9957f007645
Author: Matthieu Patou 
Date:   Mon Nov 8 09:57:57 2010 +0300

Display more clearly when make test returns an error with no failed tests

---

Summary of changes:
 buildfarm/data.py |3 ++-
 web/build.py  |8 +---
 2 files changed, 7 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index a13b526..d5e936a 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -49,6 +49,7 @@ def check_dir_exists(kind, path):
 def build_status_from_logs(log, err):
 """get status of build"""
 m = re.search("TEST STATUS:(\s*\d+)", log)
+other_failures = set()
 if m:
 tstatus = int(m.group(1).strip())
 else:
@@ -62,6 +63,7 @@ def build_status_from_logs(log, err):
 tstatus = 255
 if m.group(1) == "FAILED" and tstatus == 0:
 tstatus = -1
+other_failures.add("make test error")
 else:
 tstatus = None
 
@@ -83,7 +85,6 @@ def build_status_from_logs(log, err):
 else:
 cstatus = None
 
-other_failures = set()
 m = re.search("(PANIC|INTERNAL ERROR):.*", log)
 if m:
 other_failures.add("panic")
diff --git a/web/build.py b/web/build.py
index 590ab38..8f8a293 100755
--- a/web/build.py
+++ b/web/build.py
@@ -51,7 +51,7 @@ history = history.History(db)
 hostsdb = open_hostdb()
 
 compilers = db.compilers
-hosts = dict([(host.name, host) for host in hostsdb.hosts()])
+hosts = dict([(str(host.name), host) for host in hostsdb.hosts()])
 trees = db.trees
 OLDAGE = db.OLDAGE
 
@@ -106,6 +106,8 @@ def html_build_status(status):
 ostatus += "/"+span("status failed", "disk full")
 if "timeout" in status.other_failures:
 ostatus += "/"+span("status failed", "timeout")
+if "make test error" in status.other_failures:
+ostatus += "/"+span("status failed", "unexpected return code")
 bstatus = "/".join([span_status(s) for s in status.stages])
 return bstatus + ostatus
 
@@ -299,7 +301,7 @@ def view_recent_builds(myself, tree, sort_by):
 age_ctime = build.age_ctime()
 (revision, revision_time) = build.revision_details()
 if revision:
-all_builds.append([age_ctime, host.platform, "%s" % (myself, 
host.name, tree, compiler, host.name, host.name), compiler, tree, status, 
revision_link(myself, revision, tree), revision_time])
+all_builds.append([age_ctime, str(host.platform), "%s" % (myself, 
host.name, tree, compiler, host.name, host.name), compiler, tree, status, 
revision_link(myself, revision, tree), revision_time])
 
 all_builds.sort(cmp_funcs[sort_by])
 
@@ -754,7 +756,7 @@ def main_menu():
 yield ""
 yield ""
 for name, host in hosts.iteritems():
-yield "%s -- %s\n" % (name, host.platform, 
name)
+yield "%s -- %s\n" % (name, 
str(host.platform), name)
 yield ""
 yield ""
 for tree, t in trees.iteritems():


-- 
build.samba.org


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

2010-11-08 Thread Jelmer Vernooij
The branch, master has been updated
   via  bc21f20 Unbreak the testsuite, rename cache2 back to cache.
   via  ff01797 Cope with missing err files.
  from  b44b5d7 More debug

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


- Log -
commit bc21f2021c950145323edef52a5f099ad06e0ece
Author: Jelmer Vernooij 
Date:   Mon Nov 8 22:08:16 2010 +0100

Unbreak the testsuite, rename cache2 back to cache.

commit ff017973ecf6982f92d8806e6048f17033667795
Author: Jelmer Vernooij 
Date:   Mon Nov 8 22:08:02 2010 +0100

Cope with missing err files.

---

Summary of changes:
 buildfarm/data.py|   11 ---
 buildfarm/tests/test_data.py |5 +
 2 files changed, 13 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 950166a..a13b526 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -23,6 +23,7 @@
 
 
 import ConfigParser
+from cStringIO import StringIO
 import hashlib
 import os
 import re
@@ -172,7 +173,11 @@ class Build(object):
 
 def read_err(self):
 """read full err file"""
-return open(self._store.build_fname(self.tree, self.host, 
self.compiler, self.rev)+".err", 'r')
+try:
+return open(self._store.build_fname(self.tree, self.host, 
self.compiler, self.rev)+".err", 'r')
+except IOError:
+# No such file
+return StringIO()
 
 
 def log_checksum(self):
@@ -343,8 +348,8 @@ class BuildResultStore(object):
 self.datadir = os.path.join(basedir, "data")
 check_dir_exists("data", self.datadir)
 
-self.cachedir = os.path.join(basedir, "cache2")
-check_dir_exists("cache2", self.cachedir)
+self.cachedir = os.path.join(basedir, "cache")
+check_dir_exists("cache", self.cachedir)
 
 self.lcovdir = os.path.join(basedir, "lcov/data")
 check_dir_exists("lcov", self.lcovdir)
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index 2cdc5e0..3043b4c 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -138,6 +138,11 @@ class BuildResultStoreTests(BuildFarmTestCase):
 build = self.x.get_build("tdb", "charis", "cc")
 self.assertEquals("This is what an stderr file looks like.", 
build.read_err().read())
 
+def test_read_err_nofile(self):
+self.create_mock_logfile("tdb", "charis", "cc")
+build = self.x.get_build("tdb", "charis", "cc")
+self.assertEquals("", build.read_err().read())
+
 def test_revision_details(self):
 self.create_mock_logfile("tdb", "charis", "cc", contents="""
 BUILD COMMIT REVISION: 43


-- 
build.samba.org


[SCM] Samba Shared Repository - branch master updated

2010-11-08 Thread Björn Jacke
The branch, master has been updated
   via  842a8e4 s3/configure: fix typo and warning
  from  124abb3 s4:password_hash LDB module - introduce a "userPassword" 
flag which enables/disables the two "userPassword" behaviours

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


- Log -
commit 842a8e43129d821ebf08cdf4fcba54d3789de756
Author: Björn Jacke 
Date:   Mon Nov 8 21:14:44 2010 +0100

s3/configure: fix typo and warning

Autobuild-User: Björn Jacke 
Autobuild-Date: Mon Nov  8 20:58:20 UTC 2010 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 959e5eb..aedec9b 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -836,7 +836,7 @@ if test x$enable_cups != xno; then
# dendencies including thread libraries - use 
cups-config only if really
# required. 
AC_CHECK_LIB_EXT(cups, ac_save_PRINT_LIBS , httpConnect,
-   [PRINT_LIBS"$ac_save_PRINT_LIBS -lcups"],
+   [PRINT_LIBS="$ac_save_PRINT_LIBS -lcups"],
[AC_MSG_WARN([your cups library doesn't link 
with -lcups alone, it might be underlinked.]) ;
 PRINT_LIBS="$ac_save_PRINT_LIBS `$CUPS_CONFIG 
--libs`"])
 


-- 
Samba Shared Repository


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

2010-11-08 Thread Matthieu Patou
The branch, master has been updated
   via  b44b5d7 More debug
   via  3b8cae9 move from cache to cache2 in order to be able to run tests 
on build.samba.org
   via  c1c68bd Make standalone listen only on localhost and use local 
version of common.css
  from  d3504da More debug

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


- Log -
commit b44b5d78dea6fcf88dbb97e0557b059c391a3c97
Author: Matthieu Patou 
Date:   Mon Nov 8 23:07:21 2010 +0300

More debug

commit 3b8cae9833a477ccf7f44369d6ff2f1a0d4dc36e
Author: Matthieu Patou 
Date:   Mon Nov 8 23:06:53 2010 +0300

move from cache to cache2 in order to be able to run tests on 
build.samba.org

commit c1c68bde1efdcef7d08f185eb17e9b86b83e25f0
Author: Matthieu Patou 
Date:   Mon Nov 8 23:06:25 2010 +0300

Make standalone listen only on localhost and use local version of common.css

---

Summary of changes:
 buildfarm/data.py |4 ++--
 buildsamba02.fns  |2 ++
 web/build.py  |8 +---
 3 files changed, 9 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 74caede..950166a 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -343,8 +343,8 @@ class BuildResultStore(object):
 self.datadir = os.path.join(basedir, "data")
 check_dir_exists("data", self.datadir)
 
-self.cachedir = os.path.join(basedir, "cache")
-check_dir_exists("cache", self.cachedir)
+self.cachedir = os.path.join(basedir, "cache2")
+check_dir_exists("cache2", self.cachedir)
 
 self.lcovdir = os.path.join(basedir, "lcov/data")
 check_dir_exists("lcov", self.lcovdir)
diff --git a/buildsamba02.fns b/buildsamba02.fns
index 6ffcfe2..3cef2ad 100644
--- a/buildsamba02.fns
+++ b/buildsamba02.fns
@@ -7,6 +7,8 @@ global_lock
 action_test() {
echo "PWD: "`pwd`
ls -lrta ../../
+   set
+   env
case $tree in
samba_4*)
../buildtools/bin/waf test
diff --git a/web/build.py b/web/build.py
index b63061b..590ab38 100755
--- a/web/build.py
+++ b/web/build.py
@@ -949,8 +949,10 @@ def buildApp(environ, start_response):
 yield ""
 yield ""
 yield ""
-#yield ""
-yield ""
+if standalone:
+yield ""
+else:
+yield ""
 yield ""
 yield "  "
 yield ""
@@ -1018,7 +1020,7 @@ if __name__ == '__main__':
 if opts.standalone:
 standalone = 1
 from wsgiref.simple_server import make_server
-httpd = make_server('', 8000, buildApp)
+httpd = make_server('localhost', 8000, buildApp)
 print "Serving on port 8000..."
 httpd.serve_forever()
 else:


-- 
build.samba.org


[SCM] Samba Shared Repository - branch master updated

2010-11-08 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  124abb3 s4:password_hash LDB module - introduce a "userPassword" 
flag which enables/disables the two "userPassword" behaviours
   via  422233c s4:pyldb.c - fix "py_ldb_contains" according to the comment 
by Jelmer
  from  528edcc s3-waf: add idmap_autorid to the build.

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


- Log -
commit 124abb37bf6acfe3c5c7d0c9da0ba201629a9444
Author: Matthias Dieter Wallnöfer 
Date:   Mon Nov 8 15:42:29 2010 +0100

s4:password_hash LDB module - introduce a "userPassword" flag which 
enables/disables the two "userPassword" behaviours

- Enabled: "userPassword" password change behaviour (will later be linked 
to the
  "dSHeuristics")
- Disabled: "userPassword" plain attribute behaviour (default)

Autobuild-User: Matthias Dieter Wallnöfer 
Autobuild-Date: Mon Nov  8 15:28:06 UTC 2010 on sn-devel-104

commit 422233c563232e784e4fa274782fe60900037762
Author: Matthias Dieter Wallnöfer 
Date:   Mon Nov 8 15:24:41 2010 +0100

s4:pyldb.c - fix "py_ldb_contains" according to the comment by Jelmer

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/password_hash.c |   52 +---
 source4/lib/ldb/pyldb.c|6 +--
 2 files changed, 39 insertions(+), 19 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 731b8e9..83bee2f 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -98,9 +98,9 @@ struct ph_context {
struct dsdb_control_password_change *change;
 
bool pwd_reset;
-
bool change_status;
bool hash_values;
+   bool userPassword;
 };
 
 
@@ -1686,15 +1686,18 @@ static int setup_io(struct ph_context *ac,
io->u.restrictions = 0;
}
 
-   ret = samdb_msg_find_old_and_new_ldb_val(orig_msg, "userPassword",
-ac->req->operation,
-&io->n.cleartext_utf8,
-&io->og.cleartext_utf8);
-   if (ret != LDB_SUCCESS) {
-   ldb_asprintf_errstring(ldb,
-   "setup_io: "
-   "it's only allowed to set the old password once!");
-   return ret;
+   if (ac->userPassword) {
+   ret = samdb_msg_find_old_and_new_ldb_val(orig_msg,
+"userPassword",
+ac->req->operation,
+&io->n.cleartext_utf8,
+
&io->og.cleartext_utf8);
+   if (ret != LDB_SUCCESS) {
+   ldb_asprintf_errstring(ldb,
+   "setup_io: "
+   "it's only allowed to set the old password 
once!");
+   return ret;
+   }
}
 
ret = samdb_msg_find_old_and_new_ldb_val(orig_msg, "clearTextPassword",
@@ -1967,7 +1970,8 @@ static int setup_io(struct ph_context *ac,
 }
 
 static struct ph_context *ph_init_context(struct ldb_module *module,
- struct ldb_request *req)
+ struct ldb_request *req,
+ bool userPassword)
 {
struct ldb_context *ldb;
struct ph_context *ac;
@@ -1982,6 +1986,7 @@ static struct ph_context *ph_init_context(struct 
ldb_module *module,
 
ac->module = module;
ac->req = req;
+   ac->userPassword = userPassword;
 
return ac;
 }
@@ -2227,6 +2232,7 @@ static int password_hash_add(struct ldb_module *module, 
struct ldb_request *req)
*ntAttr, *lmAttr;
int ret;
struct ldb_control *bypass = NULL;
+   bool userPassword = true;
 
ldb = ldb_module_get_ctx(module);
 
@@ -2265,7 +2271,11 @@ static int password_hash_add(struct ldb_module *module, 
struct ldb_request *req)
/* If no part of this touches the 'userPassword' OR 'clearTextPassword'
 * OR 'unicodePwd' OR 'dBCSPwd' we don't need to make any changes. */
 
-   userPasswordAttr = ldb_msg_find_element(req->op.add.message, 
"userPassword");
+   userPasswordAttr = NULL;
+   if (userPassword) {
+   userPasswordAttr = ldb_msg_find_element(req->op.add.message,
+   "userPassword");
+   }
clearTextPasswordAttr = ldb_msg_find_element(req->op.add.message, 
"clearTextPassword");
ntAttr = ldb_msg_find_element(req->op.add.

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

2010-11-08 Thread Matthias Dieter Wallnöfer

Thanks for the comment, I will push a fix.

Cheers,
Matthias

Jelmer Vernooij wrote:

On Mon, 2010-11-08 at 12:22 +0100, Matthias Dieter Wallnöfer wrote:
   

@@ -1441,7 +1442,13 @@ static int py_ldb_contains(PyLdbObject *self, PyObject 
*obj)

talloc_free(result);

-   return count;
+   if (count == 1) {
+   return 1;
+   } else if (count == 0) {
+   return 0;
+   }
+
+   return -1;
  }

  static PySequenceMethods py_ldb_seq = {
 

^^ This is wrong. This means we'll not set an exception and return -1 if
count is more than one.

As I've said earlier I think the risk of these fixes is higher than the
(purely theoretical) gain.

Cheers,

Jelmer
   




[SCM] Samba Shared Repository - branch master updated

2010-11-08 Thread Günther Deschner
The branch, master has been updated
   via  528edcc s3-waf: add idmap_autorid to the build.
  from  8b624c1 s3: Fix an uninitialized variable

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


- Log -
commit 528edcc789ed4712925e33005fcd5f355ddba1b6
Author: Günther Deschner 
Date:   Mon Nov 8 14:34:51 2010 +0100

s3-waf: add idmap_autorid to the build.

Guenther

Autobuild-User: Günther Deschner 
Autobuild-Date: Mon Nov  8 14:17:27 UTC 2010 on sn-devel-104

---

Summary of changes:
 source3/winbindd/wscript_build |9 +
 source3/wscript|2 +-
 2 files changed, 10 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/wscript_build b/source3/winbindd/wscript_build
index ddc9543..da0c189 100644
--- a/source3/winbindd/wscript_build
+++ b/source3/winbindd/wscript_build
@@ -17,6 +17,7 @@ IDMAP_ADEX_SRC = '''idmap_adex/idmap_adex.c
 idmap_adex/provider_unified.c
 idmap_adex/gc_util.c
 idmap_adex/domain_util.c'''
+IDMAP_AUTORID_SRC = '''idmap_autorid.c'''
 
 IDMAP_RW_SRC = 'idmap_rw.c'
 IDMAP_SRC = 'idmap.c idmap_util.c ${IDMAP_RW_SRC}'
@@ -88,6 +89,14 @@ bld.SAMBA_MODULE('idmap_adex',
  internal_module=bld.SAMBA3_IS_STATIC_MODULE('IDMAP_ADEX'),
  enabled=bld.SAMBA3_IS_ENABLED_MODULE('IDMAP_ADEX'))
 
+bld.SAMBA_MODULE('idmap_autorid',
+ subsystem='idmap',
+ source=IDMAP_AUTORID_SRC,
+ init_function='',
+ internal_module=bld.SAMBA3_IS_STATIC_MODULE('IDMAP_AUTORID'),
+ enabled=bld.SAMBA3_IS_ENABLED_MODULE('IDMAP_AUTORID'))
+
+
 NSS_INFO_TEMPLATE_SRC = 'nss_info_template.c'
 NSS_INFO_SRC = 'nss_info.c'
 
diff --git a/source3/wscript b/source3/wscript
index 5b83e23..5bab1a1 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -334,7 +334,7 @@ return acl_get_perm_np(permset_d, perm);
   vfs_streams_xattr vfs_streams_depot 
vfs_acl_xattr vfs_acl_tdb
   vfs_smb_traffic_analyzer vfs_preopen 
vfs_catia vfs_scannedonly
   vfs_crossrename vfs_linux_xfs_sgid
-  vfs_time_audit''')
+  vfs_time_audit idmap_autorid''')
 
 if Options.options.developer:
 default_static_modules.extend(TO_LIST('rpc_rpcecho pdb_ads'))


-- 
Samba Shared Repository


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

2010-11-08 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  1b3caef s3: Fix an uninitialized variable
   via  44acd4c s3: Build idmap_autorid by default
   via  373c065 s3:idmap: add a new ID mapping module autorid
   via  51e1537 s3:winbind add wcache_tdc_fetch_domainbysid
   via  64e5f22 s3: Put some parentheses around conditionals
   via  c616d73 s3: Consistently use stdbool types in new code
   via  1d826c2 s3:winbind add timeouts to winbind cache
  from  070664c s3-reg_parse: fix uninitialized variable in srprs_key().

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


- Log -
commit 1b3caef289e96c8a4840068ff73de25da1978ae4
Author: Volker Lendecke 
Date:   Mon Nov 8 12:59:59 2010 +0100

s3: Fix an uninitialized variable

Autobuild-User: Volker Lendecke 
Autobuild-Date: Mon Nov  8 13:22:06 UTC 2010 on sn-devel-104

commit 44acd4c557ce9610763be731184ac20f256a9aa1
Author: Volker Lendecke 
Date:   Mon Nov 8 12:54:49 2010 +0100

s3: Build idmap_autorid by default

commit 373c06534987296b9f3fa8430ca57ad4a7b2
Author: Christian Ambach 
Date:   Wed Jul 7 12:35:36 2010 +0200

s3:idmap: add a new ID mapping module autorid

This is an initial implementation of the idmap_autorid module.
It works similar to the idmap_rid module but requires less
configuration. It will automatically pick ranges for each domain,
so you do not have to bother any more about adding an idmap
configuration for all of the domains in the forest.

This is very easy to use and to configure and much more
deterministic and faster than idmap_tdb, the typical choice
of Samba users up to now.

commit 51e15370e5559084e8849e2dc8f1d65b02f04b83
Author: Christian Ambach 
Date:   Fri Oct 29 15:53:20 2010 +0200

s3:winbind add wcache_tdc_fetch_domainbysid

add a function to lookup a domain in the winbind cache by domain SID

commit 64e5f22175a901fe8df2cd978e694681dfbe179e
Author: Volker Lendecke 
Date:   Mon Nov 8 11:55:07 2010 +0100

s3: Put some parentheses around conditionals

commit c616d73cbec1450d21d79e152494e869dc4e93f9
Author: Volker Lendecke 
Date:   Mon Nov 8 11:50:51 2010 +0100

s3: Consistently use stdbool types in new code

commit 1d826c24fd4fa9923f79761d00a0e906fab29c2c
Author: Christian Ambach 
Date:   Thu Nov 4 17:10:25 2010 +0100

s3:winbind add timeouts to winbind cache

This adds a timeout value to cache entries and the NDR records
in the winbind cache.

The previous approach of just comparing the sequence number has some issues,
e.g. when retrying a wbinfo -n operation for a user in a not yet trusted
domain was always failing even after the trusted domain was added.

The new approach compares sequence number and timeout value to
determine if a cache entry is still valid or not.

I increased the cache version number so an old cache will be wiped
automatically after upgrade.

---

Summary of changes:
 docs-xml/manpages-3/idmap_autorid.8.xml |  134 +
 source3/Makefile.in |4 +
 source3/configure.in|2 +
 source3/winbindd/idmap_autorid.c|  472 +++
 source3/winbindd/winbindd_cache.c   |  125 +++-
 source3/winbindd/winbindd_proto.h   |1 +
 6 files changed, 723 insertions(+), 15 deletions(-)
 create mode 100644 docs-xml/manpages-3/idmap_autorid.8.xml
 create mode 100644 source3/winbindd/idmap_autorid.c


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/idmap_autorid.8.xml 
b/docs-xml/manpages-3/idmap_autorid.8.xml
new file mode 100644
index 000..38790ea
--- /dev/null
+++ b/docs-xml/manpages-3/idmap_autorid.8.xml
@@ -0,0 +1,134 @@
+
+http://www.samba.org/samba/DTD/samba-doc";>
+
+
+
+   idmap_autorid
+   8
+   Samba
+   System Administration tools
+   3.6
+
+
+
+
+   idmap_autorid
+   Samba's idmap_autorid Backend for Winbind
+
+
+
+   DESCRIPTION
+   The idmap_autorid backend provides a way to use an algorithmic
+   mapping scheme to map UIDs/GIDs and SIDs that is more deterministic
+   than idmap_tdb and easier to configure than idmap_rid.
+   The module works similar to idmap_rid, but it automatically
+   configures the range to be used for each domain, so there is no need
+   to specify a specific range for each domain in the forest, the only
+   configuration that is needed is the range of uid/gids that shall
+   be used for user/group mappings and an optional size of the ranges
+   to be used.
+   The mappings of which domain is mapped to which range is stored
+   in autorid.tdb, thus you should backup this database regularly.
+   Due to the algorithm being used, it is the module that is
+   most easy to use as it only requires

[SCM] Samba Shared Repository - branch master updated

2010-11-08 Thread Volker Lendecke
The branch, master has been updated
   via  8b624c1 s3: Fix an uninitialized variable
   via  d6d2f8a s3: Build idmap_autorid by default
   via  9aab414 s3:idmap: add a new ID mapping module autorid
   via  51f s3:winbind add wcache_tdc_fetch_domainbysid
   via  69155e4 s3: Put some parentheses around conditionals
   via  cbe3991 s3: Consistently use stdbool types in new code
   via  57b3d32 s3:winbind add timeouts to winbind cache
  from  58cfa5a s4:passwords.py - test empty password attributes behaviour

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


- Log -
commit 8b624c1d2084a58f20fd310a47b241cfb2488e49
Author: Volker Lendecke 
Date:   Mon Nov 8 12:59:59 2010 +0100

s3: Fix an uninitialized variable

Autobuild-User: Volker Lendecke 
Autobuild-Date: Mon Nov  8 13:22:06 UTC 2010 on sn-devel-104

commit d6d2f8a8f2b860cc587d21b3d934ed428edc08ad
Author: Volker Lendecke 
Date:   Mon Nov 8 12:54:49 2010 +0100

s3: Build idmap_autorid by default

commit 9aab4149afcfb934057744ce8b9a054d1fdabdc5
Author: Christian Ambach 
Date:   Wed Jul 7 12:35:36 2010 +0200

s3:idmap: add a new ID mapping module autorid

This is an initial implementation of the idmap_autorid module.
It works similar to the idmap_rid module but requires less
configuration. It will automatically pick ranges for each domain,
so you do not have to bother any more about adding an idmap
configuration for all of the domains in the forest.

This is very easy to use and to configure and much more
deterministic and faster than idmap_tdb, the typical choice
of Samba users up to now.

commit 51fa9f832d1a9aa207c7a13393e3c11b5dc3
Author: Christian Ambach 
Date:   Fri Oct 29 15:53:20 2010 +0200

s3:winbind add wcache_tdc_fetch_domainbysid

add a function to lookup a domain in the winbind cache by domain SID

commit 69155e41037d42ca58efa7ef749cb05654ac27e2
Author: Volker Lendecke 
Date:   Mon Nov 8 11:55:07 2010 +0100

s3: Put some parentheses around conditionals

commit cbe399155dd2884f9a350d43b4334b504ec57507
Author: Volker Lendecke 
Date:   Mon Nov 8 11:50:51 2010 +0100

s3: Consistently use stdbool types in new code

commit 57b3d32c8d87c4273d30d73fe2bfd3de0178945d
Author: Christian Ambach 
Date:   Thu Nov 4 17:10:25 2010 +0100

s3:winbind add timeouts to winbind cache

This adds a timeout value to cache entries and the NDR records
in the winbind cache.

The previous approach of just comparing the sequence number has some issues,
e.g. when retrying a wbinfo -n operation for a user in a not yet trusted
domain was always failing even after the trusted domain was added.

The new approach compares sequence number and timeout value to
determine if a cache entry is still valid or not.

I increased the cache version number so an old cache will be wiped
automatically after upgrade.

---

Summary of changes:
 docs-xml/manpages-3/idmap_autorid.8.xml |  134 +
 source3/Makefile.in |4 +
 source3/configure.in|2 +
 source3/winbindd/idmap_autorid.c|  472 +++
 source3/winbindd/winbindd_cache.c   |  125 +++-
 source3/winbindd/winbindd_proto.h   |1 +
 6 files changed, 723 insertions(+), 15 deletions(-)
 create mode 100644 docs-xml/manpages-3/idmap_autorid.8.xml
 create mode 100644 source3/winbindd/idmap_autorid.c


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/idmap_autorid.8.xml 
b/docs-xml/manpages-3/idmap_autorid.8.xml
new file mode 100644
index 000..38790ea
--- /dev/null
+++ b/docs-xml/manpages-3/idmap_autorid.8.xml
@@ -0,0 +1,134 @@
+
+http://www.samba.org/samba/DTD/samba-doc";>
+
+
+
+   idmap_autorid
+   8
+   Samba
+   System Administration tools
+   3.6
+
+
+
+
+   idmap_autorid
+   Samba's idmap_autorid Backend for Winbind
+
+
+
+   DESCRIPTION
+   The idmap_autorid backend provides a way to use an algorithmic
+   mapping scheme to map UIDs/GIDs and SIDs that is more deterministic
+   than idmap_tdb and easier to configure than idmap_rid.
+   The module works similar to idmap_rid, but it automatically
+   configures the range to be used for each domain, so there is no need
+   to specify a specific range for each domain in the forest, the only
+   configuration that is needed is the range of uid/gids that shall
+   be used for user/group mappings and an optional size of the ranges
+   to be used.
+   The mappings of which domain is mapped to which range is stored
+   in autorid.tdb, thus you should backup this database regularly.
+   Due to the algorithm being used, it is the module that is
+   most easy to use as it only requires a m

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

2010-11-08 Thread Jelmer Vernooij
On Mon, 2010-11-08 at 12:22 +0100, Matthias Dieter Wallnöfer wrote:
> @@ -1441,7 +1442,13 @@ static int py_ldb_contains(PyLdbObject *self, PyObject 
> *obj)
>  
>   talloc_free(result);
>  
> - return count;
> + if (count == 1) {
> + return 1;
> + } else if (count == 0) {
> + return 0;
> + }
> +
> + return -1;
>  }
>  
>  static PySequenceMethods py_ldb_seq = {
^^ This is wrong. This means we'll not set an exception and return -1 if
count is more than one.

As I've said earlier I think the risk of these fixes is higher than the
(purely theoretical) gain. 

Cheers,

Jelmer


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


[SCM] Samba Shared Repository - branch master updated

2010-11-08 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  58cfa5a s4:passwords.py - test empty password attributes behaviour
   via  0bfbf6d s4:password_hash LDB module - deleting password attributes 
is a little more complicated
   via  9154d4d s4:samdb_msg_find_old_and_new_ldb_val - rework
   via  6041ef7 s4:password_hash LDB module - clear the fact that a delete 
of password attributes isn't possible
   via  d4c9a34 s4:acl LDB module - define the delete passwords special 
case a bit better
   via  acffe25 s4:passwords.py - add another two failure cases
  from  9aa0ed2 ldb:pyldb.c - "py_ldb_msg_element_get" - here we can safely 
use "unsigned int" for the element reference

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


- Log -
commit 58cfa5a82519e2850cb400bb9f1e76d3dbfd3ff2
Author: Matthias Dieter Wallnöfer 
Date:   Mon Nov 1 19:54:07 2010 +0100

s4:passwords.py - test empty password attributes behaviour

Autobuild-User: Matthias Dieter Wallnöfer 
Autobuild-Date: Mon Nov  8 12:09:56 UTC 2010 on sn-devel-104

commit 0bfbf6d5264fb45d9b788a9dabad18826db1a875
Author: Matthias Dieter Wallnöfer 
Date:   Mon Nov 8 11:33:53 2010 +0100

s4:password_hash LDB module - deleting password attributes is a little more 
complicated

commit 9154d4dcfc142c0a549993f2e1083eb52a759213
Author: Matthias Dieter Wallnöfer 
Date:   Sun Nov 7 22:08:19 2010 +0100

s4:samdb_msg_find_old_and_new_ldb_val - rework

- don't crash when no values where specified
- return ERR_CONSTRAINT_VIOLATION on malformed messages
- only check for flags when we are involved in a LDB modify operation

commit 6041ef7442fda2f96c416d333f1dfc6dabd0d252
Author: Matthias Dieter Wallnöfer 
Date:   Mon Nov 8 11:31:16 2010 +0100

s4:password_hash LDB module - clear the fact that a delete of password 
attributes isn't possible

commit d4c9a34cf82abea5497dc2a8072ed2a67894e0ea
Author: Matthias Dieter Wallnöfer 
Date:   Sun Nov 7 22:37:39 2010 +0100

s4:acl LDB module - define the delete passwords special case a bit better

commit acffe258960c261903eefce630bbf02acbef1348
Author: Matthias Dieter Wallnöfer 
Date:   Sun Nov 7 22:35:29 2010 +0100

s4:passwords.py - add another two failure cases

---

Summary of changes:
 source4/dsdb/common/util.c |   33 -
 source4/dsdb/samdb/ldb_modules/acl.c   |7 +-
 source4/dsdb/samdb/ldb_modules/password_hash.c |   29 +++--
 source4/dsdb/tests/python/passwords.py |  176 +++-
 4 files changed, 224 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 3fa6774..79a4c14 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -709,12 +709,13 @@ struct ldb_message_element *samdb_find_attribute(struct 
ldb_context *ldb,
  * for entries). The latter (old value) has always specified
  * LDB_FLAG_MOD_DELETE.
  *
- * Returns LDB_ERR_NO_SUCH_ATTRIBUTE if the attribute which should be deleted
- * doesn't contain only one value (this is the Windows Server behaviour)
- * otherwise LDB_SUCCESS.
+ * Returns LDB_ERR_CONSTRAINT_VIOLATION and LDB_ERR_UNWILLING_TO_PERFORM if
+ * matching message elements are malformed in respect to the set/change rules.
+ * Otherwise it returns LDB_SUCCESS.
  */
 int samdb_msg_find_old_and_new_ldb_val(const struct ldb_message *msg,
   const char *name,
+  enum ldb_request_type operation,
   const struct ldb_val **new_val,
   const struct ldb_val **old_val)
 {
@@ -728,11 +729,31 @@ int samdb_msg_find_old_and_new_ldb_val(const struct 
ldb_message *msg,
}
 
for (i = 0; i < msg->num_elements; i++) {
-   if (ldb_attr_cmp(msg->elements[i].name, name) == 0) {
-   if (LDB_FLAG_MOD_TYPE(msg->elements[i].flags) == 
LDB_FLAG_MOD_DELETE) {
+   if (ldb_attr_cmp(msg->elements[i].name, name) != 0) {
+   continue;
+   }
+
+   if ((operation == LDB_MODIFY) &&
+   (LDB_FLAG_MOD_TYPE(msg->elements[i].flags) == 
LDB_FLAG_MOD_DELETE)) {
+   /* 0 values are allowed */
+   if (msg->elements[i].num_values == 1) {
*old_val = &msg->elements[i].values[0];
+   } else if (msg->elements[i].num_values > 1) {
+   return LDB_ERR_CONSTRAINT_VIOLATION;
+   }
+   } else if ((operation == LDB_MODIFY) &&
+  (LDB_FLAG_MOD_TYPE(msg->elements[i].flags) == 
LDB_FLAG_MOD_REPLACE)) {
+   if (msg->elements[i].num_values > 0) {
+  

[SCM] Samba Shared Repository - branch master updated

2010-11-08 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  9aa0ed2 ldb:pyldb.c - "py_ldb_msg_element_get" - here we can safely 
use "unsigned int" for the element reference
   via  ef4861d ldb:pyldb.c - "py_ldb_contains" - return only "0" not 
found, "1" found, "-1" error
   via  7bdbfc9 ldb:pyldb.c - most of the times "time_t" is defined as 
"long int"
   via  9e5ca72 ldb:pyldb.c - fix some "Py_ssize_t" output warnings
   via  f6572e5 ldb:pyldb.c - use "Py_ssize_t" for counting list entries
   via  084c11d ldb:pyldb.c - fix indentation
   via  af84b6d s4:pydsdb.c - use "Py_ssize_t" for Python list counters
   via  9f2d215 s4:pydsdb.c - introduce Python 2.4 compatibility defines
  from  4b97e7c s4:objectguid/repl_meta_data LDB module - deny "objectGUID" 
updates

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


- Log -
commit 9aa0ed2c3a74c6d72e42e4bc9e6077a50343fd38
Author: Matthias Dieter Wallnöfer 
Date:   Sat Nov 6 17:50:25 2010 +0100

ldb:pyldb.c - "py_ldb_msg_element_get" - here we can safely use "unsigned 
int" for the element reference

We don't make use of "Py_List*" calls

Autobuild-User: Matthias Dieter Wallnöfer 
Autobuild-Date: Mon Nov  8 11:21:27 UTC 2010 on sn-devel-104

commit ef4861d9263d1a17396c58abc7ad0c5837a1b52c
Author: Matthias Dieter Wallnöfer 
Date:   Sat Nov 6 17:49:18 2010 +0100

ldb:pyldb.c - "py_ldb_contains" - return only "0" not found, "1" found, 
"-1" error

commit 7bdbfc96037640dbd352e9ddab9c5e1ded9502fa
Author: Matthias Dieter Wallnöfer 
Date:   Sat Nov 6 16:29:27 2010 +0100

ldb:pyldb.c - most of the times "time_t" is defined as "long int"

Therefore use a signed long int for conversions.


http://stackoverflow.com/questions/471248/what-is-ultimately-a-time-t-typedef-to

commit 9e5ca72afbe74d88a1da33b6957b0914262f106c
Author: Matthias Dieter Wallnöfer 
Date:   Sat Nov 6 18:03:22 2010 +0100

ldb:pyldb.c - fix some "Py_ssize_t" output warnings

commit f6572e5ffc62ac41d3a180e0636129b40980f9dd
Author: Matthias Dieter Wallnöfer 
Date:   Sat Nov 6 17:48:39 2010 +0100

ldb:pyldb.c - use "Py_ssize_t" for counting list entries

This seems to be the most appopriate type

commit 084c11d600e61b3c1b4c36b8440c67b37731d16c
Author: Matthias Dieter Wallnöfer 
Date:   Sat Nov 6 16:29:06 2010 +0100

ldb:pyldb.c - fix indentation

commit af84b6d32514525a52e0b6529b36a53943fb7a7a
Author: Matthias Dieter Wallnöfer 
Date:   Sat Nov 6 16:28:33 2010 +0100

s4:pydsdb.c - use "Py_ssize_t" for Python list counters

Seems to be the most appropriate type

commit 9f2d21561b85edde541d7dbc69ee1fe58c029f81
Author: Matthias Dieter Wallnöfer 
Date:   Sat Nov 6 17:54:36 2010 +0100

s4:pydsdb.c - introduce Python 2.4 compatibility defines

---

Summary of changes:
 source4/dsdb/pydsdb.c   |   13 +-
 source4/lib/ldb/pyldb.c |   62 +-
 2 files changed, 46 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index db2185f..2471548 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -28,6 +28,17 @@
 #include "auth/kerberos/kerberos.h"
 #include "librpc/rpc/pyrpc_util.h"
 
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5
+typedef int Py_ssize_t;
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+#endif
+
+#ifndef Py_RETURN_NONE
+#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
+#endif
+
 /* FIXME: These should be in a header file somewhere, once we finish moving
  * away from SWIG .. */
 #define PyErr_LDB_OR_RAISE(py_ldb, ldb) \
@@ -319,7 +330,7 @@ static PyObject *py_dsdb_DsReplicaAttribute(PyObject *self, 
PyObject *args)
struct drsuapi_DsReplicaAttribute *attr;
TALLOC_CTX *tmp_ctx;
WERROR werr;
-   int i;
+   Py_ssize_t i;
 
if (!PyArg_ParseTuple(args, "OsO", &py_ldb, &ldap_display_name, 
&el_list)) {
return NULL;
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 7a6058f..acf8052 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -89,7 +89,7 @@ static PyObject *PyObject_FromLdbValue(struct ldb_context 
*ldb_ctx,
 static PyObject *PyLdbResult_FromResult(struct ldb_result *result)
 {
PyObject *ret;
-   int i;
+   Py_ssize_t i;
if (result == NULL) {
Py_RETURN_NONE;
} 
@@ -113,7 +113,7 @@ static struct ldb_result *PyLdbResult_AsResult(TALLOC_CTX 
*mem_ctx,

   PyObject *obj)
 {
struct ldb_result *res;
-   int i;
+   Py_ssize_t i;
 
if (obj == Py_None)
return NULL;
@@ -493,7 +493,7 @@ static const 

[SCM] Samba Shared Repository - branch master updated

2010-11-08 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  4b97e7c s4:objectguid/repl_meta_data LDB module - deny "objectGUID" 
updates
   via  8caf0ed s4:objectclass LDB module - no idea why we'd need the 
"objectGUID" here
   via  bb2eef5 s4:objectguid LDB module - make use of "dsdb_next_callback"
   via  e2efb09 s4:drsuapi RPC server - writespn.c - fix indentations
  from  b38a9a8 s4-drs: allow bypass of writespn checking for some SPNs

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


- Log -
commit 4b97e7c8f20b125015417bcf440128f843ac648f
Author: Matthias Dieter Wallnöfer 
Date:   Mon Nov 8 10:16:45 2010 +0100

s4:objectguid/repl_meta_data LDB module - deny "objectGUID" updates

Autobuild-User: Matthias Dieter Wallnöfer 
Autobuild-Date: Mon Nov  8 10:36:50 UTC 2010 on sn-devel-104

commit 8caf0ed90980d4118878f0cda10eba8004a8dd4d
Author: Matthias Dieter Wallnöfer 
Date:   Mon Nov 8 10:26:02 2010 +0100

s4:objectclass LDB module - no idea why we'd need the "objectGUID" here

commit bb2eef52950166bd50b7ea403097504faa5f720a
Author: Matthias Dieter Wallnöfer 
Date:   Mon Nov 8 10:31:49 2010 +0100

s4:objectguid LDB module - make use of "dsdb_next_callback"

commit e2efb098ab5be25f3546c830313218c3f0b7af6e
Author: Matthias Dieter Wallnöfer 
Date:   Mon Nov 8 09:58:59 2010 +0100

s4:drsuapi RPC server - writespn.c - fix indentations

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/objectclass.c|2 +-
 source4/dsdb/samdb/ldb_modules/objectguid.c |   42 +++
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |9 +
 source4/dsdb/samdb/ldb_modules/wscript_build|2 +-
 source4/dsdb/tests/python/ldap.py   |   12 ++
 source4/rpc_server/drsuapi/writespn.c   |   39 +
 6 files changed, 60 insertions(+), 46 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c 
b/source4/dsdb/samdb/ldb_modules/objectclass.c
index 9483d3e..6702b01 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -364,7 +364,7 @@ static int objectclass_add(struct ldb_module *module, 
struct ldb_request *req)
const struct ldb_val *val;
char *value;
int ret;
-   static const char * const parent_attrs[] = { "objectGUID", 
"objectClass", NULL };
+   static const char * const parent_attrs[] = { "objectClass", NULL };
 
ldb = ldb_module_get_ctx(module);
 
diff --git a/source4/dsdb/samdb/ldb_modules/objectguid.c 
b/source4/dsdb/samdb/ldb_modules/objectguid.c
index 623185f..bc3260c 100644
--- a/source4/dsdb/samdb/ldb_modules/objectguid.c
+++ b/source4/dsdb/samdb/ldb_modules/objectguid.c
@@ -32,6 +32,7 @@
 #include "includes.h"
 #include "ldb_module.h"
 #include "dsdb/samdb/samdb.h"
+#include "dsdb/samdb/ldb_modules/util.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "param/param.h"
 
@@ -97,32 +98,7 @@ struct og_context {
struct ldb_request *req;
 };
 
-static int og_op_callback(struct ldb_request *req, struct ldb_reply *ares)
-{
-   struct og_context *ac;
-
-   ac = talloc_get_type(req->context, struct og_context);
-
-   if (!ares) {
-   return ldb_module_done(ac->req, NULL, NULL,
-   LDB_ERR_OPERATIONS_ERROR);
-   }
-   if (ares->error != LDB_SUCCESS) {
-   return ldb_module_done(ac->req, ares->controls,
-   ares->response, ares->error);
-   }
-
-   if (ares->type != LDB_REPLY_DONE) {
-   talloc_free(ares);
-   return ldb_module_done(ac->req, NULL, NULL,
-   LDB_ERR_OPERATIONS_ERROR);
-   }
-
-   return ldb_module_done(ac->req, ares->controls,
-   ares->response, ares->error);
-}
-
-/* add_record: add objectGUID attribute */
+/* add_record: add objectGUID and timestamp attributes */
 static int objectguid_add(struct ldb_module *module, struct ldb_request *req)
 {
struct ldb_context *ldb;
@@ -192,7 +168,7 @@ static int objectguid_add(struct ldb_module *module, struct 
ldb_request *req)
ret = ldb_build_add_req(&down_req, ldb, ac,
msg,
req->controls,
-   ac, og_op_callback,
+   req, dsdb_next_callback,
req);
LDB_REQ_SET_LOCATION(down_req);
if (ret != LDB_SUCCESS) {
@@ -209,6 +185,7 @@ static int objectguid_modify(struct ldb_module *module, 
struct ldb_request *req)
struct ldb_context *ldb;
struct ldb_request *down_req;
struct ldb_message *msg;
+   struct ldb_message_element *el;
int ret;
ti

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

2010-11-08 Thread Matthieu Patou
The branch, master has been updated
   via  d3504da More debug
  from  fde3b84 Add convenience function for opening host database.

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


- Log -
commit d3504dad06933e70d42ffdcd440b0ccd0e9d7d0a
Author: Matthieu Patou 
Date:   Mon Nov 8 12:53:16 2010 +0300

More debug

---

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


Changeset truncated at 500 lines:

diff --git a/buildsamba02.fns b/buildsamba02.fns
index 62e965e..6ffcfe2 100644
--- a/buildsamba02.fns
+++ b/buildsamba02.fns
@@ -6,7 +6,7 @@ global_lock
 
 action_test() {
echo "PWD: "`pwd`
-   ls -lrtda ../../
+   ls -lrta ../../
case $tree in
samba_4*)
../buildtools/bin/waf test


-- 
build.samba.org


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

2010-11-08 Thread Jelmer Vernooij
The branch, master has been updated
   via  fde3b84 Add convenience function for opening host database.
  from  d520eea Add debug

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


- Log -
commit fde3b8486ac056ec125e4ce3e33d882aa6401f32
Author: Jelmer Vernooij 
Date:   Mon Nov 8 08:52:54 2010 +0100

Add convenience function for opening host database.

---

Summary of changes:
 admin.py  |7 +--
 buildfarm/__init__.py |   24 
 mail-dead-hosts.py|8 +---
 web/build.py  |3 ++-
 4 files changed, 36 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/admin.py b/admin.py
index 731876c..d94b572 100755
--- a/admin.py
+++ b/admin.py
@@ -17,7 +17,10 @@
 # along with this program.  If not, see .
 #
 
-from buildfarm import hostdb
+from buildfarm import (
+hostdb,
+open_hostdb,
+)
 import commands
 import os
 import smtplib
@@ -25,7 +28,7 @@ import sys
 import time
 from email.MIMEText import MIMEText
 
-db = hostdb.HostDatabase(os.path.join(os.path.dirname(__file__), 
"hostdb.sqlite"))
+db = open_hostdb()
 
 dry_run = False
 
diff --git a/buildfarm/__init__.py b/buildfarm/__init__.py
index 8b13789..e133cda 100644
--- a/buildfarm/__init__.py
+++ b/buildfarm/__init__.py
@@ -1 +1,25 @@
+#!/usr/bin/python
+# Simple database query script for the buildfarm
+#
+# Copyright (C) Jelmer Vernooij 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
+#   the Free Software Foundation; either version 2 of the License, or
+#   (at your option) any later version.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License
+#   along with this program; if not, write to the Free Software
+#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
+import os
+
+def open_hostdb():
+from buildfarm import hostdb
+return hostdb.HostDatabase(
+os.path.join(os.path.dirname(__file__), "..", "hostdb.sqlite"))
diff --git a/mail-dead-hosts.py b/mail-dead-hosts.py
index ca42a3b..725baa3 100755
--- a/mail-dead-hosts.py
+++ b/mail-dead-hosts.py
@@ -17,13 +17,15 @@
 # along with this program.  If not, see .
 #
 
-from buildfarm import hostdb
+from buildfarm import (
+hostdb,
+open_hostdb,
+)
 import smtplib
 from email.MIMEText import MIMEText
-import os
 import time
 
-db = hostdb.HostDatabase(os.path.join(os.path.dirname(__file__), 
"hostdb.sqlite"))
+db = open_hostdb()
 dry_run = False
 
 hosts = db.dead_hosts(7 * 86400)
diff --git a/web/build.py b/web/build.py
index 93c6086..b63061b 100755
--- a/web/build.py
+++ b/web/build.py
@@ -33,6 +33,7 @@ from buildfarm import (
 data,
 history,
 hostdb,
+open_hostdb,
 util,
 )
 
@@ -47,7 +48,7 @@ basedir = os.path.abspath(os.path.join(webdir, ".."))
 
 db = data.BuildResultStore(basedir)
 history = history.History(db)
-hostsdb = hostdb.HostDatabase(os.path.join(os.path.dirname(__file__), "..", 
"hostdb.sqlite"))
+hostsdb = open_hostdb()
 
 compilers = db.compilers
 hosts = dict([(host.name, host) for host in hostsdb.hosts()])


-- 
build.samba.org


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

2010-11-08 Thread Jelmer Vernooij
Hi Tridge,

On Mon, 2010-11-08 at 06:29 +0100, Andrew Tridgell wrote:
> - Log -
> commit 7bd5d402081bd7cd4cfeb2641bf011ad68be6443
> Author: Andrew Tridgell 
> Date:   Mon Nov 8 15:46:09 2010 +1100
> 
> s4-ldb: don't give an error if a module is already registered
> 
> this can happen when both the build and install paths are used to load
> ldb modules
> 
> Autobuild-User: Andrew Tridgell 
> Autobuild-Date: Mon Nov  8 05:28:14 UTC 2010 on sn-devel-104
If there are two modules available and since we can only use one, how do
we know we pick the right one? Would it perhaps make sense to warn
(rather than error out) if a module was already loaded?

I'm also curious why this is an issue in this particular situation, why
are install path modules being loaded at all?

Cheers,

Jelmer



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


[SCM] Samba Shared Repository - branch master updated

2010-11-08 Thread Andrew Tridgell
The branch, master has been updated
   via  b38a9a8 s4-drs: allow bypass of writespn checking for some SPNs
  from  cb3d6c4 heimdal Add clock-skew handling to DCE-style GSSAPI

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


- Log -
commit b38a9a849733e98be52fafd1b3a7a2317116
Author: Andrew Tridgell 
Date:   Mon Nov 8 19:01:36 2010 +1100

s4-drs: allow bypass of writespn checking for some SPNs

this allows accounts (and in particular RODCs) to make SPN updates on
their own account if they take the form SERVICE/hostname

we may be able to remove this in the future after some changes in our
ACL checking for userPrincipalName

Pair-Programmed-With: Andrew Bartlett 

Autobuild-User: Andrew Tridgell 
Autobuild-Date: Mon Nov  8 08:45:16 UTC 2010 on sn-devel-104

---

Summary of changes:
 source4/rpc_server/drsuapi/writespn.c |  112 -
 1 files changed, 111 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/drsuapi/writespn.c 
b/source4/rpc_server/drsuapi/writespn.c
index 2e7bd76..d9338f7 100644
--- a/source4/rpc_server/drsuapi/writespn.c
+++ b/source4/rpc_server/drsuapi/writespn.c
@@ -25,6 +25,106 @@
 #include "dsdb/samdb/samdb.h"
 #include "dsdb/common/util.h"
 #include "rpc_server/drsuapi/dcesrv_drsuapi.h"
+#include "system/kerberos.h"
+#include "auth/kerberos/kerberos.h"
+#include "libcli/security/session.h"
+#include "libcli/security/security.h"
+#include "auth/session.h"
+
+/*
+  check that the SPN update should be allowed as an override
+  via sam_ctx_system
+
+  This is only called if the client is not a domain controller or
+  administrator
+ */
+static bool writespn_check_spn(struct drsuapi_bind_state *b_state,
+  struct dcesrv_call_state *dce_call,
+  struct ldb_dn *dn,
+  const char *spn)
+{
+   /*
+ we only allow SPN updates if:
+
+1) they are on the clients own account object
+   2) they are of the form SERVICE/dnshostname
+*/
+   struct dom_sid *user_sid, *sid;
+   TALLOC_CTX *tmp_ctx = talloc_new(dce_call);
+   struct ldb_result *res;
+   const char *attrs[] = { "objectSID", "dnsHostName", NULL };
+   int ret;
+   krb5_context krb_ctx;
+   krb5_error_code kerr;
+   krb5_principal principal;
+   const char *dns_name, *dnsHostName;
+
+   /*
+ get the objectSid of the DN that is being modified, and
+ check it matches the user_sid in their token
+*/
+
+   ret = dsdb_search_dn(b_state->sam_ctx, tmp_ctx, &res, dn, attrs, 
DSDB_SEARCH_ONE_ONLY);
+   if (ret != LDB_SUCCESS) {
+   talloc_free(tmp_ctx);
+   return false;
+   }
+
+   user_sid = 
&dce_call->conn->auth_state.session_info->security_token->sids[PRIMARY_USER_SID_INDEX];
+   sid = samdb_result_dom_sid(tmp_ctx, res->msgs[0], "objectSid");
+   if (sid == NULL) {
+   talloc_free(tmp_ctx);
+   return false;
+   }
+
+   dnsHostName = ldb_msg_find_attr_as_string(res->msgs[0], "dnsHostName", 
NULL);
+   if (dnsHostName == NULL) {
+   talloc_free(tmp_ctx);
+   return false;
+   }
+
+   if (!dom_sid_equal(sid, user_sid)) {
+   talloc_free(tmp_ctx);
+   return false;
+   }
+
+   kerr = smb_krb5_init_context_basic(tmp_ctx, 
dce_call->conn->dce_ctx->lp_ctx, &krb_ctx);
+   if (kerr != 0) {
+   talloc_free(tmp_ctx);
+   return false;
+   }
+
+   ret = krb5_parse_name_flags(krb_ctx, spn, 
KRB5_PRINCIPAL_PARSE_NO_REALM, &principal);
+   if (kerr != 0) {
+   krb5_free_context(krb_ctx);
+   talloc_free(tmp_ctx);
+   return false;
+   }
+
+   if (principal->name.name_string.len != 2) {
+   krb5_free_principal(krb_ctx, principal);
+   krb5_free_context(krb_ctx);
+   talloc_free(tmp_ctx);
+   return false;
+   }
+
+   dns_name = principal->name.name_string.val[1];
+
+   if (strcasecmp(dns_name, dnsHostName) != 0) {
+   krb5_free_principal(krb_ctx, principal);
+   krb5_free_context(krb_ctx);
+   talloc_free(tmp_ctx);
+   return false;
+   }
+
+   /* its a simple update on their own account - allow it with
+* permissions override */
+   krb5_free_principal(krb_ctx, principal);
+   krb5_free_context(krb_ctx);
+   talloc_free(tmp_ctx);
+
+   return true;
+}
 
 /*
   drsuapi_DsWriteAccountSpn
@@ -34,6 +134,7 @@ WERROR dcesrv_drsuapi_DsWriteAccountSpn(struct 
dcesrv_call_state *dce_call, TALL
 {
struct drsuapi_bind_state *b_state;
s