svn commit: samba r10275 - in trunk/source/smbd: .
jra at samba.org
jra at samba.org
Fri Sep 16 20:06:08 GMT 2005
Author: jra
Date: 2005-09-16 20:06:07 +0000 (Fri, 16 Sep 2005)
New Revision: 10275
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10275
Log:
Fix for bug #3104 from Leo Weppelman <leo at wau.mis.ah.nl>.
Don't update the time on read-only shares.
We need this as set_filetime (which can be called on
close and other paths) can end up calling this function
without the NEED_WRITE protection.
Jeremy.
Modified:
trunk/source/smbd/dosmode.c
Changeset:
Modified: trunk/source/smbd/dosmode.c
===================================================================
--- trunk/source/smbd/dosmode.c 2005-09-16 19:31:41 UTC (rev 10274)
+++ trunk/source/smbd/dosmode.c 2005-09-16 20:06:07 UTC (rev 10275)
@@ -451,6 +451,17 @@
errno = 0;
ZERO_STRUCT(sbuf);
+ /* Don't update the time on read-only shares */
+ /* We need this as set_filetime (which can be called on
+ close and other paths) can end up calling this function
+ without the NEED_WRITE protection. Found by :
+ Leo Weppelman <leo at wau.mis.ah.nl>
+ */
+
+ if (!CAN_WRITE(conn)) {
+ return 0;
+ }
+
if(SMB_VFS_UTIME(conn,fname, times) == 0)
return 0;
More information about the samba-cvs
mailing list