From: Eamon Walsh <ewalsh@tycho.nsa.gov>
To: Karl MacMillan <kmacmillan@mentalrootkit.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>, selinux@tycho.nsa.gov
Subject: Re: [RFC][PATCH] libselinux: Namespacing
Date: Tue, 29 May 2007 15:17:18 -0400 [thread overview]
Message-ID: <465C7C3E.7080206@tycho.nsa.gov> (raw)
In-Reply-To: <1178908626.11064.18.camel@localhost.localdomain>
Karl MacMillan wrote:
> On Fri, 2007-05-11 at 08:37 -0400, Stephen Smalley wrote:
>> On Thu, 2007-05-10 at 16:31 -0400, Karl MacMillan wrote:
>>> On Thu, 2007-05-10 at 16:12 -0400, Stephen Smalley wrote:
>>>> libselinux presently lacks proper namespacing of its functions. This
>>>> patch is just for comment on an approach to gradually fixing that
>>>> problem, starting with just a trivial example for a single function.
>>>> The idea is to switch over the real function to being properly
>>>> namespaced, provide an alias under the old name in the symbol table for
>>>> binary compatibility, and make the old name a macro in the public
>>>> headers that expands to the new name so that source rebuilds against the
>>>> new library will start using the new name. Then at some point in the
>>>> future, we drop the old name macro from the source API, forcing an
>>>> update to external sources to build against newer headers, while leaving
>>>> the alias present in the symbol table as long as we need compatibility
>>>> with existing binaries. Thoughts?
>>>>
>>> Sounds good to me - will this impact the python bindings? If we do have
>>> to change the bindings we should take as an opportunity to fix the
>>> namespace issues there. For example, bo reason to have
>>> selinux.selinux_booleans_path - should be changed to
>>> selinux.booleans_path.
>> Yes, it would affect the python bindings too; not sure what needs to be
>> done there for backward compatibility.
>>
>
> Shouldn't be hard to provide the backwards compatibility - either
> through swig or a pure python module.
>
>> We also have to decide what to do about functions that already have
>> their own prefix, like the security_ functions and the avc_ functions;
>> I'm inclined to leave those alone as already being adequately
>> namespaced.
>>
>
> I'd vote for changing them. The consistency is nice in general (I'm not
> certain that it is obvious enough to everyone which prefix applies to
> which function) and it will make wrapping in languages that support
> proper namespacing simpler.
I'm fine with changing over the security_ stuff but what to do for the
avc stuff? Either a double prefix selinux_avc_ which is kind of long,
or drop the _avc_ in which case there is a conflict between
security_compute_create and avc_compute_create. Maybe "seavc_"?
Same question about the labeling interface I have in the works, which
would introduce a bunch of functions prefixed "selabel_".
--
Eamon Walsh <ewalsh@tycho.nsa.gov>
National Security Agency
--
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.
next prev parent reply other threads:[~2007-05-29 19:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 20:12 [RFC][PATCH] libselinux: Namespacing Stephen Smalley
2007-05-10 20:31 ` Karl MacMillan
2007-05-11 12:37 ` Stephen Smalley
2007-05-11 18:37 ` Karl MacMillan
2007-05-29 19:17 ` Eamon Walsh [this message]
2007-05-30 14:45 ` Stephen Smalley
2007-05-31 16:27 ` Karl MacMillan
2007-05-10 22:12 ` James Antill
2007-05-11 12:42 ` Stephen Smalley
2007-05-11 12:47 ` Stephen Smalley
2007-05-11 14:39 ` James Antill
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=465C7C3E.7080206@tycho.nsa.gov \
--to=ewalsh@tycho.nsa.gov \
--cc=kmacmillan@mentalrootkit.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.