From 67729cf71fa6796c79cee576db461b4523bd75a7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 24 Aug 2007 22:58:29 +0000 Subject: r24655: Fix bug 4919 reported by Matthias Wallnöfer : MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > When you change to the SAMBA private directory on a shell (default > /usr/local/samba/private) and start there for example ldbedit with the sam.ldb, > the application crashes if you don't put the "./" before the filename. I've adapted Matthias's patch. Andrew Bartlett (This used to be commit ba82197e30da8e626419e877d224431703edc866) --- source4/dsdb/samdb/ldb_modules/partition.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index 21eb9a74d7..4c0c632139 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -722,11 +722,10 @@ static const char *relative_path(struct ldb_module *module, } if ( (p = strrchr(path, '/')) != NULL) { p[0] = '\0'; + full_name = talloc_asprintf(mem_ctx, "%s/%s", path, name); } else { - talloc_free(path); - return NULL; + full_name = talloc_asprintf(mem_ctx, "./%s", name); } - full_name = talloc_asprintf(mem_ctx, "%s/%s", path, name); talloc_free(path); return full_name; } -- cgit