mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
Remove redundant parameter fd from SMB_VFS_FSETXATTR().
Michael
This commit is contained in:
parent
bfc3b5a27f
commit
0bd2643463
@ -97,6 +97,7 @@
|
||||
/* Leave at 22 - not yet released. Remove parameter fd from fgetxattr. - obnox */
|
||||
/* Leave at 22 - not yet released. Remove parameter fd from flistxattr. - obnox */
|
||||
/* Leave at 22 - not yet released. Remove parameter fd from fremovexattr. - obnox */
|
||||
/* Leave at 22 - not yet released. Remove parameter fd from fsetxattr. - obnox */
|
||||
|
||||
|
||||
|
||||
@ -389,7 +390,7 @@ struct vfs_ops {
|
||||
int (*fremovexattr)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name);
|
||||
int (*setxattr)(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags);
|
||||
int (*lsetxattr)(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags);
|
||||
int (*fsetxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp,int filedes, const char *name, const void *value, size_t size, int flags);
|
||||
int (*fsetxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags);
|
||||
|
||||
/* aio operations */
|
||||
int (*aio_read)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
|
||||
|
@ -128,7 +128,7 @@
|
||||
#define SMB_VFS_FREMOVEXATTR(fsp,name) ((fsp)->conn->vfs.ops.fremovexattr((fsp)->conn->vfs.handles.fremovexattr,(fsp),(name)))
|
||||
#define SMB_VFS_SETXATTR(conn,path,name,value,size,flags) ((conn)->vfs.ops.setxattr((conn)->vfs.handles.setxattr,(path),(name),(value),(size),(flags)))
|
||||
#define SMB_VFS_LSETXATTR(conn,path,name,value,size,flags) ((conn)->vfs.ops.lsetxattr((conn)->vfs.handles.lsetxattr,(path),(name),(value),(size),(flags)))
|
||||
#define SMB_VFS_FSETXATTR(fsp,fd,name,value,size,flags) ((fsp)->conn->vfs.ops.fsetxattr((fsp)->conn->vfs.handles.fsetxattr,(fsp),(fd),(name),(value),(size),(flags)))
|
||||
#define SMB_VFS_FSETXATTR(fsp,name,value,size,flags) ((fsp)->conn->vfs.ops.fsetxattr((fsp)->conn->vfs.handles.fsetxattr,(fsp),(name),(value),(size),(flags)))
|
||||
|
||||
/* AIO operations. */
|
||||
#define SMB_VFS_AIO_READ(fsp,aiocb) ((fsp)->conn->vfs.ops.aio_read((fsp)->conn->vfs.handles.aio_read,(fsp),(aiocb)))
|
||||
@ -247,7 +247,7 @@
|
||||
#define SMB_VFS_OPAQUE_FREMOVEXATTR(fsp,name) ((fsp)->conn->vfs_opaque.ops.fremovexattr((fsp)->conn->vfs_opaque.handles.fremovexattr,(fsp),(name)))
|
||||
#define SMB_VFS_OPAQUE_SETXATTR(conn,path,name,value,size,flags) ((conn)->vfs_opaque.ops.setxattr((conn)->vfs_opaque.handles.setxattr,(path),(name),(value),(size),(flags)))
|
||||
#define SMB_VFS_OPAQUE_LSETXATTR(conn,path,name,value,size,flags) ((conn)->vfs_opaque.ops.lsetxattr((conn)->vfs_opaque.handles.lsetxattr,(path),(name),(value),(size),(flags)))
|
||||
#define SMB_VFS_OPAQUE_FSETXATTR(fsp,fd,name,value,size,flags) ((fsp)->conn->vfs_opaque.ops.fsetxattr((fsp)->conn->vfs_opaque.handles.fsetxattr,(fsp),(fd),(name),(value),(size),(flags)))
|
||||
#define SMB_VFS_OPAQUE_FSETXATTR(fsp,name,value,size,flags) ((fsp)->conn->vfs_opaque.ops.fsetxattr((fsp)->conn->vfs_opaque.handles.fsetxattr,(fsp),(name),(value),(size),(flags)))
|
||||
|
||||
/* AIO operations. */
|
||||
#define SMB_VFS_OPAQUE_AIO_READ(fsp,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_read((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(aiocb)))
|
||||
@ -367,7 +367,7 @@
|
||||
#define SMB_VFS_NEXT_FREMOVEXATTR(handle,fsp,name) ((handle)->vfs_next.ops.fremovexattr((handle)->vfs_next.handles.fremovexattr,(fsp),(name)))
|
||||
#define SMB_VFS_NEXT_SETXATTR(handle,path,name,value,size,flags) ((handle)->vfs_next.ops.setxattr((handle)->vfs_next.handles.setxattr,(path),(name),(value),(size),(flags)))
|
||||
#define SMB_VFS_NEXT_LSETXATTR(handle,path,name,value,size,flags) ((handle)->vfs_next.ops.lsetxattr((handle)->vfs_next.handles.lsetxattr,(path),(name),(value),(size),(flags)))
|
||||
#define SMB_VFS_NEXT_FSETXATTR(handle,fsp,fd,name,value,size,flags) ((handle)->vfs_next.ops.fsetxattr((handle)->vfs_next.handles.fsetxattr,(fsp),(fd),(name),(value),(size),(flags)))
|
||||
#define SMB_VFS_NEXT_FSETXATTR(handle,fsp,name,value,size,flags) ((handle)->vfs_next.ops.fsetxattr((handle)->vfs_next.handles.fsetxattr,(fsp),(name),(value),(size),(flags)))
|
||||
|
||||
/* AIO operations. */
|
||||
#define SMB_VFS_NEXT_AIO_READ(handle,fsp,aiocb) ((handle)->vfs_next.ops.aio_read((handle)->vfs_next.handles.aio_read,(fsp),(aiocb)))
|
||||
|
@ -455,7 +455,7 @@ static int cap_lsetxattr(vfs_handle_struct *handle, const char *path, const char
|
||||
return SMB_VFS_NEXT_LSETXATTR(handle, cappath, capname, value, size, flags);
|
||||
}
|
||||
|
||||
static int cap_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp,int fd, const char *path, const void *value, size_t size, int flags)
|
||||
static int cap_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *path, const void *value, size_t size, int flags)
|
||||
{
|
||||
char *cappath = capencode(talloc_tos(), path);
|
||||
|
||||
@ -463,7 +463,7 @@ static int cap_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp,int
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
return SMB_VFS_NEXT_FSETXATTR(handle, fsp, fd, cappath, value, size, flags);
|
||||
return SMB_VFS_NEXT_FSETXATTR(handle, fsp, cappath, value, size, flags);
|
||||
}
|
||||
|
||||
/* VFS operations structure */
|
||||
|
@ -1186,9 +1186,9 @@ static int vfswrap_lsetxattr(struct vfs_handle_struct *handle, const char *path,
|
||||
return sys_lsetxattr(path, name, value, size, flags);
|
||||
}
|
||||
|
||||
static int vfswrap_fsetxattr(struct vfs_handle_struct *handle, struct files_struct *fsp,int fd, const char *name, const void *value, size_t size, int flags)
|
||||
static int vfswrap_fsetxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags)
|
||||
{
|
||||
return sys_fsetxattr(fd, name, value, size, flags);
|
||||
return sys_fsetxattr(fsp->fh->fd, name, value, size, flags);
|
||||
}
|
||||
|
||||
static int vfswrap_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
|
||||
|
@ -297,7 +297,7 @@ static int smb_full_audit_lsetxattr(struct vfs_handle_struct *handle,
|
||||
const char *name, const void *value, size_t size,
|
||||
int flags);
|
||||
static int smb_full_audit_fsetxattr(struct vfs_handle_struct *handle,
|
||||
struct files_struct *fsp, int fd, const char *name,
|
||||
struct files_struct *fsp, const char *name,
|
||||
const void *value, size_t size, int flags);
|
||||
|
||||
static int smb_full_audit_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
|
||||
@ -2082,13 +2082,12 @@ static int smb_full_audit_lsetxattr(struct vfs_handle_struct *handle,
|
||||
}
|
||||
|
||||
static int smb_full_audit_fsetxattr(struct vfs_handle_struct *handle,
|
||||
struct files_struct *fsp, int fd, const char *name,
|
||||
struct files_struct *fsp, const char *name,
|
||||
const void *value, size_t size, int flags)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = SMB_VFS_NEXT_FSETXATTR(handle, fsp, fd, name, value, size,
|
||||
flags);
|
||||
result = SMB_VFS_NEXT_FSETXATTR(handle, fsp, name, value, size, flags);
|
||||
|
||||
do_log(SMB_VFS_OP_FSETXATTR, (result >= 0), handle,
|
||||
"%s|%s", fsp->fsp_name, name);
|
||||
|
@ -238,7 +238,7 @@ static void store_inheritance_attributes(files_struct *fsp, canon_ace *file_ace_
|
||||
pai_buf = create_pai_buf(file_ace_list, dir_ace_list, pai_protected, &store_size);
|
||||
|
||||
if (fsp->fh->fd != -1)
|
||||
ret = SMB_VFS_FSETXATTR(fsp, fsp->fh->fd, SAMBA_POSIX_INHERITANCE_EA_NAME,
|
||||
ret = SMB_VFS_FSETXATTR(fsp, SAMBA_POSIX_INHERITANCE_EA_NAME,
|
||||
pai_buf, store_size, 0);
|
||||
else
|
||||
ret = SMB_VFS_SETXATTR(fsp->conn,fsp->fsp_name, SAMBA_POSIX_INHERITANCE_EA_NAME,
|
||||
|
@ -373,7 +373,7 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, const char *fname, s
|
||||
if (fsp && (fsp->fh->fd != -1)) {
|
||||
DEBUG(10,("set_ea: setting ea name %s on file %s by file descriptor.\n",
|
||||
unix_ea_name, fsp->fsp_name));
|
||||
ret = SMB_VFS_FSETXATTR(fsp, fsp->fh->fd, unix_ea_name,
|
||||
ret = SMB_VFS_FSETXATTR(fsp, unix_ea_name,
|
||||
ea_list->ea.value.data, ea_list->ea.value.length, 0);
|
||||
} else {
|
||||
DEBUG(10,("set_ea: setting ea name %s on file %s.\n",
|
||||
|
Loading…
Reference in New Issue
Block a user