D10824: Delete IdleSlave having temporary authorization

2018-03-05 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. I haven't yet tried your patch (which btw involves the http ioslave right?) but I am quite sure that exit() is not called for file ioslave after interrupting the application. I have placed the debug statements inside exit() as well as before every exit() call and I

D10824: Delete IdleSlave having temporary authorization

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. Neither SlaveBase::exit nor Slave::kill is called. I also commented the line in ConnectionBackend which removes the socket file but even then the slave process terminated. At this point I have no idea why is this working. REPOSITORY R303 KInit REVISION DETAIL

D10824: Delete IdleSlave having temporary authorization

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. Actually deleteLater() does kill the slave. I placed a qDebug statement in there and immediately after the message I am getting kdeinit5: PID $slave_pid terminated. REPOSITORY R303 KInit REVISION DETAIL https://phabricator.kde.org/D10824 To: chinmoyr, df

D10822: Store temporary authorization status in IdleSlave

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 28581. chinmoyr added a comment. added the required comment REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10822?vs=28577&id=28581 BRANCH D10822 REVISION DETAIL https://phabricator.kde.org/D10822 AFFECTED FILES sr

D10409: In linux don't use abstract socket to share file descriptor

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. Sorry, I meant D10411 . REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10409 To: chinmoyr, #frameworks, ossi Cc: dfaure, michaelh

D10409: In linux don't use abstract socket to share file descriptor

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. @ossi I think the changes in file_unix.cpp from D9966 also belong here(?) REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10409 To: chinmoyr, #frameworks, ossi Cc: dfaure, michaelh

D10822: Store temporary authorization status in IdleSlave

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 28577. chinmoyr added a comment. Added support for MSG_SLAVE_STATUS REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10822?vs=28543&id=28577 BRANCH D10822 REVISION DETAIL https://phabricator.kde.org/D10822 AFFECTED FI

D10410: Move the task of cleaning up of socket file to file ioslave and FdReceiver

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr added inline comments. INLINE COMMENTS > ossi wrote in fdreceiver.cpp:62 > uhm, you're still using it in this very line, just differently ;) *head-desk* I think I have to get my eyes checked. I will change it right away. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https

D10410: Move the task of cleaning up of socket file to file ioslave and FdReceiver

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr added inline comments. INLINE COMMENTS > ossi wrote in fdreceiver.cpp:62 > any particular reason not to use QFile::remove() here as well? I didn't want to include QFile. That's the only reason. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D10410

D10824: Delete IdleSlave having temporary authorization

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr added inline comments. INLINE COMMENTS > dfaure wrote in klauncher.cpp:1114 > This deletes the Slave C++ class, but it doesn't actually kill the ioslave. > So why do it? > > I'm confused now. Do you want to kill the ioslave (then call slave->kill()) > or do you want to reuse that ioslav

D11011: Do not assume layout of msghdr and iovec structure

2018-03-04 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:2a2a8a0fe5ab: Do not assume layout of msghdr and iovec structure (authored by chinmoyr). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D11011?vs=28573&id=28576 REVISIO

D10641: Revoke temporary authorization of KIO slave before sending status to IdleSlave

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr added inline comments. INLINE COMMENTS > dfaure wrote in slavebase.cpp:147 > That looks like horrible API ;) > A getter that optionally makes changes, based on a boolean... urgh ;) > > "Duplicating" a for loop isn't really duplication, go for a different method. Now I feel stupid for d

D11011: Do not assume layout of msghdr and iovec structure

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 28573. chinmoyr added a comment. used & REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D11011?vs=28551&id=28573 BRANCH master REVISION DETAIL https://phabricator.kde.org/D11011 AFFECTED FILES src/ioslaves/file/shar

D11011: Do not assume layout of msghdr and iovec structure

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. In D11011#217980 , @awilcox wrote: > I can confirm that this patch does fix the build on musl. Thank you! I will push this after David's review. I hope it's not a problem? REPOSITORY R241 KIO BRANCH master

D11011: Do not assume layout of msghdr and iovec structure

2018-03-03 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added reviewers: dfaure, awilcox. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY Class FDMessageHeader assumes the layout of msghdr an

D10822: Store temporary authorization status in IdleSlave

