summaryrefslogtreecommitdiffstats
path: root/source/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-10-02 17:26:42 +0000
committerJeremy Allison <jra@samba.org>2003-10-02 17:26:42 +0000
commitf00af98f379463829b1ef62d78dda0365c1d7997 (patch)
tree2b093679daa27f9e6042ed13f8a746057d165ede /source/smbd
parent227882d6f79fb5909998996e1be08df723c49e8e (diff)
downloadsamba-f00af98f379463829b1ef62d78dda0365c1d7997.tar.gz
samba-f00af98f379463829b1ef62d78dda0365c1d7997.tar.xz
samba-f00af98f379463829b1ef62d78dda0365c1d7997.zip
Correct fix for excel read-only bug. Add panic for logic error in developer mode.
Jeremy.
Diffstat (limited to 'source/smbd')
-rw-r--r--source/smbd/error.c10
-rw-r--r--source/smbd/trans2.c3
2 files changed, 7 insertions, 6 deletions
diff --git a/source/smbd/error.c b/source/smbd/error.c
index 7eec5e25dfb..795bf0949cc 100644
--- a/source/smbd/error.c
+++ b/source/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
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 033e76a33e1..ee63220d188 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -1785,12 +1785,9 @@ int set_bad_path_error(int err, BOOL bad_path, char *outbuf, int def_class, uint
err, (int)bad_path ));
if(err == ENOENT) {
- unix_ERR_class = ERRDOS;
if (bad_path) {
- unix_ERR_code = ERRbadpath;
return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND);
} else {
- unix_ERR_code = ERRbadfile;
return ERROR_NT(NT_STATUS_OBJECT_NAME_NOT_FOUND);
}
}