diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-08-17 13:44:05 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-08-17 13:44:05 +0000 |
commit | dd2e202e5c8d6220e29becb48fde333fa5258794 (patch) | |
tree | 92168e7b927f563e673d8f98f5851689b2a2cbe8 /source3 | |
parent | c3effa8b599a6a0a2fe05487edc3a0d13e83d427 (diff) | |
download | samba-dd2e202e5c8d6220e29becb48fde333fa5258794.tar.gz samba-dd2e202e5c8d6220e29becb48fde333fa5258794.tar.bz2 samba-dd2e202e5c8d6220e29becb48fde333fa5258794.zip |
move soem variables from server.c that don't belong there.
(This used to be commit f92475aa3cb3ade576c39c02c7996c949c42082a)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/error.c | 4 | ||||
-rw-r--r-- | source3/smbd/oplock.c | 14 | ||||
-rw-r--r-- | source3/smbd/process.c | 18 | ||||
-rw-r--r-- | source3/smbd/server.c | 45 |
4 files changed, 30 insertions, 51 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c index ea23d8b28d..d879f9a93c 100644 --- a/source3/smbd/error.c +++ b/source3/smbd/error.c @@ -23,6 +23,10 @@ extern int DEBUGLEVEL; +/* these can be set by some functions to override the error codes */ +int unix_ERR_class=SMB_SUCCESS; +int unix_ERR_code=0; + /**************************************************************************** create an error packet from a cached error. diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 1b49e2cfaf..d47435a0ec 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -23,11 +23,15 @@ extern int DEBUGLEVEL; -extern int oplock_sock; -extern uint16 oplock_port; -extern int32 global_oplocks_open; -extern int32 global_oplocks_open; -extern int global_oplock_break; +/* Oplock ipc UDP socket. */ +int oplock_sock = -1; +uint16 oplock_port = 0; + +/* Current number of oplocks we have outstanding. */ +int32 global_oplocks_open = 0; +BOOL global_oplock_break = False; + + extern int smb_read_error; diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 30abfdb894..acc89ae146 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -23,11 +23,24 @@ extern int DEBUGLEVEL; +time_t smb_last_time=(time_t)0; + +/* + * Size of data we can send to client. Set + * by the client for all protocols above CORE. + * Set by us for CORE protocol. + */ +int max_send = BUFFER_SIZE; +/* + * Size of the data we can receive. Set by us. + * Can be modified by the max xmit parameter. + */ +int max_recv = BUFFER_SIZE; + extern int last_message; extern int global_oplock_break; extern pstring sesssetup_user; extern char *last_inbuf; -extern time_t smb_last_time; extern char *InBuffer; extern char *OutBuffer; extern int oplock_sock; @@ -645,6 +658,9 @@ void smbd_process(void) } #endif + + max_recv = MIN(lp_maxxmit(),BUFFER_SIZE); + /* re-initialise the timezone */ TimeInit(); diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 276f5a8075..7c4bc20ccc 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -24,7 +24,6 @@ pstring servicesf = CONFIGFILE; extern pstring debugf; -extern pstring sesssetup_user; extern fstring global_myworkgroup; extern pstring global_myname; @@ -42,14 +41,6 @@ int last_message = -1; extern pstring scope; extern int DEBUGLEVEL; -extern int case_default; -extern BOOL case_sensitive; -extern BOOL case_preserve; -extern BOOL use_mangled_map; -extern BOOL short_case_preserve; -extern BOOL case_mangle; -time_t smb_last_time=(time_t)0; -extern BOOL global_machine_pasword_needs_changing; extern int smb_read_error; @@ -59,43 +50,9 @@ extern pstring user_socket_options; extern int dcelogin_atmost_once; #endif /* WITH_DFS */ -/* - * This is set on startup - it defines the SID for this - * machine. - */ -extern DOM_SID global_machine_sid; - -/* - * Size of data we can send to client. Set - * by the client for all protocols above CORE. - * Set by us for CORE protocol. - */ -int max_send = BUFFER_SIZE; -/* - * Size of the data we can receive. Set by us. - * Can be modified by the max xmit parameter. - */ -int max_recv = BUFFER_SIZE; - -/* Oplock ipc UDP socket. */ -int oplock_sock = -1; -uint16 oplock_port = 0; -/* Current number of oplocks we have outstanding. */ -int32 global_oplocks_open = 0; - -BOOL global_oplock_break = False; extern fstring remote_machine; - extern pstring OriginalDir; - -/* these can be set by some functions to override the error codes */ -int unix_ERR_class=SMB_SUCCESS; -int unix_ERR_code=0; - - -extern int extra_time_offset; - extern pstring myhostname; /**************************************************************************** @@ -733,8 +690,6 @@ static void usage(char *pname) /* possibly reload the services file. */ reload_services(True); - max_recv = MIN(lp_maxxmit(),BUFFER_SIZE); - if (*lp_rootdir()) { if (sys_chroot(lp_rootdir()) == 0) |