Linux Archive

Linux Archive (
-   Fedora SELinux Support (
-   -   avc_init deprecation vs avc_open + selinux_set_callback() (

"Daniel P. Berrange" 01-20-2012 11:52 AM

avc_init deprecation vs avc_open + selinux_set_callback()
I'm adding support to libvirt for a userspace access controller, and have
been basing my code on that done in DBus (dbus/bus/selinux.c). That code
uses avc_init() and provides the whole set of callbacks that method

The man page for avc_init(), however, states that is is deprecated and
we should use a combination of avc_open() + selinux_set_callback() in
new code. The selinux_set_callback() function, while able to set the
log & audit callbacks, does not have any way to set the thread, mutex
or memory allocation callbacks. I've verified from looking at the code
that avc_init() is the only API that can set these.

Why is it deprecated, if the replacement quoted can't actually replace
its functionality ? I'm inclined it to use avc_init() despite it being

|: -o- :|
|: -o- :|
|: -o- :|
|: -o- :|
selinux mailing list

All times are GMT. The time now is 03:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.