[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Wed Apr 4 23:14:02 MDT 2012


The branch, master has been updated
       via  4816646 s3-build: Remove unused configure checks for xattr functions
       via  19eee33 s3-vfs: Remove unused lremovexattr call from VFS modules, system.c and configure
       via  4af0f5f s3-build: Remove unused configure checks for xattr functions
       via  c70ac29 s3-vfs: Remove unused lsetxattr call from VFS modules, system.c and configure
       via  c5b17c5 s3-vfs: Remove unused llistxattr call from VFS modules, system.c and configure
       via  b2f7cfa s3-vfs: Remove unused lgetxattr call from VFS modules, system.c and configure
      from  52113b3 build: Add configure summary checking to waf build

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 48166468fe3ca515dae3431bbe674809489f743c
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Apr 4 08:47:26 2012 +1000

    s3-build: Remove unused configure checks for xattr functions
    
    Autobuild-User: Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date: Thu Apr  5 07:13:29 CEST 2012 on sn-devel-104

commit 19eee33d82b4c1947b646241b6f22651abbce19d
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Apr 4 08:46:25 2012 +1000

    s3-vfs: Remove unused lremovexattr call from VFS modules, system.c and configure
    
    If this is ever needed again, it would be more appropriate as an options argument
    to removexattr.
    
    Andrew Bartlett

commit 4af0f5f135211f49f8d6365e1819c11037485170
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Apr 4 08:35:01 2012 +1000

    s3-build: Remove unused configure checks for xattr functions

commit c70ac29c5441073752da7384b7f3bf54c9986aa0
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Apr 4 08:34:25 2012 +1000

    s3-vfs: Remove unused lsetxattr 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

commit c5b17c555576a2b8e24e0df613dde922fe60520d
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Apr 4 08:26:22 2012 +1000

    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

commit b2f7cfa848def91b6ea458e1ad14af8e96ad4ca3
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Apr 2 12:43:15 2012 +1000

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

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/manpages-3/vfs_full_audit.8.xml |    4 -
 examples/VFS/skel_opaque.c               |   29 -----
 examples/VFS/skel_transparent.c          |   25 ----
 source3/configure.in                     |    6 +-
 source3/include/proto.h                  |    4 -
 source3/include/vfs.h                    |   10 +--
 source3/include/vfs_macros.h             |   20 ----
 source3/lib/system.c                     |  181 ------------------------------
 source3/modules/vfs_cap.c                |   52 ---------
 source3/modules/vfs_catia.c              |   93 ---------------
 source3/modules/vfs_default.c            |   24 ----
 source3/modules/vfs_full_audit.c         |   68 -----------
 source3/modules/vfs_onefs_shadow_copy.c  |   40 -------
 source3/modules/vfs_shadow_copy2.c       |   91 ---------------
 source3/modules/vfs_time_audit.c         |   85 --------------
 source3/smbd/vfs.c                       |   31 -----
 source3/wscript                          |   12 +-
 17 files changed, 10 insertions(+), 765 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/vfs_full_audit.8.xml b/docs-xml/manpages-3/vfs_full_audit.8.xml
index 9c9dc84..8dbceb9 100644
--- a/docs-xml/manpages-3/vfs_full_audit.8.xml
+++ b/docs-xml/manpages-3/vfs_full_audit.8.xml
@@ -74,15 +74,11 @@
         <member>getwd</member>
         <member>getxattr</member>
         <member>kernel_flock</member>
-        <member>lgetxattr</member>
         <member>link</member>
         <member>linux_setlease</member>
         <member>listxattr</member>
-        <member>llistxattr</member>
         <member>lock</member>
-        <member>lremovexattr</member>
         <member>lseek</member>
-        <member>lsetxattr</member>
         <member>lstat</member>
         <member>mkdir</member>
         <member>mknod</member>
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 426e7b7..40691ed 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -668,13 +668,6 @@ static ssize_t skel_getxattr(vfs_handle_struct *handle, const char *path, const
 	return -1;
 }
 
-static ssize_t skel_lgetxattr(vfs_handle_struct *handle, const char *path, const char *name, void *value, size_t
-size)
-{
-	errno = ENOSYS;
-	return -1;
-}
-
 static ssize_t skel_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size)
 {
 	errno = ENOSYS;
@@ -687,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;
@@ -705,12 +692,6 @@ static int skel_removexattr(vfs_handle_struct *handle, const char *path, const c
 	return -1;
 }
 
-static int skel_lremovexattr(vfs_handle_struct *handle, const char *path, const char *name)
-{
-	errno = ENOSYS;
-	return -1;
-}
-
 static int skel_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name)
 {
 	errno = ENOSYS;
@@ -724,12 +705,6 @@ static int skel_setxattr(vfs_handle_struct *handle, const char *path, const char
 	return -1;
 }
 
-static int skel_lsetxattr(vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
-{
-	errno = ENOSYS;
-	return -1;
-}
-
 static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags)
 {
 	errno = ENOSYS;
@@ -913,16 +888,12 @@ struct vfs_fn_pointers skel_opaque_fns = {
 
 	/* EA operations. */
 	.getxattr_fn = skel_getxattr,
-	.lgetxattr_fn = skel_lgetxattr,
 	.fgetxattr_fn = skel_fgetxattr,
 	.listxattr_fn = skel_listxattr,
-	.llistxattr_fn = skel_llistxattr,
 	.flistxattr_fn = skel_flistxattr,
 	.removexattr_fn = skel_removexattr,
-	.lremovexattr_fn = skel_lremovexattr,
 	.fremovexattr_fn = skel_fremovexattr,
 	.setxattr_fn = skel_setxattr,
-	.lsetxattr_fn = skel_lsetxattr,
 	.fsetxattr_fn = skel_fsetxattr,
 
 	/* aio operations */
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index f947194..2d5fcdd 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -646,12 +646,6 @@ static ssize_t skel_getxattr(vfs_handle_struct *handle, const char *path, const
         return SMB_VFS_NEXT_GETXATTR(handle, path, name, value, size);
 }
 
-static ssize_t skel_lgetxattr(vfs_handle_struct *handle, const char *path, const char *name, void *value, size_t
-size)
-{
-        return SMB_VFS_NEXT_LGETXATTR(handle, path, name, value, size);
-}
-
 static ssize_t skel_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size)
 {
         return SMB_VFS_NEXT_FGETXATTR(handle, fsp, name, value, size);
@@ -662,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);
@@ -677,11 +666,6 @@ static int skel_removexattr(vfs_handle_struct *handle, const char *path, const c
         return SMB_VFS_NEXT_REMOVEXATTR(handle, path, name);
 }
 
-static int skel_lremovexattr(vfs_handle_struct *handle, const char *path, const char *name)
-{
-        return SMB_VFS_NEXT_LREMOVEXATTR(handle, path, name);
-}
-
 static int skel_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name)
 {
         return SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name);
@@ -692,11 +676,6 @@ static int skel_setxattr(vfs_handle_struct *handle, const char *path, const char
         return SMB_VFS_NEXT_SETXATTR(handle, path, name, value, size, flags);
 }
 
-static int skel_lsetxattr(vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
-{
-        return SMB_VFS_NEXT_LSETXATTR(handle, path, name, value, size, flags);
-}
-
 static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags)
 {
         return SMB_VFS_NEXT_FSETXATTR(handle, fsp, name, value, size, flags);
@@ -869,16 +848,12 @@ struct vfs_fn_pointers skel_transparent_fns = {
 
 	/* EA operations. */
 	.getxattr_fn = skel_getxattr,
-	.lgetxattr_fn = skel_lgetxattr,
 	.fgetxattr_fn = skel_fgetxattr,
 	.listxattr_fn = skel_listxattr,
-	.llistxattr_fn = skel_llistxattr,
 	.flistxattr_fn = skel_flistxattr,
 	.removexattr_fn = skel_removexattr,
-	.lremovexattr_fn = skel_lremovexattr,
 	.fremovexattr_fn = skel_fremovexattr,
 	.setxattr_fn = skel_setxattr,
-	.lsetxattr_fn = skel_lsetxattr,
 	.fsetxattr_fn = skel_fsetxattr,
 
 	/* aio operations */
diff --git a/source3/configure.in b/source3/configure.in
index e278a39..8e44c23 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1301,16 +1301,16 @@ case "$host_os" in
   *)
 	AC_SEARCH_LIBS(getxattr, [attr])
 	AC_CHECK_FUNCS(getxattr,[
-		AC_CHECK_FUNCS(lgetxattr fgetxattr listxattr llistxattr flistxattr removexattr lremovexattr fremovexattr setxattr lsetxattr fsetxattr)
+		AC_CHECK_FUNCS(fgetxattr listxattr flistxattr removexattr fremovexattr setxattr fsetxattr)
 		])
 	AC_CHECK_FUNCS(getea,[
-		AC_CHECK_FUNCS(fgetea lgetea listea flistea llistea removeea fremoveea lremoveea setea fsetea lsetea)
+		AC_CHECK_FUNCS(fgetea listea flistea removeea fremoveea setea fsetea)
 		])
 	AC_CHECK_FUNCS(attr_get,[
 		AC_CHECK_FUNCS(attr_list attr_set attr_remove attr_getf attr_listf attr_setf attr_removef)
 		])
 	AC_CHECK_FUNCS(extattr_delete_file,[
-		AC_CHECK_FUNCS(extattr_delete_fd extattr_delete_link extattr_get_fd extattr_get_file extattr_get_link extattr_list_fd extattr_list_file extattr_list_link extattr_set_fd extattr_set_file extattr_set_link)
+		AC_CHECK_FUNCS(extattr_delete_fd extattr_get_fd extattr_get_file extattr_list_fd extattr_list_file extattr_set_fd extattr_set_file)
 		])
   ;;
 esac
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 303ea9c..1d3dba6 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -351,16 +351,12 @@ int sys_setgroups(gid_t UNUSED(primary_gid), int setlen, gid_t *gidset);
 int sys_popen(const char *command);
 int sys_pclose(int fd);
 ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t size);
-ssize_t sys_lgetxattr (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);
 int sys_fremovexattr (int filedes, const char *name);
 int sys_setxattr (const char *path, const char *name, const void *value, size_t size, int flags);
-int sys_lsetxattr (const char *path, const char *name, const void *value, size_t size, int flags);
 int sys_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags);
 uint32 unix_dev_major(SMB_DEV_T dev);
 uint32 unix_dev_minor(SMB_DEV_T dev);
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 585214f..48b0973 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -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 l{list,get,set,remove}xattr - abartlet */
 #define SMB_VFS_INTERFACE_VERSION 29
 
 /*
@@ -398,16 +399,12 @@ struct vfs_fn_pointers {
 
 	/* EA operations. */
 	ssize_t (*getxattr_fn)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
