Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

setroubleshoot: quotes in fix_cmds #34

Open
thoger opened this issue Jun 23, 2016 · 0 comments
Open

setroubleshoot: quotes in fix_cmds #34

thoger opened this issue Jun 23, 2016 · 0 comments

Comments

@thoger
Copy link

thoger commented Jun 23, 2016

Multiple plugins contain fix_cmd that include quotes, for example:

plugins/src/public_content.py:    fix_cmd = "chcon -t public_content_t '$TARGET_PATH'"

Quotes were needed (but were also insufficient) before 2d12677. After that commit, they actually break those fix commands, causing quotes to be part of arguments seen by the executed commands. As shell is no longer used when executing fix commands, quotes are not consumed by the shell.

Note that none of the plugins that have quotes in fix_cmd also set self.fixable=True, hence commands are not executed by sealert. Quotes need to be removed when affected plugins are marked as fixable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant