Repository navigation
Commit 3624e4f
committed
fix(file-safety): refuse a captured-DACL publish over a symbolic link before the commit
The link-backup guard left a hole: when the DACL was captured
(daclDumpPath set) and the publish target is the link path itself, the
step 4 rename would replace the LINK with a regular file, and the DACL
restore would then apply the saved ACEs to the wrong object.
The refusal now sits exactly where the link is detected, before the
rename: a new DaclPublishRefusedError (exported with the
DaclCaptureError/DaclRestoreError family, same shape) states that the
target is unchanged. DaclCaptureError does not describe this (the
capture succeeded) and DaclRestoreError does not (nothing was
committed, so nothing was rolled back).
Regression test in the win32 DACL suite: capture succeeds (icacls
/save), lstat reports a symbolic link, publishOverLink set -> the write
rejects with DaclPublishRefusedError, no commit rename, and neither
/restore nor the restrictive fallback command runs. Negative controls:
removing the refusal reddens exactly the new test; refusing
unconditionally reddens exactly the no-DACL linux symlink test (which
still publishes with no backup). Linux symlink replacement and
regular-file backup behavior are unchanged.
83 spec tests green, eslint clean, prettier clean, tsc adds nothing
beyond the pre-existing local donor-package drift.1 parent 9980ac7 commit 3624e4f
2 files changed
Lines changed: 52 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
743 | 744 | | |
744 | 745 | | |
745 | 746 | | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
746 | 771 | | |
747 | 772 | | |
748 | 773 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
136 | 157 | | |
137 | 158 | | |
138 | 159 | | |
| |||
771 | 792 | | |
772 | 793 | | |
773 | 794 | | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
774 | 801 | | |
775 | 802 | | |
776 | 803 | | |
| |||
0 commit comments