sysroot: Add an API to initialize with mountns

This lowers down into the C library some logic we
have in the binary/app logic, in prep for having more Rust-native
CLI code in https://github.com/ostreedev/ostree-rs-ext/pull/412

Basically we want to *ensure* a mount namespace by invoking
`unshare()` if necessary, instead of requiring our callers
to do this dance.

This also helps fix e.g.
Closes: https://github.com/ostreedev/ostree/issues/2769
This commit is contained in:
Colin Walters committed 2022-11-22 08:45:13 -05:00
1 parent 9d652be3b1
commit 599ffefe7f
5 files changed
+65 -17

No files matched your search

+1
View File
@@ -548,6 +548,7 @@ OstreeSysroot
ostree_sysroot_new
ostree_sysroot_new_default
ostree_sysroot_initialize
ostree_sysroot_initialize_with_mount_namespace
ostree_sysroot_get_path
ostree_sysroot_load
ostree_sysroot_load_if_changed