-	ssize_t (*lgetxattr_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);
 	int (*fremovexattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name);
 	int (*setxattr_fn)(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags);
-	int (*lsetxattr_fn)(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags);
 	int (*fsetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags);
 
 	/* aio operations */
@@ -805,9 +802,6 @@ int smb_vfs_call_sys_acl_free_qualifier(struct vfs_handle_struct *handle,
 ssize_t smb_vfs_call_getxattr(struct vfs_handle_struct *handle,
 			      const char *path, const char *name, void *value,
 			      size_t size);
-ssize_t smb_vfs_call_lgetxattr(struct vfs_handle_struct *handle,
-			       const char *path, const char *name, void *value,
-			       size_t size);
 ssize_t smb_vfs_call_fgetxattr(struct vfs_handle_struct *handle,
 			       struct files_struct *fsp, const char *name,
 			       void *value, size_t size);
@@ -820,8 +814,6 @@ ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle,
 				size_t size);
 int smb_vfs_call_removexattr(struct vfs_handle_struct *handle,
 			     const char *path, const char *name);
-int smb_vfs_call_lremovexattr(struct vfs_handle_struct *handle,
-			      const char *path, const char *name);
 int smb_vfs_call_fremovexattr(struct vfs_handle_struct *handle,
 			      struct files_struct *fsp, const char *name);
 int smb_vfs_call_setxattr(struct vfs_handle_struct *handle, const char *path,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 68165fe..c324439 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -519,11 +519,6 @@
 #define SMB_VFS_NEXT_GETXATTR(handle,path,name,value,size) \
 	smb_vfs_call_getxattr((handle)->next,(path),(name),(value),(size))
 
-#define SMB_VFS_LGETXATTR(conn,path,name,value,size) \
-	smb_vfs_call_lgetxattr((conn)->vfs_handles,(path),(name),(value),(size))
-#define SMB_VFS_NEXT_LGETXATTR(handle,path,name,value,size) \
-	smb_vfs_call_lgetxattr((handle)->next,(path),(name),(value),(size))
-
 #define SMB_VFS_FGETXATTR(fsp,name,value,size) \
 	smb_vfs_call_fgetxattr((fsp)->conn->vfs_handles, (fsp), (name),(value),(size))
 #define SMB_VFS_NEXT_FGETXATTR(handle,fsp,name,value,size) \
@@ -534,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) \
@@ -549,11 +539,6 @@
 #define SMB_VFS_NEXT_REMOVEXATTR(handle,path,name) \
 	smb_vfs_call_removexattr((handle)->next,(path),(name))
 
