From a66522107bef95dc349a7166cd463443d0cdc1ef Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 23 Jun 2009 19:54:03 +0000 Subject: [PATCH] - 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. --- .cvsignore | 1 + libselinux-rhat.patch | 60 ++++++++++++++++++++----------------------- libselinux.spec | 8 +++++- sources | 2 +- 4 files changed, 37 insertions(+), 34 deletions(-) diff --git a/.cvsignore b/.cvsignore index 92419ea..8cace8f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -165,3 +165,4 @@ libselinux-2.0.78.tgz libselinux-2.0.79.tgz libselinux-2.0.80.tgz libselinux-2.0.81.tgz +libselinux-2.0.82.tgz diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index 2422d1c..9d1595d 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -1,6 +1,6 @@ -diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/selinux.h libselinux-2.0.81/include/selinux/selinux.h +diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/selinux.h libselinux-2.0.82/include/selinux/selinux.h --- nsalibselinux/include/selinux/selinux.h 2009-06-23 15:36:07.000000000 -0400 -+++ libselinux-2.0.81/include/selinux/selinux.h 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/include/selinux/selinux.h 2009-06-23 15:49:12.000000000 -0400 @@ -547,6 +547,14 @@ Caller must free the returned strings via free. */ extern int getseuserbyname(const char *linuxuser, char **seuser, char **level); @@ -16,9 +16,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/selinux.h lib /* Compare two file contexts, return 0 if equivalent. */ int selinux_file_context_cmp(const security_context_t a, const security_context_t b); -diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxconlist.8 libselinux-2.0.81/man/man8/selinuxconlist.8 +diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxconlist.8 libselinux-2.0.82/man/man8/selinuxconlist.8 --- nsalibselinux/man/man8/selinuxconlist.8 1969-12-31 19:00:00.000000000 -0500 -+++ libselinux-2.0.81/man/man8/selinuxconlist.8 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/man/man8/selinuxconlist.8 2009-06-23 15:49:12.000000000 -0400 @@ -0,0 +1,18 @@ +.TH "selinuxconlist" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation" +.SH "NAME" @@ -38,9 +38,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxconlist.8 lib + +.SH "SEE ALSO" +secon(8), selinuxdefcon(8) -diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxdefcon.8 libselinux-2.0.81/man/man8/selinuxdefcon.8 +diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxdefcon.8 libselinux-2.0.82/man/man8/selinuxdefcon.8 --- nsalibselinux/man/man8/selinuxdefcon.8 1969-12-31 19:00:00.000000000 -0500 -+++ libselinux-2.0.81/man/man8/selinuxdefcon.8 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/man/man8/selinuxdefcon.8 2009-06-23 15:49:12.000000000 -0400 @@ -0,0 +1,19 @@ +.TH "selinuxdefcon" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation" +.SH "NAME" @@ -61,9 +61,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxdefcon.8 libs + +.SH "SEE ALSO" +secon(8), selinuxconlist(8) -diff --exclude-from=exclude -N -u -r nsalibselinux/src/callbacks.c libselinux-2.0.81/src/callbacks.c +diff --exclude-from=exclude -N -u -r nsalibselinux/src/callbacks.c libselinux-2.0.82/src/callbacks.c --- nsalibselinux/src/callbacks.c 2009-04-08 09:06:23.000000000 -0400 -+++ libselinux-2.0.81/src/callbacks.c 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/src/callbacks.c 2009-06-23 15:49:12.000000000 -0400 @@ -16,6 +16,7 @@ { int rc; @@ -72,9 +72,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/callbacks.c libselinux-2. va_start(ap, fmt); rc = vfprintf(stderr, fmt, ap); va_end(ap); -diff --exclude-from=exclude -N -u -r nsalibselinux/src/exception.sh libselinux-2.0.81/src/exception.sh +diff --exclude-from=exclude -N -u -r nsalibselinux/src/exception.sh libselinux-2.0.82/src/exception.sh --- nsalibselinux/src/exception.sh 1969-12-31 19:00:00.000000000 -0500 -+++ libselinux-2.0.81/src/exception.sh 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/src/exception.sh 2009-06-23 15:49:12.000000000 -0400 @@ -0,0 +1,12 @@ +function except() { +echo " @@ -88,15 +88,11 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/exception.sh libselinux-2 +" +} +for i in `grep "extern *int" ../include/selinux/selinux.h | awk '{ print $3 }' | cut -d '(' -f 1`; do except $i ; done -diff --exclude-from=exclude -N -u -r nsalibselinux/src/Makefile libselinux-2.0.81/src/Makefile +diff --exclude-from=exclude -N -u -r nsalibselinux/src/Makefile libselinux-2.0.82/src/Makefile --- nsalibselinux/src/Makefile 2009-06-23 15:36:07.000000000 -0400 -+++ libselinux-2.0.81/src/Makefile 2009-05-18 14:04:07.000000000 -0400 -@@ -79,9 +79,12 @@ - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux -L$(LIBDIR) -Wl,-soname,$@ - - $(LIBSO): $(LOBJS) -- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -ldl -lpthread -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro -+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -ldl -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro ++++ libselinux-2.0.82/src/Makefile 2009-06-23 15:50:58.000000000 -0400 +@@ -82,6 +82,9 @@ + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -ldl -lpthread -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro ln -sf $@ $(TARGET) +selinuxswig_exception.i: ../include/selinux/selinux.h @@ -125,9 +121,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/Makefile libselinux-2.0.8 distclean: clean rm -f $(GENERATED) $(SWIGFILES) -diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.81/src/matchpathcon.c +diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.82/src/matchpathcon.c --- nsalibselinux/src/matchpathcon.c 2009-03-06 14:41:45.000000000 -0500 -+++ libselinux-2.0.81/src/matchpathcon.c 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/src/matchpathcon.c 2009-06-23 15:49:12.000000000 -0400 @@ -2,6 +2,7 @@ #include #include @@ -145,9 +141,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux va_end(ap); } -diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0.81/src/selinux.py +diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0.82/src/selinux.py --- nsalibselinux/src/selinux.py 2009-03-06 14:41:45.000000000 -0500 -+++ libselinux-2.0.81/src/selinux.py 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/src/selinux.py 2009-06-23 15:49:12.000000000 -0400 @@ -1,12 +1,26 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.35 @@ -2359,9 +2355,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 +selinux_lsetfilecon_default = _selinux.selinux_lsetfilecon_default -diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-2.0.81/src/selinuxswig.i +diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-2.0.82/src/selinuxswig.i --- nsalibselinux/src/selinuxswig.i 2009-03-12 08:48:48.000000000 -0400 -+++ libselinux-2.0.81/src/selinuxswig.i 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/src/selinuxswig.i 2009-06-23 15:49:12.000000000 -0400 @@ -4,11 +4,14 @@ %module selinux @@ -2395,9 +2391,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux- +%include "../include/selinux/get_default_type.h" +%include "../include/selinux/label.h" +%include "../include/selinux/selinux.h" -diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libselinux-2.0.81/src/selinuxswig_python.i +diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libselinux-2.0.82/src/selinuxswig_python.i --- nsalibselinux/src/selinuxswig_python.i 2009-03-06 14:41:45.000000000 -0500 -+++ libselinux-2.0.81/src/selinuxswig_python.i 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/src/selinuxswig_python.i 2009-06-23 15:49:12.000000000 -0400 @@ -21,6 +21,15 @@ map(restorecon, [os.path.join(dirname, fname) for fname in fnames]), None) @@ -2420,9 +2416,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libs +%include "selinuxswig_exception.i" %include "selinuxswig.i" -diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libselinux-2.0.81/src/selinuxswig_wrap.c +diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libselinux-2.0.82/src/selinuxswig_wrap.c --- nsalibselinux/src/selinuxswig_wrap.c 2009-03-06 14:41:45.000000000 -0500 -+++ libselinux-2.0.81/src/selinuxswig_wrap.c 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/src/selinuxswig_wrap.c 2009-06-23 15:49:12.000000000 -0400 @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). @@ -16808,9 +16804,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel +#endif } -diff --exclude-from=exclude -N -u -r nsalibselinux/src/seusers.c libselinux-2.0.81/src/seusers.c +diff --exclude-from=exclude -N -u -r nsalibselinux/src/seusers.c libselinux-2.0.82/src/seusers.c --- nsalibselinux/src/seusers.c 2009-03-06 14:41:45.000000000 -0500 -+++ libselinux-2.0.81/src/seusers.c 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/src/seusers.c 2009-06-23 15:49:12.000000000 -0400 @@ -243,3 +243,67 @@ *r_level = NULL; return 0; @@ -16879,9 +16875,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/seusers.c libselinux-2.0. + + return (ret ? getseuserbyname(username, r_seuser, r_level) : ret); +} -diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-2.0.81/utils/matchpathcon.c +diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-2.0.82/utils/matchpathcon.c --- nsalibselinux/utils/matchpathcon.c 2009-05-18 13:53:14.000000000 -0400 -+++ libselinux-2.0.81/utils/matchpathcon.c 2009-05-18 14:04:07.000000000 -0400 ++++ libselinux-2.0.82/utils/matchpathcon.c 2009-06-23 15:49:12.000000000 -0400 @@ -22,9 +22,13 @@ char *buf; int rc = matchpathcon(path, mode, &buf); diff --git a/libselinux.spec b/libselinux.spec index 7f7844e..9712526 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -4,7 +4,7 @@ Summary: SELinux library and simple utilities Name: libselinux -Version: 2.0.81 +Version: 2.0.82 Release: 1%{?dist} License: Public Domain Group: System Environment/Libraries @@ -164,6 +164,12 @@ exit 0 %{ruby_sitearch}/selinux.so %changelog +* 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. diff --git a/sources b/sources index ff92619..83fb405 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -213e7114cb0f33afa428736ac431be97 libselinux-2.0.81.tgz +d5539180258f0a66bceb466aab806589 libselinux-2.0.82.tgz