summaryrefslogtreecommitdiff
path: root/source3/libsmb/clifile.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-08-24 16:44:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:48 -0500
commita64925ddff467a47f7adfac4b1b977ddc0c7f4ef (patch)
tree0c228a2046097065d34dc62a744747509689e09c /source3/libsmb/clifile.c
parent26f55cb40de4556774ac3a4ef0e46003d85477a4 (diff)
downloadsamba-a64925ddff467a47f7adfac4b1b977ddc0c7f4ef.tar.gz
samba-a64925ddff467a47f7adfac4b1b977ddc0c7f4ef.tar.bz2
samba-a64925ddff467a47f7adfac4b1b977ddc0c7f4ef.zip
r17800: Start using struct timespec internally for file times
on the wire. This allows us to go to nsec resolution for systems that support it. It should also now be easy to add a correct "create time" (birth time) for systems that support it (*BSD). I'll be watching the build farm closely after this one for breakage :-). Jeremy. (This used to be commit 425280a1d23f97ef0b0be77462386d619f47b21d)
Diffstat (limited to 'source3/libsmb/clifile.c')
-rw-r--r--source3/libsmb/clifile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 9beafc55fb..fb07dae427 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -266,9 +266,10 @@ BOOL cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbu
/* assume 512 byte blocks */
sbuf->st_blocks /= 512;
#endif
- sbuf->st_ctime = interpret_long_date(rdata + 16); /* time of last change */
- sbuf->st_atime = interpret_long_date(rdata + 24); /* time of last access */
- sbuf->st_mtime = interpret_long_date(rdata + 32); /* time of last modification */
+ set_ctimespec(sbuf, interpret_long_date(rdata + 16)); /* time of last change */
+ set_atimespec(sbuf, interpret_long_date(rdata + 24)); /* time of last access */
+ set_mtimespec(sbuf, interpret_long_date(rdata + 32)); /* time of last modification */
+
sbuf->st_uid = (uid_t) IVAL(rdata,40); /* user ID of owner */
sbuf->st_gid = (gid_t) IVAL(rdata,48); /* group ID of owner */
sbuf->st_mode |= unix_filetype_from_wire(IVAL(rdata, 56));