summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient/wbclient.h
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-04 05:38:04 +0100
committerVolker Lendecke <vl@samba.org>2011-03-05 14:29:32 +0100
commitafb6752fa7903a63c2a1cef704bb9da9bab4b251 (patch)
tree47f184c42bf3740d4c30f85ad9c2af8be9ae2945 /nsswitch/libwbclient/wbclient.h
parent181b23ceed77de50c2b9d05a92a795cce1beabb9 (diff)
downloadsamba-afb6752fa7903a63c2a1cef704bb9da9bab4b251.tar.gz
samba-afb6752fa7903a63c2a1cef704bb9da9bab4b251.tar.bz2
samba-afb6752fa7903a63c2a1cef704bb9da9bab4b251.zip
libwbclient: Add wbcSidToStringBuf
Diffstat (limited to 'nsswitch/libwbclient/wbclient.h')
-rw-r--r--nsswitch/libwbclient/wbclient.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/nsswitch/libwbclient/wbclient.h b/nsswitch/libwbclient/wbclient.h
index bd5a51ccaa..0286e5b5ec 100644
--- a/nsswitch/libwbclient/wbclient.h
+++ b/nsswitch/libwbclient/wbclient.h
@@ -66,9 +66,10 @@ const char *wbcErrorString(wbcErr error);
* 0.4: Added wbcSidTypeString()
* 0.5: Added wbcChangeTrustCredentials()
* 0.6: Made struct wbcInterfaceDetails char* members non-const
+ * 0.7: Added wbcSidToStringBuf()
**/
#define WBCLIENT_MAJOR_VERSION 0
-#define WBCLIENT_MINOR_VERSION 6
+#define WBCLIENT_MINOR_VERSION 7
#define WBCLIENT_VENDOR_VERSION "Samba libwbclient"
struct wbcLibraryDetails {
uint16_t major_version;
@@ -529,6 +530,19 @@ void wbcFreeMemory(void*);
*/
const char* wbcSidTypeString(enum wbcSidType type);
+#define WBC_SID_STRING_BUFLEN (15*11+25)
+
+/*
+ * @brief Print a sid into a buffer
+ *
+ * @param sid Binary Security Identifier
+ * @param buf Target buffer
+ * @param buflen Target buffer length
+ *
+ * @return Resulting string length.
+ */
+int wbcSidToStringBuf(const struct wbcDomainSid *sid, char *buf, int buflen);
+
/**
* @brief Convert a binary SID to a character string
*