Authorize using Polkit backend, compile Helper as standalone application and send progress via QDBus from helper towards application
Needs ReviewPublic

Authored by shubham on Aug 2 2019, 8:51 AM.

Diff Detail

Repository
R16 KPMCore
Branch
qdbus
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14714
Build 14732: arc lint + arc unit
There are a very large number of changes, so older changes are hidden. Show Older Changes
shubham updated this revision to Diff 63160.Aug 6 2019, 8:24 AM

Remove unwanted signals

shubham retitled this revision from [WIP]: Send progress via QDBus from helper towards application to Authorize using Polkit backend, compile Helper as standalone application and send progress via QDBus from helper towards application.Aug 7 2019, 12:16 PM
shubham edited the summary of this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.Aug 7 2019, 12:31 PM
This revision was automatically updated to reflect the committed changes.
shubham reopened this revision.Aug 10 2019, 7:27 PM
shubham updated this revision to Diff 63501.Aug 10 2019, 7:28 PM

QDBus communication

stikonas requested changes to this revision.Aug 13 2019, 11:13 PM
stikonas added inline comments.
src/util/externalcommand_polkitbackend.cpp
156 ↗(On Diff #63501)

What sets m_result? in the connect call above you simply pass result to QEventLoop's function quit without processing it.

This revision now requires changes to proceed.Aug 13 2019, 11:13 PM
stikonas added inline comments.Aug 13 2019, 11:15 PM
src/util/externalcommand_polkitbackend.cpp
96–107 ↗(On Diff #63501)

Why do we need connect to finished signal if in the line above you wait for call to finish with call.waitForFinished() that function blocks until call is done.

shubham updated this revision to Diff 63739.Aug 14 2019, 4:07 PM
shubham marked 2 inline comments as done.

Try to fix the broken things

shubham marked an inline comment as not done.Aug 14 2019, 5:00 PM
shubham added inline comments.
src/util/externalcommand_polkitbackend.cpp
156 ↗(On Diff #63501)

Actually yes, it is currently broke, however it does not matter, because I am just using this function to show the auth agent and if you notice line 383 externalcommand.cpp, to display some log message. Oh, now I get why it was reporting ""Unable to obtain Administrative privileges, the action can not be executed!!";"

shubham updated this revision to Diff 63746.Aug 14 2019, 5:30 PM
shubham marked an inline comment as not done.

Try fixing the inline comments

shubham updated this revision to Diff 63747.Aug 14 2019, 5:32 PM

some more changes

shubham marked an inline comment as done.Aug 14 2019, 5:33 PM
shubham updated this revision to Diff 63754.Aug 14 2019, 6:19 PM

Move helperMain() outside Q_SLOTS

shubham updated this revision to Diff 63879.Aug 16 2019, 5:59 PM
  1. Fix runtime warnings inside initPolkitAgent()
  2. Use "new" inside ctor to instantiate object
shubham updated this revision to Diff 63974.Aug 18 2019, 10:44 AM

Remove unnecessary linking

shubham updated this revision to Diff 64016.Aug 19 2019, 6:13 AM

Try to start the helper(Atleast polkit-qt-1)

shubham marked an inline comment as done.Aug 19 2019, 6:23 AM
stikonas requested changes to this revision.Aug 22 2019, 6:47 PM
stikonas added inline comments.
src/util/externalcommand.cpp
376–377

Fix this, this will give you infinite recursion.

This revision now requires changes to proceed.Aug 22 2019, 6:47 PM
shubham updated this revision to Diff 64348.Aug 22 2019, 6:57 PM
shubham marked an inline comment as done.
  1. Use checkAuthorizationSync() to authenticate
  2. Fix infinite recursion in startHelper()
shubham updated this revision to Diff 64349.Aug 22 2019, 7:01 PM

Refactor

shubham updated this revision to Diff 64350.Aug 22 2019, 7:10 PM

Remove commented code

shubham updated this revision to Diff 64419.Aug 23 2019, 2:13 PM

Success starting the kauth_externalcommand helper

shubham updated this revision to Diff 64438.Aug 23 2019, 6:03 PM

Remove unused parameters

This revision was not accepted when it landed; it landed in state Needs Review.Aug 26 2019, 7:11 AM
Closed by commit R16:1ed945016178: a (authored by shubham). · Explain Why
This revision was automatically updated to reflect the committed changes.
shubham reopened this revision.Aug 26 2019, 7:22 AM
shubham updated this revision to Diff 64630.Aug 26 2019, 7:26 AM

Fix documentation

shubham updated this revision to Diff 64631.Aug 26 2019, 7:28 AM

Remove left over commented code

shubham updated this revision to Diff 64634.Aug 26 2019, 7:36 AM

Use sync version for checking authorization

shubham updated this revision to Diff 64637.Aug 26 2019, 7:49 AM

const at the end of startHelper() function

shubham updated this revision to Diff 65148.Sep 1 2019, 5:44 PM

Some cleanup and add unittest

shubham updated this revision to Diff 65150.Sep 1 2019, 6:12 PM

Remove trailing whitespaces

shubham updated this revision to Diff 65163.Sep 1 2019, 6:16 PM

Remove unneeded change

shubham updated this revision to Diff 65165.Sep 1 2019, 6:32 PM

Keep comment at the right place

shubham updated this revision to Diff 65166.Sep 1 2019, 6:46 PM

Fix unrelated change