The Samba-Bugzilla – Attachment 16521 Details for
Bug 14662
smbd: regression in mkdir_internal can cause incorrect error to be returned
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.14.next.
0001-smbd-Ensure-errno-is-preserved-across-fsp-destructor.patch (text/plain), 1.45 KB, created by
Jeremy Allison
on 2021-03-10 23:56:10 UTC
(
hide
)
Description:
git-am fix for 4.14.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2021-03-10 23:56:10 UTC
Size:
1.45 KB
patch
obsolete
>From 98701eee2436be35aaa1843f7085d2906cf8b6ad Mon Sep 17 00:00:00 2001 >From: Sachin Prabhu <sprabhu@redhat.com> >Date: Wed, 10 Mar 2021 12:22:07 +0000 >Subject: [PATCH] smbd: Ensure errno is preserved across fsp destructor > >The errno can be overwritten by the calls made by the fsp destructor. >This can cause problems if the original errno was required by subsequent >calls. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14662 > >Signed-off-by: Jeremy Allison <jra@samba.org> >Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> > >Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> >Autobuild-Date(master): Wed Mar 10 22:55:17 UTC 2021 on sn-devel-184 > >(cherry picked from commit 65510204d4123b1825ea57607e84ba50f8ce3baf) >--- > source3/smbd/files.c | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/source3/smbd/files.c b/source3/smbd/files.c >index f60d5979f53..d9fd2b8ea86 100644 >--- a/source3/smbd/files.c >+++ b/source3/smbd/files.c >@@ -358,10 +358,12 @@ static int smb_fname_fsp_destructor(struct smb_filename *smb_fname) > { > struct files_struct *fsp = smb_fname->fsp; > NTSTATUS status; >+ int saved_errno = errno; > > destroy_fsp_smb_fname_link(&smb_fname->fsp_link); > > if (fsp == NULL) { >+ errno = saved_errno; > return 0; > } > >@@ -380,6 +382,7 @@ static int smb_fname_fsp_destructor(struct smb_filename *smb_fname) > file_free(NULL, fsp); > smb_fname->fsp = NULL; > >+ errno = saved_errno; > return 0; > } > >-- >2.27.0 >
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:
jra
:
review?
(
abartlet
)
jra
:
review?
(
slow
)
anoopcs
:
review+
Actions:
View
Attachments on
bug 14662
: 16521