summaryrefslogtreecommitdiffstats
path: root/source/smbd/posix_acls.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-10-11 04:25:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:04:55 -0500
commita33f4f0d2afe28ca0e3ab6c9ecfcdbaa267a7fbe (patch)
treed14609327b69b9a4f79143111d5a121e2507ddeb /source/smbd/posix_acls.c
parentef3845366bc883e735b2008243b7c05a403f42ca (diff)
downloadsamba-a33f4f0d2afe28ca0e3ab6c9ecfcdbaa267a7fbe.tar.gz
samba-a33f4f0d2afe28ca0e3ab6c9ecfcdbaa267a7fbe.tar.xz
samba-a33f4f0d2afe28ca0e3ab6c9ecfcdbaa267a7fbe.zip
r10885: Fix bug where read-only share files are always seen as
read-only. Noticed by Andrew Bartlett. Jeremy
Diffstat (limited to 'source/smbd/posix_acls.c')
-rw-r--r--source/smbd/posix_acls.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c
index f1c9426676a..818bf95b3f9 100644
--- a/source/smbd/posix_acls.c
+++ b/source/smbd/posix_acls.c
@@ -4149,16 +4149,13 @@ BOOL can_delete_file_in_directory(connection_struct *conn, const char *fname)
/****************************************************************************
Actually emulate the in-kernel access checking for write access. We need
this to successfully check for ability to write for dos filetimes.
+ Note this doesn't take into account share write permissions.
****************************************************************************/
BOOL can_write_to_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf)
{
int ret;
- if (!CAN_WRITE(conn)) {
- return False;
- }
-
if (current_user.uid == 0 || conn->admin_user) {
/* I'm sorry sir, I didn't know you were root... */
return True;