Update to upstream

* sepolgen: We need to support files that have a + in them
	* Android/MacOS X build support
This commit is contained in:
Dan Walsh 2012-07-04 07:24:23 -04:00
parent fbd2801c70
commit f5401fa228
4 changed files with 42 additions and 16 deletions

1
.gitignore vendored
View File

@ -86,3 +86,4 @@ checkpolicy-2.0.22.tgz
/checkpolicy-2.1.7.tgz /checkpolicy-2.1.7.tgz
/checkpolicy-2.1.8.tgz /checkpolicy-2.1.8.tgz
/checkpolicy-2.1.9.tgz /checkpolicy-2.1.9.tgz
/checkpolicy-2.1.10.tgz

View File

@ -1,13 +1,33 @@
diff --git a/checkpolicy/policy_scan.l b/checkpolicy/policy_scan.l diff --git a/checkpolicy/checkmodule.c b/checkpolicy/checkmodule.c
index e767b5f..143e797 100644 index 47603e0..cb58cf0 100644
--- a/checkpolicy/policy_scan.l --- a/checkpolicy/checkmodule.c
+++ b/checkpolicy/policy_scan.l +++ b/checkpolicy/checkmodule.c
@@ -234,7 +234,7 @@ HIGH { return(HIGH); } @@ -63,10 +63,12 @@ static int read_binary_policy(policydb_t * p, char *file, char *progname)
low | if (fstat(fd, &sb) < 0) {
LOW { return(LOW); } fprintf(stderr, "Can't stat '%s': %s\n",
"/"({alnum}|[_\.\-/])* { return(PATH); } file, strerror(errno));
-\"({alnum}|[_\.\-\~])+\" { return(FILENAME); } + close(fd);
+\"({alnum}|[_\.\-\+\~])+\" { return(FILENAME); } return -1;
{letter}({alnum}|[_\-])*([\.]?({alnum}|[_\-]))* { return(IDENTIFIER); } }
{alnum}*{letter}{alnum}* { return(FILESYSTEM); } map =
{digit}+|0x{hexval}+ { return(NUMBER); } mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
+ close(fd);
if (map == MAP_FAILED) {
fprintf(stderr, "Can't map '%s': %s\n", file, strerror(errno));
return -1;
diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
index 8fa3214..2c12447 100644
--- a/checkpolicy/policy_define.c
+++ b/checkpolicy/policy_define.c
@@ -2341,7 +2341,10 @@ int define_role_trans(int class_specified)
return -1;
}
- ebitmap_set_bit(&e_classes, cladatum->s.value - 1, TRUE);
+ if (ebitmap_set_bit(&e_classes, cladatum->s.value - 1, TRUE)) {
+ yyerror("out of memory");
+ return -1;
+ }
}
id = (char *)queue_remove(id_queue);

View File

@ -2,8 +2,8 @@
%define libsepolver 2.1.5-3 %define libsepolver 2.1.5-3
Summary: SELinux policy compiler Summary: SELinux policy compiler
Name: checkpolicy Name: checkpolicy
Version: 2.1.9 Version: 2.1.10
Release: 4%{?dist} Release: 1%{?dist}
License: GPLv2 License: GPLv2
Group: Development/System Group: Development/System
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
@ -56,6 +56,11 @@ rm -rf ${RPM_BUILD_ROOT}
%{_bindir}/sedispol %{_bindir}/sedispol
%changelog %changelog
* Wed Jul 4 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.10-1
- Update to upstream
* sepolgen: We need to support files that have a + in them
* Android/MacOS X build support
* Mon Apr 23 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.9-4 * Mon Apr 23 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.9-4
- Rebuild to get latest libsepol which fixes the file_name transition problems - Rebuild to get latest libsepol which fixes the file_name transition problems

View File

@ -1 +1 @@
bf89762f257f145244a77d58ca31b95b checkpolicy-2.1.9.tgz 31a46b32b14a467f90e79a4792cf29c6 checkpolicy-2.1.10.tgz