-#define SMB_VFS_LREMOVEXATTR(conn,path,name) \
-	smb_vfs_call_lremovexattr((conn)->vfs_handles,(path),(name))
-#define SMB_VFS_NEXT_LREMOVEXATTR(handle,path,name) \
-	smb_vfs_call_lremovexattr((handle)->next,(path),(name))
-
 #define SMB_VFS_FREMOVEXATTR(fsp,name) \
 	smb_vfs_call_fremovexattr((fsp)->conn->vfs_handles, (fsp), (name))
 #define SMB_VFS_NEXT_FREMOVEXATTR(handle,fsp,name) \
@@ -564,11 +549,6 @@
 #define SMB_VFS_NEXT_SETXATTR(handle,path,name,value,size,flags) \
 	smb_vfs_call_setxattr((handle)->next,(path),(name),(value),(size),(flags))
 
-#define SMB_VFS_LSETXATTR(conn,path,name,value,size,flags) \
-	smb_vfs_call_lsetxattr((conn)->vfs_handles,(path),(name),(value),(size),(flags))
-#define SMB_VFS_NEXT_LSETXATTR(handle,path,name,value,size,flags) \
-	smb_vfs_call_lsetxattr((handle)->next,(path),(name),(value),(size),(flags))
-
 #define SMB_VFS_FSETXATTR(fsp,name,value,size,flags) \
 	smb_vfs_call_fsetxattr((fsp)->conn->vfs_handles, (fsp), (name),(value),(size),(flags))
 #define SMB_VFS_NEXT_FSETXATTR(handle,fsp,name,value,size,flags) \
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 5ba3aeb..8a38173 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1365,57 +1365,6 @@ ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t si
 #endif
 }
 