2018-03-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 28543. chinmoyr added a comment. Used MSG_SLAVE_STATUS_V2 REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10822?vs=27998&id=28543 BRANCH D10822 REVISION DETAIL https://phabricator.kde.org/D10822 AFFECTED FILES src/

D11010: Add MSG_SLAVE_STATUS_V2 to slave interface

2018-03-03 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10820: Send slave's polkit authorization status to the host. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D11010 To: chinmoyr, dfaure Cc: #frameworks, michaelh

D10820: Send slave's polkit authorization status to the host

2018-03-03 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependency: D11010: Add MSG_SLAVE_STATUS_V2 to slave interface. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10820 To: chinmoyr, dfaure Cc: #frameworks, michaelh

D10820: Send slave's polkit authorization status to the host

2018-03-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 28541. chinmoyr added a comment. Added method updateTempAuthStatus() to take care of cleaning. Rebased on D11010 REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10820?vs=27993&id=28541

D11010: Add MSG_SLAVE_STATUS_V2 to slave interface

2018-03-03 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: dfaure. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY This patch defines a new version of slave status message MSG_

D10567: Remove handling of privilege operation confirmation prompts from KIO::Job

2018-03-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 28539. chinmoyr marked 3 inline comments as done. chinmoyr added a comment. fix issue with variable declaration REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10567?vs=27478&id=28539 BRANCH D10567 REVISION DETAIL htt

D10818: Store PolicyKit action which the slave is authorized to perform

2018-03-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 28537. chinmoyr added a comment. m_TempAuth -> m_temAuths REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10818?vs=27990&id=28537 BRANCH D10818 REVISION DETAIL https://phabricator.kde.org/D10818 AFFECTED FILES src/

D10824: Delete IdleSlave having temporary authorization

2018-03-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 28536. chinmoyr added a comment. Used deleteLater() REPOSITORY R303 KInit CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10824?vs=28002&id=28536 BRANCH master REVISION DETAIL https://phabricator.kde.org/D10824 AFFECTED FILES src/klau

D10641: Revoke temporary authorization of KIO slave before sending status to IdleSlave

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr removed a dependent revision: D10437: Update file ioslave's temporary authorization list. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10641 To: chinmoyr, dfaure Cc: fvogt, #frameworks, michaelh, kmorwinski

D10437: Update file ioslave's temporary authorization list

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr edited dependencies, added: D10818: Store PolicyKit action which the slave is authorized to perform; removed: D10641: Revoke temporary authorization of KIO slave before sending status to IdleSlave. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10437 To: chinmoyr

D10818: Store PolicyKit action which the slave is authorized to perform

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10437: Update file ioslave's temporary authorization list. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10818 To: chinmoyr, dfaure Cc: #frameworks, michaelh, kmorwinski

D10568: Handle privilege operation confirmation prompts in SlaveBase

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10818: Store PolicyKit action which the slave is authorized to perform. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10568 To: chinmoyr, dfaure Cc: fvogt, #frameworks, michaelh, kmorwinski

D10818: Store PolicyKit action which the slave is authorized to perform

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependency: D10568: Handle privilege operation confirmation prompts in SlaveBase. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10818 To: chinmoyr, dfaure Cc: #frameworks, michaelh, kmorwinski

D10568: Handle privilege operation confirmation prompts in SlaveBase

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr removed a dependent revision: D10641: Revoke temporary authorization of KIO slave before sending status to IdleSlave. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10568 To: chinmoyr, dfaure Cc: fvogt, #frameworks, michaelh, kmorwinski

D10641: Revoke temporary authorization of KIO slave before sending status to IdleSlave

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr removed a dependency: D10568: Handle privilege operation confirmation prompts in SlaveBase. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10641 To: chinmoyr, dfaure Cc: fvogt, #frameworks, michaelh, kmorwinski

D10641: Revoke temporary authorization of KIO slave before sending status to IdleSlave

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependency: D10820: Send slave's polkit authorization status to the host. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10641 To: chinmoyr, dfaure Cc: fvogt, #frameworks, michaelh, kmorwinski

D10820: Send slave's polkit authorization status to the host

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10641: Revoke temporary authorization of KIO slave before sending status to IdleSlave. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10820 To: chinmoyr, dfaure Cc: #frameworks, michaelh, kmorwinski

