[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 08ed00124d8b6b445d3b91a9aa15eec638b02f05
Clint Adams
schizo at debian.org
Sun Nov 15 03:17:26 UTC 2009
The following commit has been merged in the upstream branch:
commit 229f1d0301b53669ad520408694102b396a16131
Author: Clint Adams <schizo at debian.org>
Date: Sat Jan 5 19:07:32 2008 +0000
make acls conditional
git-archimport-id: fakeroot at packages.debian.org--fakeroot/fakeroot--main--0.0--patch-153
diff --git a/configure.ac b/configure.ac
index f6ac2c1..0b091b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,7 +59,9 @@ AC_SUBST(signal)
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h unistd.h features.h sys/feature_tests.h pthread.h stdint.h inttypes.h grp.h endian.h sys/sysmacros.h sys/socket.h)
+AC_CHECK_HEADERS(fcntl.h unistd.h features.h sys/feature_tests.h pthread.h
+ stdint.h inttypes.h grp.h endian.h sys/sysmacros.h
+ sys/socket.h sys/acl.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -273,7 +275,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
])
done
-AC_CHECK_FUNCS(fchmodat fchownat fstatat mkdirat mknodat openat renameat unlinkat)
+AC_CHECK_FUNCS(fchmodat fchownat fstatat mkdirat mknodat openat renameat
+ unlinkat acl_set_fd acl_set_file)
dnl find out how stat() etc are called. On linux systems, we really
dnl need to wrap (IIRC):
diff --git a/libfakeroot.c b/libfakeroot.c
index 8414c85..728fd4c 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -58,7 +58,9 @@
#include <dirent.h>
#include <errno.h>
#include <sys/types.h>
+#ifdef HAVE_SYS_ACL_H
#include <sys/acl.h>
+#endif /* HAVE_SYS_ACL_H */
#if !HAVE_DECL_SETENV
extern int setenv (const char *name, const char *value, int replace);
@@ -1464,12 +1466,16 @@ int fakeroot_isdisabled(void)
return fakeroot_disabled;
}
+#ifdef HAVE_ACL_SET_FD
int acl_set_fd(int fd, acl_t acl) {
errno = ENOTSUP;
return -1;
}
+#endif /* HAVE_ACL_SET_FD */
+#ifdef HAVE_ACL_SET_FILE
int acl_set_file(const char *path_p, acl_type_t type, acl_t acl) {
errno = ENOTSUP;
return -1;
}
+#endif /* HAVE_ACL_SET_FILE */
diff --git a/wrapfunc.inp b/wrapfunc.inp
index fd14c0d..d0d505f 100644
--- a/wrapfunc.inp
+++ b/wrapfunc.inp
@@ -123,5 +123,9 @@ unlinkat;int;(int dir_fd, const char *pathname, int flags);(dir_fd, pathname, fl
#endif /* HAVE_UNLINKAT */
#endif /* HAVE_FSTATAT */
+#ifdef HAVE_ACL_SET_FD
acl_set_fd;int;(int fd, acl_t acl);(fd, acl)
+#endif /* HAVE_ACL_SET_FD */
+#ifdef HAVE_ACL_SET_FILE
acl_set_file;int;(const char *path_p, acl_type_t type, acl_t acl);(path_p, type, acl)
+#endif /* HAVE_ACL_SET_FILE */
--
fakeroot
More information about the Fakeroot-commits
mailing list