summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-01-05 11:33:48 -0800
committerKarolin Seeger <kseeger@samba.org>2016-02-24 11:38:53 +0100
commite1825c8138135226fbf9ca685edd4b44aac40220 (patch)
tree2e5d8ee2cda4c5c3da01d018473f945f31675893 /source3
parent63a27a313a44ff8f3a37dcb695ad437fb847dfa0 (diff)
downloadsamba-e1825c8138135226fbf9ca685edd4b44aac40220.tar.gz
CVE-2015-7560: s3: smbd: Refuse to set EA's on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 04a13c48c24..103e601072e 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -658,6 +658,11 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp,
return NT_STATUS_EAS_NOT_SUPPORTED;
}
+ status = refuse_symlink(conn, fsp, smb_fname->base_name);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
status = check_access(conn, fsp, smb_fname, FILE_WRITE_EA);
if (!NT_STATUS_IS_OK(status)) {
return status;