diff options
author | Jeremy Allison <jra@samba.org> | 1997-09-23 19:19:06 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1997-09-23 19:19:06 +0000 |
commit | 81eb442e88e8231b8e9c556c1ee393e99269af78 (patch) | |
tree | 0d9d7fda9d4556ef4bfb329fd9321b24c84f8c41 /source3/smbd/reply.c | |
parent | b3c610541b7284cbd59827b13af86a457268ae96 (diff) | |
download | samba-81eb442e88e8231b8e9c556c1ee393e99269af78.tar.gz samba-81eb442e88e8231b8e9c556c1ee393e99269af78.tar.xz samba-81eb442e88e8231b8e9c556c1ee393e99269af78.zip |
Checkin to sync up oplock development code so that NT
domain development code won't diverge.
Makefile: Fixed make proto (again). Added GLIBC2 fixes for Linux.
includes.h: Added GLIBC2 fixes for Linux.
proto.h: Much tidier.
quotas.c: OSF/1 quota fix.
reply.c: Fix from Ray Frush <frush@engr.colostate.edu> for zero NT timestamps.
server.c util.c: First oplock checkin - nowhere near finished so bracketed
with #ifdef USE_OPLOCKS. Done to make sync with NT domain code easier.
Jeremy (jallison@whistle.com)
(This used to be commit 7dce7d84473beb5663b14a8ab32781970819c19d)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 09c4e29416b..81176856377 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3610,11 +3610,31 @@ int reply_setattrE(char *inbuf,char *outbuf) unix_times.actime = make_unix_date2(inbuf+smb_vwv3); unix_times.modtime = make_unix_date2(inbuf+smb_vwv5); + /* + * Patch from Ray Frush <frush@engr.colostate.edu> + * Sometimes times are sent as zero - ignore them. + */ + + if ((unix_times.actime == 0) && (unix_times.modtime == 0)) + { + /* Ignore request */ + DEBUG(3,("%s reply_setattrE fnum=%d cnum=%d ignoring zero request - \ +not setting timestamps of 0\n", + timestring(), fnum,cnum,unix_times.actime,unix_times.modtime)); + return(outsize); + } + else if ((unix_times.actime != 0) && (unix_times.modtime == 0)) + { + /* set modify time = to access time if modify time was 0 */ + unix_times.modtime = unix_times.actime; + } + /* Set the date on this file */ if(sys_utime(Files[fnum].name, &unix_times)) return(ERROR(ERRDOS,ERRnoaccess)); - DEBUG(3,("%s reply_setattrE fnum=%d cnum=%d\n",timestring(),fnum,cnum)); + DEBUG(3,("%s reply_setattrE fnum=%d cnum=%d actime=%d modtime=%d\n", + timestring(), fnum,cnum,unix_times.actime,unix_times.modtime)); return(outsize); } |