Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/dfm-mount/private/dnetworkmounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static constexpr char kLoginDomain[] { "domain" };
static constexpr char kLoginPasswd[] { "passwd" };
static constexpr char kLoginTimeout[] { "timeout" };
static constexpr char kMountFsType[] { "fsType" };
static constexpr char kSmbConfigPath[] { "/etc/samba/smb.conf" };

static constexpr char kDaemonMountRetKeyMpt[] { "mountPoint" };
static constexpr char kDaemonMountRetKeyErrno[] { "errno" };
Expand Down Expand Up @@ -220,9 +221,11 @@ void DNetworkMounter::mountByDaemon(const QString &address, GetMountPassInfo get
DeviceOperateCallbackWithMessage mountResult, int secs)
{
auto requestLoginInfo = [address, getPassInfo] {
if (getPassInfo)
if (getPassInfo) {
QSettings setting(kSmbConfigPath, QSettings::IniFormat);
return getPassInfo(QObject::tr("need authorization to access %1").arg(address),
Utils::currentUser(), "WORKGROUP");
Utils::currentUser(), setting.value("global/workgroup", "WORKGROUP").toString());
}
return MountPassInfo();
};
auto checkThread = [] {
Expand Down