D10820: Send slave's polkit authorization status to the host

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr edited the summary of this revision. chinmoyr added a dependency: D10818: Store PolicyKit action which the slave is authorized to perform. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10820 To: chinmoyr, dfaure Cc: #frameworks, michaelh, kmorwinski

D10818: Store PolicyKit action which the slave is authorized to perform

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10820: Send slave's polkit authorization status to the host. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10818 To: chinmoyr, dfaure Cc: #frameworks, michaelh, kmorwinski

D10820: Send slave's polkit authorization status to the host

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10822: Store temporary authorization status in IdleSlave. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10820 To: chinmoyr, dfaure Cc: #frameworks, michaelh, kmorwinski

D10822: Store temporary authorization status in IdleSlave

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr edited the summary of this revision. chinmoyr added a dependency: D10820: Send slave's polkit authorization status to the host. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10822 To: chinmoyr, dfaure Cc: #frameworks, michaelh, kmorwinski

D10437: Update file ioslave's temporary authorization list

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 28009. chinmoyr retitled this revision from "Revoke authorization of file ioslave before it is used by another process" to "Update file ioslave's temporary authorization list". chinmoyr edited the summary of this revision. chinmoyr added a comment. Updat

D10824: Delete IdleSlave having temporary authorization

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: dfaure. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY IdleSlave with temporary authorization can be easily misused.

D10822: Store temporary authorization status in IdleSlave

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10824: Delete IdleSlave having temporary authorization. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10822 To: chinmoyr, dfaure Cc: #frameworks, michaelh, kmorwinski

D10822: Store temporary authorization status in IdleSlave

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: dfaure. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY It will be used by klauncher to decide whether or not to kill

D10641: Revoke temporary authorization of KIO slave before sending status to IdleSlave

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 27996. chinmoyr added a comment. Removed other files which were included in previous commit by mistake REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10641?vs=27995&id=27996 BRANCH master REVISION DETAIL https://pha

D10641: Revoke temporary authorization of KIO slave before sending status to IdleSlave

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 27995. chinmoyr retitled this revision from "Revoke temporary authorization of KIO slave before sending it to klauncher" to "Revoke temporary authorization of KIO slave before sending status to IdleSlave". chinmoyr edited the summary of this revision. chinmo

D10820: Send slave's polkit authorization status to the host

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: dfaure. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY Send slave's authorization status along with the oher status

D10818: Store PolicyKit action which the slave is authorized to perform

2018-02-25 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: dfaure. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY After storing the actions it can be decided whether to kill t

D10567: Remove handling of privilege operation confirmation prompts from KIO::Job

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10568: Handle privilege operation confirmation prompts in SlaveBase. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10567 To: chinmoyr, dfaure Cc: fvogt, #frameworks, michaelh

D10568: Handle privilege operation confirmation prompts in SlaveBase

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr edited the summary of this revision. chinmoyr added a dependency: D10567: Remove handling of privilege operation confirmation prompts from KIO::Job. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10568 To: chinmoyr, dfaure Cc: fvogt, #frameworks, michaelh

D10641: Revoke temporary authorization of KIO slave before sending it to klauncher

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr edited the test plan for this revision. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10641 To: chinmoyr, dfaure Cc: fvogt, #frameworks, michaelh

D10437: Revoke authorization of file ioslave before it is used by another process

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 27483. chinmoyr retitled this revision from "Limit the use of file.so for privilege operation to one application" to "Revoke authorization of file ioslave before it is used by another process". chinmoyr edited the summary of this revision. chinmoyr edited th

D10437: Limit the use of file.so for privilege operation to one application

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 27482. chinmoyr added a comment. Changed approach. Now temporary authorization is revoked. REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10437?vs=26905&id=27482 BRANCH master REVISION DETAIL https://phabricator.kde.

D10641: Revoke temporary authorization of KIO slave before sending it to klauncher

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10437: Revoke authorization of file ioslave before it is used by another process. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10641 To: chinmoyr, dfaure Cc: fvogt, #frameworks, michaelh

D10638: [KAuth] Implement revokeTemporaryAuthorization in Polkit1Backend

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10641: Revoke temporary authorization of KIO slave before sending it to klauncher. REPOSITORY R283 KAuth REVISION DETAIL https://phabricator.kde.org/D10638 To: chinmoyr, #frameworks Cc: michaelh

