summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/auth/auth_server.c2
-rw-r--r--source3/smbd/aio.c6
-rw-r--r--source3/smbd/blocking.c6
-rw-r--r--source3/smbd/ipc.c4
-rw-r--r--source3/smbd/negprot.c7
-rw-r--r--source3/smbd/notify.c2
-rw-r--r--source3/smbd/nttrans.c4
-rw-r--r--source3/smbd/oplock.c6
-rw-r--r--source3/smbd/reply.c32
-rw-r--r--source3/smbd/trans2.c4
10 files changed, 37 insertions, 36 deletions
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index 8a8ecfa575..c7243e8468 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -95,7 +95,7 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
}
if (strequal(desthost,myhostname())) {
- exit_server("Password server loop!");
+ exit_server_cleanly("Password server loop!");
}
DEBUG(3,("got session\n"));
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index c71c374043..ad25242060 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -345,7 +345,7 @@ BOOL schedule_aio_write_and_X(connection_struct *conn,
SSVAL(aio_ex->outbuf,smb_vwv4,(numtowrite>>16)&1);
show_msg(aio_ex->outbuf);
if (!send_smb(smbd_server_fd(),aio_ex->outbuf)) {
- exit_server("handle_aio_write: send_smb failed.");
+ exit_server_cleanly("handle_aio_write: send_smb failed.");
}
DEBUG(10,("schedule_aio_write_and_X: scheduled aio_write behind for file %s\n",
fsp->fsp_name ));
@@ -408,7 +408,7 @@ static int handle_aio_read_complete(struct aio_extra *aio_ex)
smb_setlen(outbuf,outsize - 4);
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf)) {
- exit_server("handle_aio_read_complete: send_smb failed.");
+ exit_server_cleanly("handle_aio_read_complete: send_smb failed.");
}
DEBUG(10,("handle_aio_read_complete: scheduled aio_read completed for file %s, offset %.0f, len = %u\n",
@@ -480,7 +480,7 @@ Wanted %u bytes but only wrote %d\n", fsp->fsp_name, (unsigned int)numtowrite, (
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf)) {
- exit_server("handle_aio_write: send_smb failed.");
+ exit_server_cleanly("handle_aio_write: send_smb failed.");
}
DEBUG(10,("handle_aio_write_complete: scheduled aio_write completed for file %s, offset %.0f, requested %u, written = %u\n",
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index aeb2bd6b6b..7a71fc67e5 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -180,7 +180,7 @@ static void send_blocking_reply(char *outbuf, int outsize)
smb_setlen(outbuf,outsize - 4);
if (!send_smb(smbd_server_fd(),outbuf))
- exit_server("send_blocking_reply: send_smb failed.");
+ exit_server_cleanly("send_blocking_reply: send_smb failed.");
}
/****************************************************************************
@@ -244,7 +244,7 @@ static void generic_blocking_lock_error(blocking_lock_record *blr, NTSTATUS stat
ERROR_NT(status);
if (!send_smb(smbd_server_fd(),outbuf)) {
- exit_server("generic_blocking_lock_error: send_smb failed.");
+ exit_server_cleanly("generic_blocking_lock_error: send_smb failed.");
}
}
@@ -322,7 +322,7 @@ static void blocking_lock_reply_error(blocking_lock_record *blr, NTSTATUS status
SCVAL(outbuf,smb_com,SMBtrans2);
ERROR_NT(status);
if (!send_smb(smbd_server_fd(),outbuf)) {
- exit_server("blocking_lock_reply_error: send_smb failed.");
+ exit_server_cleanly("blocking_lock_reply_error: send_smb failed.");
}
break;
}
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 9d347a430b..ca128d29d9 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -115,7 +115,7 @@ void send_trans_reply(char *outbuf,
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf))
- exit_server("send_trans_reply: send_smb failed.");
+ exit_server_cleanly("send_trans_reply: send_smb failed.");
tot_data_sent = this_ldata;
tot_param_sent = this_lparam;
@@ -149,7 +149,7 @@ void send_trans_reply(char *outbuf,
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf))
- exit_server("send_trans_reply: send_smb failed.");
+ exit_server_cleanly("send_trans_reply: send_smb failed.");
tot_data_sent += this_ldata;
tot_param_sent += this_lparam;
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index bbd1013050..8e9dcf22e2 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -293,7 +293,7 @@ static int reply_nt1(char *inbuf, char *outbuf)
} else {
DEBUG(0,("reply_nt1: smb signing is incompatible with share level security !\n"));
if (lp_server_signing() == Required) {
- exit_server("reply_nt1: smb signing required and share level security selected.");
+ exit_server_cleanly("reply_nt1: smb signing required and share level security selected.");
}
}
}
@@ -461,7 +461,7 @@ int reply_negprot(connection_struct *conn,
if (done_negprot) {
END_PROFILE(SMBnegprot);
- exit_server("multiple negprot's are not permitted");
+ exit_server_cleanly("multiple negprot's are not permitted");
}
done_negprot = True;
@@ -570,7 +570,8 @@ int reply_negprot(connection_struct *conn,
DEBUG( 5, ( "negprot index=%d\n", choice ) );
if ((lp_server_signing() == Required) && (Protocol < PROTOCOL_NT1)) {
- exit_server("SMB signing is required and client negotiated a downlevel protocol");
+ exit_server_cleanly("SMB signing is required and "
+ "client negotiated a downlevel protocol");
}
END_PROFILE(SMBnegprot);
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index 829ca3a736..4ec53567dd 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -62,7 +62,7 @@ static void change_notify_reply_packet(char *inbuf, NTSTATUS error_code)
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf))
- exit_server("change_notify_reply_packet: send_smb failed.");
+ exit_server_cleanly("change_notify_reply_packet: send_smb failed.");
}
/****************************************************************************
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 90a2085859..d4ca1dab0c 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -100,7 +100,7 @@ static int send_nt_replies(char *outbuf, int bufsize, NTSTATUS nt_error,
if(params_to_send == 0 && data_to_send == 0) {
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf)) {
- exit_server("send_nt_replies: send_smb failed.");
+ exit_server_cleanly("send_nt_replies: send_smb failed.");
}
return 0;
}
@@ -235,7 +235,7 @@ static int send_nt_replies(char *outbuf, int bufsize, NTSTATUS nt_error,
/* Send the packet */
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf)) {
- exit_server("send_nt_replies: send_smb failed.");
+ exit_server_cleanly("send_nt_replies: send_smb failed.");
}
pp += params_sent_thistime;
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index aaa236effa..427fb7f245 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -460,7 +460,7 @@ static void process_oplock_async_level2_break_message(int msg_type, struct proce
show_msg(break_msg);
if (!send_smb(smbd_server_fd(), break_msg)) {
- exit_server("oplock_break: send_smb failed.");
+ exit_server_cleanly("oplock_break: send_smb failed.");
}
/* Restore the sign state to what it was. */
@@ -562,7 +562,7 @@ static void process_oplock_break_message(int msg_type, struct process_id src,
show_msg(break_msg);
if (!send_smb(smbd_server_fd(), break_msg)) {
- exit_server("oplock_break: send_smb failed.");
+ exit_server_cleanly("oplock_break: send_smb failed.");
}
/* Restore the sign state to what it was. */
@@ -638,7 +638,7 @@ static void process_kernel_oplock_break(int msg_type, struct process_id src,
show_msg(break_msg);
if (!send_smb(smbd_server_fd(), break_msg)) {
- exit_server("oplock_break: send_smb failed.");
+ exit_server_cleanly("oplock_break: send_smb failed.");
}
/* Restore the sign state to what it was. */
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 2e71607402..c069bd28b9 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -503,7 +503,7 @@ int reply_special(char *inbuf,char *outbuf)
case 0x81: /* session request */
if (already_got_session) {
- exit_server("multiple session request not permitted");
+ exit_server_cleanly("multiple session request not permitted");
}
SCVAL(outbuf,0,0x82);
@@ -2149,7 +2149,7 @@ static void fail_readraw(void)
pstring errstr;
slprintf(errstr, sizeof(errstr)-1, "FAIL ! reply_readbraw: socket write fail (%s)",
strerror(errno) );
- exit_server(errstr);
+ exit_server_cleanly(errstr);
}
#if defined(WITH_SENDFILE)
@@ -2231,14 +2231,14 @@ void send_file_readbraw(connection_struct *conn, files_struct *fsp, SMB_OFF_T st
if (fake_sendfile(fsp, startpos, nread, outbuf + 4, out_buffsize - 4) == -1) {
DEBUG(0,("send_file_readbraw: fake_sendfile failed for file %s (%s).\n",
fsp->fsp_name, strerror(errno) ));
- exit_server("send_file_readbraw fake_sendfile failed");
+ exit_server_cleanly("send_file_readbraw fake_sendfile failed");
}
return;
}
DEBUG(0,("send_file_readbraw: sendfile failed for file %s (%s). Terminating\n",
fsp->fsp_name, strerror(errno) ));
- exit_server("send_file_readbraw sendfile failed");
+ exit_server_cleanly("send_file_readbraw sendfile failed");
}
}
@@ -2277,7 +2277,7 @@ int reply_readbraw(connection_struct *conn, char *inbuf, char *outbuf, int dum_s
START_PROFILE(SMBreadbraw);
if (srv_is_signing_active()) {
- exit_server("reply_readbraw: SMB signing is active - raw reads/writes are disallowed.");
+ exit_server_cleanly("reply_readbraw: SMB signing is active - raw reads/writes are disallowed.");
}
/*
@@ -2599,7 +2599,7 @@ int send_file_readX(connection_struct *conn, char *inbuf,char *outbuf,int length
len_outbuf - (data-outbuf))) == -1) {
DEBUG(0,("send_file_readX: fake_sendfile failed for file %s (%s).\n",
fsp->fsp_name, strerror(errno) ));
- exit_server("send_file_readX: fake_sendfile failed");
+ exit_server_cleanly("send_file_readX: fake_sendfile failed");
}
DEBUG( 3, ( "send_file_readX: fake_sendfile fnum=%d max=%d nread=%d\n",
fsp->fnum, (int)smb_maxcnt, (int)nread ) );
@@ -2609,7 +2609,7 @@ int send_file_readX(connection_struct *conn, char *inbuf,char *outbuf,int length
DEBUG(0,("send_file_readX: sendfile failed for file %s (%s). Terminating\n",
fsp->fsp_name, strerror(errno) ));
- exit_server("send_file_readX sendfile failed");
+ exit_server_cleanly("send_file_readX sendfile failed");
}
DEBUG( 3, ( "send_file_readX: sendfile fnum=%d max=%d nread=%d\n",
@@ -2743,7 +2743,7 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size,
START_PROFILE(SMBwritebraw);
if (srv_is_signing_active()) {
- exit_server("reply_writebraw: SMB signing is active - raw reads/writes are disallowed.");
+ exit_server_cleanly("reply_writebraw: SMB signing is active - raw reads/writes are disallowed.");
}
CHECK_FSP(fsp,conn);
@@ -2794,11 +2794,11 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size,
outsize = set_message(outbuf,Protocol>PROTOCOL_COREPLUS?1:0,0,True);
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf))
- exit_server("reply_writebraw: send_smb failed.");
+ exit_server_cleanly("reply_writebraw: send_smb failed.");
/* Now read the raw data into the buffer and write it */
if (read_smb_length(smbd_server_fd(),inbuf,SMB_SECONDARY_WAIT) == -1) {
- exit_server("secondary writebraw failed");
+ exit_server_cleanly("secondary writebraw failed");
}
/* Even though this is not an smb message, smb_len returns the generic length of an smb message */
@@ -2813,7 +2813,7 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size,
if (numtowrite > BUFFER_SIZE) {
DEBUG(0,("reply_writebraw: Oversize secondary write raw requested (%u). Terminating\n",
(unsigned int)numtowrite ));
- exit_server("secondary writebraw failed");
+ exit_server_cleanly("secondary writebraw failed");
}
if (tcount > nwritten+numtowrite) {
@@ -2824,7 +2824,7 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size,
if (read_data( smbd_server_fd(), inbuf+4, numtowrite) != numtowrite ) {
DEBUG(0,("reply_writebraw: Oversize secondary write raw read failed (%s). Terminating\n",
strerror(errno) ));
- exit_server("secondary writebraw failed");
+ exit_server_cleanly("secondary writebraw failed");
}
nwritten = write_file(fsp,inbuf+4,startpos+nwritten,numtowrite);
@@ -2859,7 +2859,7 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size,
* sending a SMBkeepalive. Thanks to DaveCB at Sun for this. JRA.
*/
if (!send_keepalive(smbd_server_fd()))
- exit_server("reply_writebraw: send of keepalive failed");
+ exit_server_cleanly("reply_writebraw: send of keepalive failed");
#endif
return(-1);
}
@@ -3555,7 +3555,7 @@ int reply_echo(connection_struct *conn,
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf))
- exit_server("reply_echo: send_smb failed.");
+ exit_server_cleanly("reply_echo: send_smb failed.");
}
DEBUG(3,("echo %d times\n", smb_reverb));
@@ -5571,7 +5571,7 @@ int reply_readbmpx(connection_struct *conn, char *inbuf,char *outbuf,int length,
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf))
- exit_server("reply_readbmpx: send_smb failed.");
+ exit_server_cleanly("reply_readbmpx: send_smb failed.");
total_read += nread;
startpos += nread;
@@ -5733,7 +5733,7 @@ int reply_writebmpx(connection_struct *conn, char *inbuf,char *outbuf, int size,
smb_setlen(outbuf,outsize - 4);
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf))
- exit_server("reply_writebmpx: send_smb failed.");
+ exit_server_cleanly("reply_writebmpx: send_smb failed.");
/* Now the secondary */
outsize = set_message(outbuf,1,0,True);
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index d15ca6d327..dc85969280 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -610,7 +610,7 @@ int send_trans2_replies(char *outbuf,
if(params_to_send == 0 && data_to_send == 0) {
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf))
- exit_server("send_trans2_replies: send_smb failed.");
+ exit_server_cleanly("send_trans2_replies: send_smb failed.");
return 0;
}
@@ -705,7 +705,7 @@ int send_trans2_replies(char *outbuf,
/* Send the packet */
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf))
- exit_server("send_trans2_replies: send_smb failed.");
+ exit_server_cleanly("send_trans2_replies: send_smb failed.");
pp += params_sent_thistime;
pd += data_sent_thistime;