From 30d707b8ae4c53140e0215090f7a3c8936ab2b47 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 12 Feb 2004 05:59:03 +0000 Subject: tdbsam & smb_panic merge from 3.0 (initial tests are ok but I'll setup a HEAD PDC tomorrow) (This used to be commit c57b24ee49aee0f0687742da7f8d741c62f6effe) --- source3/lib/dummysmbd.c | 29 +++++++++++++++++++++++++++++ source3/lib/util.c | 14 +++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 source3/lib/dummysmbd.c (limited to 'source3/lib') diff --git a/source3/lib/dummysmbd.c b/source3/lib/dummysmbd.c new file mode 100644 index 0000000000..17bc321774 --- /dev/null +++ b/source3/lib/dummysmbd.c @@ -0,0 +1,29 @@ +/* + Unix SMB/CIFS implementation. + RPC pipe client + + 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. +*/ + +/* Stupid dummy functions required due to the horrible dependency mess + in Samba. */ + +void decrement_smbd_process_count( void ) +{ + return; +} + diff --git a/source3/lib/util.c b/source3/lib/util.c index e9ab72b2bf..61dbc2cb2a 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1340,6 +1340,14 @@ gid_t nametogid(const char *name) return (gid_t)-1; } +/******************************************************************* + legacy wrapper for smb_panic2() +********************************************************************/ +void smb_panic( const char *why ) +{ + smb_panic2( why, True ); +} + /******************************************************************* Something really nasty happened - panic ! ********************************************************************/ @@ -1348,7 +1356,7 @@ gid_t nametogid(const char *name) #include #endif -void smb_panic(const char *why) +void smb_panic2(const char *why, BOOL decrement_pid_count ) { char *cmd; int result; @@ -1371,6 +1379,10 @@ void smb_panic(const char *why) } #endif + /* only smbd needs to decrement the smbd counter in connections.tdb */ + if ( decrement_pid_count ) + decrement_smbd_process_count(); + cmd = lp_panic_action(); if (cmd && *cmd) { DEBUG(0, ("smb_panic(): calling panic action [%s]\n", cmd)); -- cgit