[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Fri Feb 21 09:59:04 MST 2014


The branch, master has been updated
       via  293aac0 testprogs: Fix pkinit test with system ldb.
       via  069015b testprogs: Fix kinit test with system ldb.
       via  f26db53 nsswitch: Fix idmap rfc2307 test with system ldb.
       via  153dfc5 selftest: Use the absolute path to the ldb modules.
       via  d871a31 heimdal: Use krb5_free_default_realm() for free()
       via  58e7e56 kdc: Free the resource which is not used anymore
       via  66fb0ce s3:winbindd: avoid directly asking a trusted domain in wb_lookupsids*()
       via  3413e64 s3:winbindd: fix _wbint_LookupSids() on error
      from  33f10d0 s3:smbd: avoid invalid lock_order panic triggered by "CTDB_SRVID_RELEASE_IP"

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


- Log -----------------------------------------------------------------
commit 293aac0508d64551f549512d622e04ed22f297f6
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 21 15:55:22 2014 +0100

    testprogs: Fix pkinit test with system ldb.
    
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Fri Feb 21 17:58:24 CET 2014 on sn-devel-104

commit 069015bee917aa45a0e99194d767582df01ce24f
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 21 15:52:42 2014 +0100

    testprogs: Fix kinit test with system ldb.
    
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit f26db53273a8f97267982af9799c26b49ef5b216
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 21 15:37:52 2014 +0100

    nsswitch: Fix idmap rfc2307 test with system ldb.
    
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit 153dfc514c5885e52f11852b25dd018fc1160067
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 21 14:23:00 2014 +0100

    selftest: Use the absolute path to the ldb modules.
    
    This fixes 'make test' on Fedora with external ldb.
    
    Reviewed-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit d871a31e61e1e0156644cc19cd636452ccbbe20b
Author: Santosh Kumar Pradhan <spradhan at redhat.com>
Date:   Fri Feb 21 09:48:31 2014 +0530

    heimdal: Use krb5_free_default_realm() for free()
    
    The resource allocated by krb5_default_default_realm() should be
    free()'d by krb5_free_default_realm() instead of plain free()
    for better readability.
    
    Signed-off-by: Santosh Kumar Pradhan <spradhan at redhat.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 58e7e564d7c81dc1b1084174957568396233a743
Author: Santosh Kumar Pradhan <spradhan at redhat.com>
Date:   Fri Feb 21 09:43:47 2014 +0530

    kdc: Free the resource which is not used anymore
    
    In samba_kdc_firstkey() routine, krb5_get_default_realm() allocates
    memory for "realm" but never used afterwards. Free() the leaked memory.
    
    CID: 1107223
    
    Signed-off-by: Santosh Kumar Pradhan <spradhan at redhat.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 66fb0ce9557553a4c01607b517e65ac4c93841d0
Author: Gregor Beck <gbeck at sernet.de>
Date:   Thu Feb 20 11:25:53 2014 +0100

    s3:winbindd: avoid directly asking a trusted domain in wb_lookupsids*()
    
    As a domain member we should always use a DC of our own domain.
    
    It would be possible to pass all sids in one single dcerpc_wbint_LookupSids()
    call. For now we just fix bug.
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10458
    Signed-off-by: Gregor Beck <gbeck at sernet.de>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 3413e64149702136429d7b5acaa7a52c49abf564
Author: Gregor Beck <gbeck at sernet.de>
Date:   Thu Feb 20 13:14:31 2014 +0100

    s3:winbindd: fix _wbint_LookupSids() on error
    
    We need to make sure that r->out.domains remains valid,
    otherwise we're not able to marshall the response.
    
    Note that wbint_LookupSids() has [out,ref] lsa_RefDomainList *domains,
    while lsa_LookupSids() has [out,ref] lsa_RefDomainList **domains.
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10458
    Signed-off-by: Gregor Beck <gbeck at sernet.de>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 nsswitch/tests/test_idmap_rfc2307.sh |   13 +++++++++++--
 selftest/wscript                     |    2 +-
 source3/winbindd/wb_lookupsids.c     |    2 +-
 source3/winbindd/winbindd_dual_srv.c |    8 +++++++-
 source4/heimdal/lib/krb5/principal.c |    6 +++---
 source4/kdc/db-glue.c                |    1 +
 testprogs/blackbox/test_kinit.sh     |   12 ++++++++++--
 testprogs/blackbox/test_pkinit.sh    |   12 ++++++++++--
 8 files changed, 44 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/tests/test_idmap_rfc2307.sh b/nsswitch/tests/test_idmap_rfc2307.sh
index b9efd34..d3087a1 100755
--- a/nsswitch/tests/test_idmap_rfc2307.sh
+++ b/nsswitch/tests/test_idmap_rfc2307.sh
@@ -18,8 +18,17 @@ DC_PASSWORD="$9"
 echo called with: $1 $2 $3 $4 $5 $6 $7 $8 $9
 
 wbinfo="$VALGRIND $BINDIR/wbinfo"
-ldbadd="$BINDIR/ldbadd"
-ldbdel="$BINDIR/ldbdel"
+
+ldbadd="ldbadd"
+if [ -x "$BINDIR/ldbadd" ]; then
+	ldbadd="$BINDIR/ldbadd"
+fi
+
+ldbdel="ldbdel"
+if [ -x "$BINDIR/ldbdel" ]; then
+	ldbdel="$BINDIR/ldbdel"
+fi
+
 failed=0
 
 . `dirname $0`/../../testprogs/blackbox/subunit.sh
diff --git a/selftest/wscript b/selftest/wscript
index 3c5457f..ad77e91 100644
--- a/selftest/wscript
+++ b/selftest/wscript
@@ -179,7 +179,7 @@ def cmd_testonly(opt):
     # if we are using a system version of ldb then we need to tell it to
     # load modules from our modules path
     if env.USING_SYSTEM_LDB:
-        os.environ['LDB_MODULES_PATH'] = 'bin/modules/ldb'
+        os.environ['LDB_MODULES_PATH'] = os.path.abspath(os.path.join(env.cwd, 'bin/modules/ldb'))
 
     # tell build system where to find config.h
     os.environ['CONFIG_H'] = 'bin/default/include/config.h'
diff --git a/source3/winbindd/wb_lookupsids.c b/source3/winbindd/wb_lookupsids.c
index e10d511..b474220 100644
--- a/source3/winbindd/wb_lookupsids.c
+++ b/source3/winbindd/wb_lookupsids.c
@@ -320,7 +320,7 @@ static struct wb_lookupsids_domain *wb_lookupsids_get_domain(
 		}
 	}
 
