Repository navigation
Commit 3e540aa
committed
fix(daemon): make private directory DACL inheritable
win_security_init built its owner-only ACL with AddAccessAllowedAce, which
has no AceFlags parameter and can only emit an ACE with flags set to zero.
Applied to a directory together with PROTECTED_DACL_SECURITY_INFORMATION
that yields D:PAI(A;;FA;;;<user>): the protection severs the inherited ACEs
while the new ACE propagates nothing, so every child created afterwards is
born with an empty DACL and is unreadable even by its owner.
win_runtime_directory_secure is also a repair path. It continues on
ERROR_ALREADY_EXISTS and re-stamps the existing directory, so a tree
restored by hand with icacls is destroyed again on the next daemon or
client start.
Add a second ACL for containers, built with AddAccessAllowedAceEx and
CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, and use it at the three
directory sites. Files and kernel objects are leaves and keep the flagless
ACL.
The container ACE carries FILE_ALL_ACCESS rather than GENERIC_ALL. Windows
splits an inheritable generic-rights ACE into an effective mapped ACE plus
an INHERIT_ONLY one holding the generic bits, and the owner-only DACL
validators require exactly one ACE, so the generic form fails every lock
directory with "secure CLI coordination could not be created
(project-locks)".
Fixes DeusData#1351
Signed-off-by: PETRO YAKOVYSHYN <petroyakovyshyn@gmail.com>1 parent 564d32c commit 3e540aa
2 files changed
Lines changed: 146 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3312 | 3312 | | |
3313 | 3313 | | |
3314 | 3314 | | |
| 3315 | + | |
3315 | 3316 | | |
3316 | 3317 | | |
3317 | 3318 | | |
| |||
3339 | 3340 | | |
3340 | 3341 | | |
3341 | 3342 | | |
| 3343 | + | |
3342 | 3344 | | |
3343 | 3345 | | |
3344 | 3346 | | |
| |||
3352 | 3354 | | |
3353 | 3355 | | |
3354 | 3356 | | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
3355 | 3360 | | |
3356 | 3361 | | |
3357 | 3362 | | |
| |||
3560 | 3565 | | |
3561 | 3566 | | |
3562 | 3567 | | |
| 3568 | + | |
| 3569 | + | |
3563 | 3570 | | |
3564 | 3571 | | |
3565 | 3572 | | |
| |||
3614 | 3621 | | |
3615 | 3622 | | |
3616 | 3623 | | |
| 3624 | + | |
| 3625 | + | |
3617 | 3626 | | |
3618 | 3627 | | |
3619 | 3628 | | |
| |||
3679 | 3688 | | |
3680 | 3689 | | |
3681 | 3690 | | |
| 3691 | + | |
| 3692 | + | |
| 3693 | + | |
| 3694 | + | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
| 3716 | + | |
| 3717 | + | |
| 3718 | + | |
| 3719 | + | |
| 3720 | + | |
| 3721 | + | |
3682 | 3722 | | |
3683 | 3723 | | |
3684 | 3724 | | |
| |||
4047 | 4087 | | |
4048 | 4088 | | |
4049 | 4089 | | |
4050 | | - | |
| 4090 | + | |
4051 | 4091 | | |
4052 | 4092 | | |
4053 | 4093 | | |
| |||
4094 | 4134 | | |
4095 | 4135 | | |
4096 | 4136 | | |
4097 | | - | |
| 4137 | + | |
4098 | 4138 | | |
4099 | 4139 | | |
4100 | 4140 | | |
| |||
4181 | 4221 | | |
4182 | 4222 | | |
4183 | 4223 | | |
4184 | | - | |
| 4224 | + | |
4185 | 4225 | | |
4186 | 4226 | | |
4187 | 4227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
779 | 881 | | |
780 | 882 | | |
781 | 883 | | |
| |||
4620 | 4722 | | |
4621 | 4723 | | |
4622 | 4724 | | |
| 4725 | + | |
4623 | 4726 | | |
4624 | 4727 | | |
4625 | 4728 | | |
| |||
0 commit comments