D10641: Revoke temporary authorization of KIO slave before sending it to klauncher

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: dfaure. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY An idle slave authorized for privilege operation can be easil

D10568: Handle privilege operation confirmation prompts in SlaveBase

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10641: Revoke temporary authorization of KIO slave before sending it to klauncher. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10568 To: chinmoyr, dfaure Cc: fvogt, #frameworks, michaelh

D10567: Remove handling of privilege operation confirmation prompts from KIO::Job

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 27478. chinmoyr added a comment. removed m_data REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10567?vs=27315&id=27478 BRANCH master REVISION DETAIL https://phabricator.kde.org/D10567 AFFECTED FILES src/core/job.c

D10636: Add support for revoking temporary authorization in KAuth

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10638: [KAuth] Implement revokeTemporaryAuthorization in Polkit1Backend. REPOSITORY R283 KAuth REVISION DETAIL https://phabricator.kde.org/D10636 To: chinmoyr, #frameworks Cc: fvogt, dfaure, michaelh

D10638: [KAuth] Implement revokeTemporaryAuthorization in Polkit1Backend

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: Frameworks. Restricted Application added a project: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY Same as title. Depends on D10636 REPOSITORY R283 KAuth BRANCH ma

D10636: Add support for revoking temporary authorization in KAuth

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr edited the summary of this revision. REPOSITORY R283 KAuth REVISION DETAIL https://phabricator.kde.org/D10636 To: chinmoyr, #frameworks Cc: fvogt, dfaure, michaelh

D10636: Add support for revoking temporary authorization in KAuth

2018-02-18 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: Frameworks. Restricted Application added a project: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY Revoking authorization for a KAuth::Action is required to fix one security issue in KIO's file ioslave. TEST P

D10567: Remove handling of privilege operation confirmation prompts from KIO::Job

2018-02-15 Thread Chinmoy Ranjan Pradhan
chinmoyr edited the test plan for this revision. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10567 To: chinmoyr, dfaure Cc: fvogt, #frameworks, michaelh

D10568: Handle privilege operation confirmation prompts in SlaveBase

2018-02-15 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: dfaure. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY This way a confirmation dialog is always shown if the applica

D10567: Remove handling of privilege operation confirmation prompts from KIO::Job

2018-02-15 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: dfaure. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY Letting KIO::Job handle these prompts is pointless because an

D10437: Limit the use of file.so for privilege operation to one application

2018-02-13 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. @dfaure I was thinking about revoking authorization just before the idle slave is reassigned by klauncher. polkit-qt-1 provides `revokeTemporaryAuthorization` just for this purpose. We only need to implement it on KAuth's side. Then on slave's side we can do somethi

D10437: Limit the use of file.so for privilege operation to one application

2018-02-11 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. In D10437#204417 , @markg wrote: > Could you provide steps to reproduce what you try to fix? Steps: create files /opt/{a,b} open kioslavetest delete /opt/a open ksysguard and send interrupt signal to kiosl

D10437: Limit the use of file.so for privilege operation to one application

2018-02-11 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. In D10437#204402 , @markg wrote: > I just tried this: > kdesu gwenview (type root password and go to the root homefolder). > In gwenview i can now go to that folder. > In dolphin (started as user, not root) i can

D10437: Limit the use of file.so for privilege operation to one application

2018-02-11 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. In D10437#204382 , @fvogt wrote: > In D10437#204377 , @chinmoyr wrote: > > > The whole work is being done inside KIO::Job. If the application uses regular Jobs then I can't

D10437: Limit the use of file.so for privilege operation to one application

2018-02-11 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. The whole work is being done inside KIO::Job. If the application uses regular Jobs then I can't see how it can fake it. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10437 To: chinmoyr, #frameworks, dfaure, fvogt Cc: michaelh

D10437: Limit the use of file.so for privilege operation to one application

2018-02-11 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added reviewers: Frameworks, dfaure, fvogt. Restricted Application added a project: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY After successful authorization for privilege execution the whole session gets full root-level acc

D10411: Create socket file in user's runtime directory

