1
0
mirror of https://github.com/samba-team/samba.git synced 2025-09-16 01:44:21 +03:00

CVE-2015-7560: s3: smbd: Silently return no EA's available 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>
This commit is contained in:
Jeremy Allison
2016-01-05 11:29:38 -08:00
committed by Stefan Metzmacher
parent 464d044145
commit 3f491d7756

View File

@@ -242,6 +242,7 @@ NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx, connection_struct *conn,
char **names, **tmp;
size_t num_names;
ssize_t sizeret = -1;
NTSTATUS status;
if (pnames) {
*pnames = NULL;
@@ -252,6 +253,14 @@ NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx, connection_struct *conn,
return NT_STATUS_OK;
}
status = refuse_symlink(conn, fsp, fname);
if (!NT_STATUS_IS_OK(status)) {
/*
* Just return no EA's on a symlink.
*/
return NT_STATUS_OK;
}
/*
* TALLOC the result early to get the talloc hierarchy right.
*/