diff options
author | Jim McDonough <jmcd@samba.org> | 2002-10-18 20:11:29 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2002-10-18 20:11:29 +0000 |
commit | e042a93cce2fdadfd88c93b813e10f0cc12f570e (patch) | |
tree | a1f6505e4aac40fe92c3d2ec6c868444befc2186 /source3/libads | |
parent | e13dd2f3025a557bbd71765a684005562591843d (diff) | |
download | samba-e042a93cce2fdadfd88c93b813e10f0cc12f570e.tar.gz samba-e042a93cce2fdadfd88c93b813e10f0cc12f570e.tar.bz2 samba-e042a93cce2fdadfd88c93b813e10f0cc12f570e.zip |
Format objectGUIDs on ads dumps.
(This used to be commit 7eaf7e7115c75e682b1b9368c6f28c60429885e5)
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/ldap.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index d3c8b39e22..2359dbd7ed 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -1106,6 +1106,23 @@ static void dump_binary(const char *field, struct berval **values) } } +struct uuid { + uint32 i1; + uint16 i2; + uint16 i3; + uint8 s[8]; +}; + +static void dump_guid(const char *field, struct berval **values) +{ + int i; + GUID guid; + for (i=0; values[i]; i++) { + memcpy(guid.info, values[i]->bv_val, sizeof(guid.info)); + printf("%s: %s\n", field, uuid_string_static(guid)); + } +} + /* dump a sid result from ldap */ @@ -1172,7 +1189,7 @@ static BOOL ads_dump_field(char *field, void **values, void *data_area) BOOL string; void (*handler)(const char *, struct berval **); } handlers[] = { - {"objectGUID", False, dump_binary}, + {"objectGUID", False, dump_guid}, {"nTSecurityDescriptor", False, dump_sd}, {"dnsRecord", False, dump_binary}, {"objectSid", False, dump_sid}, |