1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

smbd: Introduce fsp_is_alternate_stream()

To me this is more descriptive than "fsp->base_fsp != NULL". If this
turns out to be a performance problem, I would go and make this a
static inline in smbd/proto.h.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(backported from commit 21b380ca13)
[slow@samba.org: only backport the function, skip all changed callers]
This commit is contained in:
Volker Lendecke 2022-02-11 09:37:35 +01:00 committed by Jule Anger
parent df7d6f0c48
commit 3160ff28e8
2 changed files with 6 additions and 0 deletions

View File

@ -1597,3 +1597,8 @@ void fsp_set_base_fsp(struct files_struct *fsp, struct files_struct *base_fsp)
fsp->base_fsp->stream_fsp = fsp;
}
}
bool fsp_is_alternate_stream(const struct files_struct *fsp)
{
return (fsp->base_fsp != NULL);
}

View File

@ -436,6 +436,7 @@ NTSTATUS fsp_set_smb_fname(struct files_struct *fsp,
const struct smb_filename *smb_fname_in);
size_t fsp_fullbasepath(struct files_struct *fsp, char *buf, size_t buflen);
void fsp_set_base_fsp(struct files_struct *fsp, struct files_struct *base_fsp);
bool fsp_is_alternate_stream(const struct files_struct *fsp);
NTSTATUS create_internal_fsp(connection_struct *conn,
const struct smb_filename *smb_fname,