1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

s3-vfs: Remove unused llistxattr call from VFS modules, system.c and configure

If this is ever needed again, it would be more appropriate as an options argument
to listxattr.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 2012-04-04 08:26:22 +10:00
parent b2f7cfa848
commit c5b17c5555
16 changed files with 4 additions and 147 deletions

View File

@ -77,7 +77,6 @@
<member>link</member>
<member>linux_setlease</member>
<member>listxattr</member>
<member>llistxattr</member>
<member>lock</member>
<member>lremovexattr</member>
<member>lseek</member>

View File

@ -680,12 +680,6 @@ static ssize_t skel_listxattr(vfs_handle_struct *handle, const char *path, char
return -1;
}
static ssize_t skel_llistxattr(vfs_handle_struct *handle, const char *path, char *list, size_t size)
{
errno = ENOSYS;
return -1;
}
static ssize_t skel_flistxattr(vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
{
errno = ENOSYS;
@ -908,7 +902,6 @@ struct vfs_fn_pointers skel_opaque_fns = {
.getxattr_fn = skel_getxattr,
.fgetxattr_fn = skel_fgetxattr,
.listxattr_fn = skel_listxattr,
.llistxattr_fn = skel_llistxattr,
.flistxattr_fn = skel_flistxattr,
.removexattr_fn = skel_removexattr,
.lremovexattr_fn = skel_lremovexattr,

View File

@ -656,11 +656,6 @@ static ssize_t skel_listxattr(vfs_handle_struct *handle, const char *path, char
return SMB_VFS_NEXT_LISTXATTR(handle, path, list, size);
}
static ssize_t skel_llistxattr(vfs_handle_struct *handle, const char *path, char *list, size_t size)
{
return SMB_VFS_NEXT_LLISTXATTR(handle, path, list, size);
}
static ssize_t skel_flistxattr(vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
{
return SMB_VFS_NEXT_FLISTXATTR(handle, fsp, list, size);
@ -865,7 +860,6 @@ struct vfs_fn_pointers skel_transparent_fns = {
.getxattr_fn = skel_getxattr,
.fgetxattr_fn = skel_fgetxattr,
.listxattr_fn = skel_listxattr,
.llistxattr_fn = skel_llistxattr,
.flistxattr_fn = skel_flistxattr,
.removexattr_fn = skel_removexattr,
.lremovexattr_fn = skel_lremovexattr,

View File

@ -1301,10 +1301,10 @@ case "$host_os" in
*)
AC_SEARCH_LIBS(getxattr, [attr])
AC_CHECK_FUNCS(getxattr,[
AC_CHECK_FUNCS(fgetxattr listxattr llistxattr flistxattr removexattr lremovexattr fremovexattr setxattr lsetxattr fsetxattr)
AC_CHECK_FUNCS(fgetxattr listxattr flistxattr removexattr lremovexattr fremovexattr setxattr lsetxattr fsetxattr)
])
AC_CHECK_FUNCS(getea,[
AC_CHECK_FUNCS(fgetea lgetea listea flistea llistea removeea fremoveea lremoveea setea fsetea lsetea)
AC_CHECK_FUNCS(fgetea lgetea listea flistea removeea fremoveea lremoveea setea fsetea lsetea)
])
AC_CHECK_FUNCS(attr_get,[
AC_CHECK_FUNCS(attr_list attr_set attr_remove attr_getf attr_listf attr_setf attr_removef)

View File

@ -353,7 +353,6 @@ int sys_pclose(int fd);
ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t size);
ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size);
ssize_t sys_listxattr (const char *path, char *list, size_t size);
ssize_t sys_llistxattr (const char *path, char *list, size_t size);
ssize_t sys_flistxattr (int filedes, char *list, size_t size);
int sys_removexattr (const char *path, const char *name);
int sys_lremovexattr (const char *path, const char *name);

View File

@ -138,6 +138,7 @@
/* Bump to version 29 - Samba 3.6.0 will ship with interface version 28. */
/* Leave at 29 - not yet releases. Add fsctl. Richard Sharpe */
/* Leave at 29 - not yet released. add SMB_VFS_GET_DFS_REFERRAL() - metze */
/* Leave at 29 - not yet released. Remove llistxattr and lgetxattr - abartlet */
#define SMB_VFS_INTERFACE_VERSION 29
/*
@ -400,7 +401,6 @@ struct vfs_fn_pointers {
ssize_t (*getxattr_fn)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
ssize_t (*fgetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size);
ssize_t (*listxattr_fn)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
ssize_t (*llistxattr_fn)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
ssize_t (*flistxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size);
int (*removexattr_fn)(struct vfs_handle_struct *handle, const char *path, const char *name);
int (*lremovexattr_fn)(struct vfs_handle_struct *handle, const char *path, const char *name);

View File

@ -529,11 +529,6 @@
#define SMB_VFS_NEXT_LISTXATTR(handle,path,list,size) \
smb_vfs_call_listxattr((handle)->next,(path),(list),(size))
#define SMB_VFS_LLISTXATTR(conn,path,list,size) \
smb_vfs_call_llistxattr((conn)->vfs_handles,(path),(list),(size))
#define SMB_VFS_NEXT_LLISTXATTR(handle,path,list,size) \
smb_vfs_call_llistxattr((handle)->next,(path),(list),(size))
#define SMB_VFS_FLISTXATTR(fsp,list,size) \
smb_vfs_call_flistxattr((fsp)->conn->vfs_handles, (fsp), (list),(size))
#define SMB_VFS_NEXT_FLISTXATTR(handle,fsp,list,size) \

View File

@ -1610,35 +1610,6 @@ ssize_t sys_listxattr (const char *path, char *list, size_t size)
#endif
}
ssize_t sys_llistxattr (const char *path, char *list, size_t size)
{
#if defined(HAVE_LLISTXATTR)
return llistxattr(path, list, size);
#elif defined(HAVE_LISTXATTR) && defined(XATTR_ADD_OPT)
int options = XATTR_NOFOLLOW;
return listxattr(path, list, size, options);
#elif defined(HAVE_LLISTEA)
return llistea(path, list, size);
#elif defined(HAVE_EXTATTR_LIST_LINK)
extattr_arg arg;
arg.path = path;
return bsd_attr_list(1, arg, list, size);
#elif defined(HAVE_ATTR_LIST) && defined(HAVE_SYS_ATTRIBUTES_H)
return irix_attr_list(path, 0, list, size, ATTR_DONTFOLLOW);
#elif defined(HAVE_ATTROPEN)
ssize_t ret = -1;
int attrdirfd = solaris_attropen(path, ".", O_RDONLY|AT_SYMLINK_NOFOLLOW, 0);
if (attrdirfd >= 0) {
ret = solaris_list_xattr(attrdirfd, list, size);
close(attrdirfd);
}
return ret;
#else
errno = ENOSYS;
return -1;
#endif
}
ssize_t sys_flistxattr (int filedes, char *list, size_t size)
{
#if defined(HAVE_FLISTXATTR)

View File

@ -476,17 +476,6 @@ static ssize_t cap_listxattr(vfs_handle_struct *handle, const char *path, char *
return SMB_VFS_NEXT_LISTXATTR(handle, cappath, list, size);
}
static ssize_t cap_llistxattr(vfs_handle_struct *handle, const char *path, char *list, size_t size)
{
char *cappath = capencode(talloc_tos(), path);
if (!cappath) {
errno = ENOMEM;
return -1;
}
return SMB_VFS_NEXT_LLISTXATTR(handle, cappath, list, size);
}
static int cap_removexattr(vfs_handle_struct *handle, const char *path, const char *name)
{
char *cappath = capencode(talloc_tos(), path);
@ -585,7 +574,6 @@ static struct vfs_fn_pointers vfs_cap_fns = {
.getxattr_fn = cap_getxattr,
.fgetxattr_fn = cap_fgetxattr,
.listxattr_fn = cap_listxattr,
.llistxattr_fn = cap_llistxattr,
.removexattr_fn = cap_removexattr,
.lremovexattr_fn = cap_lremovexattr,
.fremovexattr_fn = cap_fremovexattr,

View File

@ -852,28 +852,6 @@ catia_listxattr(vfs_handle_struct *handle, const char *path,
return ret;
}
static ssize_t
catia_llistxattr(vfs_handle_struct *handle, const char *path,
char *list, size_t size)
{
char *mapped_name = NULL;
NTSTATUS status;
ssize_t ret;
status = catia_string_replace_allocate(handle->conn,
path, &mapped_name, vfs_translate_to_unix);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
return -1;
}
ret = SMB_VFS_NEXT_LLISTXATTR(handle, mapped_name, list, size);
TALLOC_FREE(mapped_name);
return ret;
}
static int
catia_removexattr(vfs_handle_struct *handle, const char *path,
const char *name)
@ -988,7 +966,6 @@ static struct vfs_fn_pointers vfs_catia_fns = {
.sys_acl_delete_def_file_fn = catia_sys_acl_delete_def_file,
.getxattr_fn = catia_getxattr,
.listxattr_fn = catia_listxattr,
.llistxattr_fn = catia_llistxattr,
.removexattr_fn = catia_removexattr,
.lremovexattr_fn = catia_lremovexattr,
.setxattr_fn = catia_setxattr,

View File

@ -2018,11 +2018,6 @@ static ssize_t vfswrap_listxattr(struct vfs_handle_struct *handle, const char *p
return sys_listxattr(path, list, size);
}
static ssize_t vfswrap_llistxattr(struct vfs_handle_struct *handle, const char *path, char *list, size_t size)
{
return sys_llistxattr(path, list, size);
}
static ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
{
return sys_flistxattr(fsp->fh->fd, list, size);
@ -2276,7 +2271,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
.getxattr_fn = vfswrap_getxattr,
.fgetxattr_fn = vfswrap_fgetxattr,
.listxattr_fn = vfswrap_listxattr,
.llistxattr_fn = vfswrap_llistxattr,
.flistxattr_fn = vfswrap_flistxattr,
.removexattr_fn = vfswrap_removexattr,
.lremovexattr_fn = vfswrap_lremovexattr,

View File

@ -193,7 +193,6 @@ typedef enum _vfs_op_type {
SMB_VFS_OP_GETXATTR,
SMB_VFS_OP_FGETXATTR,
SMB_VFS_OP_LISTXATTR,
SMB_VFS_OP_LLISTXATTR,
SMB_VFS_OP_FLISTXATTR,
SMB_VFS_OP_REMOVEXATTR,
SMB_VFS_OP_LREMOVEXATTR,
@ -323,7 +322,6 @@ static struct {
{ SMB_VFS_OP_GETXATTR, "getxattr" },
{ SMB_VFS_OP_FGETXATTR, "fgetxattr" },
{ SMB_VFS_OP_LISTXATTR, "listxattr" },
{ SMB_VFS_OP_LLISTXATTR, "llistxattr" },
{ SMB_VFS_OP_FLISTXATTR, "flistxattr" },
{ SMB_VFS_OP_REMOVEXATTR, "removexattr" },
{ SMB_VFS_OP_LREMOVEXATTR, "lremovexattr" },
@ -1998,18 +1996,6 @@ static ssize_t smb_full_audit_listxattr(struct vfs_handle_struct *handle,
return result;
}
static ssize_t smb_full_audit_llistxattr(struct vfs_handle_struct *handle,
const char *path, char *list, size_t size)
{
ssize_t result;
result = SMB_VFS_NEXT_LLISTXATTR(handle, path, list, size);
do_log(SMB_VFS_OP_LLISTXATTR, (result >= 0), handle, "%s", path);
return result;
}
static ssize_t smb_full_audit_flistxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, char *list,
size_t size)
@ -2324,7 +2310,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
.getxattr_fn = smb_full_audit_getxattr,
.fgetxattr_fn = smb_full_audit_fgetxattr,
.listxattr_fn = smb_full_audit_listxattr,
.llistxattr_fn = smb_full_audit_llistxattr,
.flistxattr_fn = smb_full_audit_flistxattr,
.removexattr_fn = smb_full_audit_removexattr,
.lremovexattr_fn = smb_full_audit_lremovexattr,

View File

@ -577,15 +577,6 @@ onefs_shadow_copy_listxattr(vfs_handle_struct *handle, const char *path,
ssize_t);
}
static ssize_t
onefs_shadow_copy_llistxattr(vfs_handle_struct *handle, const char *path,
char *list, size_t size)
{
SHADOW_NEXT(LLISTXATTR,
(handle, cpath ?: path, list, size),
ssize_t);
}
static int
onefs_shadow_copy_removexattr(vfs_handle_struct *handle, const char *path,
const char *name)
@ -681,7 +672,6 @@ static struct vfs_fn_pointers onefs_shadow_copy_fns = {
.sys_acl_delete_def_file_fn = onefs_shadow_copy_sys_acl_delete_def_file,
.getxattr_fn = onefs_shadow_copy_getxattr,
.listxattr_fn = onefs_shadow_copy_listxattr,
.llistxattr_fn = onefs_shadow_copy_llistxattr,
.removexattr_fn = onefs_shadow_copy_removexattr,
.lremovexattr_fn = onefs_shadow_copy_lremovexattr,
.setxattr_fn = onefs_shadow_copy_setxattr,

View File

@ -1993,26 +1993,6 @@ static ssize_t smb_time_audit_listxattr(struct vfs_handle_struct *handle,
return result;
}
static ssize_t smb_time_audit_llistxattr(struct vfs_handle_struct *handle,
const char *path, char *list,
size_t size)
{
ssize_t result;
struct timespec ts1,ts2;
double timediff;
clock_gettime_mono(&ts1);
result = SMB_VFS_NEXT_LLISTXATTR(handle, path, list, size);
clock_gettime_mono(&ts2);
timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
if (timediff > audit_timeout) {
smb_time_audit_log("llistxattr", timediff);
}
return result;
}
static ssize_t smb_time_audit_flistxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, char *list,
size_t size)
@ -2416,7 +2396,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
.getxattr_fn = smb_time_audit_getxattr,
.fgetxattr_fn = smb_time_audit_fgetxattr,
.listxattr_fn = smb_time_audit_listxattr,
.llistxattr_fn = smb_time_audit_llistxattr,
.flistxattr_fn = smb_time_audit_flistxattr,
.removexattr_fn = smb_time_audit_removexattr,
.lremovexattr_fn = smb_time_audit_lremovexattr,

View File

@ -2165,13 +2165,6 @@ ssize_t smb_vfs_call_listxattr(struct vfs_handle_struct *handle,
return handle->fns->listxattr_fn(handle, path, list, size);
}
ssize_t smb_vfs_call_llistxattr(struct vfs_handle_struct *handle,
const char *path, char *list, size_t size)
{
VFS_FIND(llistxattr);
return handle->fns->llistxattr_fn(handle, path, list, size);
}
ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, char *list,
size_t size)

View File

@ -242,7 +242,7 @@ getcwd _getcwd __getcwd getdents __getdents getdirentries
getgrent getgrnam getgrouplist getgrset getmntent getpagesize
getproplist get_proplist_entry getpwanam getpwent_r getrlimit gettext
glob grantpt hstrerror initgroups innetgr
inotify_init listea listxattr llistea llistxattr
inotify_init listea listxattr
llseek _llseek __llseek lremoveea lremovexattr _lseek __lseek
lsetea lsetxattr _lstat __lstat lutimes
__lxstat memalign mknod mlock mlockall munlock munlockall