linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mbuesch@freenet.de>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH, UDEV] don't call selinux_restore() if namedev_name_device() failed.
Date: Mon, 31 Jan 2005 23:55:19 +0000	[thread overview]
Message-ID: <200502010055.25731.mbuesch@freenet.de> (raw)


[-- 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 --]

                 reply	other threads:[~2005-01-31 23:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200502010055.25731.mbuesch@freenet.de \
    --to=mbuesch@freenet.de \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).