*/
void ads_msgfree(ADS_STRUCT *ads, LDAPMessage *msg);
-char *ads_get_dn(ADS_STRUCT *ads, LDAPMessage *msg);
+char *ads_get_dn(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, LDAPMessage *msg);
char *ads_get_dn_canonical(ADS_STRUCT *ads, LDAPMessage *msg);
char *ads_pull_string(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, LDAPMessage *msg,
size_t pull_ucs2_fstring(char *dest, const void *src);
bool push_ucs2_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src,
size_t *converted_size);
-bool pull_ucs2_allocate(char **dest, const smb_ucs2_t *src,
- size_t *converted_size);
bool pull_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
size_t *converted_size);
-bool pull_utf8_allocate(char **dest, const char *src, size_t *converted_size);
bool pull_ucs2_talloc(TALLOC_CTX *ctx, char **dest, const smb_ucs2_t *src,
size_t *converted_size);
bool pull_ascii_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
int scope, const char *expr, const char **attrs,
bool (*fn)(ADS_STRUCT *, char *, void **, void *),
void *data_area);
-void ads_memfree(ADS_STRUCT *ads, void *mem);
char *ads_parent_dn(const char *dn);
ADS_MODLIST ads_init_mods(TALLOC_CTX *ctx);
ADS_STATUS ads_mod_str(TALLOC_CTX *ctx, ADS_MODLIST *mods,
return pull_ucs2(NULL, dest, src, sizeof(fstring), -1, STR_TERMINATE);
}
-/**
- * Copy a string from a UCS2 src to a unix char * destination, allocating a buffer
- *
- * @param dest always set at least to NULL
- * @parm converted_size set to the number of bytes occupied by the string in
- * the destination on success.
- * @return true if new buffer was correctly allocated, and string was
- * converted.
- **/
-
-bool pull_ucs2_allocate(char **dest, const smb_ucs2_t *src,
- size_t *converted_size)
-{
- size_t src_len = (strlen_w(src)+1) * sizeof(smb_ucs2_t);
-
- *dest = NULL;
- return convert_string_allocate(CH_UTF16LE, CH_UNIX, src, src_len,
- (void **)dest, converted_size, True);
-}
-
-/**
- * Copy a string from a UTF-8 src to a unix char * destination, allocating a buffer
- *
- * @param dest always set at least to NULL
- * @parm converted_size set to the number of bytes occupied by the string in
- * the destination on success.
- *
- * @return true if new buffer was correctly allocated, and string was
- * converted.
- **/
-
-bool pull_utf8_allocate(char **dest, const char *src, size_t *converted_size)
-{
- size_t src_len = strlen(src)+1;
-
- *dest = NULL;
- return convert_string_allocate(CH_UTF8, CH_UNIX, src, src_len,
- (void **)dest, converted_size, True);
-}
-
/**
* Copy a string from a DOS src to a unix char * destination, allocating a buffer using talloc
*