mirror of
https://github.com/samba-team/samba.git
synced 2025-10-19 23:33:15 +03:00
Remove redundant parameter fd from SMB_VFS_FGETXATTR().
Michael
This commit is contained in:
@@ -94,6 +94,7 @@
|
||||
/* Leave at 22 - not yet released. Remove parameter fd from sys_acl_get_fd. - obnox */
|
||||
/* Leave at 22 - not yet released. Remove parameter fd from fchmod_acl. - obnox */
|
||||
/* Leave at 22 - not yet released. Remove parameter fd from sys_acl_set_fd. - obnox */
|
||||
/* Leave at 22 - not yet released. Remove parameter fd from fgetxattr. - obnox */
|
||||
|
||||
|
||||
|
||||
@@ -377,7 +378,7 @@ struct vfs_ops {
|
||||
/* EA operations. */
|
||||
ssize_t (*getxattr)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
|
||||
ssize_t (*lgetxattr)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
|
||||
ssize_t (*fgetxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp,int fd, const char *name, void *value, size_t size);
|
||||
ssize_t (*fgetxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size);
|
||||
ssize_t (*listxattr)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
|
||||
ssize_t (*llistxattr)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
|
||||
ssize_t (*flistxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp,int fd, char *list, size_t size);
|
||||
|
@@ -119,7 +119,7 @@
|
||||
/* EA operations. */
|
||||
#define SMB_VFS_GETXATTR(conn,path,name,value,size) ((conn)->vfs.ops.getxattr((conn)->vfs.handles.getxattr,(path),(name),(value),(size)))
|
||||
#define SMB_VFS_LGETXATTR(conn,path,name,value,size) ((conn)->vfs.ops.lgetxattr((conn)->vfs.handles.lgetxattr,(path),(name),(value),(size)))
|
||||
#define SMB_VFS_FGETXATTR(fsp,fd,name,value,size) ((fsp)->conn->vfs.ops.fgetxattr((fsp)->conn->vfs.handles.fgetxattr,(fsp),(fd),(name),(value),(size)))
|
||||
#define SMB_VFS_FGETXATTR(fsp,name,value,size) ((fsp)->conn->vfs.ops.fgetxattr((fsp)->conn->vfs.handles.fgetxattr,(fsp),(name),(value),(size)))
|
||||
#define SMB_VFS_LISTXATTR(conn,path,list,size) ((conn)->vfs.ops.listxattr((conn)->vfs.handles.listxattr,(path),(list),(size)))
|
||||
#define SMB_VFS_LLISTXATTR(conn,path,list,size) ((conn)->vfs.ops.llistxattr((conn)->vfs.handles.llistxattr,(path),(list),(size)))
|
||||
#define SMB_VFS_FLISTXATTR(fsp,fd,list,size) ((fsp)->conn->vfs.ops.flistxattr((fsp)->conn->vfs.handles.flistxattr,(fsp),(fd),(list),(size)))
|
||||
@@ -238,7 +238,7 @@
|
||||
/* EA operations. */
|
||||
#define SMB_VFS_OPAQUE_GETXATTR(conn,path,name,value,size) ((conn)->vfs_opaque.ops.getxattr((conn)->vfs_opaque.handles.getxattr,(path),(name),(value),(size)))
|
||||
#define SMB_VFS_OPAQUE_LGETXATTR(conn,path,name,value,size) ((conn)->vfs_opaque.ops.lgetxattr((conn)->vfs_opaque.handles.lgetxattr,(path),(name),(value),(size)))
|
||||
#define SMB_VFS_OPAQUE_FGETXATTR(fsp,fd,name,value,size) ((fsp)->conn->vfs_opaque.ops.fgetxattr((fsp)->conn->vfs_opaque.handles.fgetxattr,(fsp),(fd),(name),(value),(size)))
|
||||
#define SMB_VFS_OPAQUE_FGETXATTR(fsp,name,value,size) ((fsp)->conn->vfs_opaque.ops.fgetxattr((fsp)->conn->vfs_opaque.handles.fgetxattr,(fsp),(name),(value),(size)))
|
||||
#define SMB_VFS_OPAQUE_LISTXATTR(conn,path,list,size) ((conn)->vfs_opaque.ops.listxattr((conn)->vfs_opaque.handles.listxattr,(path),(list),(size)))
|
||||
#define SMB_VFS_OPAQUE_LLISTXATTR(conn,path,list,size) ((conn)->vfs_opaque.ops.llistxattr((conn)->vfs_opaque.handles.llistxattr,(path),(list),(size)))
|
||||
#define SMB_VFS_OPAQUE_FLISTXATTR(fsp,fd,list,size) ((fsp)->conn->vfs_opaque.ops.flistxattr((fsp)->conn->vfs_opaque.handles.flistxattr,(fsp),(fd),(list),(size)))
|
||||
@@ -358,7 +358,7 @@
|
||||
/* EA operations. */
|
||||
#define SMB_VFS_NEXT_GETXATTR(handle,path,name,value,size) ((handle)->vfs_next.ops.getxattr((handle)->vfs_next.handles.getxattr,(path),(name),(value),(size)))
|
||||
#define SMB_VFS_NEXT_LGETXATTR(handle,path,name,value,size) ((handle)->vfs_next.ops.lgetxattr((handle)->vfs_next.handles.lgetxattr,(path),(name),(value),(size)))
|
||||
#define SMB_VFS_NEXT_FGETXATTR(handle,fsp,fd,name,value,size) ((handle)->vfs_next.ops.fgetxattr((handle)->vfs_next.handles.fgetxattr,(fsp),(fd),(name),(value),(size)))
|
||||
#define SMB_VFS_NEXT_FGETXATTR(handle,fsp,name,value,size) ((handle)->vfs_next.ops.fgetxattr((handle)->vfs_next.handles.fgetxattr,(fsp),(name),(value),(size)))
|
||||
#define SMB_VFS_NEXT_LISTXATTR(handle,path,list,size) ((handle)->vfs_next.ops.listxattr((handle)->vfs_next.handles.listxattr,(path),(list),(size)))
|
||||
#define SMB_VFS_NEXT_LLISTXATTR(handle,path,list,size) ((handle)->vfs_next.ops.llistxattr((handle)->vfs_next.handles.llistxattr,(path),(list),(size)))
|
||||
#define SMB_VFS_NEXT_FLISTXATTR(handle,fsp,fd,list,size) ((handle)->vfs_next.ops.flistxattr((handle)->vfs_next.handles.flistxattr,(fsp),(fd),(list),(size)))
|
||||
|
@@ -363,7 +363,7 @@ size)
|
||||
return SMB_VFS_NEXT_LGETXATTR(handle, cappath, capname, value, size);
|
||||
}
|
||||
|
||||
static ssize_t cap_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp,int fd, const char *path, void *value, size_t size)
|
||||
static ssize_t cap_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *path, void *value, size_t size)
|
||||
{
|
||||
char *cappath = capencode(talloc_tos(), path);
|
||||
|
||||
@@ -371,7 +371,7 @@ static ssize_t cap_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
return SMB_VFS_NEXT_FGETXATTR(handle, fsp, fd, cappath, value, size);
|
||||
return SMB_VFS_NEXT_FGETXATTR(handle, fsp, cappath, value, size);
|
||||
}
|
||||
|
||||
static ssize_t cap_listxattr(vfs_handle_struct *handle, const char *path, char *list, size_t size)
|
||||
|
@@ -1141,9 +1141,9 @@ static ssize_t vfswrap_lgetxattr(struct vfs_handle_struct *handle,const char *pa
|
||||
return sys_lgetxattr(path, name, value, size);
|
||||
}
|
||||
|
||||
static ssize_t vfswrap_fgetxattr(struct vfs_handle_struct *handle, struct files_struct *fsp,int fd, const char *name, void *value, size_t size)
|
||||
static ssize_t vfswrap_fgetxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size)
|
||||
{
|
||||
return sys_fgetxattr(fd, name, value, size);
|
||||
return sys_fgetxattr(fsp->fh->fd, name, value, size);
|
||||
}
|
||||
|
||||
static ssize_t vfswrap_listxattr(struct vfs_handle_struct *handle, const char *path, char *list, size_t size)
|
||||
|
@@ -270,7 +270,7 @@ static ssize_t smb_full_audit_lgetxattr(struct vfs_handle_struct *handle,
|
||||
const char *path, const char *name,
|
||||
void *value, size_t size);
|
||||
static ssize_t smb_full_audit_fgetxattr(struct vfs_handle_struct *handle,
|
||||
struct files_struct *fsp, int fd,
|
||||
struct files_struct *fsp,
|
||||
const char *name, void *value, size_t size);
|
||||
static ssize_t smb_full_audit_listxattr(struct vfs_handle_struct *handle,
|
||||
const char *path, char *list, size_t size);
|
||||
@@ -1956,12 +1956,12 @@ static ssize_t smb_full_audit_lgetxattr(struct vfs_handle_struct *handle,
|
||||
}
|
||||
|
||||
static ssize_t smb_full_audit_fgetxattr(struct vfs_handle_struct *handle,
|
||||
struct files_struct *fsp, int fd,
|
||||
struct files_struct *fsp,
|
||||
const char *name, void *value, size_t size)
|
||||
{
|
||||
ssize_t result;
|
||||
|
||||
result = SMB_VFS_NEXT_FGETXATTR(handle, fsp, fd, name, value, size);
|
||||
result = SMB_VFS_NEXT_FGETXATTR(handle, fsp, name, value, size);
|
||||
|
||||
do_log(SMB_VFS_OP_FGETXATTR, (result >= 0), handle,
|
||||
"%s|%s", fsp->fsp_name, name);
|
||||
|
@@ -445,7 +445,7 @@ static struct pai_val *fload_inherited_info(files_struct *fsp)
|
||||
|
||||
do {
|
||||
if (fsp->fh->fd != -1)
|
||||
ret = SMB_VFS_FGETXATTR(fsp, fsp->fh->fd, SAMBA_POSIX_INHERITANCE_EA_NAME,
|
||||
ret = SMB_VFS_FGETXATTR(fsp, SAMBA_POSIX_INHERITANCE_EA_NAME,
|
||||
pai_buf, pai_buf_size);
|
||||
else
|
||||
ret = SMB_VFS_GETXATTR(fsp->conn,fsp->fsp_name,SAMBA_POSIX_INHERITANCE_EA_NAME,
|
||||
|
@@ -130,7 +130,7 @@ static bool get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn, files_str
|
||||
}
|
||||
|
||||
if (fsp && fsp->fh->fd != -1) {
|
||||
sizeret = SMB_VFS_FGETXATTR(fsp, fsp->fh->fd, ea_name, val, attr_size);
|
||||
sizeret = SMB_VFS_FGETXATTR(fsp, ea_name, val, attr_size);
|
||||
} else {
|
||||
sizeret = SMB_VFS_GETXATTR(conn, fname, ea_name, val, attr_size);
|
||||
}
|
||||
|
Reference in New Issue
Block a user