From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Orr Date: Mon, 03 Dec 2007 12:13:17 +0000 Subject: Restoring permissions on existing nodes Message-Id: <4753F2DD.4030803@martinorr.name> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============2123140717==" List-Id: To: linux-hotplug@vger.kernel.org This is a MIME-formatted message. If you see this text it means that your E-mail software does not support MIME-formatted messages. --===============2123140717== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_caligula-5351-1196684018-0001-2" This is a MIME-formatted message. If you see this text it means that your E-mail software does not support MIME-formatted messages. --=_caligula-5351-1196684018-0001-2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Is there a reason why udev sets the permissions and SELinux context every= time it finds an existing node or symlink? The code in question is (from udev_node.c): in udev_node_mknod(): if ((stats.st_mode & S_IFMT) =3D=3D (mode & S_IFMT) && (stats.st_rdev =3D= =3D devt)) { info("preserve file '%s', because it has correct dev_t", file); selinux_setfilecon(file, udev->dev->kernel, stats.st_mode); goto perms; } in node_symlink(): if (strcmp(target, buf) =3D=3D 0) { info("preserve already existing symlink '%s' to '%s'", slink, target); selinux_setfilecon(slink, NULL, S_IFLNK); goto exit; } --=20 Martin Orr --=_caligula-5351-1196684018-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHU/LjZ6a/BjxtAMARAimCAJ9V+2lHqyAduudsGz/FRQpsdXuucQCeODzY 0b0EQlAsCsgflWHmROclfZo= =+Qq4 -----END PGP SIGNATURE----- --=_caligula-5351-1196684018-0001-2-- --===============2123140717== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 --===============2123140717== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============2123140717==--