Ignore:
Timestamp:
May 27, 2009, 11:59:40 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/passdb/pdb_tdb.c

    r233 r234  
    881881        }
    882882
     883        /* be sure to close the DBs _before_ renaming the file */
     884
     885        TALLOC_FREE(orig_db);
     886        TALLOC_FREE(tmp_db);
     887
    883888        /* This is safe from other users as we know we're
    884889         * under a mutex here. */
     
    893898
    894899        TALLOC_FREE(frame);
    895         TALLOC_FREE(orig_db);
     900
     901        /* re-open the converted TDB */
     902
     903        orig_db = db_open_trans(NULL, dbname, 0,
     904                                TDB_DEFAULT, O_CREAT|O_RDWR, 0600);
     905        if (orig_db == NULL) {
     906                DEBUG(0, ("tdbsam_convert_backup: Failed to re-open "
     907                          "converted passdb TDB [%s]\n", dbname));
     908                return false;
     909        }
    896910
    897911        DEBUG(1, ("tdbsam_convert_backup: updated %s file.\n",
     
    899913
    900914        /* Replace the global db pointer. */
    901         *pp_db = tmp_db;
     915        *pp_db = orig_db;
    902916        return true;
    903917
Note: See TracChangeset for help on using the changeset viewer.