The Samba-Bugzilla – Bug 2663
Improper timestamps set in cli_setattrE and cli_setatr
Last modified: 2005-08-24 10:18:14 UTC
The libsmbclient sets improper times on files when cli_setattrE function is
used. This is because it does call a function put_dos_date3 to convert the times
to dos format, but the function does not really do anything other than adding a
few hours to convert the localtime to GMT time.
Also, cli_setatr does a conversion to the dos format when it should not be doing
so. The function however works (with the discrepancy of a few hours) because the
conversion never really happens in time.c.
I am attaching the patches as diff -u oldfile newfile.
The first patch is for time.c amd the next for clifile.c.
Created attachment 1186 [details]
Patch for time.c
Patches for the make_unix_date3 and put_dos_date3 functions.
Created attachment 1187 [details]
Patch for clifile.c
Patch for the cli_setatr function.
wrong timestamp formatting and parsing functions were being called.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.