summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldapd/validate.c
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2019-10-24 12:39:26 +0000
committertb <tb@openbsd.org>2019-10-24 12:39:26 +0000
commit696b58997f75587bd78112ed0b6cdec94a718911 (patch)
tree113a47b65d3d84619d15dd5ba9050be9ee77cc1b /usr.sbin/ldapd/validate.c
parentBackout previous synch.h commit (r1.5, "Use process-private futexes to avoid (diff)
downloadwireguard-openbsd-696b58997f75587bd78112ed0b6cdec94a718911.tar.xz
wireguard-openbsd-696b58997f75587bd78112ed0b6cdec94a718911.zip
The ber_* namespace is used by liblber since time immemorial,
so move our BER API to the unused ober_* prefix to avoid some breakage in ports. Problem diagnosed by jmatthew with ber_free() in samba, but there are many others as pointed out by sthen. tests & ok rob ok sthen (who had an almost identical diff for libutil) "go head hit it" deraadt
Diffstat (limited to 'usr.sbin/ldapd/validate.c')
-rw-r--r--usr.sbin/ldapd/validate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ldapd/validate.c b/usr.sbin/ldapd/validate.c
index 45b02e7207c..441a5c6779e 100644
--- a/usr.sbin/ldapd/validate.c
+++ b/usr.sbin/ldapd/validate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: validate.c,v 1.11 2018/05/15 11:19:21 reyk Exp $ */
+/* $OpenBSD: validate.c,v 1.12 2019/10/24 12:39:26 tb Exp $ */
/*
* Copyright (c) 2010 Martin Hedenfalk <martin@bzero.se>
@@ -65,7 +65,7 @@ validate_attribute(struct attr_type *at, struct ber_element *vals)
}
for (elm = vals->be_sub; elm != NULL; elm = elm->be_next) {
- if (ber_get_string(elm, &val) == -1) {
+ if (ober_get_string(elm, &val) == -1) {
log_debug("attribute value not an octet-string");
return LDAP_PROTOCOL_ERROR;
}
@@ -312,7 +312,7 @@ validate_entry(const char *dn, struct ber_element *entry, int relax)
*/
objclass = objclass->be_next; /* skip attribute description */
for (a = objclass->be_sub; a != NULL; a = a->be_next) {
- if (ber_get_string(a, &s) != 0) {
+ if (ober_get_string(a, &s) != 0) {
rc = LDAP_INVALID_SYNTAX;
goto done;
}
@@ -395,7 +395,7 @@ validate_entry(const char *dn, struct ber_element *entry, int relax)
/* Check all attributes against schema.
*/
for (a = entry->be_sub; a != NULL; a = a->be_next) {
- if (ber_scanf_elements(a, "{se{", &s, &vals) != 0) {
+ if (ober_scanf_elements(a, "{se{", &s, &vals) != 0) {
rc = LDAP_INVALID_SYNTAX;
goto done;
}