extern BOOL in_client;
extern pstring user_socket_options;
+extern char *optarg;
+extern int optind;
static pstring credentials;
static pstring my_netbios_name;
int opt;
char *opts;
char *opteq;
- extern char *optarg;
int val;
char *p;
****************************************************************************/
int main(int argc,char *argv[])
{
- extern char *optarg;
- extern int optind;
char *p;
DEBUGLEVEL = 1;
#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)
#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) \
#include "includes.h"
+extern int smb_read_error;
+
/****************************************************************************
Change the timeout (in milliseconds).
****************************************************************************/
BOOL cli_receive_smb(struct cli_state *cli)
{
- extern int smb_read_error;
BOOL ret;
/* fd == -1 causes segfaults -- Tom (tom@ninja.nl) */
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS
+extern userdom_struct current_user_info;
+
/**********************************************************
Under mapfile we expect a table of the following format:
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));
#include "includes.h"
+extern userdom_struct current_user_info;
+
static int vfs_full_audit_debug_level = DBGC_VFS;
struct vfs_full_audit_private_data {
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"));
#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
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;
#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. */
*/
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 */
char *kstr;
struct cache_entry *centry;
- extern BOOL opt_nocache;
-
if (opt_nocache) {
return NULL;
}
/* flush the cache */
void wcache_flush_cache(void)
{
- extern BOOL opt_nocache;
-
if (!wcache)
return;
if (wcache->tdb) {
#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 );
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",
#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)
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",
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
+extern struct winbindd_methods cache_methods;
+extern struct winbindd_methods passdb_methods;
+
/**
* @file winbindd_util.c
*
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;
/* 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();
#include "includes.h"
#include "printing.h"
+extern struct current_user current_user;
+extern userdom_struct current_user_info;
/****************************************************************************
run a given print command
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;
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);
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;
#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.
static BOOL process_trans2(blocking_lock_record *blr)
{
- extern int max_send;
char *inbuf = blr->inbuf;
char *outbuf;
char params[2];
SMB_NTQUOTA_STRUCT qt;
SMB_NTQUOTA_LIST *tmp_list;
SMB_NTQUOTA_HANDLE *qt_handle = NULL;
- extern struct current_user current_user;
ZERO_STRUCT(qt);
#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;
/*
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;