Diffusion KIO efeede07c8eb

Auth Support: Drop privileges if target is not owned by root

Authored by chinmoyr on Jun 21 2019, 3:39 PM.

Description

Auth Support: Drop privileges if target is not owned by root

Summary:
For actions chown, chmod and utime, process' user and group id will be
set to target's owner and group id and for other actions it will be set
to owner and group id target's parent directory.

As a special case, for rename action the owner and group id of parent dir
of the new file is also checked. If it's same as target's then privileges
are dropped accordingly otherwise privileges are preserved

Reviewers: dfaure, ngraham, elvisangelaccio, Frameworks, Dolphin, maltek

Reviewed By: maltek

Subscribers: maltek, mreeves, mgerstner, fvogt, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D14467