| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
for (const auto& pairing_value : *pairings) {It is safer to check if the value is actually a dictionary before calling `GetDict()` on it, just in case the JSON data is corrupted or manually edited. You do this correctly in `SaveMultiProcessPairingsAsNetworkUser`!
```cpp
for (const auto& pairing_value : *pairings) {
if (!pairing_value.is_dict()) {
continue;
}
user_pairing_delegate.Save(
protocol::PairingRegistry::Pairing::CreateFromValue(
pairing_value.GetDict()));
}
```
std::cerr << "Failed to launch cleanup process.\n";This error message might be slightly misleading if the process launched successfully but exited with a non-zero exit status. Consider updating it to something like `"Failed to clean up multi-process host state.\n"` or `"Cleanup process failed.\n"`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
It is safer to check if the value is actually a dictionary before calling `GetDict()` on it, just in case the JSON data is corrupted or manually edited. You do this correctly in `SaveMultiProcessPairingsAsNetworkUser`!
```cpp
for (const auto& pairing_value : *pairings) {
if (!pairing_value.is_dict()) {
continue;
}
user_pairing_delegate.Save(
protocol::PairingRegistry::Pairing::CreateFromValue(
pairing_value.GetDict()));
}
```
Done
This error message might be slightly misleading if the process launched successfully but exited with a non-zero exit status. Consider updating it to something like `"Failed to clean up multi-process host state.\n"` or `"Cleanup process failed.\n"`.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
base::FilePath unprivileged_config =Can the deletion be done by the unprivileged process? Maybe move it to the end if that's easier (just before you print "Successfully migrated.." on line 471)?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
base::FilePath unprivileged_config =Can the deletion be done by the unprivileged process? Maybe move it to the end if that's easier (just before you print "Successfully migrated.." on line 471)?
The parent directory of these unprivileged files are only writable by root, so you can't do this.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
15 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: remoting/host/linux/migrate_host_main.cc
Insertions: 47, Deletions: 20.
The diff is too large to show. Please review the diff.
```
remoting: Implement multi-to-single host migration on Linux
This CL implements the migration path from multi-process host to
single-process host on Linux.
During migration:
1. Root check: the migration must be initiated by the user, not root.
2. Get config: get config by running
`sudo migrate_host --get-multi-process-config`, which prints the
host config and pairing entries to stdout. These contents are not
accessible by the current user.
3. Save pairing: write the pairing data to the local config directory
4. Service transition:
a. disable chrome-remote-desktop.service via sudo
b. start the single-process service via DaemonController, which
starts chrome-remote-desktop@<user>.service
5. Config cleanup: remove host config file and pairing data by running
`sudo migrate_host --cleanup-multi-process-config`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |