vfs_handle_struct *handle;
};
+struct streams_xattr_ea {
+ uint8_t flags;
+ char *name;
+ DATA_BLOB value;
+};
+
static int streams_xattr_get_ea_value_fsp(TALLOC_CTX *mem_ctx,
files_struct *fsp,
const char *ea_name,
- struct ea_struct *pea)
+ struct streams_xattr_ea *pea)
{
/* Get the value of this xattr. Max size is 64k. */
size_t attr_size = 256;
const char *xattr_name)
{
int ret;
- struct ea_struct ea;
+ struct streams_xattr_ea ea;
ssize_t result;
ret = streams_xattr_get_ea_value_fsp(talloc_tos(),
{
struct streams_xattr_config *config = NULL;
struct stream_io *sio = NULL;
- struct ea_struct ea;
+ struct streams_xattr_ea ea;
char *xattr_name = NULL;
int fakefd = -1;
bool set_empty_xattr = false;
bool src_is_stream, dst_is_stream;
ssize_t oret;
ssize_t nret;
- struct ea_struct ea;
+ struct streams_xattr_ea ea;
struct smb_filename *pathref_src = NULL;
struct smb_filename *pathref_dst = NULL;
struct smb_filename *full_src = NULL;
}
for (i=0; i<num_names; i++) {
+ struct streams_xattr_ea sea = {};
struct ea_struct ea;
int ret;
ret = streams_xattr_get_ea_value_fsp(names,
smb_fname->fsp,
names[i],
- &ea);
+ &sea);
if (ret != 0) {
DBG_DEBUG("Could not get ea %s for file %s: %s\n",
names[i],
continue;
}
+ ea.value = sea.value;
+
ea.name = talloc_asprintf(
ea.value.data, ":%s%s",
names[i] + config->prefix_len,
return NT_STATUS_OK;
}
- TALLOC_FREE(ea.value.data);
+ TALLOC_FREE(sea.value.data);
}
TALLOC_FREE(names);
{
struct stream_io *sio =
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
- struct ea_struct ea;
+ struct streams_xattr_ea ea;
int ret;
DBG_DEBUG("offset=%jd, size=%zu\n", (intmax_t)offset, n);
{
struct stream_io *sio =
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
- struct ea_struct ea;
+ struct streams_xattr_ea ea;
int ret;
size_t length, overlap;
{
int ret;
uint8_t *tmp;
- struct ea_struct ea;
+ struct streams_xattr_ea ea;
struct stream_io *sio =
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);