git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c033b2d
)
support config files in the current directory
author
Andrew Tridgell
<tridge@samba.org>
Wed, 2 Sep 2009 11:51:02 +0000
(21:51 +1000)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 3 Sep 2009 08:36:08 +0000
(18:36 +1000)
source4/param/util.c
patch
|
blob
|
history
diff --git
a/source4/param/util.c
b/source4/param/util.c
index 366c3f1d784cfd3926adc7c931ec67dc68b32ca9..d9d4eb5e2b4009345b0f1a5392cffc5bf7e4710a 100644
(file)
--- 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;