From 3ecf9119d5055b0706c485eeba8df1bd898de4ee Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 11 Oct 2005 04:25:47 +0000 Subject: 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) --- source3/smbd/dosmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/smbd/dosmode.c') 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); -- cgit