1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

s3: smbd: OpenDir() is merely a wrapper around open_dir_safely().

Preparatory work.

Separate these out internal to source3/smbd/dir.c so I can
give the internal and external uses separate destructor functions
to allow all client requested directory enumeration to move to handle
based functions.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Jeremy Allison 2019-07-17 08:56:49 -07:00 committed by Andreas Schneider
parent 9d2fd08249
commit 41c94b8b1f

View File

@ -85,6 +85,12 @@ static struct smb_Dir *OpenDir_fsp(TALLOC_CTX *mem_ctx, connection_struct *conn,
static void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset);
static struct smb_Dir *open_dir_safely(TALLOC_CTX *ctx,
connection_struct *conn,
const struct smb_filename *smb_dname,
const char *wcard,
uint32_t attr);
#define INVALID_DPTR_KEY (-3)
/****************************************************************************
@ -334,7 +340,7 @@ static struct smb_Dir *open_dir_with_privilege(connection_struct *conn,
goto out;
}
dir_hnd = OpenDir(NULL, conn, smb_fname_cwd, wcard, attr);
dir_hnd = open_dir_safely(NULL, conn, smb_fname_cwd, wcard, attr);
out:
@ -431,7 +437,7 @@ NTSTATUS dptr_create(connection_struct *conn,
wcard,
attr);
} else {
dir_hnd = OpenDir(NULL,
dir_hnd = open_dir_safely(NULL,
conn,
smb_dname_cp,
wcard,