Commit 144aeed
authored
Rollup merge of rust-lang#93152 - ivmarkov:master, r=m-ou-se
Fix STD compilation for the ESP-IDF target (regression from CVE-2022-21658)
Commit rust-lang@54e22eb broke the compilation of STD for the ESP-IDF embedded "unix-like" Tier 3 target, because the fix for [CVE-2022-21658](https://blog.rust-lang.org/2022/01/20/Rust-1.58.1.html) uses [libc flags](https://github.com/esp-rs/esp-idf-svc/runs/4892221554?check_suite_focus=true) which are not supported on the ESP-IDF platform.
This PR simply redirects the ESP-IDF compilation to the "classic" implementation, similar to REDOX. This should be safe because:
* Neither of the two filesystems supported by ESP-IDF (spiffs and fatfs) support [symlinks](https://github.com/natevw/fatfs/blob/master/README.md) in the first place
* There is no notion of fs permissions at all, as the ESP-IDF is an embedded platform that does not have the notion of users, groups, etc.
* Similarly, ESP-IDF has just one "process" - the firmware itself - which contains the user code and the "OS" fused together and running with all permissions1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1448 | 1448 | | |
1449 | 1449 | | |
1450 | 1450 | | |
1451 | | - | |
1452 | | - | |
| 1451 | + | |
| 1452 | + | |
1453 | 1453 | | |
1454 | 1454 | | |
1455 | 1455 | | |
| |||
1573 | 1573 | | |
1574 | 1574 | | |
1575 | 1575 | | |
1576 | | - | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
1577 | 1581 | | |
1578 | 1582 | | |
1579 | 1583 | | |
| |||
0 commit comments