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:
committed by
Gerald (Jerry) Carter
parent
62d5253a03
commit
b41b374b55
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user