From e051c2c430f706835f250b10cc63e5621054b5ec Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 10 Dec 2001 00:39:01 +0000 Subject: make sid_binstring available without HAVE_ADS (This used to be commit 4a6d29768665f71b72cf48ee34ee9a9c451232f6) --- source3/libads/ldap.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'source3/libads') diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index c81f2474ae..2fe97ebb1a 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -386,45 +386,6 @@ NTSTATUS ads_set_machine_password(ADS_STRUCT *ads, return ret; } - -/* - return a RFC2254 binary string representation of a buffer - used in filters - caller must free -*/ -char *ads_binary_string(char *buf, int len) -{ - char *s; - int i, j; - const char *hex = "0123456789ABCDEF"; - s = malloc(len * 3 + 1); - if (!s) return NULL; - for (j=i=0;i> 4]; - s[j+2] = hex[((unsigned char)buf[i]) & 0xF]; - j += 3; - } - s[j] = 0; - return s; -} - -/* - return the binary string representation of a DOM_SID - caller must free -*/ -char *ads_sid_binstring(DOM_SID *sid) -{ - char *buf, *s; - int len = sid_size(sid); - buf = malloc(len); - if (!buf) return NULL; - sid_linearize(buf, len, sid); - s = ads_binary_string(buf, len); - free(buf); - return s; -} - /* pull the first entry from a ADS result */ -- cgit