The Samba-Bugzilla – Attachment 8833 Details for
Bug 9833
Function called in unix_convert() path can overwrite errno.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch with cherry-pick info
9833-4.0.patch (text/plain), 1.76 KB, created by
Volker Lendecke
on 2013-04-30 09:12:24 UTC
(
hide
)
Description:
Patch with cherry-pick info
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2013-04-30 09:12:24 UTC
Size:
1.76 KB
patch
obsolete
>From aa3dfb5b997078afd5ec2c1c8473013e5209aa9c Mon Sep 17 00:00:00 2001 >From: Anand Avati <avati@redhat.com> >Date: Mon, 29 Apr 2013 15:21:00 -0700 >Subject: [PATCH] check_parent_exists() can change errno. Ensure we preserve > it across calls. > >Reviewed-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> > >Autobuild-User(master): Volker Lendecke <vl@samba.org> >Autobuild-Date(master): Tue Apr 30 11:00:11 CEST 2013 on sn-devel-104 >(cherry picked from commit 7e807934e6550308efed814a20ce6d6dabbad557) >--- > source3/smbd/filename.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c >index 0be566f..9b05de3 100644 >--- a/source3/smbd/filename.c >+++ b/source3/smbd/filename.c >@@ -450,13 +450,17 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, > > if (errno == ENOENT) { > /* Optimization when creating a new file - only >- the last component doesn't exist. */ >+ the last component doesn't exist. >+ NOTE : check_parent_exists() doesn't preserve errno. >+ */ >+ int saved_errno = errno; > status = check_parent_exists(ctx, > conn, > posix_pathnames, > smb_fname, > &dirpath, > &start); >+ errno = saved_errno; > if (!NT_STATUS_IS_OK(status)) { > goto fail; > } >@@ -529,13 +533,16 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, > * Optimization for common case where the wildcard > * is in the last component and the client already > * sent the correct case. >+ * NOTE : check_parent_exists() doesn't preserve errno. > */ >+ int saved_errno = errno; > status = check_parent_exists(ctx, > conn, > posix_pathnames, > smb_fname, > &dirpath, > &start); >+ errno = saved_errno; > if (!NT_STATUS_IS_OK(status)) { > goto fail; > } >-- >1.7.9.5 >
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+
Actions:
View
Attachments on
bug 9833
:
8831
| 8833