Samba 2.0.6, MKS' touch.exe, and file/dir time stamps

Gert-Jan Vons pluizer at my-deja.com
Wed Dec 1 13:16:04 GMT 1999


"H.-P. Ermert" <ermert at snafu.de> wrote:

>I changed the source of smbd/dosmode.c but this did not change the 
>behaviour in my case.
>
>Then I looked for any differences between smbd 2.0.5a and 2.0.6 because 
>2.0.5a produces correct file times here.
>
>I found a difference in smbd/trans2.c line 2355 :
>
>trans2.c in 2.0.5a:
>       /* write time + changed time, combined. */
>       tvs.modtime=MAX(interpret_long_date(pdata+16),
>                       interpret_long_date(pdata+24));
>
>trans2.c in 2.0.6:
>       /* write time + changed time, combined. */
>       tvs.modtime=MIN(interpret_long_date(pdata+16),
>                       interpret_long_date(pdata+24));
>
>After replacing MIN in the new (2.0.6) file by MAX the filetime after a 
>touch or when copying a file seems to be ok. I did no further testing 
>and did not go into further details, hope you can check if this is the 
>correct place to fix the problem. I will observe the new behaviour after 
>the patch.

I did the same thing (replace MIN by MAX), and this seems to fix our 
problems as well. I have removed the "nt smb support=false" work-around 
from my smb.conf, and hope this fix makes it into a future 2.0.7 :)




More information about the samba mailing list