From: Jeremy Allison Date: Mon, 19 Dec 2016 19:55:56 +0000 (-0800) Subject: CVE-2017-2619: s3: smbd: Create wrapper function for OpenDir in preparation for makin... X-Git-Tag: tdb-1.3.13~400 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34615180279fdeeeb3e91cc3b9574af91c3db589;p=thirdparty%2Fsamba.git 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 Reviewed-by: Uri Simchoni --- 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. ********************************************************************/