improve error reporting for when kpasswdserver is unreachable
ClosedPublic

Authored by sitter on Oct 3 2019, 1:22 PM.

Details

Summary

previously we'd not forward the errors coming out of the password dialog
helper and instead eventually end up on generic access denied errors.
seeing as the access denied is likely because we couldn't query auth info
that is fairly misleading.

checkPassword is now returning an error code instead of a bool. when we
actually consider checkPassword an error we'll now raise this error
instead of the generic access denied errors. when the user canceled
the query we'll continue to raise the more topical error from smb (e.g.
"access denied")

primarily these errors appear when kiod/kpasswdserver is defunct
or not installed meaning query functionality will not work at all.

Test Plan

broken kiod

  • remove dbus service file
  • kill
  • dolphin smb://host
  • no auth query
  • error about broken dialog

cancel

  • repair kiod
  • dolphin smb://host
  • auth query
  • cancel
  • auth query
  • cancel
  • error about access denied (because refused to authenticate)

Diff Detail

Repository
R320 KIO Extras
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Oct 3 2019, 1:22 PM
Restricted Application added projects: Dolphin, Frameworks. · View Herald TranscriptOct 3 2019, 1:22 PM
Restricted Application added subscribers: kfm-devel, kde-frameworks-devel. · View Herald Transcript
sitter requested review of this revision.Oct 3 2019, 1:22 PM
sitter edited the test plan for this revision. (Show Details)Oct 4 2019, 12:21 PM
dfaure accepted this revision.Oct 4 2019, 1:00 PM
dfaure added inline comments.
smb/kio_smb_mount.cpp
72

(pre-existing: shouldn't this call error rather than finished?)

This revision is now accepted and ready to land.Oct 4 2019, 1:00 PM
sitter added inline comments.Oct 8 2019, 9:27 AM
smb/kio_smb_mount.cpp
72

Ah yes, I was thinking the same thing but didn't manage to find a reasonable way to use this feature so it's hard to test. I'll write my own demo app I guess.

This revision was automatically updated to reflect the committed changes.