-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy Windows file metadata #188
Conversation
4f0def3
to
0733775
Compare
0733775
to
7de5feb
Compare
This change ensures that file ownership and ACLs are properly copied on Windows. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
7de5feb
to
2cd7d24
Compare
// apply security info which includes SIDs not necessarily present on | ||
// the host. | ||
privileges := []string{winio.SeRestorePrivilege, seTakeOwnershipPrivilege} | ||
if err := winio.EnableProcessPrivileges(privileges); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something similar is done during snapshotting:
https://github.com/containerd/containerd/blob/7758cdc09ad5c6c5e5eecdfacfa639d3cf87bdbf/snapshots/windows/windows.go#L474-L480
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This change ensures that file ownership and Discretionary ACLs are properly preserved on Windows.