Workaround incorrectly returned EEXIST instead of EPERM regression introduced…

Authored by madcatx on Nov 1 2017, 12:19 AM.

Description

Workaround incorrectly returned EEXIST instead of EPERM regression introduced by libsmbclient 4.7

Summary:
There appears to be an issue with libsmbclient 4.7 that returns nonsensical EEXIST error code when a user has not authenticated themselves to access password-protected shares. This patch attempts to work around the issue by treating EEXIST as another case of "invalid login credentials". The workaround tries to detect broken versions of libsmbclient and enables itself only when such a version is found.

See https://bugzilla.samba.org/show_bug.cgi?id=13050 for upstream bug report.

BUG: 385708

Reviewers: ngraham, davidedmundson, elvisangelaccio, Frameworks

Reviewed By: ngraham, davidedmundson

Subscribers: cfeck, rdieter, graesslin, z3ntu

Differential Revision: https://phabricator.kde.org/D8387