[Pkg-samba-maint] [samba] 06/17: s3: smbd: Move the reference counting and destructor setup to just before retuning success.
Mathieu Parent
sathieu at moszumanska.debian.org
Thu Mar 23 19:02:22 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 4f1b902854f02248d7717ce46d426212aa510e7a
Author: Jeremy Allison <jra at samba.org>
Date: Mon Dec 19 12:32:07 2016 -0800
s3: smbd: Move the reference counting and destructor setup to just before retuning success.
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 | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 42e787b..2fd5085 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -1783,11 +1783,6 @@ static struct smb_Dir *OpenDir_fsp(TALLOC_CTX *mem_ctx, connection_struct *conn,
goto fail;
}
- if (sconn && !sconn->using_smb2) {
- sconn->searches.dirhandles_open++;
- }
- talloc_set_destructor(dirp, smb_Dir_destructor);
-
dirp->dir = SMB_VFS_FDOPENDIR(fsp, mask, attr);
if (dirp->dir != NULL) {
dirp->fsp = fsp;
@@ -1816,6 +1811,11 @@ static struct smb_Dir *OpenDir_fsp(TALLOC_CTX *mem_ctx, connection_struct *conn,
goto fail;
}
+ if (sconn && !sconn->using_smb2) {
+ sconn->searches.dirhandles_open++;
+ }
+ talloc_set_destructor(dirp, smb_Dir_destructor);
+
return dirp;
fail:
--
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