summaryrefslogtreecommitdiff
path: root/Makefile.am
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 /Makefile.am
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 'Makefile.am')
-rw-r--r--Makefile.am10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 67a0190..6046369 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,8 +8,10 @@ mount_cifs_LDADD = $(LIBCAP) $(CAPNG_LDADD)
man_MANS = mount.cifs.8
+sbin_PROGRAMS =
+
if CONFIG_CIFSUPCALL
-sbin_PROGRAMS = cifs.upcall
+sbin_PROGRAMS += cifs.upcall
cifs_upcall_SOURCES = cifs.upcall.c data_blob.c asn1.c spnego.c util.c
cifs_upcall_LDADD = -ltalloc -lkeyutils $(KRB5_LDADD)
man_MANS += cifs.upcall.8
@@ -30,3 +32,9 @@ bin_PROGRAMS = cifscreds
cifscreds_SOURCES = cifscreds.c resolve_host.c util.c
cifscreds_LDADD = -lkeyutils
endif
+
+if CONFIG_CIFSIDMAP
+sbin_PROGRAMS += cifs.idmap
+cifs_idmap_SOURCES = cifs.idmap.c
+cifs_idmap_LDADD = -lkeyutils $(WINB_LDADD)
+endif