From 127bf61a4006c60a70b0e43b61c60e532990d3b8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 2 Sep 2009 21:51:02 +1000 Subject: support config files in the current directory --- source4/param/util.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source4/param/util.c b/source4/param/util.c index 366c3f1d78..d9d4eb5e2b 100644 --- a/source4/param/util.c +++ b/source4/param/util.c @@ -118,9 +118,14 @@ char *config_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx, } p = strrchr(config_dir, '/'); if (p == NULL) { - return NULL; + talloc_free(config_dir); + config_dir = talloc_strdup(mem_ctx, "."); + if (config_dir == NULL) { + return NULL; + } + } else { + p[0] = '\0'; } - p[0] = '\0'; fname = talloc_asprintf(mem_ctx, "%s/%s", config_dir, name); talloc_free(config_dir); return fname; -- cgit