diff options
Diffstat (limited to 'usr.sbin/ldapd/schema.c')
-rw-r--r-- | usr.sbin/ldapd/schema.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.sbin/ldapd/schema.c b/usr.sbin/ldapd/schema.c index 57548b59478..48943ec1ecf 100644 --- a/usr.sbin/ldapd/schema.c +++ b/usr.sbin/ldapd/schema.c @@ -1,4 +1,4 @@ -/* $OpenBSD: schema.c,v 1.13 2010/11/03 14:17:01 martinh Exp $ */ +/* $OpenBSD: schema.c,v 1.14 2010/11/04 15:35:00 martinh Exp $ */ /* * Copyright (c) 2010 Martin Hedenfalk <martinh@openbsd.org> @@ -1333,3 +1333,18 @@ schema_dump_attribute(struct attr_type *at, char *buf, size_t size) return 0; } +int +schema_dump_match_rule(struct match_rule *mr, char *buf, size_t size) +{ + if (strlcpy(buf, "( ", size) >= size || + strlcat(buf, mr->oid, size) >= size || + strlcat(buf, " NAME '", size) >= size || + strlcat(buf, mr->name, size) >= size || + strlcat(buf, "' SYNTAX ", size) >= size || + strlcat(buf, mr->syntax_oid, size) >= size || + strlcat(buf, " )", size) >= size) + return -1; + + return 0; +} + |