acl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Acl-devel] [PATCH] Switch to sys/xattr.h


From: Andreas Grünbacher
Subject: Re: [Acl-devel] [PATCH] Switch to sys/xattr.h
Date: Tue, 10 Jun 2014 23:34:36 +0200

Christian,

2014-05-28 23:28 GMT+02:00 Cristian Rodríguez <address@hidden>:
> Since a very long time (over ten years) the xattrs functions
> that libacl uses have been provided by libc.
> This commit switches the code to use libc and leave libxattr
> behind.

Well, instead, the syscall stubs really should be removed from libattr.

In addition, to get rid of attr/xattr.h, we really need to get the
ENOATTR == ENODATA alias into glibc. (Similar aliases like
EWOULDBLOCK == EAGAIN and EDEADLOCK == EDEADLK
exist already.)

> ---
>  configure.ac                        |  5 ++--
>  libacl/Makemodule.am                |  4 +--
>  libacl/__acl_extended_file.c        |  7 ++++-
>  libacl/acl_delete_def_file.c        |  9 ++++---
>  libacl/acl_extended_fd.c            |  6 ++++-
>  libacl/acl_extended_file.c          |  6 ++++-
>  libacl/acl_extended_file_nofollow.c |  6 ++++-
>  libacl/acl_get_fd.c                 |  6 ++++-
>  libacl/acl_get_file.c               |  6 ++++-
>  libacl/acl_set_fd.c                 |  6 ++++-
>  libacl/acl_set_file.c               |  6 ++++-
>  libacl/error_context.h              | 53 
> +++++++++++++++++++++++++++++++++++++

Huh? We cannot simply duplicate the header, it's part of the public interface
of perm_copy_{fd,file}(). Also, we would end up with a duplicate definition of
the same struct in libattr and libacl.

>  libacl/libobj.h                     |  5 +++-
>  libacl/perm_copy_fd.c               |  7 ++---
>  libacl/perm_copy_file.c             |  7 ++---
>  15 files changed, 112 insertions(+), 27 deletions(-)
>  create mode 100644 libacl/error_context.h
>
> diff --git a/configure.ac b/configure.ac
> index 2182e81..0342857 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -44,9 +44,8 @@ dnl Automatically increment the revision for every release.
>  LT_REVISION=$(echo "${PACKAGE_VERSION}" | tr -d .)
>  AC_SUBST(LT_REVISION)
>
> -AC_PACKAGE_NEED_ATTR_XATTR_H
> -AC_PACKAGE_NEED_ATTR_ERROR_H
> -AC_PACKAGE_NEED_GETXATTR_LIBATTR
> +AC_CHECK_HEADERS([sys/xattr.h],,
> +                 [AC_MSG_ERROR([sys/xattr.h header not found])])
>
>  AC_CONFIG_COMMANDS([include/acl],
>         [dnl
> diff --git a/libacl/Makemodule.am b/libacl/Makemodule.am
> index c35214c..64b70b4 100644
> --- a/libacl/Makemodule.am
> +++ b/libacl/Makemodule.am
> @@ -74,8 +74,8 @@ INTERNAL_CFILES = \
>
>  libacl_la_DEPENDENCIES = exports libmisc.la
>  libacl_la_SOURCES = $(CFILES) $(HFILES)
> -libacl_la_LIBADD = -lattr libmisc.la
> +libacl_la_LIBADD = libmisc.la
>  libacl_la_CFLAGS = $(AM_CFLAGS) -include $(srcdir)/libacl/perm_copy.h
> -libacl_la_LDFLAGS = \
> +libacl_la_LDFLAGS = -no-undefined \
>         -Wl,--version-script,$(top_srcdir)/exports \
>         -version-info $(LTVERSION)

Why is this needed?

Thanks,
Andreas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]