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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 added a comment.
ping
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D6832
To: chinmoyr, dfaure, #frameworks
Cc: mreeves, #frameworks
chinmoyr added a comment.
ping
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D7272
To: chinmoyr, #frameworks, dfaure
Cc: mreeves, ngraham
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:
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
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
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
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
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).
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).
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
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
chinmoyr added a task: T6561: Polkit support in KIO.
REVISION DETAIL
https://phabricator.kde.org/D7563
To: chinmoyr, #frameworks, dfaure
Cc: elvisangelaccio
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
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
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
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 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
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);
}
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
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
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
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
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
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
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
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
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
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
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
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.
301 - 400 of 573 matches
Mail list logo