svn commit: samba r22946 - in branches/SAMBA_3_0_26/source: .
include nsswitch
metze at samba.org
metze at samba.org
Wed May 16 15:39:09 GMT 2007
Author: metze
Date: 2007-05-16 15:39:08 +0000 (Wed, 16 May 2007)
New Revision: 22946
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22946
Log:
remove reference to backup_tdb()
metze
Modified:
branches/SAMBA_3_0_26/source/Makefile.in
branches/SAMBA_3_0_26/source/include/includes.h
branches/SAMBA_3_0_26/source/nsswitch/idmap_tdb.c
Changeset:
Modified: branches/SAMBA_3_0_26/source/Makefile.in
===================================================================
--- branches/SAMBA_3_0_26/source/Makefile.in 2007-05-16 14:54:54 UTC (rev 22945)
+++ branches/SAMBA_3_0_26/source/Makefile.in 2007-05-16 15:39:08 UTC (rev 22946)
@@ -199,7 +199,7 @@
lib/tdb/common/freelist.o lib/tdb/common/freelistcheck.o lib/tdb/common/io.o lib/tdb/common/lock.o \
lib/tdb/common/open.o lib/tdb/common/transaction.o lib/tdb/common/traverse.o
-TDB_OBJ = $(TDBBASE_OBJ) lib/util_tdb.o lib/tdb/common/tdbback.o \
+TDB_OBJ = $(TDBBASE_OBJ) lib/util_tdb.o \
lib/dbwrap.o lib/dbwrap_tdb.o
SMBLDAP_OBJ = @SMBLDAP@ @SMBLDAPUTIL@
@@ -813,7 +813,7 @@
INIPARSER_OBJ = iniparser/src/iniparser.o iniparser/src/dictionary.o \
iniparser/src/strlib.o
-TDBBACKUP_OBJ = lib/tdb/tools/tdbbackup.o lib/tdb/common/tdbback.o $(LIBREPLACE_OBJ) \
+TDBBACKUP_OBJ = lib/tdb/tools/tdbbackup.o $(LIBREPLACE_OBJ) \
$(TDBBASE_OBJ) $(SOCKET_WRAPPER_OBJ)
TDBTOOL_OBJ = lib/tdb/tools/tdbtool.o $(TDBBASE_OBJ) $(LIBREPLACE_OBJ) \
Modified: branches/SAMBA_3_0_26/source/include/includes.h
===================================================================
--- branches/SAMBA_3_0_26/source/include/includes.h 2007-05-16 14:54:54 UTC (rev 22945)
+++ branches/SAMBA_3_0_26/source/include/includes.h 2007-05-16 15:39:08 UTC (rev 22946)
@@ -635,7 +635,6 @@
#include "dlinklist.h"
#include "tdb.h"
#include "util_tdb.h"
-#include "tdbback.h"
#include "lib/talloc/talloc.h"
/* And a little extension. Abort on type mismatch */
Modified: branches/SAMBA_3_0_26/source/nsswitch/idmap_tdb.c
===================================================================
--- branches/SAMBA_3_0_26/source/nsswitch/idmap_tdb.c 2007-05-16 14:54:54 UTC (rev 22945)
+++ branches/SAMBA_3_0_26/source/nsswitch/idmap_tdb.c 2007-05-16 15:39:08 UTC (rev 22946)
@@ -115,13 +115,15 @@
Convert the idmap database from an older version.
*****************************************************************************/
-static BOOL idmap_tdb_convert(const char *idmap_name)
+static BOOL idmap_tdb_upgrade(const char *idmap_name)
{
int32 vers;
BOOL bigendianheader;
BOOL failed = False;
TDB_CONTEXT *idmap_tdb;
+ DEBUG(0, ("Upgrading winbindd_idmap.tdb from an old version\n"));
+
if (!(idmap_tdb = tdb_open_log(idmap_name, 0,
TDB_DEFAULT, O_RDWR,
0600))) {
@@ -189,32 +191,6 @@
return True;
}
-/*****************************************************************************
- Convert the idmap database from an older version if necessary
-*****************************************************************************/
-
-BOOL idmap_tdb_upgrade(TALLOC_CTX *ctx, const char *tdbfile)
-{
- char *backup_name;
-
- DEBUG(0, ("Upgrading winbindd_idmap.tdb from an old version\n"));
-
- backup_name = talloc_asprintf(ctx, "%s.bak", tdbfile);
- if ( ! backup_name) {
- DEBUG(0, ("Out of memory!\n"));
- return False;
- }
-
- if (backup_tdb(tdbfile, backup_name, 0) != 0) {
- DEBUG(0, ("Could not backup idmap database\n"));
- talloc_free(backup_name);
- return False;
- }
-
- talloc_free(backup_name);
- return idmap_tdb_convert(tdbfile);
-}
-
/* WARNING: We can't open a tdb twice inthe same process, for that reason
* I'm going to use a hack with open ref counts to open the winbindd_idmap.tdb
* only once. We will later decide whether to split the db in multiple files
@@ -282,7 +258,7 @@
/* backup_tdb expects the tdb not to be open */
tdb_close(idmap_tdb_common_ctx);
- if ( ! idmap_tdb_upgrade(ctx, tdbfile)) {
+ if ( ! idmap_tdb_upgrade(tdbfile)) {
DEBUG(0, ("Unable to open idmap database, it's in an old formati, and upgrade failed!\n"));
ret = NT_STATUS_INTERNAL_DB_ERROR;
More information about the samba-cvs
mailing list