From 79459491773205f80b440468b7dba404c6d751b8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 26 Jul 2011 11:05:38 +1000 Subject: libwbclient: added support for WBC_ID_TYPE_BOTH the Samba4 winbindd allows for a single SID to map to both a user and group id. This is used to support files with the owner_sid set to a group Pair-Programmed-With: Andrew Bartlett Signed-off-by: Michael Adam --- nsswitch/libwbclient/wbc_idmap.c | 4 ++++ nsswitch/libwbclient/wbclient.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nsswitch/libwbclient/wbc_idmap.c b/nsswitch/libwbclient/wbc_idmap.c index 5325dbe5ce..04e7d02995 100644 --- a/nsswitch/libwbclient/wbc_idmap.c +++ b/nsswitch/libwbclient/wbc_idmap.c @@ -370,6 +370,10 @@ wbcErr wbcSidsToUnixIds(const struct wbcDomainSid *sids, uint32_t num_sids, id->type = WBC_ID_TYPE_GID; id->id.gid = strtoul(p+1, &q, 10); break; + case 'B': + id->type = WBC_ID_TYPE_BOTH; + id->id.uid = strtoul(p+1, &q, 10); + break; default: id->type = WBC_ID_TYPE_NOT_SPECIFIED; q = strchr(p, '\n'); diff --git a/nsswitch/libwbclient/wbclient.h b/nsswitch/libwbclient/wbclient.h index c5f3b77ed8..809e00a007 100644 --- a/nsswitch/libwbclient/wbclient.h +++ b/nsswitch/libwbclient/wbclient.h @@ -796,7 +796,8 @@ wbcErr wbcQueryGidToSid(gid_t gid, enum wbcIdType { WBC_ID_TYPE_NOT_SPECIFIED, WBC_ID_TYPE_UID, - WBC_ID_TYPE_GID + WBC_ID_TYPE_GID, + WBC_ID_TYPE_BOTH }; union wbcUnixIdContainer { -- cgit