Lennart Poettering
18ead2b03d
namespace-util: add generic namespace_is_init() call
2024-11-23 00:14:20 +01:00
Andres Beltran
edae62120f
namespace-util: add util function to check if id-mapped mounts are supported for a given path
2024-11-01 18:41:27 +00:00
Lennart Poettering
de34ec188c
pidref: hookup PID_AUTOMATIC special pid_t value with PidRef
...
The PID_AUTOMATIC value is now properly recognized by the PidRef logic
too. This needed some massaging of header includes, to ensure pidref.h
can access process-util.h's definitions and vice versa.
2024-10-14 12:44:36 +02:00
Mike Yuan
86a3c1fd95
namespace-util: introduce pidref_namespace_open()
2024-07-23 19:30:54 +02:00
Lennart Poettering
e4f62e7a12
namespace-util: add new helper is_our_namespace()
2024-04-06 16:08:23 +02:00
Lennart Poettering
574a07c79d
namespace-util: add namespace_open_by_type() helper
2024-04-06 16:08:23 +02:00
Lennart Poettering
2ad2f0c89e
namespace-util: add detach_mount_namespace_userns()
2024-04-06 16:08:23 +02:00
Lennart Poettering
e02fb2099c
namespace-util: add helper for allocating an empty userns fd
2024-04-06 16:08:23 +02:00
Lennart Poettering
5783b4a954
namespace-util: add detach_mount_namespace_harder()
...
This is just like detach_mount_namespace() but if need be uses unpriv
user namespaces to be able to execute CLONE_NEWNS.
2024-04-06 16:08:23 +02:00
Sam Leonard
acdef55ef7
basic/namespace-util: add parse_userns_uid_range
2024-02-12 09:46:00 +00:00
Yu Watanabe
3f53332d4e
namespace-util: introduce netns_acquire()
...
Similar to userns_acquire(), but for network namespace.
2024-01-19 15:06:08 +09:00
Yu Watanabe
5178d4a77e
namespace-util: rename arguments to prefix 'ret_'
...
Also reorder opening namespace fd to make it match with the order of the
arguments.
2024-01-19 15:06:08 +09:00
Christian Brauner
2fe299a320
namespace-util: add in_same_namespace()
...
Add a helper for the canonical way to determine whether two namespaces
are identical.
2022-10-04 18:51:28 +02:00
Christian Brauner
c3b9c418c0
namespace-util: add namespace_info
2022-10-04 18:46:27 +02:00
Lennart Poettering
979b0ff2c4
namespace-util: introduce userns_acquire() as helper for allocating new unbound userns
...
This returns a namespace fd, and takes a uidmap/gidmap as string. This
is split out out mount-util.c's remount_idmap() logic, so that we can
allocate a userns independently.
2021-10-22 16:34:30 +02:00
Lennart Poettering
58e13de539
nspawn: tighten userns UID shift/range checks
...
Let's add a helper that ensures the UID shift/range parameters actually
fit together.
2021-05-07 22:43:48 +02:00
Xℹ Ruoyao
54c2459d56
Refactor network namespace specific functions in generic helpers
2021-03-04 00:04:36 +08:00
Yu Watanabe
db9ecf0501
license: LGPL-2.1+ -> LGPL-2.1-or-later
2020-11-09 13:23:58 +09:00
Lennart Poettering
e2ec9c4d3a
namespace-util: introduce helper for combining unshare() + MS_SLAVE remount
...
We have multiple places we do these two non-trivial operations together,
let's introduce a unified helper for doing both at once.
2020-07-07 11:20:42 +02:00
Lennart Poettering
0cb8e3d118
util: split out namespace related stuff into a new namespace-util.[ch] pair
...
Just some minor reorganiztion.
2019-03-13 12:16:38 +01:00