mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r20124: clean up nested extern declaration warnings
This commit is contained in:
parent
cc26e2f9a1
commit
ac3eb7813e
@ -26,6 +26,8 @@
|
||||
|
||||
extern BOOL in_client;
|
||||
extern pstring user_socket_options;
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
static pstring credentials;
|
||||
static pstring my_netbios_name;
|
||||
@ -712,7 +714,6 @@ static void parse_mount_smb(int argc, char **argv)
|
||||
int opt;
|
||||
char *opts;
|
||||
char *opteq;
|
||||
extern char *optarg;
|
||||
int val;
|
||||
char *p;
|
||||
|
||||
@ -862,8 +863,6 @@ static void parse_mount_smb(int argc, char **argv)
|
||||
****************************************************************************/
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
char *p;
|
||||
|
||||
DEBUGLEVEL = 1;
|
||||
|
@ -86,10 +86,10 @@
|
||||
#define IS_IPC(conn) ((conn) && (conn)->ipc)
|
||||
#define IS_PRINT(conn) ((conn) && (conn)->printer)
|
||||
/* you must add the following extern declaration to files using this macro
|
||||
* (do not add it to the macro as that causes nested extern declaration warnings)
|
||||
* extern struct current_user current_user;
|
||||
*/
|
||||
#define FSP_BELONGS_CONN(fsp,conn) do {\
|
||||
extern struct current_user current_user;\
|
||||
if (!((fsp) && (conn) && ((conn)==(fsp)->conn) && (current_user.vuid==(fsp)->vuid))) \
|
||||
return ERROR_NT(NT_STATUS_INVALID_HANDLE); \
|
||||
} while(0)
|
||||
@ -97,10 +97,10 @@
|
||||
#define FNUM_OK(fsp,c) ((fsp) && !(fsp)->is_directory && (c)==(fsp)->conn && current_user.vuid==(fsp)->vuid)
|
||||
|
||||
/* you must add the following extern declaration to files using this macro
|
||||
* (do not add it to the macro as that causes nested extern declaration warnings)
|
||||
* extern struct current_user current_user;
|
||||
*/
|
||||
#define CHECK_FSP(fsp,conn) do {\
|
||||
extern struct current_user current_user;\
|
||||
if (!(fsp) || !(conn)) \
|
||||
return ERROR_NT(NT_STATUS_INVALID_HANDLE); \
|
||||
else if (((conn) != (fsp)->conn) || current_user.vuid != (fsp)->vuid) \
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
extern int smb_read_error;
|
||||
|
||||
/****************************************************************************
|
||||
Change the timeout (in milliseconds).
|
||||
****************************************************************************/
|
||||
@ -79,7 +81,6 @@ static BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout)
|
||||
|
||||
BOOL cli_receive_smb(struct cli_state *cli)
|
||||
{
|
||||
extern int smb_read_error;
|
||||
BOOL ret;
|
||||
|
||||
/* fd == -1 causes segfaults -- Tom (tom@ninja.nl) */
|
||||
|
@ -23,6 +23,8 @@
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_VFS
|
||||
|
||||
extern userdom_struct current_user_info;
|
||||
|
||||
/**********************************************************
|
||||
Under mapfile we expect a table of the following format:
|
||||
|
||||
@ -110,7 +112,6 @@ static BOOL expand_msdfs_target(connection_struct* conn, pstring target)
|
||||
int filename_len;
|
||||
pstring targethost;
|
||||
pstring new_target;
|
||||
extern userdom_struct current_user_info;
|
||||
|
||||
if (filename_start == NULL) {
|
||||
DEBUG(10, ("No filename start in %s\n", target));
|
||||
|
@ -60,6 +60,8 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
extern userdom_struct current_user_info;
|
||||
|
||||
static int vfs_full_audit_debug_level = DBGC_VFS;
|
||||
|
||||
struct vfs_full_audit_private_data {
|
||||
@ -647,7 +649,6 @@ static int audit_syslog_priority(vfs_handle_struct *handle)
|
||||
static char *audit_prefix(connection_struct *conn)
|
||||
{
|
||||
static pstring prefix;
|
||||
extern userdom_struct current_user_info;
|
||||
|
||||
pstrcpy(prefix, lp_parm_const_string(SNUM(conn), "full_audit",
|
||||
"prefix", "%u|%I"));
|
||||
|
@ -30,6 +30,8 @@
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_WINBIND
|
||||
|
||||
extern struct winbindd_methods reconnect_methods;
|
||||
|
||||
/*
|
||||
return our ads connections structure for a domain. We keep the connection
|
||||
open to make things faster
|
||||
@ -117,7 +119,6 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
|
||||
server, fall back to MSRPC */
|
||||
if (status.error_type == ENUM_ADS_ERROR_SYSTEM &&
|
||||
status.err.rc == ECONNREFUSED) {
|
||||
extern struct winbindd_methods reconnect_methods;
|
||||
/* 'reconnect_methods' is the MS-RPC backend. */
|
||||
DEBUG(1,("Trying MSRPC methods\n"));
|
||||
domain->backend = &reconnect_methods;
|
||||
|
@ -29,6 +29,12 @@
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_WINBIND
|
||||
|
||||
extern struct winbindd_methods reconnect_methods;
|
||||
extern BOOL opt_nocache;
|
||||
#ifdef HAVE_ADS
|
||||
extern struct winbindd_methods ads_methods;
|
||||
#endif
|
||||
|
||||
/* Global online/offline state - False when online. winbindd starts up online
|
||||
and sets this to true if the first query fails and there's an entry in
|
||||
the cache tdb telling us to stay offline. */
|
||||
@ -112,10 +118,7 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain)
|
||||
*/
|
||||
|
||||
if (!domain->backend) {
|
||||
extern struct winbindd_methods reconnect_methods;
|
||||
#ifdef HAVE_ADS
|
||||
extern struct winbindd_methods ads_methods;
|
||||
|
||||
/* find our domain first so we can figure out if we
|
||||
are joined to a kerberized domain */
|
||||
|
||||
@ -558,8 +561,6 @@ static struct cache_entry *wcache_fetch(struct winbind_cache *cache,
|
||||
char *kstr;
|
||||
struct cache_entry *centry;
|
||||
|
||||
extern BOOL opt_nocache;
|
||||
|
||||
if (opt_nocache) {
|
||||
return NULL;
|
||||
}
|
||||
@ -2359,8 +2360,6 @@ static int traverse_fn_cleanup(TDB_CONTEXT *the_tdb, TDB_DATA kbuf,
|
||||
/* flush the cache */
|
||||
void wcache_flush_cache(void)
|
||||
{
|
||||
extern BOOL opt_nocache;
|
||||
|
||||
if (!wcache)
|
||||
return;
|
||||
if (wcache->tdb) {
|
||||
|
@ -65,6 +65,8 @@
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_WINBIND
|
||||
|
||||
extern struct winbindd_methods reconnect_methods;
|
||||
|
||||
static NTSTATUS init_dc_connection_network(struct winbindd_domain *domain);
|
||||
static void set_dc_type_and_flags( struct winbindd_domain *domain );
|
||||
|
||||
@ -196,7 +198,6 @@ void set_domain_offline(struct winbindd_domain *domain)
|
||||
|
||||
static void set_domain_online(struct winbindd_domain *domain)
|
||||
{
|
||||
extern struct winbindd_methods reconnect_methods;
|
||||
struct timeval now;
|
||||
|
||||
DEBUG(10,("set_domain_online: called for domain %s\n",
|
||||
|
@ -34,6 +34,8 @@
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_WINBIND
|
||||
|
||||
extern BOOL override_logfile;
|
||||
|
||||
/* Read some data from a client connection */
|
||||
|
||||
static void child_read_request(struct winbindd_cli_state *state)
|
||||
@ -759,7 +761,6 @@ static BOOL fork_domain_child(struct winbindd_child *child)
|
||||
int fdpair[2];
|
||||
struct winbindd_cli_state state;
|
||||
struct winbindd_domain *domain;
|
||||
extern BOOL override_logfile;
|
||||
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM, 0, fdpair) != 0) {
|
||||
DEBUG(0, ("Could not open child pipe: %s\n",
|
||||
|
@ -27,6 +27,9 @@
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_WINBIND
|
||||
|
||||
extern struct winbindd_methods cache_methods;
|
||||
extern struct winbindd_methods passdb_methods;
|
||||
|
||||
/**
|
||||
* @file winbindd_util.c
|
||||
*
|
||||
@ -225,7 +228,6 @@ static void add_trusted_domains( struct winbindd_domain *domain )
|
||||
|
||||
static void trustdom_recv(void *private_data, BOOL success)
|
||||
{
|
||||
extern struct winbindd_methods cache_methods;
|
||||
struct trustdom_state *state =
|
||||
talloc_get_type_abort(private_data, struct trustdom_state);
|
||||
struct winbindd_response *response = state->response;
|
||||
@ -493,8 +495,6 @@ enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domai
|
||||
/* Look up global info for the winbind daemon */
|
||||
BOOL init_domain_list(void)
|
||||
{
|
||||
extern struct winbindd_methods cache_methods;
|
||||
extern struct winbindd_methods passdb_methods;
|
||||
struct winbindd_domain *domain;
|
||||
int role = lp_server_role();
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "includes.h"
|
||||
#include "printing.h"
|
||||
|
||||
extern struct current_user current_user;
|
||||
extern userdom_struct current_user_info;
|
||||
|
||||
/****************************************************************************
|
||||
run a given print command
|
||||
@ -30,9 +32,6 @@ for local substitution strings
|
||||
static int print_run_command(int snum, const char* printername, BOOL do_sub,
|
||||
const char *command, int *outfd, ...)
|
||||
{
|
||||
extern struct current_user current_user;
|
||||
extern userdom_struct current_user_info;
|
||||
|
||||
pstring syscmd;
|
||||
char *arg;
|
||||
int ret;
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
extern SIG_ATOMIC_T got_sig_term;
|
||||
extern SIG_ATOMIC_T reload_after_sighup;
|
||||
extern struct current_user current_user;
|
||||
extern userdom_struct current_user_info;
|
||||
|
||||
/* Current printer interface */
|
||||
static BOOL remove_from_jobs_changed(const char* sharename, uint32 jobid);
|
||||
@ -1438,8 +1440,6 @@ update the internal database from the system print queue for a queue
|
||||
|
||||
static void print_queue_update(int snum, BOOL force)
|
||||
{
|
||||
extern struct current_user current_user;
|
||||
extern userdom_struct current_user_info;
|
||||
fstring key;
|
||||
fstring sharename;
|
||||
pstring lpqcommand, lprmcommand;
|
||||
|
@ -22,6 +22,8 @@
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_LOCKING
|
||||
|
||||
extern int max_send;
|
||||
|
||||
/****************************************************************************
|
||||
This is the structure to queue to implement blocking locks.
|
||||
notify. It consists of the requesting SMB and the expiry time.
|
||||
@ -425,7 +427,6 @@ Waiting....\n",
|
||||
|
||||
static BOOL process_trans2(blocking_lock_record *blr)
|
||||
{
|
||||
extern int max_send;
|
||||
char *inbuf = blr->inbuf;
|
||||
char *outbuf;
|
||||
char params[2];
|
||||
|
@ -2345,7 +2345,6 @@ static int call_nt_transact_get_user_quota(connection_struct *conn, char *inbuf,
|
||||
SMB_NTQUOTA_STRUCT qt;
|
||||
SMB_NTQUOTA_LIST *tmp_list;
|
||||
SMB_NTQUOTA_HANDLE *qt_handle = NULL;
|
||||
extern struct current_user current_user;
|
||||
|
||||
ZERO_STRUCT(qt);
|
||||
|
||||
|
@ -23,6 +23,12 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
extern struct auth_context *negprot_global_auth_context;
|
||||
extern BOOL global_encrypted_passwords_negotiated;
|
||||
extern BOOL global_spnego_negotiated;
|
||||
extern enum protocol_types Protocol;
|
||||
extern int max_send;
|
||||
|
||||
uint32 global_client_caps = 0;
|
||||
|
||||
/*
|
||||
@ -840,13 +846,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
|
||||
fstring native_lanman;
|
||||
fstring primary_domain;
|
||||
static BOOL done_sesssetup = False;
|
||||
extern BOOL global_encrypted_passwords_negotiated;
|
||||
extern BOOL global_spnego_negotiated;
|
||||
extern enum protocol_types Protocol;
|
||||
extern int max_send;
|
||||
|
||||
auth_usersupplied_info *user_info = NULL;
|
||||
extern struct auth_context *negprot_global_auth_context;
|
||||
auth_serversupplied_info *server_info = NULL;
|
||||
|
||||
NTSTATUS nt_status;
|
||||
|
Loading…
Reference in New Issue
Block a user