File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 5
5
//! This module does a considerable amount of work to determine whether `/proc`
6
6
//! is mounted, with actual `procfs`, and without any additional mount points
7
7
//! on top of the paths we open.
8
+ //!
9
+ //! Why all the effort to detect bind mount points? People are doing all kinds
10
+ //! of things with Linux containers these days, with many different privilege
11
+ //! schemes, and we want to avoid making any unnecessary assumptions. Rustix
12
+ //! and its users will sometimes use procfs *implicitly* (when Linux gives them
13
+ //! no better options), in ways that aren't obvious from their public APIs.
14
+ //! These filesystem accesses might not be visible to someone auditing the main
15
+ //! code of an application for places which may be influenced by the filesystem
16
+ //! namespace. So with the checking here, they may fail, but they won't be able
17
+ //! to succeed with bogus results.
8
18
9
19
use crate :: fd:: { AsFd , BorrowedFd } ;
10
20
use crate :: ffi:: ZStr ;
You can’t perform that action at this time.
0 commit comments