Send slave's polkit authorization status to the host
ClosedPublic

Authored by chinmoyr on Feb 25 2018, 10:24 AM.

Details

Summary

Send slave's authorization status along with the oher status info when the host asks for it.

Depends on D10818

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
chinmoyr created this revision.Feb 25 2018, 10:24 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 25 2018, 10:24 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
chinmoyr requested review of this revision.Feb 25 2018, 10:24 AM
dfaure requested changes to this revision.Mar 1 2018, 7:06 AM
dfaure added inline comments.
src/core/slavebase.cpp
154

This detaches (makes a copy of the list) because we're iterating over that same list.
This should use iterators, with the usual it = container.remove(it)
(or an algorithm, but this falls into the ugly erase(remove_if()) case).

Cleaning up in a "has" method is a little unexpected anyway.
Maybe it's simpler to make this one a find_if, and clean up elsewhere? Just a thought.

557–558

make that _V2, with << d->onHold rather than if(d->onHold), see other RR.

This revision now requires changes to proceed.Mar 1 2018, 7:06 AM
chinmoyr updated this revision to Diff 28541.Mar 4 2018, 6:21 AM

Added method updateTempAuthStatus() to take care of cleaning.
Rebased on D11010

anthonyfieroni added inline comments.
src/core/slavebase.cpp
155
    it = m_tempAuths.erase(it);
} else {
    ++it;
}
dfaure requested changes to this revision.Mar 4 2018, 10:12 AM
dfaure added inline comments.
src/core/slavebase.cpp
151

This can't be a const_iterator, if you use it for erase()ing. I'm surprised this compiles...

162

const

This revision now requires changes to proceed.Mar 4 2018, 10:12 AM
chinmoyr updated this revision to Diff 30332.Mar 23 2018, 4:21 PM
chinmoyr marked 2 inline comments as done.
  1. Made method const.
  2. Increment iterator only if erasing failed.
dfaure added inline comments.Mar 23 2018, 4:25 PM
src/core/slavebase.cpp
155

You forgot the it = in front.

chinmoyr updated this revision to Diff 30333.Mar 23 2018, 4:27 PM

Added the missing assignment

dfaure accepted this revision.Mar 23 2018, 7:37 PM
This revision is now accepted and ready to land.Mar 23 2018, 7:37 PM
This revision was automatically updated to reflect the committed changes.