public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Petr Lautrbach <lautrbach@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/selint] epel10: Update to latest upstream sources
Date: Sat, 14 Nov 2026 08:43:04 GMT [thread overview]
Message-ID: <179464578494.1.1708830845237683000.rpms-selint-0e445341fcd3@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/selint
Branch : epel10
Commit : 0e445341fcd3cc39edcf4f5264dc4adbc21651d1
Author : Petr Lautrbach <lautrbach@redhat.com>
Date : 2024-12-12T17:43:22+01:00
Stats : +1132/-2 in 11 file(s)
URL : https://src.fedoraproject.org/rpms/selint/c/0e445341fcd3cc39edcf4f5264dc4adbc21651d1?branch=epel10
Log:
Update to latest upstream sources
Fixes:
base-policy/policy/modules/contrib/virt.if:169: (F): syntax error, unexpected BACKTICK, expecting STRING or SINGLE_QUOTE (F-001)
169 | filetrans_pattern($1, virt_var_run_t, virtinterfaced_var_run_t, dir, ``"interface"'')
| ^
base-policy/policy/modules/contrib/virt.if:169: (F): Error: Invalid statement (F-001)
169 | filetrans_pattern($1, virt_var_run_t, virtinterfaced_var_run_t, dir, ``"interface"'')
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
base-policy/policy/modules/system/systemd.te:1400: (F): syntax error, unexpected UNKNOWN_TOKEN (F-001)
1400 | filetrans_pattern(systemd_zram_generator_t, systemd_unit_file_t, systemd_zram_generator_unit_file_t, dir, "systemd-zram-setup@zram0.service.d")
| ^
base-policy/policy/modules/system/systemd.te:1400: (F): Error: Invalid statement (F-001)
1400 | filetrans_pattern(systemd_zram_generator_t, systemd_unit_file_t, systemd_zram_generator_unit_file_t, dir, "systemd-zram-setup@zram0.service.d")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: Failed to parse files
---
diff --git a/0001-Add-check-for-fcontext-lines-containing-only-spaces.patch b/0001-Add-check-for-fcontext-lines-containing-only-spaces.patch
new file mode 100644
index 0000000..3ce8564
--- /dev/null
+++ b/0001-Add-check-for-fcontext-lines-containing-only-spaces.patch
@@ -0,0 +1,294 @@
+From 6ff3d004ec5fb084f9a444a9da5344e5054370b1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
+Date: Fri, 23 Feb 2024 20:27:23 +0100
+Subject: [PATCH 1/9] Add check for fcontext lines containing only spaces
+Content-type: text/plain
+
+Currently file context definition lines containing only white spaces
+will result in an error:
+
+ libraries.mod.fc: 130: (E): Bad file context format (E-002)
+
+Support parsing those lines and issue a new style check.
+---
+ README | 1 +
+ check_examples.txt | 4 +++
+ src/check_hooks.h | 1 +
+ src/fc_checks.c | 10 ++++--
+ src/parse_fc.c | 22 ++++++++++---
+ src/runner.c | 4 +++
+ tests/check_fc_checks.c | 7 +++-
+ tests/check_parse_fc.c | 39 ++++++++++++++++++++++-
+ tests/sample_policy_files/basic.fc | 4 +--
+ tests/sample_policy_files/none_context.fc | 1 +
+ 10 files changed, 81 insertions(+), 12 deletions(-)
+
+diff --git a/README b/README
+index 88d1675b301c..a62a02cf429a 100644
+--- a/README
++++ b/README
+@@ -174,6 +174,7 @@ CHECK IDS
+ S-008: Unquoted gen_require block
+ S-009: Permission macro suffix does not match class name
+ S-010: Permission macro usage suggested
++ S-011: File context line containing only white spaces
+
+ W-001: Type, attribute or userspace class referenced without explicit declaration
+ W-002: Type, attribute, role or userspace class used but not listed in require block in interface
+diff --git a/check_examples.txt b/check_examples.txt
+index c9ad1fa76fb8..30730c506184 100644
+--- a/check_examples.txt
++++ b/check_examples.txt
+@@ -87,6 +87,10 @@ S-010:
+
+ allow foo_t bar_t:file { open read };
+
++S-011:
++
++ # file context line containing only white spaces
++
+ Warning:
+
+ W-001:
+diff --git a/src/check_hooks.h b/src/check_hooks.h
+index db4cd46da297..b10b03249502 100644
+--- a/src/check_hooks.h
++++ b/src/check_hooks.h
+@@ -48,6 +48,7 @@ enum style_ids {
+ S_ID_UNQUOTE_GENREQ = 8,
+ S_ID_PERM_SUFFIX = 9,
+ S_ID_PERMMACRO = 10,
++ S_ID_FC_SPACES = 11,
+ S_END
+ };
+
+diff --git a/src/fc_checks.c b/src/fc_checks.c
+index 5d0f03186aa0..097c0f6d5efe 100644
+--- a/src/fc_checks.c
++++ b/src/fc_checks.c
+@@ -170,11 +170,15 @@ struct check_result *check_file_context_error_nodes(__attribute__((unused)) cons
+ *node)
+ {
+
+- if (node->flavor != NODE_ERROR) {
+- return NULL;
++ if (node->flavor == NODE_ERROR) {
++ return make_check_result('E', E_ID_FC_ERROR, "Bad file context format");
++ }
++
++ if (node->flavor == NODE_EMPTY) {
++ return make_check_result('S', S_ID_FC_SPACES, "File context line containing only white spaces");
+ }
+
+- return make_check_result('E', E_ID_FC_ERROR, "Bad file context format");
++ return alloc_internal_error("Invalid node type for `check_file_context_error_nodes`");
+ }
+
+ struct check_result *check_file_context_users(__attribute__((unused)) const struct check_data *data,
+diff --git a/src/parse_fc.c b/src/parse_fc.c
+index 0b84b21193ab..196fc6637b18 100644
+--- a/src/parse_fc.c
++++ b/src/parse_fc.c
+@@ -14,6 +14,7 @@
+ * limitations under the License.
+ */
+
++#include <ctype.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -135,8 +136,7 @@ struct fc_entry *parse_fc_line(char *line)
+ } else {
+ out->context->range = NULL;
+ }
+- } else if (strcmp("<<none>>\n", pos) == 0
+- || strcmp("<<none>>\r\n", pos) == 0) {
++ } else if (strcmp("<<none>>", pos) == 0) {
+ out->context = NULL;
+ } else {
+ out->context = parse_context(pos);
+@@ -229,6 +229,12 @@ bool check_for_fc_macro(const char *line, const struct string_list *custom_fc_ma
+ return false;
+ }
+
++static void rtrim(char *line, size_t len)
++{
++ while (len > 0 && isspace((unsigned char)line[len - 1]))
++ line[--len] = '\0';
++}
++
+ struct policy_node *parse_fc_file(const char *filename, const struct string_list *custom_fc_macros)
+ {
+ FILE *fd = fopen(filename, "re");
+@@ -253,6 +259,10 @@ struct policy_node *parse_fc_file(const char *filename, const struct string_list
+ if (len_read <= 1 || line[0] == '#') {
+ continue;
+ }
++
++ // Drop trailing white spaces
++ rtrim(line, (size_t)len_read);
++
+ // Skip over m4 constructs
+ if (strncmp(line, "ifdef", 5) == 0 ||
+ strncmp(line, "ifndef", 6) == 0 ||
+@@ -262,8 +272,6 @@ struct policy_node *parse_fc_file(const char *filename, const struct string_list
+
+ continue;
+ }
+- // TODO: Right now whitespace parses as an error
+- // We may want to detect it and report a lower severity issue
+
+ if (check_for_fc_macro(line, custom_fc_macros)) {
+ continue;
+@@ -272,7 +280,11 @@ struct policy_node *parse_fc_file(const char *filename, const struct string_list
+ struct fc_entry *entry = parse_fc_line(line);
+ enum node_flavor flavor;
+ if (entry == NULL) {
+- flavor = NODE_ERROR;
++ if (*line == '\0') {
++ flavor = NODE_EMPTY;
++ } else {
++ flavor = NODE_ERROR;
++ }
+ } else {
+ flavor = NODE_FC_ENTRY;
+ }
+diff --git a/src/runner.c b/src/runner.c
+index 0dcedf660ada..804cf46661d6 100644
+--- a/src/runner.c
++++ b/src/runner.c
+@@ -208,6 +208,10 @@ struct checks *register_checks(char level,
+ add_check(NODE_AV_RULE, ck, "S-010",
+ check_perm_macro_available);
+ }
++ if (CHECK_ENABLED("S-011")) {
++ add_check(NODE_EMPTY, ck, "S-011",
++ check_file_context_error_nodes);
++ }
+ // FALLTHRU
+ case 'W':
+ if (CHECK_ENABLED("W-001")) {
+diff --git a/tests/check_fc_checks.c b/tests/check_fc_checks.c
+index 2b44d50750c3..d949348162ba 100644
+--- a/tests/check_fc_checks.c
++++ b/tests/check_fc_checks.c
+@@ -250,7 +250,12 @@ START_TEST (test_check_file_context_error_nodes) {
+
+ struct check_result *res = check_file_context_error_nodes(data, node);
+
+- ck_assert_ptr_null(res);
++ ck_assert_ptr_nonnull(res);
++ ck_assert_int_eq(res->severity, 'F');
++ ck_assert_int_eq(res->check_id, F_ID_INTERNAL);
++ ck_assert_ptr_nonnull(res->message);
++
++ free_check_result(res);
+
+ node->flavor = NODE_ERROR;
+
+diff --git a/tests/check_parse_fc.c b/tests/check_parse_fc.c
+index 227c412dcabf..57c199e5efe5 100644
+--- a/tests/check_parse_fc.c
++++ b/tests/check_parse_fc.c
+@@ -55,6 +55,23 @@ START_TEST (test_parse_context_missing_field) {
+ }
+ END_TEST
+
++START_TEST (test_parse_fc_empty) {
++
++ char line[] = "";
++
++ struct fc_entry *out = parse_fc_line(line);
++
++ ck_assert_ptr_null(out);
++
++ char line2[] = " ";
++
++ out = parse_fc_line(line2);
++
++ ck_assert_ptr_null(out);
++
++}
++END_TEST
++
+ START_TEST (test_parse_fc_line_with_gen_context) {
+ char line[] = "/usr/bin(/.*)? gen_context(system_u:object_r:bin_t, s0)";
+
+@@ -147,11 +164,21 @@ START_TEST (test_parse_basic_fc_file) {
+
+ cur = cur->next;
+
++ ck_assert_int_eq(cur->flavor, NODE_EMPTY);
++ ck_assert_ptr_nonnull(cur->next);
++
++ cur = cur->next;
++
+ ck_assert_int_eq(cur->flavor, NODE_ERROR);
+ ck_assert_ptr_nonnull(cur->next);
+
+ cur = cur->next;
+
++ ck_assert_int_eq(cur->flavor, NODE_EMPTY);
++ ck_assert_ptr_nonnull(cur->next);
++
++ cur = cur->next;
++
+ ck_assert_int_eq(cur->flavor, NODE_FC_ENTRY);
+ ck_assert_ptr_nonnull(cur->next);
+
+@@ -202,12 +229,21 @@ START_TEST (test_parse_none_context) {
+ struct policy_node *cur = ast->next;
+
+ ck_assert_int_eq(cur->flavor, NODE_FC_ENTRY);
+- ck_assert_ptr_null(cur->next);
++ ck_assert_ptr_nonnull(cur->next);
+
+ struct fc_entry *data = cur->data.fc_data;
+
+ ck_assert_ptr_null(data->context);
+
++ cur = cur->next;
++
++ ck_assert_int_eq(cur->flavor, NODE_FC_ENTRY);
++ ck_assert_ptr_null(cur->next);
++
++ data = cur->data.fc_data;
++
++ ck_assert_ptr_null(data->context);
++
+ free_policy_node(ast);
+ }
+ END_TEST
+@@ -236,6 +272,7 @@ static Suite *parse_fc_suite(void) {
+
+ tcase_add_test(tc_core, test_parse_context);
+ tcase_add_test(tc_core, test_parse_context_missing_field);
++ tcase_add_test(tc_core, test_parse_fc_empty);
+ tcase_add_test(tc_core, test_parse_fc_line_with_gen_context);
+ tcase_add_test(tc_core, test_parse_fc_line);
+ tcase_add_test(tc_core, test_parse_fc_line_with_obj);
+diff --git a/tests/sample_policy_files/basic.fc b/tests/sample_policy_files/basic.fc
+index 7e4d4932883c..08abb967bc55 100644
+--- a/tests/sample_policy_files/basic.fc
++++ b/tests/sample_policy_files/basic.fc
+@@ -1,8 +1,8 @@
+ /usr/bin/basic -- gen_context(system_u:object_r:basic_t, s0)
+ /etc/basic(/.*)? gen_context(system_u:object_r:basic_conf_t, s0)
+-
++
+ /var/www/basic gen_this_is_an_error(system_u:obect_r:basic_conf_t, s0)
+-
++
+ /var/log/basic.log -- system_u:object_r:basic_log_t:s0
+
+ /var/www/basic/basic.conf -- gen_context(system_u:object_r:basic_conf_t, s0, c1)
+diff --git a/tests/sample_policy_files/none_context.fc b/tests/sample_policy_files/none_context.fc
+index a3dbbf481251..2252e5ed4178 100644
+--- a/tests/sample_policy_files/none_context.fc
++++ b/tests/sample_policy_files/none_context.fc
+@@ -1 +1,2 @@
+ /path/path <<none>>
++/path/path2 <<none>>
+--
+2.47.1
+
diff --git a/0002-Run-CI-whitespace-check-only-on-changes-introduced-i.patch b/0002-Run-CI-whitespace-check-only-on-changes-introduced-i.patch
new file mode 100644
index 0000000..6ae003e
--- /dev/null
+++ b/0002-Run-CI-whitespace-check-only-on-changes-introduced-i.patch
@@ -0,0 +1,27 @@
+From c4de7e6e41601c0f0fd5433b17651abb84b24088 Mon Sep 17 00:00:00 2001
+From: Daniel Burgener <dburgener@linux.microsoft.com>
+Date: Mon, 29 Apr 2024 13:46:39 -0400
+Subject: [PATCH 2/9] Run CI whitespace check only on changes introduced in
+ latest PR
+Content-type: text/plain
+
+---
+ .github/workflows/main.yml | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
+index 692abe0071f4..b8ef0df7de3a 100644
+--- a/.github/workflows/main.yml
++++ b/.github/workflows/main.yml
+@@ -132,5 +132,7 @@ jobs:
+
+ steps:
+ - uses: actions/checkout@v4
++ with:
++ fetch-depth: 0
+ - name: check-whitespaces
+- run: git diff-tree --check $(git hash-object -t tree /dev/null) HEAD
++ run: git diff-tree --check origin/main HEAD
+--
+2.47.1
+
diff --git a/0003-Drop-useless-self-assignment.patch b/0003-Drop-useless-self-assignment.patch
new file mode 100644
index 0000000..811cf6e
--- /dev/null
+++ b/0003-Drop-useless-self-assignment.patch
@@ -0,0 +1,26 @@
+From dbad37ba4673f9ad818705bbd0d63d91de15813b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
+Date: Mon, 29 Apr 2024 22:12:46 +0200
+Subject: [PATCH 3/9] Drop useless self assignment
+Content-type: text/plain
+
+---
+ src/if_checks.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/if_checks.c b/src/if_checks.c
+index f38c9462eb90..dc897cfe85d7 100644
+--- a/src/if_checks.c
++++ b/src/if_checks.c
+@@ -411,7 +411,7 @@ struct check_result *check_name_required_but_not_used_in_if(const struct
+ return NULL;
+ }
+
+- struct name_list *names_to_check = names_to_check = get_names_in_node(node);
++ struct name_list *names_to_check = get_names_in_node(node);
+ if (!names_to_check) {
+ // This should never happen
+ return alloc_internal_error(
+--
+2.47.1
+
diff --git a/0004-Support-CIDR-address-notation-in-nodecon-statement.patch b/0004-Support-CIDR-address-notation-in-nodecon-statement.patch
new file mode 100644
index 0000000..76ade97
--- /dev/null
+++ b/0004-Support-CIDR-address-notation-in-nodecon-statement.patch
@@ -0,0 +1,83 @@
+From a268f67badbf62b2f840cce6957c2e5049cb1add Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
+Date: Fri, 24 May 2024 19:59:24 +0200
+Subject: [PATCH 4/9] Support CIDR address notation in nodecon statement
+Content-type: text/plain
+
+Supported since checkpolicy 3.7[1].
+
+[1]: https://github.com/SELinuxProject/selinux/commit/804e52b7f8a3c8649615211a961ef8189fe73f39
+---
+ src/lex.l | 2 ++
+ src/parse.y | 10 ++++++++++
+ tests/sample_policy_files/uncommon.te | 2 ++
+ 3 files changed, 14 insertions(+)
+
+diff --git a/src/lex.l b/src/lex.l
+index 6d18611f215b..47c36d6c16f9 100644
+--- a/src/lex.l
++++ b/src/lex.l
+@@ -156,7 +156,9 @@ userdebug_or_eng { return USERDEBUG_OR_ENG; }
+ [a-zA-Z\$\/][a-zA-Z0-9_\$\*\/\-]* { yylval->string = xstrdup(yytext); return STRING; }
+ [0-9a-zA-Z\$\/][a-zA-Z0-9_\$\*\/\-]* { yylval->string = xstrdup(yytext); return NUM_STRING; }
+ [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} { yylval->string = xstrdup(yytext); return IPV4; }
++[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\/[0-9]{1,2} { yylval->string = xstrdup(yytext); return IPV4_CIDR; }
+ ([0-9A-Fa-f]{1,4})?\:([0-9A-Fa-f\:])*\:([0-9A-Fa-f]{1,4})?(\:[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})? { yylval->string = xstrdup(yytext); return IPV6; }
++([0-9A-Fa-f]{1,4})?\:([0-9A-Fa-f\:])*\:([0-9A-Fa-f]{1,4})?(\:[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})?\/[0-9]{1,3} { yylval->string = xstrdup(yytext); return IPV6_CIDR; }
+ \"[a-zA-Z0-9_\.\-\:~\$\[\]\/]*\" { yylval->string = xstrdup(yytext); return QUOTED_STRING; }
+ \-[\-ldbcsp][ \t] { return FILE_TYPE_SPECIFIER; }
+ \( { return OPEN_PAREN; }
+diff --git a/src/parse.y b/src/parse.y
+index 0fb9c3004547..03b7c5663111 100644
+--- a/src/parse.y
++++ b/src/parse.y
+@@ -86,7 +86,9 @@
+ %token <string> STRING;
+ %token <string> NUM_STRING;
+ %token <string> IPV4;
++%token <string> IPV4_CIDR;
+ %token <string> IPV6;
++%token <string> IPV6_CIDR;
+ %token <string> NUMBER;
+ %token <string> QUOTED_STRING;
+ %token <string> VERSION_NO;
+@@ -909,6 +911,8 @@ netifcon:
+
+ nodecon:
+ NODECON two_ip_addrs context
++ |
++ NODECON cidr_addr context
+ ;
+
+ two_ip_addrs:
+@@ -917,6 +921,12 @@ two_ip_addrs:
+ IPV6 IPV6 { free($1); free($2); }
+ ;
+
++cidr_addr:
++ IPV4_CIDR { free($1); }
++ |
++ IPV6_CIDR { free($1); }
++ ;
++
+ fs_use:
+ FS_USE_TRANS STRING context SEMICOLON { free($2); }
+ |
+diff --git a/tests/sample_policy_files/uncommon.te b/tests/sample_policy_files/uncommon.te
+index 0131ffc98352..6fb108b3e56e 100644
+--- a/tests/sample_policy_files/uncommon.te
++++ b/tests/sample_policy_files/uncommon.te
+@@ -46,8 +46,10 @@ optional_policy(`
+ netifcon lo gen_context(system_u:object_r:lo_netif_t,s0 - mls_systemhigh) gen_context(system_u:object_r:unlabeled_t,s0 - mls_systemhigh)
+
+ nodecon 127.0.0.1 255.255.255.255 gen_context(system_u:object_r:system_t:s0)
++nodecon 127.0.0.0/24 gen_context(system_u:object_r:system_t:s0)
+ nodecon ::5 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff gen_context(system_u:object_r:system_t:s0)
+ nodecon ::ffff:127.0.0.1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff gen_context(system_u:object_r:lo_node_t,s0)
++nodecon ::1/128 gen_context(system_u:object_r:lo_node_t,s0)
+
+ if (!bool_one) {
+ allow foo_t bar_t:file open;
+--
+2.47.1
+
diff --git a/0005-ci-bump-to-LLVM-19.patch b/0005-ci-bump-to-LLVM-19.patch
new file mode 100644
index 0000000..7031775
--- /dev/null
+++ b/0005-ci-bump-to-LLVM-19.patch
@@ -0,0 +1,36 @@
+From ce4792535b35aa4e683453c50a6ac5590227952a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
+Date: Sat, 24 Aug 2024 19:00:43 +0200
+Subject: [PATCH 5/9] ci: bump to LLVM 19
+Content-type: text/plain
+
+---
+ .github/workflows/main.yml | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
+index b8ef0df7de3a..fe439a350daa 100644
+--- a/.github/workflows/main.yml
++++ b/.github/workflows/main.yml
+@@ -35,15 +35,15 @@ jobs:
+ # Prevent Clang from using DWARF5, not supported by the valgrind version in runners
+ - name: Set environment for Clang
+ run: |
+- echo "CC=clang-17" >> $GITHUB_ENV
++ echo "CC=clang-19" >> $GITHUB_ENV
+ echo "CFLAGS=-gdwarf-4 -O2" >> $GITHUB_ENV
+ if: ${{ matrix.cc == 'clang' }}
+ - name: install clang repo
+ run: |
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add -
+- sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' -y
++ sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main' -y
+ sudo apt-get update -q
+- sudo apt-get install -y clang-17
++ sudo apt-get install -y clang-19
+ if: ${{ matrix.cc == 'clang' }}
+ - name: install dependencies
+ run: |
+--
+2.47.1
+
diff --git a/0006-Support-m4-quoted-strings-in-interface-call-argument.patch b/0006-Support-m4-quoted-strings-in-interface-call-argument.patch
new file mode 100644
index 0000000..015ae9f
--- /dev/null
+++ b/0006-Support-m4-quoted-strings-in-interface-call-argument.patch
@@ -0,0 +1,68 @@
+From 1157cb908bd904f5b8e5a0e10c1c62ef9dd20e75 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
+Date: Sat, 24 Aug 2024 19:20:57 +0200
+Subject: [PATCH 6/9] Support m4 quoted strings in interface call arguments
+Content-type: text/plain
+
+Required for escaped strings, that would otherwise be replaced by m4,
+e.g. "interface":
+
+ filetrans_pattern(foo_t, bar_run_t, baz_run_t, dir, ``"interface"'')
+
+Replaces: #289
+---
+ src/parse.y | 15 ++++++++++++---
+ tests/sample_policy_files/uncommon.te | 2 ++
+ 2 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/src/parse.y b/src/parse.y
+index 03b7c5663111..62b85bea3d72 100644
+--- a/src/parse.y
++++ b/src/parse.y
+@@ -188,6 +188,7 @@
+ %type<string> arg_list_item
+ %type<sl> arg
+ %type<sl> args
++%type<sl> arg_m4_quoted
+ %type<string> mls_range
+ %type<string> mls_level
+ %type<string> mls_component
+@@ -801,14 +802,22 @@ arg_list_item:
+ NUMBER
+ ;
+
++arg_m4_quoted:
++ QUOTED_STRING { $$ = sl_from_str_consume($1); }
++ |
++ mls_range { $$ = sl_from_str_consume($1); }
++ |
++ %empty { $$ = sl_from_str(""); }
++ |
++ BACKTICK arg_m4_quoted SINGLE_QUOTE { $$ = $2; }
++ ;
++
+ arg:
+ arg_list
+ |
+ QUOTED_STRING { $$ = sl_from_str_consume($1); }
+ |
+- BACKTICK mls_range SINGLE_QUOTE { $$ = sl_from_str_consume($2); }
+- |
+- BACKTICK SINGLE_QUOTE { $$ = sl_from_str(""); }
++ BACKTICK arg_m4_quoted SINGLE_QUOTE { $$ = $2; }
+ ;
+
+ args:
+diff --git a/tests/sample_policy_files/uncommon.te b/tests/sample_policy_files/uncommon.te
+index 6fb108b3e56e..0de4a00eb740 100644
+--- a/tests/sample_policy_files/uncommon.te
++++ b/tests/sample_policy_files/uncommon.te
+@@ -158,3 +158,5 @@ optional_policy(`
+ call_some_interface(foo_t)
+ ')
+ ')
++
++filetrans_pattern(foo_t, bar_run_t, baz_run_t, dir, ``"interface"'')
+--
+2.47.1
+
diff --git a/0007-Call-bison-with-Wno-other.patch b/0007-Call-bison-with-Wno-other.patch
new file mode 100644
index 0000000..f23f6a9
--- /dev/null
+++ b/0007-Call-bison-with-Wno-other.patch
@@ -0,0 +1,32 @@
+From e8c57522dc760360260eb42a9922207a37ea50bb Mon Sep 17 00:00:00 2001
+From: Daniel Burgener <Daniel.Burgener@microsoft.com>
+Date: Wed, 23 Oct 2024 13:14:19 -0400
+Subject: [PATCH 7/9] Call bison with -Wno-other
+Content-type: text/plain
+
+Bison in 3.8.2 added new warnings to catch m4 strings accidentally included in the generated code output. It had the unfortunate side effect of flagging grammars that include "m4_foo" style strings as identifiers in their grammar (which we do). Based on the thread, it looks like a fix was implemented on the Bison side, but as of three years later, no release has been made. Bison seems to possibly have maintainer inactivity: https://github.com/akimd/bison/issues/103.
+
+Since a fix for the false positive is not forthcoming, disable the
+warning. Unfortunately, I don't think a more granular disablement is
+available, but IMO false positive warnings are worse than false
+negatives.
+---
+ src/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 66451279551c..dc0dc0ebefb5 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -15,7 +15,7 @@
+ bin_PROGRAMS = selint
+ selint_SOURCES = main.c lex.l parse.y tree.c tree.h selint_error.h parse_functions.c parse_functions.h maps.c maps.h runner.c runner.h parse_fc.c parse_fc.h template.c template.h file_list.c file_list.h check_hooks.c check_hooks.h fc_checks.c fc_checks.h util.c util.h if_checks.c if_checks.h selint_config.c selint_config.h string_list.c string_list.h startup.c startup.h te_checks.c te_checks.h ordering.c ordering.h color.c color.h perm_macro.c perm_macro.h xalloc.h name_list.c name_list.h
+ BUILT_SOURCES = parse.h
+-AM_YFLAGS = -d -Wno-yacc -Werror=conflicts-rr -Werror=conflicts-sr
++AM_YFLAGS = -d -Wno-other -Wno-yacc -Werror=conflicts-rr -Werror=conflicts-sr
+
+ if COND_GCOV
+ MAYBE_COVERAGE=--coverage -fno-inline -fno-inline-small-functions -fno-default-inline
+--
+2.47.1
+
diff --git a/0008-Markdownify-README.patch b/0008-Markdownify-README.patch
new file mode 100644
index 0000000..274d551
--- /dev/null
+++ b/0008-Markdownify-README.patch
@@ -0,0 +1,497 @@
+From 8c548a79430d79456225f624cbe0b42d027b8327 Mon Sep 17 00:00:00 2001
+From: Daniel Burgener <Daniel.Burgener@microsoft.com>
+Date: Wed, 23 Oct 2024 12:19:31 -0400
+Subject: [PATCH 8/9] Markdownify README
+Content-type: text/plain
+
+This will make it look nicer and more standardized on the github home
+page
+---
+ README | 223 -------------------------------------------------
+ README.md | 244 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 244 insertions(+), 223 deletions(-)
+ delete mode 100644 README
+ create mode 100644 README.md
+
+diff --git a/README b/README
+deleted file mode 100644
+index a62a02cf429a..000000000000
+--- a/README
++++ /dev/null
+@@ -1,223 +0,0 @@
+-SUMMARY
+-
+- SELint is a program to perform static code analysis on SELinux policy
+- source files
+-
+-
+-INSTALLING FROM TAR DOWNLOAD
+-
+- To install from a downloaded tarball, first install the following dependencies:
+-
+- On rpm based distros:
+- uthash-devel
+- libconfuse
+- libconfuse-devel
+- check
+- check-devel
+-
+- On apt based distros:
+- uthash-dev
+- libconfuse-dev
+- check
+-
+- Then run:
+-
+- ./configure
+- make
+- make install
+-
+-INSTALLING FROM GIT
+-
+- If you are building from a git repo checkout, you'll also need bison, flex,
+- autotools (automake, autoconf, aclocal, autoreconf) and the autoconf-archive package.
+- Then you can run ./autogen.sh to set up autotools and then follow the steps above.
+-
+-USAGE
+-
+- selint [OPTIONS] FILE [...]
+-
+-OPTIONS
+-
+- -c CONFIGFILE, --config=CONFIGFILE
+- Override default config with config specified on command line. See
+- CONFIGURATION section for config file syntax.
+-
+- --color=COLOR_OPTION
+- Configure color output. Options are on, off and auto (the default).
+-
+- --context=CONTEXT_PATH
+- Also parse any .te or .if files found in CONTEXT_PATH and load symbols
+- associated with them for use when checking the policy files to be analyzed.
+- No checks are run on these files. Implies -s.
+-
+- --debug-parser
+- Enable debug output for the internal policy parser.
+- Very noisy, useful to debug parsing failures.
+-
+- -d CHECKID, --disable=CHECKID
+- Disable check with the given ID.
+-
+- -e CHECKID, --enable=CHECKID
+- Enable check with the given ID.
+-
+- -E, --only-enabled
+- Only run checks that are explicitly enabled with the --enable option.
+-
+- -F, --fail
+- Exit with a non-zero value if any issue was found.
+-
+- -h, --help
+- Show help menu about command line options.
+-
+- -l LEVEL, --level=LEVEL
+- Only list errors with a severity level at or greater than LEVEL. Options
+- are C (convention), S (style), W (warning), E (error), F (fatal error). See
+- SEVERITY LEVELS for more information. If this option is not specified,
+- SELint will default to the level selected in the applicable config file.
+-
+- --scan-hidden-dirs
+- Scan hidden directories. By default hidden directories (like '.git') are
+- skipped in recursive mode.
+-
+- -s, --source
+- Run in "source mode" to scan a policy source repository that is designed to
+- compile into a full system policy. If this flag is not specified, SELint
+- will assume that scanned policy files are intended to be loaded into the
+- currently running system policy.
+-
+- -S, --summary
+- Display a summary of issues found after running the analysis.
+-
+- --summary-only
+- Only display a summary of issues found after running the analysis.
+- Do not show the individual findings. Implies -S.
+-
+- -r, --recursive
+- Scan recursively and check all SELinux policy files found.
+-
+- -v, --verbose
+- Enable verbose output
+-
+- -V, --version
+- Show version information and exit.
+-
+-CONFIGURATION
+-
+- A global configuration is specified at the install prefix supplied to
+- ./configure (typically /usr/local/etc). This can be overridden on the command
+- line using the -c option.
+-
+- Options specified on the command line override options from the config file.
+-
+- See the global config file for details on config file syntax.
+-
+-SEVERITY LEVELS
+-
+- SELint messages are assocatied with a severity level, indicating the
+- significance of the issue. Available levels are listed below in increasing
+- order of significance.
+-
+- X (extra) - Miscellaneous checks, mainly for policy introspection.
+- These must be explicitly enabled with their individual identifier.
+- C (convention) - A violation of common style conventions
+- S (style) - Stylistic "code smell" that may be associated with unintended
+- behavior
+- W (warning) - Non standard policy that may result in issues such as run time
+- errors or security issues
+- E (error) - Important issues that may result in errors at compile time or
+- run time
+- F (fatal error) - Error that prevents further processing
+-
+-SELINT EXCEPTIONS
+-
+- To eliminate one or more checks on one line, add a comment containing a string
+- in any of the following formats:
+-
+- * "selint-disable:E-003"
+- * "selint-disable: E-003"
+- * "selint-disable:E-003,E-004"
+- * "selint-disable: E-003, E-004"
+-
+- This is currently only supported in te and if files
+-
+-OUTPUT
+-
+- SELint outputs messages in the following format:
+-
+- [filename]:[lineno]: ([SEVERITY LEVEL]): [MESSAGE] ([ISSUE ID])
+-
+- For example:
+-
+- example.te:127: (E) Interface from module not in optional_policy block (E-001)
+-
+-CHECK IDS
+-
+- The following checks may be performed:
+-
+- X-001: Unused interface or template declaration
+- X-002: AV rule with excluded source or target (can affect policy binary size)
+-
+- C-001: Violation of refpolicy te file ordering conventions
+- C-004: Interface does not have documentation comment
+- C-005: Permissions in av rule or class declaration not ordered
+- C-006: Declarations in require block not ordered
+- C-007: Redundant type specification instead of self keyword
+- C-008: Conditional expression identifier from foreign module
+-
+- S-001: Require block used instead of interface call
+- S-002: File context file labels with type not declared in module
+- S-003: Unnecessary semicolon
+- S-004: Template call from an interface
+- S-005: Declaration in interface
+- S-006: Bare module statement
+- S-007: Call to gen_context omits mls component
+- S-008: Unquoted gen_require block
+- S-009: Permission macro suffix does not match class name
+- S-010: Permission macro usage suggested
+- S-011: File context line containing only white spaces
+-
+- W-001: Type, attribute or userspace class referenced without explicit declaration
+- W-002: Type, attribute, role or userspace class used but not listed in require block in interface
+- W-003: Unused type, attribute, role or userspace class listed in require block
+- W-004: Potentially unescaped regex character in file contexts paths
+- W-005: Interface call from module not in optional_policy block
+- W-006: Interface call with empty argument
+- W-007: Unquoted space in argument of interface call
+- W-008: Allow rule with complement or wildcard permission
+- W-009: Module name does not match file name
+- W-010: Call to unknown interface
+- W-011: Declaration in require block not defined in own module
+- W-012: Conditional expression contains unknown identifier
+- W-013: Incorrect usage of audit_access permission
+-
+- E-002: Bad file context format
+- E-003: Nonexistent user listed in fc file
+- E-004: Nonexistent role listed in fc file
+- E-005: Nonexistent type listed in fc file
+- E-006: Declaration and interface with same name
+- E-007: Usage of unknown permission or permission macro
+- E-008: Usage of unknown class
+- E-009: Empty optional or require macro block
+- E-010: Usage of unknown simple m4 macro or stray word
+-
+- F-001: Policy syntax error prevents further processing
+- F-002: Internal error in SELint
+-
+-REFERENCE POLICY CONVENTIONS
+-
+- To improve the accuracy and avoid false-positives SELint makes some assumptions about
+- naming conventions and formatting of the policy:
+-
+- * Type identifiers should end with the suffix '_t'.
+- * Role identifiers should end with the suffix '_r'.
+- * Names of noop interfaces for availability checks should end with the suffix '_stub'.
+- * Permission macros should end with the suffix '_perms'.
+- * Class set macros should end with the suffix '_class_set'.
+- * Security class declarations of userspace classes in the security_classes file should be
+- declared with a comment including the word 'userspace'.
+- * Interfaces that wrap a file based type-transition should end with the suffix '_filetrans'.
+- * Interfaces that transforms their arguments, e.g. associate an attribute with them,
+- and thus should be handled like a declaration should have one of the following common
+- suffixes: '_type', '_file', '_domain', '_node', '_agent', '_delivery', '_sender',
+- '_boolean', '_content', '_constrained', '_executable', '_exemption', '_object'
+- or '_mountpoint'.
+diff --git a/README.md b/README.md
+new file mode 100644
+index 000000000000..dc3e1a72313a
+--- /dev/null
++++ b/README.md
+@@ -0,0 +1,244 @@
++# Summary
++
++SELint is a program to perform static code analysis on SELinux policy source
++files.
++
++## Installing from tar download
++
++To install from a downloaded tarball, first install the following dependencies:
++
++On rpm based distros:
++* uthash-devel
++* libconfuse
++* libconfuse-devel
++* check
++* check-devel
++
++On apt based distros:
++* uthash-dev
++* libconfuse-dev
++* check
++
++Then run:
++
++```
++./configure
++make
++make install
++```
++
++## Installing from git
++
++If you are building from a git repo checkout, you'll also need bison, flex,
++autotools (automake, autoconf, aclocal, autoreconf) and the autoconf-archive package.
++Then you can run `./autogen.sh` to set up autotools and then follow the steps above.
++
++## Usage
++
++```
++selint [OPTIONS] FILE [...]
++```
++
++### Options
++
++```
++-c CONFIGFILE, --config=CONFIGFILE
++ Override default config with config specified on command line. See
++ CONFIGURATION section for config file syntax.
++
++--color=COLOR_OPTION
++ Configure color output. Options are on, off and auto (the default).
++
++--context=CONTEXT_PATH
++ Also parse any .te or .if files found in CONTEXT_PATH and load symbols
++ associated with them for use when checking the policy files to be analyzed.
++ No checks are run on these files. Implies -s.
++
++--debug-parser
++ Enable debug output for the internal policy parser.
++ Very noisy, useful to debug parsing failures.
++
++-d CHECKID, --disable=CHECKID
++ Disable check with the given ID.
++
++-e CHECKID, --enable=CHECKID
++ Enable check with the given ID.
++
++-E, --only-enabled
++ Only run checks that are explicitly enabled with the --enable option.
++
++-F, --fail
++ Exit with a non-zero value if any issue was found.
++
++-h, --help
++ Show help menu about command line options.
++
++-l LEVEL, --level=LEVEL
++ Only list errors with a severity level at or greater than LEVEL. Options
++ are C (convention), S (style), W (warning), E (error), F (fatal error). See
++ SEVERITY LEVELS for more information. If this option is not specified,
++ SELint will default to the level selected in the applicable config file.
++
++--scan-hidden-dirs
++ Scan hidden directories. By default hidden directories (like `.git`) are
++ skipped in recursive mode.
++
++-s, --source
++ Run in "source mode" to scan a policy source repository that is designed to
++ compile into a full system policy. If this flag is not specified, SELint
++ will assume that scanned policy files are intended to be loaded into the
++ currently running system policy.
++
++-S, --summary
++ Display a summary of issues found after running the analysis.
++
++--summary-only
++ Only display a summary of issues found after running the analysis.
++ Do not show the individual findings. Implies -S.
++
++-r, --recursive
++ Scan recursively and check all SELinux policy files found.
++
++-v, --verbose
++ Enable verbose output
++
++-V, --version
++ Show version information and exit.
++```
++
++### Configuration
++
++A global configuration is specified at the install prefix supplied to
++`./configure` (typically `/usr/local/etc`). This can be overridden on the command
++line using the -c option.
++
++Options specified on the command line override options from the config file.
++
++See the global config file for details on config file syntax.
++
++### Severity levels
++
++SELint messages are assocatied with a severity level, indicating the
++significance of the issue. Available levels are listed below in increasing
++order of significance.
++
++* X (extra) - Miscellaneous checks, mainly for policy introspection.
++ These must be explicitly enabled with their individual identifier.
++* C (convention) - A violation of common style conventions
++* S (style) - Stylistic "code smell" that may be associated with unintended
++ behavior
++* W (warning) - Non standard policy that may result in issues such as run time
++ errors or security issues
++* E (error) - Important issues that may result in errors at compile time or
++ run time
++* F (fatal error) - Error that prevents further processing
++
++### SELint exceptions
++
++To eliminate one or more checks on one line, add a comment containing a string
++in any of the following formats:
++
++* `selint-disable:E-003`
++* `selint-disable: E-003`
++* `selint-disable:E-003,E-004`
++* `selint-disable: E-003, E-004`
++
++This is currently only supported in te and if files
++
++### Output
++
++SELint outputs messages in the following format:
++
++```
++[filename]:[lineno]: ([SEVERITY LEVEL]): [MESSAGE] ([ISSUE ID])
++```
++
++For example:
++
++```
++example.te:127: (E) Interface from module not in optional_policy block (E-001)
++```
++
++### Check IDs
++
++The following checks may be performed:
++
++Extra Checks:
++
++* X-001: Unused interface or template declaration
++* X-002: AV rule with excluded source or target (can affect policy binary size)
++
++Convention Checks:
++
++* C-001: Violation of refpolicy te file ordering conventions
++* C-004: Interface does not have documentation comment
++* C-005: Permissions in av rule or class declaration not ordered
++* C-006: Declarations in require block not ordered
++* C-007: Redundant type specification instead of self keyword
++* C-008: Conditional expression identifier from foreign module
++
++Style Checks:
++
++* S-001: Require block used instead of interface call
++* S-002: File context file labels with type not declared in module
++* S-003: Unnecessary semicolon
++* S-004: Template call from an interface
++* S-005: Declaration in interface
++* S-006: Bare module statement
++* S-007: Call to gen_context omits mls component
++* S-008: Unquoted gen_require block
++* S-009: Permission macro suffix does not match class name
++* S-010: Permission macro usage suggested
++* S-011: File context line containing only white spaces
++
++Warning Checks:
++
++* W-001: Type, attribute or userspace class referenced without explicit declaration
++* W-002: Type, attribute, role or userspace class used but not listed in require block in interface
++* W-003: Unused type, attribute, role or userspace class listed in require block
++* W-004: Potentially unescaped regex character in file contexts paths
++* W-005: Interface call from module not in optional_policy block
++* W-006: Interface call with empty argument
++* W-007: Unquoted space in argument of interface call
++* W-008: Allow rule with complement or wildcard permission
++* W-009: Module name does not match file name
++* W-010: Call to unknown interface
++* W-011: Declaration in require block not defined in own module
++* W-012: Conditional expression contains unknown identifier
++* W-013: Incorrect usage of audit_access permission
++
++Error Checks:
++
++* E-002: Bad file context format
++* E-003: Nonexistent user listed in fc file
++* E-004: Nonexistent role listed in fc file
++* E-005: Nonexistent type listed in fc file
++* E-006: Declaration and interface with same name
++* E-007: Usage of unknown permission or permission macro
++* E-008: Usage of unknown class
++* E-009: Empty optional or require macro block
++* E-010: Usage of unknown simple m4 macro or stray word
++
++Fatal Error Checks:
++
++* F-001: Policy syntax error prevents further processing
++* F-002: Internal error in SELint
++
++## Reference policy conventions
++
++To improve the accuracy and avoid false-positives SELint makes some assumptions about
++naming conventions and formatting of the policy:
++
++* Type identifiers should end with the suffix `_t`.
++* Role identifiers should end with the suffix `_r`.
++* Names of noop interfaces for availability checks should end with the suffix `_stub`.
++* Permission macros should end with the suffix `_perms`.
++* Class set macros should end with the suffix `_class_set`.
++* Security class declarations of userspace classes in the security_classes file should be
++ declared with a comment including the word `userspace`.
++* Interfaces that wrap a file based type-transition should end with the suffix `_filetrans`.
++* Interfaces that transforms their arguments, e.g. associate an attribute with them,
++ and thus should be handled like a declaration should have one of the following common
++ suffixes: `_type`, `_file`, `_domain`, `_node`, `_agent`, `_delivery`, `_sender`,
++ `_boolean`, `_content`, `_constrained`, `_executable`, `_exemption`, `_object`
++ or `_mountpoint`.
+--
+2.47.1
+
diff --git a/0009-Add-parse-check-for-new-netlink-xperm-support.patch b/0009-Add-parse-check-for-new-netlink-xperm-support.patch
new file mode 100644
index 0000000..8107c82
--- /dev/null
+++ b/0009-Add-parse-check-for-new-netlink-xperm-support.patch
@@ -0,0 +1,28 @@
+From 5bc6b0e417288ff5a957fa1bc258ea457abaa182 Mon Sep 17 00:00:00 2001
+From: Daniel Burgener <Daniel.Burgener@microsoft.com>
+Date: Wed, 23 Oct 2024 12:40:22 -0400
+Subject: [PATCH 9/9] Add parse check for new netlink xperm support
+Content-type: text/plain
+
+Based on documentation here: https://github.com/SELinuxProject/selinux-notebook/pull/40/files
+
+This test already passes out of the box, because our XPERM parse support
+is pretty generic, but I figure its worth being more explicit in our
+test files.
+---
+ tests/sample_policy_files/uncommon.te | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/sample_policy_files/uncommon.te b/tests/sample_policy_files/uncommon.te
+index 0de4a00eb740..581392d7b945 100644
+--- a/tests/sample_policy_files/uncommon.te
++++ b/tests/sample_policy_files/uncommon.te
+@@ -160,3 +160,5 @@ optional_policy(`
+ ')
+
+ filetrans_pattern(foo_t, bar_run_t, baz_run_t, dir, ``"interface"'')
++
++allowxperm src_t tgt_t: netlink_route_socket nlmsg { RTM_GETROUTE 0x44 };
+--
+2.47.1
+
diff --git a/0010-Allow-in-quoted-string-token.patch b/0010-Allow-in-quoted-string-token.patch
new file mode 100644
index 0000000..bb413e4
--- /dev/null
+++ b/0010-Allow-in-quoted-string-token.patch
@@ -0,0 +1,26 @@
+From 8676ea1f8b139abd4401140ebe713007c31d1549 Mon Sep 17 00:00:00 2001
+From: Petr Lautrbach <lautrbach@redhat.com>
+Date: Thu, 12 Dec 2024 16:13:36 +0100
+Subject: [PATCH 10/10] Allow @ in quoted string token
+Content-type: text/plain
+
+---
+ src/lex.l | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lex.l b/src/lex.l
+index 47c36d6c16f9..3fc7f4a53337 100644
+--- a/src/lex.l
++++ b/src/lex.l
+@@ -159,7 +159,7 @@ userdebug_or_eng { return USERDEBUG_OR_ENG; }
+ [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\/[0-9]{1,2} { yylval->string = xstrdup(yytext); return IPV4_CIDR; }
+ ([0-9A-Fa-f]{1,4})?\:([0-9A-Fa-f\:])*\:([0-9A-Fa-f]{1,4})?(\:[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})? { yylval->string = xstrdup(yytext); return IPV6; }
+ ([0-9A-Fa-f]{1,4})?\:([0-9A-Fa-f\:])*\:([0-9A-Fa-f]{1,4})?(\:[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})?\/[0-9]{1,3} { yylval->string = xstrdup(yytext); return IPV6_CIDR; }
+-\"[a-zA-Z0-9_\.\-\:~\$\[\]\/]*\" { yylval->string = xstrdup(yytext); return QUOTED_STRING; }
++\"[a-zA-Z0-9_\.\-\:~\$\[\]\/@]*\" { yylval->string = xstrdup(yytext); return QUOTED_STRING; }
+ \-[\-ldbcsp][ \t] { return FILE_TYPE_SPECIFIER; }
+ \( { return OPEN_PAREN; }
+ \) { return CLOSE_PAREN; }
+--
+2.47.1
+
diff --git a/selint.spec b/selint.spec
index eeed334..8d6a806 100644
--- a/selint.spec
+++ b/selint.spec
@@ -9,10 +9,20 @@
Summary: Static code analysis tool for SELinux policy source files
Name: selint
Version: 1.5.0
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: https://github.com/SELinuxProject/selint
License: Apache-2.0
Source: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
+Patch0001: 0001-Add-check-for-fcontext-lines-containing-only-spaces.patch
+# Patch0002: 0002-Run-CI-whitespace-check-only-on-changes-introduced-i.patch
+Patch0003: 0003-Drop-useless-self-assignment.patch
+Patch0004: 0004-Support-CIDR-address-notation-in-nodecon-statement.patch
+# Patch0005: 0005-ci-bump-to-LLVM-19.patch
+Patch0006: 0006-Support-m4-quoted-strings-in-interface-call-argument.patch
+Patch0007: 0007-Call-bison-with-Wno-other.patch
+Patch0008: 0008-Markdownify-README.patch
+Patch0009: 0009-Add-parse-check-for-new-netlink-xperm-support.patch
+Patch0010: 0010-Allow-in-quoted-string-token.patch
BuildRequires: autoconf
BuildRequires: autoconf-archive
@@ -59,13 +69,16 @@ autoreconf -fiv -Wall -Wno-portability
%files
%license LICENSE NOTICE
-%doc CHANGELOG README
+%doc CHANGELOG README.md
%{_bindir}/selint
%config(noreplace) %{_sysconfdir}/selint.conf
%{_mandir}/man1/selint.1*
%changelog
+* Thu Dec 12 2024 Petr Lautrbach <lautrbach@redhat.com> - 1.5.0-3
+- Update to latest upstream sources
+
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
reply other threads:[~2026-11-14 8:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179464578494.1.1708830845237683000.rpms-selint-0e445341fcd3@fedoraproject.org \
--to=lautrbach@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox