Commit 90e7e96
committed
fix(sandbox): resolve Landlock handle_access ownership move
handle_access() takes self by value, consuming the Ruleset. In the
previous code, the match arms meant that on Err the original ruleset
was moved into the match and unavailable for create(). Fix by letting
handle_access propagate via ? (BestEffort compat level ensures it
succeeds on all kernel versions, silently degrading on ABI < v4).
Replace tcp_handled bool with direct NetworkMode::Platform check
since handle_access now always succeeds in Platform mode.
Signed-off-by: Ladislav Smola <lsmola@redhat.com>1 parent 140e171 commit 90e7e96
1 file changed
Lines changed: 7 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
190 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
205 | 195 | | |
206 | 196 | | |
207 | 197 | | |
| |||
227 | 217 | | |
228 | 218 | | |
229 | 219 | | |
230 | | - | |
| 220 | + | |
231 | 221 | | |
232 | 222 | | |
233 | 223 | | |
| |||
0 commit comments