2018-02-09 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added reviewers: Frameworks, ossi. Restricted Application added a project: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY "/tmp" is world writable so creating socket there is a bad idea. Instead create socket in user's runtime

D10410: Move the task of cleaning up of socket file to file ioslave and FdReceiver

2018-02-09 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10411: Create socket file in user's runtime directory. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10410 To: chinmoyr, #frameworks, ossi Cc: michaelh, ngraham

D9966: [KIO] Fix issues with sharing of file descriptor

2018-02-09 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10410: Move the task of cleaning up of socket file to file ioslave and FdReceiver. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D9966 To: chinmoyr, #frameworks, thiago, dfaure, ossi Cc: ngraham, fvogt, lbeltrame, dfau

D10409: In linux don't use abstract socket to share file descriptor

2018-02-09 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10410: Move the task of cleaning up of socket file to file ioslave and FdReceiver. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10409 To: chinmoyr, #frameworks, ossi Cc: michaelh, ngraham

D10410: Move the task of cleaning up of socket file to file ioslave and FdReceiver

2018-02-09 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added reviewers: Frameworks, ossi. Restricted Application added a project: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY The class SocketAddress is meant only for creating a proper socket address structure. It should not be han

D10409: In linux don't use abstract socket to share file descriptor

2018-02-09 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26830. chinmoyr added a comment. Added back "/tmp/" prefix REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10409?vs=26828&id=26830 BRANCH master REVISION DETAIL https://phabricator.kde.org/D10409 AFFECTED FILES src

D10273: Create proper SocketAddress

2018-02-09 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D10409: In linux don't use abstract socket to share file descriptor. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10273 To: chinmoyr, #frameworks Cc: ossi, thiago, dfaure, michaelh, ngraham

D10409: In linux don't use abstract socket to share file descriptor

2018-02-09 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added reviewers: Frameworks, ossi. Restricted Application added a project: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY Use pathname socket for better security. The socket path will be provided by file ioslave. Depends on

D9966: [KIO] Fix issues with sharing of file descriptor

2018-02-09 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. Is the patch good enough to be pushed? REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D9966 To: chinmoyr, #frameworks, thiago, dfaure, ossi Cc: ngraham, fvogt, lbeltrame, dfaure, michaelh

D6198: Add KAuth support to delete operation

2018-02-09 Thread Chinmoy Ranjan Pradhan
chinmoyr abandoned this revision. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D6198 To: chinmoyr, elvisangelaccio, #frameworks Cc: fvogt, dfaure, davidedmundson, michaelh, ngraham

D10141: Restore Persistence=session for the file ioslave kauth helper

2018-02-09 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. In https://phabricator.kde.org/D10141#197039, @fvogt wrote: > There is one issue I have with this. While this is close to the `sudo`-mode of temporary authorization grants, it doesn't work that way as the whole session has full access via file.so. How ex

D10273: Create proper SocketAddress

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. In https://phabricator.kde.org/D10273#200254, @thiago wrote: > That doesn't make sense. There's QFile::encodeName in the code I was talking talking about FdSender which is used only in kauth helper. REPOSITORY R241 KIO REVISION DETAIL https://phabric

D10273: Create proper SocketAddress

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr added inline comments. INLINE COMMENTS > thiago wrote in fdsender.cpp:24 > The problem here is the API. Why is it using std::string in the first place? The idea was to use std c++ and avoid qt throughout the class because the code will be executed with elevated privileges. REPOSITORY

D9966: [KIO] Fix issues with sharing of file descriptor

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr added inline comments. INLINE COMMENTS > thiago wrote in fdreceiver.cpp:88 > __APPLE__ is there. My question is about OpenBSD, NetBSD and DragonflyBSD. > Are you breaking them? You may not know the answer, but you need to document > the issue if you intentionally cause a Failure To Bui

D10273: Create proper SocketAddress

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26451. chinmoyr added a comment. Fixed buffer overflow. REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10273?vs=26445&id=26451 BRANCH master REVISION DETAIL https://phabricator.kde.org/D10273 AFFECTED FILES src/io

D9966: [KIO] Fix issues with sharing of file descriptor

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr edited the summary of this revision. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D9966 To: chinmoyr, #frameworks, thiago, dfaure, ossi Cc: ngraham, fvogt, lbeltrame, dfaure, michaelh

