summaryrefslogtreecommitdiff
path: root/source3/smbd/error.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-10-02 17:26:44 +0000
committerJeremy Allison <jra@samba.org>2003-10-02 17:26:44 +0000
commit64f88c008cc4f047ecd8e457fbdcafde32e9def5 (patch)
treea7ab134165f85e688f7c8f2d89808d1f7000d318 /source3/smbd/error.c
parent418749050ba387a4657cc23dfb86cf06548703cf (diff)
downloadsamba-64f88c008cc4f047ecd8e457fbdcafde32e9def5.tar.gz
samba-64f88c008cc4f047ecd8e457fbdcafde32e9def5.tar.bz2
samba-64f88c008cc4f047ecd8e457fbdcafde32e9def5.zip
Correct fix for excel read-only bug. Add panic for logic error in developer mode.
Jeremy. (This used to be commit 0857932c1c1960fd68a10f3d1f8c300b7a28b6d7)
Diffstat (limited to 'source3/smbd/error.c')
-rw-r--r--source3/smbd/error.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index 7eec5e25df..795bf0949c 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -61,6 +61,9 @@ int unix_error_packet(char *outbuf,int def_class,uint32 def_code,
eclass = unix_ERR_class;
ecode = unix_ERR_code;
ntstatus = unix_ERR_ntstatus;
+ unix_ERR_class = SMB_SUCCESS;
+ unix_ERR_code = 0;
+ unix_ERR_ntstatus = NT_STATUS_OK;
} else {
while (unix_dos_nt_errmap[i].dos_class != 0) {
if (unix_dos_nt_errmap[i].unix_error == errno) {
@@ -90,9 +93,10 @@ int error_packet(char *outbuf,NTSTATUS ntstatus,
if (errno != 0)
DEBUG(3,("error string = %s\n",strerror(errno)));
- unix_ERR_class = SMB_SUCCESS;
- unix_ERR_code = 0;
- unix_ERR_ntstatus = NT_STATUS_OK;
+#if defined(DEVELOPER)
+ if (unix_ERR_class != SMB_SUCCESS || unix_ERR_code != 0 || !NT_STATUS_IS_OK(unix_ERR_ntstatus))
+ smb_panic("logic error in error processing");
+#endif
/*
* We can explicitly force 32 bit error codes even when the