From 25ca2fd3d36382107e5443d64a6bf35fe7c47cca Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Mon, 10 Feb 1997 20:03:56 +0000 Subject: Added trim_string(s, "./", 0) to unix_clean_name to remove leading ./ characters. jra@cygnus.com (This used to be commit 617370314ef0d19002243105f5c8a549e3397152) --- source3/lib/util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/lib/util.c b/source3/lib/util.c index e1302857fb..44184f8d46 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1184,6 +1184,9 @@ void unix_clean_name(char *s) /* remove any double slashes */ string_sub(s, "//","/"); + /* Remove leading ./ characters */ + trim_string(s, "./", NULL); + while ((p = strstr(s,"/../")) != NULL) { pstring s1; -- cgit