[Pkg-samba-maint] [samba] 07/17: s3: smbd: Correctly fallback to open_dir_safely if FDOPENDIR not supported on system.
Mathieu Parent
sathieu at moszumanska.debian.org
Thu Mar 23 19:02:23 UTC 2017
This is an automated email from the git hooks/post-receive script.
sathieu pushed a commit to branch master
in repository samba.
commit 1baa46d6de7c93ad07084e148940b64eef3afba5
Author: Jeremy Allison <jra at samba.org>
Date: Mon Dec 19 12:35:32 2016 -0800
s3: smbd: Correctly fallback to open_dir_safely if FDOPENDIR not supported on system.
CVE-2017-2619
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12496
Signed-off-by: Jeremy Allison <jra at samba.org>
---
source3/smbd/dir.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 2fd5085..1348d12 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -1797,20 +1797,15 @@ static struct smb_Dir *OpenDir_fsp(TALLOC_CTX *mem_ctx, connection_struct *conn,
}
if (dirp->dir == NULL) {
- /* FDOPENDIR didn't work. Use OPENDIR instead. */
- dirp->dir = SMB_VFS_OPENDIR(conn,
- dirp->dir_smb_fname,
+ /* FDOPENDIR is not supported. Use OPENDIR instead. */
+ TALLOC_FREE(dirp);
+ return open_dir_safely(mem_ctx,
+ conn,
+ fsp->fsp_name,
mask,
attr);
}
- if (!dirp->dir) {
- DEBUG(5,("OpenDir_fsp: Can't open %s. %s\n",
- dirp->dir_smb_fname->base_name,
- strerror(errno) ));
- goto fail;
- }
-
if (sconn && !sconn->using_smb2) {
sconn->searches.dirhandles_open++;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git
More information about the Pkg-samba-maint
mailing list