Skip to contentSkip to conversation

PATCH some cleanups and security fixes

PATCH Harald Hoyer 1 participant 1 message Sep 20, 2004

lore
Share & tools
lore
#0 lore raw

posted by Steve Grubb on https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130351

tdb/spinlock.c renamed from tdb/spinlock.c.rhsec +1 -1
@@ -23,7 +23,7 @@
 #define HAVE_MMAP	1
 #include "../udev.h"
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
udevstart.c renamed from udevstart.c.rhsec +1 -1
@@ -211,7 +211,7 @@
 			dir2 = opendir(dirname);
 			if (dir2 != NULL) {
 				for (dent2 = readdir(dir2); dent2 != NULL; dent2 = readdir(dir2)) {
-					char dirname2[MAX_PATHLEN-1];
+					char dirname2[MAX_PATHLEN];
 					DIR *dir3;
 					struct dirent *dent3;
 
namedev.c renamed from namedev.c.rhsec +1 -1
@@ -350,7 +350,7 @@
 	{ .bus = "usb-serial",	.file = "detach_state" },
 	{ .bus = "ide",		.file = "detach_state" },
 	{ .bus = "pci",		.file = "vendor" },
-	{}
+	{ NULL, NULL }
 };
 
 #define SECONDS_TO_WAIT_FOR_FILE	10
udevd.c renamed from udevd.c.rhsec +39 -5

90 lines not on this page · raw message

dev_d.c renamed from dev_d.c.rhsec +1 -0
@@ -78,6 +78,7 @@
 		strfieldcpy(env_devname, dev->name);
 		setenv("DEVPATH", devpath, 1);
 	}
+	else env_devname[0] = 0;
 	setenv("DEVNAME", env_devname, 1);
 	dbg("DEVNAME='%s'", env_devname);
 
udev-remove.c renamed from udev-remove.c.rhsec +1 -1
@@ -105,7 +105,7 @@
 	char filename[NAME_SIZE];
 	char linkname[NAME_SIZE];
 	char partitionname[NAME_SIZE];
-	int retval;
+	int retval = 0;
 	int i;
 	char *pos;
 	int len;