From 97da8df34f94fe1896635f5b0ba161c64f79d3f3 Mon Sep 17 00:00:00 2001 From: Martin Hedenfal Date: Tue, 21 Sep 2010 10:41:33 +0000 Subject: Warn if schema file can't be opened. --- usr.sbin/ldapd/schema.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ldapd/schema.c b/usr.sbin/ldapd/schema.c index 7b3c24f37e1..0fdedf5519f 100644 --- a/usr.sbin/ldapd/schema.c +++ b/usr.sbin/ldapd/schema.c @@ -1,4 +1,4 @@ -/* $OpenBSD: schema.c,v 1.11 2010/09/03 09:53:24 martinh Exp $ */ +/* $OpenBSD: schema.c,v 1.12 2010/09/21 10:41:32 martinh Exp $ */ /* * Copyright (c) 2010 Martin Hedenfalk @@ -1007,8 +1007,10 @@ schema_parse(struct schema *schema, const char *filename) log_debug("parsing schema file '%s'", filename); - if ((schema->fp = fopen(filename, "r")) == NULL) + if ((schema->fp = fopen(filename, "r")) == NULL) { + log_warn("%s", filename); return -1; + } schema->filename = filename; schema->lineno = 1; -- cgit v1.2.3