summaryrefslogtreecommitdiffstats
path: root/source/libsmb/clirap.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-08-23 22:33:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:47 -0500
commit42a417fb75313b093948602c3be8e2f386048b5f (patch)
tree61f01c24d11d0c60e06acbe2fbc6ecef0a63b3b4 /source/libsmb/clirap.c
parent03a767539d5b09ebd6564c0c9157de2a6e0e6b89 (diff)
downloadsamba-42a417fb75313b093948602c3be8e2f386048b5f.tar.gz
samba-42a417fb75313b093948602c3be8e2f386048b5f.tar.xz
samba-42a417fb75313b093948602c3be8e2f386048b5f.zip
r17761: Handle times consistently across all client utils.
Fixes bugs reported in libsmbclient. Jeremy.
Diffstat (limited to 'source/libsmb/clirap.c')
-rw-r--r--source/libsmb/clirap.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/source/libsmb/clirap.c b/source/libsmb/clirap.c
index a33baed5363..1227b26b2ff 100644
--- a/source/libsmb/clirap.c
+++ b/source/libsmb/clirap.c
@@ -553,9 +553,10 @@ BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
/****************************************************************************
send a qpathinfo call with the SMB_QUERY_FILE_ALL_INFO info level
****************************************************************************/
+
BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname,
- time_t *c_time, time_t *a_time, time_t *m_time,
- time_t *w_time, SMB_OFF_T *size, uint16 *mode,
+ time_t *create_time, time_t *access_time, time_t *write_time,
+ time_t *change_time, SMB_OFF_T *size, uint16 *mode,
SMB_INO_T *ino)
{
unsigned int data_len = 0;
@@ -593,17 +594,17 @@ BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname,
return False;
}
- if (c_time) {
- *c_time = interpret_long_date(rdata+0);
+ if (create_time) {
+ *create_time = interpret_long_date(rdata+0);
}
- if (a_time) {
- *a_time = interpret_long_date(rdata+8);
+ if (access_time) {
+ *access_time = interpret_long_date(rdata+8);
}
- if (w_time) {
- *w_time = interpret_long_date(rdata+16);
+ if (write_time) {
+ *write_time = interpret_long_date(rdata+16);
}
- if (m_time) {
- *m_time = interpret_long_date(rdata+24);
+ if (change_time) {
+ *change_time = interpret_long_date(rdata+24);
}
if (mode) {
*mode = SVAL(rdata, 32);
@@ -669,8 +670,8 @@ send a qfileinfo call
****************************************************************************/
BOOL cli_qfileinfo(struct cli_state *cli, int fnum,
uint16 *mode, SMB_OFF_T *size,
- time_t *c_time, time_t *a_time, time_t *m_time,
- time_t *w_time, SMB_INO_T *ino)
+ time_t *create_time, time_t *access_time, time_t *write_time,
+ time_t *change_time, SMB_INO_T *ino)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
@@ -708,17 +709,17 @@ BOOL cli_qfileinfo(struct cli_state *cli, int fnum,
return False;
}
- if (c_time) {
- *c_time = interpret_long_date(rdata+0) - cli->serverzone;
+ if (create_time) {
+ *create_time = interpret_long_date(rdata+0);
}
- if (a_time) {
- *a_time = interpret_long_date(rdata+8) - cli->serverzone;
+ if (access_time) {
+ *access_time = interpret_long_date(rdata+8);
}
- if (m_time) {
- *m_time = interpret_long_date(rdata+16) - cli->serverzone;
+ if (write_time) {
+ *write_time = interpret_long_date(rdata+16);
}
- if (w_time) {
- *w_time = interpret_long_date(rdata+24) - cli->serverzone;
+ if (change_time) {
+ *change_time = interpret_long_date(rdata+24);
}
if (mode) {
*mode = SVAL(rdata, 32);
@@ -793,9 +794,9 @@ BOOL cli_qpathinfo_basic( struct cli_state *cli, const char *name,
return False;
}
- sbuf->st_atime = interpret_long_date( rdata+8 );
- sbuf->st_mtime = interpret_long_date( rdata+16 );
- sbuf->st_ctime = interpret_long_date( rdata+24 );
+ sbuf->st_atime = interpret_long_date( rdata+8 ); /* Access time. */
+ sbuf->st_mtime = interpret_long_date( rdata+16 ); /* Write time. */
+ sbuf->st_ctime = interpret_long_date( rdata+24 ); /* Change time. */
*attributes = IVAL( rdata, 32 );