<table><tr><td style="">madcatx added a comment.
</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/D8387" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D8387#157502" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D8387#157502</a>, <a href="https://phabricator.kde.org/p/ngraham/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@ngraham</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>So am I correct that this patch does the following:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">If you go to a real password-protected samba server, without this patch you are totally screwed; with it, you are correctly offered a chance to enter your credentials</li>
<li class="remarkup-list-item">If you go to an invalid address that doesn't exist, without this patch you are told that; with it, you are erroneously offered a credentials window, making you think that the address is real
<br /><br />
If so, is there any other way to check whether the server address is valid besides getting back EEXIST?</li>
</ul></div>
</blockquote>
<p>This is pretty much the case. One way how to get the login dialog without the patch is to manually enter a valid path like this: "smb://SERVER/valid_share/valid_directory". In this case libsmbclient returns EPERM instead of EEXIST if the requested directory is password-protected. I believe I descried this in a bit more detail in the Samba bug report.</p>
<blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D8387#157551" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D8387#157551</a>, <a href="https://phabricator.kde.org/p/graesslin/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@graesslin</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>Could you check which libsmbclient version is used and ifdef the change?</p></div>
</blockquote>
<p>Ifdefing around this won't do much good because applications should not require a rebuild against updated libsmbclient. Peeking through the header file I discovered <tt style="background: #ebebeb; font-size: 13px;">const char * smbc_version(void)</tt>. I'll see if I can use this to restrict this hack only to the troublesome libsmbclient versions. Stay tuned.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R320 KIO Extras</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8387" rel="noreferrer">https://phabricator.kde.org/D8387</a></div></div><br /><div><strong>To: </strong>madcatx, ngraham, davidedmundson, elvisangelaccio, Frameworks<br /><strong>Cc: </strong>graesslin, z3ntu<br /></div>