summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-07-22 00:20:53 +0000
committerTim Potter <tpot@samba.org>2003-07-22 00:20:53 +0000
commit274f1f8806f091a38bbf65363d7edf681459b58d (patch)
treebb682c1a3617a08ca9edebe571db08e3a25752ca /source3
parent63537d0add21301bc069a0cceac21cd36dbc51fd (diff)
downloadsamba-274f1f8806f091a38bbf65363d7edf681459b58d.tar.gz
samba-274f1f8806f091a38bbf65363d7edf681459b58d.tar.bz2
samba-274f1f8806f091a38bbf65363d7edf681459b58d.zip
Replace the eight (!) copies of dummy become/unbecome root with a single one.
(This used to be commit 8b818ce381595cdcb36631a2440d6aa0038805f1)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in19
-rw-r--r--source3/lib/dummyroot.c33
-rw-r--r--source3/nsswitch/winbindd.c14
-rw-r--r--source3/rpcclient/rpcclient.c15
-rw-r--r--source3/utils/net.c15
-rw-r--r--source3/utils/pdbedit.c15
-rw-r--r--source3/utils/smbcontrol.c6
-rw-r--r--source3/utils/smbpasswd.c15
-rw-r--r--source3/utils/status.c4
-rw-r--r--source3/web/swat.c4
10 files changed, 43 insertions, 97 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 39033ab41b..a3c2820052 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -388,17 +388,18 @@ SWAT_OBJ1 = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) $(LIBSMB_OBJ) \
$(LOCKING_OBJ) $(PASSDB_OBJ) $(SECRETS_OBJ) $(KRBCLIENT_OBJ) \
$(UBIQX_OBJ) $(LIB_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \
- $(POPT_LIB_OBJ) $(SMBLDAP_OBJ)
+ $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) lib/dummyroot.o
SMBSH_OBJ = smbwrapper/smbsh.o smbwrapper/shared.o \
$(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
STATUS_OBJ = utils/status.o $(LOCKING_OBJ) $(PARAM_OBJ) \
- $(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) $(POPT_LIB_OBJ)
+ $(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) $(POPT_LIB_OBJ) \
+ lib/dummyroot.o
SMBCONTROL_OBJ = utils/smbcontrol.o $(LOCKING_OBJ) $(PARAM_OBJ) \
$(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) $(POPT_LIB_OBJ) \
- printing/notify.o printing/printing_db.o
+ printing/notify.o printing/printing_db.o lib/dummyroot.o
SMBTREE_OBJ = utils/smbtree.o $(LOCKING_OBJ) $(PARAM_OBJ) \
$(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) $(LIBSMB_OBJ) \
@@ -413,11 +414,11 @@ TESTPRNS_OBJ = utils/testprns.o $(PARAM_OBJ) $(PRINTING_OBJ) $(UBIQX_OBJ) \
SMBPASSWD_OBJ = utils/smbpasswd.o $(PARAM_OBJ) $(SECRETS_OBJ) \
$(LIBSMB_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ)\
$(UBIQX_OBJ) $(LIB_OBJ) $(KRBCLIENT_OBJ) \
- $(SMBLDAP_OBJ)
+ $(SMBLDAP_OBJ) lib/dummyroot.o
PDBEDIT_OBJ = utils/pdbedit.o $(PARAM_OBJ) $(PASSDB_OBJ) $(LIBSAMBA_OBJ) \
$(UBIQX_OBJ) $(LIB_OBJ) $(GROUPDB_OBJ) $(SECRETS_OBJ) \
- $(POPT_LIB_OBJ) $(SMBLDAP_OBJ)
+ $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) lib/dummyroot.o
RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
@@ -431,7 +432,7 @@ RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
$(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(LIBMSRPC_OBJ) \
$(READLINE_OBJ) $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) \
$(LIBADS_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ) \
- $(SMBLDAP_OBJ) $(DCUTIL_OBJ)
+ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) lib/dummyroot.o
PAM_WINBIND_OBJ = nsswitch/pam_winbind.po nsswitch/wb_common.po lib/snprintf.po
@@ -479,7 +480,7 @@ NET_OBJ = $(NET_OBJ1) $(PARAM_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) \
$(KRBCLIENT_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
$(LIBMSRPC_OBJ) $(IDMAP_OBJ) \
$(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \
- $(SMBLDAP_OBJ) $(DCUTIL_OBJ)
+ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) lib/dummyroot.o
CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \
$(LIB_OBJ) $(KRBCLIENT_OBJ)
@@ -600,7 +601,7 @@ WINBINDD_OBJ = \
$(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) \
$(PROFILE_OBJ) $(SLCACHE_OBJ) $(SMBLDAP_OBJ) \
$(SECRETS_OBJ) $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
- $(DCUTIL_OBJ) $(IDMAP_OBJ)
+ $(DCUTIL_OBJ) $(IDMAP_OBJ) lib/dummyroot.o
WBINFO_OBJ = nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_OBJ) \
$(UBIQX_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ)
@@ -1140,7 +1141,7 @@ installclientlib: installdirs libsmbclient
PYTHON_OBJS = $(PARAM_OBJ) $(LIB_OBJ) $(LIBSMB_OBJ) $(RPC_PARSE_OBJ) \
$(UBIQX_OBJ) $(LIBMSRPC_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
- $(SECRETS_OBJ) $(KRBCLIENT_OBJ)
+ $(SECRETS_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) lib/dummyroot.o
PYTHON_PICOBJS = $(PYTHON_OBJS:.o=.po)
diff --git a/source3/lib/dummyroot.c b/source3/lib/dummyroot.c
new file mode 100644
index 0000000000..c8465cb791
--- /dev/null
+++ b/source3/lib/dummyroot.c
@@ -0,0 +1,33 @@
+/*
+ Unix SMB/CIFS implementation.
+ RPC pipe client
+
+ Copyright (C) Tim Potter 2003
+
+ 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 become_root(void)
+{
+ return;
+}
+
+void unbecome_root(void)
+{
+ return;
+}
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 0860d701d8..2e718dca3d 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -27,20 +27,6 @@
BOOL opt_nocache = False;
BOOL opt_dual_daemon = True;
-/*****************************************************************************
- stubb functions
-****************************************************************************/
-
-void become_root( void )
-{
- return;
-}
-
-void unbecome_root( void )
-{
- return;
-}
-
/* Reload configuration */
static BOOL reload_services_file(BOOL test)
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index af021962f5..614a3bc36b 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -37,21 +37,6 @@ static struct cmd_list {
struct cmd_set *cmd_set;
} *cmd_list;
-/*****************************************************************************
- stubb functions
-****************************************************************************/
-
-void become_root( void )
-{
- return;
-}
-
-void unbecome_root( void )
-{
- return;
-}
-
-
/****************************************************************************
handle completion of commands for readline
****************************************************************************/
diff --git a/source3/utils/net.c b/source3/utils/net.c
index f99b2bad84..a22d34a720 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -79,21 +79,6 @@ struct in_addr opt_dest_ip;
extern BOOL AllowDebugChange;
-/*****************************************************************************
- stubb functions
-****************************************************************************/
-
-void become_root( void )
-{
- return;
-}
-
-void unbecome_root( void )
-{
- return;
-}
-
-
uint32 get_sec_channel_type(const char *param)
{
if (!(param && *param)) {
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index 96d0d3c057..c3e063eff0 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -51,21 +51,6 @@
#define MASK_ALWAYS_GOOD 0x0000001F
#define MASK_USER_GOOD 0x00401F00
-/*****************************************************************************
- stubb functions
-****************************************************************************/
-
-void become_root( void )
-{
- return;
-}
-
-void unbecome_root( void )
-{
- return;
-}
-
-
/*********************************************************
Add all currently available users to another db
********************************************************/
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index b7333f2317..190627e2a5 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -591,12 +591,6 @@ static const struct {
{ NULL }
};
-/* Yuck - we need these because we link to printing*.o even though
- they aren't used. */
-
-void become_root(void) {}
-void unbecome_root(void) {}
-
/* Display usage information */
static void usage(poptContext *pc)
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index eade5331af..6ab6d35e73 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -37,21 +37,6 @@ static const char *remote_machine = NULL;
static fstring ldap_secret;
-/*****************************************************************************
- stubb functions
-****************************************************************************/
-
-void become_root( void )
-{
- return;
-}
-
-void unbecome_root( void )
-{
- return;
-}
-
-
/*********************************************************
Print command usage on stderr and die.
**********************************************************/
diff --git a/source3/utils/status.c b/source3/utils/status.c
index 8e2cf87478..8bf67fc4d6 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -45,10 +45,6 @@ static int locks_only = 0; /* Added by RJS */
static BOOL processes_only=False;
static int show_brl;
-/* we need these because we link to locking*.o */
- void become_root(void) {}
- void unbecome_root(void) {}
-
/* added by OH */
static void Ucrit_addUsername(const char *username)
{
diff --git a/source3/web/swat.c b/source3/web/swat.c
index d97278c485..7326e95415 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -51,10 +51,6 @@ static int iNumNonAutoPrintServices = 0;
#define ENABLE_USER_FLAG "enable_user_flag"
#define RHOST "remote_host"
-/* we need these because we link to locking*.o */
- void become_root(void) {}
- void unbecome_root(void) {}
-
/****************************************************************************
****************************************************************************/
static int enum_index(int value, const struct enum_list *enumlist)