-ssize_t sys_lgetxattr (const char *path, const char *name, void *value, size_t size)
-{
-#if defined(HAVE_LGETXATTR)
-	return lgetxattr(path, name, value, size);
-#elif defined(HAVE_GETXATTR) && defined(XATTR_ADD_OPT)
-	int options = XATTR_NOFOLLOW;
-	return getxattr(path, name, value, size, 0, options);
-#elif defined(HAVE_LGETEA)
-	return lgetea(path, name, value, size);
-#elif defined(HAVE_EXTATTR_GET_LINK)
-	char *s;
-	ssize_t retval;
-	int attrnamespace = (strncmp(name, "system", 6) == 0) ? 
-		EXTATTR_NAMESPACE_SYSTEM : EXTATTR_NAMESPACE_USER;
-	const char *attrname = ((s=strchr_m(name, '.')) == NULL) ? name : s + 1;
-
-	if((retval=extattr_get_link(path, attrnamespace, attrname, NULL, 0)) >= 0) {
-		if(retval > size) {
-			errno = ERANGE;
-			return -1;
-		}
-		if((retval=extattr_get_link(path, attrnamespace, attrname, value, size)) >= 0)
-			return retval;
-	}
-
-	DEBUG(10,("sys_lgetxattr: extattr_get_link() failed with: %s\n", strerror(errno)));
-	return -1;
-#elif defined(HAVE_ATTR_GET)
-	int retval, flags = ATTR_DONTFOLLOW;
-	int valuelength = (int)size;
-	char *attrname = strchr(name,'.') + 1;
-
-	if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT;
-
-	retval = attr_get(path, attrname, (char *)value, &valuelength, flags);
-
-	return retval ? retval : valuelength;
-#elif defined(HAVE_ATTROPEN)
-	ssize_t ret = -1;
-	int attrfd = solaris_attropen(path, name, O_RDONLY|AT_SYMLINK_NOFOLLOW, 0);
-	if (attrfd >= 0) {
-		ret = solaris_read_xattr(attrfd, value, size);
-		close(attrfd);
-	}
-	return ret;
-#else
-	errno = ENOSYS;
-	return -1;
-#endif
-}
-
 ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size)
 {
 #if defined(HAVE_FGETXATTR)
@@ -1661,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)
@@ -1760,43 +1680,6 @@ int sys_removexattr (const char *path, const char *name)
 #endif
 }
 
