diff --git a/.cvsignore b/.cvsignore index a98a989..b345e5e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -116,3 +116,4 @@ libselinux-2.0.8.tgz libselinux-2.0.9.tgz libselinux-2.0.11.tgz libselinux-2.0.12.tgz +libselinux-2.0.13.tgz diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index 6d00bae..79f1eaf 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -1,15 +1,5 @@ -diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/matchpathcon.8 libselinux-2.0.12/man/man8/matchpathcon.8 ---- nsalibselinux/man/man8/matchpathcon.8 2007-01-17 11:11:35.000000000 -0500 -+++ libselinux-2.0.12/man/man8/matchpathcon.8 2007-04-12 12:29:25.000000000 -0400 -@@ -28,4 +28,4 @@ - - .SH "SEE ALSO" - .BR selinux "(8), " --.BR mathpathcon "(3), " -+.BR matchpathcon "(3), " -Binary files nsalibselinux/src/selinux.pyc and libselinux-2.0.12/src/selinux.pyc differ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-2.0.12/src/selinuxswig.i ---- nsalibselinux/src/selinuxswig.i 2007-02-22 08:53:23.000000000 -0500 +--- nsalibselinux/src/selinuxswig.i 2007-04-12 16:02:48.000000000 -0400 +++ libselinux-2.0.12/src/selinuxswig.i 2007-04-12 12:39:51.000000000 -0400 @@ -44,6 +44,8 @@ @@ -40,7 +30,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux- extern const char *selinux_booleans_path(void); extern const char *selinux_customizable_types_path(void); extern const char *selinux_users_path(void); -@@ -113,11 +121,43 @@ +@@ -113,8 +121,11 @@ extern const char *selinux_translations_path(void); extern const char *selinux_netfilter_context_path(void); extern const char *selinux_path(void); @@ -51,43 +41,10 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux- + +extern int selinux_check_securetty_context(security_context_t tty_context); +void set_selinuxmnt(char *mnt); -+ -+// This tells SWIG to treat char ** as a special case -+%typemap(python,in) char ** { -+ /* Check if is a list */ -+ if (PyList_Check($input)) { -+ int size = PyList_Size($input); -+ int i = 0; -+ $1 = (char **) malloc((size+1)*sizeof(char *)); -+ if ($1 == NULL) { -+ PyErr_SetString(PyExc_MemoryError,"Out of memory"); -+ return NULL; -+ } -+ for (i = 0; i < size; i++) { -+ PyObject *o = PyList_GetItem($input,i); -+ if (PyString_Check(o)) -+ $1[i] = PyString_AsString(PyList_GetItem($input,i)); -+ else { -+ PyErr_SetString(PyExc_TypeError,"list must contain strings"); -+ free($1); -+ return NULL; -+ } -+ } -+ $1[i] = 0; -+ } else { -+ PyErr_SetString(PyExc_TypeError,"not a list"); -+ return NULL; -+ } -+} -+ - extern int rpm_execcon(unsigned int verified, - const char *filename, -- char *const argv[], char *const envp[]); -+ char **, char **); - extern int is_context_customizable (security_context_t scontext); - -@@ -135,3 +175,7 @@ + // This tells SWIG to treat char ** as a special case + %typemap(python,in) char ** { +@@ -164,3 +175,7 @@ } extern int selinux_getpolicytype(char **enforce); extern int getseuserbyname(const char *linuxuser, char **seuser, char **level); @@ -95,32 +52,3 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux- +int selinux_file_context_cmp(const security_context_t a, const security_context_t b); +int selinux_file_context_verify(const char *path, mode_t mode); +int selinux_lsetfilecon_default(const char *path); -diff --exclude-from=exclude -N -u -r nsalibselinux/utils/getsebool.c libselinux-2.0.12/utils/getsebool.c ---- nsalibselinux/utils/getsebool.c 2006-11-16 17:15:17.000000000 -0500 -+++ libselinux-2.0.12/utils/getsebool.c 2007-04-12 12:29:25.000000000 -0400 -@@ -14,7 +14,7 @@ - - int main(int argc, char **argv) - { -- int i, rc = 0, active, pending, len = 0, opt; -+ int i, get_all = 0, rc = 0, active, pending, len = 0, opt; - char **names; - - while ((opt = getopt(argc, argv, "a")) > 0) { -@@ -39,6 +39,7 @@ - printf("No booleans\n"); - return 0; - } -+ get_all = 1; - break; - default: - usage(argv[0]); -@@ -72,6 +73,8 @@ - for (i = 0; i < len; i++) { - active = security_get_boolean_active(names[i]); - if (active < 0) { -+ if (get_all && errno == EACCES) -+ continue; - fprintf(stderr, "Error getting active value for %s\n", - names[i]); - rc = -1; diff --git a/libselinux.spec b/libselinux.spec index c82096d..2ed830a 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -1,8 +1,8 @@ %define libsepolver 2.0.1-1 Summary: SELinux library and simple utilities Name: libselinux -Version: 2.0.12 -Release: 2%{?dist} +Version: 2.0.13 +Release: 1%{?dist} License: Public domain (uncopyrighted) Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz @@ -121,7 +121,12 @@ exit 0 %{_libdir}/python*/site-packages/selinux.py* %changelog +* 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 diff --git a/sources b/sources index ea5ef6f..98c0986 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4f5114ea42063b1e3331e84d02bcb0cc libselinux-2.0.12.tgz +757f1175a62d14c66938ff5f177d2c6d libselinux-2.0.13.tgz