- selinux_virtual_domain_context_path
- selinux_virtual_image_context_path
This commit is contained in:
Daniel J Walsh 2009-02-18 18:29:42 +00:00
parent b5b41bc929
commit 6396f115b4
2 changed files with 93 additions and 26 deletions

View File

@ -1,7 +1,16 @@
diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/selinux.h libselinux-2.0.77/include/selinux/selinux.h diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/selinux.h libselinux-2.0.77/include/selinux/selinux.h
--- nsalibselinux/include/selinux/selinux.h 2009-01-05 17:45:35.000000000 -0500 --- nsalibselinux/include/selinux/selinux.h 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/include/selinux/selinux.h 2009-01-27 14:49:41.000000000 -0500 +++ libselinux-2.0.77/include/selinux/selinux.h 2009-02-18 13:18:50.305037000 -0500
@@ -520,6 +520,14 @@ @@ -459,6 +459,8 @@
extern const char *selinux_file_context_local_path(void);
extern const char *selinux_homedir_context_path(void);
extern const char *selinux_media_context_path(void);
+extern const char *selinux_virtual_domain_context_path(void);
+extern const char *selinux_virtual_image_context_path(void);
extern const char *selinux_x_context_path(void);
extern const char *selinux_contexts_path(void);
extern const char *selinux_securetty_types_path(void);
@@ -520,6 +522,14 @@
Caller must free the returned strings via free. */ Caller must free the returned strings via free. */
extern int getseuserbyname(const char *linuxuser, char **seuser, char **level); extern int getseuserbyname(const char *linuxuser, char **seuser, char **level);
@ -18,7 +27,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/selinux.h lib
const security_context_t b); const security_context_t b);
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxconlist.8 libselinux-2.0.77/man/man8/selinuxconlist.8 diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxconlist.8 libselinux-2.0.77/man/man8/selinuxconlist.8
--- nsalibselinux/man/man8/selinuxconlist.8 1969-12-31 19:00:00.000000000 -0500 --- nsalibselinux/man/man8/selinuxconlist.8 1969-12-31 19:00:00.000000000 -0500
+++ libselinux-2.0.77/man/man8/selinuxconlist.8 2009-01-27 14:49:41.000000000 -0500 +++ libselinux-2.0.77/man/man8/selinuxconlist.8 2009-02-18 13:12:22.736391000 -0500
@@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
+.TH "selinuxconlist" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation" +.TH "selinuxconlist" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation"
+.SH "NAME" +.SH "NAME"
@ -40,7 +49,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxconlist.8 lib
+secon(8), selinuxdefcon(8) +secon(8), selinuxdefcon(8)
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxdefcon.8 libselinux-2.0.77/man/man8/selinuxdefcon.8 diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxdefcon.8 libselinux-2.0.77/man/man8/selinuxdefcon.8
--- nsalibselinux/man/man8/selinuxdefcon.8 1969-12-31 19:00:00.000000000 -0500 --- nsalibselinux/man/man8/selinuxdefcon.8 1969-12-31 19:00:00.000000000 -0500
+++ libselinux-2.0.77/man/man8/selinuxdefcon.8 2009-01-27 14:49:41.000000000 -0500 +++ libselinux-2.0.77/man/man8/selinuxdefcon.8 2009-02-18 13:12:22.740386000 -0500
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
+.TH "selinuxdefcon" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation" +.TH "selinuxdefcon" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation"
+.SH "NAME" +.SH "NAME"
@ -62,8 +71,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxdefcon.8 libs
+.SH "SEE ALSO" +.SH "SEE ALSO"
+secon(8), selinuxconlist(8) +secon(8), selinuxconlist(8)
diff --exclude-from=exclude -N -u -r nsalibselinux/src/callbacks.c libselinux-2.0.77/src/callbacks.c diff --exclude-from=exclude -N -u -r nsalibselinux/src/callbacks.c libselinux-2.0.77/src/callbacks.c
--- nsalibselinux/src/callbacks.c 2008-08-28 09:34:24.000000000 -0400 --- nsalibselinux/src/callbacks.c 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/src/callbacks.c 2009-01-27 14:49:41.000000000 -0500 +++ libselinux-2.0.77/src/callbacks.c 2009-02-18 13:12:22.743390000 -0500
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
{ {
int rc; int rc;
@ -72,9 +81,18 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/callbacks.c libselinux-2.
va_start(ap, fmt); va_start(ap, fmt);
rc = vfprintf(stderr, fmt, ap); rc = vfprintf(stderr, fmt, ap);
va_end(ap); va_end(ap);
diff --exclude-from=exclude -N -u -r nsalibselinux/src/file_path_suffixes.h libselinux-2.0.77/src/file_path_suffixes.h
--- nsalibselinux/src/file_path_suffixes.h 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/src/file_path_suffixes.h 2009-02-18 13:23:48.929908000 -0500
@@ -20,3 +20,5 @@
S_(FILE_CONTEXTS_LOCAL, "/contexts/files/file_contexts.local")
S_(X_CONTEXTS, "/contexts/x_contexts")
S_(COLORS, "/secolor.conf")
+ S_(VIRTUAL_DOMAIN, "contexts/virtual_domain_context")
+ S_(VIRTUAL_IMAGE, "contexts/virtual_image_context")
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.77/src/matchpathcon.c diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.77/src/matchpathcon.c
--- nsalibselinux/src/matchpathcon.c 2008-08-28 09:34:24.000000000 -0400 --- nsalibselinux/src/matchpathcon.c 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/src/matchpathcon.c 2009-01-27 14:49:41.000000000 -0500 +++ libselinux-2.0.77/src/matchpathcon.c 2009-02-18 13:12:22.749385000 -0500
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
@ -92,9 +110,53 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux
va_end(ap); va_end(ap);
} }
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux_config.c libselinux-2.0.77/src/selinux_config.c
--- nsalibselinux/src/selinux_config.c 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/src/selinux_config.c 2009-02-18 13:22:49.083769000 -0500
@@ -40,7 +40,9 @@
#define SECURETTY_TYPES 18
#define X_CONTEXTS 19
#define COLORS 20
-#define NEL 21
+#define VIRTUAL_DOMAIN 21
+#define VIRTUAL_IMAGE 22
+#define NEL 23
/* New layout is relative to SELINUXDIR/policytype. */
static char *file_paths[NEL];
@@ -391,3 +393,17 @@
}
hidden_def(selinux_x_context_path)
+
+const char *selinux_virtual_domain_context_path()
+{
+ return get_path(VIRTUAL_DOMAIN);
+}
+
+hidden_def(selinux_virtual_domain_context_path)
+
+const char *selinux_virtual_image_context_path()
+{
+ return get_path(VIRTUAL_IMAGE);
+}
+
+hidden_def(selinux_virtual_image_context_path)
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux_internal.h libselinux-2.0.77/src/selinux_internal.h
--- nsalibselinux/src/selinux_internal.h 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/src/selinux_internal.h 2009-02-18 13:20:00.321376000 -0500
@@ -56,6 +56,8 @@
hidden_proto(selinux_securetty_types_path)
hidden_proto(selinux_failsafe_context_path)
hidden_proto(selinux_removable_context_path)
+ hidden_proto(selinux_virtual_domain_context_path)
+ hidden_proto(selinux_virtual_image_context_path)
hidden_proto(selinux_file_context_path)
hidden_proto(selinux_file_context_homedir_path)
hidden_proto(selinux_file_context_local_path)
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0.77/src/selinux.py diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0.77/src/selinux.py
--- nsalibselinux/src/selinux.py 2009-01-13 08:45:35.000000000 -0500 --- nsalibselinux/src/selinux.py 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/src/selinux.py 2009-01-27 14:56:18.000000000 -0500 +++ libselinux-2.0.77/src/selinux.py 2009-02-18 13:12:22.814394000 -0500
@@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
# This file was automatically generated by SWIG (http://www.swig.org). # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.35 -# Version 1.3.35
@ -494,8 +556,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0
get_default_type = _selinux.get_default_type get_default_type = _selinux.get_default_type
SELINUX_DEFAULTUSER = _selinux.SELINUX_DEFAULTUSER SELINUX_DEFAULTUSER = _selinux.SELINUX_DEFAULTUSER
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-2.0.77/src/selinuxswig.i diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-2.0.77/src/selinuxswig.i
--- nsalibselinux/src/selinuxswig.i 2008-08-28 09:34:24.000000000 -0400 --- nsalibselinux/src/selinuxswig.i 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/src/selinuxswig.i 2009-01-27 14:49:51.000000000 -0500 +++ libselinux-2.0.77/src/selinuxswig.i 2009-02-18 13:12:22.820386000 -0500
@@ -47,8 +47,36 @@ @@ -47,8 +47,36 @@
%ignore set_matchpathcon_printf; %ignore set_matchpathcon_printf;
%ignore set_matchpathcon_invalidcon; %ignore set_matchpathcon_invalidcon;
@ -535,8 +597,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-
%include "../include/selinux/selinux.h" %include "../include/selinux/selinux.h"
%include "../include/selinux/avc.h" %include "../include/selinux/avc.h"
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libselinux-2.0.77/src/selinuxswig_python.i diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libselinux-2.0.77/src/selinuxswig_python.i
--- nsalibselinux/src/selinuxswig_python.i 2009-01-13 08:45:35.000000000 -0500 --- nsalibselinux/src/selinuxswig_python.i 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/src/selinuxswig_python.i 2009-01-27 14:55:09.000000000 -0500 +++ libselinux-2.0.77/src/selinuxswig_python.i 2009-02-18 13:12:22.826386000 -0500
@@ -21,6 +21,15 @@ @@ -21,6 +21,15 @@
map(restorecon, [os.path.join(dirname, fname) map(restorecon, [os.path.join(dirname, fname)
for fname in fnames]), None) for fname in fnames]), None)
@ -567,8 +629,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libs
+ +
%include "selinuxswig.i" %include "selinuxswig.i"
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libselinux-2.0.77/src/selinuxswig_wrap.c diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libselinux-2.0.77/src/selinuxswig_wrap.c
--- nsalibselinux/src/selinuxswig_wrap.c 2009-01-13 08:45:35.000000000 -0500 --- nsalibselinux/src/selinuxswig_wrap.c 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/src/selinuxswig_wrap.c 2009-01-27 14:56:18.000000000 -0500 +++ libselinux-2.0.77/src/selinuxswig_wrap.c 2009-02-18 13:12:22.850392000 -0500
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
@ -10230,8 +10292,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel
_swigc__p_unsigned_int, _swigc__p_unsigned_int,
_swigc__p_unsigned_short, _swigc__p_unsigned_short,
diff --exclude-from=exclude -N -u -r nsalibselinux/src/seusers.c libselinux-2.0.77/src/seusers.c diff --exclude-from=exclude -N -u -r nsalibselinux/src/seusers.c libselinux-2.0.77/src/seusers.c
--- nsalibselinux/src/seusers.c 2008-08-28 09:34:24.000000000 -0400 --- nsalibselinux/src/seusers.c 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/src/seusers.c 2009-01-27 14:49:41.000000000 -0500 +++ libselinux-2.0.77/src/seusers.c 2009-02-18 13:12:22.856386000 -0500
@@ -243,3 +243,67 @@ @@ -243,3 +243,67 @@
*r_level = NULL; *r_level = NULL;
return 0; return 0;
@ -10301,8 +10363,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/seusers.c libselinux-2.0.
+ return (ret ? getseuserbyname(username, r_seuser, r_level) : ret); + return (ret ? getseuserbyname(username, r_seuser, r_level) : ret);
+} +}
diff --exclude-from=exclude -N -u -r nsalibselinux/utils/getdefaultcon.c libselinux-2.0.77/utils/getdefaultcon.c diff --exclude-from=exclude -N -u -r nsalibselinux/utils/getdefaultcon.c libselinux-2.0.77/utils/getdefaultcon.c
--- nsalibselinux/utils/getdefaultcon.c 2008-08-28 09:34:24.000000000 -0400 --- nsalibselinux/utils/getdefaultcon.c 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/utils/getdefaultcon.c 2009-01-27 14:49:41.000000000 -0500 +++ libselinux-2.0.77/utils/getdefaultcon.c 2009-02-18 13:12:22.860383000 -0500
@@ -22,8 +22,9 @@ @@ -22,8 +22,9 @@
security_context_t usercon = NULL, cur_context = NULL; security_context_t usercon = NULL, cur_context = NULL;
char *user = NULL, *level = NULL, *role=NULL, *seuser=NULL, *dlevel=NULL; char *user = NULL, *level = NULL, *role=NULL, *seuser=NULL, *dlevel=NULL;
@ -10349,8 +10411,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/utils/getdefaultcon.c libseli
+ return ret >= 0; + return ret >= 0;
} }
diff --exclude-from=exclude -N -u -r nsalibselinux/utils/Makefile libselinux-2.0.77/utils/Makefile diff --exclude-from=exclude -N -u -r nsalibselinux/utils/Makefile libselinux-2.0.77/utils/Makefile
--- nsalibselinux/utils/Makefile 2008-08-28 09:34:24.000000000 -0400 --- nsalibselinux/utils/Makefile 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/utils/Makefile 2009-01-27 14:49:41.000000000 -0500 +++ libselinux-2.0.77/utils/Makefile 2009-02-18 13:12:22.863385000 -0500
@@ -2,28 +2,33 @@ @@ -2,28 +2,33 @@
PREFIX ?= $(DESTDIR)/usr PREFIX ?= $(DESTDIR)/usr
LIBDIR ?= $(PREFIX)/lib LIBDIR ?= $(PREFIX)/lib
@ -10390,8 +10452,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/utils/Makefile libselinux-2.0
indent: indent:
../../scripts/Lindent $(wildcard *.[ch]) ../../scripts/Lindent $(wildcard *.[ch])
diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-2.0.77/utils/matchpathcon.c diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-2.0.77/utils/matchpathcon.c
--- nsalibselinux/utils/matchpathcon.c 2008-10-28 10:06:51.000000000 -0400 --- nsalibselinux/utils/matchpathcon.c 2009-01-27 14:47:32.000000000 -0500
+++ libselinux-2.0.77/utils/matchpathcon.c 2009-01-27 14:49:41.000000000 -0500 +++ libselinux-2.0.77/utils/matchpathcon.c 2009-02-18 13:12:22.867388000 -0500
@@ -101,6 +101,11 @@ @@ -101,6 +101,11 @@
for (i = optind; i < argc; i++) { for (i = optind; i < argc; i++) {
int mode = 0; int mode = 0;

View File

@ -5,7 +5,7 @@
Summary: SELinux library and simple utilities Summary: SELinux library and simple utilities
Name: libselinux Name: libselinux
Version: 2.0.77 Version: 2.0.77
Release: 3%{?dist} Release: 4%{?dist}
License: Public Domain License: Public Domain
Group: System Environment/Libraries Group: System Environment/Libraries
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
@ -164,6 +164,11 @@ exit 0
%{ruby_sitearch}/selinux.so %{ruby_sitearch}/selinux.so
%changelog %changelog
* Wed Feb 18 2009 Dan Walsh <dwalsh@redhat.com> - 2.0.77-4
- Add
- selinux_virtual_domain_context_path
- selinux_virtual_image_context_path
* Tue Jan 6 2009 Dan Walsh <dwalsh@redhat.com> - 2.0.77-3 * Tue Jan 6 2009 Dan Walsh <dwalsh@redhat.com> - 2.0.77-3
- Throw exeptions in python swig bindings on failures - Throw exeptions in python swig bindings on failures