samba-technical@lists.samba.org
[Top] [All Lists]

How to set only last accessed timestamp

Subject: How to set only last accessed timestamp
From: "Satwik Hebbar"
Date: Wed, 15 Jun 2005 16:55:37 +0530

Hi everyone,

I am using the libsmbclient functionality that we get with samba to connect to Windows servers and access files. When we touch the files, the last accessed timestamp changes on them, and so I use the cli_setattrE() api provided in libsmb/clifile.c to reset the timestamps back to the original. The problem is that it seems there is a small rounding error of +/- 2 secs that occurs on the set action. The cli_setattrE() call accepts all 3 timestamp parameters, so that even the created timestamp and last modified timestamp are incorrectly set.

Is there a way to set only the last accessed timestamp without touching the other two? Because, a lot of programs on the windows servers are highly dependent on these timestamps and it could lead to unsolicited actions occuring on the files, simply because their timestamps have moved forward or behind.

Thanks,
Satwik.


--
------------------------------------------------------------
If you're free you'll never see the walls
If you're head is clear you'll never freefall
If you're out right you never fear the wrong
If you're head is high you never fear at all
------------------------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>