-int sys_lremovexattr (const char *path, const char *name)
-{
-#if defined(HAVE_LREMOVEXATTR)
-	return lremovexattr(path, name);
-#elif defined(HAVE_REMOVEXATTR) && defined(XATTR_ADD_OPT)
-	int options = XATTR_NOFOLLOW;
-	return removexattr(path, name, options);
-#elif defined(HAVE_LREMOVEEA)
-	return lremoveea(path, name);
-#elif defined(HAVE_EXTATTR_DELETE_LINK)
-	char *s;
-	int attrnamespace = (strncmp(name, "system", 6) == 0) ? 
-		EXTATTR_NAMESPACE_SYSTEM : EXTATTR_NAMESPACE_USER;
-	const char *attrname = ((s=strchr_m(name, '.')) == NULL) ? name : s + 1;
-
-	return extattr_delete_link(path, attrnamespace, attrname);
-#elif defined(HAVE_ATTR_REMOVE)
-	int flags = ATTR_DONTFOLLOW;
-	char *attrname = strchr(name,'.') + 1;
-
-	if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT;
-
-	return attr_remove(path, attrname, flags);
-#elif defined(HAVE_ATTROPEN)
-	int ret = -1;
-	int attrdirfd = solaris_attropen(path, ".", O_RDONLY|AT_SYMLINK_NOFOLLOW, 0);
-	if (attrdirfd >= 0) {
-		ret = solaris_unlinkat(attrdirfd, name);
-		close(attrdirfd);
-	}
-	return ret;
-#else
-	errno = ENOSYS;
-	return -1;
-#endif
-}
-
 int sys_fremovexattr (int filedes, const char *name)
 {
 #if defined(HAVE_FREMOVEXATTR)
@@ -1901,70 +1784,6 @@ int sys_setxattr (const char *path, const char *name, const void *value, size_t
 #endif
 }
 
-int sys_lsetxattr (const char *path, const char *name, const void *value, size_t size, int flags)
-{
-#if defined(HAVE_LSETXATTR)
-	return lsetxattr(path, name, value, size, flags);
-#elif defined(HAVE_SETXATTR) && defined(XATTR_ADD_OPT)
-	int options = XATTR_NOFOLLOW;
-	return setxattr(path, name, value, size, 0, options);
-#elif defined(LSETEA)
-	return lsetea(path, name, value, size, flags);
-#elif defined(HAVE_EXTATTR_SET_LINK)
-	char *s;
-	int retval = 0;
-	int attrnamespace = (strncmp(name, "system", 6) == 0) ? 
-		EXTATTR_NAMESPACE_SYSTEM : EXTATTR_NAMESPACE_USER;
-	const char *attrname = ((s=strchr_m(name, '.')) == NULL) ? name : s + 1;
-	if (flags) {
-		/* Check attribute existence */
-		retval = extattr_get_link(path, attrnamespace, attrname, NULL, 0);
-		if (retval < 0) {
-			/* REPLACE attribute, that doesn't exist */
-			if (flags & XATTR_REPLACE && errno == ENOATTR) {
-				errno = ENOATTR;
-				return -1;
-			}
-			/* Ignore other errors */
-		}
-		else {
-			/* CREATE attribute, that already exists */
-			if (flags & XATTR_CREATE) {
-				errno = EEXIST;
-				return -1;
-			}
-		}
-	}
-
-	retval = extattr_set_link(path, attrnamespace, attrname, value, size);
-	return (retval < 0) ? -1 : 0;
-#elif defined(HAVE_ATTR_SET)
-	int myflags = ATTR_DONTFOLLOW;
-	char *attrname = strchr(name,'.') + 1;
-
-	if (strncmp(name, "system", 6) == 0) myflags |= ATTR_ROOT;
-	if (flags & XATTR_CREATE) myflags |= ATTR_CREATE;
-	if (flags & XATTR_REPLACE) myflags |= ATTR_REPLACE;
-


-- 
Samba Shared Repository


More information about the samba-cvs mailing list