* Fix VHD ownership during distribution moves (#41333)
Run distribution moves under a duplicated caller token whose default owner is the caller's user SID. This keeps cross-volume copies accessible without reopening the destination to rewrite its owner.
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix build error
* Preserve token owner during move rollback
Save the duplicated caller token's original default owner before normalizing it for a distribution move. Restore that owner before a rollback so cross-volume rollback copies retain the caller token's prior ownership behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Restore VHD owner during move rollback
Capture the source VHD owner before moving it and use that SID as the duplicated token's default owner for a cross-volume rollback. This leaves ownership unchanged when the operation fails.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Request token owner adjustment access for distro moves
MoveDistribution updates the duplicated caller token's default owner before moving a VHD. Request TOKEN_ADJUST_DEFAULT for this operation so SetTokenInformation succeeds on release/2.7.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 36bcfb50-8208-46ef-a5a3-21fb9b57b467
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 36bcfb50-8208-46ef-a5a3-21fb9b57b467