pkexec + tempfile allows arbitrary code execution with uid=0
the way we currently copy the missing files to root-owned folders is quite hacky. among other things, it would allow an attacker to overwrite the temporal file and execute anything with uid 0. the prompt presented to user is also quite dubious.
we need a more permanent solution. this might be to compile a helper as an static extension, called from the python code.
(from redmine: created on 2014-05-08, relates #5625 (closed), relates #5626 (closed), relates #5651 (closed), relates #5837 (closed))