move where got_sig_term and reload_after_sighup are defined.
authorHerb Lewis <herb@samba.org>
Thu, 22 Aug 2002 23:34:27 +0000 (23:34 +0000)
committerHerb Lewis <herb@samba.org>
Thu, 22 Aug 2002 23:34:27 +0000 (23:34 +0000)
populate cli structure with called name and calling name even for port
445 connects.
(This used to be commit 123eee6206d9afb28c169540dc63824957b505f4)

source3/libsmb/cliconnect.c
source3/smbd/process.c
source3/smbd/server.c

index 73846c4d436b89eb1b6ab8f624136ad55f3fa903..7db377c25f3ea3528913ba74b52af2ca161bea35 100644 (file)
@@ -938,15 +938,6 @@ BOOL cli_session_request(struct cli_state *cli,
        int len = 4;
        extern pstring user_socket_options;
 
-       /* 445 doesn't have session request */
-       if (cli->port == 445) return True;
-
-       if (cli->sign_info.use_smb_signing) {
-               DEBUG(0, ("Cannot send session resquest again, particularly after setting up SMB Signing\n"));
-               return False;
-       }
-
-       /* send a session request (RFC 1002) */
        memcpy(&(cli->calling), calling, sizeof(*calling));
        memcpy(&(cli->called ), called , sizeof(*called ));
   
@@ -960,6 +951,15 @@ BOOL cli_session_request(struct cli_state *cli,
        name_mangle(cli->calling.name, p, cli->calling.name_type);
        len += name_len(p);
 
+       /* 445 doesn't have session request */
+       if (cli->port == 445) return True;
+
+       if (cli->sign_info.use_smb_signing) {
+               DEBUG(0, ("Cannot send session resquest again, particularly after setting up SMB Signing\n"));
+               return False;
+       }
+
+       /* send a session request (RFC 1002) */
        /* setup the packet length
          * Remove four bytes from the length count, since the length
          * field in the NBT Session Service header counts the number
index 7c269b01346e7f6f257609e0d6da460f22e332de..f2b2a5c15a62eab18db26cbcfd4b76cfa2258c97 100644 (file)
@@ -42,8 +42,8 @@ extern int last_message;
 extern int global_oplock_break;
 extern userdom_struct current_user_info;
 extern int smb_read_error;
-extern SIG_ATOMIC_T reload_after_sighup;
-extern SIG_ATOMIC_T got_sig_term;
+SIG_ATOMIC_T reload_after_sighup = 0;
+SIG_ATOMIC_T got_sig_term = 0;
 extern BOOL global_machine_password_needs_changing;
 extern fstring global_myworkgroup;
 extern pstring global_myname;
index b2b905cec3542fd8f59f83b62433309b149bffcb..c748a87da296c80b752be5abb2eaa33b0b23ab12 100644 (file)
@@ -33,6 +33,8 @@ int last_message = -1;
 #define LAST_MESSAGE() smb_fn_name(last_message)
 
 extern pstring user_socket_options;
+extern SIG_ATOMIC_T got_sig_term;
+extern SIG_ATOMIC_T reload_after_sighup;
 
 #ifdef WITH_DFS
 extern int dcelogin_atmost_once;
@@ -61,8 +63,6 @@ static void smbd_set_server_fd(int fd)
  Terminate signal.
 ****************************************************************************/
 
-SIG_ATOMIC_T got_sig_term = 0;
-
 static void sig_term(void)
 {
        got_sig_term = 1;
@@ -73,8 +73,6 @@ static void sig_term(void)
  Catch a sighup.
 ****************************************************************************/
 
-SIG_ATOMIC_T reload_after_sighup = 0;
-
 static void sig_hup(int sig)
 {
        reload_after_sighup = 1;