diff --git a/.libselinux.metadata b/.libselinux.metadata new file mode 100644 index 0000000..c2115d1 --- /dev/null +++ b/.libselinux.metadata @@ -0,0 +1 @@ +ca3f46f50f5d77a277f6e0901da3b19ceb20d698 SOURCES/libselinux-2.1.13.tgz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/libselinux-rhat.patch b/SOURCES/libselinux-rhat.patch new file mode 100644 index 0000000..8ca2b1c --- /dev/null +++ b/SOURCES/libselinux-rhat.patch @@ -0,0 +1,1456 @@ +diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h +index a4079aa..52d6700 100644 +--- a/libselinux/include/selinux/selinux.h ++++ b/libselinux/include/selinux/selinux.h +@@ -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, +@@ -496,8 +497,15 @@ extern int selinux_getpolicytype(char **policytype); + */ + extern const char *selinux_policy_root(void); + ++/* ++ selinux_set_policy_root sets an alternate policy root directory path under ++ which the compiled policy file and context configuration files exist. ++ */ ++extern int selinux_set_policy_root(const char *rootpath); ++ + /* These functions return the paths to specific files under the + policy root directory. */ ++extern const char *selinux_current_policy_path(void); + extern const char *selinux_binary_policy_path(void); + extern const char *selinux_failsafe_context_path(void); + extern const char *selinux_removable_context_path(void); +@@ -515,6 +523,7 @@ extern const char *selinux_virtual_image_context_path(void); + extern const char *selinux_lxc_contexts_path(void); + extern const char *selinux_x_context_path(void); + extern const char *selinux_sepgsql_context_path(void); ++extern const char *selinux_systemd_contexts_path(void); + extern const char *selinux_contexts_path(void); + extern const char *selinux_securetty_types_path(void); + extern const char *selinux_booleans_subs_path(void); +diff --git a/libselinux/man/man3/security_compute_av.3 b/libselinux/man/man3/security_compute_av.3 +index c6837fc..de62d26 100644 +--- a/libselinux/man/man3/security_compute_av.3 ++++ b/libselinux/man/man3/security_compute_av.3 +@@ -37,9 +37,9 @@ the SELinux policy database in the kernel + .sp + .BI "int security_compute_user_raw(security_context_t "scon ", const char *" username ", security_context_t **" con ); + .sp +-.BI "int security_get_initial_context(const char *" name ", security_context_t " con ); ++.BI "int security_get_initial_context(const char *" name ", security_context_t *" con ); + .sp +-.BI "int security_get_initial_context_raw(const char *" name ", security_context_t " con ); ++.BI "int security_get_initial_context_raw(const char *" name ", security_context_t *" con ); + .sp + .BI "int selinux_check_access(const security_context_t " scon ", const security_context_t " tcon ", const char *" class ", const char *" perm ", void *" auditdata); + .sp +diff --git a/libselinux/man/man3/security_disable.3 b/libselinux/man/man3/security_disable.3 +index aeb78da..c75ce0d 100644 +--- a/libselinux/man/man3/security_disable.3 ++++ b/libselinux/man/man3/security_disable.3 +@@ -17,7 +17,7 @@ and then unmounts + This function can only be called at runtime and prior to the initial policy + load. After the initial policy load, the SELinux kernel code cannot be disabled, + but only placed in "permissive" mode by using +-.BR setenforce (1). ++.BR security_setenforce(3). + . + .SH "RETURN VALUE" + .BR security_disable () +@@ -27,4 +27,4 @@ returns zero on success or \-1 on error. + This manual page has been written by Guido Trentalancia + . + .SH "SEE ALSO" +-.BR selinux (8), " setenforce "(3) ++.BR selinux (8), " setenforce "(8) +diff --git a/libselinux/man/man3/security_load_policy.3 b/libselinux/man/man3/security_load_policy.3 +index c4439bf..af56163 100644 +--- a/libselinux/man/man3/security_load_policy.3 ++++ b/libselinux/man/man3/security_load_policy.3 +@@ -43,7 +43,7 @@ unmounted using a call to + .BR security_disable (3). + Therefore, after the initial policy load, the only operational changes + are those permitted by +-.BR setenforce (3) ++.BR security_setenforce (3) + (i.e. eventually setting the framework in permissive mode rather than + in enforcing one). + . +@@ -54,4 +54,4 @@ Returns zero on success or \-1 on error. + This manual page has been written by Guido Trentalancia + . + .SH "SEE ALSO" +-.BR selinux "(8), " security_disable "(3), " setenforce "(1) ++.BR selinux "(8), " security_disable "(3), " setenforce "(8) +diff --git a/libselinux/man/man3/selinux_binary_policy_path.3 b/libselinux/man/man3/selinux_binary_policy_path.3 +index ec97dcf..503c52c 100644 +--- a/libselinux/man/man3/selinux_binary_policy_path.3 ++++ b/libselinux/man/man3/selinux_binary_policy_path.3 +@@ -1,6 +1,6 @@ + .TH "selinux_binary_policy_path" "3" "15 November 2004" "dwalsh@redhat.com" "SELinux API Documentation" + .SH "NAME" +-selinux_path, selinux_policy_root, selinux_binary_policy_path, ++selinux_path, selinux_policy_root, selinux_binary_policy_path, selinux_current_policy_path, + selinux_failsafe_context_path, selinux_removable_context_path, + selinux_default_context_path, selinux_user_contexts_path, + selinux_file_context_path, selinux_media_context_path, +@@ -17,6 +17,8 @@ directories and files + .sp + .B const char *selinux_binary_policy_path(void); + .sp ++.B const char *selinux_current_policy_path(void); ++.sp + .B const char *selinux_failsafe_context_path(void); + .sp + .B const char *selinux_removable_context_path(void); +@@ -55,6 +57,9 @@ returns the top-level policy directory. + .BR selinux_binary_policy_path () + returns the binary policy file loaded into kernel. + .sp ++.BR selinux_current_policy_path () ++returns the currently loaded policy file from the kernel. ++.sp + .BR selinux_default_type_path () + returns the context file mapping roles to default types. + .sp +diff --git a/libselinux/man/man3/selinux_current_policy_path.3 b/libselinux/man/man3/selinux_current_policy_path.3 +new file mode 100644 +index 0000000..175a611 +--- /dev/null ++++ b/libselinux/man/man3/selinux_current_policy_path.3 +@@ -0,0 +1 @@ ++.so man3/selinux_binary_policy_path.3 +diff --git a/libselinux/man/man3/selinux_policy_root.3 b/libselinux/man/man3/selinux_policy_root.3 +index a6ccf86..63dc901 100644 +--- a/libselinux/man/man3/selinux_policy_root.3 ++++ b/libselinux/man/man3/selinux_policy_root.3 +@@ -1,21 +1,34 @@ + .TH "selinux_policy_root" "3" "25 May 2004" "dwalsh@redhat.com" "SELinux API documentation" + .SH "NAME" + selinux_policy_root \- return the path of the SELinux policy files for this machine ++selinux_set_policy_root \- Set an alternate SELinux root path for the SELinux policy files for this machine. + . + .SH "SYNOPSIS" + .B #include + .sp + .B const char *selinux_policy_root(void); + . ++.sp ++.B int selinux_set_policy_root(const char *policypath); ++. + .SH "DESCRIPTION" + .BR selinux_policy_root () + reads the contents of the + .I /etc/selinux/config + file to determine which policy files should be used for this machine. + . ++.BR selinux_set_policy_root () ++sets up all all policy paths based on the alternate root ++ ++.I /etc/selinux/config ++file to determine which policy files should be used for this machine. ++. + .SH "RETURN VALUE" +-On success, returns a directory path containing the SELinux policy files. +-On failure, NULL is returned. ++On success, selinux_policy_root returns a directory path containing the SELinux policy files. ++On failure, selinux_policy_root returns NULL. ++ ++On success, selinux_set_policy_root returns 0 on success -1 on failure. ++ + . + .SH "SEE ALSO" + .BR selinux "(8)" +diff --git a/libselinux/man/man3/selinux_set_policy_root.3 b/libselinux/man/man3/selinux_set_policy_root.3 +new file mode 100644 +index 0000000..8077658 +--- /dev/null ++++ b/libselinux/man/man3/selinux_set_policy_root.3 +@@ -0,0 +1 @@ ++.so man3/selinux_policy_root.3 +diff --git a/libselinux/man/man5/secolor.conf.5 b/libselinux/man/man5/secolor.conf.5 +deleted file mode 100644 +index b834577..0000000 +--- a/libselinux/man/man5/secolor.conf.5 ++++ /dev/null +@@ -1,178 +0,0 @@ +-.TH "secolor.conf" "5" "08 April 2011" "SELinux API documentation" +-.SH "NAME" +-secolor.conf \- The SELinux color configuration file +-. +-.SH "DESCRIPTION" +-This optional file controls the color to be associated to the context components associated to the +-.I raw +-context passed by +-.BR selinux_raw_context_to_color "(3)," +-when context related information is to be displayed in color by an SELinux-aware application. +-.sp +-.BR selinux_raw_context_to_color "(3)" +-obtains this color information from the active policy +-.B secolor.conf +-file as returned by +-.BR selinux_colors_path "(3)." +-. +-.SH "FILE FORMAT" +-The file format is as follows: +-.RS +-.B color +-.I color_name +-.BI "= #"color_mask +-.br +-[...] +-.sp +-.I context_component string +-.B = +-.I fg_color_name bg_color_name +-.br +-[...] +-.sp +-.RE +- +-Where: +-.br +-.B color +-.RS +-The color keyword. Each color entry is on a new line. +-.RE +-.I color_name +-.RS +-A single word name for the color (e.g. red). +-.RE +-.I color_mask +-.RS +-A color mask starting with a hash (#) that describes the hexadecimal RGB colors with black being #000000 and white being #ffffff. +-.RE +-.I context_component +-.RS +-The context component name that must be one of the following: +-.br +-.RS +-user, role, type or range +-.RE +-Each +-.IR context_component " " string " ..." +-entry is on a new line. +-.RE +-.I string +-.RS +-This is the +-.I context_component +-string that will be matched with the +-.I raw +-context component passed by +-.BR selinux_raw_context_to_color "(3)." +-.br +-A wildcard '*' may be used to match any undefined string for the user, role and type +-.I context_component +-entries only. +-.RE +- +-.I fg_color_name +-.RS +-The color_name string that will be used as the foreground color. +-A +-.I color_mask +-may also be used. +-.RE +-.I bg_color_name +-.RS +-The color_name string that will be used as the background color. +-A +-.I color_mask +-may also be used. +-.RE +-. +-.SH "EXAMPLES" +-Example 1 entries are: +-.RS +-color black = #000000 +-.br +-color green = #008000 +-.br +-color yellow = #ffff00 +-.br +-color blue = #0000ff +-.br +-color white = #ffffff +-.br +-color red = #ff0000 +-.br +-color orange = #ffa500 +-.br +-color tan = #D2B48C +-.sp +-user * = black white +-.br +-role * = white black +-.br +-type * = tan orange +-.br +-range s0\-s0:c0.c1023 = black green +-.br +-range s1\-s1:c0.c1023 = white green +-.br +-range s3\-s3:c0.c1023 = black tan +-.br +-range s5\-s5:c0.c1023 = white blue +-.br +-range s7\-s7:c0.c1023 = black red +-.br +-range s9\-s9:c0.c1023 = black orange +-.br +-range s15:c0.c1023 = black yellow +-.RE +- +-.sp +-Example 2 entries are: +-.RS +-color black = #000000 +-.br +-color green = #008000 +-.br +-color yellow = #ffff00 +-.br +-color blue = #0000ff +-.br +-color white = #ffffff +-.br +-color red = #ff0000 +-.br +-color orange = #ffa500 +-.br +-color tan = #d2b48c +-.sp +-user unconfined_u = #ff0000 green +-.br +-role unconfined_r = red #ffffff +-.br +-type unconfined_t = red orange +-.br +-user user_u = black green +-.br +-role user_r = white black +-.br +-type user_t = tan red +-.br +-user xguest_u = black yellow +-.br +-role xguest_r = black red +-.br +-type xguest_t = black green +-.br +-user sysadm_u = white black +-.br +-range s0:c0.c1023 = black white +-.br +-user * = black white +-.br +-role * = black white +-.br +-type * = black white +-.RE +-. +-.SH "SEE ALSO" +-.BR selinux "(8), " selinux_raw_context_to_color "(3), " selinux_colors_path "(3)" +diff --git a/libselinux/man/man8/getenforce.8 b/libselinux/man/man8/getenforce.8 +index 906279f..e0924d8 100644 +--- a/libselinux/man/man8/getenforce.8 ++++ b/libselinux/man/man8/getenforce.8 +@@ -1,4 +1,4 @@ +-.TH "getenforce" "1" "7 April 2004" "dwalsh@redhat.com" "SELinux Command Line documentation" ++.TH "getenforce" "8" "7 April 2004" "dwalsh@redhat.com" "SELinux Command Line documentation" + .SH "NAME" + getenforce \- get the current mode of SELinux + . +diff --git a/libselinux/man/man8/matchpathcon.8 b/libselinux/man/man8/matchpathcon.8 +index 368991f..5d60789 100644 +--- a/libselinux/man/man8/matchpathcon.8 ++++ b/libselinux/man/man8/matchpathcon.8 +@@ -13,6 +13,8 @@ matchpathcon \- get the default SELinux security context for the specified path + .IR file_contexts_file ] + .RB [ \-p + .IR prefix ] ++.RB [ \-P ++.IR policy_root_path ] + .I filepath... + . + .SH "DESCRIPTION" +@@ -46,6 +48,9 @@ Use alternate file_context file + .BI \-p " prefix" + Use prefix to speed translations + .TP ++.BI \-P " policy_root_path" ++Use alternate policy root path ++.TP + .B \-V + Verify file context on disk matches defaults + . +diff --git a/libselinux/man/man8/sefcontext_compile.8 b/libselinux/man/man8/sefcontext_compile.8 +new file mode 100644 +index 0000000..c37ed4a +--- /dev/null ++++ b/libselinux/man/man8/sefcontext_compile.8 +@@ -0,0 +1,19 @@ ++.TH "sefcontext_compile" "8" "27 Jun 2013" "dwalsh@redhat.com" "SELinux Command Line documentation" ++.SH "NAME" ++sefcontext_compile \- compile file context regular expression files ++. ++.SH "SYNOPSIS" ++.B sefcontext_compile inputfile ++. ++.SH "DESCRIPTION" ++sefcontext_compile is used libsemanage to compile file context regular expressions into prce format. sefcontext_compile writes the compiled prce file with the .bin suffix appended "inputfile".bin. This compiled file is used by libselinux file labeling functions. ++ ++.SH "EXAMPLE" ++sefcontext_compile /etc/selinux/targeted/contexts/files/file_contexts ++. ++.SH AUTHOR ++Dan Walsh, ++. ++.SH "SEE ALSO" ++.BR selinux (8), ++.BR semanage (8), +diff --git a/libselinux/man/man8/selinux.8 b/libselinux/man/man8/selinux.8 +index a328866..50868e4 100644 +--- a/libselinux/man/man8/selinux.8 ++++ b/libselinux/man/man8/selinux.8 +@@ -37,20 +37,22 @@ The + configuration file also controls what policy + is active on the system. SELinux allows for multiple policies to be + installed on the system, but only one policy may be active at any +-given time. At present, two kinds of SELinux policy exist: targeted +-and strict. The targeted policy is designed as a policy where most +-processes operate without restrictions, and only specific services are ++given time. At present, multiple kinds of SELinux policy exist: targeted, ++mls for example. The targeted policy is designed as a policy where most ++user processes operate without restrictions, and only specific services are + placed into distinct security domains that are confined by the policy. + For example, the user would run in a completely unconfined domain + while the named daemon or apache daemon would run in a specific domain +-tailored to its operation. The strict policy is designed as a policy +-where all processes are partitioned into fine-grained security domains +-and confined by policy. It is anticipated in the future that other +-policies will be created (Multi-Level Security for example). You can ++tailored to its operation. The MLS (Multi-Level Security) policy is designed ++as a policy where all processes are partitioned into fine-grained security ++domains and confined by policy. MLS also supports the Bell And LaPadula model, where processes are not only confined by the type but also the level of the data. ++ ++You can + define which policy you will run by setting the + .B SELINUXTYPE + environment variable within + .IR /etc/selinux/config . ++You must reboot and possibly relabel if you change the policy type to have it take effect on the system. + The corresponding + policy configuration for each such policy must be installed in the + .I /etc/selinux/{SELINUXTYPE}/ +@@ -58,7 +60,7 @@ directories. + + A given SELinux policy can be customized further based on a set of + compile-time tunable options and a set of runtime policy booleans. +-.B \%system\-config\-securitylevel ++.B \%system\-config\-selinux + allows customization of these booleans and tunables. + + Many domains that are protected by SELinux also include SELinux man pages explaining how to customize their policy. +@@ -86,11 +88,13 @@ This manual page was written by Dan Walsh . + .nh + .BR booleans (8), + .BR setsebool (8), +-.BR selinuxenabled (8), ++.BR sepolicy (8), ++.BR system-config-selinux (8), + .BR togglesebool (8), + .BR restorecon (8), ++.BR fixfiles (8), + .BR setfiles (8), +-.BR semange (8), ++.BR semanage (8), + .BR sepolicy(8) + + Every confined service on the system has a man page in the following format: +diff --git a/libselinux/man/man8/selinuxenabled.8 b/libselinux/man/man8/selinuxenabled.8 +index e0b5201..ac20587 100644 +--- a/libselinux/man/man8/selinuxenabled.8 ++++ b/libselinux/man/man8/selinuxenabled.8 +@@ -1,4 +1,4 @@ +-.TH "selinuxenabled" "1" "7 April 2004" "dwalsh@redhat.com" "SELinux Command Line documentation" ++.TH "selinuxenabled" "8" "7 April 2004" "dwalsh@redhat.com" "SELinux Command Line documentation" + .SH "NAME" + selinuxenabled \- tool to be used within shell scripts to determine if selinux is enabled + . +diff --git a/libselinux/man/man8/selinuxexeccon.8 b/libselinux/man/man8/selinuxexeccon.8 +index 765cf8c..30c20ed 100644 +--- a/libselinux/man/man8/selinuxexeccon.8 ++++ b/libselinux/man/man8/selinuxexeccon.8 +@@ -1,4 +1,4 @@ +-.TH "selinuxexeccon" "1" "14 May 2011" "dwalsh@redhat.com" "SELinux Command Line documentation" ++.TH "selinuxexeccon" "8" "14 May 2011" "dwalsh@redhat.com" "SELinux Command Line documentation" + .SH "NAME" + selinuxexeccon \- report SELinux context used for this executable + . +diff --git a/libselinux/man/man8/setenforce.8 b/libselinux/man/man8/setenforce.8 +index b038da0..8a24f1c 100644 +--- a/libselinux/man/man8/setenforce.8 ++++ b/libselinux/man/man8/setenforce.8 +@@ -1,4 +1,4 @@ +-.TH "setenforce" "1" "7 April 2004" "dwalsh@redhat.com" "SELinux Command Line documentation" ++.TH "setenforce" "8" "7 April 2004" "dwalsh@redhat.com" "SELinux Command Line documentation" + .SH "NAME" + setenforce \- modify the mode SELinux is running in + . +diff --git a/libselinux/man/man8/togglesebool.8 b/libselinux/man/man8/togglesebool.8 +index 948aff1..598dc94 100644 +--- a/libselinux/man/man8/togglesebool.8 ++++ b/libselinux/man/man8/togglesebool.8 +@@ -1,4 +1,4 @@ +-.TH "togglesebool" "1" "26 Oct 2004" "sgrubb@redhat.com" "SELinux Command Line documentation" ++.TH "togglesebool" "8" "26 Oct 2004" "sgrubb@redhat.com" "SELinux Command Line documentation" + .SH "NAME" + togglesebool \- flip the current value of a SELinux boolean + . +diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile +index c4f5d4c..310177b 100644 +--- a/libselinux/src/Makefile ++++ b/libselinux/src/Makefile +@@ -18,9 +18,7 @@ RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")' + RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM') + RUBYINC ?= $(shell pkg-config --cflags ruby) + RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) +-LIBBASE=$(shell basename $(LIBDIR)) +- +-LDFLAGS ?= -lpcre -lpthread ++LIBBASE ?= $(shell basename $(LIBDIR)) + + VERSION = $(shell cat ../VERSION) + LIBVERSION = 1 +@@ -116,7 +114,7 @@ $(LIBA): $(OBJS) + $(RANLIB) $@ + + $(LIBSO): $(LOBJS) +- $(CC) $(CFLAGS) -shared -o $@ $^ -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro ++ $(CC) $(CFLAGS) -shared -o $@ $^ -lpcre -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro + ln -sf $@ $(TARGET) + + $(LIBPC): $(LIBPC).in ../VERSION +diff --git a/libselinux/src/audit2why.c b/libselinux/src/audit2why.c +index ffe381b..560bc25 100644 +--- a/libselinux/src/audit2why.c ++++ b/libselinux/src/audit2why.c +@@ -210,27 +210,12 @@ static int __policy_init(const char *init_path) + return 1; + } + } else { +- vers = sepol_policy_kern_vers_max(); +- if (vers < 0) { +- snprintf(errormsg, sizeof(errormsg), +- "Could not get policy version: %s\n", +- strerror(errno)); +- PyErr_SetString( PyExc_ValueError, errormsg); +- return 1; +- } +- snprintf(path, PATH_MAX, "%s.%d", +- selinux_binary_policy_path(), vers); +- fp = fopen(path, "r"); +- while (!fp && errno == ENOENT && --vers) { +- snprintf(path, PATH_MAX, "%s.%d", +- selinux_binary_policy_path(), vers); +- fp = fopen(path, "r"); +- } ++ fp = fopen(selinux_current_policy_path(), "r"); + if (!fp) { + snprintf(errormsg, sizeof(errormsg), +- "unable to open %s.%d: %s\n", +- selinux_binary_policy_path(), +- security_policyvers(), strerror(errno)); ++ "unable to open %s: %s\n", ++ selinux_current_policy_path(), ++ strerror(errno)); + PyErr_SetString( PyExc_ValueError, errormsg); + return 1; + } +@@ -310,10 +295,12 @@ static PyObject *init(PyObject *self __attribute__((unused)), PyObject *args) { + } + + #define RETURN(X) \ +- PyTuple_SetItem(result, 0, Py_BuildValue("i", X)); \ +- return result; ++ { \ ++ return Py_BuildValue("iO", (X), Py_None); \ ++ } + + static PyObject *analyze(PyObject *self __attribute__((unused)) , PyObject *args) { ++ char *reason_buf = NULL; + security_context_t scon; + security_context_t tcon; + char *tclassstr; +@@ -328,10 +315,6 @@ static PyObject *analyze(PyObject *self __attribute__((unused)) , PyObject *args + struct sepol_av_decision avd; + int rc; + int i=0; +- PyObject *result = PyTuple_New(2); +- if (!result) return NULL; +- Py_INCREF(Py_None); +- PyTuple_SetItem(result, 1, Py_None); + + if (!PyArg_ParseTuple(args,(char *)"sssO!:audit2why",&scon,&tcon,&tclassstr,&PyList_Type, &listObj)) + return NULL; +@@ -342,22 +325,21 @@ static PyObject *analyze(PyObject *self __attribute__((unused)) , PyObject *args + /* should raise an error here. */ + if (numlines < 0) return NULL; /* Not a list */ + +- if (!avc) { ++ if (!avc) + RETURN(NOPOLICY) +- } + + rc = sepol_context_to_sid(scon, strlen(scon) + 1, &ssid); +- if (rc < 0) { ++ if (rc < 0) + RETURN(BADSCON) +- } ++ + rc = sepol_context_to_sid(tcon, strlen(tcon) + 1, &tsid); +- if (rc < 0) { ++ if (rc < 0) + RETURN(BADTCON) +- } ++ + tclass = string_to_security_class(tclassstr); +- if (!tclass) { ++ if (!tclass) + RETURN(BADTCLASS) +- } ++ + /* Convert the permission list to an AV. */ + av = 0; + +@@ -377,21 +359,20 @@ static PyObject *analyze(PyObject *self __attribute__((unused)) , PyObject *args + #endif + + perm = string_to_av_perm(tclass, permstr); +- if (!perm) { ++ if (!perm) + RETURN(BADPERM) +- } ++ + av |= perm; + } + + /* Reproduce the computation. */ +- rc = sepol_compute_av_reason(ssid, tsid, tclass, av, &avd, &reason); +- if (rc < 0) { ++ rc = sepol_compute_av_reason_buffer(ssid, tsid, tclass, av, &avd, &reason, &reason_buf, 0); ++ if (rc < 0) + RETURN(BADCOMPUTE) +- } + +- if (!reason) { ++ if (!reason) + RETURN(ALLOW) +- } ++ + if (reason & SEPOL_COMPUTEAV_TE) { + avc->ssid = ssid; + avc->tsid = tsid; +@@ -404,28 +385,34 @@ static PyObject *analyze(PyObject *self __attribute__((unused)) , PyObject *args + RETURN(TERULE) + } + } else { +- PyTuple_SetItem(result, 0, Py_BuildValue("i", BOOLEAN)); ++ PyObject *outboollist; + struct boolean_t *b = bools; + int len=0; + while (b->name) { + len++; b++; + } + b = bools; +- PyObject *outboollist = PyTuple_New(len); ++ outboollist = PyList_New(len); + len=0; + while(b->name) { +- PyObject *bool = Py_BuildValue("(si)", b->name, b->active); +- PyTuple_SetItem(outboollist, len++, bool); ++ PyObject *bool_ = Py_BuildValue("(si)", b->name, b->active); ++ PyList_SetItem(outboollist, len++, bool_); + b++; + } + free(bools); +- PyTuple_SetItem(result, 1, outboollist); +- return result; ++ /* 'N' steals the reference to outboollist */ ++ return Py_BuildValue("iN", BOOLEAN, outboollist); + } + } + + if (reason & SEPOL_COMPUTEAV_CONS) { +- RETURN(CONSTRAINT); ++ if (reason_buf) { ++ PyObject *result = NULL; ++ result = Py_BuildValue("is", CONSTRAINT, reason_buf); ++ free(reason_buf); ++ return result; ++ } ++ RETURN(CONSTRAINT) + } + + if (reason & SEPOL_COMPUTEAV_RBAC) +diff --git a/libselinux/src/avc.c b/libselinux/src/avc.c +index 802a07f..6ff83a7 100644 +--- a/libselinux/src/avc.c ++++ b/libselinux/src/avc.c +@@ -827,6 +827,7 @@ int avc_has_perm(security_id_t ssid, security_id_t tsid, + errsave = errno; + avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata); + errno = errsave; ++ if (!avc_enforcing) return 0; + return rc; + } + +diff --git a/libselinux/src/file_path_suffixes.h b/libselinux/src/file_path_suffixes.h +index d11c8dc..3c92424 100644 +--- a/libselinux/src/file_path_suffixes.h ++++ b/libselinux/src/file_path_suffixes.h +@@ -23,6 +23,7 @@ S_(BINPOLICY, "/policy/policy") + S_(VIRTUAL_DOMAIN, "/contexts/virtual_domain_context") + S_(VIRTUAL_IMAGE, "/contexts/virtual_image_context") + S_(LXC_CONTEXTS, "/contexts/lxc_contexts") ++ S_(SYSTEMD_CONTEXTS, "/contexts/systemd_contexts") + S_(FILE_CONTEXT_SUBS, "/contexts/files/file_contexts.subs") + S_(FILE_CONTEXT_SUBS_DIST, "/contexts/files/file_contexts.subs_dist") + S_(SEPGSQL_CONTEXTS, "/contexts/sepgsql_contexts") +diff --git a/libselinux/src/fsetfilecon.c b/libselinux/src/fsetfilecon.c +index 309105c..0e9278e 100644 +--- a/libselinux/src/fsetfilecon.c ++++ b/libselinux/src/fsetfilecon.c +@@ -9,8 +9,20 @@ + + int fsetfilecon_raw(int fd, const security_context_t context) + { +- return fsetxattr(fd, XATTR_NAME_SELINUX, context, strlen(context) + 1, ++ int rc = fsetxattr(fd, XATTR_NAME_SELINUX, context, strlen(context) + 1, + 0); ++ if (rc < 0 && errno == ENOTSUP) { ++ security_context_t ccontext = NULL; ++ int err = errno; ++ if ((fgetfilecon_raw(fd, &ccontext) >= 0) && ++ (strcmp(context,ccontext) == 0)) { ++ rc = 0; ++ } else { ++ errno = err; ++ } ++ freecon(ccontext); ++ } ++ return rc; + } + + hidden_def(fsetfilecon_raw) +diff --git a/libselinux/src/get_context_list.c b/libselinux/src/get_context_list.c +index b9e8002..1d91123 100644 +--- a/libselinux/src/get_context_list.c ++++ b/libselinux/src/get_context_list.c +@@ -426,7 +426,7 @@ int get_ordered_context_list(const char *user, + /* Initialize ordering array. */ + ordering = malloc(nreach * sizeof(unsigned int)); + if (!ordering) +- goto oom_order; ++ goto failsafe; + for (i = 0; i < nreach; i++) + ordering[i] = nreach; + +@@ -435,7 +435,7 @@ int get_ordered_context_list(const char *user, + fname_len = strlen(user_contexts_path) + strlen(user) + 2; + fname = malloc(fname_len); + if (!fname) +- goto oom_order; ++ goto failsafe; + snprintf(fname, fname_len, "%s%s", user_contexts_path, user); + fp = fopen(fname, "r"); + if (fp) { +@@ -463,33 +463,31 @@ int get_ordered_context_list(const char *user, + __FUNCTION__, selinux_default_context_path()); + /* Fall through */ + } ++ rc = 0; + } + ++ if (!nordered) ++ goto failsafe; ++ + /* Apply the ordering. */ +- if (nordered) { +- co = malloc(nreach * sizeof(struct context_order)); +- if (!co) +- goto oom_order; +- for (i = 0; i < nreach; i++) { +- co[i].con = reachable[i]; +- co[i].order = ordering[i]; +- } +- qsort(co, nreach, sizeof(struct context_order), order_compare); +- for (i = 0; i < nreach; i++) +- reachable[i] = co[i].con; +- free(co); ++ co = malloc(nreach * sizeof(struct context_order)); ++ if (!co) ++ goto failsafe; ++ for (i = 0; i < nreach; i++) { ++ co[i].con = reachable[i]; ++ co[i].order = ordering[i]; + } ++ qsort(co, nreach, sizeof(struct context_order), order_compare); ++ for (i = 0; i < nreach; i++) ++ reachable[i] = co[i].con; ++ free(co); + +- /* Return the ordered list. +- If we successfully ordered it, then only report the ordered entries +- to the caller. Otherwise, fall back to the entire reachable list. */ +- if (nordered && nordered < nreach) { ++ /* Only report the ordered entries to the caller. */ ++ if (nordered <= nreach) { + for (i = nordered; i < nreach; i++) + free(reachable[i]); + reachable[nordered] = NULL; + rc = nordered; +- } else { +- rc = nreach; + } + + out: +@@ -523,14 +521,6 @@ int get_ordered_context_list(const char *user, + } + rc = 1; /* one context in the list */ + goto out; +- +- oom_order: +- /* Unable to order context list due to OOM condition. +- Fall back to unordered reachable context list. */ +- fprintf(stderr, "%s: out of memory, unable to order list\n", +- __FUNCTION__); +- rc = nreach; +- goto out; + } + + hidden_def(get_ordered_context_list) +diff --git a/libselinux/src/label.c b/libselinux/src/label.c +index 11f6e96..b6b3639 100644 +--- a/libselinux/src/label.c ++++ b/libselinux/src/label.c +@@ -43,12 +43,18 @@ static void selabel_subs_fini(struct selabel_sub *ptr) + static char *selabel_sub(struct selabel_sub *ptr, const char *src) + { + char *dst = NULL; ++ int len; + + while (ptr) { + if (strncmp(src, ptr->src, ptr->slen) == 0 ) { + if (src[ptr->slen] == '/' || + src[ptr->slen] == 0) { +- if (asprintf(&dst, "%s%s", ptr->dst, &src[ptr->slen]) < 0) ++ if ((src[ptr->slen] == '/') && ++ (strcmp(ptr->dst, "/") == 0)) ++ len = ptr->slen + 1; ++ else ++ len = ptr->slen; ++ if (asprintf(&dst, "%s%s", ptr->dst, &src[len]) < 0) + return NULL; + return dst; + } +@@ -58,7 +64,7 @@ static char *selabel_sub(struct selabel_sub *ptr, const char *src) + return NULL; + } + +-struct selabel_sub *selabel_subs_init(const char *path,struct selabel_sub *list) ++struct selabel_sub *selabel_subs_init(const char *path, struct selabel_sub *list) + { + char buf[1024]; + FILE *cfg = fopen(path, "r"); +@@ -171,6 +177,7 @@ struct selabel_handle *selabel_open(unsigned int backend, + rec->validating = selabel_is_validate_set(opts, nopts); + + rec->subs = NULL; ++ rec->dist_subs = NULL; + + if ((*initfuncs[backend])(rec, opts, nopts)) { + free(rec); +@@ -186,13 +193,24 @@ selabel_lookup_common(struct selabel_handle *rec, int translating, + const char *key, int type) + { + struct selabel_lookup_rec *lr; ++ char *ptr = NULL; ++ char *dptr = NULL; + + if (key == NULL) { + errno = EINVAL; + return NULL; + } + +- char *ptr = selabel_sub(rec->subs, key); ++ ptr = selabel_sub(rec->subs, key); ++ if (ptr) { ++ dptr = selabel_sub(rec->dist_subs, ptr); ++ if (dptr) { ++ free(ptr); ++ ptr = dptr; ++ } ++ } else { ++ ptr = selabel_sub(rec->dist_subs, key); ++ } + if (ptr) { + lr = rec->func_lookup(rec, ptr, type); + free(ptr); +diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c +index 5f697f3..c424a21 100644 +--- a/libselinux/src/label_file.c ++++ b/libselinux/src/label_file.c +@@ -496,12 +496,12 @@ static int init(struct selabel_handle *rec, struct selinux_opt *opts, + + /* Process local and distribution substitution files */ + if (!path) { +- rec->subs = selabel_subs_init(selinux_file_context_subs_dist_path(), rec->subs); ++ rec->dist_subs = selabel_subs_init(selinux_file_context_subs_dist_path(), rec->dist_subs); + rec->subs = selabel_subs_init(selinux_file_context_subs_path(), rec->subs); + path = selinux_file_context_path(); + } else { + snprintf(subs_file, sizeof(subs_file), "%s.subs_dist", path); +- rec->subs = selabel_subs_init(subs_file, rec->subs); ++ rec->dist_subs = selabel_subs_init(subs_file, rec->dist_subs); + snprintf(subs_file, sizeof(subs_file), "%s.subs", path); + rec->subs = selabel_subs_init(subs_file, rec->subs); + } +@@ -649,6 +649,8 @@ static struct selabel_lookup_rec *lookup(struct selabel_handle *rec, + break; + } else if (rc == PCRE_ERROR_NOMATCH) + continue; ++ ++ errno = ENOENT; + /* else it's an error */ + goto finish; + } +@@ -660,6 +662,7 @@ static struct selabel_lookup_rec *lookup(struct selabel_handle *rec, + goto finish; + } + ++ errno = 0; + ret = &spec_arr[i].lr; + + finish: +diff --git a/libselinux/src/label_internal.h b/libselinux/src/label_internal.h +index 435ecf2..b6ae140 100644 +--- a/libselinux/src/label_internal.h ++++ b/libselinux/src/label_internal.h +@@ -68,6 +68,7 @@ struct selabel_handle { + char *spec_file; + + /* substitution support */ ++ struct selabel_sub *dist_subs; + struct selabel_sub *subs; + }; + +diff --git a/libselinux/src/lsetfilecon.c b/libselinux/src/lsetfilecon.c +index 461e3f7..ab85155 100644 +--- a/libselinux/src/lsetfilecon.c ++++ b/libselinux/src/lsetfilecon.c +@@ -9,8 +9,20 @@ + + int lsetfilecon_raw(const char *path, const security_context_t context) + { +- return lsetxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1, ++ int rc = lsetxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1, + 0); ++ if (rc < 0 && errno == ENOTSUP) { ++ security_context_t ccontext = NULL; ++ int err = errno; ++ if ((lgetfilecon_raw(path, &ccontext) >= 0) && ++ (strcmp(context,ccontext) == 0)) { ++ rc = 0; ++ } else { ++ errno = err; ++ } ++ freecon(ccontext); ++ } ++ return rc; + } + + hidden_def(lsetfilecon_raw) +diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c +index 2d7369e..2a00807 100644 +--- a/libselinux/src/matchpathcon.c ++++ b/libselinux/src/matchpathcon.c +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include "selinux_internal.h" + #include "label_internal.h" + #include "callbacks.h" +@@ -62,7 +63,7 @@ static void + { + va_list ap; + va_start(ap, fmt); +- vfprintf(stderr, fmt, ap); ++ vsyslog(LOG_ERR, fmt, ap); + va_end(ap); + } + +diff --git a/libselinux/src/procattr.c b/libselinux/src/procattr.c +index 6c5b45a..ecaccc6 100644 +--- a/libselinux/src/procattr.c ++++ b/libselinux/src/procattr.c +@@ -9,19 +9,30 @@ + #include "selinux_internal.h" + #include "policy.h" + ++#define UNSET (const security_context_t) -1 ++ + static __thread pid_t cpid; + static __thread pid_t tid; +-static __thread security_context_t prev_current; +-static __thread security_context_t prev_exec; +-static __thread security_context_t prev_fscreate; +-static __thread security_context_t prev_keycreate; +-static __thread security_context_t prev_sockcreate; ++static __thread security_context_t prev_current = UNSET; ++static __thread security_context_t prev_exec = UNSET; ++static __thread security_context_t prev_fscreate = UNSET; ++static __thread security_context_t prev_keycreate = UNSET; ++static __thread security_context_t prev_sockcreate = UNSET; + + static pthread_once_t once = PTHREAD_ONCE_INIT; + static pthread_key_t destructor_key; + static int destructor_key_initialized = 0; + static __thread char destructor_initialized; + ++extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden"))); ++extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *); ++ ++static int __selinux_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void)) ++{ ++ return __register_atfork (prepare, parent, child, ++ &__dso_handle == NULL ? NULL : __dso_handle); ++} ++ + static pid_t gettid(void) + { + return syscall(__NR_gettid); +@@ -29,11 +40,16 @@ static pid_t gettid(void) + + static void procattr_thread_destructor(void __attribute__((unused)) *unused) + { +- free(prev_current); +- free(prev_exec); +- free(prev_fscreate); +- free(prev_keycreate); +- free(prev_sockcreate); ++ if (prev_current != UNSET) ++ free(prev_current); ++ if (prev_exec != UNSET) ++ free(prev_exec); ++ if (prev_fscreate != UNSET) ++ free(prev_fscreate); ++ if (prev_keycreate != UNSET) ++ free(prev_keycreate); ++ if (prev_sockcreate != UNSET) ++ free(prev_sockcreate); + } + + static void free_procattr(void) +@@ -41,7 +57,7 @@ static void free_procattr(void) + procattr_thread_destructor(NULL); + tid = 0; + cpid = getpid(); +- prev_current = prev_exec = prev_fscreate = prev_keycreate = prev_sockcreate = NULL; ++ prev_current = prev_exec = prev_fscreate = prev_keycreate = prev_sockcreate = UNSET; + } + + void __attribute__((destructor)) procattr_destructor(void); +@@ -63,7 +79,7 @@ static inline void init_thread_destructor(void) + static void init_procattr(void) + { + if (__selinux_key_create(&destructor_key, procattr_thread_destructor) == 0) { +- pthread_atfork(NULL, NULL, free_procattr); ++ __selinux_atfork(NULL, NULL, free_procattr); + destructor_key_initialized = 1; + } + } +@@ -131,7 +147,7 @@ static int getprocattrcon_raw(security_context_t * context, + return -1; + }; + +- if (prev_context) { ++ if (prev_context && prev_context != UNSET) { + *context = strdup(prev_context); + if (!(*context)) { + return -1; +@@ -230,7 +246,8 @@ static int setprocattrcon_raw(security_context_t context, + + if (!context && !*prev_context) + return 0; +- if (context && *prev_context && !strcmp(context, *prev_context)) ++ if (context && *prev_context && *prev_context != UNSET ++ && !strcmp(context, *prev_context)) + return 0; + + fd = openattr(pid, attr, O_RDWR); +@@ -257,6 +274,8 @@ out: + free(context); + return -1; + } else { ++ if (*prev_context != UNSET) ++ free(*prev_context); + *prev_context = context; + return 0; + } +diff --git a/libselinux/src/selinux_config.c b/libselinux/src/selinux_config.c +index 296f357..2cd6d54 100644 +--- a/libselinux/src/selinux_config.c ++++ b/libselinux/src/selinux_config.c +@@ -8,6 +8,8 @@ + #include + #include + #include ++#include ++#include "policy.h" + #include "selinux_internal.h" + #include "get_default_type_internal.h" + +@@ -48,7 +50,8 @@ + #define FILE_CONTEXT_SUBS_DIST 25 + #define LXC_CONTEXTS 26 + #define BOOLEAN_SUBS 27 +-#define NEL 28 ++#define SYSTEMD_CONTEXTS 28 ++#define NEL 29 + + /* Part of one-time lazy init */ + static pthread_once_t once = PTHREAD_ONCE_INIT; +@@ -138,6 +141,13 @@ int selinux_getpolicytype(char **type) + + hidden_def(selinux_getpolicytype) + ++static int setpolicytype(const char *type) ++{ ++ free(selinux_policytype); ++ selinux_policytype = strdup(type); ++ return selinux_policytype ? 0 : -1; ++} ++ + static char *selinux_policyroot = NULL; + static const char *selinux_rootpath = SELINUXDIR; + +@@ -261,6 +271,37 @@ const char *selinux_policy_root(void) + return selinux_policyroot; + } + ++int selinux_set_policy_root(const char *path) ++{ ++ int i; ++ char *policy_type = strrchr(path, '/'); ++ if (!policy_type) { ++ errno = EINVAL; ++ return -1; ++ } ++ policy_type++; ++ ++ fini_selinuxmnt(); ++ fini_selinux_policyroot(); ++ ++ selinux_policyroot = strdup(path); ++ if (! selinux_policyroot) ++ return -1; ++ ++ if (setpolicytype(policy_type) != 0) ++ return -1; ++ ++ for (i = 0; i < NEL; i++) ++ if (asprintf(&file_paths[i], "%s%s", ++ selinux_policyroot, ++ file_path_suffixes_data.str + ++ file_path_suffixes_idx[i]) ++ == -1) ++ return -1; ++ ++ return 0; ++} ++ + const char *selinux_path(void) + { + return selinux_rootpath; +@@ -303,6 +344,31 @@ const char *selinux_binary_policy_path(void) + + hidden_def(selinux_binary_policy_path) + ++const char *selinux_current_policy_path(void) ++{ ++ int rc = 0; ++ int vers = 0; ++ static char policy_path[PATH_MAX]; ++ ++ if (selinux_mnt) { ++ snprintf(policy_path, sizeof(policy_path), "%s/policy", selinux_mnt); ++ if (access(policy_path, F_OK) == 0 ) { ++ return policy_path; ++ } ++ } ++ vers = security_policyvers(); ++ do { ++ /* Check prior versions to see if old policy is available */ ++ snprintf(policy_path, sizeof(policy_path), "%s.%d", ++ selinux_binary_policy_path(), vers); ++ } while ((rc = access(policy_path, F_OK)) && --vers > 0); ++ ++ if (rc) return NULL; ++ return policy_path; ++} ++ ++hidden_def(selinux_current_policy_path) ++ + const char *selinux_file_context_path(void) + { + return get_path(FILE_CONTEXTS); +@@ -427,6 +493,13 @@ const char *selinux_lxc_contexts_path(void) + + hidden_def(selinux_lxc_contexts_path) + ++const char *selinux_systemd_contexts_path(void) ++{ ++ return get_path(SYSTEMD_CONTEXTS); ++} ++ ++hidden_def(selinux_systemd_contexts_path) ++ + const char * selinux_booleans_subs_path(void) { + return get_path(BOOLEAN_SUBS); + } +diff --git a/libselinux/src/selinux_internal.h b/libselinux/src/selinux_internal.h +index 2c7c85c..afb2170 100644 +--- a/libselinux/src/selinux_internal.h ++++ b/libselinux/src/selinux_internal.h +@@ -60,6 +60,7 @@ hidden_proto(selinux_mkload_policy) + hidden_proto(security_setenforce) + hidden_proto(security_deny_unknown) + hidden_proto(selinux_boolean_sub) ++ hidden_proto(selinux_current_policy_path) + hidden_proto(selinux_binary_policy_path) + hidden_proto(selinux_booleans_subs_path) + hidden_proto(selinux_default_context_path) +@@ -82,6 +83,7 @@ hidden_proto(selinux_mkload_policy) + hidden_proto(selinux_media_context_path) + hidden_proto(selinux_x_context_path) + hidden_proto(selinux_sepgsql_context_path) ++ hidden_proto(selinux_systemd_contexts_path) + hidden_proto(selinux_path) + hidden_proto(selinux_check_passwd_access) + hidden_proto(selinux_check_securetty_context) +diff --git a/libselinux/src/selinuxswig_python.i b/libselinux/src/selinuxswig_python.i +index 359bd02..9884454 100644 +--- a/libselinux/src/selinuxswig_python.i ++++ b/libselinux/src/selinuxswig_python.i +@@ -10,6 +10,10 @@ + + import shutil, os, stat + ++DISABLED = -1 ++PERMISSIVE = 0 ++ENFORCING = 1 ++ + def restorecon(path, recursive=False): + """ Restore SELinux context on a given path """ + +@@ -74,6 +78,10 @@ def install(src, dest): + $1 = &temp; + } + ++%typemap(in, numinputs=0) void *(char *temp=NULL) { ++ $1 = temp; ++} ++ + /* Makes security_compute_user() return a Python list of contexts */ + %typemap(argout) (security_context_t **con) { + PyObject* plist; +diff --git a/libselinux/src/setfilecon.c b/libselinux/src/setfilecon.c +index 7465c6a..9aaaa4b 100644 +--- a/libselinux/src/setfilecon.c ++++ b/libselinux/src/setfilecon.c +@@ -9,8 +9,20 @@ + + int setfilecon_raw(const char *path, const security_context_t context) + { +- return setxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1, ++ int rc = setxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1, + 0); ++ if (rc < 0 && errno == ENOTSUP) { ++ security_context_t ccontext = NULL; ++ int err = errno; ++ if ((getfilecon_raw(path, &ccontext) >= 0) && ++ (strcmp(context,ccontext) == 0)) { ++ rc = 0; ++ } else { ++ errno = err; ++ } ++ freecon(ccontext); ++ } ++ return rc; + } + + hidden_def(setfilecon_raw) +diff --git a/libselinux/src/setrans_client.c b/libselinux/src/setrans_client.c +index f9065bd..4ab7c2a 100644 +--- a/libselinux/src/setrans_client.c ++++ b/libselinux/src/setrans_client.c +@@ -249,12 +249,12 @@ out: + + static void setrans_thread_destructor(void __attribute__((unused)) *unused) + { +- free(prev_t2r_trans); +- free(prev_t2r_raw); +- free(prev_r2t_trans); +- free(prev_r2t_raw); +- free(prev_r2c_trans); +- free(prev_r2c_raw); ++ free(prev_t2r_trans); prev_t2r_trans = NULL; ++ free(prev_t2r_raw); prev_t2r_raw = NULL; ++ free(prev_r2t_trans); prev_r2t_trans = NULL; ++ free(prev_r2t_raw); prev_r2t_raw = NULL; ++ free(prev_r2c_trans); prev_r2c_trans = NULL; ++ free(prev_r2c_raw); prev_r2c_raw = NULL; + } + + void __attribute__((destructor)) setrans_lib_destructor(void); +@@ -267,6 +267,7 @@ void hidden __attribute__((destructor)) setrans_lib_destructor(void) + + static inline void init_thread_destructor(void) + { ++ setrans_thread_destructor(NULL); + if (destructor_initialized == 0) { + __selinux_setspecific(destructor_key, (void *)1); + destructor_initialized = 1; +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/utils/matchpathcon.c b/libselinux/utils/matchpathcon.c +index dd5aaa3..9d3ff3a 100644 +--- a/libselinux/utils/matchpathcon.c ++++ b/libselinux/utils/matchpathcon.c +@@ -12,11 +12,10 @@ + #include + #include + +- + static void usage(const char *progname) + { + fprintf(stderr, +- "usage: %s [-N] [-n] [-f file_contexts] [-p prefix] [-Vq] path...\n", ++ "usage: %s [-N] [-n] [-f file_contexts] [ -P policy_root_path ] [-p prefix] [-Vq] path...\n", + progname); + exit(1); + } +@@ -78,7 +77,7 @@ int main(int argc, char **argv) + if (argc < 2) + usage(argv[0]); + +- while ((opt = getopt(argc, argv, "m:Nnf:p:Vq")) > 0) { ++ while ((opt = getopt(argc, argv, "m:Nnf:P:p:Vq")) > 0) { + switch (opt) { + case 'n': + header = 0; +@@ -113,6 +112,15 @@ int main(int argc, char **argv) + exit(1); + } + break; ++ case 'P': ++ if (selinux_set_policy_root(optarg) < 0 ) { ++ fprintf(stderr, ++ "Error setting policy root %s: %s\n", ++ optarg, ++ errno ? strerror(errno) : "invalid"); ++ exit(1); ++ } ++ break; + case 'p': + if (init) { + fprintf(stderr, +diff --git a/libselinux/utils/sefcontext_compile.c b/libselinux/utils/sefcontext_compile.c +index 6f79dd6..e019a07 100644 +--- a/libselinux/utils/sefcontext_compile.c ++++ b/libselinux/utils/sefcontext_compile.c +@@ -145,7 +145,7 @@ static int process_file(struct saved_data *data, const char *filename) + * u32 - data length of the pcre regex study daya + * char - a buffer holding the raw pcre regex study data + */ +-static int write_binary_file(struct saved_data *data, char *filename) ++static int write_binary_file(struct saved_data *data, int fd) + { + struct spec *specs = data->spec_arr; + FILE *bin_file; +@@ -155,7 +155,7 @@ static int write_binary_file(struct saved_data *data, char *filename) + uint32_t i; + int rc; + +- bin_file = fopen(filename, "w"); ++ bin_file = fdopen(fd, "w"); + if (!bin_file) { + perror("fopen output_file"); + exit(EXIT_FAILURE); +@@ -321,7 +321,9 @@ int main(int argc, char *argv[]) + const char *path; + char stack_path[PATH_MAX + 1]; + int rc; +- ++ char *tmp= NULL; ++ int fd; ++ + if (argc != 2) { + fprintf(stderr, "usage: %s input_file\n", argv[0]); + exit(EXIT_FAILURE); +@@ -342,13 +344,29 @@ int main(int argc, char *argv[]) + rc = snprintf(stack_path, sizeof(stack_path), "%s.bin", path); + if (rc < 0 || rc >= sizeof(stack_path)) + return rc; +- rc = write_binary_file(&data, stack_path); ++ ++ if (asprintf(&tmp, "%sXXXXXX", stack_path) < 0) ++ return -1; ++ ++ fd = mkstemp(tmp); ++ if (fd < 0) ++ goto err; ++ ++ rc = write_binary_file(&data, fd); ++ + if (rc < 0) +- return rc; ++ goto err; + ++ rename(tmp, stack_path); + rc = free_specs(&data); + if (rc < 0) +- return rc; ++ goto err; + +- return 0; ++ rc = 0; ++out: ++ free(tmp); ++ return rc; ++err: ++ rc = -1; ++ goto out; + } diff --git a/SOURCES/selinuxconlist.8 b/SOURCES/selinuxconlist.8 new file mode 100644 index 0000000..c698daa --- /dev/null +++ b/SOURCES/selinuxconlist.8 @@ -0,0 +1,18 @@ +.TH "selinuxconlist" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation" +.SH "NAME" +selinuxconlist \- list all SELinux context reachable for user +.SH "SYNOPSIS" +.B selinuxconlist [-l level] user [context] + +.SH "DESCRIPTION" +.B selinuxconlist +reports the list of context reachable for user from the current context or specified context + +.B \-l level +mcs/mls level + +.SH AUTHOR +This manual page was written by Dan Walsh . + +.SH "SEE ALSO" +secon(8), selinuxdefcon(8) diff --git a/SOURCES/selinuxdefcon.8 b/SOURCES/selinuxdefcon.8 new file mode 100644 index 0000000..3cbeff2 --- /dev/null +++ b/SOURCES/selinuxdefcon.8 @@ -0,0 +1,24 @@ +.TH "selinuxdefcon" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation" +.SH "NAME" +selinuxdefcon \- report default SELinux context for user + +.SH "SYNOPSIS" +.B selinuxdefcon [-l level] user fromcon + +.SH "DESCRIPTION" +.B selinuxdefcon +reports the default context for the specified user from the specified context + +.B \-l level +mcs/mls level + +.SH EXAMPLE +# selinuxdefcon jsmith system_u:system_r:sshd_t:s0 +.br +unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 + +.SH AUTHOR +This manual page was written by Dan Walsh . + +.SH "SEE ALSO" +secon(8), selinuxconlist(8) diff --git a/SPECS/libselinux.spec b/SPECS/libselinux.spec new file mode 100644 index 0000000..aaaa583 --- /dev/null +++ b/SPECS/libselinux.spec @@ -0,0 +1,2389 @@ +%global with_python3 0 + +%define ruby_inc %(pkg-config --cflags ruby) +%define ruby_sitearch %(ruby -rrbconfig -e "puts RbConfig::CONFIG['vendorarchdir']") +%define libsepolver 2.1.9-1 +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} + +Summary: SELinux library and simple utilities +Name: libselinux +Version: 2.1.13 +Release: 21%{?dist} +License: Public Domain +Group: System Environment/Libraries +Source: %{name}-%{version}.tgz +Source1: selinuxconlist.8 +Source2: selinuxdefcon.8 +Url: http://oss.tresys.com/git/selinux.git +Patch1: libselinux-rhat.patch +BuildRequires: pkgconfig python-devel ruby-devel ruby libsepol-static >= %{libsepolver} swig pcre-devel +%if 0%{?with_python3} +BuildRequires: python3-devel +%endif # if with_python3 +Requires: libsepol >= %{libsepolver} pcre +Conflicts: filesystem < 3 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +Security-enhanced Linux is a feature of the Linux® kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement®, Role-based Access +Control, and Multi-level Security. + +libselinux provides an API for SELinux applications to get and set +process and file security contexts and to obtain security policy +decisions. Required for any applications that use the SELinux API. + +%package utils +Summary: SELinux libselinux utilies +Group: Development/Libraries +Requires: libselinux = %{version}-%{release} + +%description utils +The libselinux-utils package contains the utilities + +%package python +Summary: SELinux python bindings for libselinux +Group: Development/Libraries +Requires: libselinux = %{version}-%{release} + +%description python +The libselinux-python package contains the python bindings for developing +SELinux applications. + +%if 0%{?with_python3} +%package python3 +Summary: SELinux python 3 bindings for libselinux +Group: Development/Libraries +Requires: libselinux = %{version}-%{release} + +%description python3 +The libselinux-python3 package contains python 3 bindings for developing +SELinux applications. +%endif # with_python3 + +%package ruby +Summary: SELinux ruby bindings for libselinux +Group: Development/Libraries +Requires: libselinux = %{version}-%{release} +Provides: ruby(selinux) + +%description ruby +The libselinux-ruby package contains the ruby bindings for developing +SELinux applications. + +%package devel +Summary: Header files and libraries used to build SELinux +Group: Development/Libraries +Requires: libselinux = %{version}-%{release} +Requires: libsepol-devel >= %{libsepolver} + +%description devel +The libselinux-devel package contains the libraries and header files +needed for developing SELinux applications. + +%package static +Summary: Static libraries used to build SELinux +Group: Development/Libraries +Requires: libselinux-devel = %{version}-%{release} + +%description static +The libselinux-static package contains the static libraries +needed for developing SELinux applications. + +%prep +%setup -q +%patch1 -p2 -b .rhat + +%build +# To support building the Python wrapper against multiple Python runtimes +# Define a function, for how to perform a "build" of the python wrapper against +# a specific runtime: +BuildPythonWrapper() { + BinaryName=$1 + + # Perform the build from the upstream Makefile: + make \ + PYTHON=$BinaryName \ + LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} \ + pywrap +} + +make clean +make LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} swigify +make LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} all + +BuildPythonWrapper %{__python} +%if 0%{?with_python3} +BuildPythonWrapper %{__python3} +%endif # with_python3 + +make RUBYINC="%{ruby_inc}" SHLIBDIR="%{_libdir}" LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} rubywrap + +%install +InstallPythonWrapper() { + BinaryName=$1 + + make \ + PYTHON=$BinaryName \ + LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} \ + pywrap + + make \ + PYTHON=$BinaryName \ + DESTDIR="%{buildroot}" LIBDIR="%{buildroot}%{_libdir}" \ + SHLIBDIR="%{buildroot}/%{_lib}" BINDIR="%{buildroot}%{_bindir}" \ + SBINDIR="%{buildroot}%{_sbindir}" \ + install-pywrap +} + +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_prefix}/lib/tmpfiles.d +mkdir -p %{buildroot}/%{_libdir} +mkdir -p %{buildroot}%{_includedir} +mkdir -p %{buildroot}%{_sbindir} +mkdir -p %{buildroot}/var/run/setrans +echo "d /var/run/setrans 0755 root root" > %{buildroot}/%{_prefix}/lib/tmpfiles.d/libselinux.conf + +InstallPythonWrapper %{__python} +%if 0%{?with_python3} +InstallPythonWrapper %{__python3} +%endif # with_python3 + +make DESTDIR="%{buildroot}" LIBDIR="%{buildroot}%{_libdir}" SHLIBDIR="%{buildroot}%{_libdir}" BINDIR="%{buildroot}%{_bindir}" SBINDIR="%{buildroot}%{_sbindir}" RUBYINSTALL=%{buildroot}%{ruby_sitearch} install install-rubywrap + +# Nuke the files we don't want to distribute +rm -f %{buildroot}%{_sbindir}/compute_* +rm -f %{buildroot}%{_sbindir}/deftype +rm -f %{buildroot}%{_sbindir}/execcon +rm -f %{buildroot}%{_sbindir}/getenforcemode +rm -f %{buildroot}%{_sbindir}/getfilecon +rm -f %{buildroot}%{_sbindir}/getpidcon +rm -f %{buildroot}%{_sbindir}/mkdircon +rm -f %{buildroot}%{_sbindir}/policyvers +rm -f %{buildroot}%{_sbindir}/setfilecon +rm -f %{buildroot}%{_sbindir}/selinuxconfig +rm -f %{buildroot}%{_sbindir}/selinuxdisable +rm -f %{buildroot}%{_sbindir}/getseuser +rm -f %{buildroot}%{_sbindir}/togglesebool +rm -f %{buildroot}%{_sbindir}/selinux_check_securetty_context +mv %{buildroot}%{_sbindir}/getdefaultcon %{buildroot}%{_sbindir}/selinuxdefcon +mv %{buildroot}%{_sbindir}/getconlist %{buildroot}%{_sbindir}/selinuxconlist +install -d %{buildroot}%{_mandir}/man8/ +install -m 644 %{SOURCE1} %{buildroot}%{_mandir}/man8/ +install -m 644 %{SOURCE2} %{buildroot}%{_mandir}/man8/ + +%clean +rm -rf %{buildroot} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%{_libdir}/libselinux.so.* +/var/run/setrans +%{_sbindir}/sefcontext_compile +%{_prefix}/lib/tmpfiles.d/libselinux.conf + +%files utils +%defattr(-,root,root,-) +%{_sbindir}/avcstat +%{_sbindir}/getenforce +%{_sbindir}/getsebool +%{_sbindir}/matchpathcon +%{_sbindir}/selinuxconlist +%{_sbindir}/selinuxdefcon +%{_sbindir}/selinuxexeccon +%{_sbindir}/selinuxenabled +%{_sbindir}/setenforce +%{_mandir}/man5/* +%{_mandir}/man8/* + +%files devel +%defattr(-,root,root,-) +%{_libdir}/libselinux.so +%{_libdir}/pkgconfig/libselinux.pc +%dir %{_includedir}/selinux +%{_includedir}/selinux/* +%{_mandir}/man3/* + +%files static +%defattr(-,root,root,-) +%{_libdir}/libselinux.a + +%files python +%defattr(-,root,root,-) +%dir %{python_sitearch}/selinux +%{python_sitearch}/selinux/* + +%if 0%{?with_python3} +%files python3 +%defattr(-,root,root,-) +%dir %{python3_sitearch}/selinux +%dir %{python3_sitearch}/selinux/__pycache__ +%{python3_sitearch}/selinux/*.py* +%{python3_sitearch}/selinux/*.so +%{python3_sitearch}/selinux/__pycache__/* +%endif with_python3 + +%files ruby +%defattr(-,root,root,-) +%{ruby_sitearch}/selinux.so + +%changelog +* Fri Oct 4 2013 Dan Walsh - 2.1.13-21 +- Add systemd_contexts support +- Do substitutions on a local sub followed by a dist sub +Resolves: #971425 + +* Thu Oct 3 2013 Dan Walsh - 2.1.13-20 +- Eliminate requirement on pthread library, by applying patch for Jakub Jelinek +Resolves: #1013801 + +* Mon Sep 16 2013 Dan Walsh - 2.1.13-19 +- Fix handling of libselinux getconlist with only one entry + +* Tue Sep 3 2013 Dan Walsh - 2.1.13-17 +- Add Python constants for SELinux enforcing modes + +* Sat Aug 03 2013 Fedora Release Engineering - 2.1.13-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Jun 28 2013 Dan Walsh - 2.1.13-16 +- Add sefcontext_compile.8 man page +- Add Russell Coker patch to fix man pages +- Add patches from Laurent Bigonville to fix Makefiles for debian. +- modify spec file to use %{_prefix}/lib + +* Mon May 6 2013 Dan Walsh - 2.1.13-15 +- Fix patch that Handles substitutions for / + +* Wed Apr 17 2013 Dan Walsh - 2.1.13-14 +- Handle substitutions for / +- semanage fcontext -a -e / /opt/rh/devtoolset-2/root + +* Tue Apr 9 2013 Dan Walsh - 2.1.13-13 +- Add Eric Paris patch to fix procattr calls after a fork. + +* Tue Mar 26 2013 Dan Walsh - 2.1.13-12 +- Move secolor.conf.5 into mcstrans package and out of libselinux + +* Wed Mar 20 2013 Dan Walsh - 2.1.13-11 +- Fix python bindings for selinux_check_access + +* Tue Mar 19 2013 Dan Walsh - 2.1.13-10 +- Fix reseting the policy root in matchpathcon + +* Wed Mar 6 2013 Dan Walsh - 2.1.13-9 +- Cleanup setfcontext_compile atomic patch +- Add matchpathcon -P /etc/selinux/mls support by allowing users to set alternate root +- Make sure we set exit codes from selinux_label calls to ENOENT or SUCCESS + +* Wed Mar 6 2013 Dan Walsh - 2.1.13-8 +- Make setfcontext_compile atomic + +* Wed Mar 6 2013 Dan Walsh - 2.1.13-7 +- Fix memory leak in set*con calls. + +* Thu Feb 28 2013 Dan Walsh - 2.1.13-6 +- Move matchpathcon to -utils package +- Remove togglesebool + +* Thu Feb 21 2013 Dan Walsh - 2.1.13-5 +- Fix selinux man page to reflect what current selinux policy is. + +* 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 + +* Thu Feb 14 2013 Dan Walsh - 2.1.13-2 +- Revert some changes which are causing the wrong policy version file to be created + +* Thu Feb 7 2013 Dan Walsh - 2.1.13-1 +- Update to upstream + * audit2why: make sure path is nul terminated + * utils: new file context regex compiler + * label_file: use precompiled filecontext when possible + * do not leak mmapfd + * sefcontontext_compile: Add error handling to help debug problems in libsemanage. + * man: make selinux.8 mention service man pages + * audit2why: Fix segfault if finish() called twice + * audit2why: do not leak on multiple init() calls + * mode_to_security_class: interface to translate a mode_t in to a security class + * audit2why: Cleanup audit2why analysys function + * man: Fix program synopsis and function prototypes in man pages + * man: Fix man pages formatting + * man: Fix typo in man page + * man: Add references and man page links to _raw function variants + * Use ENOTSUP instead of EOPNOTSUPP for getfilecon functions + * man: context_new(3): fix the return value description + * selinux_status_open: handle error from sysconf + * selinux_status_open: do not leak statusfd on exec + * Fix errors found by coverity + * Change boooleans.subs to booleans.subs_dist. + * optimize set*con functions + * pkg-config do not specifc ruby version + * unmap file contexts on selabel_close() + * do not leak file contexts with mmap'd backend + * sefcontext_compile: do not leak fd on error + * matchmediacon: do not leak fd + * src/label_android_property: do not leak fd on error + +* Sun Jan 27 2013 Dan Walsh - 2.1.12-20 +- Update to latest patches from eparis/Upstream + +* Fri Jan 25 2013 Dan Walsh - 2.1.12-19 +- Update to latest patches from eparis/Upstream + +* Wed Jan 23 2013 Dan Walsh - 2.1.12-18 +- Try procatt speedup patch again + +* Wed Jan 23 2013 Dan Walsh - 2.1.12-17 +- Roll back procattr speedups since it seems to be screwing up systemd labeling. + +* Tue Jan 22 2013 Dan Walsh - 2.1.12-16 +- Fix tid handling for setfscreatecon, old patch still broken in libvirt + +* Wed Jan 16 2013 Dan Walsh - 2.1.12-15 +- Fix tid handling for setfscreatecon, old patch still broken in libvirt + +* Mon Jan 14 2013 Dan Walsh - 2.1.12-14 +- setfscreatecon after fork was broken by the Set*con patch. +- We needed to reset the thread variables after a fork. + +* Thu Jan 10 2013 Dan Walsh - 2.1.12-13 +- Fix setfscreatecon call to handle failure mode, which was breaking udev + +* Wed Jan 9 2013 Dan Walsh - 2.1.12-12 +- Ondrej Oprala patch to optimize set*con functions +- Set*con now caches the security context and only re-sets it if it changes. + +* Tue Jan 8 2013 Dan Walsh - 2.1.12-11 +- Rebuild against latest libsepol + +* Fri Jan 4 2013 Dan Walsh - 2.1.12-10 +- Update to latest patches from eparis/Upstream +- Fix errors found by coverity +- set the sepol_compute_av_reason_buffer flag to 0. This means calculate denials only? +- audit2why: remove a useless policy vers variable +- audit2why: use the new constraint information + +* Mon Nov 19 2012 Dan Walsh - 2.1.12-9 +- Rebuild with latest libsepol + +* Fri Nov 16 2012 Dan Walsh - 2.1.12-8 +- Return EPERM if login program can not reach default label for user +- Attempt to return container info from audit2why + +* Thu Nov 1 2012 Dan Walsh - 2.1.12-7 +- Apply patch from eparis to fix leaked file descriptor in new labeling code + +* Fri Oct 19 2012 Dan Walsh - 2.1.12-6 +- Add new function mode_to_security_class which takes mode instead of a string. +- Possibly will be used with coreutils. + +* Mon Oct 15 2012 Dan Walsh - 2.1.12-5 +- Add back selinuxconlist and selinuxdefcon man pages + +* Mon Oct 15 2012 Dan Walsh - 2.1.12-4 +- Fix segfault from calling audit2why.finish() multiple times + +* Fri Oct 12 2012 Dan Walsh - 2.1.12-3 +- Fix up selinux man page to reference service man pages + +* Wed Sep 19 2012 Dan Walsh - 2.1.12-2 +- Rebuild with fixed libsepol + +* Thu Sep 13 2012 Dan Walsh - 2.1.12-1 +- Update to upstream + * Add support for lxc_contexts_path + * utils: add service to getdefaultcon + * libsemanage: do not set soname needlessly + * libsemanage: remove PYTHONLIBDIR and ruby equivalent + * boolean name equivalency + * getsebool: support boolean name substitution + * Add man page for new selinux_boolean_sub function. + * expose selinux_boolean_sub + * matchpathcon: add -m option to force file type check + * utils: avcstat: clear sa_mask set + * seusers: Check for strchr failure + * booleans: initialize pointer to silence coveriety + * stop messages when SELinux disabled + * label_file: use PCRE instead of glibc regex functions + * label_file: remove all typedefs + * label_file: move definitions to include file + * label_file: do string to mode_t conversion in a helper function + * label_file: move error reporting back into caller + * label_file: move stem/spec handling to header + * label_file: drop useless ncomp field from label_file data + * label_file: move spec_hasMetaChars to header + * label_file: fix potential read past buffer in spec_hasMetaChars + * label_file: move regex sorting to the header + * label_file: add accessors for the pcre extra data + * label_file: only run regex files one time + * label_file: new process_file function + * label_file: break up find_stem_from_spec + * label_file: struct reorg + * label_file: only run array once when sorting + * Ensure that we only close the selinux netlink socket once. + * improve the file_contexts.5 manual page + +* Fri Aug 03 2012 David Malcolm - 2.1.11-6 +- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 + +* Wed Aug 1 2012 David Malcolm - 2.1.11-5 +- make with_python3 be conditional on fedora + +* Thu Jul 19 2012 Fedora Release Engineering - 2.1.11-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 16 2012 Dan Walsh - 2.1.11-3 +- Move the tmpfiles.d content from /etc/tmpfiles.d to /usr/lib/tmpfiles.d + +* Fri Jul 13 2012 Dan Walsh - 2.1.11-2 +- Revert Eric Paris Patch for selinux_binary_policy_path + +* Wed Jul 4 2012 Dan Walsh - 2.1.11-1 +- Update to upstream + * Fortify source now requires all code to be compiled with -O flag + * asprintf return code must be checked + * avc_netlink_recieve handle EINTR + * audit2why: silence -Wmissing-prototypes warning + * libsemanage: remove build warning when build swig c files + * matchpathcon: bad handling of symlinks in / + * seusers: remove unused lineno + * seusers: getseuser: gracefully handle NULL service + * New Android property labeling backend + * label_android_property whitespace cleanups + * additional makefile support for rubywrap + +* Mon Jun 11 2012 Dan Walsh - 2.1.10-5 +- Fix booleans.subs name, change function name to selinux_boolean_sub, + add man page, minor fixes to the function + +* Fri May 25 2012 Dan Walsh - 2.1.10-4 +- Fix to compile with Fortify source + * Add -O compiler flag + * Check return code from asprintf +- Fix handling of symbolic links in / by realpath_not_final + +* Tue Apr 17 2012 Dan Walsh - 2.1.10-3 +- Add support for lxc contexts file + +* Fri Mar 30 2012 Dan Walsh - 2.1.10-2 +- Add support fot boolean subs file + +* Thu Mar 29 2012 Dan Walsh - 2.1.10-1 +- Update to upstream + * Fix dead links to www.nsa.gov/selinux + * Remove jump over variable declaration + * Fix old style function definitions + * Fix const-correctness + * Remove unused flush_class_cache method + * Add prototype decl for destructor + * Add more printf format annotations + * Add printf format attribute annotation to die() method + * Fix const-ness of parameters & make usage() methods static + * Enable many more gcc warnings for libselinux/src/ builds + * utils: Enable many more gcc warnings for libselinux/utils builds + * Change annotation on include/selinux/avc.h to avoid upsetting SWIG + * Ensure there is a prototype for 'matchpathcon_lib_destructor' + * Update Makefiles to handle /usrmove + * utils: Stop separating out matchpathcon as something special + * pkg-config to figure out where ruby include files are located + * build with either ruby 1.9 or ruby 1.8 + * assert if avc_init() not called + * take security_deny_unknown into account + * security_compute_create_name(3) + * Do not link against python library, this is considered + * bad practice in debian + * Hide unnecessarily-exported library destructors + +* Thu Feb 16 2012 Dan Walsh - 2.1.9-9 +- Add selinux_current_policy_path to return /sys/fs/selinux/policy if it exists +- Otherwise search for policy on disk + +* Wed Feb 15 2012 Dan Walsh - 2.1.9-8 +- Change selinux_binary_policy_path to return /sys/fs/selinux/policy +- Add selinux_installed_policy_path to return what selinux_binary_policy_path used to return +- avc_has_perm will now return yes if the machine is in permissive mode +- Make work with ruby-1.9 + +* Fri Feb 3 2012 Dan Walsh - 2.1.9-7 +- avc_netlink_recieve should continue to poll if it receinves an EINTR rather + +* Sun Jan 29 2012 Kay Sievers - 2.1.9-6 +- use /sbin/ldconfig, glibc does not provide + /usr/sbin/ldconfig in the RPM database for now + +* Fri Jan 27 2012 Dan Walsh - 2.1.9-5 +- Rebuild with cleaned up upstream to work in /usr + +* Wed Jan 25 2012 Harald Hoyer 2.1.9-4 +- install everything in /usr + https://fedoraproject.org/wiki/Features/UsrMove + +* Mon Jan 23 2012 Dan Walsh - 2.1.9-3 +- Add Dan Berrange code cleanup patches. + +* Wed Jan 4 2012 Dan Walsh - 2.1.9-2 +- Fix selabal_open man page to refer to proper selinux_opt structure + +* Wed Dec 21 2011 Dan Walsh - 2.1.9-1 +-Update to upstream + * Fix setenforce man page to refer to selinux man page + * Cleanup Man pages + * merge freecon with getcon man page + +* Mon Dec 19 2011 Dan Walsh - 2.1.8-5 +- Add patch from Richard Haines + When selabel_lookup found an invalid context with validation enabled, it + always stated it was 'file_contexts' whether media, x, db or file. + The fix is to store the spec file name in the selabel_lookup_rec on + selabel_open and use this as output for logs. Also a minor fix if key is + NULL to stop seg faults. +- Fix setenforce manage page. + +* Thu Dec 15 2011 Dan Walsh - 2.1.8-4 +- Rebuild with new libsepol + +* Tue Dec 6 2011 Dan Walsh - 2.1.8-2 +- Fix setenforce man page, from Miroslav Grepl + +* Tue Dec 6 2011 Dan Walsh - 2.1.8-1 +- Upgrade to upstream + * selinuxswig_python.i: don't make syscall if it won't change anything + * Remove assert in security_get_boolean_names(3) + * Mapped compute functions now obey deny_unknown flag + * get_default_type now sets EINVAL if no entry. + * return EINVAL if invalid role selected + * Updated selabel_file(5) man page + * Updated selabel_db(5) man page + * Updated selabel_media(5) man page + * Updated selabel_x(5) man page + * Add man/man5 man pages + * Add man/man5 man pages + * Add man/man5 man pages + * use -W and -Werror in utils + +* Tue Nov 29 2011 Dan Walsh - 2.1.7-2 +- Change python binding for restorecon to check if the context matches. +- If it does do not reset + +* Fri Nov 4 2011 Dan Walsh - 2.1.7-1 +- Upgrade to upstream + * Makefiles: syntax, convert all ${VAR} to $(VAR) + * load_policy: handle selinux=0 and /sys/fs/selinux not exist + * regenerate .pc on VERSION change + * label: cosmetic cleanups + * simple interface for access checks + * Don't reinitialize avc_init if it has been called previously + * seusers: fix to handle large sets of groups + * audit2why: close fd on enomem + * rename and export symlink_realpath + * label_file: style changes to make Eric happy. + +* Mon Oct 24 2011 Dan Walsh - 2.1.6-4 +- Apply libselinux patch to handle large groups in seusers. + +* Wed Oct 19 2011 Dan Walsh - 2.1.6-3 +- Add selinux_check_access function. Needed for passwd, chfn, chsh + +* Thu Sep 22 2011 Dan Walsh - 2.1.6-2 +- Handle situation where selinux=0 passed to the kernel and both /selinux and + +* Mon Sep 19 2011 Dan Walsh - 2.1.6-1 +-Update to upstream + * utils: matchpathcon: remove duplicate declaration + * src: matchpathcon: use myprintf not fprintf + * src: matchpathcon: make sure resolved path starts + * put libselinux.so.1 in /lib not /usr/lib + * tree: default make target to all not + +* Wed Sep 14 2011 Dan Walsh - 2.1.5-5 +- Switch to use ":" as prefix separator rather then ";" + +* Thu Sep 8 2011 Ville Skyttä - 2.1.5-4 +- Avoid unnecessary shell invocation in %%post. + +* Tue Sep 6 2011 Dan Walsh - 2.1.5-3 +- Fix handling of subset labeling that is causing segfault in restorecon + +* Fri Sep 2 2011 Dan Walsh - 2.1.5-2 +- Change matchpathcon_init_prefix and selabel_open to allow multiple initial +prefixes. Now you can specify a ";" separated list of prefixes and the +labeling system will only load regular expressions that match these prefixes. + +* Tue Aug 30 2011 Dan Walsh - 2.1.5-1 +- Change matchpatcon to use proper myprintf +- Fix symlink_realpath to always include "/" +- Update to upstream + * selinux_file_context_verify function returns wrong value. + * move realpath helper to matchpathcon library + * python wrapper makefile changes + +* Mon Aug 22 2011 Dan Walsh - 2.1.4-2 +- Move to new Makefile that can build with or without PYTHON being set + +* Thu Aug 18 2011 Dan Walsh - 2.1.4-1 +-Update to upstream +2.1.4 2011-0817 + * mapping fix for invalid class/perms after selinux_set_mapping + * audit2why: work around python bug not defining + * resolv symlinks and dot directories before matching + +2.1.2 2011-0803 + * audit2allow: do not print statistics + * make python bindings for restorecon work on relative path + * fix python audit2why binding error + * support new python3 functions + * do not check fcontext duplicates on use + * Patch for python3 for libselinux + +2.1.1 2011-08-02 + * move .gitignore into utils + * new setexecon utility + * selabel_open fix processing of substitution files + * mountpoint changing patch. + * simplify SRCS in Makefile + +2.1.1 2011-08-01 + * Remove generated files, introduce more .gitignore + + + +* Thu Jul 28 2011 Dan Walsh - 2.1.0-1 +-Update to upstream + * Release, minor version bump + * Give correct names to mount points in load_policy by Dan Walsh. + * Make sure selinux state is reported correctly if selinux is disabled or + fails to load by Dan Walsh. + * Fix crash if selinux_key_create was never called by Dan Walsh. + * Add new file_context.subs_dist for distro specific filecon substitutions + by Dan Walsh. + * Update man pages for selinux_color_* functions by Richard Haines. + +* Mon Jun 13 2011 Dan Walsh - 2.0.102-6 +- Only call dups check within selabel/matchpathcon if you are validating the +context +- This seems to speed the loading of labels by 4 times. + +* Fri Apr 29 2011 Dan Walsh - 2.0.102-5 +- Move /selinux to /sys/fs/selinux +- Add selinuxexeccon +- Add realpath to matchpathcon to handle matchpathcon * type queries. + +* Thu Apr 21 2011 Dan Walsh - 2.0.102-4 +- Update for latest libsepol + +* Mon Apr 18 2011 Dan Walsh - 2.0.102-3 +- Update for latest libsepol + +* Wed Apr 13 2011 Dan Walsh - 2.0.102-2 +- Fix restorecon python binding to accept relative paths + +* Tue Apr 12 2011 Dan Walsh - 2.0.102-1 +-Update to upstream + * Give correct names to mount points in load_policy by Dan Walsh. + * Make sure selinux state is reported correctly if selinux is disabled or + fails to load by Dan Walsh. + * Fix crash if selinux_key_create was never called by Dan Walsh. + * Add new file_context.subs_dist for distro specific filecon substitutions + by Dan Walsh. + * Update man pages for selinux_color_* functions by Richard Haines. + +* Wed Apr 6 2011 Dan Walsh - 2.0.101-1 +- Clean up patch to make handling of constructor cleanup more portable + * db_language object class support for selabel_lookup from KaiGai Kohei. + * Library destructors for thread local storage keys from Eamon Walsh. + +* Tue Apr 5 2011 Dan Walsh - 2.0.99-5 +- Add distribution subs path + +* Tue Apr 5 2011 Dan Walsh - 2.0.99-4 +Add patch from dbhole@redhat.com to initialize thread keys to -1 +Errors were being seen in libpthread/libdl that were related +to corrupt thread specific keys. Global destructors that are called on dl +unload. During destruction delete a thread specific key without checking +if it has been initialized. Since the constructor is not called each time +(i.e. key is not initialized with pthread_key_create each time), and the +default is 0, there is a possibility that key 0 for an active thread gets +deleted. This is exactly what is happening in case of OpenJDK. + +Workaround patch that initializes the key to -1. Thus if the constructor is not +called, the destructor tries to delete key -1 which is deemed invalid by +pthread_key_delete, and is ignored. + +* Tue Apr 5 2011 Dan Walsh - 2.0.99-3 +- Call fini_selinuxmnt if selinux is disabled, to cause is_selinux_disabled() to report correct data + +* Fri Apr 1 2011 Dan Walsh - 2.0.99-2 +- Change mount source options to use "proc" and "selinuxfs" + +* Tue Mar 1 2011 Dan Walsh - 2.0.99-1 +- Update to upstream + * Turn off default user handling when computing user contexts by Dan Walsh + +* Tue Feb 08 2011 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Feb 1 2011 Dan Walsh - 2.0.98-3 +- Fixup selinux man page + +* Tue Jan 18 2011 Dan Walsh - 2.0.98-2 +- Fix Makefile to use pkg-config --cflags python3 to discover include paths + +* Tue Dec 21 2010 Dan Walsh - 2.0.98-1 +- Update to upstream + - Turn off fallback in to SELINUX_DEFAULTUSER in get_context_list + +* Mon Dec 6 2010 Dan Walsh - 2.0.97-1 +- Update to upstream + * Thread local storage fixes from Eamon Walsh. + +* Sat Dec 4 2010 Dan Walsh - 2.0.96-9 +- Add /etc/tmpfiles.d support for /var/run/setrans + +* Wed Nov 24 2010 Dan Walsh - 2.0.96-8 +- Ghost /var/run/setrans + +* Wed Sep 29 2010 jkeating - 2.0.96-7 +- Rebuilt for gcc bug 634757 + +* Thu Sep 16 2010 Adam Tkac - 2.0.96-6 +- rebuild via updated swig (#624674) + +* Sun Aug 22 2010 Dan Walsh - 2.0.96-5 +- Update for python 3.2a1 + +* Tue Jul 27 2010 Dan Walsh - 2.0.96-4 +- Turn off fallback in to SELINUX_DEFAULTUSER in get_context_list + +* Wed Jul 21 2010 David Malcolm - 2.0.96-3 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Fri Jun 25 2010 Dan Walsh - 2.0.96-2 +- Turn off messages in audit2why + +* Wed Mar 24 2010 Dan Walsh - 2.0.96-1 +- Update to upstream + * Add const qualifiers to public API where appropriate by KaiGai Kohei. + +2.0.95 2010-06-10 + * Remove duplicate slashes in paths in selabel_lookup from Chad Sellers + * Adds a chcon method to the libselinux python bindings from Steve Lawrence +- add python3 subpackage from David Malcolm + +* Wed Mar 24 2010 Dan Walsh - 2.0.94-1 +* Set errno=EINVAL for invalid contexts from Dan Walsh. + +* Tue Mar 16 2010 Dan Walsh - 2.0.93-1 +- Update to upstream + * Show strerror for security_getenforce() by Colin Waters. + * Merged selabel database support by KaiGai Kohei. + * Modify netlink socket blocking code by KaiGai Kohei. + +* Sun Mar 7 2010 Dan Walsh - 2.0.92-1 +- Update to upstream + * Fix from Eric Paris to fix leak on non-selinux systems. + * regenerate swig wrappers + * pkgconfig fix to respect LIBDIR from Dan Walsh. + +* Wed Feb 24 2010 Dan Walsh - 2.0.91-1 +- Update to upstream + * Change the AVC to only audit the permissions specified by the + policy, excluding any permissions specified via dontaudit or not + specified via auditallow. + * Fix compilation of label_file.c with latest glibc headers. + +* Mon Feb 22 2010 Dan Walsh - 2.0.90-5 +- Fix potential doublefree on init + +* Thu Feb 18 2010 Dan Walsh - 2.0.90-4 +- Fix libselinux.pc + +* Mon Jan 18 2010 Dan Walsh - 2.0.90-3 +- Fix man page for selinuxdefcon + +* Mon Jan 4 2010 Dan Walsh - 2.0.90-2 +- Free memory on disabled selinux boxes + +* Tue Dec 1 2009 Dan Walsh - 2.0.90-1 +- Update to upstream + * add/reformat man pages by Guido Trentalancia . + * Change exception.sh to be called with bash by Manoj Srivastava + +* Mon Nov 2 2009 Dan Walsh - 2.0.89-2 +- Fix selinuxdefcon man page + +* Mon Nov 2 2009 Dan Walsh - 2.0.89-1 +- Update to upstream + * Add pkgconfig file from Eamon Walsh. + +* Thu Oct 29 2009 Dan Walsh - 2.0.88-1 +- Update to upstream + * Rename and export selinux_reset_config() + +* Tue Sep 8 2009 Dan Walsh - 2.0.87-1 +- Update to upstream + * Add exception handling in libselinux from Dan Walsh. This uses a + shell script called exception.sh to generate a swig interface file. + * make swigify + * Make matchpathcon print <> if path not found in fcontext file. + +* Tue Sep 8 2009 Dan Walsh - 2.0.86-2 +- Eliminate -pthread switch in Makefile + +* Tue Sep 8 2009 Dan Walsh - 2.0.86-1 +- Update to upstream + * Removal of reference counting on userspace AVC SID's. + +* Sat Jul 25 2009 Fedora Release Engineering - 2.0.85-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Jul 7 2009 Dan Walsh - 2.0.85-1 +- Update to upstream + * Reverted Tomas Mraz's fix for freeing thread local storage to avoid + pthread dependency. + * Removed fini_context_translations() altogether. + * Merged lazy init patch from Stephen Smalley based on original patch + by Steve Grubb. + +* Tue Jul 7 2009 Dan Walsh - 2.0.84-1 +- Update to upstream + * Add per-service seuser support from Dan Walsh. + * Let load_policy gracefully handle selinuxfs being mounted from Stephen Smalley. + * Check /proc/filesystems before /proc/mounts for selinuxfs from Eric + Paris. + +* Wed Jun 24 2009 Dan Walsh - 2.0.82-2 +- Add provices ruby(selinux) + +* Tue Jun 23 2009 Dan Walsh - 2.0.82-1 +- Update to upstream + * Fix improper use of thread local storage from Tomas Mraz . + * Label substitution support from Dan Walsh. + * Support for labeling virtual machine images from Dan Walsh. + +* Mon May 18 2009 Dan Walsh - 2.0.81-1 +- Update to upstream + * Trim / from the end of input paths to matchpathcon from Dan Walsh. + * Fix leak in process_line in label_file.c from Hiroshi Shinji. + * Move matchpathcon to /sbin, add matchpathcon to clean target from Dan Walsh. + * getdefaultcon to print just the correct match and add verbose option from Dan Walsh. + +* Wed Apr 8 2009 Dan Walsh - 2.0.80-1 +- Update to upstream + * deny_unknown wrapper function from KaiGai Kohei. + * security_compute_av_flags API from KaiGai Kohei. + * Netlink socket management and callbacks from KaiGai Kohei. + +* Fri Apr 3 2009 Dan Walsh - 2.0.79-6 +- Fix Memory Leak + +* Thu Apr 2 2009 Dan Walsh - 2.0.79-5 +- Fix crash in python + +* Sun Mar 29 2009 Dan Walsh - 2.0.79-4 +- Add back in additional interfaces + +* Fri Mar 27 2009 Dan Walsh - 2.0.79-3 +- Add back in av_decision to python swig + +* Thu Mar 12 2009 Dan Walsh - 2.0.79-1 +- Update to upstream + * Netlink socket handoff patch from Adam Jackson. + * AVC caching of compute_create results by Eric Paris. + +* Tue Mar 10 2009 Dan Walsh - 2.0.78-5 +- Add patch from ajax to accellerate X SELinux +- Update eparis patch + +* Mon Mar 9 2009 Dan Walsh - 2.0.78-4 +- Add eparis patch to accellerate Xwindows performance + +* Mon Mar 9 2009 Dan Walsh - 2.0.78-3 +- Fix URL + +* Fri Mar 6 2009 Dan Walsh - 2.0.78-2 +- Add substitute pattern +- matchpathcon output <> on ENOENT + +* Mon Mar 2 2009 Dan Walsh - 2.0.78-1 +- Update to upstream + * Fix incorrect conversion in discover_class code. + +* Wed Feb 25 2009 Fedora Release Engineering - 2.0.77-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Feb 18 2009 Dan Walsh - 2.0.77-5 +- Add + - selinux_virtual_domain_context_path + - selinux_virtual_image_context_path + +* Tue Jan 6 2009 Dan Walsh - 2.0.77-3 +- Throw exeptions in python swig bindings on failures + +* Tue Jan 6 2009 Dan Walsh - 2.0.77-2 +- Fix restorecon python code + +* Tue Jan 6 2009 Dan Walsh - 2.0.77-1 +- Update to upstream + +* Tue Dec 16 2008 Dan Walsh - 2.0.76-6 +- Strip trailing / for matchpathcon + +* Tue Dec 16 2008 Dan Walsh l - 2.0.76-5 +- Fix segfault if seusers file does not work + +* Fri Dec 12 2008 Dan Walsh - 2.0.76-4 +- Add new function getseuser which will take username and service and return +- seuser and level. ipa will populate file in future. +- Change selinuxdefcon to return just the context by default + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 2.0.76-2 +- Rebuild for Python 2.6 + +* Mon Nov 17 2008 Dan Walsh - 2.0.76-1 +- Update to Upstream + * Allow shell-style wildcards in x_contexts file. + +* Mon Nov 17 2008 Dan Walsh - 2.0.75-2 +- Eamon Walsh Patch - libselinux: allow shell-style wildcarding in X names +- Add Restorecon/Install python functions from Luke Macken + +* Fri Nov 7 2008 Dan Walsh - 2.0.75-1 +- Update to Upstream + * Correct message types in AVC log messages. + * Make matchpathcon -V pass mode from Dan Walsh. + * Add man page for selinux_file_context_cmp from Dan Walsh. + +* Tue Sep 30 2008 Dan Walsh - 2.0.73-1 +- Update to Upstream + * New man pages from Dan Walsh. + * Update flask headers from refpolicy trunk from Dan Walsh. + +* Fri Sep 26 2008 Dan Walsh - 2.0.71-6 +- Fix matchpathcon -V call + +* Tue Sep 9 2008 Dan Walsh - 2.0.71-5 +- Add flask definitions for open, X and nlmsg_tty_audit + +* Tue Sep 9 2008 Dan Walsh - 2.0.71-4 +- Add missing get/setkeycreatecon man pages + +* Tue Sep 9 2008 Dan Walsh - 2.0.71-3 +- Split out utilities + +* Tue Sep 9 2008 Dan Walsh - 2.0.71-2 +- Add missing man page links for [lf]getfilecon + +* Tue Aug 5 2008 Dan Walsh - 2.0.71-1 +- Update to Upstream + * Add group support to seusers using %groupname syntax from Dan Walsh. + * Mark setrans socket close-on-exec from Stephen Smalley. + * Only apply nodups checking to base file contexts from Stephen Smalley. + +* Fri Aug 1 2008 Dan Walsh - 2.0.70-1 +- Update to Upstream + * Merge ruby bindings from Dan Walsh. +- Add support for Linux groups to getseuserbyname + +* Fri Aug 1 2008 Dan Walsh - 2.0.69-2 +- Allow group handling in getseuser call + +* Tue Jul 29 2008 Dan Walsh - 2.0.69-1 +- Update to Upstream + * Handle duplicate file context regexes as a fatal error from Stephen Smalley. + This prevents adding them via semanage. + * Fix audit2why shadowed variables from Stephen Smalley. + * Note that freecon NULL is legal in man page from Karel Zak. + +* Wed Jul 9 2008 Dan Walsh - 2.0.67-4 +- Add ruby support for puppet + +* Tue Jul 8 2008 Dan Walsh - 2.0.67-3 +- Rebuild for new libsepol + +* Sun Jun 29 2008 Dan Walsh - 2.0.67-2 +- Add Karel Zak patch for freecon man page + +* Sun Jun 22 2008 Dan Walsh - 2.0.67-1 +- Update to Upstream + * New and revised AVC, label, and mapping man pages from Eamon Walsh. + * Add swig python bindings for avc interfaces from Dan Walsh. + +* Sun Jun 22 2008 Dan Walsh - 2.0.65-1 +- Update to Upstream + * Fix selinux_file_context_verify() and selinux_lsetfilecon_default() to call matchpathcon_init_prefix if not already initialized. + * Add -q qualifier for -V option of matchpathcon and change it to indicate whether verification succeeded or failed via exit status. + +* Fri May 16 2008 Dan Walsh - 2.0.64-3 +- libselinux no longer neets to telnet -u in post install + +* Wed May 7 2008 Dan Walsh - 2.0.64-2 +- Add sedefaultcon and setconlist commands to dump login context + +* Tue Apr 22 2008 Dan Walsh - 2.0.64-1 +- Update to Upstream + * Fixed selinux_set_callback man page. + * Try loading the max of the kernel-supported version and the libsepol-supported version when no manipulation of the binary policy is needed from Stephen Smalley. + * Fix memory leaks in matchpathcon from Eamon Walsh. + +* Wed Apr 16 2008 Dan Walsh - 2.0.61-4 +- Add Xavior Toth patch for security_id_t in swig + +* Thu Apr 10 2008 Dan Walsh - 2.0.61-3 +- Add avc.h to swig code + +* Wed Apr 9 2008 Dan Walsh - 2.0.61-2 +- Grab the latest policy for the kernel + +* Tue Apr 1 2008 Dan Walsh - 2.0.61-1 +- Update to Upstream + * Man page typo fix from Jim Meyering. + +* Sun Mar 23 2008 Dan Walsh - 2.0.60-1 +- Update to Upstream + * Changed selinux_init_load_policy() to not warn about a failed mount of selinuxfs if selinux was disabled in the kernel. + +* Thu Mar 13 2008 Dan Walsh - 2.0.59-2 +- Fix matchpathcon memory leak + +* Fri Feb 29 2008 Dan Walsh - 2.0.59-1 +- Update to Upstream + * Merged new X label "poly_selection" namespace from Eamon Walsh. + +* Thu Feb 28 2008 Dan Walsh - 2.0.58-1 +- Update to Upstream + * Merged reset_selinux_config() for load policy from Dan Walsh. + +* Thu Feb 28 2008 Dan Walsh - 2.0.57-2 +- Reload library on loading of policy to handle chroot + +* Mon Feb 25 2008 Dan Walsh - 2.0.57-1 +- Update to Upstream + * Merged avc_has_perm() errno fix from Eamon Walsh. + +* Fri Feb 22 2008 Dan Walsh - 2.0.56-1 +- Update to Upstream + * Regenerated Flask headers from refpolicy flask definitions. + +* Wed Feb 13 2008 Dan Walsh - 2.0.55-1 +- Update to Upstream + * Merged compute_member AVC function and manpages from Eamon Walsh. + * Provide more error reporting on load policy failures from Stephen Smalley. + +* Fri Feb 8 2008 Dan Walsh - 2.0.53-1 +- Update to Upstream + * Merged new X label "poly_prop" namespace from Eamon Walsh. + +* Wed Feb 6 2008 Dan Walsh - 2.0.52-1 +- Update to Upstream + * Disable setlocaldefs if no local boolean or users files are present from Stephen Smalley. + * Skip userspace preservebools processing for Linux >= 2.6.22 from Stephen Smalley. + +* Tue Jan 29 2008 Dan Walsh - 2.0.50-1 +- Update to Upstream + * Merged fix for audit2why from Dan Walsh. + +* Fri Jan 25 2008 Dan Walsh - 2.0.49-2 +- Fix audit2why to grab latest policy versus the one selected by the kernel + +* Wed Jan 23 2008 Dan Walsh - 2.0.49-1 +* Merged audit2why python binding from Dan Walsh. + +* Wed Jan 23 2008 Dan Walsh - 2.0.48-1 +* Merged updated swig bindings from Dan Walsh, including typemap for pid_t. + +* Mon Jan 21 2008 Dan Walsh - 2.0.47-4 +- Update to use libsepol-static library + +* Wed Jan 16 2008 Adel Gadllah - 2.0.47-3 +- Move libselinux.a to -static package +- Spec cleanups + +* Tue Jan 15 2008 Dan Walsh - 2.0.47-2 +- Put back libselinux.a + +* Fri Jan 11 2008 Dan Walsh - 2.0.47-1 +- Fix memory references in audit2why and change to use tuples +- Update to Upstream + * Fix for the avc: granted null message bug from Stephen Smalley. + +* Fri Jan 11 2008 Dan Walsh - 2.0.46-6 +- Fix __init__.py specification + +* Tue Jan 8 2008 Dan Walsh - 2.0.46-5 +- Add audit2why python bindings + +* Tue Jan 8 2008 Dan Walsh - 2.0.46-4 +- Add pid_t typemap for swig bindings + +* Thu Jan 3 2008 Dan Walsh - 2.0.46-3 +- smp_mflag + +* Thu Jan 3 2008 Dan Walsh - 2.0.46-2 +- Fix spec file caused by spec review + +* Fri Nov 30 2007 Dan Walsh - 2.0.46-1 +- Upgrade to upstream + * matchpathcon(8) man page update from Dan Walsh. + +* Fri Nov 30 2007 Dan Walsh - 2.0.45-1 +- Upgrade to upstream + * dlopen libsepol.so.1 rather than libsepol.so from Stephen Smalley. + * Based on a suggestion from Ulrich Drepper, defer regex compilation until we have a stem match, by Stephen Smalley. + * A further optimization would be to defer regex compilation until we have a complete match of the constant prefix of the regex - TBD. + +* Thu Nov 15 2007 Dan Walsh - 2.0.43-1 +- Upgrade to upstream + * Regenerated Flask headers from policy. + +* Thu Nov 15 2007 Dan Walsh - 2.0.42-1 +- Upgrade to upstream + * AVC enforcing mode override patch from Eamon Walsh. + * Aligned attributes in AVC netlink code from Eamon Walsh. +- Move libselinux.so back into devel package, procps has been fixed + +* Tue Nov 6 2007 Dan Walsh - 2.0.40-1 +- Upgrade to upstream + * Merged refactored AVC netlink code from Eamon Walsh. + * Merged new X label namespaces from Eamon Walsh. + * Bux fix and minor refactoring in string representation code. + +* Fri Oct 5 2007 Dan Walsh - 2.0.37-1 +- Upgrade to upstream + * Merged selinux_get_callback, avc_open, empty string mapping from Eamon Walsh. + +* Fri Sep 28 2007 Dan Walsh - 2.0.36-1 +- Upgrade to upstream + * Fix segfault resulting from missing file_contexts file. + +* Thu Sep 27 2007 Dan Walsh - 2.0.35-2 +- Fix segfault on missing file_context file + +* Wed Sep 26 2007 Dan Walsh - 2.0.35-1 +- Upgrade to upstream + * Make netlink socket close-on-exec to avoid descriptor leakage from Dan Walsh. + * Pass CFLAGS when using gcc for linking from Dennis Gilmore. + +* Mon Sep 24 2007 Dan Walsh - 2.0.34-3 +- Add sparc patch to from Dennis Gilmore to build on Sparc platform + +* Mon Sep 24 2007 Dan Walsh - 2.0.34-2 +- Remove leaked file descriptor + +* Tue Sep 18 2007 Dan Walsh - 2.0.34-1 +- Upgrade to latest from NSA + * Fix selabel option flag setting for 64-bit from Stephen Smalley. + +* Tue Sep 18 2007 Dan Walsh - 2.0.33-2 +- Change matchpatcon to use syslog instead of syserror + +* Thu Sep 13 2007 Dan Walsh - 2.0.33-1 +- Upgrade to latest from NSA + * Re-map a getxattr return value of 0 to a getfilecon return value of -1 with errno EOPNOTSUPP from Stephen Smalley. + * Fall back to the compat code for security_class_to_string and security_av_perm_to_string from Stephen Smalley. + * Fix swig binding for rpm_execcon from James Athey. + +* Thu Sep 6 2007 Dan Walsh - 2.0.31-4 +- Apply James Athway patch to fix rpm_execcon python binding + +* Tue Aug 28 2007 Dan Walsh - 2.0.31-3 +- Move libselinux.so back into main package, breaks procps + +* Thu Aug 23 2007 Dan Walsh - 2.0.31-2 +- Upgrade to upstream + * Fix file_contexts.homedirs path from Todd Miller. + +* Tue Aug 21 2007 Dan Walsh - 2.0.30-2 +- Remove requirement on setransd, Moved to selinux-policy-mls + +* Fri Aug 10 2007 Dan Walsh - 2.0.30-1 +- Move libselinux.so into devel package +- Upgrade to upstream + * Fix segfault resulting from uninitialized print-callback pointer. + * Added x_contexts path function patch from Eamon Walsh. + * Fix build for EMBEDDED=y from Yuichi Nakamura. + * Fix markup problems in selinux man pages from Dan Walsh. + +* Fri Aug 3 2007 Dan Walsh - 2.0.29-1 +- Upgrade to upstream + * Updated version for stable branch. + * Added x_contexts path function patch from Eamon Walsh. + * Fix build for EMBEDDED=y from Yuichi Nakamura. + * Fix markup problems in selinux man pages from Dan Walsh. + * Updated av_permissions.h and flask.h to include new nscd permissions from Dan Walsh. + * Added swigify to top-level Makefile from Dan Walsh. + * Fix for string_to_security_class segfault on x86_64 from Stephen + Smalley. + +* Mon Jul 23 2007 Dan Walsh - 2.0.24-3 +- Apply Steven Smalley patch to fix segfault in string_to_security_class + +* Wed Jul 18 2007 Dan Walsh - 2.0.24-2 +- Fix matchpathcon to set default myprintf + +* Mon Jul 16 2007 Dan Walsh - 2.0.24-1 +- Upgrade to upstream + * Fix for getfilecon() for zero-length contexts from Stephen Smalley. + +* Wed Jul 11 2007 Dan Walsh - 2.0.23-3 +- Update to match flask/access_vectors in policy + +* Tue Jul 10 2007 Dan Walsh - 2.0.23-2 +- Fix man page markup lanquage for translations + +* Tue Jun 26 2007 Dan Walsh - 2.0.23-1 +- Fix semanage segfault on x86 platform + +* Thu Jun 21 2007 Dan Walsh - 2.0.22-1 +- Upgrade to upstream + * Labeling and callback interface patches from Eamon Walsh. + +* Tue Jun 19 2007 Dan Walsh - 2.0.21-2 +- Refactored swig + +* Mon Jun 11 2007 Dan Walsh - 2.0.21-1 +- Upgrade to upstream + * Class and permission mapping support patches from Eamon Walsh. + * Object class discovery support patches from Chris PeBenito. + * Refactoring and errno support in string representation code. + +* Fri Jun 1 2007 Dan Walsh - 2.0.18-1 +- Upgrade to upstream +- Merged patch to reduce size of libselinux and remove need for libsepol for embedded systems from Yuichi Nakamura. + This patch also turns the link-time dependency on libsepol into a runtime (dlopen) dependency even in the non-embedded case. + +2.0.17 2007-05-31 + * Updated Lindent script and reindented two header files. + +* Fri May 4 2007 Dan Walsh - 2.0.16-1 +- Upgrade to upstream + * Merged additional swig python bindings from Dan Walsh. + * Merged helpful message when selinuxfs mount fails patch from Dax Kelson. + +* Tue Apr 24 2007 Dan Walsh - 2.0.14-1 +- Upgrade to upstream + * Merged build fix for avc_internal.c from Joshua Brindle. + +* Mon Apr 23 2007 Dan Walsh - 2.0.13-2 +- Add get_context_list funcitions to swig file + +* Thu Apr 12 2007 Dan Walsh - 2.0.13-1 +- Upgrade to upstream + * Merged rpm_execcon python binding fix, matchpathcon man page fix, and getsebool -a handling for EACCES from Dan Walsh. + +* Thu Apr 12 2007 Dan Walsh - 2.0.12-2 +- Add missing interface + +* Wed Apr 11 2007 Dan Walsh - 2.0.12-1 +- Upgrade to upstream + * Merged support for getting initial contexts from James Carter. + +* Mon Apr 9 2007 Dan Walsh - 2.0.11-1 +- Upgrade to upstream + * Merged userspace AVC patch to follow kernel's behavior for permissive mode in caching previous denials from Eamon Walsh. + * Merged sidput(NULL) patch from Eamon Walsh. + +* Thu Apr 5 2007 Dan Walsh - 2.0.9-2 +- Make rpm_exec swig work + +* Tue Mar 27 2007 Dan Walsh - 2.0.9-1 +- Upgrade to upstream + * Merged class/av string conversion and avc_compute_create patch from Eamon Walsh. + +* Tue Mar 27 2007 Dan Walsh - 2.0.8-1 +- Upgrade to upstream + * Merged fix for avc.h #include's from Eamon Walsh. + +* Thu Mar 22 2007 Dan Walsh - 2.0.7-2 +- Add stdint.h to avc.h + +* Mon Mar 12 2007 Dan Walsh - 2.0.7-1 +- Merged patch to drop support for CACHETRANS=0 config option from Steve Grubb. +- Merged patch to drop support for old /etc/sysconfig/selinux and +- /etc/security policy file layout from Steve Grubb. + +* Thu Mar 8 2007 Dan Walsh - 2.0.5-2 +- Do not fail on permission denied in getsebool + +* Tue Feb 27 2007 Dan Walsh - 2.0.5-1 +- Upgrade to upstream + * Merged init_selinuxmnt() and is_selinux_enabled() improvements from Steve Grubb. + +* Wed Feb 21 2007 Dan Walsh - 2.0.4-1 +- Upgrade to upstream + * Removed sending of setrans init message. + * Merged matchpathcon memory leak fix from Steve Grubb. + +* Tue Feb 20 2007 Dan Walsh - 2.0.2-1 +- Upgrade to upstream + * Merged more swig initializers from Dan Walsh. + +* Sun Feb 18 2007 Dan Walsh - 2.0.1-1 +- Upgrade to upstream + * Merged patch from Todd Miller to convert int types over to C99 style. + +* Wed Feb 7 2007 Dan Walsh - 2.0.0-1 +- Merged patch from Todd Miller to remove sscanf in matchpathcon.c because + of the use of the non-standard format (original patch changed + for style). +- Merged patch from Todd Miller to fix memory leak in matchpathcon.c. + +* Fri Jan 19 2007 Dan Walsh - 1.34.0-2 +- Add context function to python to split context into 4 parts + +* Fri Jan 19 2007 Dan Walsh - 1.34.0-1 +- Upgrade to upstream + * Updated version for stable branch. + +* Wed Jan 17 2007 Dan Walsh - 1.33.6-1 +- Upgrade to upstream + * Merged man page updates to make "apropos selinux" work from Dan Walsh. + +* Wed Jan 17 2007 Dan Walsh - 1.33.5-1 +- Upgrade to upstream + * Merged getdefaultcon utility from Dan Walsh. + +* Mon Jan 15 2007 Dan Walsh - 1.33.4-3 +- Add Ulrich NSCD__GETSERV and NSCD__SHMEMGRP for Uli + +* Fri Jan 12 2007 Dan Walsh - 1.33.4-2 +- Add reference to selinux man page in all man pages to make apropos work +Resolves: # 217881 + +* Thu Jan 11 2007 Dan Walsh - 1.33.4-1 +- Upstream wanted some minor changes, upgrading to keep api the same +- Upgrade to upstream + * Merged selinux_check_securetty_context() and support from Dan Walsh. +Resolves: #200110 + +* Fri Jan 5 2007 Dan Walsh - 1.33.3-3 +- Cleanup patch + +* Fri Jan 5 2007 Dan Walsh - 1.33.3-2 +- Add securetty handling +Resolves: #200110 + +* Thu Jan 4 2007 Dan Walsh - 1.33.3-1 +- Upgrade to upstream + * Merged patch for matchpathcon utility to use file mode information + when available from Dan Walsh. + +* Thu Dec 7 2006 Jeremy Katz - 1.33.2-4 +- rebuild against python 2.5 + +* Wed Dec 6 2006 Dan Walsh - 1.33.2-3 +- Fix matchpathcon to lstat files + +* Thu Nov 30 2006 Dan Walsh - 1.33.2-2 +- Update man page + +* Tue Nov 14 2006 Dan Walsh - 1.33.2-1 +- Upgrade to upstream + +* Fri Nov 3 2006 Dan Walsh - 1.33.1-2 +- Add James Antill patch for login verification of MLS Levels +- MLS ragnes need to be checked, Eg. login/cron. This patch adds infrastructure. + +* Tue Oct 24 2006 Dan Walsh - 1.33.1-1 +- Upgrade to latest from NSA + * Merged updated flask definitions from Darrel Goeddel. + This adds the context security class, and also adds + the string definitions for setsockcreate and polmatch. + +* Tue Oct 17 2006 Dan Walsh - 1.32-1 +- Upgrade to latest from NSA + * Updated version for release. + +* Sun Oct 01 2006 Jesse Keating - 1.30.29-2 +- rebuilt for unwind info generation, broken in gcc-4.1.1-21 + +* Fri Sep 29 2006 Dan Walsh - 1.30.29-1 +- Upgrade to latest from NSA + * Merged av_permissions.h update from Steve Grubb, + adding setsockcreate and polmatch definitions. + +* Wed Sep 27 2006 Jeremy Katz - 1.30.28-3 +- really make -devel depend on libsepol-devel + +* Wed Sep 27 2006 Dan Walsh - 1.30.28-2 +- Add sgrubb patch for polmatch + +* Wed Sep 13 2006 Dan Walsh - 1.30.28-1 +- Upgrade to latest from NSA + * Merged patch from Steve Smalley to fix SIGPIPE in setrans_client + +* Tue Sep 5 2006 Jeremy Katz - 1.30.27-2 +- have -devel require libsepol-devel + +* Thu Aug 24 2006 Dan Walsh - 1.30.27-1 +- Upgrade to latest from NSA + * Merged patch to not log avc stats upon a reset from Steve Grubb. + * Applied patch to revert compat_net setting upon policy load. + * Merged file context homedir and local path functions from + Chris PeBenito. + +* Fri Aug 18 2006 Jesse Keating - 1.20.26-2 +- rebuilt with latest binutils to pick up 64K -z commonpagesize on ppc* + (#203001) + +* Sat Aug 12 2006 Dan Walsh - 1.30.25-1 +- Upgrade to latest from NSA + * Merged file context homedir and local path functions from + Chris PeBenito. + * Rework functions that access /proc/pid/attr to access the + per-thread nodes, and unify the code to simplify maintenance. + +* Fri Aug 11 2006 Dan Walsh - 1.30.24-1 +- Upgrade to latest from NSA + * Merged return value fix for *getfilecon() from Dan Walsh. + * Merged sockcreate interfaces from Eric Paris. + +* Wed Aug 9 2006 Dan Walsh - 1.30.22-2 +- Fix translation return codes to return size of buffer + +* Tue Aug 1 2006 Dan Walsh - 1.30.22-1 +- Upgrade to latest from NSA + * Merged no-tls-direct-seg-refs patch from Jeremy Katz. + * Merged netfilter_contexts support patch from Chris PeBenito. + +* Tue Aug 1 2006 Dan Walsh - 1.30.20-1 +- Upgrade to latest from NSA + * Merged context_*_set errno patch from Jim Meyering. + +* Tue Aug 1 2006 Jeremy Katz - 1.30.19-5 +- only build non-fpic objects with -mno-tls-direct-seg-refs + +* Tue Aug 1 2006 Jeremy Katz - 1.30.19-4 +- build with -mno-tls-direct-seg-refs on x86 to avoid triggering + segfaults with xen (#200783) + +* Mon Jul 17 2006 Dan Walsh 1.30.19-3 +- Rebuild for new gcc + +* Tue Jul 11 2006 Dan Walsh 1.30.19-2 +- Fix libselinux to not telinit during installs + +* Tue Jul 4 2006 Dan Walsh 1.30.19-1 +- Upgrade to latest from NSA + * Lindent. + * Merged {get,set}procattrcon patch set from Eric Paris. + * Merged re-base of keycreate patch originally by Michael LeMay from Eric Paris. + * Regenerated Flask headers from refpolicy. + * Merged patch from Dan Walsh with: + - Added selinux_file_context_{cmp,verify}. + - Added selinux_lsetfilecon_default. + - Delay translation of contexts in matchpathcon. + +* Wed Jun 21 2006 Dan Walsh 1.30.15-5 +- Yet another change to matchpathcon + +* Wed Jun 21 2006 Dan Walsh 1.30.15-4 +- Turn off error printing in library. Need to compile with DEBUG to get it back + +* Wed Jun 21 2006 Dan Walsh 1.30.15-3 +- Fix error reporting of matchpathcon + +* Mon Jun 19 2006 Dan Walsh 1.30.15-2 +- Add function to compare file context on disk versus contexts in file_contexts file. + +* Fri Jun 16 2006 Dan Walsh 1.30.15-1 +- Upgrade to latest from NSA + * Merged patch from Dan Walsh with: + * Added selinux_getpolicytype() function. + * Modified setrans code to skip processing if !mls_enabled. + * Set errno in the !selinux_mnt case. + * Allocate large buffers from the heap, not on stack. + Affects is_context_customizable, selinux_init_load_policy, + and selinux_getenforcemode. + +* Thu Jun 8 2006 Dan Walsh 1.30.12-2 +- Add selinux_getpolicytype() + +* Thu Jun 1 2006 Dan Walsh 1.30.12-1 +- Upgrade to latest from NSA + * Merged !selinux_mnt checks from Ian Kent. + +* Thu Jun 1 2006 Dan Walsh 1.30.11-2 +- Check for selinux_mnt == NULL + +* Tue May 30 2006 Dan Walsh 1.30.11-1 +- Merged matchmediacon and trans_to_raw_context fixes from + Serge Hallyn. + +* Fri May 26 2006 Dan Walsh 1.30.10-4 +- Remove getseuser + +* Thu May 25 2006 Dan Walsh 1.30.10-3 +- Bump requires to grab latest libsepol + +* Tue May 23 2006 Dan Walsh 1.30.10-2 +- Add BuildRequires for swig + +* Tue May 23 2006 Dan Walsh 1.30.10-1 +- Upgrade to latest from NSA + * Merged simple setrans client cache from Dan Walsh. + Merged avcstat patch from Russell Coker. + * Modified selinux_mkload_policy() to also set /selinux/compat_net + appropriately for the loaded policy. + +* Thu May 18 2006 Dan Walsh 1.30.8-1 +- More fixes for translation cache +- Upgrade to latest from NSA + * Added matchpathcon_fini() function to free memory allocated by + matchpathcon_init(). + +* Wed May 17 2006 Dan Walsh 1.30.7-2 +- Add simple cache to improve translation speed + +* Tue May 16 2006 Dan Walsh 1.30.7-1 +- Upgrade to latest from NSA + * Merged setrans client cleanup patch from Steve Grubb. + +* Tue May 9 2006 Dan Walsh 1.30.6-2 +- Add Russell's AVC patch to handle large numbers + +* Mon May 8 2006 Dan Walsh 1.30.6-1 +- Upgrade to latest from NSA + * Merged getfscreatecon man page fix from Dan Walsh. + * Updated booleans(8) man page to drop references to the old + booleans file and to note that setsebool can be used to set + the boot-time defaults via -P. + +* Mon May 8 2006 Dan Walsh 1.30.5-1 +- Upgrade to latest from NSA + * Merged fix warnings patch from Karl MacMillan. + * Merged setrans client support from Dan Walsh. + This removes use of libsetrans. + * Merged patch to eliminate use of PAGE_SIZE constant from Dan Walsh. + * Merged swig typemap fixes from Glauber de Oliveira Costa. + +* Wed May 3 2006 Dan Walsh 1.30.3-3 +- Change the way translations work, Use setransd/remove libsetrans + +* Tue May 2 2006 Dan Walsh 1.30.3-2 +- Add selinuxswig fixes +- Stop using PAGE_SIZE and start using sysconf(_SC_PAGE_SIZE) + +* Fri Apr 14 2006 Dan Walsh 1.30.3-1 +- Upgrade to latest from NSA + * Added distclean target to Makefile. + * Regenerated swig files. + * Changed matchpathcon_init to verify that the spec file is + a regular file. + * Merged python binding t_output_helper removal patch from Dan Walsh. + +* Tue Apr 11 2006 Dan Walsh 1.30.1-2 +- Fix python bindings for matchpathcon +- Fix booleans man page + +* Mon Mar 27 2006 Dan Walsh 1.30.1-1 +- Merged Makefile PYLIBVER definition patch from Dan Walsh. + +* Fri Mar 10 2006 Dan Walsh 1.30-1 +- Make some fixes so it will build on RHEL4 +- Upgrade to latest from NSA + * Updated version for release. + * Altered rpm_execcon fallback logic for permissive mode to also + handle case where /selinux/enforce is not available. + +* Fri Feb 10 2006 Jesse Keating - 1.29.7-1.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 1.29.7-1.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Jan 20 2006 Dan Walsh 1.29.7-1 +- Upgrade to latest from NSA + * Merged install-pywrap Makefile patch from Joshua Brindle. + +* Wed Jan 18 2006 Dan Walsh 1.29.6-1 +- Upgrade to latest from NSA + * Merged pywrap Makefile patch from Dan Walsh. + +* Fri Jan 13 2006 Dan Walsh 1.29.5-2 +- Split out pywrap in Makefile + +* Fri Jan 13 2006 Dan Walsh 1.29.5-1 +- Upgrade to latest from NSA + * Added getseuser test program. + +* Fri Jan 6 2006 Dan Walsh 1.29.4-1 +- Upgrade to latest from NSA + * Added format attribute to myprintf in matchpathcon.c and + removed obsoleted rootlen variable in init_selinux_config(). + +* Wed Jan 4 2006 Dan Walsh 1.29.3-2 +- Build with new libsepol + +* Wed Jan 4 2006 Dan Walsh 1.29.3-1 +- Upgrade to latest from NSA + * Merged several fixes and improvements from Ulrich Drepper + (Red Hat), including: + - corrected use of getline + - further calls to __fsetlocking for local files + - use of strdupa and asprintf + - proper handling of dirent in booleans code + - use of -z relro + - several other optimizations + * Merged getpidcon python wrapper from Dan Walsh (Red Hat). + +* Sat Dec 24 2005 Dan Walsh 1.29.2-4 +- Add build requires line for libsepol-devel + +* Tue Dec 20 2005 Dan Walsh 1.29.2-3 +- Fix swig call for getpidcon + +* Mon Dec 19 2005 Dan Walsh 1.29.2-2 +- Move libselinux.so to base package + +* Wed Dec 14 2005 Dan Walsh 1.29.2-1 +- Upgrade to latest from NSA + * Merged call to finish_context_translations from Dan Walsh. + This eliminates a memory leak from failing to release memory + allocated by libsetrans. + +* Sun Dec 11 2005 Dan Walsh 1.29.1-3 +- update to latest libsetrans +- Fix potential memory leak + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Thu Dec 8 2005 Dan Walsh 1.29.1-1 +- Update to never version + * Merged patch for swig interfaces from Dan Walsh. + +* Wed Dec 7 2005 Dan Walsh 1.28-1 +- Update to never version + +* Wed Dec 7 2005 Dan Walsh 1.27.28-2 +- Fix some of the python swig objects + +* Thu Dec 1 2005 Dan Walsh 1.27.28-1 +- Update to latest from NSA + * Added MATCHPATHCON_VALIDATE flag for set_matchpathcon_flags() and + modified matchpathcon implementation to make context validation/ + canonicalization optional at matchpathcon_init time, deferring it + to a successful matchpathcon by default unless the new flag is set + by the caller. + * Added matchpathcon_init_prefix() interface, and + reworked matchpathcon implementation to support selective + loading of file contexts entries based on prefix matching + between the pathname regex stems and the specified path + prefix (stem must be a prefix of the specified path prefix). + +* Wed Nov 30 2005 Dan Walsh 1.27.26-1 +- Update to latest from NSA + * Change getsebool to return on/off instead of active/inactive + +* Tue Nov 29 2005 Dan Walsh 1.27.25-1 +- Update to latest from NSA + * Added -f file_contexts option to matchpathcon util. + Fixed warning message in matchpathcon_init(). + * Merged Makefile python definitions patch from Dan Walsh. + +* Mon Nov 28 2005 Dan Walsh 1.27.23-1 +- Update to latest from NSA + * Merged swigify patch from Dan Walsh. + +* Mon Nov 28 2005 Dan Walsh 1.27.22-4 +- Separate out libselinux-python bindings into separate rpm + +* Thu Nov 17 2005 Dan Walsh 1.27.22-3 +- Read libsetrans requirement + +* Thu Nov 17 2005 Dan Walsh 1.27.22-2 +- Add python bindings + +* Wed Nov 16 2005 Dan Walsh 1.27.22-1 +- Update to latest from NSA + * Merged make failure in rpm_execcon non-fatal in permissive mode + patch from Ivan Gyurdiev. + +* Tue Nov 15 2005 Dan Walsh 1.27.21-2 +- Remove requirement for libsetrans + +* Tue Nov 8 2005 Dan Walsh 1.27.21-1 +- Update to latest from NSA + * Added MATCHPATHCON_NOTRANS flag for set_matchpathcon_flags() + and modified matchpathcon_init() to skip context translation + if it is set by the caller. + +* Tue Nov 8 2005 Dan Walsh 1.27.20-1 +- Update to latest from NSA + * Added security_canonicalize_context() interface and + set_matchpathcon_canoncon() interface for obtaining + canonical contexts. Changed matchpathcon internals + to obtain canonical contexts by default. Provided + fallback for kernels that lack extended selinuxfs context + interface. +- Patch to not translate mls when calling setfiles + +* Mon Nov 7 2005 Dan Walsh 1.27.19-1 +- Update to latest from NSA + * Merged seusers parser changes from Ivan Gyurdiev. + * Merged setsebool to libsemanage patch from Ivan Gyurdiev. + * Changed seusers parser to reject empty fields. + +* Fri Nov 4 2005 Dan Walsh 1.27.18-1 +- Update to latest from NSA + * Merged seusers empty level handling patch from Jonathan Kim (TCS). + +* Thu Nov 3 2005 Dan Walsh 1.27.17-4 +- Rebuild for latest libsepol + +* Mon Oct 31 2005 Dan Walsh 1.27.17-2 +- Rebuild for latest libsepol + +* Wed Oct 26 2005 Dan Walsh 1.27.17-1 +- Change default to __default__ + +* Wed Oct 26 2005 Dan Walsh 1.27.14-3 +- Change default to __default__ + +* Tue Oct 25 2005 Dan Walsh 1.27.14-2 +- Add selinux_translations_path + +* Tue Oct 25 2005 Dan Walsh 1.27.14-1 +- Update to latest from NSA + * Merged selinux_path() and selinux_homedir_context_path() + functions from Joshua Brindle. + +* Fri Oct 21 2005 Dan Walsh 1.27.13-2 +- Need to check for /sbin/telinit + +* Thu Oct 20 2005 Dan Walsh 1.27.13-1 +- Update to latest from NSA + * Merged fixes for make DESTDIR= builds from Joshua Brindle. + +* Mon Oct 17 2005 Dan Walsh 1.27.12-1 +- Update to latest from NSA + * Merged get_default_context_with_rolelevel and man pages from + Dan Walsh (Red Hat). + * Updated call to sepol_policydb_to_image for sepol changes. + * Changed getseuserbyname to ignore empty lines and to handle + no matching entry in the same manner as no seusers file. + +* Fri Oct 14 2005 Dan Walsh 1.27.9-2 +- Tell init to reexec itself in post script + +* Fri Oct 7 2005 Dan Walsh 1.27.9-1 +- Update to latest from NSA + * Changed selinux_mkload_policy to try downgrading the + latest policy version available to the kernel-supported version. + * Changed selinux_mkload_policy to fall back to the maximum + policy version supported by libsepol if the kernel policy version + falls outside of the supported range. + +* Fri Oct 7 2005 Dan Walsh 1.27.7-1 +- Update to latest from NSA + * Changed getseuserbyname to fall back to the Linux username and + NULL level if seusers config file doesn't exist unless + REQUIRESEUSERS=1 is set in /etc/selinux/config. + * Moved seusers.conf under $SELINUXTYPE and renamed to seusers. + +* Thu Oct 6 2005 Dan Walsh 1.27.6-1 +- Update to latest from NSA + * Added selinux_init_load_policy() function as an even higher level + interface for the initial policy load by /sbin/init. This obsoletes + the load_policy() function in the sysvinit-selinux.patch. + * Added selinux_mkload_policy() function as a higher level interface + for loading policy than the security_load_policy() interface. + +* Thu Oct 6 2005 Dan Walsh 1.27.4-1 +- Update to latest from NSA + * Merged fix for matchpathcon (regcomp error checking) from Johan + Fischer. Also added use of regerror to obtain the error string + for inclusion in the error message. + +* Tue Oct 4 2005 Dan Walsh 1.27.3-1 +- Update to latest from NSA + * Changed getseuserbyname to not require (and ignore if present) + the MLS level in seusers.conf if MLS is disabled, setting *level + to NULL in this case. + +* Mon Oct 3 2005 Dan Walsh 1.27.2-1 +- Update to latest from NSA + * Merged getseuserbyname patch from Dan Walsh. + +* Thu Sep 29 2005 Dan Walsh 1.27.1-3 +- Fix patch to satisfy upstream + +* Wed Sep 28 2005 Dan Walsh 1.27.1-2 +- Update to latest from NSA +- Add getseuserbyname + +* Fri Sep 16 2005 Dan Walsh 1.26-6 +- Fix patch call + +* Tue Sep 13 2005 Dan Walsh 1.26-5 +- Fix strip_con call + +* Tue Sep 13 2005 Dan Walsh 1.26-3 +- Go back to original libsetrans code + +* Mon Sep 12 2005 Dan Walsh 1.26-2 +- Eliminate forth param from mls context when mls is not enabled. + +* Tue Sep 6 2005 Dan Walsh 1.25.7-1 +- Update from NSA + * Merged modified form of patch to avoid dlopen/dlclose by + the static libselinux from Dan Walsh. Users of the static libselinux + will not have any context translation by default. + +* Thu Sep 1 2005 Dan Walsh 1.25.6-1 +- Update from NSA + * Added public functions to export context translation to + users of libselinux (selinux_trans_to_raw_context, + selinux_raw_to_trans_context). + +* Mon Aug 29 2005 Dan Walsh 1.25.5-1 +- Update from NSA + * Remove special definition for context_range_set; use + common code. + +* Thu Aug 25 2005 Dan Walsh 1.25.4-1 +- Update from NSA + * Hid translation-related symbols entirely and ensured that + raw functions have hidden definitions for internal use. + * Allowed setting NULL via context_set* functions. + * Allowed whitespace in MLS component of context. + * Changed rpm_execcon to use translated functions to workaround + lack of MLS level on upgraded systems. + +* Wed Aug 24 2005 Dan Walsh 1.25.3-2 +- Allow set_comp on unset ranges + +* Wed Aug 24 2005 Dan Walsh 1.25.3-1 +- Merged context translation patch, originally by TCS, + with modifications by Dan Walsh (Red Hat). + +* Wed Aug 17 2005 Dan Walsh 1.25.2-2 +- Apply translation patch + +* Thu Aug 11 2005 Dan Walsh 1.25.2-1 +- Update from NSA + * Merged several fixes for error handling paths in the + AVC sidtab, matchpathcon, booleans, context, and get_context_list + code from Serge Hallyn (IBM). Bugs found by Coverity. + * Removed setupns; migrated to pam. + * Merged patches to rename checkPasswdAccess() from Joshua Brindle. + Original symbol is temporarily retained for compatibility until + all callers are updated. + +* Mon Jul 18 2005 Dan Walsh 1.24.2-1 +- Update makefiles + +* Wed Jun 29 2005 Dan Walsh 1.24.1-1 +- Update from NSA + * Merged security_setupns() from Chad Sellers. +- fix selinuxenabled man page + +* Fri May 20 2005 Dan Walsh 1.23.11-1 +- Update from NSA + * Merged avcstat and selinux man page from Dan Walsh. + * Changed security_load_booleans to process booleans.local + even if booleans file doesn't exist. + +* Fri Apr 29 2005 Dan Walsh 1.23.10-3 +- Fix avcstat to clear totals + +* Fri Apr 29 2005 Dan Walsh 1.23.10-2 +- Add info to man page + +* Fri Apr 29 2005 Dan Walsh 1.23.10-1 +- Update from NSA + * Merged set_selinuxmnt patch from Bill Nottingham (Red Hat). + * Rewrote get_ordered_context_list and helpers, including + changing logic to allow variable MLS fields. + +* Tue Apr 26 2005 Dan Walsh 1.23.8-1 +- Update from NSA + +* Thu Apr 21 2005 Dan Walsh 1.23.7-3 +- Add backin matchpathcon + +* Wed Apr 13 2005 Dan Walsh 1.23.7-2 +- Fix selinux_policy_root man page + +* Wed Apr 13 2005 Dan Walsh 1.23.7-1 +- Change assert(selinux_mnt) to if (!selinux_mnt) return -1; + +* Mon Apr 11 2005 Dan Walsh 1.23.6-1 +- Update from NSA + * Fixed bug in matchpathcon_filespec_destroy. + +* Wed Apr 6 2005 Dan Walsh 1.23.5-1 +- Update from NSA + * Fixed bug in rpm_execcon error handling path. + +* Mon Apr 4 2005 Dan Walsh 1.23.4-1 +- Update from NSA + * Merged fix for set_matchpathcon* functions from Andreas Steinmetz. + * Merged fix for getconlist utility from Andreas Steinmetz. + +* Tue Mar 29 2005 Dan Walsh 1.23.2-3 +- Update from NSA + +* Wed Mar 23 2005 Dan Walsh 1.23.2-2 +- Better handling of booleans + +* Thu Mar 17 2005 Dan Walsh 1.23.2-1 +- Update from NSA + * Merged destructors patch from Tomas Mraz. + +* Thu Mar 17 2005 Dan Walsh 1.23.1-1 +- Update from NSA + * Added set_matchpathcon_flags() function for setting flags + controlling operation of matchpathcon. MATCHPATHCON_BASEONLY + means only process the base file_contexts file, not + file_contexts.homedirs or file_contexts.local, and is for use by + setfiles -c. + * Updated matchpathcon.3 man page. + +* Thu Mar 10 2005 Dan Walsh 1.22-1 +- Update from NSA + +* Tue Mar 8 2005 Dan Walsh 1.21.13-1 +- Update from NSA + * Fixed bug in matchpathcon_filespec_add() - failure to clear fl_head. + +* Tue Mar 1 2005 Dan Walsh 1.21.12-1 +- Update from NSA + * Changed matchpathcon_common to ignore any non-format bits in the mode. + +* Mon Feb 28 2005 Dan Walsh 1.21.11-2 +- Default matchpathcon to regular files if the user specifies a mode + +* Tue Feb 22 2005 Dan Walsh 1.21.11-1 +- Update from NSA + * Merged several fixes from Ulrich Drepper. + +* Mon Feb 21 2005 Dan Walsh 1.21.10-3 +- Fix matchpathcon on eof. + +* Thu Feb 17 2005 Dan Walsh 1.21.10-1 +- Update from NSA + * Merged matchpathcon patch for file_contexts.homedir from Dan Walsh. + * Added selinux_users_path() for path to directory containing + system.users and local.users. + +* Thu Feb 10 2005 Dan Walsh 1.21.9-2 +- Process file_context.homedir + +* Thu Feb 10 2005 Dan Walsh 1.21.9-1 +- Update from NSA + * Changed relabel Makefile target to use restorecon. + +* Tue Feb 8 2005 Dan Walsh 1.21.8-1 +- Update from NSA + * Regenerated av_permissions.h. + +* Wed Feb 2 2005 Dan Walsh 1.21.7-1 +- Update from NSA + * Modified avc_dump_av to explicitly check for any permissions that + cannot be mapped to string names and display them as a hex value. + * Regenerated av_permissions.h. + +* Mon Jan 31 2005 Dan Walsh 1.21.5-1 +- Update from NSA + * Generalized matchpathcon internals, exported more interfaces, + and moved additional code from setfiles into libselinux so that + setfiles can directly use matchpathcon. + +* Fri Jan 28 2005 Dan Walsh 1.21.4-1 +- Update from NSA + * Prevent overflow of spec array in matchpathcon. + * Fixed several uses of internal functions to avoid relocations. + * Changed rpm_execcon to check is_selinux_enabled() and fallback to + a regular execve if not enabled (or unable to determine due to a lack + of /proc, e.g. chroot'd environment). + +* Wed Jan 26 2005 Dan Walsh 1.21.2-1 +- Update from NSA + * Merged minor fix for avcstat from Dan Walsh. + +* Mon Jan 24 2005 Dan Walsh 1.21.1-3 +- rpmexeccon should not fail in permissive mode. + +* Fri Jan 21 2005 Dan Walsh 1.21.1-2 +- fix printf in avcstat + +* Thu Jan 20 2005 Dan Walsh 1.21.1-1 +- Update from NSA + +* Wed Jan 12 2005 Dan Walsh 1.20.1-3 +- Modify matchpathcon to also process file_contexts.local if it exists + +* Wed Jan 12 2005 Dan Walsh 1.20.1-2 +- Add is_customizable_types function call + +* Fri Jan 7 2005 Dan Walsh 1.20.1-1 +- Update to latest from upstream + * Just changing version number to match upstream + +* Wed Dec 29 2004 Dan Walsh 1.19.4-1 +- Update to latest from upstream + * Changed matchpathcon to return -1 with errno ENOENT for + <> entries, and also for an empty file_contexts configuration. + +* Tue Dec 28 2004 Dan Walsh 1.19.3-3 +- Fix link devel libraries + +* Mon Dec 27 2004 Dan Walsh 1.19.3-2 +- Fix unitialized variable in avcstat.c + +* Tue Nov 30 2004 Dan Walsh 1.19.3-1 +- Upgrade to upstream + * Removed some trivial utils that were not useful or redundant. + * Changed BINDIR default to /usr/sbin to match change in Fedora. + * Added security_compute_member. + * Added man page for setcon. + +* Tue Nov 30 2004 Dan Walsh 1.19.2-1 +- Upgrade to upstream + +* Thu Nov 18 2004 Dan Walsh 1.19.1-6 +- Add avcstat program + +* Mon Nov 15 2004 Dan Walsh 1.19.1-4 +- Add lots of missing man pages + +* Fri Nov 12 2004 Dan Walsh 1.19.1-2 +- Fix output of getsebool. + +* Tue Nov 9 2004 Dan Walsh 1.19.1-1 +- Update from upstream, fix setsebool -P segfault + +* Fri Nov 5 2004 Steve Grubb 1.18.1-5 +- Add a patch from upstream. Fixes signed/unsigned issues, and + incomplete structure copy. + +* Thu Nov 4 2004 Dan Walsh 1.18.1-4 +- More fixes from sgrubb, better syslog + +* Thu Nov 4 2004 Dan Walsh 1.18.1-3 +- Have setsebool and togglesebool log changes to syslog + +* Wed Nov 3 2004 Steve Grubb 1.18.1-2 +- Add patch to make setsebool update bool on disk +- Make togglesebool have a rollback capability in case it blows up inflight + +* Tue Nov 2 2004 Dan Walsh 1.18.1-1 +- Upgrade to latest from NSA + +* Thu Oct 28 2004 Steve Grubb 1.17.15-2 +- Changed the location of the utilities to /usr/sbin since + normal users can't use them anyways. + +* Wed Oct 27 2004 Steve Grubb 1.17.15-2 +- Updated various utilities, removed utilities that are for testing, + added man pages. + +* Fri Oct 15 2004 Dan Walsh 1.17.15-1 +- Add -g flag to make +- Upgrade to latest from NSA + * Added rpm_execcon. + +* Fri Oct 1 2004 Dan Walsh 1.17.14-1 +- Upgrade to latest from NSA + * Merged setenforce and removable context patch from Dan Walsh. + * Merged build fix for alpha from Ulrich Drepper. + * Removed copyright/license from selinux_netlink.h - definitions only. + +* Fri Oct 1 2004 Dan Walsh 1.17.13-3 +- Change setenforce to accept Enforcing and Permissive + +* Wed Sep 22 2004 Dan Walsh 1.17.13-2 +- Add alpha patch + +* Mon Sep 20 2004 Dan Walsh 1.17.13-1 +- Upgrade to latest from NSA + +* Thu Sep 16 2004 Dan Walsh 1.17.12-2 +- Add selinux_removable_context_path + +* Tue Sep 14 2004 Dan Walsh 1.17.12-1 +- Update from NSA + * Add matchmediacon + +* Tue Sep 14 2004 Dan Walsh 1.17.11-1 +- Update from NSA + * Merged in matchmediacon changes. + +* Fri Sep 10 2004 Dan Walsh 1.17.10-1 +- Update from NSA + * Regenerated headers for new nscd permissions. + +* Wed Sep 8 2004 Dan Walsh 1.17.9-2 +- Add matchmediacon + +* Wed Sep 8 2004 Dan Walsh 1.17.9-1 +- Update from NSA + * Added get_default_context_with_role. + +* Thu Sep 2 2004 Dan Walsh 1.17.8-2 +- Clean up spec file + * Patch from Matthias Saou + +* Thu Sep 2 2004 Dan Walsh 1.17.8-1 +- Update from NSA + * Added set_matchpathcon_printf. + +* Wed Sep 1 2004 Dan Walsh 1.17.7-1 +- Update from NSA + * Reworked av_inherit.h to allow easier re-use by kernel. + +* Tue Aug 31 2004 Dan Walsh 1.17.6-1 +- Add strcasecmp in selinux_config +- Update from NSA + * Changed avc_has_perm_noaudit to not fail on netlink errors. + * Changed avc netlink code to check pid based on patch by Steve Grubb. + * Merged second optimization patch from Ulrich Drepper. + * Changed matchpathcon to skip invalid file_contexts entries. + * Made string tables private to libselinux. + * Merged strcat->stpcpy patch from Ulrich Drepper. + * Merged matchpathcon man page from Dan Walsh. + * Merged patch to eliminate PLTs for local syms from Ulrich Drepper. + * Autobind netlink socket. + * Dropped compatibility code from security_compute_user. + * Merged fix for context_range_set from Chad Hanson. + * Merged allocation failure checking patch from Chad Hanson. + * Merged avc netlink error message patch from Colin Walters. + + +* Mon Aug 30 2004 Dan Walsh 1.17.5-1 +- Update from NSA + * Merged second optimization patch from Ulrich Drepper. + * Changed matchpathcon to skip invalid file_contexts entries. + * Made string tables private to libselinux. + * Merged strcat->stpcpy patch from Ulrich Drepper. + * Merged matchpathcon man page from Dan Walsh. + * Merged patch to eliminate PLTs for local syms from Ulrich Drepper. + * Autobind netlink socket. + * Dropped compatibility code from security_compute_user. + * Merged fix for context_range_set from Chad Hanson. + * Merged allocation failure checking patch from Chad Hanson. + * Merged avc netlink error message patch from Colin Walters. + +* Mon Aug 30 2004 Dan Walsh 1.17.4-1 +- Update from NSA +- Add optflags + +* Fri Aug 27 2004 Dan Walsh 1.17.3-1 +- Update from NSA + +* Thu Aug 26 2004 Dan Walsh 1.17.2-1 +- Add matchpathcon man page +- Latest from NSA + * Merged patch to eliminate PLTs for local syms from Ulrich Drepper. + * Autobind netlink socket. + * Dropped compatibility code from security_compute_user. + * Merged fix for context_range_set from Chad Hanson. + * Merged allocation failure checking patch from Chad Hanson. + * Merged avc netlink error message patch from Colin Walters. + +* Tue Aug 24 2004 Dan Walsh 1.17.1-1 +- Latest from NSA + * Autobind netlink socket. + * Dropped compatibility code from security_compute_user. + * Merged fix for context_range_set from Chad Hanson. + * Merged allocation failure checking patch from Chad Hanson. + * Merged avc netlink error message patch from Colin Walters. + +* Sun Aug 22 2004 Dan Walsh 1.16.1-1 +- Latest from NSA + +* Thu Aug 19 2004 Colin Walters 1.16-1 +- New upstream version + +* Tue Aug 17 2004 Dan Walsh 1.15.7-1 +- Latest from Upstream + +* Mon Aug 16 2004 Dan Walsh 1.15.6-1 +- Fix man pages + +* Mon Aug 16 2004 Dan Walsh 1.15.5-1 +- Latest from Upstream + +* Fri Aug 13 2004 Dan Walsh 1.15.4-1 +- Latest from Upstream + +* Thu Aug 12 2004 Dan Walsh 1.15.3-2 +- Add man page for boolean functions and SELinux + +* Sun Aug 8 2004 Dan Walsh 1.15.3-1 +- Latest from NSA + +* Mon Jul 19 2004 Dan Walsh 1.15.2-1 +- Latest from NSA + +* Mon Jul 19 2004 Dan Walsh 1.15.1-3 +- uppercase getenforce returns, to make them match system-config-securitylevel + +* Thu Jul 15 2004 Dan Walsh 1.15.1-2 +- Remove old path patch + +* Thu Jul 8 2004 Dan Walsh 1.15.1-1 +- Update to latest from NSA +- Add fix to only get old path if file_context file exists in old location + +* Wed Jun 30 2004 Dan Walsh 1.14.1-1 +- Update to latest from NSA + +* Wed Jun 16 2004 Dan Walsh 1.13.4-1 +- add nlclass patch +- Update to latest from NSA + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Sun Jun 13 2004 Dan Walsh 1.13.3-2 +- Fix selinux_config to break once it finds SELINUXTYPE. + +* Fri May 28 2004 Dan Walsh 1.13.2-1 +-Update with latest from NSA + +* Thu May 27 2004 Dan Walsh 1.13.1-1 +- Change to use new policy mechanism + +* Mon May 17 2004 Dan Walsh 1.12-2 +- add man patch + +* Fri May 14 2004 Dan Walsh 1.12-1 +- Update with latest from NSA + +* Wed May 5 2004 Dan Walsh 1.11.4-1 +- Update with latest from NSA + +* Thu Apr 22 2004 Dan Walsh 1.11.3-1 +- Add changes for relaxed policy +- Update to match NSA + +* Thu Apr 15 2004 Dan Walsh 1.11.2-1 +- Add relaxed policy changes + +* Thu Apr 15 2004 Dan Walsh 1.11-4 +- Sync with NSA + +* Thu Apr 15 2004 Dan Walsh 1.11-3 +- Remove requires glibc>2.3.4 + +* Wed Apr 14 2004 Dan Walsh 1.11-2 +- Fix selinuxenabled man page. + +* Wed Apr 7 2004 Dan Walsh 1.11-1 +- Upgrade to 1.11 + +* Wed Apr 7 2004 Dan Walsh 1.10-2 +- Add memleaks patch + +* Wed Apr 7 2004 Dan Walsh 1.10-1 +- Upgrade to latest from NSA and add more man pages + +* Thu Apr 1 2004 Dan Walsh 1.9-1 +- Update to match NSA +- Cleanup some man pages + +* Tue Mar 30 2004 Dan Walsh 1.8-1 +- Upgrade to latest from NSA + +* Thu Mar 25 2004 Dan Walsh 1.6-6 +- Add Russell's Man pages + +* Thu Mar 25 2004 Dan Walsh 1.6-5 +- Change getenforce to also check is_selinux_enabled + +* Thu Mar 25 2004 Dan Walsh 1.6-4 +- Add ownership to /usr/include/selinux + +* Wed Mar 10 2004 Dan Walsh 1.6-3 +- fix location of file_contexts file. + +* Wed Mar 10 2004 Dan Walsh 1.6-2 +- Fix matchpathcon to use BUFSIZ + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Mon Feb 23 2004 Dan Walsh 1.4-11 +- add matchpathcon + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Fri Jan 23 2004 Dan Walsh 1.4-9 +- Add rootok patch + +* Wed Jan 14 2004 Dan Walsh 1.4-8 +- Updated getpeernam patch + +* Tue Jan 13 2004 Dan Walsh 1.4-7 +- Add getpeernam patch + +* Thu Dec 18 2003 Dan Walsh 1.4-6 +- Add getpeercon patch + +* Thu Dec 18 2003 Dan Walsh 1.4-5 +- Put mntpoint patch, because found fix for SysVinit + +* Wed Dec 17 2003 Dan Walsh 1.4-4 +- Add remove mntpoint patch, because it breaks SysVinit + +* Wed Dec 17 2003 Dan Walsh 1.4-3 +- Add mntpoint patch for SysVinit + +* Fri Dec 12 2003 Dan Walsh 1.4-2 +- Add -r -u -t to getcon + +* Sat Dec 6 2003 Dan Walsh 1.4-1 +- Upgrade to latest from NSA + +* Mon Oct 27 2003 Dan Walsh 1.3-2 +- Fix x86_64 build + +* Wed Oct 22 2003 Dan Walsh 1.3-1 +- Latest tarball from NSA. + +* Tue Oct 21 2003 Dan Walsh 1.2-9 +- Update with latest changes from NSA + +* Mon Oct 20 2003 Dan Walsh 1.2-8 +- Change location of .so file + +* Wed Oct 8 2003 Dan Walsh 1.2-7 +- Break out into development library + +* Wed Oct 8 2003 Dan Walsh 1.2-6 +- Move location of libselinux.so to /lib + +* Fri Oct 3 2003 Dan Walsh 1.2-5 +- Add selinuxenabled patch + +* Wed Oct 1 2003 Dan Walsh 1.2-4 +- Update with final NSA 1.2 sources. + +* Fri Sep 12 2003 Dan Walsh 1.2-3 +- Update with latest from NSA. + +* Thu Aug 28 2003 Dan Walsh 1.2-2 +- Fix to build on x86_64 + +* Thu Aug 21 2003 Dan Walsh 1.2-1 +- update for version 1.2 + +* Tue May 27 2003 Dan Walsh 1.0-1 +- Initial version