Bug 1013774 - chcat does not quote its arguments properly
chcat does not quote its arguments properly
Status: ASSIGNED
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
27
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Petr Lautrbach
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-30 14:19 EDT by Göran Uddeborg
Modified: 2017-11-17 15:19 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Göran Uddeborg 2013-09-30 14:19:15 EDT
Description of problem:
File names that needs to be quoted are not properly handled by chcat.


Version-Release number of selected component (if applicable):
policycoreutils-python-2.1.14-45.fc19.x86_64


How reproducible:
Every time


Steps to Reproduce:
1. touch apa '#apa' 'apa bepa'
2. chcat +c42 apa
3. chcat +c43 '#apa'
4. chcat +c44 'apa bepa'


Actual results:
The first chcat command works fine.

The second fails with an error message:
    sh: -c: line 1: syntax error: unexpected end of file

The third one fails with another error message: 
    chcon: cannot access 'bepa': No such file or directory
In addition it incorrectly sets the category to the file "apa"

I'm guessing the arguments of chcat are sent to a subshell without the necessary quoting.
Comment 1 Fedora End Of Life 2015-01-09 15:02:47 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 2 Göran Uddeborg 2015-01-10 12:27:34 EST
The problem remains in policycoreutils-python-2.3-7.1.fc21.
Comment 3 Fedora End Of Life 2015-11-04 09:09:49 EST
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 4 Göran Uddeborg 2015-11-07 12:10:48 EST
The problem remains in policycoreutils-python-utils-2.4-10.fc23.x86_64.
Comment 5 Fedora End Of Life 2016-11-24 06:02:57 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Göran Uddeborg 2016-11-27 05:52:40 EST
The problem remains in policycoreutils-python-utils-2.5-17.fc25.x86_64.
Comment 7 Vit Mojzis 2017-01-13 07:44:24 EST
Thank you for reporting the issue, patch is awaiting review
https://github.com/fedora-selinux/selinux/pull/38
Comment 8 Fedora End Of Life 2017-11-16 13:56:30 EST
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 9 Göran Uddeborg 2017-11-17 15:19:54 EST
I see a fix might be on its way.  But in policycoreutils-python-utils-2.7-1.fc27.x86_64 it isn't yet fixed, so I update the version field.

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