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

2018-02-02 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:8d8f3025dffd: [KIO] Fix issues with sharing of file descriptor (authored by chinmoyr). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9966?vs=26220=26403 REVISION

D10233: [KIO] Remove PrivilegeExecution job flag

2018-02-01 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added reviewers: Frameworks, dfaure. Restricted Application added a project: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY Same as title. TEST PLAN Unfortunately, it seems no one beside me (and few others?) has tested

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

2018-01-30 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26220. chinmoyr added a comment. 1. Added null pointer check in place of strlen (in SocketAddress::address()) 2. Used QFile::encodeName to convert file path to 8-bit for use in unlink(). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE

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

2018-01-30 Thread Chinmoy Ranjan Pradhan
chinmoyr marked 2 inline comments as done. REPOSITORY R241 KIO 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-01-30 Thread Chinmoy Ranjan Pradhan
chinmoyr added a reviewer: ossi. REPOSITORY R241 KIO 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-01-27 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26045. chinmoyr added a comment. Fix typo. (int->bool in file_p.h line 59) REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9966?vs=26044=26045 BRANCH master REVISION DETAIL https://phabricator.kde.org/D9966 AFFECTED

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

2018-01-27 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26044. chinmoyr added a comment. 1. Added +1 to SocketAddress::length for null byte. 2. Modified PrivilegeOperationReturnValue to use with switch-case and if-else construct. REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE

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

2018-01-27 Thread Chinmoy Ranjan Pradhan
chinmoyr marked an inline comment as done. chinmoyr added inline comments. INLINE COMMENTS > fvogt wrote in sharefd_p.h:66 > If that is the case you can do something like: > > #if !defined(__linux__) && !defined(__FreeBSD__) > #error No secure implementation available > #endif I think

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

2018-01-27 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 26028. chinmoyr added a comment. Changed parameters of execWithElevatedPrivileges(), tryChangeAttr() : now they accept action type, list of arguments and error code. tryOpen(): accepts error code as an additional parameter. @dfaure please have

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

