Author: jra Date: 2005-09-16 20:06:10 +0000 (Fri, 16 Sep 2005) New Revision: 10276
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10276 Log: Fix for bug #3104 from Leo Weppelman <[EMAIL PROTECTED]>. 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: branches/SAMBA_3_0/source/smbd/dosmode.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/dosmode.c =================================================================== --- branches/SAMBA_3_0/source/smbd/dosmode.c 2005-09-16 20:06:07 UTC (rev 10275) +++ branches/SAMBA_3_0/source/smbd/dosmode.c 2005-09-16 20:06:10 UTC (rev 10276) @@ -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 <[EMAIL PROTECTED]> + */ + + if (!CAN_WRITE(conn)) { + return 0; + } + if(SMB_VFS_UTIME(conn,fname, times) == 0) return 0;
