mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
libwbclient: add wbcLibraryDetails()
metze
(cherry picked from commit b68916328e
)
This commit is contained in:
parent
e7dcbf56ae
commit
196d901762
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,6 +53,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);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user