mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3/smbd: modify get_ea_names_from_file signature fn to take fsp alone
Removes the smb_filename function parameter Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
6d353212a5
commit
dfc80b4ce8
@ -686,8 +686,7 @@ static NTSTATUS walk_xattr_streams(vfs_handle_struct *handle,
|
||||
|
||||
status = get_ea_names_from_file(talloc_tos(),
|
||||
handle->conn,
|
||||
fsp,
|
||||
smb_fname,
|
||||
smb_fname->fsp,
|
||||
&names,
|
||||
&num_names);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
|
@ -788,7 +788,7 @@ void reply_ntcreate_and_X(struct smb_request *req)
|
||||
size_t num_names = 0;
|
||||
/* Do we have any EA's ? */
|
||||
status = get_ea_names_from_file(
|
||||
ctx, conn, fsp, smb_fname, NULL, &num_names);
|
||||
ctx, conn, smb_fname->fsp, NULL, &num_names);
|
||||
if (NT_STATUS_IS_OK(status) && num_names) {
|
||||
file_status &= ~NO_EAS;
|
||||
}
|
||||
@ -1466,7 +1466,7 @@ static void call_nt_transact_create(connection_struct *conn,
|
||||
size_t num_names = 0;
|
||||
/* Do we have any EA's ? */
|
||||
status = get_ea_names_from_file(
|
||||
ctx, conn, fsp, smb_fname, NULL, &num_names);
|
||||
ctx, conn, smb_fname->fsp, NULL, &num_names);
|
||||
if (NT_STATUS_IS_OK(status) && num_names) {
|
||||
file_status &= ~NO_EAS;
|
||||
}
|
||||
|
@ -1215,7 +1215,6 @@ NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn,
|
||||
NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx,
|
||||
connection_struct *conn,
|
||||
files_struct *fsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
char ***pnames,
|
||||
size_t *pnum_names);
|
||||
NTSTATUS set_ea(connection_struct *conn, files_struct *fsp,
|
||||
|
@ -294,7 +294,6 @@ NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx,
|
||||
NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx,
|
||||
connection_struct *conn,
|
||||
files_struct *fsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
char ***pnames,
|
||||
size_t *pnum_names)
|
||||
{
|
||||
@ -315,10 +314,11 @@ NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
*pnum_names = 0;
|
||||
|
||||
status = refuse_symlink(conn, fsp, smb_fname);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
if (fsp == NULL) {
|
||||
/*
|
||||
* Just return no EA's on a symlink.
|
||||
* Callers may pass fsp == NULL when passing smb_fname->fsp of a
|
||||
* symlink. This is ok, handle it here, by just return no EA's
|
||||
* on a symlink.
|
||||
*/
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
@ -449,7 +449,6 @@ static NTSTATUS get_ea_list_from_file_path(TALLOC_CTX *mem_ctx,
|
||||
status = get_ea_names_from_file(talloc_tos(),
|
||||
conn,
|
||||
fsp,
|
||||
smb_fname,
|
||||
&names,
|
||||
&num_names);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user