Update polkit-qt-1 to replace two deprecated methods with the new method

Review Request #117056 - Created March 25, 2014 and submitted

Information
Raymond Wooninck
polkit-qt-1
master
Reviewers
dafre, dfaure, mbriza
Based on https://bugzilla.redhat.com/show_bug.cgi?id=1002375,  two methods (polkit_unix_process_new and polkit_unix_process_new_full) were deprecated in PolKit as that these could cause security exploitations. The attached patch ports Polkit-qt-1 to the new method polkit_unix_process_new_for_owner and is based on a patch mentioned in the bugreport for spicy-gtk library. 
Polkit-qt-1 compiles fine without indicating that the two deprecated polkit methods

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Dario Freddi
Commit Hook
Raymond Wooninck
Raymond Wooninck
Raymond Wooninck
Raymond Wooninck
Dario Freddi
Dario Freddi
Commit Hook
This review has been submitted with commit d8e3de624ad55b567fd6a36fc03dd993368942c2 by Raymond Wooninck to branch master.
Raymond Wooninck
Review request changed

Status: Closed (submitted)

Martin Bříza
I started looking into KAuth to change the call from Subject(pid) to SystemBusName() and can't get my mind wrapped around the patch in this review request.
Why are you calling polkit_unix_user_get_uid(PolkitUnixUser*) with a casted PolkitUnixProcess (implementing PolkitSubject) object? What does the function return? Does it actually work? It seems there's some undefined behavior there...
Why not just call polkit_unix_process_new_for_owner(pid, startTime, -1) in the constructor and setSubject? I think this method was added instead of the deprecated _new and _new_full to serve the same purpose.
Please, let's discuss this once more, it's important to have this sorted out correctly.
Loading...