How to set only last accessed timestamp

Satwik Hebbar satwikh at calsoftinc.com
Wed Jun 15 11:25:37 GMT 2005


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
------------------------------------------------------------


More information about the samba-technical mailing list