Align network verifiers with runtime namespace sources

This commit is contained in:
ms2k 2026-07-17 17:24:45 +09:00
commit 1867f65d4e

View file

@ -214,8 +214,12 @@ where
}
#[allow(deprecated)]
pub(crate) fn enter_generation_filesystem_namespaces()
-> io::Result<(NamespaceIdentity, NamespaceIdentity)> {
/// Enters the generation user and mount namespaces before network preparation.
///
/// # Errors
/// Returns an error when namespace creation, ID mapping, or mount isolation fails.
pub fn enter_generation_filesystem_namespaces() -> io::Result<(NamespaceIdentity, NamespaceIdentity)>
{
let uid = getuid().as_raw();
let gid = getgid().as_raw();
rustix::thread::unshare(UnshareFlags::NEWUSER)?;