Commit ae15ff41 authored by jimmy's avatar jimmy Committed by Commit Bot

Add ntlm_enabled parameter to SmbProviderClient::Remount

Adds bool parameter for enabling/disabling NTLM on Remount.

Bug: chromium:888096
Change-Id: I072362ef347f57831db518ebe10dcaa11327ea8b
Reviewed-on: https://chromium-review.googlesource.com/c/1269175Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Commit-Queue: jimmy gong <jimmyxgong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598902}
parent 2f696e77
......@@ -310,7 +310,7 @@ void SmbService::Remount(const ProvidedFileSystemInfo& file_system_info) {
// which expects username & workgroup strings along with a password file
// descriptor.
GetSmbProviderClient()->Remount(
mount_path, mount_id, workgroup, username,
mount_path, mount_id, IsNTLMAuthenticationEnabled(), workgroup, username,
temp_file_manager_->WritePasswordToFile("" /* password */),
base::BindOnce(&SmbService::OnRemountResponse, AsWeakPtr(),
file_system_info.file_system_id()));
......
......@@ -52,6 +52,7 @@ void FakeSmbProviderClient::Mount(const base::FilePath& share_path,
void FakeSmbProviderClient::Remount(const base::FilePath& share_path,
int32_t mount_id,
bool ntlm_enabled,
const std::string& workgroup,
const std::string& username,
base::ScopedFD password_fd,
......
......@@ -37,6 +37,7 @@ class CHROMEOS_EXPORT FakeSmbProviderClient : public SmbProviderClient {
void Remount(const base::FilePath& share_path,
int32_t mount_id,
bool ntlm_enabled,
const std::string& workgroup,
const std::string& username,
base::ScopedFD password_fd,
......
......@@ -96,6 +96,7 @@ class SmbProviderClientImpl : public SmbProviderClient {
void Remount(const base::FilePath& share_path,
int32_t mount_id,
bool ntlm_enabled,
const std::string& workgroup,
const std::string& username,
base::ScopedFD password_fd,
......@@ -106,6 +107,10 @@ class SmbProviderClientImpl : public SmbProviderClient {
options.set_workgroup(workgroup);
options.set_username(username);
std::unique_ptr<smbprovider::MountConfigProto> config =
CreateMountConfigProto(ntlm_enabled);
options.set_allocated_mount_config(config.release());
dbus::MethodCall method_call(smbprovider::kSmbProviderInterface,
smbprovider::kRemountMethod);
dbus::MessageWriter writer(&method_call);
......
......@@ -72,6 +72,7 @@ class CHROMEOS_EXPORT SmbProviderClient
// original |mount_id|.
virtual void Remount(const base::FilePath& share_path,
int32_t mount_id,
bool ntlm_enabled,
const std::string& workgroup,
const std::string& username,
base::ScopedFD password_fd,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment