mirror of
https://github.com/samba-team/samba.git
synced 2025-02-08 05:57:51 +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:
parent
e27f9a4194
commit
062876f6dd
@ -237,6 +237,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;
|
||||
@ -247,6 +248,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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user