1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

r13566: Fix EA support for AIX.

Patch from Bjoern Jacke <bjacke-at-sernet-dot-de>.

Guenther
(This used to be commit 69fb189a6b9947069afebb15d6ee6f2f20d15171)
This commit is contained in:
Günther Deschner 2006-02-20 11:57:47 +00:00 committed by Gerald (Jerry) Carter
parent 0d2f068fce
commit 2cf38b62c5
3 changed files with 33 additions and 1 deletions

View File

@ -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)

View File

@ -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

View File

@ -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;