s3-vfs: Remove unused llistxattr call from VFS modules, system.c and configure
authorAndrew Bartlett <abartlet@samba.org>
Tue, 3 Apr 2012 22:26:22 +0000 (08:26 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 5 Apr 2012 03:39:00 +0000 (13:39 +1000)
If this is ever needed again, it would be more appropriate as an options argument
to listxattr.

Andrew Bartlett

16 files changed:
docs-xml/manpages-3/vfs_full_audit.8.xml
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/configure.in
source3/include/proto.h
source3/include/vfs.h
source3/include/vfs_macros.h
source3/lib/system.c
source3/modules/vfs_cap.c
source3/modules/vfs_catia.c
source3/modules/vfs_default.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_onefs_shadow_copy.c
source3/modules/vfs_time_audit.c
source3/smbd/vfs.c
source3/wscript

index d77d0234ddc09eea691670d3a90df6d5490bba0b..f142f87b9d711586730f6fc467e981a646e4ad5e 100644 (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>
index 924947afff7c92bd79bd8c3d2b2a8aa1d455ef10..50a8e2908ced060a9e4eb3cd99bc3cef21ff5eef 100644 (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,
index 29923d80833791571cafa17ab2ea8e7f671cd343..932888e2dea763d12f042411993dacb1a68c2db8 100644 (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,
index 58dd1c230713ec36e29fc94ffbaeee582f1e4cba..c4f724b17d3ed6b285afa51dc4a75dbd6ee5af9b 100644 (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)
index 2872ada33d0e0d36c9a2d8f84222f3049063a390..5bfd05cb539e92720b8278ac0ad18864d823f7b5 100644 (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);
index d1aa9e96dc75c1662fd47e2f422fddbb4e1aabf9..258bec9275115d95af0e6bd5d526d04787c91a11 100644 (file)
 /* 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);
index e35630a629aa643e71b45032bba2cef69ba93d04..6af662c1f4e8bd8b6c8c3eaeac85764e44a436fd 100644 (file)
 #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) \
index 70df46605dfbae5fe948b3a75805ed81b6e1d180..ed5cf0cec89a3b1584e888905f7123779ad7b941 100644 (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)
index 716e5dce80596de4fdb477da797edaa710424b42..125b5f43da7b4cb9907bbe7d83a01ba0075e9a1e 100644 (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,
index c34edf70730d123001990528ee2928a530cab545..687547dc17b1b7d42d1eea98b2eb8b15ab65f8e7 100644 (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,
index ed1ee707e26d5a82dac9fed9df94a163f23716e7..a7abe0ba4242b3b70fc91f454629fb79ba36cfec 100644 (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,
index a35c210d2b79333492a4936279ca6b232771a488..8c7e0f36ccb7e3d835140e02f8ae4895a3564426 100644 (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,
index 09df2f8f3e252b4de2f88cdf4fa7a7216b8caddc..410859a046f9e31fc71e71af112b5b6b32459780 100644 (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,
index 8d7c7439f2beb3e45f3f1b5a0926c26acc7619af..4064bccfbcc1bb7eaf316307b322150e159db48e 100644 (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,
index 93c268f6fad792a9fede6bafbd6d9047ad7b198b..2c5a0b8a89cc46017578964e590b68f11a61fea2 100644 (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)
index dcf2b9d4150bc3ddcf4df540af1db50bdff46603..3eabed0e4385f28129539d3450c74eb492f4267b 100644 (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