summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Layton <jlayton@samba.org>2013-02-01 12:41:57 -0500
committerJeff Layton <jlayton@samba.org>2013-02-01 12:41:57 -0500
commitd1d96fafe50b04395ff3ee4590777452e6612e02 (patch)
tree4adcfb111ffa81188370b07ff035a863588016f4
parent653a6c66312382da381a2d44f8018d3222cadbdf (diff)
downloadcifs-utils-d1d96fafe50b04395ff3ee4590777452e6612e02.tar.gz
cifs-utils-d1d96fafe50b04395ff3ee4590777452e6612e02.tar.bz2
cifs-utils-d1d96fafe50b04395ff3ee4590777452e6612e02.zip
cifs-utils: add autoconf test to make sure that libwbclient is usable
The idmapwb plugin requires a usable wbcSidsToUnixIds() function. Check to ensure that the wbclient library provides that symbol, and handle it appropriately if it doesn't. If someone were so inclined they probably could fix idmapwb to fall back to the older mapping functions if that symbol doesn't exist, but for now this patch just makes it refuse to build the plugin. Reported-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Jeff Layton <jlayton@samba.org>
-rw-r--r--aclocal/idmap.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/aclocal/idmap.m4 b/aclocal/idmap.m4
index 939a901..c5727f6 100644
--- a/aclocal/idmap.m4
+++ b/aclocal/idmap.m4
@@ -19,6 +19,26 @@ if test $enable_cifsidmap != "no" -o $enable_cifsacl != "no"; then
])
fi
+if test $enable_cifsacl != "no" -o $enable_cifsacl != "no"; then
+ ac_wbc_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $WBCLIENT_LIBS"
+ AC_CHECK_LIB(wbclient, wbcSidsToUnixIds, , [
+ if test "$enable_cifsidmap" = "yes"; then
+ AC_MSG_ERROR([wbclient library lacks wbcSidsToUnixIds().])
+ else
+ AC_MSG_WARN([wbclient library lacks wbcSidsToUnixIds(). Disabling cifs.idmap.])
+ enable_cifsidmap="no"
+ fi
+ if test "$enable_cifsacl" = "yes"; then
+ AC_MSG_ERROR([wbclient library lacks wbcSidsToUnixIds.])
+ else
+ AC_MSG_WARN([wbclient library lacks wbcSidsToUnixIds(). Disabling cifsacl tools.])
+ enable_cifsacl="no"
+ fi
+ ])
+ LDFLAGS=$ac_wbc_save_LDFLAGS
+fi
+
if test $enable_cifsacl != "no"; then
AC_CHECK_HEADERS([sys/xattr.h], , [
if test "$enable_cifsacl" = "yes"; then