-	wb_domain = find_domain_from_sid_noinit(sid);
+	wb_domain = find_lookup_domain_from_sid(sid);
 	if (wb_domain == NULL) {
 		return NULL;
 	}
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index 851c2c7..f064467 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -74,6 +74,7 @@ NTSTATUS _wbint_LookupSid(struct pipes_struct *p, struct wbint_LookupSid *r)
 NTSTATUS _wbint_LookupSids(struct pipes_struct *p, struct wbint_LookupSids *r)
 {
 	struct winbindd_domain *domain = wb_child_domain();
+	struct lsa_RefDomainList *domains = r->out.domains;
 	NTSTATUS status;
 
 	if (domain == NULL) {
@@ -87,7 +88,12 @@ NTSTATUS _wbint_LookupSids(struct pipes_struct *p, struct wbint_LookupSids *r)
 	 * done at the wbint RPC layer.
 	 */
 	status = rpc_lookup_sids(p->mem_ctx, domain, r->in.sids,
-				 &r->out.domains, &r->out.names);
+				 &domains, &r->out.names);
+
+	if (domains != NULL) {
+		r->out.domains = domains;
+	}
+
 	reset_cm_connection_on_error(domain, status);
 	return status;
 }
diff --git a/source4/heimdal/lib/krb5/principal.c b/source4/heimdal/lib/krb5/principal.c
index a10d2d0..2b654ec 100644
--- a/source4/heimdal/lib/krb5/principal.c
+++ b/source4/heimdal/lib/krb5/principal.c
@@ -367,7 +367,7 @@ exit:
 	free(comp[--n]);
     }
     free(comp);
