[Samba] samba 3.0, excel 2000, read-only problem

Jeremy Allison jra at samba.org
Thu Oct 2 00:53:43 GMT 2003


On Wed, Oct 01, 2003 at 10:33:12AM +0500, Dmitry Melekhov wrote:
> Jeremy Allison wrote:
> > On Wed, Oct 01, 2003 at 08:11:54AM +0500, Dmitry Melekhov wrote:
> > 
> >>Hello!
> >>
> >>I just tried to move one of our servers to samba 3.0 and found that it 
> >>has problems with read-only excel files.
> >>Excel simply can't open them.
> >>On 2.2.8a Excel successefully opens read-only files.
> >>
> >>Server is Suse 8.1, kernel 2.4.20.
> > 
> > 
> > What version of Excel please ?
> 
> 
> Oops! Sorry!
> Excel 2000. 9.0.4402 SR-1

Ok, here is a quick patch for the problem of not opening
Excel file read-only. I'll tidy this up somewhat for 3.0.1
but it should tide you over with 3.0.0.

Thanks for the report.

Jeremy.

Index: smbd/error.c
===================================================================
RCS file: /data/cvs/samba/source/smbd/error.c,v
retrieving revision 1.16.2.1
diff -u -r1.16.2.1 error.c
--- smbd/error.c        5 Nov 2002 21:47:03 -0000       1.16.2.1
+++ smbd/error.c        2 Oct 2003 00:52:33 -0000
@@ -61,9 +61,6 @@
                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 @@
        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




More information about the samba mailing list