define SELINUX_TRANS_DIR in selinux.h

I wanted to separate this directory out in order for a new patch to mcstransd to watch
this directory for newly created files, which it could then translate.

The idea is libvirt would write to /var/run/setrans/c0:c1,c2 with the contents of vm1, then
setrans could translate the processes to show system_u:system_r:svirt_t:vm1
This commit is contained in:
Dan Walsh 2013-10-09 14:57:48 -04:00 committed by Stephen Smalley
parent ce2a8848ad
commit 851266c180
2 changed files with 3 additions and 1 deletions

View File

@ -177,6 +177,7 @@ extern void selinux_set_callback(int type, union selinux_callback cb);
#define SELINUX_WARNING 1
#define SELINUX_INFO 2
#define SELINUX_AVC 3
#define SELINUX_TRANS_DIR "/var/run/setrans"
/* Compute an access decision. */
extern int security_compute_av(const security_context_t scon,

View File

@ -1,6 +1,7 @@
/* Author: Trusted Computer Solutions, Inc. */
#include <selinux/selinux.h>
#define SETRANS_UNIX_SOCKET "/var/run/setrans/.setrans-unix"
#define SETRANS_UNIX_SOCKET SELINUX_TRANS_DIR "/.setrans-unix"
#define RAW_TO_TRANS_CONTEXT 2
#define TRANS_TO_RAW_CONTEXT 3