diff options
author | Jeremy Allison <jra@samba.org> | 2005-10-11 04:25:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:04:55 -0500 |
commit | 3ecf9119d5055b0706c485eeba8df1bd898de4ee (patch) | |
tree | cd9f5930f167a6cb83365061eda520e6845cdf4b /source3/smbd/dosmode.c | |
parent | 8ec32e008a2309e04d954bd7c6740740735628db (diff) | |
download | samba-3ecf9119d5055b0706c485eeba8df1bd898de4ee.tar.gz samba-3ecf9119d5055b0706c485eeba8df1bd898de4ee.tar.bz2 samba-3ecf9119d5055b0706c485eeba8df1bd898de4ee.zip |
r10885: Fix bug where read-only share files are always seen as
read-only. Noticed by Andrew Bartlett.
Jeremy
(This used to be commit a33f4f0d2afe28ca0e3ab6c9ecfcdbaa267a7fbe)
Diffstat (limited to 'source3/smbd/dosmode.c')
-rw-r--r-- | source3/smbd/dosmode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index efbd5f04cb..6aee6ba426 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -479,7 +479,7 @@ int file_utime(connection_struct *conn, const char *fname, struct utimbuf *times */ /* Check if we have write access. */ - if (can_write_to_file(conn, fname, &sbuf)) { + if (CAN_WRITE(conn) && can_write_to_file(conn, fname, &sbuf)) { /* We are allowed to become root and change the filetime. */ become_root(); ret = SMB_VFS_UTIME(conn,fname, times); |