Bug 2663 - Improper timestamps set in cli_setattrE and cli_setatr
Summary: Improper timestamps set in cli_setattrE and cli_setatr
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.0.14a
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-27 23:47 UTC by Satwik Hebbar
Modified: 2005-08-24 10:18 UTC (History)
0 users

See Also:


Attachments
Patch for time.c (2.46 KB, patch)
2005-04-27 23:49 UTC, Satwik Hebbar
no flags Details
Patch for clifile.c (352 bytes, patch)
2005-04-27 23:57 UTC, Satwik Hebbar
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Satwik Hebbar 2005-04-27 23:47:15 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.
Comment 1 Satwik Hebbar 2005-04-27 23:49:33 UTC
Created attachment 1186 [details]
Patch for time.c

Patches for the make_unix_date3 and put_dos_date3 functions.
Comment 2 Satwik Hebbar 2005-04-27 23:57:16 UTC
Created attachment 1187 [details]
Patch for clifile.c

Patch for the cli_setatr function.
Comment 3 Derrell Lipman 2005-05-12 05:56:40 UTC
wrong timestamp formatting and parsing functions were being called.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:18:14 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.