summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-02-20 11:57:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:14 -0500
commit2cf38b62c5d0169385dd9ddc76d9619c14cbbf13 (patch)
tree83ddaa82080c8ee4391fd313349db146367402b1 /source3
parent0d2f068fce1c98f4a1474cceb4ce74e0556a5fe2 (diff)
downloadsamba-2cf38b62c5d0169385dd9ddc76d9619c14cbbf13.tar.gz
samba-2cf38b62c5d0169385dd9ddc76d9619c14cbbf13.tar.bz2
samba-2cf38b62c5d0169385dd9ddc76d9619c14cbbf13.zip
r13566: Fix EA support for AIX.
Patch from Bjoern Jacke <bjacke-at-sernet-dot-de>. Guenther (This used to be commit 69fb189a6b9947069afebb15d6ee6f2f20d15171)
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in6
-rw-r--r--source3/include/includes.h4
-rw-r--r--source3/lib/system.c24
3 files changed, 33 insertions, 1 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 1634b15732..b3beb55c70 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -796,7 +796,9 @@ AC_CHECK_HEADERS(shadow.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
AC_CHECK_HEADERS(nss.h nss_common.h nsswitch.h ns_api.h sys/security.h security/pam_appl.h)
AC_CHECK_HEADERS(stropts.h poll.h)
AC_CHECK_HEADERS(sys/capability.h syscall.h sys/syscall.h)
-AC_CHECK_HEADERS(sys/acl.h sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h sys/proplist.h)
+AC_CHECK_HEADERS(sys/acl.h sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h)
+AC_CHECK_HEADERS(sys/ea.h sys/proplist.h)
+
AC_CHECK_HEADERS(sys/cdefs.h glob.h)
AC_CHECK_HEADERS(netinet/ip.h,,,[[
@@ -1395,6 +1397,8 @@ case "$host_os" in
*)
AC_SEARCH_LIBS(getxattr, [attr])
AC_CHECK_FUNCS(getxattr lgetxattr fgetxattr listxattr llistxattr)
+ AC_CHECK_FUNCS(getea fgetea lgetea listea flistea llistea)
+ AC_CHECK_FUNCS(removeea fremoveea lremoveea setea fsetea lsetea)
AC_CHECK_FUNCS(flistxattr removexattr lremovexattr fremovexattr)
AC_CHECK_FUNCS(setxattr lsetxattr fsetxattr)
AC_CHECK_FUNCS(attr_get attr_list attr_set attr_remove)
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 7e519aadc1..0dbcb69286 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -498,6 +498,10 @@
#include <sys/xattr.h>
#endif
+#ifdef HAVE_SYS_EA_H
+#include <sys/ea.h>
+#endif
+
#ifdef HAVE_SYS_EXTATTR_H
#include <sys/extattr.h>
#endif
diff --git a/source3/lib/system.c b/source3/lib/system.c
index e9c13e6d07..f38001cb7b 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1374,6 +1374,8 @@ ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t si
{
#if defined(HAVE_GETXATTR)
return getxattr(path, name, value, size);
+#elif defined(HAVE_GETEA)
+ return getea(path, name, value, size);
#elif defined(HAVE_EXTATTR_GET_FILE)
char *s;
ssize_t retval;
@@ -1416,6 +1418,8 @@ ssize_t sys_lgetxattr (const char *path, const char *name, void *value, size_t s
{
#if defined(HAVE_LGETXATTR)
return lgetxattr(path, name, value, size);
+#elif defined(HAVE_LGETEA)
+ return lgetea(path, name, value, size);
#elif defined(HAVE_EXTATTR_GET_LINK)
char *s;
ssize_t retval;
@@ -1454,6 +1458,8 @@ ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size)
{
#if defined(HAVE_FGETXATTR)
return fgetxattr(filedes, name, value, size);
+#elif defined(HAVE_FGETEA)
+ return fgetea(filedes, name, value, size);
#elif defined(HAVE_EXTATTR_GET_FD)
char *s;
ssize_t retval;
@@ -1653,6 +1659,8 @@ ssize_t sys_listxattr (const char *path, char *list, size_t size)
{
#if defined(HAVE_LISTXATTR)
return listxattr(path, list, size);
+#elif defined(HAVE_LISTEA)
+ return listea(path, list, size);
#elif defined(HAVE_EXTATTR_LIST_FILE)
extattr_arg arg;
arg.path = path;
@@ -1669,6 +1677,8 @@ ssize_t sys_llistxattr (const char *path, char *list, size_t size)
{
#if defined(HAVE_LLISTXATTR)
return llistxattr(path, list, size);
+#elif defined(HAVE_LLISTEA)
+ return llistea(path, list, size);
#elif defined(HAVE_EXTATTR_LIST_LINK)
extattr_arg arg;
arg.path = path;
@@ -1685,6 +1695,8 @@ ssize_t sys_flistxattr (int filedes, char *list, size_t size)
{
#if defined(HAVE_FLISTXATTR)
return flistxattr(filedes, list, size);
+#elif defined(HAVE_FLISTEA)
+ return flistea(filedes, list, size);
#elif defined(HAVE_EXTATTR_LIST_FD)
extattr_arg arg;
arg.filedes = filedes;
@@ -1701,6 +1713,8 @@ int sys_removexattr (const char *path, const char *name)
{
#if defined(HAVE_REMOVEXATTR)
return removexattr(path, name);
+#elif defined(HAVE_REMOVEEA)
+ return removeea(path, name);
#elif defined(HAVE_EXTATTR_DELETE_FILE)
char *s;
int attrnamespace = (strncmp(name, "system", 6) == 0) ?
@@ -1725,6 +1739,8 @@ int sys_lremovexattr (const char *path, const char *name)
{
#if defined(HAVE_LREMOVEXATTR)
return lremovexattr(path, name);
+#elif defined(HAVE_LREMOVEEA)
+ return lremoveea(path, name);
#elif defined(HAVE_EXTATTR_DELETE_LINK)
char *s;
int attrnamespace = (strncmp(name, "system", 6) == 0) ?
@@ -1749,6 +1765,8 @@ int sys_fremovexattr (int filedes, const char *name)
{
#if defined(HAVE_FREMOVEXATTR)
return fremovexattr(filedes, name);
+#elif defined(HAVE_FREMOVEEA)
+ return fremoveea(filedes, name);
#elif defined(HAVE_EXTATTR_DELETE_FD)
char *s;
int attrnamespace = (strncmp(name, "system", 6) == 0) ?
@@ -1778,6 +1796,8 @@ int sys_setxattr (const char *path, const char *name, const void *value, size_t
{
#if defined(HAVE_SETXATTR)
return setxattr(path, name, value, size, flags);
+#elif defined(HAVE_SETEA)
+ return setea(path, name, value, size, flags);
#elif defined(HAVE_EXTATTR_SET_FILE)
char *s;
int retval = 0;
@@ -1824,6 +1844,8 @@ int sys_lsetxattr (const char *path, const char *name, const void *value, size_t
{
#if defined(HAVE_LSETXATTR)
return lsetxattr(path, name, value, size, flags);
+#elif defined(LSETEA)
+ return lsetea(path, name, value, size, flags);
#elif defined(HAVE_EXTATTR_SET_LINK)
char *s;
int retval = 0;
@@ -1871,6 +1893,8 @@ int sys_fsetxattr (int filedes, const char *name, const void *value, size_t size
{
#if defined(HAVE_FSETXATTR)
return fsetxattr(filedes, name, value, size, flags);
+#elif defined(HAVE_FSETEA)
+ return fsetea(filedes, name, value, size, flags);
#elif defined(HAVE_EXTATTR_SET_FD)
char *s;
int retval = 0;