mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
vfs_ring: Adapt to 4.13 VFS
This commit is contained in:
parent
b29103ef46
commit
191c2cd7b9
@ -26,11 +26,12 @@
|
||||
#define GRFN_PREFIX_LEN (sizeof(GRFN_PREFIX)-1)
|
||||
|
||||
static int vfs_ring_get_real_filename(struct vfs_handle_struct *handle,
|
||||
const char *path,
|
||||
const struct smb_filename *dirpath,
|
||||
const char *name,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
char **found_name)
|
||||
{
|
||||
const char *path = dirpath->base_name;
|
||||
bool mangled;
|
||||
char attr_name [NAME_MAX+1];
|
||||
char attr_value[NAME_MAX+1];
|
||||
@ -44,6 +45,7 @@ static int vfs_ring_get_real_filename(struct vfs_handle_struct *handle,
|
||||
path,
|
||||
NULL,
|
||||
NULL,
|
||||
dirpath->twrp,
|
||||
0);
|
||||
if (smb_fname == NULL) {
|
||||
errno = ENOMEM;
|
||||
@ -56,7 +58,7 @@ static int vfs_ring_get_real_filename(struct vfs_handle_struct *handle,
|
||||
mangled = mangle_is_mangled(name, handle->conn->params);
|
||||
if (mangled) {
|
||||
return SMB_VFS_NEXT_GET_REAL_FILENAME(
|
||||
handle, path, name, mem_ctx, found_name);
|
||||
handle, dirpath, name, mem_ctx, found_name);
|
||||
}
|
||||
|
||||
if (strlen(name) > NAME_MAX - GRFN_PREFIX_LEN) {
|
||||
@ -75,7 +77,7 @@ static int vfs_ring_get_real_filename(struct vfs_handle_struct *handle,
|
||||
path, name, strerror(errno)));
|
||||
if (errno == EOPNOTSUPP)
|
||||
return SMB_VFS_NEXT_GET_REAL_FILENAME(
|
||||
handle, path, name, mem_ctx, found_name);
|
||||
handle, dirpath, name, mem_ctx, found_name);
|
||||
if (errno == ENOATTR)
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user