Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions daemonlifecycle/privacy_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func protectOwnerOnly(path string) error {
return err
}
return windows.SetNamedSecurityInfo(path, windows.SE_FILE_OBJECT,
windows.OWNER_SECURITY_INFORMATION|windows.DACL_SECURITY_INFORMATION|windows.PROTECTED_DACL_SECURITY_INFORMATION,
sid, nil, acl, nil)
windows.DACL_SECURITY_INFORMATION|windows.PROTECTED_DACL_SECURITY_INFORMATION,
nil, nil, acl, nil)
}

func protectOwnerOnlyFile(file *os.File) error {
Expand All @@ -56,8 +56,8 @@ func protectOwnerOnlyFile(file *os.File) error {
return err
}
return windows.SetSecurityInfo(windows.Handle(file.Fd()), windows.SE_FILE_OBJECT,
windows.OWNER_SECURITY_INFORMATION|windows.DACL_SECURITY_INFORMATION|windows.PROTECTED_DACL_SECURITY_INFORMATION,
sid, nil, acl, nil)
windows.DACL_SECURITY_INFORMATION|windows.PROTECTED_DACL_SECURITY_INFORMATION,
nil, nil, acl, nil)
}

func ownerOnlyACL(sid *windows.SID, inheritance uint32) (*windows.ACL, error) {
Expand Down
4 changes: 3 additions & 1 deletion spec/features/daemon-lifecycle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ recovery decisions in the consuming CLI.

`ProtectOwnerOnly` MUST make a regular file or directory accessible only to the
current user. On Windows it MUST install a protected DACL with one current-user
allow entry; it MUST NOT treat Unix mode bits as proof of Windows privacy.
allow entry without rewriting an already-correct owner, which can require an
unavailable privilege; it MUST NOT treat Unix mode bits as proof of Windows
privacy.

`ValidateOwnerOnly` MUST reject symlinks, special files, other owners, group or
world Unix permissions, and Windows ACLs that grant another principal access.
Expand Down