summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-07-26 11:05:38 +1000
committerMichael Adam <obnox@samba.org>2011-09-23 00:16:41 +0200
commit79459491773205f80b440468b7dba404c6d751b8 (patch)
tree5dc28537be6e5b0b3055024c03ccdf66f2c983de /nsswitch/libwbclient
parent66f8070dd3a6a5c51c8e6d37deb7c52a9a717e1b (diff)
downloadsamba-79459491773205f80b440468b7dba404c6d751b8.tar.gz
samba-79459491773205f80b440468b7dba404c6d751b8.tar.bz2
samba-79459491773205f80b440468b7dba404c6d751b8.zip
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 <abartlet@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'nsswitch/libwbclient')
-rw-r--r--nsswitch/libwbclient/wbc_idmap.c4
-rw-r--r--nsswitch/libwbclient/wbclient.h3
2 files changed, 6 insertions, 1 deletions
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 {