From 0781a5c3ae2f525ab6b0981d69c67e335d91a7de Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Feb 15 2013 20:13:59 +0000 Subject: Add new constant SETRANS_DIR which points to the directory where mstransd can find the socket and libvirt can write its translations files. --- diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index c18d0ae..92bf21b 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -1,8 +1,16 @@ diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h -index a4079aa..82954c2 100644 +index a4079aa..80ba628 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h -@@ -498,6 +498,7 @@ extern const char *selinux_policy_root(void); +@@ -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, +@@ -498,6 +499,7 @@ extern const char *selinux_policy_root(void); /* These functions return the paths to specific files under the policy root directory. */ @@ -381,3 +389,16 @@ index 2c7c85c..4a4aebc 100644 hidden_proto(selinux_binary_policy_path) hidden_proto(selinux_booleans_subs_path) hidden_proto(selinux_default_context_path) +diff --git a/libselinux/src/setrans_internal.h b/libselinux/src/setrans_internal.h +index a801ee8..b3bdca2 100644 +--- a/libselinux/src/setrans_internal.h ++++ b/libselinux/src/setrans_internal.h +@@ -1,6 +1,7 @@ + /* Author: Trusted Computer Solutions, Inc. */ ++#include + +-#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 diff --git a/libselinux.spec b/libselinux.spec index 89f3124..8adb7ab 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -10,7 +10,7 @@ Summary: SELinux library and simple utilities Name: libselinux Version: 2.1.13 -Release: 3%{?dist} +Release: 4%{?dist} License: Public Domain Group: System Environment/Libraries Source: %{name}-%{version}.tgz @@ -241,6 +241,9 @@ rm -rf %{buildroot} %{ruby_sitearch}/selinux.so %changelog +* Fri Feb 15 2013 Dan Walsh - 2.1.13-4 +- Add new constant SETRANS_DIR which points to the directory where mstransd can find the socket and libvirt can write its translations files. + * Fri Feb 15 2013 Dan Walsh - 2.1.13-3 - Bring back selinux_current_policy_path