Skip to content

dinitctl service description file access can fail if service directory is not absolute path #557

Description

@mobin-2008

When a relative service directory path is specified via dinit -d service-dir, dinitctl is not able to open/access service directory files within the directory (unless it happens to get launched from the same directory that dinit started in). In the worst case it could open the wrong file.

This currently affects both enable/disable and start commands (where the modification time of the file is checked in order to warn if the service description needs to be reloaded).

The easiest fix for the time being is probably to make the SVCDSCDIR request return a resolved path, but this needs a little consideration. Another option is to disallow relative service directory paths.

See #550 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions