Bug 6972 - Files copied to redirected drive from Windows client gets bad access/modify timestamps
Summary: Files copied to redirected drive from Windows client gets bad access/modify t...
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Local drive redirection (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.10.1
Assignee: Pierre Ossman
URL:
Keywords: relnotes
Depends on:
Blocks:
 
Reported: 2017-05-15 16:02 CEST by Karl Mikaelsson
Modified: 2019-05-28 12:38 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Comment 1 Karl Mikaelsson cendio 2017-05-15 16:26:42 CEST
(In reply to comment #0)
> argle-bargle
(damnit, sloppy fingers)

With the ThinLinc Client for Windows, version >= 4.1.1 (confirmed with 4.7.0, 4.8.0rc1, customer reports everything works with 4.0.0 and 4.1.1 clients):

Inside a ThinLinc session with "My Documents" exported:

> cd thindrives/MyDocuments
> cp example.jpg example2.jpg
> stat example.jpg example2.jpg
>
>   File: `example.jpg'
>   Size: 0         	Blocks: 0          IO Block: 524288 regular empty file
> Device: 1dh/29d	Inode: 56002261    Links: 1
> Access: (0666/-rw-rw-rw-)  Uid: ( 4030/ derfian)   Gid: (21025/ derfian)
> Access: 2013-06-17 17:20:12.000000000 +0200
> Modify: 2013-06-17 17:20:12.000000000 +0200
> Change: 2013-06-17 17:20:12.000000000 +0200
>
>   File: `example2.jpg'
>   Size: 0         	Blocks: 0          IO Block: 524288 regular empty file
> Device: 1dh/29d	Inode: 2875425527  Links: 1
> Access: (0666/-rw-rw-rw-)  Uid: ( 4030/ derfian)   Gid: (21025/ derfian)
> Access: 2106-02-07 07:28:15.000000000 +0100
> Modify: 2106-02-07 07:28:15.000000000 +0100
> Change: 2106-02-07 07:28:15.000000000 +0100

Expected timestamps (or thereabouts):

> $ date
> mån maj 15 16:24:05 CEST 2017

Actual date:

> $ date --date="2106-02-07 07:28" +%s
> 4294967280

> $ echo "obase=16; $(date --date="2106-02-07 07:28:00" +%s)" | bc
> FFFFFFF0


These are not the time stamps I or the customer were expecting.
Comment 3 Pierre Ossman cendio 2019-05-24 10:35:05 CEST
This also happens when you create a file but do not write to it. E.g. this simple python program:

> #!/usr/bin/python3
> 
> import os
> 
> fd = os.open("test.tmp", os.O_RDWR | os.O_CREAT | os.O_TRUNC | os.O_EXCL)
> os.close(fd)

Result:

>   Fil: test.tmp
>   Storlek: 0         	Block: 0          IO-block: 524288 tom normal fil
> Enhet: 4eh/78d	Inode: 1575220049  Länkar:1
> Åtkomst: (0666/-rw-rw-rw-)  Uid: (  500/  tltest)  Gid: (  500/  tltest)
> Kontext: system_u:object_r:nfs_t:s0
>     Åtkomst: 2106-02-07 07:28:15.000000000 +0100
> Modifiering: 2106-02-07 07:28:15.000000000 +0100
>     Ändring: 2106-02-07 07:28:15.000000000 +0100
>        Född: -

Might be improved by bug 5560 which does an overhaul of the O_EXCL handling.
Comment 6 Pierre Ossman cendio 2019-05-24 12:04:12 CEST
Works well now after bug 5560 got fixed.
Comment 7 Peter Åstrand cendio 2019-05-28 12:38:29 CEST
Works fine with build 6138 on Windows 7, using "MyDocuments". Tested both copying an existing file, as well as creating a new file with the Python code mentioned in comment #3.

Note You need to log in before you can comment on or make changes to this bug.