Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261237AbVAHSQj (ORCPT ); Sat, 8 Jan 2005 13:16:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261241AbVAHSQj (ORCPT ); Sat, 8 Jan 2005 13:16:39 -0500 Received: from vds-320151.amen-pro.com ([62.193.204.86]:60081 "EHLO vds-320151.amen-pro.com") by vger.kernel.org with ESMTP id S261237AbVAHSPo (ORCPT ); Sat, 8 Jan 2005 13:15:44 -0500 Subject: [PATCH] Trusted Path Execution LSM 0.2 (20050108) From: Lorenzo =?ISO-8859-1?Q?Hern=E1ndez_?= =?ISO-8859-1?Q?Garc=EDa-Hierro?= To: "linux-kernel@vger.kernel.org" Cc: "narahimi@us.ibm.com" , Chris Wright , Stephen Smalley , "Serge E.Hallyn" , alan@redhat.com Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-x6QTTlYKUJO7M3q6NKjP" Date: Sat, 08 Jan 2005 19:15:07 +0100 Message-Id: <1105208107.24876.10.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 58625 Lines: 800 --=-x6QTTlYKUJO7M3q6NKjP Content-Type: multipart/mixed; boundary="=-Fo5/mJxdff4k2uTKQhRt" --=-Fo5/mJxdff4k2uTKQhRt Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, Serge E. Hallyn contributed a patch for fix a few problems of the kernel-configuration level support for the trusted group (outside the groups acl support). As suggested by Stephen D. Smalley, I've updated the file_mmap hook checks logic, as some of statements are not needed if the initial struct is present. The new patch is attached, but again, extra information and documentation can be found at http://selinux.tuxedo-es.org/tpe-lsm/ . References (for initial release information): [1]: http://lkml.org/lkml/2005/1/5/307 (original thread) Please apply. Cheers, -- Lorenzo Hern=E1ndez Garc=EDa-Hierro [1024D/6F2B2DEC] [2048g/9AE91A22] Hardened Debian head developer & project manager --=-Fo5/mJxdff4k2uTKQhRt Content-Disposition: attachment; filename=tpe-20050108.patch Content-Type: text/x-patch; name=tpe-20050108.patch; charset=ISO-8859-1 Content-Transfer-Encoding: base64 ZGlmZiAtTnVyIC4uL2xpbnV4LTIuNi4xMC9Eb2N1bWVudGF0aW9uL3RwZS1sc20udHh0IGxpbnV4 LTIuNi4xMC10cGUvRG9jdW1lbnRhdGlvbi90cGUtbHNtLnR4dA0KLS0tIC4uL2xpbnV4LTIuNi4x MC9Eb2N1bWVudGF0aW9uL3RwZS1sc20udHh0CTE5NzAtMDEtMDEgMDE6MDA6MDAuMDAwMDAwMDAw ICswMTAwDQorKysgbGludXgtMi42LjEwLXRwZS9Eb2N1bWVudGF0aW9uL3RwZS1sc20udHh0CTIw MDUtMDEtMDcgMDE6MzY6MzUuMDAwMDAwMDAwICswMTAwDQpAQCAtMCwwICsxLDEwMyBAQA0KK1Ry dXN0ZWQgUGF0aCBFeGVjdXRpb24gTGludXggU2VjdXJpdHkgTW9kdWxlDQorQ29weXJpZ2h0IChD KSAyMDAzIElCTSBDb3JwLiA8bmFyYWhpbWlAdXMuaWJtLmNvbT4NCitDb3B5cmlnaHQgKEMpIDIw MDUgTG9yZW56byBIZXJuYW5kZXogR2FyY2lhLUhpZXJybyA8bG9yZW56b0BnbnUub3JnPg0KK0F1 dGhvcjogTG9yZW56byBIZXJuYW5kZXogR2FyY2lhLUhpZXJybyAoT3JpZ2luYWw6IE5pa2kgUmFo aW1pKQ0KK1RoaXMgZmlsZSBpcyBkaXN0cmlidXRlZCBhY2NvcmRpbmcgdG8gdGhlIEdOVSBHZW5l cmFsIFB1YmxpYyBMaWNlbnNlLg0KK1RoaXMgbW9kdWxlIHdhcyB0ZXN0ZWQgb24gdGhlIExpbnV4 IGtlcm5lbCAyLjYuOSBhbmQgMi42LjEwLg0KKw0KK1RoZSBwdXJwb3NlIG9mIHRoZSBUcnVzdGVk IFBhdGggRXhlY3V0aW9uI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WlkX3QgY2FuZGlkYXRlKQ0KK3sNCisJaWYgKCh0cGVfc2VhcmNoKGNh bmRpZGF0ZSkpICE9IE5BQ0spIHsNCisJCXJldHVybiAoQUNLKTsNCisJfQ0KKwlyZXR1cm4gKE5B Q0spOw0KK30NCisNCisvKiAgVmVyaWZ5IGEgY2FuZGlkYXRlIHVzZXIgZ3JvdXAuICovDQorc3Rh dGljIGlubGluZSBpbnQgdHBlX3NlYXJjaF9ncm91cChnaWRfdCBncm91cF9jYW5kaWRhdGUpDQor ew0KKwlpbnQgaTsNCisJZm9yIChpID0gMDsgaSA8IHRwZV9hY2xfZ3JvdXBfY2FuZGlkYXRlczsg aSsrKSB7DQorCQlpZiAoZ3JvdXBfY2FuZGlkYXRlID09IHRwZV9ncm91cF9hY2xbaV0pIHsNCisJ CQlyZXR1cm4gaTsNCisJCX0NCisJfQ0KKwlyZXR1cm4gTkFDSzsNCit9DQorc3RhdGljIGlubGlu ZSBpbnQgdHBlX2dyb3VwX3ZlcmlmeShnaWRfdCBncm91cF9jYW5kaWRhdGUpDQorew0KKwlpZiAo KHRwZV9zZWFyY2hfZ3JvdXAoZ3JvdXBfY2FuZGlkYXRlKSkgIT0gTkFDSykgew0KKwkJcmV0dXJu IChBQ0spOw0KKwl9DQorCXJldHVybiAoTkFDSyk7DQorfQ0KKw0KKyNlbmRpZgkJCQkvKiBfX1RQ RV9IICovDQo= --=-Fo5/mJxdff4k2uTKQhRt-- --=-x6QTTlYKUJO7M3q6NKjP Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBB4CMrDcEopW8rLewRAh0yAKCcFainq+hH/hDeLtqopcPI0kA/6wCeNMPE YuJNXcVRQAgT948dOom/ZAo= =sNNe -----END PGP SIGNATURE----- --=-x6QTTlYKUJO7M3q6NKjP-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/