Because the current path was uninitialized, we were creating
semi-random directory at the root of the filesystem.
+lldpd (1.0.3)
+ * Fix:
+ + Fix creation of chroot directory.
+
lldpd (1.0.2)
* Changes:
+ On Linux, the monitor process will now drop its privileges
/* Create a directory recursively. */
static int mkdir_p(const char *pathname, mode_t mode)
{
- char path[PATH_MAX+1], current[PATH_MAX+1];
+ char path[PATH_MAX+1], current[PATH_MAX+1] = {};
char *tok;
if (strlcpy(path, pathname, sizeof(path)) >= sizeof(path)) {