summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2002-12-13 18:56:48 +0000
committerJim McDonough <jmcd@samba.org>2002-12-13 18:56:48 +0000
commitbfd8043a403dfed84bc568685580703a8470738d (patch)
tree7d04b1610585d4a88f73ddd2a5aeb1a6351b45f1 /source3/libads
parent8569cc567f11f022d923e6f027bbf931d77a45f1 (diff)
downloadsamba-bfd8043a403dfed84bc568685580703a8470738d.tar.gz
samba-bfd8043a403dfed84bc568685580703a8470738d.tar.bz2
samba-bfd8043a403dfed84bc568685580703a8470738d.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 adda04379ee46f105436262663652f3f576fa3cf)
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