summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorShirish Pargaonkar <shirishpargaonkar@gmail.com>2011-05-24 14:49:56 -0400
committerJeff Layton <jlayton@samba.org>2011-05-24 14:49:56 -0400
commitf699e959d2afadffc6a4db96b57f873f7dd5e9d9 (patch)
tree112154943ae1de7f3ccf97fbb54b2d3d11824574 /configure.ac
parenta6c23f4421ae02de9f01bb6264a03ede9970cb19 (diff)
downloadcifs-utils-f699e959d2afadffc6a4db96b57f873f7dd5e9d9.tar.gz
cifs-utils-f699e959d2afadffc6a4db96b57f873f7dd5e9d9.tar.bz2
cifs-utils-f699e959d2afadffc6a4db96b57f873f7dd5e9d9.zip
cifs-utils: Create new binary cifs.idmap for sid to uid/gid mapping (try #4)
Handle cifs.idmap type of key. Extract a SID string from the description and map it to either an uid or gid using winbind APIs. If that fails (e.g. because winbind is not installed/running or winbind returns an error), kernel assigns uid and gid (from mount superblock). Enable including winbind header files and idmapping code conditional to winbind devel rpms (header and library). An entry such as this create cifs.idmap * * /usr/sbin/cifs.idmap %k is needed in the file /etc/request-key.conf. [Note: Modified to not build new tool by default, and to fix up some whitespace munging] Modified-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 15 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index e0e2a60..6cac703 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,13 +22,19 @@ AC_ARG_ENABLE(cifscreds,
enable_cifscreds=$enableval,
enable_cifscreds="no")
+AC_ARG_ENABLE(cifsidmap,
+ [AC_HELP_STRING([--enable-cifsidmap],
+ [Create cifs.idmap binary @<:@default=no@:>@])],
+ enable_cifsidmap=$enableval,
+ enable_cifsidmap="no")
+
# Checks for programs.
AC_PROG_CC
AC_PROG_SED
AC_GNU_SOURCE
# Checks for header files.
-AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h inttypes.h limits.h mntent.h netdb.h stddef.h stdint.h stdlib.h string.h strings.h sys/mount.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h], , [AC_MSG_ERROR([necessary header(s) not found])])
+AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h inttypes.h limits.h mntent.h netdb.h stddef.h stdint.h stdbool.h stdlib.h stdio.h errno.h string.h strings.h sys/mount.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h], , [AC_MSG_ERROR([necessary header(s) not found])])
if test $enable_cifsupcall != "no"; then
AC_CHECK_HEADERS([krb5.h krb5/krb5.h])
@@ -72,7 +78,7 @@ if test $enable_cifsupcall != "no"; then
fi
])
fi
-if test $enable_cifsupcall != "no"; then
+if test $enable_cifsupcall != "no" -o $enable_cifsidmap != "no"; then
AC_CHECK_HEADERS([keyutils.h], , [
if test "$enable_cifsupcall" = "yes"; then
AC_MSG_ERROR([keyutils.h not found, consider installing keyutils-libs-devel.])
@@ -80,6 +86,9 @@ if test $enable_cifsupcall != "no"; then
AC_MSG_WARN([keyutils.h not found, consider installing keyutils-libs-devel. Disabling cifs.upcall.])
enable_cifsupcall="no"
fi
+ if test "$enable_cifsidmap" = "yes"; then
+ AC_MSG_ERROR([keyutils.h not found, consider installing keyutils-libs-devel.])
+ fi
])
fi
if test $enable_cifsupcall != "no"; then
@@ -89,6 +98,9 @@ if test $enable_cifsupcall != "no"; then
AC_SUBST(KRB5_LDADD)
fi
+# checks for wbclient.h and libwbclient.so library
+AC_TEST_WBCHL
+
if test $enable_cifscreds = "yes"; then
AC_CHECK_HEADERS([keyutils.h], , [AC_MSG_ERROR([keyutils.h not found, consider installing keyutils-libs-devel.])])
fi
@@ -140,6 +152,7 @@ LIBS=$cu_saved_libs
AM_CONDITIONAL(CONFIG_CIFSUPCALL, [test "$enable_cifsupcall" != "no"])
AM_CONDITIONAL(CONFIG_CIFSCREDS, [test "$enable_cifscreds" = "yes"])
+AM_CONDITIONAL(CONFIG_CIFSIDMAP, [test "$enable_cifsidmap" = "yes"])
LIBCAP_NG_PATH