Lines Matching refs:ldapbuf
292 ldapbuf_t *ldapbuf; in ldap_getattr() local
296 res = ldap_getpwnam(name, items, rep, (void **)&ldapbuf); in ldap_getattr()
300 pw = ldapbuf->pwd; in ldap_getattr()
301 spw = ldapbuf->spwd; in ldap_getattr()
339 if (ldapbuf->shadow_update_enabled) in ldap_getattr()
345 if (ldapbuf->shadow_update_enabled) in ldap_getattr()
351 if (ldapbuf->shadow_update_enabled) in ldap_getattr()
357 if (ldapbuf->shadow_update_enabled) in ldap_getattr()
363 if (ldapbuf->shadow_update_enabled) in ldap_getattr()
369 if (ldapbuf->shadow_update_enabled) in ldap_getattr()
375 if (ldapbuf->shadow_update_enabled) in ldap_getattr()
387 free_ldapbuf(ldapbuf); in ldap_getattr()
388 free(ldapbuf); in ldap_getattr()
408 ldapbuf_t *ldapbuf; in ldap_getpwnam() local
415 ldapbuf = calloc(1, sizeof (ldapbuf_t)); in ldap_getpwnam()
416 if (ldapbuf == NULL) in ldap_getpwnam()
419 ldapbuf->pattrs = calloc(_PWD_MAX_ATTR, sizeof (ns_ldap_attr_t *)); in ldap_getpwnam()
420 if (ldapbuf->pattrs == NULL) in ldap_getpwnam()
422 ldapbuf->npattrs = _PWD_MAX_ATTR; in ldap_getpwnam()
424 ldapbuf->sattrs = calloc(_S_MAX_ATTR, sizeof (ns_ldap_attr_t *)); in ldap_getpwnam()
425 if (ldapbuf->sattrs == NULL) in ldap_getpwnam()
427 ldapbuf->nsattrs = _S_MAX_ATTR; in ldap_getpwnam()
429 res = dup_pw(&ldapbuf->pwd, getpwnam_from(name, rep, REP_LDAP)); in ldap_getpwnam()
433 res = dup_spw(&ldapbuf->spwd, getspnam_from(name, rep, REP_LDAP)); in ldap_getpwnam()
437 char *spw = ldapbuf->spwd->sp_pwdp; in ldap_getpwnam()
439 ldapbuf->passwd = strdup(spw); in ldap_getpwnam()
440 if (ldapbuf->passwd == NULL) in ldap_getpwnam()
443 ldapbuf->passwd = NULL; in ldap_getpwnam()
447 ldapbuf->shadow_update_enabled = __ns_ldap_is_shadow_update_enabled(); in ldap_getpwnam()
449 *buf = (void *)ldapbuf; in ldap_getpwnam()
453 free_ldapbuf(ldapbuf); in ldap_getpwnam()
454 free(ldapbuf); in ldap_getpwnam()
550 ldapbuf_t *ldapbuf = (ldapbuf_t *)buf; in ldap_update() local
552 ns_ldap_attr_t **pattrs = ldapbuf->pattrs; in ldap_update()
554 ns_ldap_attr_t **sattrs = ldapbuf->sattrs; in ldap_update()
566 spw = ldapbuf->spwd; in ldap_update()
573 ldapbuf->shadow_update_enabled); in ldap_update()
584 if (!ldapbuf->shadow_update_enabled) in ldap_update()
594 salt = crypt_gensalt(ldapbuf->passwd, in ldap_update()
595 ldapbuf->pwd); in ldap_update()
623 if (!ldapbuf->shadow_update_enabled) { in ldap_update()
663 if (!ldapbuf->shadow_update_enabled) { in ldap_update()
672 if (!ldapbuf->shadow_update_enabled) { in ldap_update()
681 if (!ldapbuf->shadow_update_enabled) { in ldap_update()
697 if (!ldapbuf->shadow_update_enabled) in ldap_update()
726 if (!ldapbuf->shadow_update_enabled) in ldap_update()
754 if (!ldapbuf->shadow_update_enabled) in ldap_update()
766 if (!ldapbuf->shadow_update_enabled) in ldap_update()
773 if (!ldapbuf->shadow_update_enabled) in ldap_update()
780 if (!ldapbuf->shadow_update_enabled) in ldap_update()
791 if (!ldapbuf->shadow_update_enabled) in ldap_update()
838 if (!ldapbuf->shadow_update_enabled) in ldap_update()
848 if (!ldapbuf->shadow_update_enabled) in ldap_update()
855 if (!ldapbuf->shadow_update_enabled) in ldap_update()
862 if (!ldapbuf->shadow_update_enabled) in ldap_update()
868 if (!ldapbuf->shadow_update_enabled) { in ldap_update()
880 if (!ldapbuf->shadow_update_enabled) { in ldap_update()
910 if (ldapbuf->shadow_update_enabled && spw != NULL && spw->sp_max <= 0) { in ldap_update()
1144 ldapbuf_t *ldapbuf = (ldapbuf_t *)buf; in ldap_putpwnam() local
1145 ns_ldap_attr_t **pattrs = ldapbuf->pattrs; in ldap_putpwnam()
1146 ns_ldap_attr_t **sattrs = ldapbuf->sattrs; in ldap_putpwnam()
1163 if (ldapbuf->shadow_update_enabled && in ldap_putpwnam()
1216 free_ldapbuf(ldapbuf); in ldap_putpwnam()