Received: from jazzdrum.ncsc.mil (zombie.ncsc.mil [144.51.88.131]) by tycho.ncsc.mil (8.12.8/8.12.8) with ESMTP id j5GE3lgA000445 for ; Thu, 16 Jun 2005 10:03:47 -0400 (EDT) Received: from gotham.columbia.tresys.com (jazzdrum.ncsc.mil [144.51.5.7]) by jazzdrum.ncsc.mil (8.12.10/8.12.10) with ESMTP id j5GDtAZm020210 for ; Thu, 16 Jun 2005 13:55:10 GMT Subject: Re: ANN: SELinux Reference Policy Release From: "Christopher J. PeBenito" To: antoine Cc: Colin Walters , SELinux Mail List In-Reply-To: <1118877949.10103.19.camel@localhost> References: <1118871745.18294.28.camel@sgc.columbia.tresys.com> <1118874951.24338.35.camel@nexus.verbum.private> <1118877949.10103.19.camel@localhost> Content-Type: text/plain Date: Thu, 16 Jun 2005 09:55:13 -0400 Message-Id: <1118930113.18294.56.camel@sgc.columbia.tresys.com> Mime-Version: 1.0 Sender: owner-selinux@tycho.nsa.gov List-Id: selinux@tycho.nsa.gov On Thu, 2005-06-16 at 00:25 +0100, antoine wrote: > (...) > Good work! > > > # Define derived domains for GPG from @userdomain > > # @param user The user domain to derive from > > # @param userrole The user role to authorize for GPG > > function gpg_per_userdomain(domain user, role userrole) { > > derivedtype gpg_t from user > > > > domain_type(gpg_t) > > domain_entry_file(gpg_t, gpg_exec_t) > > role userrole types gpg_t > > > > ... > > > > The key idea here is that an IDE could actually parse this, > Not just IDEs, my brain finds it easier to parse too. > XML if overused nowadays. The inline documentation was meant to be machine parseable. Its used to create the interface documentation on the website (http://serefpolicy.sourceforge.net/api-docs/), which is much more readable, and also to create the modules.conf and tunables.conf files. Also, as Karl mentioned, it was meant to be loaded into other tools, such as SEFramework (http://www.selinux-symposium.org/2005/presentations/session6/6-1-wilson.pdf). We did look into other available formats for machine parseable comments, and XML is really the best choice if you want the comments to be transformed into many different formats, and easily loaded into other programs; its already well understood, and parsers exist for many programming languages. Simpler (for humans to read) commenting formats just don't have these options, and mainly target one transformation. > > and easily > > determine programatically what types and roles are generated by the > > function, without doing hacks like expanding the M4 and parsing that, > > and then guessing. > Absolutely. It is more complex then that, because you still have to take into account *'s and ~'s and attributes. We've thought about this problem a little, and we'll be looking more into this in the future. -- Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150 -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message.