Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork940
Commit5335416
committed
Test that rmtree doesn't chmod outside the tree
This adds a test in test_util that reveals the bug wheregit.util.rmtree will change the permissions on files outside thetree being removed, if the tree being removed contains a symlink toa file outside the tree, and the symlink is in a (sub)directorywhose own permissions prevent the symlink itself from beingremoved.The new test failure shows how git.util.rmtree currently callsos.chmod in a way that dereferences symlinks, including those thatpoint from inside the tree being deleted to outside it.Another similar demonstration is temporarily included in theperm.sh script. That script served as scratchwork for writing theunit test, and it can be removed soon (while keeping the test).1 parentd5d897c commit5335416
2 files changed
+46
-0
lines changedLines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + |
Lines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
108 | 137 |
| |
109 | 138 |
| |
110 | 139 |
| |
|
0 commit comments
Comments
(0)