diff options
author | Volker Lendecke <vl@samba.org> | 2011-03-23 18:30:32 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-04-13 14:13:25 -0700 |
commit | a93c49d7e6ef916ffe3e4a57ce863247f5da960b (patch) | |
tree | 52153c612cb3172d6856824bc0e1fdf605222cb9 /nsswitch/libwbclient/wbclient.h | |
parent | 44f7fc4fdfefdac424a3af0fce9e84cd5b2bc82a (diff) | |
download | samba-a93c49d7e6ef916ffe3e4a57ce863247f5da960b.tar.gz samba-a93c49d7e6ef916ffe3e4a57ce863247f5da960b.tar.bz2 samba-a93c49d7e6ef916ffe3e4a57ce863247f5da960b.zip |
libwbclient: Add wbcSidsToUnixIds
Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'nsswitch/libwbclient/wbclient.h')
-rw-r--r-- | nsswitch/libwbclient/wbclient.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/nsswitch/libwbclient/wbclient.h b/nsswitch/libwbclient/wbclient.h index f129887874..c5f3b77ed8 100644 --- a/nsswitch/libwbclient/wbclient.h +++ b/nsswitch/libwbclient/wbclient.h @@ -67,9 +67,10 @@ const char *wbcErrorString(wbcErr error); * 0.5: Added wbcChangeTrustCredentials() * 0.6: Made struct wbcInterfaceDetails char* members non-const * 0.7: Added wbcSidToStringBuf() + * 0.8: Added wbcSidsToUnixIds() and wbcLookupSids() **/ #define WBCLIENT_MAJOR_VERSION 0 -#define WBCLIENT_MINOR_VERSION 7 +#define WBCLIENT_MINOR_VERSION 8 #define WBCLIENT_VENDOR_VERSION "Samba libwbclient" struct wbcLibraryDetails { uint16_t major_version; @@ -792,6 +793,35 @@ wbcErr wbcGidToSid(gid_t gid, wbcErr wbcQueryGidToSid(gid_t gid, struct wbcDomainSid *sid); +enum wbcIdType { + WBC_ID_TYPE_NOT_SPECIFIED, + WBC_ID_TYPE_UID, + WBC_ID_TYPE_GID +}; + +union wbcUnixIdContainer { + uid_t uid; + gid_t gid; +}; + +struct wbcUnixId { + enum wbcIdType type; + union wbcUnixIdContainer id; +}; + +/** + * @brief Convert a list of sids to unix ids + * + * @param sids Pointer to an array of SIDs to convert + * @param num_sids Number of SIDs + * @param ids Preallocated output array for translated IDs + * + * @return #wbcErr + * + **/ +wbcErr wbcSidsToUnixIds(const struct wbcDomainSid *sids, uint32_t num_sids, + struct wbcUnixId *ids); + /** * @brief Obtain a new uid from Winbind * |