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&id=25220
REVISI
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
https://phabricator.kde.org/D6831?vs=24585&id=
dfaure accepted this revision.
dfaure added inline comments.
INLINE COMMENTS
> file.cpp:304
> +bool dirCreated;
> +if (!(dirCreated = QDir().mkdir(path))) {
> +if (auto err = execWithElevatedPrivilege(MKDIR, path)) {
moving this to the line above would be simpler / mo
dhaumann added a comment.
Ok, good :)
REPOSITORY
R241 KIO
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D6831
To: chinmoyr, dfaure, #frameworks
Cc: dhaumann, #frameworks
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: chinm
dhaumann added a comment.
Without looking too much into details of the patch: what happens, if you are
already root? Does that work as expected?
I am asking, since we introduced regressions into Kate since using kauth to
save data with elevated privileges: Kate disallows running as root.
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 Qfile::setPe
dfaure accepted this revision.
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D6831
To: chinmoyr, dfaure, #frameworks
Cc: #frameworks
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&id=20367
BRANCH
master
dfaure added a comment.
separate commits are easier to review, so that's fine
INLINE COMMENTS
> file.cpp:651
> +oflags = O_RDWR | O_APPEND;
> +openMode = QIODevice::ReadWrite | QIODevice::Append;
> } else {
why not share th
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
https://phabricator.kde.org/D6831?vs=18697&i
dfaure accepted this revision.
dfaure added a comment.
This revision is now accepted and ready to land.
Ah! I know how to improve the readability of (auto ret =
execWithElevatedPrivilege)... please rename all "ret" variables to "err" (short
for error, which is already taken), or if you prefer
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&id=18697
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D6831
AFFECTED FILES
src/ios
dfaure added a comment.
If you agree that showing an error message after hitting Cancel on the kauth
prompt is suboptimal (I didn't actually test it), then it seems to me that a
simple solution to turn `bool isPrivilegeOperationAllowed()` into a method that
returns an enum? (same for `execWi
chinmoyr added a comment.
> what happens if the user cancels the root-password prompt? He will then get
another msg box with "cannot create directory?" even though he/she purposefully
canceled the operation? When that happens the slave should use
error(KIO::ERR_USER_CANCELED) instead (which
chinmoyr updated this revision to Diff 18016.
chinmoyr added a comment.
- Fixed error handling logic in FileProtocol::chmod.
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D6831?vs=17019&id=18016
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D6831
AFFECTED FILES
s
dfaure requested changes to this revision.
dfaure added a comment.
This revision now requires changes to proceed.
Please resubmit with context.
Also, did you check that unittests still pass? No kauth prompt should occur
:-)
INLINE COMMENTS
> file.cpp:242
> #if defined(ENOTSUP)
> -
chinmoyr edited the summary of this revision.
chinmoyr added reviewers: dfaure, Frameworks.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D6831
To: chinmoyr, dfaure, #frameworks
Cc: #frameworks
chinmoyr added a task: T6561: Polkit support in KIO.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D6831
To: chinmoyr
Cc: #frameworks
chinmoyr removed a task: T6561: Polkit support in KIO.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D6831
To: chinmoyr
Cc: #frameworks
chinmoyr added a task: T6561: Polkit support in KIO.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D6831
To: chinmoyr
Cc: #frameworks
chinmoyr created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
REVISION SUMMARY
Adds calls to `execWithRootPrivileges()` to following methods
chmod(), get(), mkdir(), put(), setModificationTime(), deleteRecursive(),
22 matches
Mail list logo