From: olh@suse.de Date: Wed, 24 Mar 2004 02:52:52 +0000 (-0800) Subject: [PATCH] uninitialized variable for mknod and friend X-Git-Tag: 023~24 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=4474484153f529c1a1c11392e8fc3fa8a588de54;hp=fdcfcec707ab48a5285d675412820d4320382e92 [PATCH] uninitialized variable for mknod and friend mknod gets an uninitialized variable, which leads to interesting file modes. the bug is in namedev, devices with no match must not use the uninitialized stuff were dev points to. --- diff --git a/namedev.c b/namedev.c index e075e20af..6606ce8f7 100644 --- a/namedev.c +++ b/namedev.c @@ -843,12 +843,12 @@ found: strfieldcpy(udev->config_file, dev->config_file); udev->config_line = dev->config_line; -done: /* get permissions given in rule */ set_empty_perms(udev, dev->mode, dev->owner, dev->group); +done: /* get permissions given in config file or set defaults */ perm = find_perm(udev->name); if (perm != NULL) {