Projects
openEuler:Mainline
checkpolicy
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 8
View file
_service:tar_scm:checkpolicy.spec
Changed
@@ -1,14 +1,11 @@ Name: checkpolicy -Version: 3.4 -Release: 2 +Version: 3.5 +Release: 1 Summary: SELinux policy compiler License: GPLv2 URL: https://github.com/SELinuxProject/selinux Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/checkpolicy-%{version}.tar.gz -Patch0: backport-checkpolicy-Improve-error-message-for-type-bounds.patch -Patch1: backport-checkpolicy-delete-invalid-spaces.patch - BuildRequires: gcc byacc bison flex flex-static libsepol-static >= %{version} libselinux-devel >= %{version} Conflicts: selinux-policy-base < 3.13.1-138 @@ -49,7 +46,7 @@ %files %defattr(-,root,root) -%license COPYING +%license LICENSE %{_bindir}/* %files help @@ -57,6 +54,9 @@ %{_mandir}/*/* %changelog +* Mon Jul 17 2023 zhangguangzhi <zhangguangzhi3@huawei.com> - 3.5-1 +- update version to 3.5 + * Fri Mar 10 2023 zhangchenfeng <zhangchenfeng1@huawei.com> - 3.4-2 - backport upstrem bugfix
View file
_service:tar_scm:backport-checkpolicy-Improve-error-message-for-type-bounds.patch
Deleted
@@ -1,32 +0,0 @@ -From 1d33c911f514449bbc8cab71332752c22561b911 Mon Sep 17 00:00:00 2001 -From: Vit Mojzis <vmojzis@redhat.com> -Date: Thu, 24 Nov 2022 17:31:52 +0100 -Subject: PATCH checkpolicy: Improve error message for type bounds - -Make the error message consistent with other occurrences of the -same issue: -https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/module_compiler.c#L243 -https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/module_compiler.c#L488 - -Signed-off-by: Vit Mojzis <vmojzis@redhat.com> -Acked-by: James Carter <jwcart2@gmail.com> ---- - policy_define.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/policy_define.c b/policy_define.c -index 41e44631..86d57017 100644 ---- a/policy_define.c -+++ b/policy_define.c -@@ -1416,7 +1416,7 @@ static int define_typebounds_helper(char *bounds_id, char *type_id) - if (!type->bounds) - type->bounds = bounds->s.value; - else if (type->bounds != bounds->s.value) { -- yyerror2("type %s has inconsistent master {%s,%s}", -+ yyerror2("type %s has inconsistent bounds %s/%s", - type_id, - policydbp->p_type_val_to_nametype->bounds - 1, - policydbp->p_type_val_to_namebounds->s.value - 1); --- -2.39.2.windows.1 -
View file
_service:tar_scm:backport-checkpolicy-delete-invalid-spaces.patch
Deleted
@@ -1,60 +0,0 @@ -From 27e1c7c8e90b98da53bfcce291b03d8f2f0f0b4d Mon Sep 17 00:00:00 2001 -From: lujiev <572084868@qq.com> -Date: Thu, 27 Oct 2022 16:02:18 +0800 -Subject: PATCH checkpolicy: delete invalid spaces - -Closes: https://github.com/SELinuxProject/selinux/pull/372 -Signed-off-by: lujiev <572084868@qq.com> -Acked-by: Jason Zaman <jason@perfinion.com> ---- - policy_define.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/policy_define.c b/policy_define.c -index 86d57017..c2ae7fe5 100644 ---- a/policy_define.c -+++ b/policy_define.c -@@ -2208,7 +2208,7 @@ static int avrule_ioctl_partialdriver(struct av_ioctl_range_list *rangelist, - xperms = calloc(1, sizeof(av_extended_perms_t)); - if (!xperms) { - yyerror("out of memory"); -- return - 1; -+ return -1; - } - - r = rangelist; -@@ -2245,7 +2245,7 @@ static int avrule_ioctl_completedriver(struct av_ioctl_range_list *rangelist, - xperms = calloc(1, sizeof(av_extended_perms_t)); - if (!xperms) { - yyerror("out of memory"); -- return - 1; -+ return -1; - } - - r = rangelist; -@@ -2289,7 +2289,7 @@ static int avrule_ioctl_func(struct av_ioctl_range_list *rangelist, - xperms = calloc(1, sizeof(av_extended_perms_t)); - if (!xperms) { - yyerror("out of memory"); -- return - 1; -+ return -1; - } - - r = rangelist; -@@ -2352,11 +2352,11 @@ static int avrule_cpy(avrule_t *dest, const avrule_t *src) - dest->flags = src->flags; - if (type_set_cpy(&dest->stypes, &src->stypes)) { - yyerror("out of memory"); -- return - 1; -+ return -1; - } - if (type_set_cpy(&dest->ttypes, &src->ttypes)) { - yyerror("out of memory"); -- return - 1; -+ return -1; - } - dest->line = src->line; - dest->source_filename = strdup(source_file); --- -2.39.2.windows.1 -
View file
_service:tar_scm:checkpolicy-3.5.tar.gz/LICENSE
Changed
(renamed from COPYING)
View file
_service:tar_scm:checkpolicy-3.4.tar.gz/VERSION -> _service:tar_scm:checkpolicy-3.5.tar.gz/VERSION
Changed
@@ -1,1 +1,1 @@ -3.4 +3.5
View file
_service:tar_scm:checkpolicy-3.4.tar.gz/checkpolicy.c -> _service:tar_scm:checkpolicy-3.5.tar.gz/checkpolicy.c
Changed
@@ -1148,12 +1148,11 @@ FGETS(ans, sizeof(ans), stdin); ansstrlen(ans) - 1 = 0; - name = malloc((strlen(ans) + 1) * sizeof(char)); + name = strdup(ans); if (name == NULL) { - fprintf(stderr, "couldn't malloc string.\n"); + fprintf(stderr, "couldn't strdup string.\n"); break; } - strcpy(name, ans); printf("state? "); FGETS(ans, sizeof(ans), stdin); @@ -1296,12 +1295,11 @@ FGETS(ans, sizeof(ans), stdin); ansstrlen(ans) - 1 = 0; - name = malloc((strlen(ans) + 1) * sizeof(char)); + name = strdup(ans); if (!name) { - fprintf(stderr, "couldn't malloc string.\n"); + fprintf(stderr, "couldn't strdup string.\n"); break; } - strcpy(name, ans); printf("port? "); FGETS(ans, sizeof(ans), stdin);
View file
_service:tar_scm:checkpolicy-3.4.tar.gz/module_compiler.c -> _service:tar_scm:checkpolicy-3.5.tar.gz/module_compiler.c
Changed
@@ -851,6 +851,14 @@ free(perm_id); return -1; } + if (datum->permissions.nprim >= PERM_SYMTAB_SIZE) { + yyerror2("Class %s would have too many permissions " + "to fit in an access vector with permission %s", + policydbp->p_class_val_to_namedatum->s.value - 1, + perm_id); + free(perm_id); + return -1; + } allocated = 1; if ((perm = malloc(sizeof(*perm))) == NULL) { yyerror("Out of memory!");
View file
_service:tar_scm:checkpolicy-3.4.tar.gz/policy_define.c -> _service:tar_scm:checkpolicy-3.5.tar.gz/policy_define.c
Changed
@@ -117,12 +117,11 @@ char *newid = 0; int error; - newid = (char *)malloc(strlen(id) + 1); + newid = strdup(id); if (!newid) { yyerror("out of memory"); return -1; } - strcpy(newid, id); if (push) error = queue_push(id_queue, (queue_element_t) newid); else @@ -1417,7 +1416,7 @@ if (!type->bounds) type->bounds = bounds->s.value; else if (type->bounds != bounds->s.value) { - yyerror2("type %s has inconsistent master {%s,%s}", + yyerror2("type %s has inconsistent bounds %s/%s", type_id, policydbp->p_type_val_to_nametype->bounds - 1, policydbp->p_type_val_to_namebounds->s.value - 1); @@ -2209,7 +2208,7 @@ xperms = calloc(1, sizeof(av_extended_perms_t)); if (!xperms) { yyerror("out of memory"); - return - 1; + return -1; } r = rangelist; @@ -2246,7 +2245,7 @@ xperms = calloc(1, sizeof(av_extended_perms_t)); if (!xperms) { yyerror("out of memory"); - return - 1; + return -1; } r = rangelist; @@ -2290,7 +2289,7 @@ xperms = calloc(1, sizeof(av_extended_perms_t)); if (!xperms) { yyerror("out of memory"); - return - 1; + return -1; } r = rangelist; @@ -2353,11 +2352,11 @@ dest->flags = src->flags; if (type_set_cpy(&dest->stypes, &src->stypes)) { yyerror("out of memory"); - return - 1; + return -1; } if (type_set_cpy(&dest->ttypes, &src->ttypes)) { yyerror("out of memory"); - return - 1; + return -1; } dest->line = src->line; dest->source_filename = strdup(source_file); @@ -2371,11 +2370,12 @@ src_perms = src->perms; while (src_perms) { dest_perms = (class_perm_node_t *) calloc(1, sizeof(class_perm_node_t)); - class_perm_node_init(dest_perms); if (!dest_perms) { yyerror("out of memory"); return -1; } + class_perm_node_init(dest_perms); + if (!dest->perms) dest->perms = dest_perms; else @@ -4904,7 +4904,7 @@ return -1; } -int define_devicetree_context() +int define_devicetree_context(void) { ocontext_t *newc, *c, *l, *head; @@ -5295,7 +5295,7 @@ return 0; } -int define_ipv4_node_context() +int define_ipv4_node_context(void) { char *id; int rc = 0;
View file
_service:tar_scm:checkpolicy-3.4.tar.gz/test/dispol.c -> _service:tar_scm:checkpolicy-3.5.tar.gz/test/dispol.c
Changed
@@ -486,12 +486,11 @@ } ansstrlen(ans) - 1 = 0; - name = malloc((strlen(ans) + 1) * sizeof(char)); + name = strdup(ans); if (name == NULL) { - fprintf(stderr, "couldn't malloc string.\n"); + fprintf(stderr, "couldn't strdup string.\n"); break; } - strcpy(name, ans); printf("state? "); if (fgets(ans, sizeof(ans), stdin) == NULL) {
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2