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: samba-4.4.12~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=203f454965c8a9ca92cb085623b16d4b21296679;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 38059152106..cbd32e30704 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -1588,7 +1588,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 char *name, const char *mask, uint32_t attr) @@ -1628,6 +1629,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 char *name, + const char *mask, + uint32_t attr) +{ + return OpenDir_internal(mem_ctx, + conn, + name, + mask, + attr); +} + /******************************************************************* Open a directory from an fsp. ********************************************************************/