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

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-10 Thread David Faure
dfaure added a comment. Doesn't execWithElevatedPrivilege call ERR_USER_CANCELED on cancel? That was the idea, at least. I can't check, it's really hard to navigate code spread over many review requests, I can't wait for all of this to be pushed ;-) REPOSITORY R241 KIO BRANCH

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

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

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

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

2017-09-09 Thread David Faure
dfaure accepted this revision. This revision is now accepted and ready to land. REVISION DETAIL https://phabricator.kde.org/D6830 To: chinmoyr, dfaure, #frameworks Cc: elvisangelaccio, #frameworks

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

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

2017-08-24 Thread David Faure
dfaure requested changes to this revision. dfaure added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > file_unix.cpp:165 > +int dest_fd = fdRecv.fileDescriptor(); > +if (!dest_file.open(dest_fd, QIODevice::Truncate | > QIODevice::WriteOnly,

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

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

2017-08-15 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18208. chinmoyr added a comment. - Added method to check if filesystem supports chmod, chown and utime. - Added check for EUSERCANCELLED error. CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6830?vs=18015=18208 BRANCH master REVISION

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

2017-08-11 Thread David Faure
dfaure requested changes to this revision. dfaure added a comment. This revision now requires changes to proceed. You wrote: "For the case you mentioned kauth prompt will always be triggered during opening of file for writing." I disagree. My example case is a FAT permission where the

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

2017-08-11 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 18015. chinmoyr added a comment. Minor changes CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6830?vs=17782=18015 BRANCH master REVISION DETAIL https://phabricator.kde.org/D6830 AFFECTED FILES src/ioslaves/file/file_unix.cpp To:

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

2017-08-11 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment. For the case you mentioned kauth prompt will always be triggered during opening of file for writing. Operations like chmod, chown, utime will work (and then fail) without showing any prompt. REVISION DETAIL https://phabricator.kde.org/D6830 To: chinmoyr, dfaure,

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

2017-08-07 Thread David Faure
dfaure requested changes to this revision. dfaure added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > file_unix.cpp:244 > #endif > -dest_file.remove(); // don't keep partly copied file > +if (!!QFile::remove(dest)) { // don't keep

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

2017-08-06 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 17782. chinmoyr added a comment. - added 'return' - fixed some typos - dest_file.remove() -> QFile::remove(dest). because when working with fd, dest_file.remove() fails but doesn't set errno to EACCES or EPERM. - dest_file.setPermissions() ->

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

2017-08-04 Thread David Faure
dfaure accepted this revision. dfaure added a comment. This revision is now accepted and ready to land. The diff has no context in phabricator, which is a problem for this one (e.g. for the "do we need this here?" questions). Can you upload the update using `arc diff` for example? INLINE

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

2017-07-22 Thread Chinmoy Ranjan Pradhan
chinmoyr edited the summary of this revision. chinmoyr added reviewers: dfaure, Frameworks. chinmoyr added a subscriber: elvisangelaccio. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D6830 To: chinmoyr, dfaure, #frameworks Cc: elvisangelaccio, #frameworks

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

2017-07-22 Thread Chinmoy Ranjan Pradhan
chinmoyr removed a task: T6561: Polkit support in KIO. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D6830 To: chinmoyr Cc: #frameworks

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

2017-07-22 Thread Chinmoy Ranjan Pradhan
chinmoyr added a task: T6561: Polkit support in KIO. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D6830 To: chinmoyr Cc: #frameworks

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

2017-07-22 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. REVISION SUMMARY This patch adds calls to `execWithElevatedPrivilege()` in copy method. `FileProtocol::copy()` is an important and somewhat complex