[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Mon Aug 25 17:31:04 MDT 2014


The branch, master has been updated
       via  e914c2c smbd: Properly initialize mangle_hash
       via  7f44432 passdb: fix NT_STATUS_NO_SUCH_GROUP
      from  6174bfa Don't discard result of checking grouptype

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


- Log -----------------------------------------------------------------
commit e914c2c52db7ecf3bb2a3860820c5cfe8812696e
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 19 14:32:15 2014 +0000

    smbd: Properly initialize mangle_hash
    
    [Bug 10782] mangle_hash() can fail to initialize charset (smbd crash).
    
    https://bugzilla.samba.org/show_bug.cgi?id=10782
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Aug 26 01:30:38 CEST 2014 on sn-devel-104

commit 7f44432fb0b17c1c7cdda3d56c2cc132d25d9397
Author: Arvid Requate <requate at univention.de>
Date:   Thu Jan 17 16:44:28 2013 +0100

    passdb: fix NT_STATUS_NO_SUCH_GROUP
    
    Share options like "force group" and "valid users = @group1"
    triggered a NT_STATUS_NO_SUCH_GROUP. While the group was found in
    the SAM backend, its objectclass was not retrived.
    
    This fix also revealed a talloc access after free in the group
    branch of pdb_samba_dsdb_getgrfilter.
    
    [Bug 9570] Access failure for shares with "force group" or "valid users = @group"
    
    https://bugzilla.samba.org/show_bug.cgi?id=9570
    
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 source3/passdb/pdb_samba_dsdb.c |    4 ++--
 source3/smbd/mangle_hash.c      |    4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/pdb_samba_dsdb.c b/source3/passdb/pdb_samba_dsdb.c
index 87320e8..7d7bd8d 100644
--- a/source3/passdb/pdb_samba_dsdb.c
+++ b/source3/passdb/pdb_samba_dsdb.c
@@ -885,7 +885,7 @@ static NTSTATUS pdb_samba_dsdb_getgrfilter(struct pdb_methods *m, GROUP_MAP *map
 {
 	struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
 		m->private_data, struct pdb_samba_dsdb_state);
-	const char *attrs[] = { "objectSid", "description", "samAccountName", "groupType",
+	const char *attrs[] = { "objectClass", "objectSid", "description", "samAccountName", "groupType",
 				NULL };
 	struct ldb_message *msg;
 	va_list ap;
@@ -950,7 +950,7 @@ static NTSTATUS pdb_samba_dsdb_getgrfilter(struct pdb_methods *m, GROUP_MAP *map
 		id_maps[1] = NULL;
 
 		status = idmap_sids_to_xids(state->idmap_ctx, tmp_ctx, id_maps);
-		talloc_free(tmp_ctx);
+
 		if (!NT_STATUS_IS_OK(status)) {
 			talloc_free(tmp_ctx);
 			return status;
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c
index 994f79f..5daac62 100644
--- a/source3/smbd/mangle_hash.c
+++ b/source3/smbd/mangle_hash.c
@@ -767,6 +767,10 @@ const struct mangle_fns *mangle_hash_init(void)
 {
 	mangle_reset();
 
+	if (chartest == NULL) {
+		init_chartest();
+	}
+
 	/* Create the in-memory tdb using our custom hash function. */
 	tdb_mangled_cache = tdb_open_ex("mangled_cache", 1031, TDB_INTERNAL,
 				(O_RDWR|O_CREAT), 0644, NULL, fast_string_hash);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list