SAMBA digest 1588

Jeremy Allison jallison at whistle.com
Fri Feb 13 18:32:34 GMT 1998


Richard Colley wrote:
> 
> I'm confused.  Why has the VC++5.x problem only started occurring in
> 1.9.18x.
> 
> We have successfully been using VC5 with 1.9.17p4 for some time with no such
> problems.
> So, what's differrent between 1.9.17 & 1.9.18 that caused this problem to
> manifest itself?

In a word - oplocks. The Windows redirector just
behaves completely differently (some would say
goes crazy :-) when told it can use oplocks.

It starts to check the time in two different
ways - but the good news is that the statement
I made below :

> >I'm adding an option for p3, "win95 bug compatibility"
> >which causes Samba to return mtime for atime, and
> >swap the byte order of a date in one return call
> >(as Win95 does) - this seems to make the problem
> >much better (although it does still occasionally
> >occur).

- is now completely wrong. I've actually found and
fixed the bug completely and the fix will be in
1.9.18p3 (next week).

For those of you who need VC++ and oplocks *now*
(with 1.9.18p2) and can't wait until 1.9.18p3,
here's the fix (full explaination in the release
notes of 1.9.18p3).

Jeremy Allison,
Samba Team.

----------------cut here for patch to 1.9.18p2 for VC++-------
*** reply.c.orig        Thu Feb 12 12:43:04 1998
--- reply.c     Thu Feb 12 12:43:55 1998
***************
*** 779,785 ****
    outsize = set_message(outbuf,10,0,True);
  
    SSVAL(outbuf,smb_vwv0,mode);
!   put_dos_date3(outbuf,smb_vwv1,mtime);
    SIVAL(outbuf,smb_vwv3,size);
  
    if (Protocol >= PROTOCOL_NT1) {
--- 779,785 ----
    outsize = set_message(outbuf,10,0,True);
  
    SSVAL(outbuf,smb_vwv0,mode);
!   put_dos_date3(outbuf,smb_vwv1,mtime & ~1);
    SIVAL(outbuf,smb_vwv3,size);
  
    if (Protocol >= PROTOCOL_NT1) {
***************
*** 1231,1237 ****
    outsize = set_message(outbuf,7,0,True);
    SSVAL(outbuf,smb_vwv0,fnum);
    SSVAL(outbuf,smb_vwv1,fmode);
!   put_dos_date3(outbuf,smb_vwv2,mtime);
    SIVAL(outbuf,smb_vwv4,size);
    SSVAL(outbuf,smb_vwv6,rmode);
  
--- 1231,1237 ----
    outsize = set_message(outbuf,7,0,True);
    SSVAL(outbuf,smb_vwv0,fnum);
    SSVAL(outbuf,smb_vwv1,fmode);
!   put_dos_date3(outbuf,smb_vwv2,mtime & ~1);
    SIVAL(outbuf,smb_vwv4,size);
    SSVAL(outbuf,smb_vwv6,rmode);
  
***************
*** 1357,1363 ****
    set_message(outbuf,15,0,True);
    SSVAL(outbuf,smb_vwv2,fnum);
    SSVAL(outbuf,smb_vwv3,fmode);
!   put_dos_date3(outbuf,smb_vwv4,mtime);
    SIVAL(outbuf,smb_vwv6,size);
    SSVAL(outbuf,smb_vwv8,rmode);
    SSVAL(outbuf,smb_vwv11,smb_action);
--- 1357,1363 ----
    set_message(outbuf,15,0,True);
    SSVAL(outbuf,smb_vwv2,fnum);
    SSVAL(outbuf,smb_vwv3,fmode);
!   put_dos_date3(outbuf,smb_vwv4,mtime & ~1);
    SIVAL(outbuf,smb_vwv6,size);
    SSVAL(outbuf,smb_vwv8,rmode);
    SSVAL(outbuf,smb_vwv11,smb_action);
---------*** reply.c.orig        Thu Feb 12 12:43:04 1998
--- reply.c     Thu Feb 12 12:43:55 1998
***************
*** 779,785 ****
    outsize = set_message(outbuf,10,0,True);
  
    SSVAL(outbuf,smb_vwv0,mode);
!   put_dos_date3(outbuf,smb_vwv1,mtime);
    SIVAL(outbuf,smb_vwv3,size);
  
    if (Protocol >= PROTOCOL_NT1) {
--- 779,785 ----
    outsize = set_message(outbuf,10,0,True);
  
    SSVAL(outbuf,smb_vwv0,mode);
!   put_dos_date3(outbuf,smb_vwv1,mtime & ~1);
    SIVAL(outbuf,smb_vwv3,size);
  
    if (Protocol >= PROTOCOL_NT1) {
***************
*** 1231,1237 ****
    outsize = set_message(outbuf,7,0,True);
    SSVAL(outbuf,smb_vwv0,fnum);
    SSVAL(outbuf,smb_vwv1,fmode);
!   put_dos_date3(outbuf,smb_vwv2,mtime);
    SIVAL(outbuf,smb_vwv4,size);
    SSVAL(outbuf,smb_vwv6,rmode);
  
--- 1231,1237 ----
    outsize = set_message(outbuf,7,0,True);
    SSVAL(outbuf,smb_vwv0,fnum);
    SSVAL(outbuf,smb_vwv1,fmode);
!   put_dos_date3(outbuf,smb_vwv2,mtime & ~1);
    SIVAL(outbuf,smb_vwv4,size);
    SSVAL(outbuf,smb_vwv6,rmode);
  
***************
*** 1357,1363 ****
    set_message(outbuf,15,0,True);
    SSVAL(outbuf,smb_vwv2,fnum);
    SSVAL(outbuf,smb_vwv3,fmode);
!   put_dos_date3(outbuf,smb_vwv4,mtime);
    SIVAL(outbuf,smb_vwv6,size);
    SSVAL(outbuf,smb_vwv8,rmode);
    SSVAL(outbuf,smb_vwv11,smb_action);
--- 1357,1363 ----
    set_message(outbuf,15,0,True);
    SSVAL(outbuf,smb_vwv2,fnum);
    SSVAL(outbuf,smb_vwv3,fmode);
!   put_dos_date3(outbuf,smb_vwv4,mtime & ~1);
    SIVAL(outbuf,smb_vwv6,size);
    SSVAL(outbuf,smb_vwv8,rmode);
    SSVAL(outbuf,smb_vwv11,smb_action);
--------------end patch------------------------
 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------


More information about the samba mailing list