Commit 8d8e7f8
stat: fix mount table read when /proc is unavailable (#10300)
Only read mount information when needed (%m directive) and handle
gracefully when /proc/self/mountinfo is not accessible, fixing
stat failures in chroot environments without /proc mounted.
see https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2133797
Co-authored-by: Chris Dryden <christopher.paul.dryden@gmail.com>1 parent 04e258f commit 8d8e7f8
1 file changed
Lines changed: 27 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | | - | |
| 310 | + | |
| 311 | + | |
310 | 312 | | |
311 | 313 | | |
312 | 314 | | |
| |||
964 | 966 | | |
965 | 967 | | |
966 | 968 | | |
967 | | - | |
968 | | - | |
| 969 | + | |
| 970 | + | |
969 | 971 | | |
970 | | - | |
971 | | - | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
| 972 | + | |
976 | 973 | | |
977 | 974 | | |
978 | 975 | | |
979 | 976 | | |
980 | 977 | | |
981 | 978 | | |
| 979 | + | |
| 980 | + | |
982 | 981 | | |
983 | 982 | | |
984 | | - | |
985 | 983 | | |
986 | 984 | | |
987 | 985 | | |
988 | 986 | | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
989 | 1005 | | |
990 | | - | |
| 1006 | + | |
991 | 1007 | | |
992 | 1008 | | |
993 | 1009 | | |
| |||
0 commit comments