1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

Replace the eight (!) copies of dummy become/unbecome root with a single one.

(This used to be commit 8b818ce381595cdcb36631a2440d6aa0038805f1)
This commit is contained in:
Tim Potter 2003-07-22 00:20:53 +00:00
parent 63537d0add
commit 274f1f8806
10 changed files with 43 additions and 97 deletions

View File

@ -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)

33
source3/lib/dummyroot.c Normal file
View File

@ -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;
}

View File

@ -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)

View File

@ -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
****************************************************************************/

View File

@ -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)) {

View File

@ -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
********************************************************/

View File

@ -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)

View File

@ -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.
**********************************************************/

View File

@ -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)
{

View File

@ -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)