Debian Codegraph @

upstream/debian-trixie/man8/systemd-nsresourced.service.8

raw
1 '\" t
2 .TH "SYSTEMD\-NSRESOURCED\&.SERVICE" "8" "" "systemd 257.13" "systemd-nsresourced.service"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-nsresourced.service, systemd-nsresourced \- User Namespace Resource Delegation Service
24 .SH "SYNOPSIS"
25 .PP
26 systemd\-nsresourced\&.service
27 .PP
28 /usr/lib/systemd/systemd\-nsresourced
29 .SH "DESCRIPTION"
30 .PP
31 \fBsystemd\-nsresourced\fR
32 is a system service that permits transient delegation of a UID/GID range to a user namespace (see
33 \fBuser_namespaces\fR(7)) allocated by a client, via a Varlink IPC API\&.
34 .PP
35 Unprivileged clients may allocate a user namespace, and then request a UID/GID range to be assigned to it via this service\&. The user namespace may then be used to run containers and other sandboxes, and/or apply it to an id\-mapped mount\&.
36 .PP
37 Allocations of UIDs/GIDs this way are transient: when a user namespace goes away, its UID/GID range is returned to the pool of available ranges\&. In order to ensure that clients cannot gain persistency in their transient UID/GID range a BPF\-LSM based policy is enforced that ensures that user namespaces set up this way can only write to file systems they allocate themselves or that are explicitly allowlisted via
38 \fBsystemd\-nsresourced\fR\&.
39 .PP
40 \fBsystemd\-nsresourced\fR
41 automatically ensures that any registered UID ranges show up in the system\*(Aqs NSS database via the
42 \m[blue]\fBUser/Group Record Lookup API via Varlink\fR\m[]\&\s-2\u[1]\d\s+2\&.
43 .PP
44 Currently, only UID/GID ranges consisting of either exactly 1 or exactly 65536 UIDs/GIDs can be registered with this service\&. Moreover, UIDs and GIDs are always allocated together, and symmetrically\&.
45 .PP
46 The service provides API calls to allowlist mounts (referenced via their mount file descriptors as per Linux
47 \fBfsmount()\fR
48 API), to pass ownership of a cgroup subtree to the user namespace and to delegate a virtual Ethernet device pair to the user namespace\&. When used in combination this is sufficient to implement fully unprivileged container environments, as implemented by
49 \fBsystemd-nspawn\fR(1), fully unprivileged
50 \fIRootImage=\fR
51 (see
52 \fBsystemd.exec\fR(5)) or fully unprivileged disk image tools such as
53 \fBsystemd-dissect\fR(1)\&.
54 .PP
55 This service provides one
56 \m[blue]\fBVarlink\fR\m[]\&\s-2\u[2]\d\s+2
57 service:
58 \fBio\&.systemd\&.NamespaceResource\fR
59 allows registering user namespaces, and assign mounts, cgroups and network interfaces to it\&.
60 .SH "SEE ALSO"
61 .PP
62 \fBsystemd\fR(1), \fBsystemd-mountfsd.service\fR(8), \fBsystemd-nspawn\fR(1), \fBsystemd.exec\fR(5), \fBsystemd-dissect\fR(1), \fBuser_namespaces\fR(7)
63 .SH "NOTES"
64 .IP " 1." 4
65 User/Group Record Lookup API via Varlink
66 .RS 4
67 \%https://systemd.io/USER_GROUP_API
68 .RE
69 .IP " 2." 4
70 Varlink
71 .RS 4
72 \%https://varlink.org/
73 .RE