1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-23 20:23:50 +03:00

r11364: added a ldb_attr_dn() function for testing if an attribute name is

"dn" or "distinguishedName". This makes us a bit more consistent
This commit is contained in:
Andrew Tridgell
2005-10-28 07:05:32 +00:00
committed by Gerald (Jerry) Carter
parent 62d5253a03
commit b41b374b55
4 changed files with 17 additions and 7 deletions

View File

@@ -80,3 +80,15 @@ int ldb_attr_cmp(const char *attr1, const char *attr2)
{
return ldb_caseless_cmp(attr1, attr2);
}
/*
we accept either 'dn' or 'distinguishedName' for a distinguishedName
*/
int ldb_attr_dn(const char *attr)
{
if (ldb_attr_cmp(attr, "dn") == 0 ||
ldb_attr_cmp(attr, "distinguishedName") == 0) {
return 0;
}
return -1;
}