-    free(realm);
+    krb5_free_default_realm(context, realm);
     free(s);
     return ret;
 }
@@ -457,7 +457,7 @@ unparse_name_fixed(krb5_context context,
 	    return ret;
 	if(strcmp(princ_realm(principal), r) != 0)
 	    short_form = 0;
-	free(r);
+	krb5_free_default_realm(context, r);
     }
     if(!short_form && !no_realm) {
 	add_char(name, idx, len, '@');
@@ -740,7 +740,7 @@ krb5_make_principal(krb5_context context,
     ret = krb5_build_principal_va(context, principal, strlen(realm), realm, ap);
     va_end(ap);
     if(r)
-	free(r);
+	krb5_free_default_realm(context, r);
     return ret;
 }
 
diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c
index ab606e8..f971d9b 100644
--- a/source4/kdc/db-glue.c
+++ b/source4/kdc/db-glue.c
@@ -1560,6 +1560,7 @@ krb5_error_code samba_kdc_firstkey(krb5_context context,
 		TALLOC_FREE(priv);
 		return ret;
 	}
+	krb5_free_default_realm(context, realm);
 
 	lret = dsdb_search(ldb_ctx, priv, &res,
 			   priv->realm_dn, LDB_SCOPE_SUBTREE, user_attrs,
diff --git a/testprogs/blackbox/test_kinit.sh b/testprogs/blackbox/test_kinit.sh
index 3a74189..adfed78 100755
--- a/testprogs/blackbox/test_kinit.sh
+++ b/testprogs/blackbox/test_kinit.sh
@@ -25,13 +25,21 @@ samba4bindir="$BINDIR"
 samba4srcdir="$SRCDIR/source4"
 samba4kinit="$samba4bindir/samba4kinit"
 samba_tool="$samba4bindir/samba-tool"
-ldbmodify="$samba4bindir/ldbmodify"
-ldbsearch="$samba4bindir/ldbsearch"
 rkpty="$samba4bindir/rkpty"
 samba4kpasswd="$samba4bindir/samba4kpasswd"
 enableaccount="$samba_tool user enable"
 machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache"
 
+ldbmodify="ldbmodify"
+if [ -x "$samba4bindir/ldbmodify" ]; then
+	ldbmodify="$samba4bindir/ldbmodify"
+fi
+
+ldbsearch="ldbsearch"
+if [ -x "$samba4bindir/ldbsearch" ]; then
+	ldbsearch="$samba4bindir/ldbsearch"
+fi
+
 . `dirname $0`/subunit.sh
 
 test_smbclient() {
diff --git a/testprogs/blackbox/test_pkinit.sh b/testprogs/blackbox/test_pkinit.sh
index 926545a..8fab261 100755
--- a/testprogs/blackbox/test_pkinit.sh
+++ b/testprogs/blackbox/test_pkinit.sh
@@ -25,13 +25,21 @@ samba4bindir="$BINDIR"
 samba4srcdir="$SRCDIR/source4"
 samba4kinit="$samba4bindir/samba4kinit"
 samba_tool="$samba4bindir/samba-tool"
-ldbmodify="$samba4bindir/ldbmodify"
-ldbsearch="$samba4bindir/ldbsearch"
 rkpty="$samba4bindir/rkpty"
 samba4kpasswd="$samba4bindir/samba4kpasswd"
 enableaccount="$samba_tool user enable"
 machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache"
 
+ldbmodify="ldbmodify"
+if [ -x "$samba4bindir/ldbmodify" ]; then
+	ldbmodify="$samba4bindir/ldbmodify"
+fi
+
+ldbsearch="ldbsearch"
+if [ -x "$samba4bindir/ldbsearch" ]; then
+	ldbsearch="$samba4bindir/ldbsearch"
+fi
+
 . `dirname $0`/subunit.sh
 
 test_smbclient() {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list