D9966: [KIO] Fix issues with sharing of file descriptor

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26446. chinmoyr added a comment. Moved changes related to SocketAddress to https://phabricator.kde.org/D10273. Changed #error to #warning. So even if an OS does not have getpeereid or getsockopt compilation will still succeed but copying files will resu

D10273: Create proper SocketAddress

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26445. chinmoyr added a comment. Check for null byte at index 1 in case of returning address length on linux. Use size of finalPath as pathSize. REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10273?vs=26443&id=26445 BRA

D10273: Create proper SocketAddress

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26443. chinmoyr added a comment. Fixed typos REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10273?vs=26441&id=26443 BRANCH master REVISION DETAIL https://phabricator.kde.org/D10273 AFFECTED FILES src/ioslaves/file

D10273: Create proper SocketAddress

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26441. chinmoyr added a comment. Used QByteArray in FdSender Undoed behavioral changes. REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10273?vs=26438&id=26441 BRANCH master REVISION DETAIL https://phabricator.kde.o

D10273: Create proper SocketAddress

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26438. chinmoyr added a comment. Corrected number of bytes to be copied. Added unlink(). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10273?vs=26436&id=26438 BRANCH master REVISION DETAIL https://phabricator.kde.

D10273: Create proper SocketAddress

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr marked 2 inline comments as not done. chinmoyr added inline comments. INLINE COMMENTS > ossi wrote in sharefd_p.h:60 > you still need to address that *somehow* ;) I just feel like the job of SocketAddress should be to create the address structure and not perform any file operation. Rem

D10273: Create proper SocketAddress

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26436. chinmoyr marked 3 inline comments as done. chinmoyr added a comment. Added space on correct side of & and on either sides of binary operators. Used memcpy. Restored original position of data member. REPOSITORY R241 KIO CHANGES SINCE LAST UPD

D10273: Create proper SocketAddress

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: Frameworks. Restricted Application added a project: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY This patch changes SocketAddress class to create an address structure for a pathname socket (on all platforms)

D9966: [KIO] Fix issues with sharing of file descriptor

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26421. chinmoyr added a comment. 1. Used QByteArray in SocketAddress. 2. Rearranged members of FdReceiver. 3. Removed changes not directly related to these fixes. REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9966?vs=

D9966: [KIO] Fix issues with sharing of file descriptor

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr reopened this revision. This revision is now accepted and ready to land. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D9966 To: chinmoyr, #frameworks, thiago, dfaure, ossi Cc: ngraham, fvogt, lbeltrame, dfaure, michaelh

D10266: Improve error handling in file ioslave

2018-02-03 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:27aa3764c0bf: Improve error handling in file ioslave (authored by chinmoyr). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10266?vs=26417&id=26420 REVISION DETAIL h

D10266: Improve error handling in file ioslave

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. The unittests pass. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D10266 To: chinmoyr, dfaure Cc: #frameworks, michaelh, ngraham

D10266: Improve error handling in file ioslave

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. In https://phabricator.kde.org/D10266#199961, @dfaure wrote: > socketPath() being passed by argument: true for OPEN indeed, but what about OPENDIR? No method in FileProtocol calls execWithElevatedPrivilege with OPENDIR action. If one does in future then

D10266: Improve error handling in file ioslave

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26417. chinmoyr added a comment. errno -> errcode KIO::ERR_ACCESS_DENIED -> err socketPath is passed as an argument in line 106 REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10266?vs=26415&id=26417 BRANCH master R

D10266: Improve error handling in file ioslave

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26415. chinmoyr added a comment. Used KIO error codes for windows REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10266?vs=26412&id=26415 BRANCH master REVISION DETAIL https://phabricator.kde.org/D10266 AFFECTED FILE

D10266: Improve error handling in file ioslave

2018-02-03 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added a reviewer: dfaure. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY When executing an action with elevated privileges file ioslav

D10233: [KIO] Remove PrivilegeExecution job flag

2018-02-02 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. Try copying org.kde.kio.file.conf and .service file to dbus-1 directory. It worked for me. On a completely different note, do all jobs have a uidelgate or does passing HideProgressInfo flag prevent it from being created? REPOSITORY R241 KIO REVISION DETAIL

<    1   2   3   4   5   6   >