<table><tr><td style="">sitter created this revision.<br />sitter added a reviewer: dfaure.<br />Herald added projects: Dolphin, Frameworks.<br />Herald added subscribers: kfm-devel, kde-frameworks-devel.<br />sitter requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D24487">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>this was previously wrong in two ways:</p>
<ol class="remarkup-list">
<li class="remarkup-list-item">errors from the password check would previously be ignored but still end in early termination of the mount command despite that command not having finished (successfully)</li>
<li class="remarkup-list-item">since the password check is always run we may not actually require auth data in which case it is perfectly reasonable for the user to cancel the auth request (the user experience sucks, but there's not much we can do within the special command I think)</li>
</ol>
<p>to solve both issues special now exists in error when there was an error<br />
forwarded out of checkpassword (e.g. kiod is broken) BUT NOT when that<br />
error is that the user canceled the auth query.</p>
<p>no auth info being provided is already supported later on in the actual<br />
mount code.</p>
<p>testing code for posterity</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">#define KIO_ARGS QByteArray packedArgs; QDataStream stream( &packedArgs, QIODevice::WriteOnly ); stream
KIO_ARGS << int(1)
<< QString("\\\\HOST/PATH/") // remotepath
<< QString("/LOCAL/MNT") // mountpoint
;
auto job = KIO::special(QUrl("smb://HOST/PATH/"), packedArgs);</pre></div></div></div><br /><div><strong>TEST PLAN</strong><div><h2 class="remarkup-header">broken kiod</h2>
<ul class="remarkup-list">
<li class="remarkup-list-item">run job</li>
<li class="remarkup-list-item">get error about broken kiod</li>
</ul>
<h2 class="remarkup-header">cancel with working kiod</h2>
<ul class="remarkup-list">
<li class="remarkup-list-item">run job</li>
<li class="remarkup-list-item">get error about smbmount not being installed (bc it hasn't been a thing since the 2000's ;))</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R320 KIO Extras</div></div></div><br /><div><strong>BRANCH</strong><div><div>Applications/19.08</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D24487">https://phabricator.kde.org/D24487</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>smb/kio_smb_mount.cpp</div></div></div><br /><div><strong>To: </strong>sitter, dfaure<br /><strong>Cc: </strong>kde-frameworks-devel, kfm-devel, iasensio, fprice, LeGast00n, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov<br /></div>