2018-01-25 Thread Chinmoy Ranjan Pradhan
chinmoyr added inline comments. INLINE COMMENTS > file_unix.cpp:117 > +errno = err; > + > if (auto err = execWithElevatedPrivilege(OPEN, path, flags, mode)) { @fvogt I think the errno assignment should be fine here? Except this one case, the function call whose errno value we are

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

2018-01-25 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 25941. chinmoyr added a comment. 1.Change errno value just before execWithPrivilege call REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9966?vs=25897=25941 BRANCH master REVISION DETAIL

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

2018-01-24 Thread Chinmoy Ranjan Pradhan
chinmoyr marked 2 inline comments as done. chinmoyr added inline comments. INLINE COMMENTS > fvogt wrote in fdreceiver.cpp:60 > A quick question: Is it possible that there are two FdReceivers with the same > pid? > In that case they would end up removing each other's sockets. No. Currently

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

2018-01-24 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 25897. chinmoyr added a comment. 1.Return nullptr when address() is called for an invalid socket path 2.Create SocketAddress object before socket . REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9966?vs=25839=25897

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

2018-01-23 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 25839. chinmoyr added a comment. 1.Check for overflow condition. In such case file operation will terminate. 2.Return actual length of buffer 3.Use QStandardPaths::RuntimeLocation for socket creation REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE

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

2018-01-18 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added reviewers: Frameworks, thiago. Restricted Application added a project: Frameworks. chinmoyr requested review of this revision. REVISION SUMMARY This patch, 1.Fixes buffer overflow due to strcpy. 2.Adds checks for socket credentials. Now a file

D7272: [DropJob] Enable drag and drop in a read-only folder

2018-01-12 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:774b303c9680: [DropJob] Enable drag and drop in a read-only folder (authored by chinmoyr). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7272?vs=24601=25229 REVISION

D7270: [FileUndoManager] Enable undoing changes in read-only folders

2018-01-12 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:ac9f30b4a334: [FileUndoManager] Enable undoing changes in read-only folders (authored by chinmoyr). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7270?vs=25227=25228

D7270: [FileUndoManager] Enable undoing changes in read-only folders

2018-01-12 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 25227. chinmoyr edited the summary of this revision. chinmoyr added a comment. Summary update REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7270?vs=24600=25227 BRANCH master REVISION DETAIL

D7430: Add unit tests for privilege excution in KIO

2018-01-12 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:ac51e5769c84: Add unit tests for privilege excution in KIO (authored by chinmoyr). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D7430?vs=24603=25226#toc REPOSITORY R241 KIO CHANGES SINCE

D6833: Add support for privilege execution in KIO jobs

2018-01-12 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:7ccf3cda121f: Add support for privilege execution in KIO jobs (authored by chinmoyr). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6833?vs=25224=25225 REVISION

D6833: Add support for privilege execution in KIO jobs

2018-01-12 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 25224. chinmoyr retitled this revision from "Add support for PrivilegeExecution in KIO jobs" to "Add support for privilege execution in KIO jobs". chinmoyr edited the summary of this revision. chinmoyr added a comment. Title and summary update

D6832: Integrate new file ioslave in KIO job

2018-01-12 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 25222. chinmoyr edited the summary of this revision. chinmoyr added a comment. Summary update Fixed windows build REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6832?vs=24598=25222 BRANCH master REVISION DETAIL

D6832: Integrate new file ioslave in KIO job

2018-01-12 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:596ef4ccf1d7: Integrate new file ioslave in KIO job (authored by chinmoyr). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D6832?vs=25222=25223#toc REPOSITORY R241 KIO CHANGES SINCE LAST

D6830: Make use of kauth helper in copy method of file ioslave

2018-01-12 Thread Chinmoy Ranjan Pradhan
chinmoyr closed this revision. chinmoyr added a comment. commit: https://phabricator.kde.org/R241:13ab6a85bbb8502fe47935f92f466e0223baa2ac REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D6830 To: chinmoyr, dfaure, #frameworks Cc: elvisangelaccio, #frameworks

D6831: Make use of kauth helper in methods of file ioslave

2018-01-12 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:13ab6a85bbb8: Use kauth helper in member functions of FileProtocol (authored by chinmoyr). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6831?vs=25219=25220 REVISION

D6831: Make use of kauth helper in methods of file ioslave

2018-01-12 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 25219. chinmoyr edited the summary of this revision. chinmoyr added a comment. 1.Merge code from https://phabricator.kde.org/D6830 2.Fix FreeBSD (CI) build REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE

D6829: Add ability to use the new kauth helper in file ioslave

2018-01-12 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:eebc78918817: Use kauth helper in file ioslave (authored by chinmoyr). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D6829?vs=24578=25218#toc REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE

D6197: Add kauth helper to file ioslave

2018-01-12 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:17bf6df0d8ba: Add kauth helper to file ioslave (authored by chinmoyr). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6197?vs=20608=25217 REVISION DETAIL

D6709: Add support for sharing file descriptor between KIO slave and KAuth helper

2018-01-12 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:bbf45d2cd550: Add support for sharing file descriptor between file KIO slave and its KAuth… (authored by chinmoyr). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE

D6709: Add support for sharing file descriptor between KIO slave and KAuth helper

2018-01-12 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 25215. chinmoyr edited the summary of this revision. chinmoyr added a comment. Summary update REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6709?vs=24577=25215 BRANCH master REVISION DETAIL

D6830: Make use of kauth helper in copy method of file ioslave

2018-01-11 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. In https://phabricator.kde.org/D6830#189165, @dfaure wrote: > Doesn't execWithElevatedPrivilege call ERR_USER_CANCELED on cancel? It definitely does. And here I was thinking KIO has gone nuts. *biggest facepalm* REPOSITORY R241 KIO BRANCH 6830

D6830: Make use of kauth helper in copy method of file ioslave

2018-01-08 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. ping REPOSITORY R241 KIO BRANCH 6830 REVISION DETAIL https://phabricator.kde.org/D6830 To: chinmoyr, dfaure, #frameworks Cc: elvisangelaccio, #frameworks

D6832: Integrate new file ioslave in KIO job

2018-01-08 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. ping REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D6832 To: chinmoyr, dfaure, #frameworks Cc: mreeves, #frameworks

D7272: [DropJob] Enable drag and drop in a read-only folder

2018-01-08 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. ping REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D7272 To: chinmoyr, #frameworks, dfaure Cc: mreeves, ngraham

D6831: Make use of kauth helper in methods of file ioslave

2018-01-02 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. @dhaumann The helper is called only when the error is EACCES or EPERM. So, if you are already root then this won't be the case and file ioslave will work as usual. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D6831 To:

D7430: Add unit tests for privilege excution in KIO

2018-01-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 24603. chinmoyr retitled this revision from "Add unit test" to "Add unit tests for privilege excution in KIO". chinmoyr edited the summary of this revision. chinmoyr added a comment. Restricted Application added a project: Frameworks. 1.Removed all

D7272: [DropJob] Enable drag and drop in a read-only folder

2018-01-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 24601. chinmoyr added a comment. Restricted Application added a project: Frameworks. 1.Replaced PrivilegeExecution flag 2.Made variable m_flags const again REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE

D7270: [FileUndoManager] Enable undoing changes in read-only folders

2018-01-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 24600. chinmoyr added a comment. Restricted Application added a project: Frameworks. 1.Removed PrivilegeExecution flag REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7270?vs=19183=24600 BRANCH master REVISION DETAIL

D6833: Add support for PrivilegeExecution in KIO jobs

2018-01-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 24599. chinmoyr added a comment. 1.Made privilege execution default in BatchRenameJob. 2.Removed all occurences of PrivilegeExecution as job argument. With these changes and the latest changes in https://phabricator.kde.org/D6831 all the existing

D6832: Integrate new file ioslave in KIO job

2018-01-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 24598. chinmoyr added a comment. 1.Reassigned flag values for NoPrivilegeExecution and PrivilegeExecution. I strongly feel that the latter won't be needed anymore. 2.Setting meta-data for unit test in the job itself (in tryAskPrivilegeOpConfirmation).

D6832: Integrate new file ioslave in KIO job

2018-01-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 24597. chinmoyr added a comment. 1.Reassigned flag values for NoPrivilegeExecution and PrivilegeExecution. I strongly feel that the latter won't be needed anymore. 2.Setting meta-data for unit test in the job itself (in tryAskPrivilegeOpConfirmation).

D6831: Make use of kauth helper in methods of file ioslave

2018-01-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 24585. chinmoyr added a comment. 1.Added check for unit test mode at beginning of put. 2.put was setting the wrong permissions because I initialized 'filemode' to 0 and did't update it. Now it is fixed. 3.Replaced file.setPermissions with

D6830: Make use of kauth helper in copy method of file ioslave

2018-01-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 24583. chinmoyr added a comment. Changes: 1. Added method tryChangeAttr. This will call chown/chmod/utime in copy with elevated privileges only during the brief period authorization is kept. 2.Added check for unit test mode at beginning of

D6829: Add ability to use the new kauth helper in file ioslave

2018-01-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 24578. chinmoyr added a comment. 1.Added method privilegeOperationUnitTestMode. This replaces the previous block of code which tested the validity of the KAuth action by looking up the action in *.policy file. I think instead of looking for some

D6709: Add support for sharing file descriptor between KIO slave and KAuth helper

2018-01-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 24577. chinmoyr retitled this revision from "[RFC] Add support for sharing file descriptor between KIO slave and KAuth helper" to "Add support for sharing file descriptor between KIO slave and KAuth helper". chinmoyr added a comment. Fixed compilation

D9107: Add undo support to BatchRenameJob

2017-12-03 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:befcbbd4e36b: Add undo support to BatchRenameJob (authored by chinmoyr). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9107?vs=23290=23340 REVISION DETAIL

D9103: Add BatchRenameJob to KIO

2017-12-03 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:12bf704476c6: Add BatchRenameJob to KIO (authored by chinmoyr). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9103?vs=23306=23337 REVISION DETAIL

D9103: Add BatchRenameJob to KIO

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 23306. chinmoyr added a comment. removed exception for ERR_FILE_ALREADY_EXISTS. REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9103?vs=23299=23306 BRANCH master REVISION DETAIL https://phabricator.kde.org/D9103

D9103: Add BatchRenameJob to KIO

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr added inline comments. INLINE COMMENTS > dfaure wrote in batchrenamejob.cpp:196 > Ah right KIO::moveAs itself pops up the overwrite dialog, but then can it end > with KIO::ERR_FILE_ALREADY_EXIST ? At that point the user should overwrite or > skip or cancel. Are you really sure this

D9103: Add BatchRenameJob to KIO

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 23299. chinmoyr added a comment. changed 'first' to 'pos'. added one more example to the doc. REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9103?vs=23286=23299 BRANCH master REVISION DETAIL

D9107: Add undo support to BatchRenameJob

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 23290. chinmoyr marked 2 inline comments as done. chinmoyr added a comment. minor changes REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9107?vs=23275=23290 BRANCH master REVISION DETAIL

D9103: Add BatchRenameJob to KIO

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr added inline comments. INLINE COMMENTS > dfaure wrote in batchrenamejob.cpp:55 > Why special case "not a sequence", rather than just replacing the first > (last?) sequence? Because there might not be a first or last sequence present. In case 3 we don't need a replacement and in case

D9103: Add BatchRenameJob to KIO

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 23286. chinmoyr marked 13 inline comments as done. chinmoyr added a comment. Hopefully I haven't missed any more of your comments. REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9103?vs=23281=23286 BRANCH master

D9103: Add BatchRenameJob to KIO

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 23281. chinmoyr marked 10 inline comments as done. chinmoyr added a comment. Made the required changes REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9103?vs=23272=23281 BRANCH master REVISION DETAIL

D9107: Add undo support to BatchRenameJob

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added reviewers: Frameworks, dfaure. Restricted Application added a project: Frameworks. REVISION SUMMARY This patch makes undoing a batch rename possible. Depends on https://phabricator.kde.org/D9103 REPOSITORY R241 KIO BRANCH master

D9103: Add BatchRenameJob to KIO

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D9107: Add undo support to BatchRenameJob. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D9103 To: chinmoyr, #frameworks, dfaure Cc: apol

D9103: Add BatchRenameJob to KIO

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 23272. chinmoyr added a comment. Emit both old and new url in fileRenamed. It will be useful when undoing. REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9103?vs=23260=23272 BRANCH master REVISION DETAIL

D9103: Add BatchRenameJob to KIO

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. In https://phabricator.kde.org/D9103#174381, @apol wrote: > Wouldn't it be easier to have this job in Dolphin? Or it needs to be in kio to access private API? Adding undo support is easier if it's in KIO. REPOSITORY R241 KIO REVISION DETAIL

D9103: Add BatchRenameJob to KIO

2017-12-02 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. chinmoyr added reviewers: Frameworks, dfaure. Restricted Application added a project: Frameworks. REVISION SUMMARY This job will be used to rename multiple files. It basically reuses the code from `Dolphin::RenameDialog`. REPOSITORY R241 KIO BRANCH master

D6829: Add ability to use the new kauth helper in file ioslave

2017-10-29 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/D6829 To: chinmoyr, dfaure, #frameworks Cc: #frameworks

D6197: Add kauth helper to file ioslave

2017-10-29 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/D6197 To: chinmoyr, elvisangelaccio, #frameworks, dfaure

D6709: [RFC] Add support for sharing file descriptor between KIO slave and KAuth helper

2017-10-29 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/D6709 To: chinmoyr, thiago, #frameworks, dfaure Cc: dfaure, davidedmundson, elvisangelaccio, shortstheory

D6829: Add ability to use the new kauth helper in file ioslave

2017-10-11 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:c4726e843e42: Add ability to use the new kauth helper in file ioslave (authored by chinmoyr). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D6829?vs=20311=20610#toc REPOSITORY R241 KIO

D6197: Add kauth helper to file ioslave

2017-10-11 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:29a741982fe5: Add kauth helper to file ioslave (authored by chinmoyr). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D6197?vs=20310=20608#toc REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE

D6709: [RFC] Add support for sharing file descriptor between KIO slave and KAuth helper

2017-10-11 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes. Closed by commit R241:0c2a6811dc50: Add support for sharing file descriptor between file ioslave and its KAuth… (authored by chinmoyr). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D6709?vs=20232=20607#toc

D6833: Add support for PrivilegeExecution in KIO jobs

2017-10-08 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 20489. chinmoyr added a comment. - Privilege execution turned on by default With these changes 3 tests of jobtest failed. CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6833?vs=19178=20489 BRANCH master REVISION DETAIL

D6832: Integrate new file ioslave in KIO job

2017-10-08 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 20486. chinmoyr added a comment. minox changes CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6832?vs=20454=20486 BRANCH master REVISION DETAIL https://phabricator.kde.org/D6832 AFFECTED FILES src/core/job.cpp src/core/job_base.h

D6832: Integrate new file ioslave in KIO job

2017-10-07 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 20454. chinmoyr added a comment. Added `NoPrivilegeExecution` flag to opt-out privilege execution. CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6832?vs=18702=20454 BRANCH master REVISION DETAIL https://phabricator.kde.org/D6832

D6709: [RFC] Add support for sharing file descriptor between KIO slave and KAuth helper

2017-10-07 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. In https://phabricator.kde.org/D6709#153057, @dfaure wrote: > This is all ready to push now, right? > > Please do, once the 5.39 RC tags are there (should happen today or tomorrow). This patch is. I have yet to add the new flag. BRANCH master

D6831: Make use of kauth helper in methods of file ioslave

2017-10-05 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 20367. chinmoyr added a comment. Added correct header Removed the `openMode` variable. `FileProtocol::tryOpen` takes care of file mode. Newline changes CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6831?vs=19170=20367 BRANCH master

D6830: Make use of kauth helper in copy method of file ioslave

2017-10-05 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 20366. chinmoyr added a comment. used the new header and method CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6830?vs=19167=20366 BRANCH master REVISION DETAIL https://phabricator.kde.org/D6830 AFFECTED FILES src/ioslaves/file/file.h

D6829: Add ability to use the new kauth helper in file ioslave

2017-10-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 20311. chinmoyr added a comment. copied the exact comment :) CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6829?vs=18693=20311 BRANCH master REVISION DETAIL https://phabricator.kde.org/D6829 AFFECTED FILES src/core/global.h

