Skip to content

Draft: Check owner and permissions based on DBus sender

Guido Berhörster requested to merge personal/gberh/check-file-perm into main

When installing a click package via DBus the package file is passed as-is as an argument to click which is running as root. This allows arbitrary users to install click package files which they would otherwise not be able to access. Address this by temporarily dropping privileges to the user and groups of the sender in order to open the package file. After restoring root privileges copy the file to a temporary directory which only root can access and then call click on that. This avoids TOCTTOU issues since click will open the file again and pass the package to external commands.

This addresses #10 (closed).

Draft: Not yet functional due to issues with threads and unit tests.

Merge request reports