summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-10-02 00:55:20 +0000
committerJeremy Allison <jra@samba.org>2003-10-02 00:55:20 +0000
commit418749050ba387a4657cc23dfb86cf06548703cf (patch)
treeecac063898beb483d63d8c10e9cc49bca86305cc /source3/smbd
parente9568f8df282a8de58d077fb88b54b43023795ca (diff)
downloadsamba-418749050ba387a4657cc23dfb86cf06548703cf.tar.gz
samba-418749050ba387a4657cc23dfb86cf06548703cf.tar.bz2
samba-418749050ba387a4657cc23dfb86cf06548703cf.zip
Fix for not opening Excel 2000 files that are read-only. Needs tidying
up but works for now. Jeremy. (This used to be commit d9b9113a0815aeeddb8fdcccb64e7692fe02a9c2)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/error.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index 9d0e34bf52..7eec5e25df 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -61,9 +61,6 @@ 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) {
@@ -93,6 +90,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;
+
/*
* We can explicitly force 32 bit error codes even when the
* parameter "nt status" is set to no by pre-setting the