diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-12-16 12:49:51 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:27 -0500 |
commit | a2013b16b91c53df10c4df04dfdd3dda184b7d33 (patch) | |
tree | 3bf49f750a5c4010ac89e05aa973552afa59c670 /source4 | |
parent | c0277892d079dc2d8fcd5bbb5061369ddd8d9c74 (diff) | |
download | samba-a2013b16b91c53df10c4df04dfdd3dda184b7d33.tar.gz samba-a2013b16b91c53df10c4df04dfdd3dda184b7d33.tar.bz2 samba-a2013b16b91c53df10c4df04dfdd3dda184b7d33.zip |
r12286: handle absolute path and url in lock_path() as in private_path()
metze
(This used to be commit 35d76f733793aecb89d82ce30a8cecb7371d3e95)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/util.c | 6 |
1 files changed, 6 insertions, 0 deletions
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,"","/"); |