From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Buesch Date: Mon, 31 Jan 2005 23:55:19 +0000 Subject: [PATCH, UDEV] don't call selinux_restore() if namedev_name_device() failed. Message-Id: <200502010055.25731.mbuesch@freenet.de> MIME-Version: 1 Content-Type: multipart/mixed; boundary="nextPart1384246.elAPAvA8bX" List-Id: To: linux-hotplug@vger.kernel.org --nextPart1384246.elAPAvA8bX Content-Type: multipart/mixed; boundary="Boundary-01=_oVs/BQq0LOOhFcE" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_oVs/BQq0LOOhFcE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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. =2D-=20 Regards Michael Buesch [ http://www.tuxsoft.de.vu ] --Boundary-01=_oVs/BQq0LOOhFcE Content-Type: text/x-diff; charset="us-ascii"; name="udev_add-no_selinux_restore.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="udev_add-no_selinux_restore.diff" =3D=3D=3D=3D=3D udev_add.c 1.87 vs edited =3D=3D=3D=3D=3D =2D-- 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 @@ } =20 if (namedev_name_device(udev, class_dev) !=3D 0) =2D goto exit; + return 0; =20 dbg("adding name=3D'%s'", udev->name); =20 --Boundary-01=_oVs/BQq0LOOhFcE-- --nextPart1384246.elAPAvA8bX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQBB/sVtFGK1OIvVOP4RAjoYAJ40T4rhzlxfbIa5T90OTgQAHYfR9wCeP6DG jN+qjlkQNLGbbw87K6mJspo= =AiuK -----END PGP SIGNATURE----- --nextPart1384246.elAPAvA8bX-- ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel