diff options
author | Tim Potter <tpot@samba.org> | 2003-07-22 00:20:53 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-07-22 00:20:53 +0000 |
commit | 8b818ce381595cdcb36631a2440d6aa0038805f1 (patch) | |
tree | 291373a791c43732e0b12386d0d7679238a58cb2 | |
parent | cfb86b4503c13b34583a61ef01ca8e1ed00fb9e4 (diff) | |
download | samba-8b818ce381595cdcb36631a2440d6aa0038805f1.tar.gz samba-8b818ce381595cdcb36631a2440d6aa0038805f1.tar.xz samba-8b818ce381595cdcb36631a2440d6aa0038805f1.zip |
Replace the eight (!) copies of dummy become/unbecome root with a single one.
-rw-r--r-- | source/Makefile.in | 19 | ||||
-rw-r--r-- | source/lib/dummyroot.c | 33 | ||||
-rw-r--r-- | source/nsswitch/winbindd.c | 14 | ||||
-rw-r--r-- | source/rpcclient/rpcclient.c | 15 | ||||
-rw-r--r-- | source/utils/net.c | 15 | ||||
-rw-r--r-- | source/utils/pdbedit.c | 15 | ||||
-rw-r--r-- | source/utils/smbcontrol.c | 6 | ||||
-rw-r--r-- | source/utils/smbpasswd.c | 15 | ||||
-rw-r--r-- | source/utils/status.c | 4 | ||||
-rw-r--r-- | source/web/swat.c | 4 |
10 files changed, 43 insertions, 97 deletions
diff --git a/source/Makefile.in b/source/Makefile.in index 39033ab41b5..a3c28200525 100644 --- a/source/Makefile.in +++ b/source/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/source/lib/dummyroot.c b/source/lib/dummyroot.c new file mode 100644 index 00000000000..c8465cb791a --- /dev/null +++ b/source/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/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 0860d701d86..2e718dca3df 100644 --- a/source/nsswitch/winbindd.c +++ b/source/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/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index af021962f5d..614a3bc36ba 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/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/source/utils/net.c b/source/utils/net.c index f99b2bad843..a22d34a7201 100644 --- a/source/utils/net.c +++ b/source/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/source/utils/pdbedit.c b/source/utils/pdbedit.c index 96d0d3c057f..c3e063eff01 100644 --- a/source/utils/pdbedit.c +++ b/source/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/source/utils/smbcontrol.c b/source/utils/smbcontrol.c index b7333f23176..190627e2a52 100644 --- a/source/utils/smbcontrol.c +++ b/source/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/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index eade5331af6..6ab6d35e73b 100644 --- a/source/utils/smbpasswd.c +++ b/source/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/source/utils/status.c b/source/utils/status.c index 8e2cf874789..8bf67fc4d63 100644 --- a/source/utils/status.c +++ b/source/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/source/web/swat.c b/source/web/swat.c index d97278c4859..7326e954152 100644 --- a/source/web/swat.c +++ b/source/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) |