return ret;
}
-static int fremovexattr_multi(struct files_struct *fsp, const char *name)
+static int fremovexattr_multi(const struct streams_xattr_config *config,
+ struct files_struct *fsp,
+ const char *name)
{
int ret = SMB_VFS_FREMOVEXATTR(fsp, name);
return ret;
const struct smb_filename *smb_fname,
int flags)
{
+ struct streams_xattr_config *config;
NTSTATUS status;
int ret = -1;
char *xattr_name = NULL;
+ char *raw_stream_name = NULL;
struct smb_filename *pathref = NULL;
struct files_struct *fsp = smb_fname->fsp;
+ SMB_VFS_HANDLE_GET_DATA(handle,
+ config,
+ struct streams_xattr_config,
+ return -1);
+
if (!is_named_stream(smb_fname)) {
return SMB_VFS_NEXT_UNLINKAT(handle,
dirfsp,
fsp = fsp->base_fsp;
}
- ret = fremovexattr_multi(fsp, xattr_name);
+ ret = fremovexattr_multi(config, fsp, xattr_name);
if ((ret == -1) && (errno == ENOATTR)) {
errno = ENOENT;
ret = 0;
fail:
+ TALLOC_FREE(raw_stream_name);
TALLOC_FREE(xattr_name);
TALLOC_FREE(pathref);
return ret;
/*
* Remove the old stream from the base file fsp.
*/
- oret = fremovexattr_multi(pathref_src->fsp, src_xattr_name);
+ oret = fremovexattr_multi(config, pathref_src->fsp, src_xattr_name);
if (oret < 0) {
if (errno == ENOATTR) {
errno = ENOENT;