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
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
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
chinmoyr added a comment.
ping
REPOSITORY
R241 KIO
BRANCH
6830
REVISION DETAIL
https://phabricator.kde.org/D6830
To: chinmoyr, dfaure, #frameworks
Cc: elvisangelaccio, #frameworks
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
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
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
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
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,
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
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
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
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:
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,
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
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() ->
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
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
chinmoyr removed a task: T6561: Polkit support in KIO.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D6830
To: chinmoyr
Cc: #frameworks
chinmoyr added a task: T6561: Polkit support in KIO.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D6830
To: chinmoyr
Cc: #frameworks
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
21 matches
Mail list logo