summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-07-16 10:02:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:13 -0500
commitb2701e8c726c55becb47498b48cb8619eb48a82b (patch)
tree95c51b222fc81e9238ce23399df1fffe21825e0f
parentf7463e1bcd956305efe187b958bbd479cca4a820 (diff)
downloadsamba-b2701e8c726c55becb47498b48cb8619eb48a82b.tar.gz
samba-b2701e8c726c55becb47498b48cb8619eb48a82b.tar.bz2
samba-b2701e8c726c55becb47498b48cb8619eb48a82b.zip
r1531: smbd/tdbutil.c isn't used anymore. Bug 1443 is suspected to be a tdb
corruption problem, and smbd_log_tdb happily destoyed the evidence .... Volker (This used to be commit 359b9dcffeb66146c5405f8022d5d4e4a833aa51)
-rw-r--r--source3/Makefile.in2
-rw-r--r--source3/smbd/tdbutil.c85
2 files changed, 1 insertions, 86 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 398ad4e0e3..58c8a7895d 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -307,7 +307,7 @@ RPC_PARSE_OBJ = rpc_parse/parse_lsa.o rpc_parse/parse_net.o \
RPC_CLIENT_OBJ = rpc_client/cli_pipe.o
-LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o smbd/tdbutil.o
+LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o
PASSDB_GET_SET_OBJ = passdb/pdb_get_set.o
diff --git a/source3/smbd/tdbutil.c b/source3/smbd/tdbutil.c
deleted file mode 100644
index cafcde2037..0000000000
--- a/source3/smbd/tdbutil.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- Main SMB server routines
- Copyright (C) Jeremy Allison 2003
- Copyright (C) Gerald (Jerry) Carter 2004
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include "includes.h"
-
-
-/**********************************************************************
- logging function used by smbd to detect and remove corrupted tdb's
-**********************************************************************/
-
-void smbd_tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...)
-{
- va_list ap;
- char *ptr = NULL;
- BOOL decrement_smbd_count;
-
- va_start(ap, format);
- vasprintf(&ptr, format, ap);
- va_end(ap);
-
- if (!ptr || !*ptr)
- return;
-
- DEBUG(level, ("tdb(%s): %s", tdb->name ? tdb->name : "unnamed", ptr));
-
- if (tdb->ecode == TDB_ERR_CORRUPT) {
- int ret;
-
- DEBUG(0,("tdb_log: TDB %s is corrupt. Removing file and stopping this process.\n",
- tdb->name ));
-
- become_root();
- ret = unlink(tdb->name);
- if ( ret ) {
- DEBUG(0,("ERROR: %s\n", strerror(errno)));
- }
- unbecome_root();
-
-
- /* if its not connections.tdb, then make sure we decrement the
- smbd count. If connections.tdb is bad, there's nothing we
- can do and everything will eventually shut down or clean
- up anyways */
-
- if ( strcmp(tdb->name, lock_path("connections.tdb")) == 0 )
- decrement_smbd_count = False;
- else
- decrement_smbd_count = True;
-
- /* now die */
-
- smb_panic2("corrupt tdb\n", decrement_smbd_count );
- }
-
- if (tdb->ecode == TDB_ERR_IO)
- {
- if ( strcmp(tdb->name, lock_path("connections.tdb")) == 0 )
- decrement_smbd_count = False;
- else
- decrement_smbd_count = True;
-
- smb_panic2( "i/o error on tdb.\n", decrement_smbd_count );
- }
-
- SAFE_FREE(ptr);
-}
-