Changeset 370 for branches/samba-3.3.x/source/lib/smbldap.c
- Timestamp:
- Jan 15, 2010, 8:23:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/lib/smbldap.c
r342 r370 334 334 } 335 335 336 char * smbldap_talloc_first_attribute(LDAP *ldap_struct, LDAPMessage *entry, 337 const char *attribute, 338 TALLOC_CTX *mem_ctx) 339 { 340 char **values; 341 char *result; 342 size_t converted_size; 343 344 if (attribute == NULL) { 345 return NULL; 346 } 347 348 values = ldap_get_values(ldap_struct, entry, attribute); 349 350 if (values == NULL) { 351 DEBUG(10, ("attribute %s does not exist\n", attribute)); 352 return NULL; 353 } 354 355 if (!pull_utf8_talloc(mem_ctx, &result, values[0], &converted_size)) { 356 DEBUG(10, ("pull_utf8_talloc failed\n")); 357 ldap_value_free(values); 358 return NULL; 359 } 360 361 ldap_value_free(values); 362 363 #ifdef DEBUG_PASSWORDS 364 DEBUG (100, ("smbldap_get_first_attribute: [%s] = [%s]\n", 365 attribute, result)); 366 #endif 367 return result; 368 } 369 336 370 char * smbldap_talloc_smallest_attribute(LDAP *ldap_struct, LDAPMessage *entry, 337 371 const char *attribute,
Note:
See TracChangeset
for help on using the changeset viewer.