summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2002-12-13 19:01:27 +0000
committerJim McDonough <jmcd@samba.org>2002-12-13 19:01:27 +0000
commit81a2a307392a12e5ec464e524d2948611e23b943 (patch)
tree5c5ed8973d98d535b5553f2a4f84307a8a3f03c0 /source3/libads
parent899b6e6d0facd1ef5865ce550fadd292514955d6 (diff)
downloadsamba-81a2a307392a12e5ec464e524d2948611e23b943.tar.gz
samba-81a2a307392a12e5ec464e524d2948611e23b943.tar.bz2
samba-81a2a307392a12e5ec464e524d2948611e23b943.zip
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)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ldap.c26
1 files changed, 26 insertions, 0 deletions
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
@@ -1582,6 +1582,32 @@ BOOL ads_pull_uint32(ADS_STRUCT *ads,
}
/**
+ * 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
* @param msg Results of search