summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldapd/validate.c
diff options
context:
space:
mode:
authormartinh <martinh@openbsd.org>2010-06-30 04:17:04 +0000
committermartinh <martinh@openbsd.org>2010-06-30 04:17:04 +0000
commit5d98f3b0c8da48f29de06bf0f2c94ba8d6665504 (patch)
treece1e8d4ac9b8d56b4f047fef556d741d52bd88e3 /usr.sbin/ldapd/validate.c
parentVerify that any object class subclassing is allowed. (diff)
downloadwireguard-openbsd-5d98f3b0c8da48f29de06bf0f2c94ba8d6665504.tar.xz
wireguard-openbsd-5d98f3b0c8da48f29de06bf0f2c94ba8d6665504.zip
Move OBJ_NAME and ATTR_NAME macros to schema.h so it's reachable from
schema parser. Also fix a typo.
Diffstat (limited to 'usr.sbin/ldapd/validate.c')
-rw-r--r--usr.sbin/ldapd/validate.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.sbin/ldapd/validate.c b/usr.sbin/ldapd/validate.c
index 9f8de78b244..3074046886e 100644
--- a/usr.sbin/ldapd/validate.c
+++ b/usr.sbin/ldapd/validate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: validate.c,v 1.3 2010/06/30 03:24:40 martinh Exp $ */
+/* $OpenBSD: validate.c,v 1.4 2010/06/30 04:17:04 martinh Exp $ */
/*
* Copyright (c) 2010 Martin Hedenfalk <martin@bzero.se>
@@ -24,10 +24,6 @@
#include "ldapd.h"
-#define OBJ_NAME(obj) ((obj)->names ? SLIST_FIRST((obj)->names)->name : \
- (obj)->oid)
-#define ATTR_NAME(at) OBJ_NAME(at)
-
static int
validate_required_attributes(struct ber_element *entry, struct object *obj)
{
@@ -246,7 +242,7 @@ olist_push(struct obj_list *olist, struct object *obj)
optr->object = obj;
SLIST_INSERT_HEAD(olist, optr, next);
- /* Expand the list of object classes along the superior chain.
+ /* Expand the list of object classes along the superclass chain.
*/
if (obj->sup != NULL)
SLIST_FOREACH(sup, obj->sup, next)
@@ -261,7 +257,7 @@ is_super(struct object *sup, struct object *obj)
struct obj_ptr *optr;
if (sup == NULL || obj->sup == NULL)
- return NULL;
+ return 0;
SLIST_FOREACH(optr, obj->sup, next)
if (optr->object == sup || is_super(sup, optr->object))