Lines Matching defs:dn
674 /* Set escapeFlag if RHS is "dn" to remove escape chars */
678 strcasecmp(rl->rhs.element->element.item.name, "dn")
1217 char *dn = 0, *skey, *svalue, *str;
1369 if ((dn = findVal("dn", &frv[i], mit_ldap)) != 0) {
1372 rc = ldapAdd(dn, &frv[i],
1376 rc = ldapModify(dn, &frv[i],
1387 " value=%s) for (dn: %s) for "
1389 svalue, dn, t->dbId, map);
1400 "(dn: %s) for NIS data "
1405 ldap_err2string(rc), dn, skey,
1543 * Split 'dn' into rdn and parentdn based on the first
1550 splitDN(char *dn, char **rdn, char **parentdn) {
1554 if ((name = sdup(myself, T, dn)) == 0)
1589 * Case 1: Both 'domain' and 'dn' are non-NULL
1592 * Obtain the 'dn' from the nisLDAPdomainContext list
1594 * Case 3: Only 'dn' is non-NULL
1595 * Create an object with the 'dn'
1598 * Case 4: Both 'domain' and 'dn' are NULL
1605 makeNISObject(char *domain, char *dn) {
1612 if (!dn && !domain)
1617 * try to find dn from the nisLDAPdomainContext
1620 if (!dn) {
1626 dn = ypDomains.domains[i];
1630 if (!dn)
1635 * If only 'dn' is given, then it means that the
1637 * that 'dn'.
1639 * If 'domain' is given, then check if the 'dn'
1648 ls = buildLdapSearch(dn, LDAP_SCOPE_BASE, 0, 0,
1653 "request for dn: %s", myself, dn);
1674 "%s: Entry (dn: %s) already "
1678 myself, dn, val, domain);
1685 * Entry for the 'dn' exists, but it
1699 rc = ldapModify(dn, rv,
1706 "%s: entry (dn: %s) "
1709 myself, dn);
1715 "entry (dn: %s) to be "
1718 myself, dn, rc,
1723 } else { /* search for 'dn' failed */
1733 "entry (dn: %s): "
1735 myself, dn, rc,
1742 * If the 'dn' is actually the naming context of
1745 * entries. If unable to add the entry for the 'dn'
1749 if (addNISObject(domain, dn, &add_rc) == SUCCESS)
1756 if (addParent(dn, NULL) == FAILURE)
1759 if (addNISObject(domain, dn, NULL) == FAILURE)
1766 addParent(char *dn, char **attr) {
1774 if (splitDN(dn, &rdn, &parentdn) == -1)
1787 "parent (dn: %s) of (dn: %s)",
1788 myself, parentdn, dn);
1802 "%s: Unable to create parent (dn: %s) of "
1803 "(dn: %s) in the DIT", myself, parentdn, dn);
1864 * Case 1: 'dn' is NULL
1869 * Create an object with the 'dn'
1879 addNISObject(char *domain, char *dn, int *ldap_rc) {
1886 if (!dn)
1902 if (splitDN(dn, &rdn, 0) == -1)
1979 rc = ldapAdd(dn, rv, attrs, 0);
1982 rc = ldapAdd(dn, rv, objClassAttrs, 0);
1987 "%s: Entry (dn: %s) added to DIT",
1988 myself, dn);
1994 "%s: ldapAdd error %d (%s) for (dn: %s)",
1995 myself, rc, ldap_err2string(rc), dn);