RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1692676 - Building a custom module prints a "syntax error near unexpected token" message
Summary: Building a custom module prints a "syntax error near unexpected token" message
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: 8.1
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On: 1673107
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-26 08:42 UTC by Renaud Métrich
Modified: 2020-11-14 13:41 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.14.3-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 22:11:10 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3547 0 None None None 2019-11-05 22:11:18 UTC

Description Renaud Métrich 2019-03-26 08:42:34 UTC
Description of problem:

The /usr/share/selinux/devel/include/Makefile directives contain a "find" which break when a file in the current directory has some special character such as a parenthesis.
This is cosmetic only, the module builds anyway.


Version-Release number of selected component (if applicable):

selinux-policy-devel-3.14.1-61.el8.noarch and lower (RHEL 7 is affected also)


How reproducible:

Always


Steps to Reproduce:
1. Create a custom module

foo.te:

module foo 1.0;
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
require {
	class file entrypoint;
	type shell_exec_t;
	type vmtools_unconfined_t;
}

# Allow transitioning to unconfined when executing a shell
allow vmtools_unconfined_t shell_exec_t : file entrypoint;
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

2. Touch a file in current directory with a parenthesis

# touch "my broken (file)"

3. Build the module

# make -f /usr/share/selinux/devel/Makefile foo.pp


Actual results:

/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `find anaconda-ks.cfg my broken (file) vncserver.strace systemd.strace rhel-server-7.6-x86_64-boot.iso rt_minimal.c vnc.cil foo.te rsyslog tmp virt-install.log evil_banner.sh livemedia.log program.log foo.if rhel7-minimal.ks TestZip.java TestZip.class foo.fc sudoloop foo.pp strace.log -maxdepth 0 -type d'


Expected results:

No "syntax error"

Comment 4 Ondrej Mosnacek 2019-05-22 07:37:48 UTC
FYI, I sent pull requests to upstream refpolicy and Fedora policy that should fix this issue:
https://github.com/SELinuxProject/refpolicy/pull/53
https://github.com/fedora-selinux/selinux-policy/pull/265

Comment 9 errata-xmlrpc 2019-11-05 22:11:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3547


Note You need to log in before you can comment on or make changes to this bug.