git.samba.org
/
jelmer
/
samba4-debian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
571a870
)
r12286: handle absolute path and url in lock_path() as in private_path()
author
Stefan Metzmacher
<metze@samba.org>
Fri, 16 Dec 2005 12:49:51 +0000
(12:49 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:47:27 +0000
(13:47 -0500)
metze
source/lib/util.c
patch
|
blob
|
history
diff --git
a/source/lib/util.c
b/source/lib/util.c
index 1b51fe5e05f09cd6a47440805fdd9734f93ed1b6..2b13cd3d2f134325b87f7927ed7998503c2e3ce1 100644
(file)
--- a/
source/lib/util.c
+++ b/
source/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,"","/");