The branch, master has been updated
       via  0d4fc19 s3: Fix a crash in group_mapping.ldb->tdb conversion
      from  0e52606 s4:torture/ldap/cldap.c - remove the 
"test_cldap_netlogon_flag_ds_dns_forest" test

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


- Log -----------------------------------------------------------------
commit 0d4fc19ac764bc1b5b316867b50f7bc33cef9f9b
Author: Volker Lendecke <[email protected]>
Date:   Mon Nov 28 10:44:42 2011 +0100

    s3: Fix a crash in group_mapping.ldb->tdb conversion
    
    When we find a group_mapping.ldb entry without a comment, the upgrade code
    would have crashed with a NULL dereference
    
    Autobuild-User: Volker Lendecke <[email protected]>
    Autobuild-Date: Mon Nov 28 12:24:08 CET 2011 on sn-devel-104

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

Summary of changes:
 source3/groupdb/mapping_tdb.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c
index 394a2f0..1dea9e4 100644
--- a/source3/groupdb/mapping_tdb.c
+++ b/source3/groupdb/mapping_tdb.c
@@ -1006,6 +1006,19 @@ static int convert_ldb_record(TDB_CONTEXT *ltdb, 
TDB_DATA key,
                TALLOC_FREE(name);
        }
 
+       if (map->nt_name == NULL) {
+               errno = EIO;
+               goto failed;
+       }
+
+       if (map->comment == NULL) {
+               map->comment = talloc_strdup(map, "");
+       }
+       if (map->comment == NULL) {
+               errno = ENOMEM;
+               goto failed;
+       }
+
        if (!add_mapping_entry(map, 0)) {
                errno = EIO;
                goto failed;


-- 
Samba Shared Repository

Reply via email to