The Samba-Bugzilla – Attachment 17366 Details for
Bug 15099
Using vfs_streams_xattr and deleting a file causes a panic.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
raw patch for master.
l2 (text/plain), 1.42 KB, created by
Jeremy Allison
on 2022-06-16 21:52:34 UTC
(
hide
)
Description:
raw patch for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2022-06-16 21:52:34 UTC
Size:
1.42 KB
patch
obsolete
>diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c >index 324490354b0..3e39770bb37 100644 >--- a/source3/modules/vfs_streams_xattr.c >+++ b/source3/modules/vfs_streams_xattr.c >@@ -479,6 +479,8 @@ static int streams_xattr_unlinkat(vfs_handle_struct *handle, > NTSTATUS status; > int ret = -1; > char *xattr_name = NULL; >+ struct smb_filename *pathref = NULL; >+ struct files_struct *fsp = smb_fname->fsp; > > if (!is_named_stream(smb_fname)) { > return SMB_VFS_NEXT_UNLINKAT(handle, >@@ -497,10 +499,26 @@ static int streams_xattr_unlinkat(vfs_handle_struct *handle, > goto fail; > } > >- SMB_ASSERT(smb_fname->fsp != NULL); >- SMB_ASSERT(fsp_is_alternate_stream(smb_fname->fsp)); >+ if (fsp == NULL) { >+ status = synthetic_pathref(talloc_tos(), >+ handle->conn->cwd_fsp, >+ smb_fname->base_name, >+ NULL, >+ NULL, >+ smb_fname->twrp, >+ smb_fname->flags, >+ &pathref); >+ if (!NT_STATUS_IS_OK(status)) { >+ errno = ENOENT; >+ goto fail; >+ } >+ fsp = pathref->fsp; >+ } else { >+ SMB_ASSERT(fsp_is_alternate_stream(smb_fname->fsp)); >+ fsp = fsp->base_fsp; >+ } > >- ret = SMB_VFS_FREMOVEXATTR(smb_fname->fsp->base_fsp, xattr_name); >+ ret = SMB_VFS_FREMOVEXATTR(fsp, xattr_name); > > if ((ret == -1) && (errno == ENOATTR)) { > errno = ENOENT; >@@ -511,6 +529,7 @@ static int streams_xattr_unlinkat(vfs_handle_struct *handle, > > fail: > TALLOC_FREE(xattr_name); >+ TALLOC_FREE(pathref); > return ret; > } >
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?
(
slow
)
Actions:
View
Attachments on
bug 15099
:
17362
|
17363
| 17366 |
17371
|
17374
|
17375