The Samba-Bugzilla – Attachment 16746 Details for
Bug 14805
OpenDir() loses the correct errno return.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.15.0, 4.14.next
0001-s3-smbd-Ensure-all-returns-from-OpenDir-correctly-se.patch (text/plain), 1.23 KB, created by
Jeremy Allison
on 2021-08-20 15:39:23 UTC
(
hide
)
Description:
git-am fix for 4.15.0, 4.14.next
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2021-08-20 15:39:23 UTC
Size:
1.23 KB
patch
obsolete
>From 05daa4082a0fa08ce8f92a108f37e97621055a7c Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Thu, 19 Aug 2021 15:43:52 -0700 >Subject: [PATCH] s3: smbd: Ensure all returns from OpenDir() correctly set > errno. > >Complex code paths inside open_internal_dirfsp() can return an >NTSTATUS, but trample on the matching errno. We need to make >sure if open_internal_dirfsp() fails, errno matches the NTSTATUS >return. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14805 > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Noel Power <npower@samba.org> > >Autobuild-User(master): Noel Power <npower@samba.org> >Autobuild-Date(master): Fri Aug 20 09:56:49 UTC 2021 on sn-devel-184 > >(cherry picked from commit 72b4fe93f15e414ca3e7d7f0e77a5f0aae90556a) >--- > source3/smbd/dir.c | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c >index 4c807c3f85c..174f07b1159 100644 >--- a/source3/smbd/dir.c >+++ b/source3/smbd/dir.c >@@ -1474,6 +1474,8 @@ struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, > O_RDONLY, > &fsp); > if (!NT_STATUS_IS_OK(status)) { >+ /* Ensure we return the actual error from status in errno. */ >+ errno = map_errno_from_nt_status(status); > return NULL; > } > >-- >2.30.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
npower
:
review+
Actions:
View
Attachments on
bug 14805
: 16746