diff options
author | Jeremy Allison <jra@samba.org> | 1998-02-13 07:11:58 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-02-13 07:11:58 +0000 |
commit | 2beada804a238534628398f62fe4ed9e8d2c3efd (patch) | |
tree | e937dec5b1d4b46d1d9e5cfd7b747ef550bb2db5 /source3/smbd/trans2.c | |
parent | c04291ae995b65935ef9581bfd95eebaf4354c1d (diff) | |
download | samba-2beada804a238534628398f62fe4ed9e8d2c3efd.tar.gz samba-2beada804a238534628398f62fe4ed9e8d2c3efd.tar.xz samba-2beada804a238534628398f62fe4ed9e8d2c3efd.zip |
Ding-dong the witch is dead, the witch is dead......
This is the checkin that fixes the infamous Visual C++ 'file
has changed' bug.
I feel *SO* good about that :-).
charset.c: Added (void) to fix Herb's fussy compiler.
loadparm.c: Removed "win95 bug compatibility" (didn't
like it much anyway :-). Added "dos filetime resolution"
instead.
reply.c: Added the 2 second timestamp resolution fix that the song above is about.
time.c: Removed unneeded get_access_time() function.
trans2.c : Removed unneeded "win95 bug compatibility" code.
Jeremy.
(This used to be commit 10d628e4aeaecc573de27e251fec7b91844cba40)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r-- | source3/smbd/trans2.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 2b5d5785fa0..6eda891e328 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -376,7 +376,7 @@ static int get_lanman2_dir_entry(int cnum,char *path_mask,int dirtype,int info_l size = sbuf.st_size; mdate = sbuf.st_mtime; - adate = get_access_time(&sbuf); + adate = sbuf.st_atime; cdate = get_create_time(&sbuf); if(mode & aDIR) size = 0; @@ -1139,18 +1139,9 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length, case SMB_INFO_STANDARD: case SMB_INFO_QUERY_EA_SIZE: data_size = (info_level==1?22:26); - if( lp_win95_bug_compatibility()) - { - put_dos_date(pdata,l1_fdateCreation,get_create_time(&sbuf)); - put_dos_date(pdata,l1_fdateLastAccess,get_access_time(&sbuf)); - put_dos_date(pdata,l1_fdateLastWrite,sbuf.st_mtime); /* write time */ - } - else - { - put_dos_date2(pdata,l1_fdateCreation,get_create_time(&sbuf)); - put_dos_date2(pdata,l1_fdateLastAccess,get_access_time(&sbuf)); - put_dos_date2(pdata,l1_fdateLastWrite,sbuf.st_mtime); /* write time */ - } + put_dos_date2(pdata,l1_fdateCreation,get_create_time(&sbuf)); + put_dos_date2(pdata,l1_fdateLastAccess,sbuf.st_atime); + put_dos_date2(pdata,l1_fdateLastWrite,sbuf.st_mtime); /* write time */ SIVAL(pdata,l1_cbFile,size); SIVAL(pdata,l1_cbFileAlloc,ROUNDUP(size,1024)); SSVAL(pdata,l1_attrFile,mode); @@ -1160,7 +1151,7 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length, case SMB_INFO_QUERY_EAS_FROM_LIST: data_size = 24; put_dos_date2(pdata,0,get_create_time(&sbuf)); - put_dos_date2(pdata,4,get_access_time(&sbuf)); + put_dos_date2(pdata,4,sbuf.st_atime); put_dos_date2(pdata,8,sbuf.st_mtime); SIVAL(pdata,12,size); SIVAL(pdata,16,ROUNDUP(size,1024)); @@ -1178,7 +1169,7 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length, case SMB_QUERY_FILE_BASIC_INFO: data_size = 36; /* w95 returns 40 bytes not 36 - why ?. */ put_long_date(pdata,get_create_time(&sbuf)); - put_long_date(pdata+8,get_access_time(&sbuf)); + put_long_date(pdata+8,sbuf.st_atime); put_long_date(pdata+16,sbuf.st_mtime); /* write time */ put_long_date(pdata+24,sbuf.st_mtime); /* change time */ SIVAL(pdata,32,mode); @@ -1187,9 +1178,8 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length, { time_t create_time = get_create_time(&sbuf); DEBUG(5,("create: %s ", ctime(&create_time))); - create_time = get_access_time(&sbuf); - DEBUG(5,("access: %s ", ctime(&create_time))); } + DEBUG(5,("access: %s ", ctime(&sbuf.st_atime))); DEBUG(5,("write: %s ", ctime(&sbuf.st_mtime))); DEBUG(5,("change: %s ", ctime(&sbuf.st_mtime))); DEBUG(5,("mode: %x\n", mode)); @@ -1243,7 +1233,7 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length, case SMB_QUERY_FILE_ALL_INFO: put_long_date(pdata,get_create_time(&sbuf)); - put_long_date(pdata+8,get_access_time(&sbuf)); + put_long_date(pdata+8,sbuf.st_atime); put_long_date(pdata+16,sbuf.st_mtime); /* write time */ put_long_date(pdata+24,sbuf.st_mtime); /* change time */ SIVAL(pdata,32,mode); |