diff options
author | Jeremy Allison <jra@samba.org> | 2005-02-11 20:00:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:55:38 -0500 |
commit | 0f87a9ada358020874206cf65db5c62a0a83ddbb (patch) | |
tree | 8dbd534fc1b2d8f73df7c4cf533333feba06b65e /source3/smbd/trans2.c | |
parent | daa2d8bd1f724a0016a4542a2038186e2d6b82bc (diff) | |
download | samba-0f87a9ada358020874206cf65db5c62a0a83ddbb.tar.gz samba-0f87a9ada358020874206cf65db5c62a0a83ddbb.tar.bz2 samba-0f87a9ada358020874206cf65db5c62a0a83ddbb.zip |
r5343: Fix for bug#1525. Timestamps interpreted incorrectly on 64-bit time_t values.
Jeremy.
(This used to be commit 00f8ac509aaf2f40a067f5fe5c7699ae6f26571e)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r-- | source3/smbd/trans2.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 1d925e81de..e8090792b0 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -801,21 +801,6 @@ static mode_t unix_perms_from_wire( connection_struct *conn, SMB_STRUCT_STAT *ps } /**************************************************************************** - Checks for SMB_TIME_NO_CHANGE and if not found calls interpret_long_date. -****************************************************************************/ - -time_t interpret_long_unix_date(char *p) -{ - DEBUG(10,("interpret_long_unix_date\n")); - if(IVAL(p,0) == SMB_TIME_NO_CHANGE_LO && - IVAL(p,4) == SMB_TIME_NO_CHANGE_HI) { - return -1; - } else { - return interpret_long_date(p); - } -} - -/**************************************************************************** Get a level dependent lanman2 dir entry. ****************************************************************************/ @@ -3331,7 +3316,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char tvs.modtime = MIN(write_time, changed_time); - if (write_time > tvs.modtime && write_time != 0xffffffff) { + if (write_time > tvs.modtime && write_time != (time_t)-1) { tvs.modtime = write_time; } /* Prefer a defined time to an undefined one. */ @@ -3510,8 +3495,8 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char #endif /* LARGE_SMB_OFF_T */ } pdata+=24; /* ctime & st_blocks are not changed */ - tvs.actime = interpret_long_unix_date(pdata); /* access_time */ - tvs.modtime = interpret_long_unix_date(pdata+8); /* modification_time */ + tvs.actime = interpret_long_date(pdata); /* access_time */ + tvs.modtime = interpret_long_date(pdata+8); /* modification_time */ pdata+=16; set_owner = (uid_t)IVAL(pdata,0); pdata += 8; |