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

smbd: add open_flags arg to in open_internal_dirfsp_at()

The only caller passes in what was used internally, so no change in
behaviour. Prepares for calling open_internal_dirfsp_at() from
filename_convert() with additional flags.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2020-04-09 18:24:26 +02:00
parent d60b1134b9
commit acffa8f406
3 changed files with 7 additions and 2 deletions

View File

@ -1369,7 +1369,11 @@ struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx,
struct smb_Dir *dir_hnd = NULL;
NTSTATUS status;
status = open_internal_dirfsp_at(conn, conn->cwd_fsp, smb_dname, &fsp);
status = open_internal_dirfsp_at(conn,
conn->cwd_fsp,
smb_dname,
O_RDONLY,
&fsp);
if (!NT_STATUS_IS_OK(status)) {
return NULL;
}

View File

@ -225,10 +225,10 @@ NTSTATUS create_internal_dirfsp_at(connection_struct *conn,
NTSTATUS open_internal_dirfsp_at(connection_struct *conn,
struct files_struct *dirfsp,
const struct smb_filename *smb_dname,
int open_flags,
struct files_struct **_fsp)
{
struct files_struct *fsp = NULL;
int open_flags = O_RDONLY;
NTSTATUS status;
SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);

View File

@ -455,6 +455,7 @@ NTSTATUS create_internal_dirfsp_at(connection_struct *conn,
NTSTATUS open_internal_dirfsp_at(connection_struct *conn,
struct files_struct *dirfsp,
const struct smb_filename *smb_dname,
int open_flags,
struct files_struct **_fsp);
/* The following definitions come from smbd/ipc.c */