D6197: Add kauth helper to file ioslave

2017-10-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 20310. chinmoyr added a comment. replaced occurence of sharefd.{h, cpp} with fdsender.{h, cpp} CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6197?vs=18504=20310 BRANCH master REVISION DETAIL https://phabricator.kde.org/D6197 AFFECTED

D6709: [RFC] Add support for sharing file descriptor between KIO slave and KAuth helper

2017-10-02 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 20232. chinmoyr added a comment. Changed isValid() -> isListening() in FdReceiver CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6709?vs=19758=20232 BRANCH master REVISION DETAIL https://phabricator.kde.org/D6709 AFFECTED FILES

D6709: [RFC] Add support for sharing file descriptor between KIO slave and KAuth helper

2017-09-21 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 19758. chinmoyr added a comment. Added license header CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6709?vs=19757=19758 BRANCH sharefd REVISION DETAIL https://phabricator.kde.org/D6709 AFFECTED FILES src/ioslaves/file/CMakeLists.txt

D6709: [RFC] Add support for sharing file descriptor between KIO slave and KAuth helper

2017-09-21 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 19757. chinmoyr marked an inline comment as done. chinmoyr added a comment. - separated FdReceiver and FdSender - KMSgHdr -> FDMessageHeader and KSockaddrUn -> SocketAddress and moved them to private header - removed `stopListening()` method. Qt can

