diff options
author | Jeremy Allison <jra@samba.org> | 2011-12-15 16:55:32 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-12-16 03:32:15 +0100 |
commit | c5cbe481a759316be5d598123233cc859078d74a (patch) | |
tree | c4aba15b0a8c4421a77e679864728431ed5a6b05 /source3/smbd | |
parent | f448c0e6db1384425e78531150aa1d3f6f8bd951 (diff) | |
download | samba-c5cbe481a759316be5d598123233cc859078d74a.tar.gz samba-c5cbe481a759316be5d598123233cc859078d74a.tar.bz2 samba-c5cbe481a759316be5d598123233cc859078d74a.zip |
Third part of fix for bug #8663 - deleting a symlink fails if the symlink target is outside of the share.
smbd_check_access_rights() - we can always delete a symlink.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec 16 03:32:15 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/open.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 5abc64dc99..9174388a8b 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -99,6 +99,14 @@ NTSTATUS smbd_check_access_rights(struct connection_struct *conn, return NT_STATUS_OK; } + if (access_mask == DELETE_ACCESS && S_ISLNK(smb_fname->st.st_ex_mode)) { + /* We can always delete a symlink. */ + DEBUG(10,("smbd_check_access_rights: not checking ACL " + "on DELETE_ACCESS on symlink %s.\n", + smb_fname_str_dbg(smb_fname) )); + return NT_STATUS_OK; + } + status = SMB_VFS_GET_NT_ACL(conn, smb_fname->base_name, (SECINFO_OWNER | SECINFO_GROUP | |