[systemd-devel] [PATCH 2/3] udevd: fix bogus mkdir invocation

Dave Reisner dreisner at archlinux.org
Sun Jul 1 16:37:51 PDT 2012


The filename parameter passed to mkdir can't contain anything but a
garbage value at this point. This was meant to be the full pathname to
the new udev DB, as the mkdir_parents() call before it won't create the
trailing child directory.
---
 src/udev/udevd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index e635795..bb33fb4 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -900,7 +900,7 @@ static int convert_db(struct udev *udev)
 
         /* make sure we do not get here again */
         mkdir_parents("/run/udev/data", 0755);
-        mkdir(filename, 0755);
+        mkdir("/run/udev/data", 0755);
 
         /* old database */
         util_strscpyl(filename, sizeof(filename), "/dev/.udev/db", NULL);
-- 
1.7.11.1



More information about the systemd-devel mailing list