D7270: [FileUndoManager] Enable undoing changes in read-only folders

2017-09-04 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 19183. chinmoyr added a comment. I cannot think of any good reason as to why anyone would want to disable undo. So, removing the checks. As of now copying from a locked folder is not supported. So your example file operation is not possible. CHANGES

D6833: Add support for PrivilegeExecution in KIO jobs

2017-09-04 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 19178. chinmoyr added a comment. - Made method const - Removed unnecessary new line CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6833?vs=18019=19178 REVISION DETAIL https://phabricator.kde.org/D6833 AFFECTED FILES

D6831: Make use of kauth helper in methods of file ioslave

2017-09-04 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 19170. chinmoyr added a comment. - ret -> err - used tryOpen @dfaure shall i merge https://phabricator.kde.org/D6830 & https://phabricator.kde.org/D6831 into a single commit? CHANGES SINCE LAST UPDATE

D6830: Make use of kauth helper in copy method of file ioslave

2017-09-04 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 19167. chinmoyr added a comment. removedextra semi-colon CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6830?vs=19166=19167 REVISION DETAIL https://phabricator.kde.org/D6830 AFFECTED FILES src/ioslaves/file/file.h

D7563: Add privilegeExecution field to file protocol description

2017-08-27 Thread Chinmoy Ranjan Pradhan
chinmoyr added a dependent revision: D7571: Enable modifying root-owned files in Dolphin. REVISION DETAIL https://phabricator.kde.org/D7563 To: chinmoyr, #frameworks, dfaure Cc: elvisangelaccio

