summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/include/radsec/radsec.h6
-rw-r--r--lib/radsec.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/include/radsec/radsec.h b/lib/include/radsec/radsec.h
index a35077c..2744cd2 100644
--- a/lib/include/radsec/radsec.h
+++ b/lib/include/radsec/radsec.h
@@ -6,6 +6,12 @@
#include <unistd.h>
#include <sys/time.h>
+#ifdef SYSCONFDIR
+#define RS_FREERADIUS_DICT SYSCONFDIR "/raddb/dictionary"
+#else /* !SYSCONFDIR */
+#define RS_FREERADIUS_DICT "/usr/local/raddb/dictionary"
+#endif /* !SYSCONFDIR */
+
enum rs_error_code {
RSE_OK = 0,
RSE_NOMEM = 1,
diff --git a/lib/radsec.c b/lib/radsec.c
index 6e68950..ae8eda6 100644
--- a/lib/radsec.c
+++ b/lib/radsec.c
@@ -68,8 +68,7 @@ rs_context_init_freeradius_dict (struct rs_context *ctx, const char *dict)
dict = ctx->config->dictionary;
if (dict == NULL)
- return rs_err_ctx_push_fl (ctx, RSE_INVAL, __FILE__, __LINE__,
- "missing dictionary");
+ dict = RS_FREERADIUS_DICT;
dictlen = strlen (dict);
dir = rs_calloc (ctx, 1, dictlen + 1);