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

Lennart Poettering lennart at poettering.net
Mon Aug 18 06:09:39 PDT 2014

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?


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list