D7563: Add privilegeExecution field to file protocol description

2017-08-26 Thread Chinmoy Ranjan Pradhan
chinmoyr added a task: T6561: Polkit support in KIO. REVISION DETAIL https://phabricator.kde.org/D7563 To: chinmoyr, #frameworks, dfaure Cc: elvisangelaccio

D7563: Add privilegeExecution field to file protocol description

2017-08-26 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. REVISION SUMMARY "privilegeExecution" field will specify if protocol can perform file operation with elevated privileges. Dolphin relies on `KFileItemListProperties` for enabling some of its context menu actions. Internally `KFileItemListProperties` uses

D6832: Integrate new file ioslave in KIO job

2017-08-24 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18702. chinmoyr added a comment. - Return an enum (PrivilegeOperationStatus) instead of bool for confirmation status. CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6832?vs=18018=18702 BRANCH master REVISION DETAIL

D6831: Make use of kauth helper in methods of file ioslave

2017-08-24 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18697. chinmoyr added a comment. - use the new execWithElevatedPrivilege method CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6831?vs=18016=18697 BRANCH master REVISION DETAIL https://phabricator.kde.org/D6831 AFFECTED FILES

D6830: Make use of kauth helper in copy method of file ioslave

2017-08-24 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18695. chinmoyr added a comment. - use the new execWithElevatedPrivilege method CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6830?vs=18208=18695 BRANCH master REVISION DETAIL https://phabricator.kde.org/D6830 AFFECTED FILES

