summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hedenfal <martinh@cvs.openbsd.org>2010-09-21 10:41:33 +0000
committerMartin Hedenfal <martinh@cvs.openbsd.org>2010-09-21 10:41:33 +0000
commit97da8df34f94fe1896635f5b0ba161c64f79d3f3 (patch)
tree197eab75baaa0a9a5818d218fd6e4b7da53a34c1
parent70e8cfe7a19f4d46a9b0c9695144814b13f18c7e (diff)
Warn if schema file can't be opened.
-rw-r--r--usr.sbin/ldapd/schema.c6
1 files 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 <martinh@openbsd.org>
@@ -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;