summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-12-19 11:55:56 -0800
committerKarolin Seeger <kseeger@samba.org>2017-03-22 10:48:05 +0100
commit92f17bb087fb3a25cc1f4de821051f93a3a66481 (patch)
treef21e27b96a271b61c374592eb9f78c6babab9c38
parent0d6b51869a4dcf372aa67eecbde2c1f99e45f0d4 (diff)
downloadsamba-92f17bb087fb3a25cc1f4de821051f93a3a66481.tar.gz
CVE-2017-2619: s3: smbd: Create wrapper function for OpenDir in preparation for making robust.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12496 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
-rw-r--r--source3/smbd/dir.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 3c6f00096fa..b22d92d7ba9 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -1630,7 +1630,8 @@ static int smb_Dir_destructor(struct smb_Dir *dirp)
Open a directory.
********************************************************************/
-struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn,
+static struct smb_Dir *OpenDir_internal(TALLOC_CTX *mem_ctx,
+ connection_struct *conn,
const struct smb_filename *smb_dname,
const char *mask,
uint32_t attr)
@@ -1672,6 +1673,18 @@ struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn,
return NULL;
}
+struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn,
+ const struct smb_filename *smb_dname,
+ const char *mask,
+ uint32_t attr)
+{
+ return OpenDir_internal(mem_ctx,
+ conn,
+ smb_dname,
+ mask,
+ attr);
+}
+
/*******************************************************************
Open a directory from an fsp.
********************************************************************/