diff options
author | Jeremy Allison <jra@samba.org> | 2016-12-19 11:55:56 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2017-03-22 10:45:15 +0100 |
commit | 203f454965c8a9ca92cb085623b16d4b21296679 (patch) | |
tree | f9387defe4f6d87b9cc307af40abc4b1e32d2903 | |
parent | 8b560191472fece5e7b82a3fb1ae5ec35d106107 (diff) | |
download | samba-203f454965c8a9ca92cb085623b16d4b21296679.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.c | 15 |
1 files changed, 14 insertions, 1 deletions
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. ********************************************************************/ |