Skip to contentSkip to conversation

cifs-utils: Handle cifs_idmap type of key to map a SID to either an uid or gid (try #12)

PATCH New [email protected] 1 participant 1 message Apr 2, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs-utils: Handle cifs_idmap type of key to map a SID to either an uid or gid (try #12)

From: Shirish Pargaonkar <[email protected]>

From: Shirish Pargaonkar <[email protected]>

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), try to obtain uid of 'nobody' and gid of 'nogroup'.
And if that fails, kernel assigns uid and gid (from mount superblock).

An entry such as this

create cifs.cifs_idmap * * /usr/sbin/cifs.upcall %k

is needed in the file /etc/request-key.conf.

---
 Makefile.am   |    2 +-
 cifs.upcall.c |  110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 111 insertions(+), 1 deletions(-)
Makefile.am +1 -1
index 67a0190..c9018ae 100644
@@ -11,7 +11,7 @@ man_MANS = mount.cifs.8
 if CONFIG_CIFSUPCALL
 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)
+cifs_upcall_LDADD = -ltalloc -lwbclient -lkeyutils $(KRB5_LDADD)
 man_MANS += cifs.upcall.8
 
 #
cifs.upcall.c +110 -0

128 lines not on this page · raw message

Signature · 1 line
1.6.0.2