linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH, UDEV] don't call selinux_restore() if namedev_name_device() failed.
@ 2005-01-31 23:55 Michael Buesch
  0 siblings, 0 replies; only message in thread
From: Michael Buesch @ 2005-01-31 23:55 UTC (permalink / raw)
  To: linux-hotplug


[-- Attachment #1.1: Type: text/plain, Size: 274 bytes --]

Hi,

The attached patch fixes the code path if namedev_name_device() fails.
As selinux_init() is not called we should not call selinux_restore().
Is this correct? It's not tested as I don't have selinux.

-- 
Regards Michael Buesch  [ http://www.tuxsoft.de.vu ]



[-- Attachment #1.2: udev_add-no_selinux_restore.diff --]
[-- Type: text/x-diff, Size: 291 bytes --]

===== udev_add.c 1.87 vs edited =====
--- 1.87/udev_add.c	2004-12-20 00:57:30 +01:00
+++ edited/udev_add.c	2005-02-01 00:48:00 +01:00
@@ -292,7 +292,7 @@
 	}
 
 	if (namedev_name_device(udev, class_dev) != 0)
-		goto exit;
+		return 0;
 
 	dbg("adding name='%s'", udev->name);
 

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-31 23:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-31 23:55 [PATCH, UDEV] don't call selinux_restore() if namedev_name_device() failed Michael Buesch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).