summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-05-23 14:18:42 +0200
committerStefan Metzmacher <metze@samba.org>2008-05-23 17:19:58 +0200
commitcfae28c268e3c0af490581c8737aea4bad9ecb41 (patch)
tree004756f0a7b015da4ea09f2b9eafc979f962d129 /source3
parent532833de2428239ecf5407a391b083bc0c91aa25 (diff)
downloadsamba-cfae28c268e3c0af490581c8737aea4bad9ecb41.tar.gz
samba-cfae28c268e3c0af490581c8737aea4bad9ecb41.tar.bz2
samba-cfae28c268e3c0af490581c8737aea4bad9ecb41.zip
libwbclient: add wbcLibraryDetails()
metze (cherry picked from commit b68916328e935e61840cb03560ebeeee15bb2c6f) (This used to be commit 196d9017627220786d8b726dc0d02e16e96c4c05)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/libwbclient/wbclient.c23
-rw-r--r--source3/nsswitch/libwbclient/wbclient.h15
2 files changed, 38 insertions, 0 deletions
diff --git a/source3/nsswitch/libwbclient/wbclient.c b/source3/nsswitch/libwbclient/wbclient.c
index 6403c1565f..82decc2f78 100644
--- a/source3/nsswitch/libwbclient/wbclient.c
+++ b/source3/nsswitch/libwbclient/wbclient.c
@@ -136,5 +136,28 @@ void wbcFreeMemory(void *p)
return;
}
+wbcErr wbcLibraryDetails(struct wbcLibraryDetails **_details)
+{
+ wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
+ struct wbcLibraryDetails *info;
+
+ info = talloc(NULL, struct wbcLibraryDetails);
+ BAIL_ON_PTR_ERROR(info, wbc_status);
+
+ info->major_version = WBCLIENT_MAJOR_VERSION;
+ info->minor_version = WBCLIENT_MINOR_VERSION;
+ info->vendor_version = talloc_strdup(info,
+ WBCLIENT_VENDOR_VERSION);
+ BAIL_ON_PTR_ERROR(info->vendor_version, wbc_status);
+
+ *_details = info;
+ info = NULL;
+
+ wbc_status = WBC_ERR_SUCCESS;
+
+done:
+ talloc_free(info);
+ return wbc_status;
+}
diff --git a/source3/nsswitch/libwbclient/wbclient.h b/source3/nsswitch/libwbclient/wbclient.h
index df61578c32..2fefe0c072 100644
--- a/source3/nsswitch/libwbclient/wbclient.h
+++ b/source3/nsswitch/libwbclient/wbclient.h
@@ -54,6 +54,19 @@ typedef enum _wbcErrType wbcErr;
const char *wbcErrorString(wbcErr error);
/**
+ * @brief Some useful details about the wbclient library
+ *
+ **/
+#define WBCLIENT_MAJOR_VERSION 0
+#define WBCLIENT_MINOR_VERSION 1
+#define WBCLIENT_VENDOR_VERSION "Samba libwbclient"
+struct wbcLibraryDetails {
+ uint16_t major_version;
+ uint16_t minor_version;
+ const char *vendor_version;
+};
+
+/**
* @brief Some useful details about the running winbindd
*
**/
@@ -319,6 +332,8 @@ wbcErr wbcStringToSid(const char *sid_string,
wbcErr wbcPing(void);
+wbcErr wbcLibraryDetails(struct wbcLibraryDetails **details);
+
wbcErr wbcInterfaceDetails(struct wbcInterfaceDetails **details);
/*