[systemd-devel] [PATCH 1/2] label: move selinux label APIs to its util file

WaLyong Cho walyong.cho at samsung.com
Mon Aug 18 06:40:01 PDT 2014

On 08/18/2014 10:09 PM, Lennart Poettering wrote:
> On Mon, 18.08.14 15:06, WaLyong Cho (walyong.cho at samsung.com) wrote:
>> And add prefix "selinux_" to each APIs like smack.
> I am a bit concerned about this, as "selinux_" is really the prefix the
> selinux libraries use for most of their newer symbols. And they have a
> lot of symbols that actually are named very similar to ours (given that
> ours are just wrappers for them anyway to just make their apis more
> digestable...). libselinux is quite chaotic, they also use the
> "selabel_" prefix sometimes, and sometimes no prefix it all. Other times
> they use the "security_" prefix. Seems they really didn't understand the
> concept of namespacing in C... 
> Anyway, maybe we can find a different prefix to use. "selnx_" or so? Not
> pretty, but at least distinct? "sel_"? "se_linux_"? "util_selinux"?
> or maybe we just call call our internal selinux apis
> "label_selinux_xyz", and our smack apis "label_smack_xyz"?
> Or maybe "mac_selinux_xyz" and "mac_smack_xyz"?
> I think the latter sounds most appropriate to me right now, as it is
> still somewhat short, and sufficiently distinctive. I'd probably go for
> that. Any other suggestions?

Both sounds good.

How does we do on filename?
label-selinux.{c/h} and label-smack.{c/h}?
mac.{c/h}, mac-selinux.{c/h} and mac-smack.{c/h}?

And does we consider also selinux-{access/setup}.{c/h} and

> Lennart

More information about the systemd-devel mailing list