D6829: Add ability to use the new kauth helper in file ioslave

2017-08-24 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18693. chinmoyr added a comment. - Changed back to the old version of PrivilegeOperationReturnValue with slight modification. See my previous comment. CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6829?vs=18508=18693 BRANCH second

D6829: Add ability to use the new kauth helper in file ioslave

2017-08-23 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. Actually, I like this construct quite a bit. if (!dir.rmdir(itemPath)) { if (auto ret = execWithElevatedPrivilege(RMDIR, itemPath)) { if (!ret.wasCanceled()) { error(KIO::ERR_CANNOT_DELETE, itemPath); }

D6829: Add ability to use the new kauth helper in file ioslave

2017-08-21 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18508. chinmoyr added a comment. - Added new variable m_failure to PrivilegeOperationReturnValue so that we can directly check for failed state rather than depending upon fallacy of other variables. - Added check for chmod, chown and utime operation

D6197: Add kauth helper to file ioslave

2017-08-21 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18504. chinmoyr added a comment. - Minor changes in sendFileDescriptor function because constructor of FdSender changed in https://phabricator.kde.org/D6709. CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6197?vs=18301=18504 BRANCH master

D6709: [RFC] Add support for sharing file descriptor between KIO slave and KAuth helper

2017-08-21 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18502. chinmoyr added a comment. - Made changes that were suggested here : https://codereview.stackexchange.com/questions/173306/sharing-file-descriptor-between-an-under-privileged-and-a-privileged-process-us CHANGES SINCE LAST UPDATE

D6829: Add ability to use the new kauth helper in file ioslave

2017-08-17 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. Returning a small class instead of enum doesn't really reduce the number of nested if's (which was why I didn't used an enum in first place). But it offers bit more clarity and readability in if..else statements. The rest depends on me. I want to confirm if

D6829: Add ability to use the new kauth helper in file ioslave

2017-08-17 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18320. chinmoyr added a comment. - Added class PrivilegeOperationReturnValue - Fixed doc - Removed hard-coded switch..case - privilegeOperationStatus() -> requestPrivilegeOperation() CHANGES SINCE LAST UPDATE

D6197: Add kauth helper to file ioslave

2017-08-17 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18301. chinmoyr added a comment. -Removed the hard-coded socket path. Now it will take socket path from ioslave. -Removed sendFileDescriptor(-1) calls. CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6197?vs=18300=18301 BRANCH master

D6197: Add kauth helper to file ioslave

2017-08-17 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18300. chinmoyr added a comment. - Removed the hard-coded socket path. Now it will take socket path from ioslave. - Removed sendFileDescriptor(-1) calls. CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6197?vs=18235=18300 BRANCH master

D6197: Add kauth helper to file ioslave

2017-08-17 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. > Is it even needed to send -1, if we're going to return an error reply anyway? The current logic is "after a successful sendFileDescriptor close the socket". So sending -1 was to ensure socket is closed. REVISION DETAIL https://phabricator.kde.org/D6197

D6709: [RFC] Add support for sharing file descriptor between KIO slave and KAuth helper

2017-08-17 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18298. chinmoyr added a comment. - add stopListening method to FdReceiver CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6709?vs=17012=18298 BRANCH master REVISION DETAIL https://phabricator.kde.org/D6709 AFFECTED FILES

D7270: [FileUndoManager] Enable undoing changes in read-only folders

2017-08-16 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. > Is this subclass needed? You could just move the code of its constructor to the UndoJob constructor, no? (using Q_D of course) I tried this before anything else and it didn't worked. Q_D requires a private class, right? > It seems to me that we only want

D6829: Add ability to use the new kauth helper in file ioslave

2017-08-16 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18242. chinmoyr added a comment. - Added variable (mUserCanceled) to denote if user canceled operation - Return PrivilegeOperationStatusin SlaveBase's method. Went with switch instead static_cast. Cannot make it const. - Cancelled -> Canceled

D6197: Add kauth helper to file ioslave

2017-08-16 Thread Chinmoy Ranjan Pradhan
chinmoyr added inline comments. INLINE COMMENTS > dfaure wrote in filehelper.cpp:46 > Well, this proves exactly my earlier point: we should only test errno *when* > a libc function fails. > > If this code is still checking errno after success somewhere, then *that* it > what should be fixed.

<    1   2   3   4   5   6   >