+2631. [bug] Handle "//", "/./" and "/../" in mkdirpath().
+ [RT #19926 ]
+
2630. [func] Improved syntax for DDNS autoconfiguration: use
"update-policy local;" to switch on local DDNS in a
zone. [RT #19875]
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: os.c,v 1.98 2009/07/14 23:47:54 tbox Exp $ */
+/* $Id: os.c,v 1.99 2009/07/15 00:36:37 marka Exp $ */
/*! \file */
}
if (mkdirpath(filename, report) == -1)
goto error;
+ /*
+ * Handle "//", "/./" and "/../" in path.
+ */
+ if (!strcmp(slash + 1, "") ||
+ !strcmp(slash + 1, ".") ||
+ !strcmp(slash + 1, "..")) {
+ *slash = '/';
+ return (0);
+ }
mode = S_IRUSR | S_IWUSR | S_IXUSR; /* u=rwx */
mode |= S_IRGRP | S_IXGRP; /* g=rx */
mode |= S_IROTH | S_IXOTH; /* o=rx */