From 81a2a307392a12e5ec464e524d2948611e23b943 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Fri, 13 Dec 2002 19:01:27 +0000 Subject: More printer publishing code. - Add published attribute to info2, needed for win clients to work properly - Return proper info on getprinter 7 This means you can now look at the sharing tab of a printer and get correct info about whether it is published or not, and change it. (This used to be commit d57bddc9b22e809c79294c7eacbd5d0f115fe990) --- source3/libads/ldap.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'source3/libads/ldap.c') diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index fcb96dd174..af9a6451fe 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -1581,6 +1581,32 @@ BOOL ads_pull_uint32(ADS_STRUCT *ads, return True; } +/** + * pull a single objectGUID from an ADS result + * @param ads connection to ADS server + * @param msg results of search + * @param guid 37-byte area to receive text guid + * @return boolean indicating success + **/ +BOOL ads_pull_guid(ADS_STRUCT *ads, + void *msg, GUID *guid) +{ + char **values; + + values = ldap_get_values(ads->ld, msg, "objectGUID"); + if (!values) return False; + + if (values[0]) { + memcpy(guid, values[0], sizeof(GUID)); + ldap_value_free(values); + return True; + } + ldap_value_free(values); + return False; + +} + + /** * pull a single DOM_SID from a ADS result * @param ads connection to ads server -- cgit