From a2013b16b91c53df10c4df04dfdd3dda184b7d33 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 Dec 2005 12:49:51 +0000 Subject: r12286: handle absolute path and url in lock_path() as in private_path() metze (This used to be commit 35d76f733793aecb89d82ce30a8cecb7371d3e95) --- source4/lib/util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source4/lib/util.c b/source4/lib/util.c index 1b51fe5e05..2b13cd3d2f 100644 --- a/source4/lib/util.c +++ b/source4/lib/util.c @@ -610,6 +610,12 @@ char *name_to_fqdn(TALLOC_CTX *mem_ctx, const char *name) char *lock_path(TALLOC_CTX* mem_ctx, const char *name) { char *fname, *dname; + if (name == NULL) { + return NULL; + } + if (name[0] == 0 || name[0] == '/' || strstr(name, ":/")) { + return talloc_strdup(mem_ctx, name); + } dname = talloc_strdup(mem_ctx, lp_lockdir()); trim_string(dname,"","/"); -- cgit