/* Define if you have zlib */
#undef HAVE_LIBZ
-/* Define if you have libacl */
-#undef HAVE_ACL
-
-/* Define if you have AFS acls */
-#undef HAVE_AFS_ACL
-
/* General libs */
#undef LIBS
/* Normal acl support */
#undef HAVE_ACL
+/* Defines if your system have the ACL_TYPE_DEFAULT_DIR acl type */
+#undef HAVE_ACL_TYPE_DEFAULT_DIR
+
+/* Defines if your system have the ACL_TYPE_EXTENDED acl type */
+#undef HAVE_ACL_TYPE_EXTENDED
+
+/* Defines if your system have the ACL_TYPE_NFS4 acl type */
+#undef HAVE_ACL_TYPE_NFS4
+
+/* Define to 1 if you have the 'add_proplist_entry' function. */
+#undef HAVE_ADD_PROPLIST_ENTRY
+
/* Defines if your system has AFS support */
#undef HAVE_AFS
dnl
dnl Check for acl_get_file in libpacl (OSF1)
+ dnl and if ACL_TYPE_DEFAULT_DIR is defined.
dnl
- if test $have_acl = no; then
+ if test $have_acl = no -a \
+ x${HAVE_OSF1_OS_TRUE} = x; then
AC_CHECK_LIB(pacl, acl_get_file,
[
have_acl=yes
FDLIBS="-lpacl $FDLIBS"
]
)
+
+ AC_CHECK_DECL([ACL_TYPE_DEFAULT_DIR],
+ [AC_DEFINE(HAVE_ACL_TYPE_DEFAULT_DIR,1,[Defines if your system have the ACL_TYPE_DEFAULT_DIR acl type])],
+ [],
+ [[#include <sys/acl.h>]])
+ fi
+
+ dnl
+ dnl On OSX check for availability of ACL_TYPE_EXTENDED
+ dnl
+ if test $have_acl = yes -a \
+ x${HAVE_DARWIN_OS_TRUE} = x; then
+ AC_CHECK_DECL([ACL_TYPE_EXTENDED],
+ [AC_DEFINE(HAVE_ACL_TYPE_EXTENDED,1,[Defines if your system have the ACL_TYPE_EXTENDED acl type])],
+ [],
+ [[#include <sys/acl.h>]])
+ fi
+
+ dnl
+ dnl On FreeBSD check for availability of ACL_TYPE_NFS4
+ dnl
+ if test $have_acl = yes -a \
+ x${HAVE_FREEBSD_OS_TRUE} = x; then
+ AC_CHECK_DECL([ACL_TYPE_NFS4],
+ [AC_DEFINE(HAVE_ACL_TYPE_NFS4,1,[Defines if your system have the ACL_TYPE_NFS4 acl type])],
+ [],
+ [[#include <sys/acl.h>]])
fi
dnl
case BACL_TYPE_DEFAULT:
ostype = ACL_TYPE_DEFAULT;
break;
-#ifdef ACL_TYPE_NFS4
+#ifdef HAVE_ACL_TYPE_NFS4
/**
* FreeBSD has an additional acl type named ACL_TYPE_NFS4.
*/
ostype = ACL_TYPE_NFS4;
break;
#endif
-#ifdef ACL_TYPE_DEFAULT_DIR
+#ifdef HAVE_ACL_TYPE_DEFAULT_DIR
case BACL_TYPE_DEFAULT_DIR:
/**
* TRU64 has an additional acl type named ACL_TYPE_DEFAULT_DIR.
ostype = ACL_TYPE_DEFAULT_DIR;
break;
#endif
-#ifdef ACL_TYPE_EXTENDED
+#ifdef HAVE_ACL_TYPE_EXTENDED
case BACL_TYPE_EXTENDED:
/**
* MacOSX has an additional acl type named ACL_TYPE_EXTENDED.
jcr->acl_data->content_length = 0;
acl_free(acl);
return bacl_exit_error;
- }
-
- /**
- * Handle errors gracefully.
- */
- if (acl == (acl_t)NULL) {
+ } else {
+ /**
+ * Handle errors gracefully.
+ */
switch (errno) {
#if defined(BACL_ENOTSUP)
case BACL_ENOTSUP:
* when we change from one filesystem to an other.
*/
jcr->acl_data->flags &= ~BACL_FLAG_SAVE_NATIVE;
- break; /* not supported */
+ pm_strcpy(jcr->acl_data->content, "");
+ jcr->acl_data->content_length = 0;
+ return bacl_exit_ok;
#endif
case ENOENT:
pm_strcpy(jcr->acl_data->content, "");
return bacl_exit_error;
}
}
-
- /**
- * Not supported, just pretend there is nothing to see
- */
- pm_strcpy(jcr->acl_data->content, "");
- jcr->acl_data->content_length = 0;
- return bacl_exit_ok;
}
/**
static bacl_exit_code darwin_build_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
{
-#if defined(ACL_TYPE_EXTENDED)
+#if defined(HAVE_ACL_TYPE_EXTENDED)
/**
* On MacOS X, acl_get_file (name, ACL_TYPE_ACCESS)
* and acl_get_file (name, ACL_TYPE_DEFAULT)
static bacl_exit_code darwin_parse_acl_streams(JCR *jcr, int stream)
{
-#if defined(ACL_TYPE_EXTENDED)
+#if defined(HAVE_ACL_TYPE_EXTENDED)
return generic_set_acl_on_os(jcr, BACL_TYPE_EXTENDED);
#else
return generic_set_acl_on_os(jcr, BACL_TYPE_ACCESS);