Thanks to visit codestin.com
Credit goes to github.com

Skip to content

intelmqsetup changes the root directory ownership #2354

@kamil-certat

Description

@kamil-certat

intelmqsetup tries to fix ownership of related directories:

if ownership:
print('Setting intelmq as owner for it\'s directories.')
for obj in (CONFIG_DIR, DEFAULT_LOGGING_PATH, ROOT_DIR, VAR_RUN_PATH,
VAR_STATE_PATH, FILE_OUTPUT_PATH, Path(STATE_FILE_PATH).parent):
change_owner(obj, owner='intelmq')

However, the ROOT_DIR can be set to /:

if path == "lsb":
ROOT_DIR = os.getenv("ROOT_DIR", "/")
CONFIG_DIR = os.path.join(ROOT_DIR, "etc/intelmq/")

This causes intelmqsetup to take over the ownership of the root directory, what could open some security risk as well as break some system actions (e.g. systemd-tmpfiles)

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorcomponent: corepackaging

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions