€•Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ*/translations/zh_CN/userspace-api/landlock”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/zh_TW/userspace-api/landlock”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/it_IT/userspace-api/landlock”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ja_JP/userspace-api/landlock”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ko_KR/userspace-api/landlock”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/pt_BR/userspace-api/landlock”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/sp_SP/userspace-api/landlock”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒD/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock.rst”h´Kubh¶)�”}”(hŒ9Copyright © 2017-2020 Mickaël Salaün ”h]”hŒ9Copyright © 2017-2020 Mickaël Salaün ”…”�”}”hhÈsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhhh²hh³hÇh´Kubh¶)�”}”(hŒCopyright © 2019-2020 ANSSI”h]”hŒCopyright © 2019-2020 ANSSI”…”�”}”hhÖsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhhh²hh³hÇh´Kubh¶)�”}”(hŒ,Copyright © 2021-2022 Microsoft Corporation”h]”hŒ,Copyright © 2021-2022 Microsoft Corporation”…”�”}”hhäsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhhh²hh³hÇh´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒ%Landlock: unprivileged access control”h]”hŒ%Landlock: unprivileged access control”…”�”}”(hhùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hhôh²hh³hÇh´KubhŒ field_list”“”)�”}”(hhh]”(hŒfield”“”)�”}”(hhh]”(hŒ field_name”“”)�”}”(hŒAuthor”h]”hŒAuthor”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh³hÇh´KubhŒ field_body”“”)�”}”(hŒMickaël Salaün”h]”hŒ paragraph”“”)�”}”(hj%h]”hŒMickaël Salaün”…”�”}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K hj#ubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´K hj h²hubj )�”}”(hhh]”(j)�”}”(hŒDate”h]”hŒDate”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjBh³hÇh´Kubj")�”}”(hŒ October 2026 ”h]”j()�”}”(hŒ October 2026”h]”hŒ October 2026”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K hjSubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hjBubeh}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´K hj h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhhôh²hh³hÇh´K ubj()�”}”(hXThe goal of Landlock is to enable restriction of ambient rights (e.g. global filesystem or network access) for a set of processes. Because Landlock is a stackable LSM, it makes it possible to create safe security sandboxes as new security layers in addition to the existing system-wide access-controls. This kind of sandbox is expected to help mitigate the security impact of bugs or unexpected/malicious behaviors in user space applications. Landlock empowers any process, including unprivileged ones, to securely restrict themselves.”h]”hXThe goal of Landlock is to enable restriction of ambient rights (e.g. global filesystem or network access) for a set of processes. Because Landlock is a stackable LSM, it makes it possible to create safe security sandboxes as new security layers in addition to the existing system-wide access-controls. This kind of sandbox is expected to help mitigate the security impact of bugs or unexpected/malicious behaviors in user space applications. Landlock empowers any process, including unprivileged ones, to securely restrict themselves.”…”�”}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K hhôh²hubj()�”}”(hX¥We can quickly make sure that Landlock is enabled in the running system by looking for "landlock: Up and running" in kernel logs (as root): ``dmesg | grep landlock || journalctl -kb -g landlock`` . Developers can also easily check for Landlock support with a :ref:`related system call `. If Landlock is not currently supported, we need to :ref:`configure the kernel appropriately `.”h]”(hŒ�We can quickly make sure that Landlock is enabled in the running system by looking for “landlock: Up and runningâ€� in kernel logs (as root): ”…”�”}”(hj…h²hh³Nh´NubhŒliteral”“”)�”}”(hŒ7``dmesg | grep landlock || journalctl -kb -g landlock``”h]”hŒ3dmesg | grep landlock || journalctl -kb -g landlock”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj…ubhŒ@ . Developers can also easily check for Landlock support with a ”…”�”}”(hj…h²hh³Nh´Nubh)�”}”(hŒ2:ref:`related system call `”h]”hŒinline”“”)�”}”(hj£h]”hŒrelated system call”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j¥hj¡ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œuserspace-api/landlock”Œ refdomain”j²Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆŒ reftarget”Œlandlock_abi_versions”uh1hh³hÇh´Khj…ubhŒ5. If Landlock is not currently supported, we need to ”…”�”}”(hj…h²hh³Nh´Nubh)�”}”(hŒ::ref:`configure the kernel appropriately `”h]”j¦)�”}”(hjÌh]”hŒ"configure the kernel appropriately”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”(j±Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j¥hjÊubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”jØŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjÄŒkernel_support”uh1hh³hÇh´Khj…ubhŒ.”…”�”}”(hj…h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Khhôh²hubhó)�”}”(hhh]”(hø)�”}”(hŒLandlock rules”h]”hŒLandlock rules”…”�”}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjôh²hh³hÇh´Kubj()�”}”(hŒÓA Landlock rule describes the actions a process is allowed to perform on a specific resource. A set of rules is aggregated in a ruleset, which can then restrict the thread enforcing it, and its future children.”h]”hŒÓA Landlock rule describes the actions a process is allowed to perform on a specific resource. A set of rules is aggregated in a ruleset, which can then restrict the thread enforcing it, and its future children.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K hjôh²hubj()�”}”(hŒ The existing types of rules are:”h]”hŒ The existing types of rules are:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K$hjôh²hubhŒdefinition_list”“”)�”}”(hhh]”(hŒdefinition_list_item”“”)�”}”(hŒzFilesystem rules The rule key is a file hierarchy, and the actions it allows are defined with `filesystem access rights`. ”h]”(hŒterm”“”)�”}”(hŒFilesystem rules”h]”hŒFilesystem rules”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³hÇh´K(hj(ubhŒ definition”“”)�”}”(hhh]”j()�”}”(hŒhThe rule key is a file hierarchy, and the actions it allows are defined with `filesystem access rights`.”h]”(hŒMThe rule key is a file hierarchy, and the actions it allows are defined with ”…”�”}”(hjAh²hh³Nh´NubhŒtitle_reference”“”)�”}”(hŒ`filesystem access rights`”h]”hŒfilesystem access rights”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jIhjAubhŒ.”…”�”}”(hjAh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K'hj>ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj(ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³hÇh´K(hj#ubj')�”}”(hŒ©Network rules (since ABI v4 for TCP and v10 for UDP) For these rules, the object is a TCP or UDP port, and the related actions are defined with `network access rights`. ”h]”(j-)�”}”(hŒ4Network rules (since ABI v4 for TCP and v10 for UDP)”h]”hŒ4Network rules (since ABI v4 for TCP and v10 for UDP)”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³hÇh´K,hjoubj=)�”}”(hhh]”j()�”}”(hŒsFor these rules, the object is a TCP or UDP port, and the related actions are defined with `network access rights`.”h]”(hŒ[For these rules, the object is a TCP or UDP port, and the related actions are defined with ”…”�”}”(hj„h²hh³Nh´NubjJ)�”}”(hŒ`network access rights`”h]”hŒnetwork access rights”…”�”}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jIhj„ubhŒ.”…”�”}”(hj„h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K+hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjoubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³hÇh´K,hj#h²hubj')�”}”(hŒ¸Capability rules (since ABI v12) The rule body lists which Linux capabilities (see :manpage:`capabilities(7)`) the process may exercise; the action is defined with `permission flags`. ”h]”(j-)�”}”(hŒ Capability rules (since ABI v12)”h]”hŒ Capability rules (since ABI v12)”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³hÇh´K1hj°ubj=)�”}”(hhh]”j()�”}”(hŒ–The rule body lists which Linux capabilities (see :manpage:`capabilities(7)`) the process may exercise; the action is defined with `permission flags`.”h]”(hŒ2The rule body lists which Linux capabilities (see ”…”�”}”(hjÅh²hh³Nh´NubhŒmanpage”“”)�”}”(hŒ:manpage:`capabilities(7)`”h]”hŒcapabilities(7)”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆŒpath”Œcapabilities(7)”Œpage”Œ capabilities”Œsection”Œ7”uh1jÍhjÅubhŒ7) the process may exercise; the action is defined with ”…”�”}”(hjÅh²hh³Nh´NubjJ)�”}”(hŒ`permission flags`”h]”hŒpermission flags”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jIhjÅubhŒ.”…”�”}”(hjÅh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K/hjÂubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj°ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³hÇh´K1hj#h²hubj')�”}”(hŒ­Namespace rules (since ABI v12) The rule body lists which namespace types (see :manpage:`namespaces(7)`) the process may use; the action is defined with `permission flags`. ”h]”(j-)�”}”(hŒNamespace rules (since ABI v12)”h]”hŒNamespace rules (since ABI v12)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³hÇh´K6hj ubj=)�”}”(hhh]”j()�”}”(hŒŒThe rule body lists which namespace types (see :manpage:`namespaces(7)`) the process may use; the action is defined with `permission flags`.”h]”(hŒ/The rule body lists which namespace types (see ”…”�”}”(hj h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`namespaces(7)`”h]”hŒ namespaces(7)”…”�”}”(hj(h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ namespaces(7)”jߌ namespaces”jájâuh1jÍhj ubhŒ2) the process may use; the action is defined with ”…”�”}”(hj h²hh³Nh´NubjJ)�”}”(hŒ`permission flags`”h]”hŒpermission flags”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jIhj ubhŒ.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K4hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³hÇh´K6hj#h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hjôh²hh³hÇh´Nubhó)�”}”(hhh]”(hø)�”}”(hŒ(Defining and enforcing a security policy”h]”hŒ(Defining and enforcing a security policy”…”�”}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjfh²hh³hÇh´K9ubj()�”}”(hŒ@We first need to define the ruleset that will contain our rules.”h]”hŒ@We first need to define the ruleset that will contain our rules.”…”�”}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K;hjfh²hubj()�”}”(hŒÇFor this example, the ruleset will contain rules that only allow some filesystem read actions and some specific UDP and TCP actions. Filesystem write actions and other TCP/UDP actions will be denied.”h]”hŒÇFor this example, the ruleset will contain rules that only allow some filesystem read actions and some specific UDP and TCP actions. Filesystem write actions and other TCP/UDP actions will be denied.”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K=hjfh²hubj()�”}”(hXThe ruleset then needs to handle all these kinds of actions. This is required for backward and forward compatibility (i.e. the kernel and user space may not know each other's supported restrictions), hence the need to be explicit about the denied-by-default access rights.”h]”hXThe ruleset then needs to handle all these kinds of actions. This is required for backward and forward compatibility (i.e. the kernel and user space may not know each other’s supported restrictions), hence the need to be explicit about the denied-by-default access rights.”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´KAhjfh²hubhŒ literal_block”“”)�”}”(hXjstruct landlock_ruleset_attr ruleset_attr = { .handled_access_fs = LANDLOCK_ACCESS_FS_EXECUTE | LANDLOCK_ACCESS_FS_WRITE_FILE | LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR | LANDLOCK_ACCESS_FS_REMOVE_DIR | LANDLOCK_ACCESS_FS_REMOVE_FILE | LANDLOCK_ACCESS_FS_MAKE_CHAR | LANDLOCK_ACCESS_FS_MAKE_DIR | LANDLOCK_ACCESS_FS_MAKE_REG | LANDLOCK_ACCESS_FS_MAKE_SOCK | LANDLOCK_ACCESS_FS_MAKE_FIFO | LANDLOCK_ACCESS_FS_MAKE_BLOCK | LANDLOCK_ACCESS_FS_MAKE_SYM | LANDLOCK_ACCESS_FS_REFER | LANDLOCK_ACCESS_FS_TRUNCATE | LANDLOCK_ACCESS_FS_IOCTL_DEV | LANDLOCK_ACCESS_FS_RESOLVE_UNIX, .handled_access_net = LANDLOCK_ACCESS_NET_BIND_TCP | LANDLOCK_ACCESS_NET_CONNECT_TCP | LANDLOCK_ACCESS_NET_BIND_UDP | LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP, .scoped = LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET | LANDLOCK_SCOPE_SIGNAL, .handled_permissions = LANDLOCK_PERMISSION_NAMESPACE_USE | LANDLOCK_PERMISSION_CAPABILITY_USE, };”h]”hXjstruct landlock_ruleset_attr ruleset_attr = { .handled_access_fs = LANDLOCK_ACCESS_FS_EXECUTE | LANDLOCK_ACCESS_FS_WRITE_FILE | LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR | LANDLOCK_ACCESS_FS_REMOVE_DIR | LANDLOCK_ACCESS_FS_REMOVE_FILE | LANDLOCK_ACCESS_FS_MAKE_CHAR | LANDLOCK_ACCESS_FS_MAKE_DIR | LANDLOCK_ACCESS_FS_MAKE_REG | LANDLOCK_ACCESS_FS_MAKE_SOCK | LANDLOCK_ACCESS_FS_MAKE_FIFO | LANDLOCK_ACCESS_FS_MAKE_BLOCK | LANDLOCK_ACCESS_FS_MAKE_SYM | LANDLOCK_ACCESS_FS_REFER | LANDLOCK_ACCESS_FS_TRUNCATE | LANDLOCK_ACCESS_FS_IOCTL_DEV | LANDLOCK_ACCESS_FS_RESOLVE_UNIX, .handled_access_net = LANDLOCK_ACCESS_NET_BIND_TCP | LANDLOCK_ACCESS_NET_CONNECT_TCP | LANDLOCK_ACCESS_NET_BIND_UDP | LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP, .scoped = LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET | LANDLOCK_SCOPE_SIGNAL, .handled_permissions = LANDLOCK_PERMISSION_NAMESPACE_USE | LANDLOCK_PERMISSION_CAPABILITY_USE, };”…”�”}”hj£sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒforce”‰Œlanguage”Œc”Œhighlight_args”}”uh1j¡h³hÇh´KFhjfh²hubj()�”}”(hŒçBecause we may not know which kernel version an application will be executed on, it is safer to follow a best-effort security approach. Indeed, we should try to protect users as much as possible whatever the kernel they are using.”h]”hŒçBecause we may not know which kernel version an application will be executed on, it is safer to follow a best-effort security approach. Indeed, we should try to protect users as much as possible whatever the kernel they are using.”…”�”}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Khhjfh²hubj()�”}”(hŒ�To be compatible with older Linux versions, we detect the available Landlock ABI version, and only use the available subset of access rights:”h]”hŒ�To be compatible with older Linux versions, we detect the available Landlock ABI version, and only use the available subset of access rights:”…”�”}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Kmhjfh²hubj¢)�”}”(hXýint abi; abi = landlock_create_ruleset(NULL, 0, LANDLOCK_CREATE_RULESET_VERSION); if (abi < 0) { /* Degrades gracefully if Landlock is not handled. */ perror("The running kernel does not enable to use Landlock"); return 0; } switch (abi) { case 1: /* Removes LANDLOCK_ACCESS_FS_REFER for ABI < 2 */ ruleset_attr.handled_access_fs &= ~LANDLOCK_ACCESS_FS_REFER; __attribute__((fallthrough)); case 2: /* Removes LANDLOCK_ACCESS_FS_TRUNCATE for ABI < 3 */ ruleset_attr.handled_access_fs &= ~LANDLOCK_ACCESS_FS_TRUNCATE; __attribute__((fallthrough)); case 3: /* Removes network support for ABI < 4 */ ruleset_attr.handled_access_net &= ~(LANDLOCK_ACCESS_NET_BIND_TCP | LANDLOCK_ACCESS_NET_CONNECT_TCP); __attribute__((fallthrough)); case 4: /* Removes LANDLOCK_ACCESS_FS_IOCTL_DEV for ABI < 5 */ ruleset_attr.handled_access_fs &= ~LANDLOCK_ACCESS_FS_IOCTL_DEV; __attribute__((fallthrough)); case 5: /* Removes LANDLOCK_SCOPE_* for ABI < 6 */ ruleset_attr.scoped &= ~(LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET | LANDLOCK_SCOPE_SIGNAL); __attribute__((fallthrough)); case 6 ... 8: /* Removes LANDLOCK_ACCESS_FS_RESOLVE_UNIX for ABI < 9 */ ruleset_attr.handled_access_fs &= ~LANDLOCK_ACCESS_FS_RESOLVE_UNIX; __attribute__((fallthrough)); case 9: /* Removes LANDLOCK_ACCESS_NET_*_UDP for ABI < 10 */ ruleset_attr.handled_access_net &= ~(LANDLOCK_ACCESS_NET_BIND_UDP | LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP); __attribute__((fallthrough)); case 10: case 11: /* Removes LANDLOCK_PERMISSION_* for ABI < 12 */ ruleset_attr.handled_permissions &= ~(LANDLOCK_PERMISSION_NAMESPACE_USE | LANDLOCK_PERMISSION_CAPABILITY_USE); }”h]”hXýint abi; abi = landlock_create_ruleset(NULL, 0, LANDLOCK_CREATE_RULESET_VERSION); if (abi < 0) { /* Degrades gracefully if Landlock is not handled. */ perror("The running kernel does not enable to use Landlock"); return 0; } switch (abi) { case 1: /* Removes LANDLOCK_ACCESS_FS_REFER for ABI < 2 */ ruleset_attr.handled_access_fs &= ~LANDLOCK_ACCESS_FS_REFER; __attribute__((fallthrough)); case 2: /* Removes LANDLOCK_ACCESS_FS_TRUNCATE for ABI < 3 */ ruleset_attr.handled_access_fs &= ~LANDLOCK_ACCESS_FS_TRUNCATE; __attribute__((fallthrough)); case 3: /* Removes network support for ABI < 4 */ ruleset_attr.handled_access_net &= ~(LANDLOCK_ACCESS_NET_BIND_TCP | LANDLOCK_ACCESS_NET_CONNECT_TCP); __attribute__((fallthrough)); case 4: /* Removes LANDLOCK_ACCESS_FS_IOCTL_DEV for ABI < 5 */ ruleset_attr.handled_access_fs &= ~LANDLOCK_ACCESS_FS_IOCTL_DEV; __attribute__((fallthrough)); case 5: /* Removes LANDLOCK_SCOPE_* for ABI < 6 */ ruleset_attr.scoped &= ~(LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET | LANDLOCK_SCOPE_SIGNAL); __attribute__((fallthrough)); case 6 ... 8: /* Removes LANDLOCK_ACCESS_FS_RESOLVE_UNIX for ABI < 9 */ ruleset_attr.handled_access_fs &= ~LANDLOCK_ACCESS_FS_RESOLVE_UNIX; __attribute__((fallthrough)); case 9: /* Removes LANDLOCK_ACCESS_NET_*_UDP for ABI < 10 */ ruleset_attr.handled_access_net &= ~(LANDLOCK_ACCESS_NET_BIND_UDP | LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP); __attribute__((fallthrough)); case 10: case 11: /* Removes LANDLOCK_PERMISSION_* for ABI < 12 */ ruleset_attr.handled_permissions &= ~(LANDLOCK_PERMISSION_NAMESPACE_USE | LANDLOCK_PERMISSION_CAPABILITY_USE); }”…”�”}”hjÒsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´Kphjfh²hubj()�”}”(hŒNThis enables the creation of an inclusive ruleset that will contain our rules.”h]”hŒNThis enables the creation of an inclusive ruleset that will contain our rules.”…”�”}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K¤hjfh²hubj¢)�”}”(hŒ®int ruleset_fd; ruleset_fd = landlock_create_ruleset(&ruleset_attr, sizeof(ruleset_attr), 0); if (ruleset_fd < 0) { perror("Failed to create a ruleset"); return 1; }”h]”hŒ®int ruleset_fd; ruleset_fd = landlock_create_ruleset(&ruleset_attr, sizeof(ruleset_attr), 0); if (ruleset_fd < 0) { perror("Failed to create a ruleset"); return 1; }”…”�”}”hjïsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´K¦hjfh²hubj()�”}”(hX�We can now add a new rule to this ruleset thanks to the returned file descriptor referring to this ruleset. The rule will allow reading and executing the file hierarchy ``/usr``. Without another rule, write actions would then be denied by the ruleset. To add ``/usr`` to the ruleset, we open it with the ``O_PATH`` flag and fill the &struct landlock_path_beneath_attr with this file descriptor.”h]”(hŒªWe can now add a new rule to this ruleset thanks to the returned file descriptor referring to this ruleset. The rule will allow reading and executing the file hierarchy ”…”�”}”(hjþh²hh³Nh´NubjŽ)�”}”(hŒ``/usr``”h]”hŒ/usr”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjþubhŒT. Without another rule, write actions would then be denied by the ruleset. To add ”…”�”}”(hjþh²hh³Nh´NubjŽ)�”}”(hŒ``/usr``”h]”hŒ/usr”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjþubhŒ% to the ruleset, we open it with the ”…”�”}”(hjþh²hh³Nh´NubjŽ)�”}”(hŒ ``O_PATH``”h]”hŒO_PATH”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjþubhŒP flag and fill the &struct landlock_path_beneath_attr with this file descriptor.”…”�”}”(hjþh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K°hjfh²hubj¢)�”}”(hXñint err = 0; struct landlock_path_beneath_attr path_beneath = { .allowed_access = LANDLOCK_ACCESS_FS_EXECUTE | LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR, }; path_beneath.allowed_access &= ruleset_attr.handled_access_fs; if (path_beneath.allowed_access) { path_beneath.parent_fd = open("/usr", O_PATH | O_CLOEXEC); if (path_beneath.parent_fd < 0) { perror("Failed to open file"); close(ruleset_fd); return 1; } err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_PATH_BENEATH, &path_beneath, 0); close(path_beneath.parent_fd); if (err) { perror("Failed to update ruleset"); close(ruleset_fd); return 1; } }”h]”hXñint err = 0; struct landlock_path_beneath_attr path_beneath = { .allowed_access = LANDLOCK_ACCESS_FS_EXECUTE | LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR, }; path_beneath.allowed_access &= ruleset_attr.handled_access_fs; if (path_beneath.allowed_access) { path_beneath.parent_fd = open("/usr", O_PATH | O_CLOEXEC); if (path_beneath.parent_fd < 0) { perror("Failed to open file"); close(ruleset_fd); return 1; } err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_PATH_BENEATH, &path_beneath, 0); close(path_beneath.parent_fd); if (err) { perror("Failed to update ruleset"); close(ruleset_fd); return 1; } }”…”�”}”hjBsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´K·hjfh²hubj()�”}”(hXEAs shown above, masking the rule's ``allowed_access`` against the ruleset's ``handled_access_*`` is the recommended best-effort pattern: rights the running kernel does not support are dropped (the compatibility switch above already cleared them in ``handled_access_*``), and the rule is skipped if no supported right remains.”h]”(hŒ%As shown above, masking the rule’s ”…”�”}”(hjQh²hh³Nh´NubjŽ)�”}”(hŒ``allowed_access``”h]”hŒallowed_access”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjQubhŒ against the ruleset’s ”…”�”}”(hjQh²hh³Nh´NubjŽ)�”}”(hŒ``handled_access_*``”h]”hŒhandled_access_*”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjQubhŒ˜ is the recommended best-effort pattern: rights the running kernel does not support are dropped (the compatibility switch above already cleared them in ”…”�”}”(hjQh²hh³Nh´NubjŽ)�”}”(hŒ``handled_access_*``”h]”hŒhandled_access_*”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjQubhŒ9), and the rule is skipped if no supported right remains.”…”�”}”(hjQh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´KÓhjfh²hubj()�”}”(hŒÞFor network access-control, we will add a set of rules to allow DNS queries, which requires both UDP and TCP. For TCP, we need to allow outbound connections to port 53, which can be handled and granted starting with ABI 4:”h]”hŒÞFor network access-control, we will add a set of rules to allow DNS queries, which requires both UDP and TCP. For TCP, we need to allow outbound connections to port 53, which can be handled and granted starting with ABI 4:”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´KÙhjfh²hubj¢)�”}”(hX9struct landlock_net_port_attr tcp_conn = { .allowed_access = LANDLOCK_ACCESS_NET_CONNECT_TCP, .port = 53, }; tcp_conn.allowed_access &= ruleset_attr.handled_access_net; if (tcp_conn.allowed_access) err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_NET_PORT, &tcp_conn, 0);”h]”hX9struct landlock_net_port_attr tcp_conn = { .allowed_access = LANDLOCK_ACCESS_NET_CONNECT_TCP, .port = 53, }; tcp_conn.allowed_access &= ruleset_attr.handled_access_net; if (tcp_conn.allowed_access) err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_NET_PORT, &tcp_conn, 0);”…”�”}”hj£sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´KÞhjfh²hubj()�”}”(hX±We also need to be able to send UDP datagrams to port 53, which requires granting ``LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP``. Since our DNS client will emit datagrams without explicitly binding to a specific source port, its UDP socket will automatically bind an ephemeral port. To allow this behaviour, we also need to grant ``LANDLOCK_ACCESS_NET_BIND_UDP`` on port 0, as if the program explicitly called :manpage:`bind(2)` on port 0.”h]”(hŒRWe also need to be able to send UDP datagrams to port 53, which requires granting ”…”�”}”(hj²h²hh³Nh´NubjŽ)�”}”(hŒ(``LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP``”h]”hŒ$LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP”…”�”}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj²ubhŒÊ. Since our DNS client will emit datagrams without explicitly binding to a specific source port, its UDP socket will automatically bind an ephemeral port. To allow this behaviour, we also need to grant ”…”�”}”(hj²h²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_NET_BIND_UDP``”h]”hŒLANDLOCK_ACCESS_NET_BIND_UDP”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj²ubhŒ0 on port 0, as if the program explicitly called ”…”�”}”(hj²h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`bind(2)`”h]”hŒbind(2)”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒbind(2)”jߌbind”jáŒ2”uh1jÍhj²ubhŒ on port 0.”…”�”}”(hj²h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Kêhjfh²hubj¢)�”}”(hX{struct landlock_net_port_attr udp_send = { .allowed_access = LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP, .port = 53, }; udp_send.allowed_access &= ruleset_attr.handled_access_net; if (udp_send.allowed_access) err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_NET_PORT, &udp_send, 0); [...] struct landlock_net_port_attr udp_bind = { .allowed_access = LANDLOCK_ACCESS_NET_BIND_UDP, .port = 0, }; udp_bind.allowed_access &= ruleset_attr.handled_access_net; if (udp_bind.allowed_access) err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_NET_PORT, &udp_bind, 0);”h]”hX{struct landlock_net_port_attr udp_send = { .allowed_access = LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP, .port = 53, }; udp_send.allowed_access &= ruleset_attr.handled_access_net; if (udp_send.allowed_access) err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_NET_PORT, &udp_send, 0); [...] struct landlock_net_port_attr udp_bind = { .allowed_access = LANDLOCK_ACCESS_NET_BIND_UDP, .port = 0, }; udp_bind.allowed_access &= ruleset_attr.handled_access_net; if (udp_bind.allowed_access) err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_NET_PORT, &udp_bind, 0);”…”�”}”hjùsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´Kñhjfh²hubj()�”}”(hX"Capability and namespace rules use a different attribute layout: ``permissions`` identifies the permission category (a single ``LANDLOCK_PERMISSION_*`` flag) and a type-specific value field carries the bitmask to allow within it. See `Capability and namespace restrictions`_ for the model.”h]”(hŒACapability and namespace rules use a different attribute layout: ”…”�”}”(hjh²hh³Nh´NubjŽ)�”}”(hŒ``permissions``”h]”hŒ permissions”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjubhŒ. identifies the permission category (a single ”…”�”}”(hjh²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_PERMISSION_*``”h]”hŒLANDLOCK_PERMISSION_*”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjubhŒT flag) and a type-specific value field carries the bitmask to allow within it. See ”…”�”}”(hjh²hh³Nh´NubhŒ reference”“”)�”}”(hŒ(`Capability and namespace restrictions`_”h]”hŒ%Capability and namespace restrictions”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ%Capability and namespace restrictions”Œrefid”Œ%capability-and-namespace-restrictions”uh1j4hjŒresolved”KubhŒ for the model.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mhjfh²hubj()�”}”(hXFor capability access-control, we can add rules that allow specific capabilities (see :manpage:`capabilities(7)` for the list of ``CAP_*`` values). For instance, to allow ``CAP_SYS_CHROOT`` (so the sandboxed process can call :manpage:`chroot(2)` inside a user namespace):”h]”(hŒVFor capability access-control, we can add rules that allow specific capabilities (see ”…”�”}”(hjSh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`capabilities(7)`”h]”hŒcapabilities(7)”…”�”}”(hj[h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒcapabilities(7)”jߌ capabilities”jájâuh1jÍhjSubhŒ for the list of ”…”�”}”(hjSh²hh³Nh´NubjŽ)�”}”(hŒ ``CAP_*``”h]”hŒCAP_*”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjSubhŒ" values). For instance, to allow ”…”�”}”(hjSh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_CHROOT``”h]”hŒCAP_SYS_CHROOT”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjSubhŒ$ (so the sandboxed process can call ”…”�”}”(hjSh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`chroot(2)`”h]”hŒ chroot(2)”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ chroot(2)”jߌchroot”jájîuh1jÍhjSubhŒ inside a user namespace):”…”�”}”(hjSh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mhjfh²hubj¢)�”}”(hX^struct landlock_capability_attr cap_attr = { .permissions = LANDLOCK_PERMISSION_CAPABILITY_USE, .allowed_capabilities = (1ULL << CAP_SYS_CHROOT), }; cap_attr.permissions &= ruleset_attr.handled_permissions; if (cap_attr.permissions) err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_CAPABILITY, &cap_attr, 0);”h]”hX^struct landlock_capability_attr cap_attr = { .permissions = LANDLOCK_PERMISSION_CAPABILITY_USE, .allowed_capabilities = (1ULL << CAP_SYS_CHROOT), }; cap_attr.permissions &= ruleset_attr.handled_permissions; if (cap_attr.permissions) err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_CAPABILITY, &cap_attr, 0);”…”�”}”hj­sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´Mhjfh²hubj()�”}”(hX×For namespace access-control, we can add rules that allow using specific namespace types (see :manpage:`namespaces(7)` for the list of ``CLONE_NEW*`` values): creating them via :manpage:`unshare(2)` / :manpage:`clone(2)` / :manpage:`clone3(2)`, joining them via :manpage:`setns(2)`, or acquiring an fd reference via :manpage:`open_tree(2)` / :manpage:`fsmount(2)`. For instance, to allow creating user namespaces (which grants all capabilities inside the new namespace):”h]”(hŒ^For namespace access-control, we can add rules that allow using specific namespace types (see ”…”�”}”(hj¼h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`namespaces(7)`”h]”hŒ namespaces(7)”…”�”}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ namespaces(7)”jߌ namespaces”jájâuh1jÍhj¼ubhŒ for the list of ”…”�”}”(hj¼h²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEW*``”h]”hŒ CLONE_NEW*”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¼ubhŒ values): creating them via ”…”�”}”(hj¼h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`unshare(2)`”h]”hŒ unshare(2)”…”�”}”(hjêh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ unshare(2)”jߌunshare”jájîuh1jÍhj¼ubhŒ / ”…”�”}”(hj¼h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`clone(2)`”h]”hŒclone(2)”…”�”}”(hjþh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒclone(2)”jߌclone”jájîuh1jÍhj¼ubhŒ / ”…”�”}”(hj¼h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`clone3(2)`”h]”hŒ clone3(2)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ clone3(2)”jߌclone3”jájîuh1jÍhj¼ubhŒ, joining them via ”…”�”}”(hj¼h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`setns(2)`”h]”hŒsetns(2)”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒsetns(2)”jߌsetns”jájîuh1jÍhj¼ubhŒ#, or acquiring an fd reference via ”…”�”}”(hj¼h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`open_tree(2)`”h]”hŒ open_tree(2)”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ open_tree(2)”jߌ open_tree”jájîuh1jÍhj¼ubhŒ / ”…”�”}”hj¼sbjÎ)�”}”(hŒ:manpage:`fsmount(2)`”h]”hŒ fsmount(2)”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ fsmount(2)”jߌfsmount”jájîuh1jÍhj¼ubhŒl. For instance, to allow creating user namespaces (which grants all capabilities inside the new namespace):”…”�”}”(hj¼h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mhjfh²hubj¢)�”}”(hXOstruct landlock_namespace_attr ns_attr = { .permissions = LANDLOCK_PERMISSION_NAMESPACE_USE, .allowed_namespace_types = CLONE_NEWUSER, }; ns_attr.permissions &= ruleset_attr.handled_permissions; if (ns_attr.permissions) err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_NAMESPACE, &ns_attr, 0);”h]”hXOstruct landlock_namespace_attr ns_attr = { .permissions = LANDLOCK_PERMISSION_NAMESPACE_USE, .allowed_namespace_types = CLONE_NEWUSER, }; ns_attr.permissions &= ruleset_attr.handled_permissions; if (ns_attr.permissions) err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_NAMESPACE, &ns_attr, 0);”…”�”}”hjhsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´M'hjfh²hubj()�”}”(hX‰Together, these two rules allow an unprivileged process to create a user namespace and call :manpage:`chroot(2)` inside it, while denying all other capabilities and namespace types. User namespace creation is the one operation that does not require ``CAP_SYS_ADMIN``, so no capability rule is needed for it. See `Capability and namespace restrictions`_ for details on capability requirements.”h]”(hŒ\Together, these two rules allow an unprivileged process to create a user namespace and call ”…”�”}”(hjwh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`chroot(2)`”h]”hŒ chroot(2)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ chroot(2)”jߌchroot”jájîuh1jÍhjwubhŒŠ inside it, while denying all other capabilities and namespace types. User namespace creation is the one operation that does not require ”…”�”}”(hjwh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjwubhŒ., so no capability rule is needed for it. See ”…”�”}”(hjwh²hh³Nh´Nubj5)�”}”(hŒ(`Capability and namespace restrictions`_”h]”hŒ%Capability and namespace restrictions”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ%Capability and namespace restrictions”jFjGuh1j4hjwjHKubhŒ( for details on capability requirements.”…”�”}”(hjwh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M3hjfh²hubj()�”}”(hŒÚWhen passing a non-zero ``flags`` argument to ``landlock_restrict_self()``, a similar backwards compatibility check is needed for the restrict flags (see sys_landlock_restrict_self() documentation for available flags):”h]”(hŒWhen passing a non-zero ”…”�”}”(hj¿h²hh³Nh´NubjŽ)�”}”(hŒ ``flags``”h]”hŒflags”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¿ubhŒ argument to ”…”�”}”(hj¿h²hh³Nh´NubjŽ)�”}”(hŒ``landlock_restrict_self()``”h]”hŒlandlock_restrict_self()”…”�”}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¿ubhŒ�, a similar backwards compatibility check is needed for the restrict flags (see sys_landlock_restrict_self() documentation for available flags):”…”�”}”(hj¿h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M:hjfh²hubj¢)�”}”(hXU__u32 restrict_flags = LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON | LANDLOCK_RESTRICT_SELF_TSYNC | LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS; switch (abi) { case 1 ... 6: /* Removes logging flags for ABI < 7 */ restrict_flags &= ~(LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF | LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON | LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF); __attribute__((fallthrough)); case 7: /* * Removes multithreaded enforcement flag for ABI < 8 * * WARNING: Without this flag, calling landlock_restrict_self(2) is * only equivalent if the calling process is single-threaded. Below * ABI v8 (and as of ABI v8, when not using this flag), a Landlock * policy would only be enforced for the calling thread and its * children (and not for all threads, including parents and siblings). */ restrict_flags &= ~LANDLOCK_RESTRICT_SELF_TSYNC; __attribute__((fallthrough)); case 8 ... 10: /* Removes no new privs flag for ABI < 11 */ restrict_flags &= ~LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS; }”h]”hXU__u32 restrict_flags = LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON | LANDLOCK_RESTRICT_SELF_TSYNC | LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS; switch (abi) { case 1 ... 6: /* Removes logging flags for ABI < 7 */ restrict_flags &= ~(LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF | LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON | LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF); __attribute__((fallthrough)); case 7: /* * Removes multithreaded enforcement flag for ABI < 8 * * WARNING: Without this flag, calling landlock_restrict_self(2) is * only equivalent if the calling process is single-threaded. Below * ABI v8 (and as of ABI v8, when not using this flag), a Landlock * policy would only be enforced for the calling thread and its * children (and not for all threads, including parents and siblings). */ restrict_flags &= ~LANDLOCK_RESTRICT_SELF_TSYNC; __attribute__((fallthrough)); case 8 ... 10: /* Removes no new privs flag for ABI < 11 */ restrict_flags &= ~LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS; }”…”�”}”hjñsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´M>hjfh²hubj()�”}”(hŒÃThe next step is to restrict the current thread from gaining more privileges (e.g. through a SUID binary). For unprivileged processes, setting the no_new_privs attribute is required by Landlock.”h]”hŒÃThe next step is to restrict the current thread from gaining more privileges (e.g. through a SUID binary). For unprivileged processes, setting the no_new_privs attribute is required by Landlock.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M\hjfh²hubj()�”}”(hX Processes with ``CAP_SYS_ADMIN`` in their namespace can enforce a ruleset without setting no_new_privs, but leaving no_new_privs unset is risky even when Landlock does not require this attribute: sandboxed processes could still execute set-user-ID, set-group-ID or file-capability binaries, which would then run with elevated privileges while being restricted by a Landlock domain they may not expect, making them potential confused deputies. no_new_privs should only be left unset if such a privilege transition is expected.”h]”(hŒProcesses with ”…”�”}”(hjh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjubhXí in their namespace can enforce a ruleset without setting no_new_privs, but leaving no_new_privs unset is risky even when Landlock does not require this attribute: sandboxed processes could still execute set-user-ID, set-group-ID or file-capability binaries, which would then run with elevated privileges while being restricted by a Landlock domain they may not expect, making them potential confused deputies. no_new_privs should only be left unset if such a privilege transition is expected.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M`hjfh²hubj()�”}”(hŒ¼We now have a ruleset with the first rule allowing read and execute access to ``/usr`` while denying all other handled accesses for the filesystem, and two more rules allowing DNS queries.”h]”(hŒNWe now have a ruleset with the first rule allowing read and execute access to ”…”�”}”(hj.h²hh³Nh´NubjŽ)�”}”(hŒ``/usr``”h]”hŒ/usr”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj.ubhŒf while denying all other handled accesses for the filesystem, and two more rules allowing DNS queries.”…”�”}”(hj.h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mihjfh²hubj¢)�”}”(hX\/* * If the ABI > 10, we can tie setting no_new_privs with successful ruleset * enforcement and skip the manual prctl(PR_SET_NO_NEW_PRIVS, ...) call. */ if (!(restrict_flags & LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS) && prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) { perror("Failed to restrict privileges"); close(ruleset_fd); return 1; }”h]”hX\/* * If the ABI > 10, we can tie setting no_new_privs with successful ruleset * enforcement and skip the manual prctl(PR_SET_NO_NEW_PRIVS, ...) call. */ if (!(restrict_flags & LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS) && prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) { perror("Failed to restrict privileges"); close(ruleset_fd); return 1; }”…”�”}”hjNsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´Mmhjfh²hubj()�”}”(hŒCThe current thread is now ready to sandbox itself with the ruleset.”h]”hŒCThe current thread is now ready to sandbox itself with the ruleset.”…”�”}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mzhjfh²hubj¢)�”}”(hŒœif (landlock_restrict_self(ruleset_fd, restrict_flags)) { perror("Failed to enforce ruleset"); close(ruleset_fd); return 1; } close(ruleset_fd);”h]”hŒœif (landlock_restrict_self(ruleset_fd, restrict_flags)) { perror("Failed to enforce ruleset"); close(ruleset_fd); return 1; } close(ruleset_fd);”…”�”}”hjksbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´M|hjfh²hubj()�”}”(hXœIf the ``landlock_restrict_self`` system call succeeds, the current thread is now restricted and this policy will be enforced on all its subsequently created children as well. Once a thread is landlocked, there is no way to remove its security policy; only adding more restrictions is allowed. These threads are now in a new Landlock domain, which is a merger of their parent one (if any) with the new ruleset.”h]”(hŒIf the ”…”�”}”(hjzh²hh³Nh´NubjŽ)�”}”(hŒ``landlock_restrict_self``”h]”hŒlandlock_restrict_self”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjzubhX{ system call succeeds, the current thread is now restricted and this policy will be enforced on all its subsequently created children as well. Once a thread is landlocked, there is no way to remove its security policy; only adding more restrictions is allowed. These threads are now in a new Landlock domain, which is a merger of their parent one (if any) with the new ruleset.”…”�”}”(hjzh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M…hjfh²hubj()�”}”(hŒBFull working code can be found in `samples/landlock/sandboxer.c`_.”h]”(hŒ"Full working code can be found in ”…”�”}”(hjšh²hh³Nh´Nubj5)�”}”(hŒ`samples/landlock/sandboxer.c`_”h]”hŒsamples/landlock/sandboxer.c”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œsamples/landlock/sandboxer.c”Œrefuri”Œbhttps://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/samples/landlock/sandboxer.c”uh1j4hjšjHKubhŒ.”…”�”}”(hjšh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MŒhjfh²hubeh}”(h]”Œ(defining-and-enforcing-a-security-policy”ah ]”h"]”Œ(defining and enforcing a security policy”ah$]”h&]”uh1hòhjôh²hh³hÇh´K9ubhó)�”}”(hhh]”(hø)�”}”(hŒGood practices”h]”hŒGood practices”…”�”}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjÆh²hh³hÇh´M�ubj()�”}”(hXüIt is recommended to set access rights to file hierarchy leaves as much as possible. For instance, it is better to be able to have ``~/doc/`` as a read-only hierarchy and ``~/tmp/`` as a read-write hierarchy, compared to ``~/`` as a read-only hierarchy and ``~/tmp/`` as a read-write hierarchy. Following this good practice leads to self-sufficient hierarchies that do not depend on their location (i.e. parent directories). This is particularly relevant when we want to allow linking or renaming. Indeed, having consistent access rights per directory enables changing the location of such directories without relying on the destination directory access rights (except those that are required for this operation, see ``LANDLOCK_ACCESS_FS_REFER`` documentation).”h]”(hŒ„It is recommended to set access rights to file hierarchy leaves as much as possible. For instance, it is better to be able to have ”…”�”}”(hj×h²hh³Nh´NubjŽ)�”}”(hŒ ``~/doc/``”h]”hŒ~/doc/”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj×ubhŒ as a read-only hierarchy and ”…”�”}”(hj×h²hh³Nh´NubjŽ)�”}”(hŒ ``~/tmp/``”h]”hŒ~/tmp/”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj×ubhŒ( as a read-write hierarchy, compared to ”…”�”}”(hj×h²hh³Nh´NubjŽ)�”}”(hŒ``~/``”h]”hŒ~/”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj×ubhŒ as a read-only hierarchy and ”…”�”}”(hj×h²hh³Nh´NubjŽ)�”}”(hŒ ``~/tmp/``”h]”hŒ~/tmp/”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj×ubhXÄ as a read-write hierarchy. Following this good practice leads to self-sufficient hierarchies that do not depend on their location (i.e. parent directories). This is particularly relevant when we want to allow linking or renaming. Indeed, having consistent access rights per directory enables changing the location of such directories without relying on the destination directory access rights (except those that are required for this operation, see ”…”�”}”(hj×h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_REFER``”h]”hŒLANDLOCK_ACCESS_FS_REFER”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj×ubhŒ documentation).”…”�”}”(hj×h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M‘hjÆh²hubj()�”}”(hXHaving self-sufficient hierarchies also helps to tighten the required access rights to the minimal set of data. This also helps avoid sinkhole directories, i.e. directories where data can be linked to but not linked from. However, this depends on data organization, which might not be controlled by developers. In this case, granting read-write access to ``~/tmp/``, instead of write-only access, would potentially allow moving ``~/tmp/`` to a non-readable directory and still keep the ability to list the content of ``~/tmp/``.”h]”(hXeHaving self-sufficient hierarchies also helps to tighten the required access rights to the minimal set of data. This also helps avoid sinkhole directories, i.e. directories where data can be linked to but not linked from. However, this depends on data organization, which might not be controlled by developers. In this case, granting read-write access to ”…”�”}”(hj?h²hh³Nh´NubjŽ)�”}”(hŒ ``~/tmp/``”h]”hŒ~/tmp/”…”�”}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj?ubhŒ?, instead of write-only access, would potentially allow moving ”…”�”}”(hj?h²hh³Nh´NubjŽ)�”}”(hŒ ``~/tmp/``”h]”hŒ~/tmp/”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj?ubhŒO to a non-readable directory and still keep the ability to list the content of ”…”�”}”(hj?h²hh³Nh´NubjŽ)�”}”(hŒ ``~/tmp/``”h]”hŒ~/tmp/”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj?ubhŒ.”…”�”}”(hj?h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M�hjÆh²hubeh}”(h]”Œgood-practices”ah ]”h"]”Œgood practices”ah$]”h&]”uh1hòhjôh²hh³hÇh´M�ubhó)�”}”(hhh]”(hø)�”}”(hŒ!Layers of file path access rights”h]”hŒ!Layers of file path access rights”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj‹h²hh³hÇh´M¦ubj()�”}”(hX6Each time a thread enforces a ruleset on itself, it updates its Landlock domain with a new layer of policy. This complementary policy is stacked with any other rulesets potentially already restricting this thread. A sandboxed thread can then safely add more constraints to itself with a new enforced ruleset.”h]”hX6Each time a thread enforces a ruleset on itself, it updates its Landlock domain with a new layer of policy. This complementary policy is stacked with any other rulesets potentially already restricting this thread. A sandboxed thread can then safely add more constraints to itself with a new enforced ruleset.”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M¨hj‹h²hubj()�”}”(hX9One policy layer grants access to a file path if at least one of its rules encountered on the path grants the access. A sandboxed thread can only access a file path if all its enforced policy layers grant the access as well as all the other system access controls (e.g. filesystem DAC, other LSM policies, etc.).”h]”hX9One policy layer grants access to a file path if at least one of its rules encountered on the path grants the access. A sandboxed thread can only access a file path if all its enforced policy layers grant the access as well as all the other system access controls (e.g. filesystem DAC, other LSM policies, etc.).”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M­hj‹h²hubeh}”(h]”Œ!layers-of-file-path-access-rights”ah ]”h"]”Œ!layers of file path access rights”ah$]”h&]”uh1hòhjôh²hh³hÇh´M¦ubhó)�”}”(hhh]”(hø)�”}”(hŒBind mounts and OverlayFS”h]”hŒBind mounts and OverlayFS”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjÀh²hh³hÇh´M´ubj()�”}”(hŒèLandlock enables restricting access to file hierarchies, which means that these access rights can be propagated with bind mounts (cf. Documentation/filesystems/sharedsubtree.rst) but not with Documentation/filesystems/overlayfs.rst.”h]”hŒèLandlock enables restricting access to file hierarchies, which means that these access rights can be propagated with bind mounts (cf. Documentation/filesystems/sharedsubtree.rst) but not with Documentation/filesystems/overlayfs.rst.”…”�”}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M¶hjÀh²hubj()�”}”(hX²A bind mount mirrors a source file hierarchy to a destination. The destination hierarchy is then composed of the exact same files, on which Landlock rules can be tied, either via the source or the destination path. These rules restrict access when they are encountered on a path, which means that they can restrict access to multiple file hierarchies at the same time, whether these hierarchies are the result of bind mounts or not.”h]”hX²A bind mount mirrors a source file hierarchy to a destination. The destination hierarchy is then composed of the exact same files, on which Landlock rules can be tied, either via the source or the destination path. These rules restrict access when they are encountered on a path, which means that they can restrict access to multiple file hierarchies at the same time, whether these hierarchies are the result of bind mounts or not.”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M»hjÀh²hubj()�”}”(hXøAn OverlayFS mount point consists of upper and lower layers. These layers are combined in a merge directory, and that merged directory becomes available at the mount point. This merge hierarchy may include files from the upper and lower layers, but modifications performed on the merge hierarchy only reflect on the upper layer. From a Landlock policy point of view, all OverlayFS layers and merge hierarchies are standalone and each contains their own set of files and directories, which is different from bind mounts. A policy restricting an OverlayFS layer will not restrict the resulted merged hierarchy, and vice versa. Landlock users should then only think about file hierarchies they want to allow access to, regardless of the underlying filesystem.”h]”hXøAn OverlayFS mount point consists of upper and lower layers. These layers are combined in a merge directory, and that merged directory becomes available at the mount point. This merge hierarchy may include files from the upper and lower layers, but modifications performed on the merge hierarchy only reflect on the upper layer. From a Landlock policy point of view, all OverlayFS layers and merge hierarchies are standalone and each contains their own set of files and directories, which is different from bind mounts. A policy restricting an OverlayFS layer will not restrict the resulted merged hierarchy, and vice versa. Landlock users should then only think about file hierarchies they want to allow access to, regardless of the underlying filesystem.”…”�”}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MÂhjÀh²hubeh}”(h]”Œbind-mounts-and-overlayfs”ah ]”h"]”Œbind mounts and overlayfs”ah$]”h&]”uh1hòhjôh²hh³hÇh´M´ubhó)�”}”(hhh]”(hø)�”}”(hŒ Inheritance”h]”hŒ Inheritance”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj h²hh³hÇh´MÎubj()�”}”(hX×Every new thread resulting from a :manpage:`clone(2)` inherits Landlock domain restrictions from its parent. This is similar to seccomp inheritance (cf. Documentation/userspace-api/seccomp_filter.rst) or any other LSM dealing with task's :manpage:`credentials(7)`. For instance, one process's thread may apply Landlock rules to itself, but they will not be automatically applied to other sibling threads (unlike POSIX thread credential changes, cf. :manpage:`nptl(7)`).”h]”(hŒ"Every new thread resulting from a ”…”�”}”(hj h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`clone(2)`”h]”hŒclone(2)”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒclone(2)”jߌclone”jájîuh1jÍhj ubhŒ¼ inherits Landlock domain restrictions from its parent. This is similar to seccomp inheritance (cf. Documentation/userspace-api/seccomp_filter.rst) or any other LSM dealing with task’s ”…”�”}”(hj h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`credentials(7)`”h]”hŒcredentials(7)”…”�”}”(hj0 h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒcredentials(7)”jߌ credentials”jájâuh1jÍhj ubhŒ½. For instance, one process’s thread may apply Landlock rules to itself, but they will not be automatically applied to other sibling threads (unlike POSIX thread credential changes, cf. ”…”�”}”(hj h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`nptl(7)`”h]”hŒnptl(7)”…”�”}”(hjD h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒnptl(7)”jߌnptl”jájâuh1jÍhj ubhŒ).”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MÐhj h²hubj()�”}”(hX?When a thread sandboxes itself, we have the guarantee that the related security policy will stay enforced on all this thread's descendants. This allows creating standalone and modular security policies per application, which will automatically be composed between themselves according to their runtime parent policies.”h]”hXAWhen a thread sandboxes itself, we have the guarantee that the related security policy will stay enforced on all this thread’s descendants. This allows creating standalone and modular security policies per application, which will automatically be composed between themselves according to their runtime parent policies.”…”�”}”(hj^ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MØhj h²hubeh}”(h]”Œ inheritance”ah ]”h"]”Œ inheritance”ah$]”h&]”uh1hòhjôh²hh³hÇh´MÎubhó)�”}”(hhh]”(hø)�”}”(hŒPtrace restrictions”h]”hŒPtrace restrictions”…”�”}”(hjw h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjt h²hh³hÇh´Mßubj()�”}”(hXA sandboxed process has less privileges than a non-sandboxed process and must then be subject to additional restrictions when manipulating another process. To be allowed to use :manpage:`ptrace(2)` and related syscalls on a target process, a sandboxed process should have a superset of the target process's access rights, which means the tracee must be in a sub-domain of the tracer.”h]”(hŒ±A sandboxed process has less privileges than a non-sandboxed process and must then be subject to additional restrictions when manipulating another process. To be allowed to use ”…”�”}”(hj… h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`ptrace(2)`”h]”hŒ ptrace(2)”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ ptrace(2)”jߌptrace”jájîuh1jÍhj… ubhŒ¼ and related syscalls on a target process, a sandboxed process should have a superset of the target process’s access rights, which means the tracee must be in a sub-domain of the tracer.”…”�”}”(hj… h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Máhjt h²hubeh}”(h]”Œptrace-restrictions”ah ]”h"]”Œptrace restrictions”ah$]”h&]”uh1hòhjôh²hh³hÇh´Mߌ referenced”Kubhó)�”}”(hhh]”(hø)�”}”(hŒ IPC scoping”h]”hŒ IPC scoping”…”�”}”(hj³ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj° h²hh³hÇh´Mèubj()�”}”(hX`Similar to the implicit `Ptrace restrictions`_, we may want to further restrict interactions between sandboxes. Therefore, at ruleset creation time, each Landlock domain can restrict the scope for certain operations, so that these operations can only reach out to processes within the same Landlock domain or in a nested Landlock domain (the "scope").”h]”(hŒSimilar to the implicit ”…”�”}”(hjÁ h²hh³Nh´Nubj5)�”}”(hŒ`Ptrace restrictions`_”h]”hŒPtrace restrictions”…”�”}”(hjÉ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒPtrace restrictions”jFj© uh1j4hjÁ jHKubhX6, we may want to further restrict interactions between sandboxes. Therefore, at ruleset creation time, each Landlock domain can restrict the scope for certain operations, so that these operations can only reach out to processes within the same Landlock domain or in a nested Landlock domain (the “scopeâ€�).”…”�”}”(hjÁ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mêhj° h²hubj()�”}”(hŒ'The operations which can be scoped are:”h]”hŒ'The operations which can be scoped are:”…”�”}”(hjã h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mðhj° h²hubj")�”}”(hhh]”(j')�”}”(hŒˆ``LANDLOCK_SCOPE_SIGNAL`` This limits the sending of signals to target processes which run within the same or a nested Landlock domain. ”h]”(j-)�”}”(hŒ``LANDLOCK_SCOPE_SIGNAL``”h]”jŽ)�”}”(hjú h]”hŒLANDLOCK_SCOPE_SIGNAL”…”�”}”(hjü h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjø ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³hÇh´Môhjô ubj=)�”}”(hhh]”j()�”}”(hŒmThis limits the sending of signals to target processes which run within the same or a nested Landlock domain.”h]”hŒmThis limits the sending of signals to target processes which run within the same or a nested Landlock domain.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Móhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjô ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³hÇh´Môhjñ ubj')�”}”(hXN``LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET`` This limits the set of abstract :manpage:`unix(7)` sockets to which we can :manpage:`connect(2)` to socket addresses which were created by a process in the same or a nested Landlock domain. A :manpage:`sendto(2)` on a non-connected datagram socket is treated as if it were doing an implicit :manpage:`connect(2)` and will be blocked if the remote end does not stem from the same or a nested Landlock domain. A :manpage:`sendto(2)` on a socket which was previously connected will not be restricted. This works for both datagram and stream sockets. ”h]”(j-)�”}”(hŒ'``LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET``”h]”jŽ)�”}”(hj2 h]”hŒ#LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET”…”�”}”(hj4 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj0 ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³hÇh´Mhj, ubj=)�”}”(hhh]”(j()�”}”(hŒ½This limits the set of abstract :manpage:`unix(7)` sockets to which we can :manpage:`connect(2)` to socket addresses which were created by a process in the same or a nested Landlock domain.”h]”(hŒ This limits the set of abstract ”…”�”}”(hjJ h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`unix(7)`”h]”hŒunix(7)”…”�”}”(hjR h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒunix(7)”jߌunix”jájâuh1jÍhjJ ubhŒ sockets to which we can ”…”�”}”(hjJ h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`connect(2)`”h]”hŒ connect(2)”…”�”}”(hjf h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ connect(2)”jߌconnect”jájîuh1jÍhjJ ubhŒ] to socket addresses which were created by a process in the same or a nested Landlock domain.”…”�”}”(hjJ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M÷hjG ubj()�”}”(hŒÙA :manpage:`sendto(2)` on a non-connected datagram socket is treated as if it were doing an implicit :manpage:`connect(2)` and will be blocked if the remote end does not stem from the same or a nested Landlock domain.”h]”(hŒA ”…”�”}”(hj€ h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`sendto(2)`”h]”hŒ sendto(2)”…”�”}”(hjˆ h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ sendto(2)”jߌsendto”jájîuh1jÍhj€ ubhŒO on a non-connected datagram socket is treated as if it were doing an implicit ”…”�”}”(hj€ h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`connect(2)`”h]”hŒ connect(2)”…”�”}”(hjœ h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ connect(2)”jߌconnect”jájîuh1jÍhj€ ubhŒ_ and will be blocked if the remote end does not stem from the same or a nested Landlock domain.”…”�”}”(hj€ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MûhjG ubj()�”}”(hŒ‹A :manpage:`sendto(2)` on a socket which was previously connected will not be restricted. This works for both datagram and stream sockets.”h]”(hŒA ”…”�”}”(hj¶ h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`sendto(2)`”h]”hŒ sendto(2)”…”�”}”(hj¾ h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ sendto(2)”jߌsendto”jájîuh1jÍhj¶ ubhŒu on a socket which was previously connected will not be restricted. This works for both datagram and stream sockets.”…”�”}”(hj¶ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MÿhjG ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j<hj, ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³hÇh´Mhjñ h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hj° h²hh³hÇh´Nubj()�”}”(hŒÊScoping does not support exceptions via :manpage:`landlock_add_rule(2)`. If an operation is scoped within a domain, no rules can be added to allow access to resources or processes outside of the scope.”•h]”(hŒ(Scoping does not support exceptions via ”…”�”}”(hjê h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`landlock_add_rule(2)`”h]”hŒlandlock_add_rule(2)”…”�”}”(hjò h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒlandlock_add_rule(2)”jߌlandlock_add_rule”jájîuh1jÍhjê ubhŒƒ. If an operation is scoped within a domain, no rules can be added to allow access to resources or processes outside of the scope.”…”�”}”(hjê h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mhj° h²hubeh}”(h]”Œ ipc-scoping”ah ]”h"]”Œ ipc scoping”ah$]”h&]”uh1hòhjôh²hh³hÇh´Mèubhó)�”}”(hhh]”(hø)�”}”(hŒ%Capability and namespace restrictions”h]”hŒ%Capability and namespace restrictions”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj h²hh³hÇh´Mubj()�”}”(hX¨``handled_permissions`` declares per-category permissions: each permission selects which members of a kernel-defined category (CAP_* capabilities, CLONE_NEW* namespace types) the process may use. Unlike per-object access rights (``handled_access_*``) or cross-domain scopes (``scoped``), per-category permissions constrain the sandboxed process's own use of these enums; members not allowed by a rule are denied by default.”h]”(jŽ)�”}”(hŒ``handled_permissions``”h]”hŒhandled_permissions”…”�”}”(hj) h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj% ubhŒÏ declares per-category permissions: each permission selects which members of a kernel-defined category (CAP_* capabilities, CLONE_NEW* namespace types) the process may use. Unlike per-object access rights (”…”�”}”(hj% h²hh³Nh´NubjŽ)�”}”(hŒ``handled_access_*``”h]”hŒhandled_access_*”…”�”}”(hj; h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj% ubhŒ) or cross-domain scopes (”…”�”}”(hj% h²hh³Nh´NubjŽ)�”}”(hŒ ``scoped``”h]”hŒscoped”…”�”}”(hjM h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj% ubhŒŒ), per-category permissions constrain the sandboxed process’s own use of these enums; members not allowed by a rule are denied by default.”…”�”}”(hj% h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M hj h²hubj()�”}”(hX``LANDLOCK_PERMISSION_NAMESPACE_USE`` gates *acquisition of access* to namespaces: creation via :manpage:`unshare(2)` / :manpage:`clone(2)` / :manpage:`clone3(2)`, entry via :manpage:`setns(2)`, and fd-reference acquisition via :manpage:`open_tree(2)` / :manpage:`fsmount(2)`. Namespaces the process is already a member of when the domain is enforced are implicitly allowed (the process could not continue running otherwise); rules describe which new namespace types the process may acquire. ``LANDLOCK_PERMISSION_CAPABILITY_USE`` gates every exercise of a capability after the domain is enforced, regardless of how the capability was obtained (inherited credentials, ``CLONE_NEWUSER`` grant, ``setuid``/file-cap-bearing :manpage:`execve(2)`, etc.). Configuring both together restricts what privileges are available *and* the namespaces in which they take effect, which matters because user namespace creation has no capability check and grants all capabilities within the new namespace: gating only one of the two leaves a kernel attack-surface widening path open. When a domain handles both permissions, an operation is allowed only if each independently allows it: :manpage:`unshare(2)` with ``CLONE_NEWNET`` then requires both a rule allowing ``CLONE_NEWNET`` and a rule allowing ``CAP_SYS_ADMIN``.”h]”(jŽ)�”}”(hŒ%``LANDLOCK_PERMISSION_NAMESPACE_USE``”h]”hŒ!LANDLOCK_PERMISSION_NAMESPACE_USE”…”�”}”(hji h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hje ubhŒ gates ”…”�”}”(hje h²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ*acquisition of access*”h]”hŒacquisition of access”…”�”}”(hj} h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{ hje ubhŒ to namespaces: creation via ”…”�”}”(hje h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`unshare(2)`”h]”hŒ unshare(2)”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ unshare(2)”jߌunshare”jájîuh1jÍhje ubhŒ / ”…”�”}”(hje h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`clone(2)`”h]”hŒclone(2)”…”�”}”(hj£ h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒclone(2)”jߌclone”jájîuh1jÍhje ubhŒ / ”…”�”}”(hje h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`clone3(2)`”h]”hŒ clone3(2)”…”�”}”(hj· h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ clone3(2)”jߌclone3”jájîuh1jÍhje ubhŒ , entry via ”…”�”}”(hje h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`setns(2)`”h]”hŒsetns(2)”…”�”}”(hjË h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒsetns(2)”jߌsetns”jájîuh1jÍhje ubhŒ#, and fd-reference acquisition via ”…”�”}”(hje h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`open_tree(2)`”h]”hŒ open_tree(2)”…”�”}”(hjß h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ open_tree(2)”jߌ open_tree”jájîuh1jÍhje ubhŒ / ”…”�”}”hje sbjÎ)�”}”(hŒ:manpage:`fsmount(2)`”h]”hŒ fsmount(2)”…”�”}”(hjó h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ fsmount(2)”jߌfsmount”jájîuh1jÍhje ubhŒÚ. Namespaces the process is already a member of when the domain is enforced are implicitly allowed (the process could not continue running otherwise); rules describe which new namespace types the process may acquire. ”…”�”}”(hje h²hh³Nh´NubjŽ)�”}”(hŒ&``LANDLOCK_PERMISSION_CAPABILITY_USE``”h]”hŒ"LANDLOCK_PERMISSION_CAPABILITY_USE”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hje ubhŒŠ gates every exercise of a capability after the domain is enforced, regardless of how the capability was obtained (inherited credentials, ”…”�”}”(hje h²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEWUSER``”h]”hŒ CLONE_NEWUSER”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hje ubhŒ grant, ”…”�”}”(hje h²hh³Nh´NubjŽ)�”}”(hŒ ``setuid``”h]”hŒsetuid”…”�”}”(hj+ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hje ubhŒ/file-cap-bearing ”…”�”}”(hje h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`execve(2)`”h]”hŒ execve(2)”…”�”}”(hj= h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ execve(2)”jߌexecve”jájîuh1jÍhje ubhŒL, etc.). Configuring both together restricts what privileges are available ”…”�”}”(hje h²hh³Nh´Nubj| )�”}”(hŒ*and*”h]”hŒand”…”�”}”(hjQ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{ hje ubhX\ the namespaces in which they take effect, which matters because user namespace creation has no capability check and grants all capabilities within the new namespace: gating only one of the two leaves a kernel attack-surface widening path open. When a domain handles both permissions, an operation is allowed only if each independently allows it: ”…”�”}”(hje h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`unshare(2)`”h]”hŒ unshare(2)”…”�”}”(hjc h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ unshare(2)”jߌunshare”jájîuh1jÍhje ubhŒ with ”…”�”}”(hje h²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEWNET``”h]”hŒ CLONE_NEWNET”…”�”}”(hjw h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hje ubhŒ$ then requires both a rule allowing ”…”�”}”(hje h²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEWNET``”h]”hŒ CLONE_NEWNET”…”�”}”(hj‰ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hje ubhŒ and a rule allowing ”…”�”}”(hje h²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hj› h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hje ubhŒ.”…”�”}”(hje h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mhj h²hubj()�”}”(hX1``LANDLOCK_PERMISSION_CAPABILITY_USE`` complements :manpage:`prctl(2)` ``PR_SET_NO_NEW_PRIVS`` but does not replace it. ``PR_SET_NO_NEW_PRIVS`` prevents privilege *acquisition* via :manpage:`execve(2)` (setuid, file capability xattrs, privilege-elevating LSM transitions) and is a prerequisite for unprivileged Landlock self-sandboxing. ``LANDLOCK_PERMISSION_CAPABILITY_USE`` restricts *exercise* of capabilities the process already holds, including those gained via ``CLONE_NEWUSER`` which ``PR_SET_NO_NEW_PRIVS`` does not block. Sandboxes typically set both.”h]”(jŽ)�”}”(hŒ&``LANDLOCK_PERMISSION_CAPABILITY_USE``”h]”hŒ"LANDLOCK_PERMISSION_CAPABILITY_USE”…”�”}”(hj· h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj³ ubhŒ complements ”…”�”}”(hj³ h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`prctl(2)`”h]”hŒprctl(2)”…”�”}”(hjÉ h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒprctl(2)”jߌprctl”jájîuh1jÍhj³ ubhŒ ”…”�”}”(hj³ h²hh³Nh´NubjŽ)�”}”(hŒ``PR_SET_NO_NEW_PRIVS``”h]”hŒPR_SET_NO_NEW_PRIVS”…”�”}”(hjÝ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj³ ubhŒ but does not replace it. ”…”�”}”(hj³ h²hh³Nh´NubjŽ)�”}”(hŒ``PR_SET_NO_NEW_PRIVS``”h]”hŒPR_SET_NO_NEW_PRIVS”…”�”}”(hjï h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj³ ubhŒ prevents privilege ”…”�”}”(hj³ h²hh³Nh´Nubj| )�”}”(hŒ *acquisition*”h]”hŒ acquisition”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{ hj³ ubhŒ via ”…”�”}”(hj³ h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`execve(2)`”h]”hŒ execve(2)”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ execve(2)”jߌexecve”jájîuh1jÍhj³ ubhŒˆ (setuid, file capability xattrs, privilege-elevating LSM transitions) and is a prerequisite for unprivileged Landlock self-sandboxing. ”…”�”}”(hj³ h²hh³Nh´NubjŽ)�”}”(hŒ&``LANDLOCK_PERMISSION_CAPABILITY_USE``”h]”hŒ"LANDLOCK_PERMISSION_CAPABILITY_USE”…”�”}”(hj' h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj³ ubhŒ restricts ”…”�”}”(hj³ h²hh³Nh´Nubj| )�”}”(hŒ *exercise*”h]”hŒexercise”…”�”}”(hj9 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{ hj³ ubhŒG of capabilities the process already holds, including those gained via ”…”�”}”(hj³ h²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEWUSER``”h]”hŒ CLONE_NEWUSER”…”�”}”(hjK h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj³ ubhŒ which ”…”�”}”(hj³ h²hh³Nh´NubjŽ)�”}”(hŒ``PR_SET_NO_NEW_PRIVS``”h]”hŒPR_SET_NO_NEW_PRIVS”…”�”}”(hj] h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj³ ubhŒ. does not block. Sandboxes typically set both.”…”�”}”(hj³ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M$hj h²hubj()�”}”(hX�Rules are added with ``LANDLOCK_RULE_CAPABILITY`` and &struct landlock_capability_attr (each rule lists ``CAP_*`` values to allow), and with ``LANDLOCK_RULE_NAMESPACE`` and &struct landlock_namespace_attr (each rule lists ``CLONE_NEW*`` flags to allow). Landlock is purely restrictive: it can only deny what the traditional check would have allowed, never grant additional privileges.”h]”(hŒRules are added with ”…”�”}”(hju h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_RULE_CAPABILITY``”h]”hŒLANDLOCK_RULE_CAPABILITY”…”�”}”(hj} h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hju ubhŒ7 and &struct landlock_capability_attr (each rule lists ”…”�”}”(hju h²hh³Nh´NubjŽ)�”}”(hŒ ``CAP_*``”h]”hŒCAP_*”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hju ubhŒ values to allow), and with ”…”�”}”(hju h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_RULE_NAMESPACE``”h]”hŒLANDLOCK_RULE_NAMESPACE”…”�”}”(hj¡ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hju ubhŒ6 and &struct landlock_namespace_attr (each rule lists ”…”�”}”(hju h²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEW*``”h]”hŒ CLONE_NEW*”…”�”}”(hj³ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hju ubhŒ• flags to allow). Landlock is purely restrictive: it can only deny what the traditional check would have allowed, never grant additional privileges.”…”�”}”(hju h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M.hj h²hubj()�”}”(hXõDenials of specific capabilities or namespace types can be excluded from audit logging per rule, by listing them in the ``quiet_capabilities`` or ``quiet_namespace_types`` field of the rule (independently of the allowed members). Quieting requires the permission to be handled, is member-granular, and only suppresses the audit record of a denial attributed to the rule's own layer; it never changes the denial itself or suppresses its trace event, which reports ``logged=0``. Sandboxes should quiet only specific members known to be requested but expected to be denied (for example for compatibility with older callers), never a blanket set: a blanket set follows the running kernel's known members and would hide surprising or future denials from audit.”h]”(hŒxDenials of specific capabilities or namespace types can be excluded from audit logging per rule, by listing them in the ”…”�”}”(hjË h²hh³Nh´NubjŽ)�”}”(hŒ``quiet_capabilities``”h]”hŒquiet_capabilities”…”�”}”(hjÓ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjË ubhŒ or ”…”�”}”(hjË h²hh³Nh´NubjŽ)�”}”(hŒ``quiet_namespace_types``”h]”hŒquiet_namespace_types”…”�”}”(hjå h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjË ubhX' field of the rule (independently of the allowed members). Quieting requires the permission to be handled, is member-granular, and only suppresses the audit record of a denial attributed to the rule’s own layer; it never changes the denial itself or suppresses its trace event, which reports ”…”�”}”(hjË h²hh³Nh´NubjŽ)�”}”(hŒ ``logged=0``”h]”hŒlogged=0”…”�”}”(hj÷ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjË ubhX. Sandboxes should quiet only specific members known to be requested but expected to be denied (for example for compatibility with older callers), never a blanket set: a blanket set follows the running kernel’s known members and would hide surprising or future denials from audit.”…”�”}”(hjË h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M5hj h²hubj()�”}”(hXURule bodies silently accept values unknown to the current kernel (capabilities above ``CAP_LAST_CAP``, unrecognised ``CLONE_NEW*`` bits): they have no runtime effect, so a rule compiled against future kernel headers loads without error on older kernels. Future kernels gain new members denied by default until a rule explicitly allows them.”h]”(hŒURule bodies silently accept values unknown to the current kernel (capabilities above ”…”�”}”(hjh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_LAST_CAP``”h]”hŒ CAP_LAST_CAP”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjubhŒ, unrecognised ”…”�”}”(hjh²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEW*``”h]”hŒ CLONE_NEW*”…”�”}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjubhŒÓ bits): they have no runtime effect, so a rule compiled against future kernel headers loads without error on older kernels. Future kernels gain new members denied by default until a rule explicitly allows them.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M@hj h²hubj()�”}”(hXThe single ``LANDLOCK_PERMISSION_NAMESPACE_USE`` bit gates every kernel path that grants the calling process access to a namespace of the controlled types, whether by becoming a member of the namespace or by holding a file descriptor that references it. The covered syscall paths are:”h]”(hŒ The single ”…”�”}”(hjAh²hh³Nh´NubjŽ)�”}”(hŒ%``LANDLOCK_PERMISSION_NAMESPACE_USE``”h]”hŒ!LANDLOCK_PERMISSION_NAMESPACE_USE”…”�”}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjAubhŒí bit gates every kernel path that grants the calling process access to a namespace of the controlled types, whether by becoming a member of the namespace or by holding a file descriptor that references it. The covered syscall paths are:”…”�”}”(hjAh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MFhj h²hubhŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒd:manpage:`unshare(2)` with ``CLONE_NEW*``: the caller becomes a member of a newly-created namespace.”h]”j()�”}”(hŒd:manpage:`unshare(2)` with ``CLONE_NEW*``: the caller becomes a member of a newly-created namespace.”h]”(jÎ)�”}”(hŒ:manpage:`unshare(2)`”h]”hŒ unshare(2)”…”�”}”(hjph²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ unshare(2)”jߌunshare”jájîuh1jÍhjlubhŒ with ”…”�”}”(hjlh²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEW*``”h]”hŒ CLONE_NEW*”…”�”}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjlubhŒ;: the caller becomes a member of a newly-created namespace.”…”�”}”(hjlh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MKhjhubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjch²hh³hÇh´Nubjg)�”}”(hŒ{:manpage:`clone(2)` (or :manpage:`clone3(2)`) with ``CLONE_NEW*``: the child becomes a member of a newly-created namespace.”h]”j()�”}”(hŒ{:manpage:`clone(2)` (or :manpage:`clone3(2)`) with ``CLONE_NEW*``: the child becomes a member of a newly-created namespace.”h]”(jÎ)�”}”(hŒ:manpage:`clone(2)`”h]”hŒclone(2)”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒclone(2)”jߌclone”jájîuh1jÍhj¦ubhŒ (or ”…”�”}”(hj¦h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`clone3(2)`”h]”hŒ clone3(2)”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ clone3(2)”jߌclone3”jájîuh1jÍhj¦ubhŒ) with ”…”�”}”(hj¦h²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEW*``”h]”hŒ CLONE_NEW*”…”�”}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¦ubhŒ:: the child becomes a member of a newly-created namespace.”…”�”}”(hj¦h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MMhj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjch²hh³hÇh´Nubjg)�”}”(hŒh:manpage:`setns(2)`: the caller becomes a member of an existing namespace referenced by file descriptor.”h]”j()�”}”(hŒh:manpage:`setns(2)`: the caller becomes a member of an existing namespace referenced by file descriptor.”h]”(jÎ)�”}”(hŒ:manpage:`setns(2)`”h]”hŒsetns(2)”…”�”}”(hjøh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒsetns(2)”jߌsetns”jájîuh1jÍhjôubhŒU: the caller becomes a member of an existing namespace referenced by file descriptor.”…”�”}”(hjôh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MOhjðubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjch²hh³hÇh´Nubjg)�”}”(hŒˆ:manpage:`open_tree(2)` with ``OPEN_TREE_NAMESPACE``: the caller obtains a file descriptor referring to a newly-created mount namespace.”h]”j()�”}”(hŒˆ:manpage:`open_tree(2)` with ``OPEN_TREE_NAMESPACE``: the caller obtains a file descriptor referring to a newly-created mount namespace.”h]”(jÎ)�”}”(hŒ:manpage:`open_tree(2)`”h]”hŒ open_tree(2)”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ open_tree(2)”jߌ open_tree”jájîuh1jÍhjubhŒ with ”…”�”}”(hjh²hh³Nh´NubjŽ)�”}”(hŒ``OPEN_TREE_NAMESPACE``”h]”hŒOPEN_TREE_NAMESPACE”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjubhŒT: the caller obtains a file descriptor referring to a newly-created mount namespace.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MQhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjch²hh³hÇh´Nubjg)�”}”(hŒŽ:manpage:`open_tree(2)` with ``OPEN_TREE_CLONE``: the caller obtains a file descriptor referring to a newly-created anonymous mount namespace.”h]”j()�”}”(hŒŽ:manpage:`open_tree(2)` with ``OPEN_TREE_CLONE``: the caller obtains a file descriptor referring to a newly-created anonymous mount namespace.”h]”(jÎ)�”}”(hŒ:manpage:`open_tree(2)`”h]”hŒ open_tree(2)”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ open_tree(2)”jߌ open_tree”jájîuh1jÍhjVubhŒ with ”…”�”}”(hjVh²hh³Nh´NubjŽ)�”}”(hŒ``OPEN_TREE_CLONE``”h]”hŒOPEN_TREE_CLONE”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjVubhŒ^: the caller obtains a file descriptor referring to a newly-created anonymous mount namespace.”…”�”}”(hjVh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MShjRubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjch²hh³hÇh´Nubjg)�”}”(hŒ„:manpage:`fsmount(2)` with ``FSMOUNT_NAMESPACE``: the caller obtains a file descriptor referring to a newly-created mount namespace.”h]”j()�”}”(hŒ„:manpage:`fsmount(2)` with ``FSMOUNT_NAMESPACE``: the caller obtains a file descriptor referring to a newly-created mount namespace.”h]”(jÎ)�”}”(hŒ:manpage:`fsmount(2)`”h]”hŒ fsmount(2)”…”�”}”(hj”h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ fsmount(2)”jߌfsmount”jájîuh1jÍhj�ubhŒ with ”…”�”}”(hj�h²hh³Nh´NubjŽ)�”}”(hŒ``FSMOUNT_NAMESPACE``”h]”hŒFSMOUNT_NAMESPACE”…”�”}”(hj¨h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj�ubhŒT: the caller obtains a file descriptor referring to a newly-created mount namespace.”…”�”}”(hj�h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MUhjŒubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjch²hh³hÇh´Nubjg)�”}”(hŒ~:manpage:`fsmount(2)` (default): the caller obtains a file descriptor referring to a newly-created anonymous mount namespace. ”h]”j()�”}”(hŒ}:manpage:`fsmount(2)` (default): the caller obtains a file descriptor referring to a newly-created anonymous mount namespace.”h]”(jÎ)�”}”(hŒ:manpage:`fsmount(2)`”h]”hŒ fsmount(2)”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ fsmount(2)”jߌfsmount”jájîuh1jÍhjÊubhŒh (default): the caller obtains a file descriptor referring to a newly-created anonymous mount namespace.”…”�”}”(hjÊh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MWhjÆubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjch²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1jah³hÇh´MKhj h²hubj()�”}”(hXKAnonymous mount namespaces (created by ``open_tree(OPEN_TREE_CLONE)`` and the default :manpage:`fsmount(2)`) are intentionally covered by the bit even though the calling process does not become a member of them. Without this coverage, a sandboxed process could combine ``open_tree(OPEN_TREE_CLONE)`` with :manpage:`move_mount(2)` to graft mounts from a freshly-allocated mount namespace into its current namespace, bypassing a ``CLONE_NEWNS`` restriction (these mount operations require ``CAP_SYS_ADMIN``, which a sandboxed process typically obtains by first creating a user namespace).”h]”(hŒ'Anonymous mount namespaces (created by ”…”�”}”(hjöh²hh³Nh´NubjŽ)�”}”(hŒ``open_tree(OPEN_TREE_CLONE)``”h]”hŒopen_tree(OPEN_TREE_CLONE)”…”�”}”(hjþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjöubhŒ and the default ”…”�”}”(hjöh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`fsmount(2)`”h]”hŒ fsmount(2)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ fsmount(2)”jߌfsmount”jájîuh1jÍhjöubhŒ£) are intentionally covered by the bit even though the calling process does not become a member of them. Without this coverage, a sandboxed process could combine ”…”�”}”(hjöh²hh³Nh´NubjŽ)�”}”(hŒ``open_tree(OPEN_TREE_CLONE)``”h]”hŒopen_tree(OPEN_TREE_CLONE)”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjöubhŒ with ”…”�”}”(hjöh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`move_mount(2)`”h]”hŒ move_mount(2)”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ move_mount(2)”jߌ move_mount”jájîuh1jÍhjöubhŒb to graft mounts from a freshly-allocated mount namespace into its current namespace, bypassing a ”…”�”}”(hjöh²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEWNS``”h]”hŒ CLONE_NEWNS”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjöubhŒ- restriction (these mount operations require ”…”�”}”(hjöh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjöubhŒR, which a sandboxed process typically obtains by first creating a user namespace).”…”�”}”(hjöh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MZhj h²hubj()�”}”(hXÏIn practice, unprivileged processes first create a user namespace (which requires no capability and grants all capabilities within it), then use those capabilities to create other namespace types. All non-user namespace types require ``CAP_SYS_ADMIN`` for both creation and :manpage:`setns(2)` entry; mount namespace entry additionally requires ``CAP_SYS_CHROOT``. For :manpage:`setns(2)`, capabilities are checked relative to the target namespace, so a process in an ancestor user namespace naturally satisfies them; this includes joining user namespaces, which requires ``CAP_SYS_ADMIN``. When ``LANDLOCK_PERMISSION_CAPABILITY_USE`` is also handled, each of these capabilities must be explicitly allowed by a rule.”h]”(hŒëIn practice, unprivileged processes first create a user namespace (which requires no capability and grants all capabilities within it), then use those capabilities to create other namespace types. All non-user namespace types require ”…”�”}”(hjth²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjtubhŒ for both creation and ”…”�”}”(hjth²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`setns(2)`”h]”hŒsetns(2)”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒsetns(2)”jߌsetns”jájîuh1jÍhjtubhŒ4 entry; mount namespace entry additionally requires ”…”�”}”(hjth²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_CHROOT``”h]”hŒCAP_SYS_CHROOT”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjtubhŒ. For ”…”�”}”(hjth²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`setns(2)`”h]”hŒsetns(2)”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒsetns(2)”jߌsetns”jájîuh1jÍhjtubhŒ¸, capabilities are checked relative to the target namespace, so a process in an ancestor user namespace naturally satisfies them; this includes joining user namespaces, which requires ”…”�”}”(hjth²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjtubhŒ. When ”…”�”}”(hjth²hh³Nh´NubjŽ)�”}”(hŒ&``LANDLOCK_PERMISSION_CAPABILITY_USE``”h]”hŒ"LANDLOCK_PERMISSION_CAPABILITY_USE”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjtubhŒR is also handled, each of these capabilities must be explicitly allowed by a rule.”…”�”}”(hjth²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mchj h²hubj()�”}”(hX¿Creating a non-user namespace always requires ``CAP_SYS_ADMIN``, and ``LANDLOCK_PERMISSION_CAPABILITY_USE`` (when handled) gates that check regardless of which user namespace it targets. This is true whether the namespace is created on its own, combined with ``CLONE_NEWUSER`` in a single :manpage:`unshare(2)` call, or in a separate :manpage:`unshare(2)` call after a user namespace: in all cases the kernel checks ``CAP_SYS_ADMIN`` against the owning user namespace, and Landlock denies it unless a rule allows ``CAP_SYS_ADMIN``. Combining ``CLONE_NEWUSER`` with another ``CLONE_NEW*`` flag therefore does not avoid the capability check; only user namespace creation itself needs no capability rule.”h]”(hŒ.Creating a non-user namespace always requires ”…”�”}”(hjòh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjòubhŒ, and ”…”�”}”(hjòh²hh³Nh´NubjŽ)�”}”(hŒ&``LANDLOCK_PERMISSION_CAPABILITY_USE``”h]”hŒ"LANDLOCK_PERMISSION_CAPABILITY_USE”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjòubhŒ™ (when handled) gates that check regardless of which user namespace it targets. This is true whether the namespace is created on its own, combined with ”…”�”}”(hjòh²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEWUSER``”h]”hŒ CLONE_NEWUSER”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjòubhŒ in a single ”…”�”}”(hjòh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`unshare(2)`”h]”hŒ unshare(2)”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ unshare(2)”jߌunshare”jájîuh1jÍhjòubhŒ call, or in a separate ”…”�”}”(hjòh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`unshare(2)`”h]”hŒ unshare(2)”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ unshare(2)”jߌunshare”jájîuh1jÍhjòubhŒ= call after a user namespace: in all cases the kernel checks ”…”�”}”(hjòh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjòubhŒP against the owning user namespace, and Landlock denies it unless a rule allows ”…”�”}”(hjòh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjòubhŒ . Combining ”…”�”}”(hjòh²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEWUSER``”h]”hŒ CLONE_NEWUSER”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjòubhŒ with another ”…”�”}”(hjòh²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEW*``”h]”hŒ CLONE_NEW*”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjòubhŒr flag therefore does not avoid the capability check; only user namespace creation itself needs no capability rule.”…”�”}”(hjòh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mnhj h²hubj()�”}”(hŒ—When creating child user namespaces, it is recommended to also create a dedicated Landlock domain with restrictions relevant to each namespace context.”h]”hŒ—When creating child user namespaces, it is recommended to also create a dedicated Landlock domain with restrictions relevant to each namespace context.”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mzhj h²hubj()�”}”(hX¾Note that ``LANDLOCK_PERMISSION_CAPABILITY_USE`` restricts the *use* of capabilities, not their presence in the process's credential. Capability sets can change after a domain is enforced through user namespace entry or :manpage:`capset(2)`; privileged sandboxes that did not set ``PR_SET_NO_NEW_PRIVS`` may also gain capabilities through :manpage:`execve(2)` of binaries with file capabilities. In all cases, :manpage:`capget(2)` will report the credential's capability sets, but any denied capability will fail with ``EPERM`` when exercised. Do not rely on :manpage:`capget(2)` to determine whether the policy permits a given capability; only the actual operation will return ``EPERM`` upon denial.”h]”(hŒ Note that ”…”�”}”(hj´h²hh³Nh´NubjŽ)�”}”(hŒ&``LANDLOCK_PERMISSION_CAPABILITY_USE``”h]”hŒ"LANDLOCK_PERMISSION_CAPABILITY_USE”…”�”}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj´ubhŒ restricts the ”…”�”}”(hj´h²hh³Nh´Nubj| )�”}”(hŒ*use*”h]”hŒuse”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{ hj´ubhŒ› of capabilities, not their presence in the process’s credential. Capability sets can change after a domain is enforced through user namespace entry or ”…”�”}”(hj´h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`capset(2)`”h]”hŒ capset(2)”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ capset(2)”jߌcapset”jájîuh1jÍhj´ubhŒ(; privileged sandboxes that did not set ”…”�”}”(hj´h²hh³Nh´NubjŽ)�”}”(hŒ``PR_SET_NO_NEW_PRIVS``”h]”hŒPR_SET_NO_NEW_PRIVS”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj´ubhŒ$ may also gain capabilities through ”…”�”}”(hj´h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`execve(2)`”h]”hŒ execve(2)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ execve(2)”jߌexecve”jájîuh1jÍhj´ubhŒ3 of binaries with file capabilities. In all cases, ”…”�”}”(hj´h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`capget(2)`”h]”hŒ capget(2)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ capget(2)”jߌcapget”jájîuh1jÍhj´ubhŒZ will report the credential’s capability sets, but any denied capability will fail with ”…”�”}”(hj´h²hh³Nh´NubjŽ)�”}”(hŒ ``EPERM``”h]”hŒEPERM”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj´ubhŒ! when exercised. Do not rely on ”…”�”}”(hj´h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`capget(2)`”h]”hŒ capget(2)”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ capget(2)”jߌcapget”jájîuh1jÍhj´ubhŒc to determine whether the policy permits a given capability; only the actual operation will return ”…”�”}”(hj´h²hh³Nh´NubjŽ)�”}”(hŒ ``EPERM``”h]”hŒEPERM”…”�”}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj´ubhŒ upon denial.”…”�”}”(hj´h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M}hj h²hubeh}”(h]”jGah ]”h"]”Œ%capability and namespace restrictions”ah$]”h&]”uh1hòhjôh²hh³hÇh´Mj¯ Kubhó)�”}”(hhh]”(hø)�”}”(hŒTruncating files”h]”hŒTruncating files”…”�”}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjsh²hh³hÇh´M‰ubj()�”}”(hXThe operations covered by ``LANDLOCK_ACCESS_FS_WRITE_FILE`` and ``LANDLOCK_ACCESS_FS_TRUNCATE`` both change the contents of a file and sometimes overlap in non-intuitive ways. It is strongly recommended to always specify both of these together (either granting both, or granting none).”h]”(hŒThe operations covered by ”…”�”}”(hj„h²hh³Nh´NubjŽ)�”}”(hŒ!``LANDLOCK_ACCESS_FS_WRITE_FILE``”h]”hŒLANDLOCK_ACCESS_FS_WRITE_FILE”…”�”}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj„ubhŒ and ”…”�”}”(hj„h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_TRUNCATE``”h]”hŒLANDLOCK_ACCESS_FS_TRUNCATE”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj„ubhŒ¿ both change the contents of a file and sometimes overlap in non-intuitive ways. It is strongly recommended to always specify both of these together (either granting both, or granting none).”…”�”}”(hj„h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M‹hjsh²hubj()�”}”(hŒûA particularly surprising example is :manpage:`creat(2)`. The name suggests that this system call requires the rights to create and write files. However, it also requires the truncate right if an existing file under the same name is already present.”h]”(hŒ%A particularly surprising example is ”…”�”}”(hj¶h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`creat(2)`”h]”hŒcreat(2)”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒcreat(2)”jߌcreat”jájîuh1jÍhj¶ubhŒÃ. The name suggests that this system call requires the rights to create and write files. However, it also requires the truncate right if an existing file under the same name is already present.”…”�”}”(hj¶h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M�hjsh²hubj()�”}”(hŒ÷It should also be noted that truncating files does not require the ``LANDLOCK_ACCESS_FS_WRITE_FILE`` right. Apart from the :manpage:`truncate(2)` system call, this can also be done through :manpage:`open(2)` with the flags ``O_RDONLY | O_TRUNC``.”h]”(hŒCIt should also be noted that truncating files does not require the ”…”�”}”(hjØh²hh³Nh´NubjŽ)�”}”(hŒ!``LANDLOCK_ACCESS_FS_WRITE_FILE``”h]”hŒLANDLOCK_ACCESS_FS_WRITE_FILE”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjØubhŒ right. Apart from the ”…”�”}”(hjØh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`truncate(2)`”h]”hŒ truncate(2)”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ truncate(2)”jߌtruncate”jájîuh1jÍhjØubhŒ, system call, this can also be done through ”…”�”}”(hjØh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`open(2)`”h]”hŒopen(2)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒopen(2)”jߌopen”jájîuh1jÍhjØubhŒ with the flags ”…”�”}”(hjØh²hh³Nh´NubjŽ)�”}”(hŒ``O_RDONLY | O_TRUNC``”h]”hŒO_RDONLY | O_TRUNC”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjØubhŒ.”…”�”}”(hjØh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M•hjsh²hubj()�”}”(hŒãAt the same time, on some filesystems, :manpage:`fallocate(2)` offers a way to shorten file contents with ``FALLOC_FL_COLLAPSE_RANGE`` when the file is opened for writing, sidestepping the ``LANDLOCK_ACCESS_FS_TRUNCATE`` right.”h]”(hŒ'At the same time, on some filesystems, ”…”�”}”(hj2h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`fallocate(2)`”h]”hŒ fallocate(2)”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ fallocate(2)”jߌ fallocate”jájîuh1jÍhj2ubhŒ, offers a way to shorten file contents with ”…”�”}”(hj2h²hh³Nh´NubjŽ)�”}”(hŒ``FALLOC_FL_COLLAPSE_RANGE``”h]”hŒFALLOC_FL_COLLAPSE_RANGE”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj2ubhŒ7 when the file is opened for writing, sidestepping the ”…”�”}”(hj2h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_TRUNCATE``”h]”hŒLANDLOCK_ACCESS_FS_TRUNCATE”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj2ubhŒ right.”…”�”}”(hj2h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mšhjsh²hubj()�”}”(hŒBThe truncate right is associated with the opened file (see below).”h]”hŒBThe truncate right is associated with the opened file (see below).”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mžhjsh²hubeh}”(h]”Œtruncating-files”ah ]”h"]”Œtruncating files”ah$]”h&]”uh1hòhjôh²hh³hÇh´M‰ubhó)�”}”(hhh]”(hø)�”}”(hŒ'Rights associated with file descriptors”h]”hŒ'Rights associated with file descriptors”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjŽh²hh³hÇh´M¡ubj()�”}”(hXîWhen opening a file, the availability of the ``LANDLOCK_ACCESS_FS_TRUNCATE`` and ``LANDLOCK_ACCESS_FS_IOCTL_DEV`` rights is associated with the newly created file descriptor and will be used for subsequent truncation and ioctl attempts using :manpage:`ftruncate(2)` and :manpage:`ioctl(2)`. The behavior is similar to opening a file for reading or writing, where permissions are checked during :manpage:`open(2)`, but not during the subsequent :manpage:`read(2)` and :manpage:`write(2)` calls.”h]”(hŒ-When opening a file, the availability of the ”…”�”}”(hjŸh²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_TRUNCATE``”h]”hŒLANDLOCK_ACCESS_FS_TRUNCATE”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjŸubhŒ and ”…”�”}”(hjŸh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_IOCTL_DEV``”h]”hŒLANDLOCK_ACCESS_FS_IOCTL_DEV”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjŸubhŒ� rights is associated with the newly created file descriptor and will be used for subsequent truncation and ioctl attempts using ”…”�”}”(hjŸh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`ftruncate(2)`”h]”hŒ ftruncate(2)”…”�”}”(hjËh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ ftruncate(2)”jߌ ftruncate”jájîuh1jÍhjŸubhŒ and ”…”�”}”(hjŸh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`ioctl(2)`”h]”hŒioctl(2)”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒioctl(2)”jߌioctl”jájîuh1jÍhjŸubhŒj. The behavior is similar to opening a file for reading or writing, where permissions are checked during ”…”�”}”(hjŸh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`open(2)`”h]”hŒopen(2)”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒopen(2)”jߌopen”jájîuh1jÍhjŸubhŒ , but not during the subsequent ”…”�”}”(hjŸh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`read(2)`”h]”hŒread(2)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒread(2)”jߌread”jájîuh1jÍhjŸubhŒ and ”…”�”}”hjŸsbjÎ)�”}”(hŒ:manpage:`write(2)`”h]”hŒwrite(2)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒwrite(2)”jߌwrite”jájîuh1jÍhjŸubhŒ calls.”…”�”}”(hjŸh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M£hjŽh²hubj()�”}”(hXAs a consequence, it is possible that a process has multiple open file descriptors referring to the same file, but Landlock enforces different things when operating with these file descriptors. This can happen when a Landlock ruleset gets enforced and the process keeps file descriptors which were opened both before and after the enforcement. It is also possible to pass such file descriptors between processes, keeping their Landlock properties, even when some of the involved processes do not have an enforced Landlock ruleset.”h]”hXAs a consequence, it is possible that a process has multiple open file descriptors referring to the same file, but Landlock enforces different things when operating with these file descriptors. This can happen when a Landlock ruleset gets enforced and the process keeps file descriptors which were opened both before and after the enforcement. It is also possible to pass such file descriptors between processes, keeping their Landlock properties, even when some of the involved processes do not have an enforced Landlock ruleset.”…”�”}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M«hjŽh²hubeh}”(h]”Œ'rights-associated-with-file-descriptors”ah ]”h"]”Œ'rights associated with file descriptors”ah$]”h&]”uh1hòhjôh²hh³hÇh´M¡ubeh}”(h]”Œlandlock-rules”ah ]”h"]”Œlandlock rules”ah$]”h&]”uh1hòhhôh²hh³hÇh´Kubhó)�”}”(hhh]”(hø)�”}”(hŒ Compatibility”h]”hŒ Compatibility”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjSh²hh³hÇh´M´ubhó)�”}”(hhh]”(hø)�”}”(hŒ"Backward and forward compatibility”h]”hŒ"Backward and forward compatibility”…”�”}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjdh²hh³hÇh´M·ubj()�”}”(hXÁLandlock is designed to be compatible with past and future versions of the kernel. This is achieved thanks to the system call attributes and the associated bitflags, particularly the ruleset's ``handled_access_fs``. Making handled access rights explicit enables the kernel and user space to have a clear contract with each other. This is required to make sure sandboxing will not get stricter with a system update, which could break applications.”h]”(hŒÄLandlock is designed to be compatible with past and future versions of the kernel. This is achieved thanks to the system call attributes and the associated bitflags, particularly the ruleset’s ”…”�”}”(hjuh²hh³Nh´NubjŽ)�”}”(hŒ``handled_access_fs``”h]”hŒhandled_access_fs”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjuubhŒê. Making handled access rights explicit enables the kernel and user space to have a clear contract with each other. This is required to make sure sandboxing will not get stricter with a system update, which could break applications.”…”�”}”(hjuh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M¹hjdh²hubj()�”}”(hX­Developers can subscribe to the `Landlock mailing list `_ to knowingly update and test their applications with the latest available features. In the interest of users, and because they may use different kernel versions, it is strongly encouraged to follow a best-effort security approach by checking the Landlock ABI version at runtime and only enforcing the supported features.”h]”(hŒ Developers can subscribe to the ”…”�”}”(hj•h²hh³Nh´Nubj5)�”}”(hŒK`Landlock mailing list `_”h]”hŒLandlock mailing list”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒLandlock mailing list”j²Œ0https://subspace.kernel.org/lists.linux.dev.html”uh1j4hj•ubhŒtarget”“”)�”}”(hŒ3 ”h]”h}”(h]”Œlandlock-mailing-list”ah ]”h"]”Œlandlock mailing list”ah$]”h&]”Œrefuri”j­uh1j®j¯ Khj•ubhXB to knowingly update and test their applications with the latest available features. In the interest of users, and because they may use different kernel versions, it is strongly encouraged to follow a best-effort security approach by checking the Landlock ABI version at runtime and only enforcing the supported features.”…”�”}”(hj•h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MÀhjdh²hubj¯)�”}”(hŒ.. _landlock_abi_versions:”h]”h}”(h]”h ]”h"]”h$]”h&]”jFŒlandlock-abi-versions”uh1j®h´MÇhjdh²hh³hÇubeh}”(h]”Œ"backward-and-forward-compatibility”ah ]”h"]”Œ"backward and forward compatibility”ah$]”h&]”uh1hòhjSh²hh³hÇh´M·ubhó)�”}”(hhh]”(hø)�”}”(hŒLandlock ABI versions”h]”hŒLandlock ABI versions”…”�”}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjÚh²hh³hÇh´MÊubj()�”}”(hŒXThe Landlock ABI version can be read with the sys_landlock_create_ruleset() system call:”h]”hŒXThe Landlock ABI version can be read with the sys_landlock_create_ruleset() system call:”…”�”}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MÌhjÚh²hubj¢)�”}”(hXšint abi; abi = landlock_create_ruleset(NULL, 0, LANDLOCK_CREATE_RULESET_VERSION); if (abi < 0) { switch (errno) { case ENOSYS: printf("Landlock is not supported by the current kernel.\n"); break; case EOPNOTSUPP: printf("Landlock is currently disabled.\n"); break; } return 0; } if (abi >= 2) { printf("Landlock supports LANDLOCK_ACCESS_FS_REFER.\n"); }”h]”hXšint abi; abi = landlock_create_ruleset(NULL, 0, LANDLOCK_CREATE_RULESET_VERSION); if (abi < 0) { switch (errno) { case ENOSYS: printf("Landlock is not supported by the current kernel.\n"); break; case EOPNOTSUPP: printf("Landlock is currently disabled.\n"); break; } return 0; } if (abi >= 2) { printf("Landlock supports LANDLOCK_ACCESS_FS_REFER.\n"); }”…”�”}”hjùsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´MÏhjÚh²hubj()�”}”(hŒuAll Landlock kernel interfaces are supported by the first ABI version unless explicitly noted in their documentation.”h]”hŒuAll Landlock kernel interfaces are supported by the first ABI version unless explicitly noted in their documentation.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MãhjÚh²hubeh}”(h]”(jÑŒid1”eh ]”h"]”(Œlandlock abi versions”Œlandlock_abi_versions”eh$]”h&]”uh1hòhjSh²hh³hÇh´MÊŒexpect_referenced_by_name”}”jjÇsŒexpect_referenced_by_id”}”jÑjÇsubhó)�”}”(hhh]”(hø)�”}”(hŒLandlock errata”h]”hŒLandlock errata”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj#h²hh³hÇh´Mçubj()�”}”(hŒÎIn addition to ABI versions, Landlock provides an errata mechanism to track fixes for issues that may affect backwards compatibility or require userspace awareness. The errata bitmask can be queried using:”h]”hŒÎIn addition to ABI versions, Landlock provides an errata mechanism to track fixes for issues that may affect backwards compatibility or require userspace awareness. The errata bitmask can be queried using:”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Méhj#h²hubj¢)�”}”(hŒ¦int errata; errata = landlock_create_ruleset(NULL, 0, LANDLOCK_CREATE_RULESET_ERRATA); if (errata < 0) { /* Landlock not available or disabled */ return 0; }”h]”hŒ¦int errata; errata = landlock_create_ruleset(NULL, 0, LANDLOCK_CREATE_RULESET_ERRATA); if (errata < 0) { /* Landlock not available or disabled */ return 0; }”…”�”}”hjBsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´Míhj#h²hubj()�”}”(hŒ±The returned value is a bitmask where each bit represents a specific erratum. If bit N is set (``errata & (1 << (N - 1))``), then erratum N has been fixed in the running kernel.”h]”(hŒ_The returned value is a bitmask where each bit represents a specific erratum. If bit N is set (”…”�”}”(hjQh²hh³Nh´NubjŽ)�”}”(hŒ``errata & (1 << (N - 1))``”h]”hŒerrata & (1 << (N - 1))”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjQubhŒ7), then erratum N has been fixed in the running kernel.”…”�”}”(hjQh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M÷hj#h²hubhŒwarning”“”)�”}”(hXa**Most applications should NOT check errata.** In 99.9% of cases, checking errata is unnecessary, increases code complexity, and can potentially decrease protection if misused. For example, disabling the sandbox when an erratum is not fixed could leave the system less secure than using Landlock's best-effort protection. When in doubt, ignore errata.”h]”j()�”}”(hXa**Most applications should NOT check errata.** In 99.9% of cases, checking errata is unnecessary, increases code complexity, and can potentially decrease protection if misused. For example, disabling the sandbox when an erratum is not fixed could leave the system less secure than using Landlock's best-effort protection. When in doubt, ignore errata.”h]”(hŒstrong”“”)�”}”(hŒ.**Most applications should NOT check errata.**”h]”hŒ*Most applications should NOT check errata.”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjwubhX5 In 99.9% of cases, checking errata is unnecessary, increases code complexity, and can potentially decrease protection if misused. For example, disabling the sandbox when an erratum is not fixed could leave the system less secure than using Landlock’s best-effort protection. When in doubt, ignore errata.”…”�”}”(hjwh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mýhjsubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhj#h²hh³hÇh´Nubhó)�”}”(hhh]”(hø)�”}”(hŒ$Erratum 1: TCP socket identification”h]”hŒ$Erratum 1: TCP socket identification”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj›h³Nh´Nubj()�”}”(hX]This fix addresses an issue where IPv4 and IPv6 stream sockets (e.g., SMC, MPTCP, or SCTP) were incorrectly restricted by TCP access rights during :manpage:`bind(2)` and :manpage:`connect(2)` operations. This change ensures that only TCP sockets are subject to TCP access rights, allowing other protocols to operate without unnecessary restrictions.”h]”(hŒ“This fix addresses an issue where IPv4 and IPv6 stream sockets (e.g., SMC, MPTCP, or SCTP) were incorrectly restricted by TCP access rights during ”…”�”}”(hj¬h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`bind(2)`”h]”hŒbind(2)”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒbind(2)”jߌbind”jájîuh1jÍhj¬ubhŒ and ”…”�”}”(hj¬h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`connect(2)`”h]”hŒ connect(2)”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ connect(2)”jߌconnect”jájîuh1jÍhj¬ubhŒž operations. This change ensures that only TCP sockets are subject to TCP access rights, allowing other protocols to operate without unnecessary restrictions.”…”�”}”(hj¬h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:771: ./security/landlock/errata/abi-4.h”h´Khj›ubj()�”}”(hŒImpact:”h]”hŒImpact:”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:771: ./security/landlock/errata/abi-4.h”h´K hj›ubj()�”}”(hXIn kernels without this fix, using ``LANDLOCK_ACCESS_NET_BIND_TCP`` or ``LANDLOCK_ACCESS_NET_CONNECT_TCP`` would incorrectly restrict non-TCP stream protocols (SMC, MPTCP, SCTP), potentially breaking applications that rely on these protocols while using Landlock network restrictions.”h]”(hŒ#In kernels without this fix, using ”…”�”}”(hjòh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_NET_BIND_TCP``”h]”hŒLANDLOCK_ACCESS_NET_BIND_TCP”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjòubhŒ or ”…”�”}”(hjòh²hh³Nh´NubjŽ)�”}”(hŒ#``LANDLOCK_ACCESS_NET_CONNECT_TCP``”h]”hŒLANDLOCK_ACCESS_NET_CONNECT_TCP”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjòubhŒ² would incorrectly restrict non-TCP stream protocols (SMC, MPTCP, SCTP), potentially breaking applications that rely on these protocols while using Landlock network restrictions.”…”�”}”(hjòh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:771: ./security/landlock/errata/abi-4.h”h´Khj›ubeh}”(h]”Œ#erratum-1-tcp-socket-identification”ah ]”h"]”Œ$erratum 1: tcp socket identification”ah$]”h&]”uh1hòhj#h²hh³Nh´Nubhó)�”}”(hhh]”(hø)�”}”(hŒ!Erratum 2: Scoped signal handling”h]”hŒ!Erratum 2: Scoped signal handling”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj-h³Nh´Nubj()�”}”(hX�This fix addresses an issue where signal scoping was overly restrictive, preventing sandboxed threads from signaling other threads within the same process if they belonged to different domains. Because threads are not security boundaries, user space might assume that all threads within the same process can send signals between themselves (see :manpage:`nptl(7)` and :manpage:`libpsx(3)`). Consistent with :manpage:`ptrace(2)` behavior, direct interaction between threads of the same process should always be allowed. This change ensures that any thread is allowed to send signals to any other thread within the same process, regardless of their domain.”h]”(hXZThis fix addresses an issue where signal scoping was overly restrictive, preventing sandboxed threads from signaling other threads within the same process if they belonged to different domains. Because threads are not security boundaries, user space might assume that all threads within the same process can send signals between themselves (see ”…”�”}”(hj>h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`nptl(7)`”h]”hŒnptl(7)”…”�”}”(hjFh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒnptl(7)”jߌnptl”jájâuh1jÍhj>ubhŒ and ”…”�”}”(hj>h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`libpsx(3)`”h]”hŒ libpsx(3)”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ libpsx(3)”jߌlibpsx”jáŒ3”uh1jÍhj>ubhŒ). Consistent with ”…”�”}”(hj>h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`ptrace(2)`”h]”hŒ ptrace(2)”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ ptrace(2)”jߌptrace”jájîuh1jÍhj>ubhŒã behavior, direct interaction between threads of the same process should always be allowed. This change ensures that any thread is allowed to send signals to any other thread within the same process, regardless of their domain.”…”�”}”(hj>h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:774: ./security/landlock/errata/abi-6.h”h´Khj-ubj()�”}”(hŒImpact:”h]”hŒImpact:”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:774: ./security/landlock/errata/abi-6.h”h´Khj-ubj()�”}”(hXÂThis problem only manifests when the userspace process is itself using :manpage:`libpsx(3)` or an equivalent mechanism to enforce a Landlock policy on multiple already-running threads at once. Programs which enforce a Landlock policy at startup time and only then become multithreaded are not affected. Without this fix, signal scoping could break multi-threaded applications that expect threads within the same process to freely signal each other.”h]”(hŒGThis problem only manifests when the userspace process is itself using ”…”�”}”(hj™h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`libpsx(3)`”h]”hŒ libpsx(3)”…”�”}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ libpsx(3)”jߌlibpsx”jájjuh1jÍhj™ubhXg or an equivalent mechanism to enforce a Landlock policy on multiple already-running threads at once. Programs which enforce a Landlock policy at startup time and only then become multithreaded are not affected. Without this fix, signal scoping could break multi-threaded applications that expect threads within the same process to freely signal each other.”…”�”}”(hj™h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:774: ./security/landlock/errata/abi-6.h”h´Khj-ubeh}”(h]”Œ erratum-2-scoped-signal-handling”ah ]”h"]”Œ!erratum 2: scoped signal handling”ah$]”h&]”uh1hòhj#h²hh³Nh´Nubhó)�”}”(hhh]”(hø)�”}”(hŒ*Erratum 3: Disconnected directory handling”h]”hŒ*Erratum 3: Disconnected directory handling”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjÄh³Nh´Nubj()�”}”(hX}This fix addresses an issue with disconnected directories that occur when a directory is moved outside the scope of a bind mount. The change ensures that evaluated access rights include both those from the disconnected file hierarchy down to its filesystem root and those from the related mount point hierarchy. This prevents access right widening through rename or link actions.”h]”hX}This fix addresses an issue with disconnected directories that occur when a directory is moved outside the scope of a bind mount. The change ensures that evaluated access rights include both those from the disconnected file hierarchy down to its filesystem root and those from the related mount point hierarchy. This prevents access right widening through rename or link actions.”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:777: ./security/landlock/errata/abi-1.h”h´KhjÄubj()�”}”(hŒImpact:”h]”hŒImpact:”…”�”}”(hjäh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:777: ./security/landlock/errata/abi-1.h”h´KhjÄubj()�”}”(hXFWithout this fix, it was possible to widen access rights through rename or link actions involving disconnected directories, potentially bypassing ``LANDLOCK_ACCESS_FS_REFER`` restrictions. This could allow privilege escalation in complex mount scenarios where directories become disconnected from their original mount points.”h]”(hŒ’Without this fix, it was possible to widen access rights through rename or link actions involving disconnected directories, potentially bypassing ”…”�”}”(hjóh²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_REFER``”h]”hŒLANDLOCK_ACCESS_FS_REFER”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjóubhŒ˜ restrictions. This could allow privilege escalation in complex mount scenarios where directories become disconnected from their original mount points.”…”�”}”(hjóh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:777: ./security/landlock/errata/abi-1.h”h´KhjÄubeh}”(h]”Œ)erratum-3-disconnected-directory-handling”ah ]”h"]”Œ*erratum 3: disconnected directory handling”ah$]”h&]”uh1hòhj#h²hh³Nh´Nubhó)�”}”(hhh]”(hø)�”}”(hŒ'Erratum 4: Creation of whiteout objects”h]”hŒ'Erratum 4: Creation of whiteout objects”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjh³Nh´Nubj()�”}”(hXThis fix changes the access rights required for the creation of whiteout objects through :manpage:`mknod(2)`, :manpage:`renameat2(2)`, or :manpage:`link(2)`. Creating whiteout objects is now guarded by ``LANDLOCK_ACCESS_FS_MAKE_REG`` instead of ``LANDLOCK_ACCESS_FS_MAKE_CHAR``.”h]”(hŒYThis fix changes the access rights required for the creation of whiteout objects through ”…”�”}”(hj-h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`mknod(2)`”h]”hŒmknod(2)”…”�”}”(hj5h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒmknod(2)”jߌmknod”jájîuh1jÍhj-ubhŒ, ”…”�”}”(hj-h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`renameat2(2)`”h]”hŒ renameat2(2)”…”�”}”(hjIh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ renameat2(2)”jߌ renameat2”jájîuh1jÍhj-ubhŒ, or ”…”�”}”(hj-h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`link(2)`”h]”hŒlink(2)”…”�”}”(hj]h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒlink(2)”jߌlink”jájîuh1jÍhj-ubhŒ/. Creating whiteout objects is now guarded by ”…”�”}”(hj-h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_MAKE_REG``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_REG”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj-ubhŒ instead of ”…”�”}”(hj-h²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_MAKE_CHAR``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_CHAR”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj-ubhŒ.”…”�”}”(hj-h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:780: ./security/landlock/errata/abi-1.h”h´Khjubj()�”}”(hŒºWhiteout objects are used in OverlayFS to mark the absence of a file in an upper file system. Despite being created with ``S_IFCHR``, whiteout objects do not count as character devices.”h]”(hŒzWhiteout objects are used in OverlayFS to mark the absence of a file in an upper file system. Despite being created with ”…”�”}”(hjœh²hh³Nh´NubjŽ)�”}”(hŒ ``S_IFCHR``”h]”hŒS_IFCHR”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjœubhŒ5, whiteout objects do not count as character devices.”…”�”}”(hjœh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:780: ./security/landlock/errata/abi-1.h”h´K#hjubj()�”}”(hŒImpact:”h]”hŒImpact:”…”�”}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:780: ./security/landlock/errata/abi-1.h”h´K'hjubj()�”}”(hŒ¤Sandboxed programs that create OverlayFS whiteouts (such as fuse-overlayfs) now require ``LANDLOCK_ACCESS_FS_MAKE_REG`` instead of ``LANDLOCK_ACCESS_FS_MAKE_CHAR``.”h]”(hŒXSandboxed programs that create OverlayFS whiteouts (such as fuse-overlayfs) now require ”…”�”}”(hjÌh²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_MAKE_REG``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_REG”…”�”}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÌubhŒ instead of ”…”�”}”(hjÌh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_MAKE_CHAR``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_CHAR”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÌubhŒ.”…”�”}”(hjÌh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œh/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:780: ./security/landlock/errata/abi-1.h”h´K)hjubeh}”(h]”Œ&erratum-4-creation-of-whiteout-objects”ah ]”h"]”Œ'erratum 4: creation of whiteout objects”ah$]”h&]”uh1hòhj#h²hh³Nh´Nubhó)�”}”(hhh]”(hø)�”}”(hŒHow to check for errata”h]”hŒHow to check for errata”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjh²hh³hÇh´Mubj()�”}”(hŒ\If you determine that your application needs to check for specific errata, use this pattern:”h]”hŒ\If you determine that your application needs to check for specific errata, use this pattern:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mhjh²hubj¢)�”}”(hXVint errata = landlock_create_ruleset(NULL, 0, LANDLOCK_CREATE_RULESET_ERRATA); if (errata >= 0) { /* Check for specific erratum (1-indexed) */ if (errata & (1 << (erratum_number - 1))) { /* Erratum N is fixed in this kernel */ } else { /* Erratum N is NOT fixed - consider implications for your use case */ } }”h]”hXVint errata = landlock_create_ruleset(NULL, 0, LANDLOCK_CREATE_RULESET_ERRATA); if (errata >= 0) { /* Check for specific erratum (1-indexed) */ if (errata & (1 << (erratum_number - 1))) { /* Erratum N is fixed in this kernel */ } else { /* Erratum N is NOT fixed - consider implications for your use case */ } }”…”�”}”hj&sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²j³j´}”uh1j¡h³hÇh´Mhjh²hubj()�”}”(hŒÌ**Important:** Only check errata if your application specifically relies on behavior that changed due to the fix. The fixes generally make Landlock less restrictive or more correct, not more restrictive.”h]”(j|)�”}”(hŒ**Important:**”h]”hŒ Important:”…”�”}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj5ubhŒ¾ Only check errata if your application specifically relies on behavior that changed due to the fix. The fixes generally make Landlock less restrictive or more correct, not more restrictive.”…”�”}”(hj5h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M!hjh²hubeh}”(h]”Œhow-to-check-for-errata”ah ]”h"]”Œhow to check for errata”ah$]”h&]”uh1hòhj#h²hh³hÇh´Mubeh}”(h]”Œlandlock-errata”ah ]”h"]”Œlandlock errata”ah$]”h&]”uh1hòhjSh²hh³hÇh´Mçubeh}”(h]”Œ compatibility”ah ]”h"]”Œ compatibility”ah$]”h&]”uh1hòhhôh²hh³hÇh´M´ubhó)�”}”(hhh]”(hø)�”}”(hŒKernel interface”h]”hŒKernel interface”…”�”}”(hjlh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjih²hh³hÇh´M&ubhó)�”}”(hhh]”(hø)�”}”(hŒ Access rights”h]”hŒ Access rights”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjzh²hh³hÇh´M)ubj()�”}”(hŒ°A set of actions on kernel objects may be defined by an attribute (e.g. :c:type:`struct landlock_path_beneath_attr `) including a bitmask of access.”h]”(hŒHA set of actions on kernel objects may be defined by an attribute (e.g. ”…”�”}”(hj‹h²hh³Nh´Nubh)�”}”(hŒH:c:type:`struct landlock_path_beneath_attr `”h]”jŽ)�”}”(hj•h]”hŒ!struct landlock_path_beneath_attr”…”�”}”(hj—h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hj“ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³•eŒreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰jÄŒlandlock_path_beneath_attr”uh1hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mshj‹ubhŒ ) including a bitmask of access.”…”�”}”(hj‹h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j²h´Mshjzh²hubhó)�”}”(hhh]”(hø)�”}”(hŒFilesystem flags”h]”hŒFilesystem flags”…”�”}”(hjÀh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj½h³Nh´Nubj()�”}”(hŒºThese flags enable to restrict a sandboxed process to a set of actions on files and directories. Files or directories opened before the sandboxing are not subject to these restrictions.”h]”hŒºThese flags enable to restrict a sandboxed process to a set of actions on files and directories. Files or directories opened before the sandboxing are not subject to these restrictions.”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Myhj½ubj()�”}”(hŒ0The following access rights apply only to files:”h]”hŒ0The following access rights apply only to files:”…”�”}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M}hj½ubjb)�”}”(hhh]”(jg)�”}”(hŒ/``LANDLOCK_ACCESS_FS_EXECUTE``: Execute a file.”h]”j()�”}”(hjñh]”(jŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_EXECUTE``”h]”hŒLANDLOCK_ACCESS_FS_EXECUTE”…”�”}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjóubhŒ: Execute a file.”…”�”}”(hjóh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mhjïubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjìubjg)�”}”(hX``LANDLOCK_ACCESS_FS_WRITE_FILE``: Open a file with write access. When opening files for writing, you will often additionally need the ``LANDLOCK_ACCESS_FS_TRUNCATE`` right. In many cases, these system calls truncate existing files when overwriting them (e.g., :manpage:`creat(2)`).”h]”j()�”}”(hX``LANDLOCK_ACCESS_FS_WRITE_FILE``: Open a file with write access. When opening files for writing, you will often additionally need the ``LANDLOCK_ACCESS_FS_TRUNCATE`` right. In many cases, these system calls truncate existing files when overwriting them (e.g., :manpage:`creat(2)`).”h]”(jŽ)�”}”(hŒ!``LANDLOCK_ACCESS_FS_WRITE_FILE``”h]”hŒLANDLOCK_ACCESS_FS_WRITE_FILE”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjubhŒg: Open a file with write access. When opening files for writing, you will often additionally need the ”…”�”}”(hjh²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_TRUNCATE``”h]”hŒLANDLOCK_ACCESS_FS_TRUNCATE”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjubhŒ` right. In many cases, these system calls truncate existing files when overwriting them (e.g., ”…”�”}”(hjh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`creat(2)`”h]”hŒcreat(2)”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒcreat(2)”jߌcreat”jájîuh1jÍhjubhŒ).”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M€hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjìubjg)�”}”(hŒ?``LANDLOCK_ACCESS_FS_READ_FILE``: Open a file with read access.”h]”j()�”}”(hjdh]”(jŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_READ_FILE``”h]”hŒLANDLOCK_ACCESS_FS_READ_FILE”…”�”}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjfubhŒ: Open a file with read access.”…”�”}”(hjfh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M„hjbubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjìubjg)�”}”(hŒð``LANDLOCK_ACCESS_FS_TRUNCATE``: Truncate a file with :manpage:`truncate(2)`, :manpage:`ftruncate(2)`, :manpage:`creat(2)`, or :manpage:`open(2)` with ``O_TRUNC``. This access right is available since the third version of the Landlock ABI.”h]”j()�”}”(hŒð``LANDLOCK_ACCESS_FS_TRUNCATE``: Truncate a file with :manpage:`truncate(2)`, :manpage:`ftruncate(2)`, :manpage:`creat(2)`, or :manpage:`open(2)` with ``O_TRUNC``. This access right is available since the third version of the Landlock ABI.”h]”(jŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_TRUNCATE``”h]”hŒLANDLOCK_ACCESS_FS_TRUNCATE”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjŒubhŒ: Truncate a file with ”…”�”}”(hjŒh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`truncate(2)`”h]”hŒ truncate(2)”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ truncate(2)”jߌtruncate”jájîuh1jÍhjŒubhŒ, ”…”�”}”(hjŒh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`ftruncate(2)`”h]”hŒ ftruncate(2)”…”�”}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ ftruncate(2)”jߌ ftruncate”jájîuh1jÍhjŒubhŒ, ”…”�”}”(hjŒh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`creat(2)`”h]”hŒcreat(2)”…”�”}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒcreat(2)”jߌcreat”jájîuh1jÍhjŒubhŒ, or ”…”�”}”(hjŒh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`open(2)`”h]”hŒopen(2)”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒopen(2)”jߌopen”jájîuh1jÍhjŒubhŒ with ”…”�”}”(hjŒh²hh³Nh´NubjŽ)�”}”(hŒ ``O_TRUNC``”h]”hŒO_TRUNC”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjŒubhŒN. This access right is available since the third version of the Landlock ABI.”…”�”}”(hjŒh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M…hjˆubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjìubjg)�”}”(hX}``LANDLOCK_ACCESS_FS_IOCTL_DEV``: Invoke :manpage:`ioctl(2)` commands on an opened character or block device. This access right applies to all `ioctl(2)` commands implemented by device drivers. However, the following common IOCTL commands continue to be invokable independent of the ``LANDLOCK_ACCESS_FS_IOCTL_DEV`` right: * IOCTL commands targeting file descriptors (``FIOCLEX``, ``FIONCLEX``), * IOCTL commands targeting file descriptions (``FIONBIO``, ``FIOASYNC``), * IOCTL commands targeting file systems (``FIFREEZE``, ``FITHAW``, ``FIGETBSZ``, ``FS_IOC_GETFSUUID``, ``FS_IOC_GETFSSYSFSPATH``) * Some IOCTL commands which do not make sense when used with devices, but whose implementations are safe and return the right error codes (``FS_IOC_FIEMAP``, ``FICLONE``, ``FICLONERANGE``, ``FIDEDUPERANGE``) This access right is available since the fifth version of the Landlock ABI.”h]”(j()�”}”(hŒm``LANDLOCK_ACCESS_FS_IOCTL_DEV``: Invoke :manpage:`ioctl(2)` commands on an opened character or block device.”h]”(jŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_IOCTL_DEV``”h]”hŒLANDLOCK_ACCESS_FS_IOCTL_DEV”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjubhŒ : Invoke ”…”�”}”(hjh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`ioctl(2)`”h]”hŒioctl(2)”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒioctl(2)”jߌioctl”jájîuh1jÍhjubhŒ1 commands on an opened character or block device.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M‰hjubj()�”}”(hŒÕThis access right applies to all `ioctl(2)` commands implemented by device drivers. However, the following common IOCTL commands continue to be invokable independent of the ``LANDLOCK_ACCESS_FS_IOCTL_DEV`` right:”h]”(hŒ!This access right applies to all ”…”�”}”(hjFh²hh³Nh´NubjJ)�”}”(hŒ `ioctl(2)`”h]”hŒioctl(2)”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jIhjFubhŒƒ commands implemented by device drivers. However, the following common IOCTL commands continue to be invokable independent of the ”…”�”}”(hjFh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_IOCTL_DEV``”h]”hŒLANDLOCK_ACCESS_FS_IOCTL_DEV”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjFubhŒ right:”…”�”}”(hjFh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MŒhjubjb)�”}”(hhh]”(jg)�”}”(hŒFIOCTL commands targeting file descriptors (``FIOCLEX``, ``FIONCLEX``),”h]”j()�”}”(hj~h]”(hŒ+IOCTL commands targeting file descriptors (”…”�”}”(hj€h²hh³Nh´NubjŽ)�”}”(hŒ ``FIOCLEX``”h]”hŒFIOCLEX”…”�”}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj€ubhŒ, ”…”�”}”(hj€h²hh³Nh´NubjŽ)�”}”(hŒ ``FIONCLEX``”h]”hŒFIONCLEX”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj€ubhŒ),”…”�”}”(hj€h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M�hj|ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjyubjg)�”}”(hŒGIOCTL commands targeting file descriptions (``FIONBIO``, ``FIOASYNC``),”h]”j()�”}”(hjºh]”(hŒ,IOCTL commands targeting file descriptions (”…”�”}”(hj¼h²hh³Nh´NubjŽ)�”}”(hŒ ``FIONBIO``”h]”hŒFIONBIO”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¼ubhŒ, ”…”�”}”(hj¼h²hh³Nh´NubjŽ)�”}”(hŒ ``FIOASYNC``”h]”hŒFIOASYNC”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¼ubhŒ),”…”�”}”(hj¼h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M‘hj¸ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjyubjg)�”}”(hŒIOCTL commands targeting file systems (``FIFREEZE``, ``FITHAW``, ``FIGETBSZ``, ``FS_IOC_GETFSUUID``, ``FS_IOC_GETFSSYSFSPATH``)”h]”j()�”}”(hŒIOCTL commands targeting file systems (``FIFREEZE``, ``FITHAW``, ``FIGETBSZ``, ``FS_IOC_GETFSUUID``, ``FS_IOC_GETFSSYSFSPATH``)”h]”(hŒ'IOCTL commands targeting file systems (”…”�”}”(hjøh²hh³Nh´NubjŽ)�”}”(hŒ ``FIFREEZE``”h]”hŒFIFREEZE”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjøubhŒ, ”…”�”}”(hjøh²hh³Nh´NubjŽ)�”}”(hŒ ``FITHAW``”h]”hŒFITHAW”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjøubhŒ, ”…”�”}”(hjøh²hh³Nh´NubjŽ)�”}”(hŒ ``FIGETBSZ``”h]”hŒFIGETBSZ”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjøubhŒ, ”…”�”}”hjøsbjŽ)�”}”(hŒ``FS_IOC_GETFSUUID``”h]”hŒFS_IOC_GETFSUUID”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjøubhŒ, ”…”�”}”hjøsbjŽ)�”}”(hŒ``FS_IOC_GETFSSYSFSPATH``”h]”hŒFS_IOC_GETFSSYSFSPATH”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjøubhŒ)”…”�”}”(hjøh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M’hjôubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjyubjg)�”}”(hŒÎSome IOCTL commands which do not make sense when used with devices, but whose implementations are safe and return the right error codes (``FS_IOC_FIEMAP``, ``FICLONE``, ``FICLONERANGE``, ``FIDEDUPERANGE``) ”h]”j()�”}”(hŒÍSome IOCTL commands which do not make sense when used with devices, but whose implementations are safe and return the right error codes (``FS_IOC_FIEMAP``, ``FICLONE``, ``FICLONERANGE``, ``FIDEDUPERANGE``)”h]”(hŒ‰Some IOCTL commands which do not make sense when used with devices, but whose implementations are safe and return the right error codes (”…”�”}”(hjkh²hh³Nh´NubjŽ)�”}”(hŒ``FS_IOC_FIEMAP``”h]”hŒ FS_IOC_FIEMAP”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjkubhŒ, ”…”�”}”(hjkh²hh³Nh´NubjŽ)�”}”(hŒ ``FICLONE``”h]”hŒFICLONE”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjkubhŒ, ”…”�”}”hjksbjŽ)�”}”(hŒ``FICLONERANGE``”h]”hŒ FICLONERANGE”…”�”}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjkubhŒ, ”…”�”}”hjksbjŽ)�”}”(hŒ``FIDEDUPERANGE``”h]”hŒ FIDEDUPERANGE”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjkubhŒ)”…”�”}”(hjkh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M”hjgubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjyubeh}”(h]”h ]”h"]”h$]”h&]”jôjõuh1jah³j±h´M�hjubj()�”}”(hŒKThis access right is available since the fifth version of the Landlock ABI.”h]”hŒKThis access right is available since the fifth version of the Landlock ABI.”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M˜hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jfhjìubjg)�”}”(hX``LANDLOCK_ACCESS_FS_RESOLVE_UNIX``: Look up pathname UNIX domain sockets (:manpage:`unix(7)`). On UNIX domain sockets, this restricts both calls to :manpage:`connect(2)` as well as calls to :manpage:`sendmsg(2)` with an explicit recipient address. This access right applies only to connections to UNIX server sockets which were created outside of the newly created Landlock domain (e.g. from within a parent domain or from an unrestricted process). Newly created UNIX servers within the same Landlock domain continue to be accessible. In this regard, ``LANDLOCK_ACCESS_FS_RESOLVE_UNIX`` has the same semantics as the ``LANDLOCK_SCOPE_*`` flags. If a resolution attempt is denied, the operation returns an ``EACCES`` error, in line with other filesystem access rights (but different to denials for abstract UNIX domain sockets). This access right is available since the ninth version of the Landlock ABI. The rationale for this design is described in :ref:`Documentation/security/landlock.rst `. ”h]”(j()�”}”(hŒù``LANDLOCK_ACCESS_FS_RESOLVE_UNIX``: Look up pathname UNIX domain sockets (:manpage:`unix(7)`). On UNIX domain sockets, this restricts both calls to :manpage:`connect(2)` as well as calls to :manpage:`sendmsg(2)` with an explicit recipient address.”h]”(jŽ)�”}”(hŒ#``LANDLOCK_ACCESS_FS_RESOLVE_UNIX``”h]”hŒLANDLOCK_ACCESS_FS_RESOLVE_UNIX”…”�”}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjçubhŒ(: Look up pathname UNIX domain sockets (”…”�”}”(hjçh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`unix(7)`”h]”hŒunix(7)”…”�”}”(hjýh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒunix(7)”jߌunix”jájâuh1jÍhjçubhŒ9). On UNIX domain sockets, this restricts both calls to ”…”�”}”(hjçh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`connect(2)`”h]”hŒ connect(2)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ connect(2)”jߌconnect”jájîuh1jÍhjçubhŒ as well as calls to ”…”�”}”(hjçh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`sendmsg(2)`”h]”hŒ sendmsg(2)”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ sendmsg(2)”jߌsendmsg”jájîuh1jÍhjçubhŒ$ with an explicit recipient address.”…”�”}”(hjçh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mšhjãubj()�”}”(hXŽThis access right applies only to connections to UNIX server sockets which were created outside of the newly created Landlock domain (e.g. from within a parent domain or from an unrestricted process). Newly created UNIX servers within the same Landlock domain continue to be accessible. In this regard, ``LANDLOCK_ACCESS_FS_RESOLVE_UNIX`` has the same semantics as the ``LANDLOCK_SCOPE_*`` flags.”h]”(hX1This access right applies only to connections to UNIX server sockets which were created outside of the newly created Landlock domain (e.g. from within a parent domain or from an unrestricted process). Newly created UNIX servers within the same Landlock domain continue to be accessible. In this regard, ”…”�”}”(hj@h²hh³Nh´NubjŽ)�”}”(hŒ#``LANDLOCK_ACCESS_FS_RESOLVE_UNIX``”h]”hŒLANDLOCK_ACCESS_FS_RESOLVE_UNIX”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj@ubhŒ has the same semantics as the ”…”�”}”(hj@h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_SCOPE_*``”h]”hŒLANDLOCK_SCOPE_*”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj@ubhŒ flags.”…”�”}”(hj@h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MŸhjãubj()�”}”(hŒ¶If a resolution attempt is denied, the operation returns an ``EACCES`` error, in line with other filesystem access rights (but different to denials for abstract UNIX domain sockets).”h]”(hŒ`.”h]”(hŒ.The rationale for this design is described in ”…”�”}”(hj£h²hh³Nh´Nubh)�”}”(hŒE:ref:`Documentation/security/landlock.rst `”h]”j¦)�”}”(hj­h]”hŒ#Documentation/security/landlock.rst”…”�”}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”(j±Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j¥hj«ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j¹Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjÄŒscoped-flags-interaction”uh1hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M¬hj£ubhŒ.”…”�”}”(hj£h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³jËh´M¬hjãubeh}”(h]”h ]”h"]”h$]”h&]”uh1jfhjìubeh}”(h]”h ]”h"]”h$]”h&]”jôŒ-”uh1jah³jh´Mhj½ubj()�”}”(hX'Whether an opened file can be truncated with :manpage:`ftruncate(2)` or used with `ioctl(2)` is determined during :manpage:`open(2)`, in the same way as read and write permissions are checked during :manpage:`open(2)` using ``LANDLOCK_ACCESS_FS_READ_FILE`` and ``LANDLOCK_ACCESS_FS_WRITE_FILE``.”h]”(hŒ-Whether an opened file can be truncated with ”…”�”}”(hjãh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`ftruncate(2)`”h]”hŒ ftruncate(2)”…”�”}”(hjëh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ ftruncate(2)”jߌ ftruncate”jájîuh1jÍhjãubhŒ or used with ”…”�”}”(hjãh²hh³Nh´NubjJ)�”}”(hŒ `ioctl(2)`”h]”hŒioctl(2)”…”�”}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jIhjãubhŒ is determined during ”…”�”}”(hjãh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`open(2)`”h]”hŒopen(2)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒopen(2)”jߌopen”jájîuh1jÍhjãubhŒC, in the same way as read and write permissions are checked during ”…”�”}”(hjãh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`open(2)`”h]”hŒopen(2)”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒopen(2)”jߌopen”jájîuh1jÍhjãubhŒ using ”…”�”}”(hjãh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_READ_FILE``”h]”hŒLANDLOCK_ACCESS_FS_READ_FILE”…”�”}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjãubhŒ and ”…”�”}”(hjãh²hh³Nh´NubjŽ)�”}”(hŒ!``LANDLOCK_ACCESS_FS_WRITE_FILE``”h]”hŒLANDLOCK_ACCESS_FS_WRITE_FILE”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjãubhŒ.”…”�”}”(hjãh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M¯hj½ubj()�”}”(hŒ¦A directory can receive access rights related to files or directories. The following access right is applied to the directory itself, and the directories beneath it:”h]”hŒ¦A directory can receive access rights related to files or directories. The following access right is applied to the directory itself, and the directories beneath it:”…”�”}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M´hj½ubjb)�”}”(hhh]”jg)�”}”(hŒG``LANDLOCK_ACCESS_FS_READ_DIR``: Open a directory or list its content. ”h]”j()�”}”(hŒF``LANDLOCK_ACCESS_FS_READ_DIR``: Open a directory or list its content.”h]”(jŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_READ_DIR``”h]”hŒLANDLOCK_ACCESS_FS_READ_DIR”…”�”}”(hj~h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjzubhŒ': Open a directory or list its content.”…”�”}”(hjzh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M¸hjvubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjsubah}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³j–h´M¸hj½ubj()�”}”(hŒhHowever, the following access rights only apply to the content of a directory, not the directory itself:”h]”hŒhHowever, the following access rights only apply to the content of a directory, not the directory itself:”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mºhj½ubjb)�”}”(hhh]”(jg)�”}”(hŒK``LANDLOCK_ACCESS_FS_REMOVE_DIR``: Remove an empty directory or rename one.”h]”j()�”}”(hj·h]”(jŽ)�”}”(hŒ!``LANDLOCK_ACCESS_FS_REMOVE_DIR``”h]”hŒLANDLOCK_ACCESS_FS_REMOVE_DIR”…”�”}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¹ubhŒ*: Remove an empty directory or rename one.”…”�”}”(hj¹h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M½hjµubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj²ubjg)�”}”(hŒ>``LANDLOCK_ACCESS_FS_REMOVE_FILE``: Unlink (or rename) a file.”h]”j()�”}”(hjÝh]”(jŽ)�”}”(hŒ"``LANDLOCK_ACCESS_FS_REMOVE_FILE``”h]”hŒLANDLOCK_ACCESS_FS_REMOVE_FILE”…”�”}”(hjâh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjßubhŒ: Unlink (or rename) a file.”…”�”}”(hjßh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M¾hjÛubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj²ubjg)�”}”(hŒP``LANDLOCK_ACCESS_FS_MAKE_CHAR``: Create (or rename or link) a character device.”h]”j()�”}”(hŒP``LANDLOCK_ACCESS_FS_MAKE_CHAR``: Create (or rename or link) a character device.”h]”(jŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_MAKE_CHAR``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_CHAR”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjubhŒ0: Create (or rename or link) a character device.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M¿hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj²ubjg)�”}”(hŒ@``LANDLOCK_ACCESS_FS_MAKE_DIR``: Create (or rename) a directory.”h]”j()�”}”(hj*h]”(jŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_MAKE_DIR``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_DIR”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj,ubhŒ!: Create (or rename) a directory.”…”�”}”(hj,h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MÁhj(ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj²ubjg)�”}”(hŒ“``LANDLOCK_ACCESS_FS_MAKE_REG``: Create (or rename or link) a regular file. This also guards the creation of whiteout objects as used in OverlayFS.”h]”j()�”}”(hŒ“``LANDLOCK_ACCESS_FS_MAKE_REG``: Create (or rename or link) a regular file. This also guards the creation of whiteout objects as used in OverlayFS.”h]”(jŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_MAKE_REG``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_REG”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjRubhŒt: Create (or rename or link) a regular file. This also guards the creation of whiteout objects as used in OverlayFS.”…”�”}”(hjRh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MÂhjNubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj²ubjg)�”}”(hŒR``LANDLOCK_ACCESS_FS_MAKE_SOCK``: Create (or rename or link) a UNIX domain socket.”h]”j()�”}”(hŒR``LANDLOCK_ACCESS_FS_MAKE_SOCK``: Create (or rename or link) a UNIX domain socket.”h]”(jŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_MAKE_SOCK``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_SOCK”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjyubhŒ2: Create (or rename or link) a UNIX domain socket.”…”�”}”(hjyh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MÄhjuubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj²ubjg)�”}”(hŒJ``LANDLOCK_ACCESS_FS_MAKE_FIFO``: Create (or rename or link) a named pipe.”h]”j()�”}”(hjžh]”(jŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_MAKE_FIFO``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_FIFO”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj ubhŒ*: Create (or rename or link) a named pipe.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MÆhjœubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj²ubjg)�”}”(hŒM``LANDLOCK_ACCESS_FS_MAKE_BLOCK``: Create (or rename or link) a block device.”h]”j()�”}”(hjÄh]”(jŽ)�”}”(hŒ!``LANDLOCK_ACCESS_FS_MAKE_BLOCK``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_BLOCK”…”�”}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÆubhŒ,: Create (or rename or link) a block device.”…”�”}”(hjÆh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MÇhjÂubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj²ubjg)�”}”(hŒL``LANDLOCK_ACCESS_FS_MAKE_SYM``: Create (or rename or link) a symbolic link.”h]”j()�”}”(hjêh]”(jŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_MAKE_SYM``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_SYM”…”�”}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjìubhŒ-: Create (or rename or link) a symbolic link.”…”�”}”(hjìh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MÈhjèubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj²ubjg)�”}”(hXé``LANDLOCK_ACCESS_FS_REFER``: Link or rename a file from or to a different directory (i.e. reparent a file hierarchy). This access right is available since the second version of the Landlock ABI. This is the only access right which is denied by default by any ruleset, even if the right is not specified as handled at ruleset creation time. The only way to make a ruleset grant this right is to explicitly allow it for a specific directory by adding a matching rule to the ruleset. In particular, when using the first Landlock ABI version, Landlock will always deny attempts to reparent files between different directories. In addition to the source and destination directories having the ``LANDLOCK_ACCESS_FS_REFER`` access right, the attempted link or rename operation must meet the following constraints: * The reparented file may not gain more access rights in the destination directory than it previously had in the source directory. If this is attempted, the operation results in an ``EXDEV`` error. * When linking or renaming, the ``LANDLOCK_ACCESS_FS_MAKE_*`` right for the respective file type must be granted for the destination directory. Otherwise, the operation results in an ``EACCES`` error. * When renaming, the ``LANDLOCK_ACCESS_FS_REMOVE_*`` right for the respective file type must be granted for the source directory. Otherwise, the operation results in an ``EACCES`` error. If multiple requirements are not met, the ``EACCES`` error code takes precedence over ``EXDEV``. ”h]”(j()�”}”(hŒv``LANDLOCK_ACCESS_FS_REFER``: Link or rename a file from or to a different directory (i.e. reparent a file hierarchy).”h]”(jŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_REFER``”h]”hŒLANDLOCK_ACCESS_FS_REFER”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjubhŒZ: Link or rename a file from or to a different directory (i.e. reparent a file hierarchy).”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MÉhjubj()�”}”(hŒLThis access right is available since the second version of the Landlock ABI.”h]”hŒLThis access right is available since the second version of the Landlock ABI.”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MÌhjubj()�”}”(hXThis is the only access right which is denied by default by any ruleset, even if the right is not specified as handled at ruleset creation time. The only way to make a ruleset grant this right is to explicitly allow it for a specific directory by adding a matching rule to the ruleset.”h]”hXThis is the only access right which is denied by default by any ruleset, even if the right is not specified as handled at ruleset creation time. The only way to make a ruleset grant this right is to explicitly allow it for a specific directory by adding a matching rule to the ruleset.”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MÏhjubj()�”}”(hŒ�In particular, when using the first Landlock ABI version, Landlock will always deny attempts to reparent files between different directories.”h]”hŒ�In particular, when using the first Landlock ABI version, Landlock will always deny attempts to reparent files between different directories.”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MÔhjubj()�”}”(hŒ·In addition to the source and destination directories having the ``LANDLOCK_ACCESS_FS_REFER`` access right, the attempted link or rename operation must meet the following constraints:”h]”(hŒAIn addition to the source and destination directories having the ”…”�”}”(hj\h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_REFER``”h]”hŒLANDLOCK_ACCESS_FS_REFER”…”�”}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj\ubhŒZ access right, the attempted link or rename operation must meet the following constraints:”…”�”}”(hj\h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M×hjubjb)�”}”(hhh]”(jg)�”}”(hŒÅThe reparented file may not gain more access rights in the destination directory than it previously had in the source directory. If this is attempted, the operation results in an ``EXDEV`` error. ”h]”j()�”}”(hŒÄThe reparented file may not gain more access rights in the destination directory than it previously had in the source directory. If this is attempted, the operation results in an ``EXDEV`` error.”h]”(hŒ´The reparented file may not gain more access rights in the destination directory than it previously had in the source directory. If this is attempted, the operation results in an ”…”�”}”(hj„h²hh³Nh´NubjŽ)�”}”(hŒ ``EXDEV``”h]”hŒEXDEV”…”�”}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj„ubhŒ error.”…”�”}”(hj„h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MÛhj€ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj}ubjg)�”}”(hŒÇWhen linking or renaming, the ``LANDLOCK_ACCESS_FS_MAKE_*`` right for the respective file type must be granted for the destination directory. Otherwise, the operation results in an ``EACCES`` error. ”h]”j()�”}”(hŒÆWhen linking or renaming, the ``LANDLOCK_ACCESS_FS_MAKE_*`` right for the respective file type must be granted for the destination directory. Otherwise, the operation results in an ``EACCES`` error.”h]”(hŒWhen linking or renaming, the ”…”�”}”(hj¯h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_MAKE_*``”h]”hŒLANDLOCK_ACCESS_FS_MAKE_*”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¯ubhŒz right for the respective file type must be granted for the destination directory. Otherwise, the operation results in an ”…”�”}”(hj¯h²hh³Nh´NubjŽ)�”}”(hŒ ``EACCES``”h]”hŒEACCES”…”�”}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¯ubhŒ error.”…”�”}”(hj¯h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mßhj«ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj}ubjg)�”}”(hŒºWhen renaming, the ``LANDLOCK_ACCESS_FS_REMOVE_*`` right for the respective file type must be granted for the source directory. Otherwise, the operation results in an ``EACCES`` error. ”h]”j()�”}”(hŒ¹When renaming, the ``LANDLOCK_ACCESS_FS_REMOVE_*`` right for the respective file type must be granted for the source directory. Otherwise, the operation results in an ``EACCES`` error.”h]”(hŒWhen renaming, the ”…”�”}”(hjìh²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_REMOVE_*``”h]”hŒLANDLOCK_ACCESS_FS_REMOVE_*”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjìubhŒv right for the respective file type must be granted for the source directory. Otherwise, the operation results in an ”…”�”}”(hjìh²hh³Nh´NubjŽ)�”}”(hŒ ``EACCES``”h]”hŒEACCES”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjìubhŒ error.”…”�”}”(hjìh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mãhjèubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj}ubeh}”(h]”h ]”h"]”h$]”h&]”jôjõuh1jah³j¤h´MÛhjubj()�”}”(hŒ`If multiple requirements are not met, the ``EACCES`` error code takes precedence over ``EXDEV``.”h]”(hŒ*If multiple requirements are not met, the ”…”�”}”(hj+ h²hh³Nh´NubjŽ)�”}”(hŒ ``EACCES``”h]”hŒEACCES”…”�”}”(hj3 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj+ ubhŒ" error code takes precedence over ”…”�”}”(hj+ h²hh³Nh´NubjŽ)�”}”(hŒ ``EXDEV``”h]”hŒEXDEV”…”�”}”(hjE h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj+ ubhŒ.”…”�”}”(hj+ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mçhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jfhj²ubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³jÔh´M½hj½ubjr)�”}”(hXfIt is currently not possible to restrict some file-related actions accessible through these syscall families: :manpage:`chdir(2)`, :manpage:`stat(2)`, :manpage:`flock(2)`, :manpage:`chmod(2)`, :manpage:`chown(2)`, :manpage:`setxattr(2)`, :manpage:`utime(2)`, :manpage:`fcntl(2)`, :manpage:`access(2)`. Future Landlock evolutions will enable to restrict them.”h]”j()�”}”(hXfIt is currently not possible to restrict some file-related actions accessible through these syscall families: :manpage:`chdir(2)`, :manpage:`stat(2)`, :manpage:`flock(2)`, :manpage:`chmod(2)`, :manpage:`chown(2)`, :manpage:`setxattr(2)`, :manpage:`utime(2)`, :manpage:`fcntl(2)`, :manpage:`access(2)`. Future Landlock evolutions will enable to restrict them.”h]”(hŒnIt is currently not possible to restrict some file-related actions accessible through these syscall families: ”…”�”}”(hjn h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`chdir(2)`”h]”hŒchdir(2)”…”�”}”(hjv h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒchdir(2)”jߌchdir”jájîuh1jÍhjn ubhŒ, ”…”�”}”(hjn h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`stat(2)`”h]”hŒstat(2)”…”�”}”(hjŠ h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒstat(2)”jߌstat”jájîuh1jÍhjn ubhŒ, ”…”�”}”(hjn h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`flock(2)`”h]”hŒflock(2)”…”�”}”(hjž h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒflock(2)”jߌflock”jájîuh1jÍhjn ubhŒ, ”…”�”}”hjn sbjÎ)�”}”(hŒ:manpage:`chmod(2)`”h]”hŒchmod(2)”…”�”}”(hj² h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒchmod(2)”jߌchmod”jájîuh1jÍhjn ubhŒ, ”…”�”}”hjn sbjÎ)�”}”(hŒ:manpage:`chown(2)`”h]”hŒchown(2)”…”�”}”(hjÆ h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒchown(2)”jߌchown”jájîuh1jÍhjn ubhŒ, ”…”�”}”hjn sbjÎ)�”}”(hŒ:manpage:`setxattr(2)`”h]”hŒ setxattr(2)”…”�”}”(hjÚ h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ setxattr(2)”jߌsetxattr”jájîuh1jÍhjn ubhŒ, ”…”�”}”hjn sbjÎ)�”}”(hŒ:manpage:`utime(2)`”h]”hŒutime(2)”…”�”}”(hjî h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒutime(2)”jߌutime”jájîuh1jÍhjn ubhŒ, ”…”�”}”hjn sbjÎ)�”}”(hŒ:manpage:`fcntl(2)`”h]”hŒfcntl(2)”…”�”}”(hj!h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒfcntl(2)”jߌfcntl”jájîuh1jÍhjn ubhŒ, ”…”�”}”hjn sbjÎ)�”}”(hŒ:manpage:`access(2)`”h]”hŒ access(2)”…”�”}”(hj!h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ access(2)”jߌaccess”jájîuh1jÍhjn ubhŒ:. Future Landlock evolutions will enable to restrict them.”…”�”}”(hjn h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mìhjj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhj½ubeh}”(h]”Œfilesystem-flags”ah ]”h"]”Œfilesystem flags”ah$]”h&]”uh1hòhjzh²hh³Nh´Nj¯ Kubhó)�”}”(hhh]”(hø)�”}”(hŒ Network flags”h]”hŒ Network flags”…”�”}”(hjB!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj?!h³Nh´Nubj()�”}”(hŒOThese flags enable to restrict a sandboxed process to a set of network actions.”h]”hŒOThese flags enable to restrict a sandboxed process to a set of network actions.”…”�”}”(hjP!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M hj?!ubj()�”}”(hŒ6The following access rights apply to TCP port numbers:”h]”hŒ6The following access rights apply to TCP port numbers:”…”�”}”(hj_!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mhj?!ubjb)�”}”(hhh]”(jg)�”}”(hŒt``LANDLOCK_ACCESS_NET_BIND_TCP``: Bind TCP sockets to the given local port. Support added in Landlock ABI version 4.”h]”j()�”}”(hŒt``LANDLOCK_ACCESS_NET_BIND_TCP``: Bind TCP sockets to the given local port. Support added in Landlock ABI version 4.”h]”(jŽ)�”}”(hŒ ``LANDLOCK_ACCESS_NET_BIND_TCP``”h]”hŒLANDLOCK_ACCESS_NET_BIND_TCP”…”�”}”(hjy!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hju!ubhŒT: Bind TCP sockets to the given local port. Support added in Landlock ABI version 4.”…”�”}”(hju!h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mhjq!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjn!ubjg)�”}”(hŒ|``LANDLOCK_ACCESS_NET_CONNECT_TCP``: Connect TCP sockets to the given remote port. Support added in Landlock ABI version 4. ”h]”j()�”}”(hŒ{``LANDLOCK_ACCESS_NET_CONNECT_TCP``: Connect TCP sockets to the given remote port. Support added in Landlock ABI version 4.”h]”(jŽ)�”}”(hŒ#``LANDLOCK_ACCESS_NET_CONNECT_TCP``”h]”hŒLANDLOCK_ACCESS_NET_CONNECT_TCP”…”�”}”(hj !h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjœ!ubhŒX: Connect TCP sockets to the given remote port. Support added in Landlock ABI version 4.”…”�”}”(hjœ!h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mhj˜!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjn!ubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³j‘!h´Mhj?!ubj()�”}”(hŒ#And similarly for UDP port numbers:”h]”hŒ#And similarly for UDP port numbers:”…”�”}”(hjÅ!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mhj?!ubjb)�”}”(hhh]”(jg)�”}”(hŒu``LANDLOCK_ACCESS_NET_BIND_UDP``: Bind UDP sockets to the given local port. Support added in Landlock ABI version 10.”h]”j()�”}”(hŒu``LANDLOCK_ACCESS_NET_BIND_UDP``: Bind UDP sockets to the given local port. Support added in Landlock ABI version 10.”h]”(jŽ)�”}”(hŒ ``LANDLOCK_ACCESS_NET_BIND_UDP``”h]”hŒLANDLOCK_ACCESS_NET_BIND_UDP”…”�”}”(hjß!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÛ!ubhŒU: Bind UDP sockets to the given local port. Support added in Landlock ABI version 10.”…”�”}”(hjÛ!h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mhj×!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjÔ!ubjg)�”}”(hŒã``LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP``: Set the remote port of UDP sockets to the given port, or send datagrams to the given remote port ignoring any destination pre-set on a socket. Support added in Landlock ABI version 10. ”h]”j()�”}”(hŒâ``LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP``: Set the remote port of UDP sockets to the given port, or send datagrams to the given remote port ignoring any destination pre-set on a socket. Support added in Landlock ABI version 10.”h]”(jŽ)�”}”(hŒ(``LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP``”h]”hŒ$LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj"ubhŒº: Set the remote port of UDP sockets to the given port, or send datagrams to the given remote port ignoring any destination pre-set on a socket. Support added in Landlock ABI version 10.”…”�”}”(hj"h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mhjþ!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjÔ!ubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³j÷!h´Mhj?!ubhŒnote”“”)�”}”(hXmSetting a remote address or sending a first datagram auto-binds UDP sockets to an ephemeral local source port if not already bound. To allow this if both ``LANDLOCK_ACCESS_NET_BIND_UDP`` and ``LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP`` are handled, you need to either: - use a socket already bound to a port before the ruleset started being enforced; - or grant ``LANDLOCK_ACCESS_NET_BIND_UDP`` on port 0, meaning "any port in the ephemeral port range"; - or grant ``LANDLOCK_ACCESS_NET_BIND_UDP`` on a specific port, and call :manpage:`bind(2)` on that port before trying to :manpage:`connect(2)` or send datagrams.”h]”(j()�”}”(hXSetting a remote address or sending a first datagram auto-binds UDP sockets to an ephemeral local source port if not already bound. To allow this if both ``LANDLOCK_ACCESS_NET_BIND_UDP`` and ``LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP`` are handled, you need to either:”h]”(hŒšSetting a remote address or sending a first datagram auto-binds UDP sockets to an ephemeral local source port if not already bound. To allow this if both ”…”�”}”(hj1"h²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_NET_BIND_UDP``”h]”hŒLANDLOCK_ACCESS_NET_BIND_UDP”…”�”}”(hj9"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj1"ubhŒ and ”…”�”}”(hj1"h²hh³Nh´NubjŽ)�”}”(hŒ(``LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP``”h]”hŒ$LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP”…”�”}”(hjK"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj1"ubhŒ! are handled, you need to either:”…”�”}”(hj1"h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M hj-"ubjb)�”}”(hhh]”(jg)�”}”(hŒOuse a socket already bound to a port before the ruleset started being enforced;”h]”j()�”}”(hŒOuse a socket already bound to a port before the ruleset started being enforced;”h]”hŒOuse a socket already bound to a port before the ruleset started being enforced;”…”�”}”(hjk"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M&hjg"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjd"ubjg)�”}”(hŒdor grant ``LANDLOCK_ACCESS_NET_BIND_UDP`` on port 0, meaning "any port in the ephemeral port range";”h]”j()�”}”(hŒdor grant ``LANDLOCK_ACCESS_NET_BIND_UDP`` on port 0, meaning "any port in the ephemeral port range";”h]”(hŒ or grant ”…”�”}”(hj„"h²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_NET_BIND_UDP``”h]”hŒLANDLOCK_ACCESS_NET_BIND_UDP”…”�”}”(hjŒ"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj„"ubhŒ? on port 0, meaning “any port in the ephemeral port rangeâ€�;”…”�”}”(hj„"h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M(hj€"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjd"ubjg)�”}”(hŒ or grant ``LANDLOCK_ACCESS_NET_BIND_UDP`` on a specific port, and call :manpage:`bind(2)` on that port before trying to :manpage:`connect(2)` or send datagrams.”h]”j()�”}”(hŒ or grant ``LANDLOCK_ACCESS_NET_BIND_UDP`` on a specific port, and call :manpage:`bind(2)` on that port before trying to :manpage:`connect(2)` or send datagrams.”h]”(hŒ or grant ”…”�”}”(hj¯"h²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_NET_BIND_UDP``”h]”hŒLANDLOCK_ACCESS_NET_BIND_UDP”…”�”}”(hj·"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¯"ubhŒ on a specific port, and call ”…”�”}”(hj¯"h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`bind(2)`”h]”hŒbind(2)”…”�”}”(hjÉ"h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒbind(2)”jߌbind”jájîuh1jÍhj¯"ubhŒ on that port before trying to ”…”�”}”(hj¯"h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`connect(2)`”h]”hŒ connect(2)”…”�”}”(hjÝ"h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ connect(2)”jߌconnect”jájîuh1jÍhj¯"ubhŒ or send datagrams.”…”�”}”(hj¯"h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M*hj«"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjd"ubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³jy"h´M&hj-"ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j+"hj?!ubj,")�”}”(hŒ˜Sending datagrams to an ``AF_UNSPEC`` destination address family is not supported for IPv6 UDP sockets: you will need to use a ``NULL`` address instead.”h]”j()�”}”(hŒ˜Sending datagrams to an ``AF_UNSPEC`` destination address family is not supported for IPv6 UDP sockets: you will need to use a ``NULL`` address instead.”h]”(hŒSending datagrams to an ”…”�”}”(hj#h²hh³Nh´NubjŽ)�”}”(hŒ ``AF_UNSPEC``”h]”hŒ AF_UNSPEC”…”�”}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj#ubhŒZ destination address family is not supported for IPv6 UDP sockets: you will need to use a ”…”�”}”(hj#h²hh³Nh´NubjŽ)�”}”(hŒ``NULL``”h]”hŒNULL”…”�”}”(hj(#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj#ubhŒ address instead.”…”�”}”(hj#h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M.hj #ubah}”(h]”h ]”h"]”h$]”h&]”uh1j+"hj?!ubeh}”(h]”Œ network-flags”ah ]”h"]”Œ network flags”ah$]”h&]”uh1hòhjzh²hh³Nh´Nj¯ Kubhó)�”}”(hhh]”(hø)�”}”(hŒ Scope flags”h]”hŒ Scope flags”…”�”}”(hjR#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjO#h³Nh´Nubj()�”}”(hŒÁThese flags enable to isolate a sandboxed process from a set of IPC actions. Setting a flag for a ruleset will isolate the Landlock domain to forbid connections to resources outside the domain.”h]”hŒÁThese flags enable to isolate a sandboxed process from a set of IPC actions. Setting a flag for a ruleset will isolate the Landlock domain to forbid connections to resources outside the domain.”…”�”}”(hj`#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M?hjO#ubj()�”}”(hŒ/This is supported since Landlock ABI version 6.”h]”hŒ/This is supported since Landlock ABI version 6.”…”�”}”(hjo#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MChjO#ubj()�”}”(hŒScopes:”h]”hŒScopes:”…”�”}”(hj~#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MEhjO#ubjb)�”}”(hhh]”(jg)�”}”(hŒÝ``LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET``: Restrict a sandboxed process from connecting to an abstract UNIX socket created by a process outside the related Landlock domain (e.g., a parent domain or a non-sandboxed process).”h]”j()�”}”(hŒÝ``LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET``: Restrict a sandboxed process from connecting to an abstract UNIX socket created by a process outside the related Landlock domain (e.g., a parent domain or a non-sandboxed process).”h]”(jŽ)�”}”(hŒ'``LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET``”h]”hŒ#LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET”…”�”}”(hj˜#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj”#ubhŒ¶: Restrict a sandboxed process from connecting to an abstract UNIX socket created by a process outside the related Landlock domain (e.g., a parent domain or a non-sandboxed process).”…”�”}”(hj”#h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MGhj�#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�#ubjg)�”}”(hŒv``LANDLOCK_SCOPE_SIGNAL``: Restrict a sandboxed process from sending a signal to another process outside the domain. ”h]”j()�”}”(hŒt``LANDLOCK_SCOPE_SIGNAL``: Restrict a sandboxed process from sending a signal to another process outside the domain.”h]”(jŽ)�”}”(hŒ``LANDLOCK_SCOPE_SIGNAL``”h]”hŒLANDLOCK_SCOPE_SIGNAL”…”�”}”(hj¿#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj»#ubhŒ[: Restrict a sandboxed process from sending a signal to another process outside the domain.”…”�”}”(hj»#h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MJhj·#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�#ubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³j°#h´MGhjO#ubeh}”(h]”Œ scope-flags”ah ]”h"]”Œ scope flags”ah$]”h&]”uh1hòhjzh²hh³Nh´Nj¯ Kubhó)�”}”(hhh]”(hø)�”}”(hŒPermission flags”h]”hŒPermission flags”…”�”}”(hjï#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjì#h³Nh´Nubj()�”}”(hXáThese flags restrict the use of members of a category, each member being identified by a constant from another kernel subsystem (e.g. CLONE_NEW* namespace types, CAP_* capabilities). A flag covers every kernel path that uses a member of its category, and members that no rule explicitly allows are denied. Values unknown to the running kernel are silently accepted for forward compatibility and stay denied by default. See Documentation/security/landlock.rst for design details.”h]”hXáThese flags restrict the use of members of a category, each member being identified by a constant from another kernel subsystem (e.g. CLONE_NEW* namespace types, CAP_* capabilities). A flag covers every kernel path that uses a member of its category, and members that no rule explicitly allows are denied. Values unknown to the running kernel are silently accepted for forward compatibility and stay denied by default. See Documentation/security/landlock.rst for design details.”…”�”}”(hjý#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MXhjì#ubj()�”}”(hXWhen a ruleset handles multiple permissions whose operations overlap (e.g. a non-user namespace needs both its namespace type and CAP_SYS_ADMIN), the operation is allowed only if each handled permission independently allows it. See Documentation/userspace-api/landlock.rst.”h]”hXWhen a ruleset handles multiple permissions whose operations overlap (e.g. a non-user namespace needs both its namespace type and CAP_SYS_ADMIN), the operation is allowed only if each handled permission independently allows it. See Documentation/userspace-api/landlock.rst.”…”�”}”(hj $h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´M`hjì#ubjb)�”}”(hhh]”(jg)�”}”(hXã``LANDLOCK_PERMISSION_NAMESPACE_USE``: Restrict the use of specific namespace types: creation (:manpage:`unshare(2)`, :manpage:`clone(2)`, :manpage:`clone3(2)`), joining (:manpage:`setns(2)`), and acquiring an fd reference (:manpage:`open_tree(2)`, :manpage:`fsmount(2)`). A process in a Landlock domain that handles this permission is denied from using namespace types that are not explicitly allowed by a ``LANDLOCK_RULE_NAMESPACE`` rule. Support added in Landlock ABI version 12.”h]”j()�”}”(hXã``LANDLOCK_PERMISSION_NAMESPACE_USE``: Restrict the use of specific namespace types: creation (:manpage:`unshare(2)`, :manpage:`clone(2)`, :manpage:`clone3(2)`), joining (:manpage:`setns(2)`), and acquiring an fd reference (:manpage:`open_tree(2)`, :manpage:`fsmount(2)`). A process in a Landlock domain that handles this permission is denied from using namespace types that are not explicitly allowed by a ``LANDLOCK_RULE_NAMESPACE`` rule. Support added in Landlock ABI version 12.”h]”(jŽ)�”}”(hŒ%``LANDLOCK_PERMISSION_NAMESPACE_USE``”h]”hŒ!LANDLOCK_PERMISSION_NAMESPACE_USE”…”�”}”(hj&$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj"$ubhŒ:: Restrict the use of specific namespace types: creation (”…”�”}”(hj"$h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`unshare(2)`”h]”hŒ unshare(2)”…”�”}”(hj8$h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ unshare(2)”jߌunshare”jájîuh1jÍhj"$ubhŒ, ”…”�”}”(hj"$h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`clone(2)`”h]”hŒclone(2)”…”�”}”(hjL$h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒclone(2)”jߌclone”jájîuh1jÍhj"$ubhŒ, ”…”�”}”(hj"$h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`clone3(2)`”h]”hŒ clone3(2)”…”�”}”(hj`$h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ clone3(2)”jߌclone3”jájîuh1jÍhj"$ubhŒ ), joining (”…”�”}”(hj"$h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`setns(2)`”h]”hŒsetns(2)”…”�”}”(hjt$h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒsetns(2)”jߌsetns”jájîuh1jÍhj"$ubhŒ"), and acquiring an fd reference (”…”�”}”(hj"$h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`open_tree(2)`”h]”hŒ open_tree(2)”…”�”}”(hjˆ$h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ open_tree(2)”jߌ open_tree”jájîuh1jÍhj"$ubhŒ, ”…”�”}”hj"$sbjÎ)�”}”(hŒ:manpage:`fsmount(2)`”h]”hŒ fsmount(2)”…”�”}”(hjœ$h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ fsmount(2)”jߌfsmount”jájîuh1jÍhj"$ubhŒŠ). A process in a Landlock domain that handles this permission is denied from using namespace types that are not explicitly allowed by a ”…”�”}”(hj"$h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_RULE_NAMESPACE``”h]”hŒLANDLOCK_RULE_NAMESPACE”…”�”}”(hj°$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj"$ubhŒ0 rule. Support added in Landlock ABI version 12.”…”�”}”(hj"$h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´Mehj$ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj$ubjg)�”}”(hX×``LANDLOCK_PERMISSION_CAPABILITY_USE``: Restrict the use of specific Linux capabilities. A process in a Landlock domain that handles this permission is denied from exercising capabilities that are not explicitly allowed by a ``LANDLOCK_RULE_CAPABILITY`` rule. This hook is purely restrictive: it can deny capabilities that the kernel would otherwise grant, but it can never grant capabilities that the kernel already denied. Support added in Landlock ABI version 12. ”h]”j()�”}”(hXÕ``LANDLOCK_PERMISSION_CAPABILITY_USE``: Restrict the use of specific Linux capabilities. A process in a Landlock domain that handles this permission is denied from exercising capabilities that are not explicitly allowed by a ``LANDLOCK_RULE_CAPABILITY`` rule. This hook is purely restrictive: it can deny capabilities that the kernel would otherwise grant, but it can never grant capabilities that the kernel already denied. Support added in Landlock ABI version 12.”h]”(jŽ)�”}”(hŒ&``LANDLOCK_PERMISSION_CAPABILITY_USE``”h]”hŒ"LANDLOCK_PERMISSION_CAPABILITY_USE”…”�”}”(hj×$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÓ$ubhŒ¼: Restrict the use of specific Linux capabilities. A process in a Landlock domain that handles this permission is denied from exercising capabilities that are not explicitly allowed by a ”…”�”}”(hjÓ$h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_RULE_CAPABILITY``”h]”hŒLANDLOCK_RULE_CAPABILITY”…”�”}”(hjé$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÓ$ubhŒ× rule. This hook is purely restrictive: it can deny capabilities that the kernel would otherwise grant, but it can never grant capabilities that the kernel already denied. Support added in Landlock ABI version 12.”…”�”}”(hjÓ$h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:811: ./include/uapi/linux/landlock.h”h´MlhjÏ$ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj$ubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³jÈ$h´Mehjì#ubeh}”(h]”Œpermission-flags”ah ]”h"]”Œpermission flags”ah$]”h&]”uh1hòhjzh²hh³Nh´Nj¯ Kubeh}”(h]”Œ access-rights”ah ]”h"]”Œ access rights”ah$]”h&]”uh1hòhjih²hh³hÇh´M)ubhó)�”}”(hhh]”(hø)�”}”(hŒCreating a new ruleset”h]”hŒCreating a new ruleset”…”�”}”(hj!%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj%h²hh³hÇh´M/ubhŒindex”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(Œsingle”Œ(sys_landlock_create_ruleset (C function)”Œc.sys_landlock_create_ruleset”hNt”auh1j/%hj%h²hh³Nh´NubhŒdesc”“”)�”}”(hhh]”(hŒdesc_signature”“”)�”}”(hŒ~long sys_landlock_create_ruleset (const struct landlock_ruleset_attr __user *const attr, const size_t size, const __u32 flags)”h]”hŒdesc_signature_line”“”)�”}”(hŒ}long sys_landlock_create_ruleset(const struct landlock_ruleset_attr __user *const attr, const size_t size, const __u32 flags)”h]”(hŒdesc_sig_keyword_type”“”)�”}”(hŒlong”h]”hŒlong”…”�”}”(hjS%h²hh³Nh´Nubah}”(h]”h ]”Œkt”ah"]”h$]”h&]”uh1jQ%hjM%h²hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÅubhŒdesc_sig_space”“”)�”}”(hŒ ”h]”hŒ ”…”�”}”(hje%h²hh³Nh´Nubah}”(h]”h ]”Œw”ah"]”h$]”h&]”uh1jc%hjM%h²hh³jb%h´KÅubhŒ desc_name”“”)�”}”(hŒsys_landlock_create_ruleset”h]”hŒ desc_sig_name”“”)�”}”(hŒsys_landlock_create_ruleset”h]”hŒsys_landlock_create_ruleset”…”�”}”(hj|%h²hh³Nh´Nubah}”(h]”h ]”Œn”ah"]”h$]”h&]”uh1jz%hjv%ubah}”(h]”h ]”(Œsig-name”Œdescname”eh"]”h$]”h&]”hÅhÆuh1jt%hjM%h²hh³jb%h´KÅubhŒdesc_parameterlist”“”)�”}”(hŒ](const struct landlock_ruleset_attr __user *const attr, const size_t size, const __u32 flags)”h]”(hŒdesc_parameter”“”)�”}”(hŒ5const struct landlock_ruleset_attr __user *const attr”h]”(hŒdesc_sig_keyword”“”)�”}”(hŒconst”h]”hŒconst”…”�”}”(hj¡%h²hh³Nh´Nubah}”(h]”h ]”Œk”ah"]”h$]”h&]”uh1jŸ%hj›%ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj°%h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj›%ubj %)�”}”(hŒstruct”h]”hŒstruct”…”�”}”(hj¾%h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hj›%ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjÌ%h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj›%ubh)�”}”(hhh]”j{%)�”}”(hŒlandlock_ruleset_attr”h]”hŒlandlock_ruleset_attr”…”�”}”(hjÝ%h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjÚ%ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”j³Œreftype”Œ identifier”Œ reftarget”jß%Œmodname”NŒ classname”NŒ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)�”}”Œdata”]”jø%Œ ASTIdentifier”“”)�”}”jó%j~%sbŒc.sys_landlock_create_ruleset”†”asbuh1hhj›%ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj›%ubhŒ__user”…”�”}”(hj›%h²hh³Nh´Nubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj›%ubhŒdesc_sig_punctuation”“”)�”}”(hjõh]”hŒ*”…”�”}”(hj'&h²hh³Nh´Nubah}”(h]”h ]”Œp”ah"]”h$]”h&]”uh1j%&hj›%ubj %)�”}”(hj£%h]”hŒconst”…”�”}”(hj5&h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hj›%ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjB&h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj›%ubj{%)�”}”(hŒattr”h]”hŒattr”…”�”}”(hjP&h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hj›%ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j™%hj•%ubjš%)�”}”(hŒconst size_t size”h]”(j %)�”}”(hj£%h]”hŒconst”…”�”}”(hji&h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hje&ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjv&h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hje&ubh)�”}”(hhh]”j{%)�”}”(hŒsize_t”h]”hŒsize_t”…”�”}”(hj‡&h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hj„&ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”j³Œreftype”jó%Œ reftarget”j‰&Œmodname”NŒ classname”Nj÷%jú%)�”}”jý%]”j&Œc.sys_landlock_create_ruleset”†”asbuh1hhje&ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj¥&h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hje&ubj{%)�”}”(hŒsize”h]”hŒsize”…”�”}”(hj³&h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hje&ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j™%hj•%ubjš%)�”}”(hŒconst __u32 flags”h]”(j %)�”}”(hj£%h]”hŒconst”…”�”}”(hjÌ&h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hjÈ&ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjÙ&h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjÈ&ubh)�”}”(hhh]”j{%)�”}”(hŒ__u32”h]”hŒ__u32”…”�”}”(hjê&h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjç&ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”j³Œreftype”jó%Œ reftarget”jì&Œmodname”NŒ classname”Nj÷%jú%)�”}”jý%]”j&Œc.sys_landlock_create_ruleset”†”asbuh1hhjÈ&ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjÈ&ubj{%)�”}”(hŒflags”h]”hŒflags”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjÈ&ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j™%hj•%ubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j“%hjM%h²hh³jb%h´KÅubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒ add_permalink”ˆuh1jK%Œsphinx_line_type”Œ declarator”hjG%h²hh³jb%h´KÅubah}”(h]”j>%ah ]”(Œsig”Œ sig-object”eh"]”h$]”h&]”Œ is_multiline”ˆŒ _toc_parts”)Œ _toc_name”huh1jE%h³jb%h´KÅhjB%h²hubhŒ desc_content”“”)�”}”(hhh]”j()�”}”(hŒCreate a new ruleset”h]”hŒCreate a new ruleset”…”�”}”(hjJ'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÅhjG'h²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jE'hjB%h²hh³jb%h´KÅubeh}”(h]”h ]”(j³Œfunction”eh"]”h$]”h&]”Œdomain”j³Œobjtype”jb'Œdesctype”jb'Œnoindex”‰Œ noindexentry”‰Œnocontentsentry”‰uh1j@%h²hhj%h³Nh´NubhŒ container”“”)�”}”(hX**Parameters** ``const struct landlock_ruleset_attr __user *const attr`` Pointer to a :c:type:`struct landlock_ruleset_attr ` identifying the scope of the new ruleset. ``const size_t size`` Size of the pointed :c:type:`struct landlock_ruleset_attr ` (needed for backward and forward compatibility). ``const __u32 flags`` Supported values: **Description** - ``LANDLOCK_CREATE_RULESET_VERSION`` - ``LANDLOCK_CREATE_RULESET_ERRATA`` This system call enables to create a new Landlock ruleset. If ``LANDLOCK_CREATE_RULESET_VERSION`` or ``LANDLOCK_CREATE_RULESET_ERRATA`` is set, then **attr** must be NULL and **size** must be 0. - ``EOPNOTSUPP``: Landlock is supported by the kernel but disabled at boot time; - ``EINVAL``: unknown **flags**, access, scope, or permission, or too small **size**; - ``EINVAL``: quiet_access_fs, quiet_access_net, or quiet_scoped is not a subset of the corresponding handled_access_fs, handled_access_net, or scoped; - ``E2BIG``: **attr** or **size** inconsistencies; - ``EFAULT``: **attr** or **size** inconsistencies; - ``ENOMSG``: all handled access, scope, and permission fields are empty. .. kernel-doc:: include/uapi/linux/landlock.h :identifiers: landlock_create_ruleset_flags **Return** The ruleset file descriptor on success, the Landlock ABI version if ``LANDLOCK_CREATE_RULESET_VERSION`` is set, the errata value if ``LANDLOCK_CREATE_RULESET_ERRATA`` is set, or -errno on failure. Possible returned errors are:”•yh]”(j()�”}”(hŒ**Parameters**”h]”j|)�”}”(hjt'h]”hŒ Parameters”…”�”}”(hjv'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjr'ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÉhjn'ubj")�”}”(hhh]”(j')�”}”(hŒ°``const struct landlock_ruleset_attr __user *const attr`` Pointer to a :c:type:`struct landlock_ruleset_attr ` identifying the scope of the new ruleset. ”h]”(j-)�”}”(hŒ9``const struct landlock_ruleset_attr __user *const attr``”h]”jŽ)�”}”(hj“'h]”hŒ5const struct landlock_ruleset_attr __user *const attr”…”�”}”(hj•'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj‘'ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÈhj�'ubj=)�”}”(hhh]”j()�”}”(hŒuPointer to a :c:type:`struct landlock_ruleset_attr ` identifying the scope of the new ruleset.”h]”(hŒ Pointer to a ”…”�”}”(hj¬'h²hh³Nh´Nubh)�”}”(hŒ>:c:type:`struct landlock_ruleset_attr `”h]”jŽ)�”}”(hj¶'h]”hŒstruct landlock_ruleset_attr”…”�”}”(hj¸'h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hj´'ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jú%)�”}”jý%]”sbjÄŒlandlock_ruleset_attr”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÇhj¬'ubhŒ* identifying the scope of the new ruleset.”…”�”}”(hj¬'h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³jÖ'h´KÇhj©'ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj�'ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j¨'h´KÈhjŠ'ubj')�”}”(hŒš``const size_t size`` Size of the pointed :c:type:`struct landlock_ruleset_attr ` (needed for backward and forward compatibility). ”h]”(j-)�”}”(hŒ``const size_t size``”h]”jŽ)�”}”(hjó'h]”hŒconst size_t size”…”�”}”(hjõ'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjñ'ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÊhjí'ubj=)�”}”(hhh]”j()�”}”(hŒƒSize of the pointed :c:type:`struct landlock_ruleset_attr ` (needed for backward and forward compatibility).”h]”(hŒSize of the pointed ”…”�”}”(hj (h²hh³Nh´Nubh)�”}”(hŒ>:c:type:`struct landlock_ruleset_attr `”h]”jŽ)�”}”(hj(h]”hŒstruct landlock_ruleset_attr”…”�”}”(hj(h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hj(ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_ruleset_attr”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÉhj (ubhŒ1 (needed for backward and forward compatibility).”…”�”}”(hj (h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j3(h´KÉhj (ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjí'ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j(h´KÊhjŠ'ubj')�”}”(hŒ(``const __u32 flags`` Supported values: ”h]”(j-)�”}”(hŒ``const __u32 flags``”h]”jŽ)�”}”(hjP(h]”hŒconst __u32 flags”…”�”}”(hjR(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjN(ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KËhjJ(ubj=)�”}”(hhh]”j()�”}”(hŒSupported values:”h]”hŒSupported values:”…”�”}”(hji(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³je(h´KËhjf(ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjJ(ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³je(h´KËhjŠ'ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hjn'ubj()�”}”(hŒ**Description**”h]”j|)�”}”(hj‹(h]”hŒ Description”…”�”}”(hj�(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj‰(ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÍhjn'ubhŒ block_quote”“”)�”}”(hŒK- ``LANDLOCK_CREATE_RULESET_VERSION`` - ``LANDLOCK_CREATE_RULESET_ERRATA`` ”h]”jb)�”}”(hhh]”(jg)�”}”(hŒ#``LANDLOCK_CREATE_RULESET_VERSION``”h]”j()�”}”(hj¬(h]”jŽ)�”}”(hj¬(h]”hŒLANDLOCK_CREATE_RULESET_VERSION”…”�”}”(hj±(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj®(ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÌhjª(ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj§(ubjg)�”}”(hŒ#``LANDLOCK_CREATE_RULESET_ERRATA`` ”h]”j()�”}”(hŒ"``LANDLOCK_CREATE_RULESET_ERRATA``”h]”jŽ)�”}”(hjÑ(h]”hŒLANDLOCK_CREATE_RULESET_ERRATA”…”�”}”(hjÓ(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÏ(ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÍhjË(ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj§(ubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³jÄ(h´KÌhj£(ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¡(h³jÄ(h´KÌhjn'ubj()�”}”(hŒ:This system call enables to create a new Landlock ruleset.”h]”hŒ:This system call enables to create a new Landlock ruleset.”…”�”}”(hjù(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÏhjn'ubj()�”}”(hŒ‡If ``LANDLOCK_CREATE_RULESET_VERSION`` or ``LANDLOCK_CREATE_RULESET_ERRATA`` is set, then **attr** must be NULL and **size** must be 0.”h]”(hŒIf ”…”�”}”(hj)h²hh³Nh´NubjŽ)�”}”(hŒ#``LANDLOCK_CREATE_RULESET_VERSION``”h]”hŒLANDLOCK_CREATE_RULESET_VERSION”…”�”}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj)ubhŒ or ”…”�”}”(hj)h²hh³Nh´NubjŽ)�”}”(hŒ"``LANDLOCK_CREATE_RULESET_ERRATA``”h]”hŒLANDLOCK_CREATE_RULESET_ERRATA”…”�”}”(hj")h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj)ubhŒ is set, then ”…”�”}”(hj)h²hh³Nh´Nubj|)�”}”(hŒ**attr**”h]”hŒattr”…”�”}”(hj4)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj)ubhŒ must be NULL and ”…”�”}”(hj)h²hh³Nh´Nubj|)�”}”(hŒ**size**”h]”hŒsize”…”�”}”(hjF)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj)ubhŒ must be 0.”…”�”}”(hj)h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÑhjn'ubjb)�”}”(hhh]”(jg)�”}”(hŒN``EOPNOTSUPP``: Landlock is supported by the kernel but disabled at boot time;”h]”j()�”}”(hjd)h]”(jŽ)�”}”(hŒ``EOPNOTSUPP``”h]”hŒ EOPNOTSUPP”…”�”}”(hji)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjf)ubhŒ@: Landlock is supported by the kernel but disabled at boot time;”…”�”}”(hjf)h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÕhjb)ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj_)ubjg)�”}”(hŒS``EINVAL``: unknown **flags**, access, scope, or permission, or too small **size**;”h]”j()�”}”(hjŠ)h]”(jŽ)�”}”(hŒ ``EINVAL``”h]”hŒEINVAL”…”�”}”(hj�)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjŒ)ubhŒ : unknown ”…”�”}”(hjŒ)h²hh³Nh´Nubj|)�”}”(hŒ **flags**”h]”hŒflags”…”�”}”(hj¡)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjŒ)ubhŒ-, access, scope, or permission, or too small ”…”�”}”(hjŒ)h²hh³Nh´Nubj|)�”}”(hŒ**size**”h]”hŒsize”…”�”}”(hj³)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjŒ)ubhŒ;”…”�”}”(hjŒ)h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÖhjˆ)ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj_)ubjg)�”}”(hŒ•``EINVAL``: quiet_access_fs, quiet_access_net, or quiet_scoped is not a subset of the corresponding handled_access_fs, handled_access_net, or scoped;”h]”j()�”}”(hŒ•``EINVAL``: quiet_access_fs, quiet_access_net, or quiet_scoped is not a subset of the corresponding handled_access_fs, handled_access_net, or scoped;”h]”(jŽ)�”}”(hŒ ``EINVAL``”h]”hŒEINVAL”…”�”}”(hjÚ)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÖ)ubhŒ‹: quiet_access_fs, quiet_access_net, or quiet_scoped is not a subset of the corresponding handled_access_fs, handled_access_net, or scoped;”…”�”}”(hjÖ)h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´K×hjÒ)ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj_)ubjg)�”}”(hŒ0``E2BIG``: **attr** or **size** inconsistencies;”h]”j()�”}”(hjû)h]”(jŽ)�”}”(hŒ ``E2BIG``”h]”hŒE2BIG”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjý)ubhŒ: ”…”�”}”(hjý)h²hh³Nh´Nubj|)�”}”(hŒ**attr**”h]”hŒattr”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjý)ubhŒ or ”…”�”}”(hjý)h²hh³Nh´Nubj|)�”}”(hŒ**size**”h]”hŒsize”…”�”}”(hj$*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjý)ubhŒ inconsistencies;”…”�”}”(hjý)h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÚhjù)ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj_)ubjg)�”}”(hŒ1``EFAULT``: **attr** or **size** inconsistencies;”h]”j()�”}”(hjE*h]”(jŽ)�”}”(hŒ ``EFAULT``”h]”hŒEFAULT”…”�”}”(hjJ*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjG*ubhŒ: ”…”�”}”(hjG*h²hh³Nh´Nubj|)�”}”(hŒ**attr**”h]”hŒattr”…”�”}”(hj\*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjG*ubhŒ or ”…”�”}”(hjG*h²hh³Nh´Nubj|)�”}”(hŒ**size**”h]”hŒsize”…”�”}”(hjn*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjG*ubhŒ inconsistencies;”…”�”}”(hjG*h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÛhjC*ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj_)ubjg)�”}”(hŒH``ENOMSG``: all handled access, scope, and permission fields are empty. ”h]”j()�”}”(hŒG``ENOMSG``: all handled access, scope, and permission fields are empty.”h]”(jŽ)�”}”(hŒ ``ENOMSG``”h]”hŒENOMSG”…”�”}”(hj•*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj‘*ubhŒ=: all handled access, scope, and permission fields are empty.”…”�”}”(hj‘*h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÜhj�*ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj_)ubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³j�)h´KÕhjn'ubj()�”}”(hŒ **Flags**”h]”j|)�”}”(hj¼*h]”hŒFlags”…”�”}”(hj¾*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjº*ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:40: ./include/uapi/linux/landlock.h”h´KZhjn'ubj")�”}”(hhh]”(j')�”}”(hŒd``LANDLOCK_CREATE_RULESET_VERSION`` Get the highest supported Landlock ABI version (starting at 1). ”h]”(j-)�”}”(hŒ#``LANDLOCK_CREATE_RULESET_VERSION``”h]”jŽ)�”}”(hjÛ*h]”hŒLANDLOCK_CREATE_RULESET_VERSION”…”�”}”(hjÝ*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÙ*ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:40: ./include/uapi/linux/landlock.h”h´K]hjÕ*ubj=)�”}”(hhh]”j()�”}”(hŒ?Get the highest supported Landlock ABI version (starting at 1).”h]”hŒ?Get the highest supported Landlock ABI version (starting at 1).”…”�”}”(hjô*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³jð*h´K]hjñ*ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjÕ*ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jð*h´K]hjÒ*ubj')�”}”(hŒh``LANDLOCK_CREATE_RULESET_ERRATA`` Get a bitmask of fixed issues for the current Landlock ABI version. ”h]”(j-)�”}”(hŒ"``LANDLOCK_CREATE_RULESET_ERRATA``”h]”jŽ)�”}”(hj+h]”hŒLANDLOCK_CREATE_RULESET_ERRATA”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:40: ./include/uapi/linux/landlock.h”h´Kahj+ubj=)�”}”(hhh]”j()�”}”(hŒCGet a bitmask of fixed issues for the current Landlock ABI version.”h]”hŒCGet a bitmask of fixed issues for the current Landlock ABI version.”…”�”}”(hj-+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:40: ./include/uapi/linux/landlock.h”h´K`hj*+ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj+ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j)+h´KahjÒ*ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hjn'ubj()�”}”(hŒ **Return**”h]”j|)�”}”(hjP+h]”hŒReturn”…”�”}”(hjR+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjN+ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´Káhjn'ubj()�”}”(hŒãThe ruleset file descriptor on success, the Landlock ABI version if ``LANDLOCK_CREATE_RULESET_VERSION`` is set, the errata value if ``LANDLOCK_CREATE_RULESET_ERRATA`` is set, or -errno on failure. Possible returned errors are:”h]”(hŒDThe ruleset file descriptor on success, the Landlock ABI version if ”…”�”}”(hjf+h²hh³Nh´NubjŽ)�”}”(hŒ#``LANDLOCK_CREATE_RULESET_VERSION``”h]”hŒLANDLOCK_CREATE_RULESET_VERSION”…”�”}”(hjn+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjf+ubhŒ is set, the errata value if ”…”�”}”(hjf+h²hh³Nh´NubjŽ)�”}”(hŒ"``LANDLOCK_CREATE_RULESET_ERRATA``”h]”hŒLANDLOCK_CREATE_RULESET_ERRATA”…”�”}”(hj€+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjf+ubhŒ= is set, or -errno on failure. Possible returned errors are:”…”�”}”(hjf+h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:817: ./security/landlock/syscalls.c”h´KÕhjn'ubeh}”(h]”h ]”Œ kernelindent”ah"]”h$]”h&]”uh1jl'hj%h²hh³Nh´Nubj0%)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j<%Œ landlock_ruleset_attr (C struct)”Œc.landlock_ruleset_attr”hNt”auh1j/%hj%h²hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´NubjA%)�”}”(hhh]”(jF%)�”}”(hŒlandlock_ruleset_attr”h]”jL%)�”}”(hŒstruct landlock_ruleset_attr”h]”(j %)�”}”(hjÀ%h]”hŒstruct”…”�”}”(hjº+h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hj¶+h²hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´Kubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjÈ+h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj¶+h²hh³jÇ+h´Kubju%)�”}”(hŒlandlock_ruleset_attr”h]”j{%)�”}”(hj´+h]”hŒlandlock_ruleset_attr”…”�”}”(hjÚ+h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjÖ+ubah}”(h]”h ]”(jŽ%j�%eh"]”h$]”h&]”hÅhÆuh1jt%hj¶+h²hh³jÇ+h´Kubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆj7'ˆuh1jK%j8'j9'hj²+h²hh³jÇ+h´Kubah}”(h]”j¬+ah ]”(j='j>'eh"]”h$]”h&]”jB'ˆjC')jD'huh1jE%h³jÇ+h´Khj¯+h²hubjF')�”}”(hhh]”j()�”}”(hŒRuleset definition.”h]”hŒRuleset definition.”…”�”}”(hjü+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´Khjù+h²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jE'hj¯+h²hh³jÇ+h´Kubeh}”(h]”h ]”(j³Œstruct”eh"]”h$]”h&]”jf'j³jg'j,jh'j,ji'‰jj'‰jk'‰uh1j@%h²hhj%h³j®+h´Nubjm')�”}”(hXø**Definition**:: struct landlock_ruleset_attr { __u64 handled_access_fs; __u64 handled_access_net; __u64 scoped; __u64 quiet_access_fs; __u64 quiet_access_net; __u64 quiet_scoped; __u64 handled_permissions; }; **Members** ``handled_access_fs`` Bitmask of handled filesystem actions (cf. `Filesystem flags`_). ``handled_access_net`` Bitmask of handled network actions (cf. `Network flags`_). ``scoped`` Bitmask of scopes (cf. `Scope flags`_) restricting a Landlock domain from accessing outside resources (e.g. IPCs). ``quiet_access_fs`` Bitmask of filesystem actions which should not be submitted to audit if the per-object quiet flag is set. ``quiet_access_net`` Bitmask of network actions which should not be submitted to audit if the per-object quiet flag is set. ``quiet_scoped`` Bitmask of scoped actions which should not be submitted to audit. ``handled_permissions`` Bitmask of handled permissions (cf. `Permission flags`_).”h]”(j()�”}”(hŒ**Definition**::”h]”(j|)�”}”(hŒ**Definition**”h]”hŒ Definition”…”�”}”(hj ,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj,ubhŒ:”…”�”}”(hj,h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´Khj,ubj¢)�”}”(hŒÜstruct landlock_ruleset_attr { __u64 handled_access_fs; __u64 handled_access_net; __u64 scoped; __u64 quiet_access_fs; __u64 quiet_access_net; __u64 quiet_scoped; __u64 handled_permissions; };”h]”hŒÜstruct landlock_ruleset_attr { __u64 handled_access_fs; __u64 handled_access_net; __u64 scoped; __u64 quiet_access_fs; __u64 quiet_access_net; __u64 quiet_scoped; __u64 handled_permissions; };”…”�”}”hj9,sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j¡h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´Khj,ubj()�”}”(hŒ **Members**”h]”j|)�”}”(hjJ,h]”hŒMembers”…”�”}”(hjL,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjH,ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´K hj,ubj")�”}”(hhh]”(j')�”}”(hŒW``handled_access_fs`` Bitmask of handled filesystem actions (cf. `Filesystem flags`_). ”h]”(j-)�”}”(hŒ``handled_access_fs``”h]”jŽ)�”}”(hji,h]”hŒhandled_access_fs”…”�”}”(hjk,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjg,ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´K6hjc,ubj=)�”}”(hhh]”j()�”}”(hŒ@Bitmask of handled filesystem actions (cf. `Filesystem flags`_).”h]”(hŒ+Bitmask of handled filesystem actions (cf. ”…”�”}”(hj‚,h²hh³Nh´Nubj5)�”}”(hŒ`Filesystem flags`_”h]”hŒFilesystem flags”…”�”}”(hjŠ,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒFilesystem flags”jFj9!uh1j4hj‚,jHKubhŒ).”…”�”}”(hj‚,h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´K5hj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjc,ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j~,h´K6hj`,ubj')�”}”(hŒR``handled_access_net`` Bitmask of handled network actions (cf. `Network flags`_). ”h]”(j-)�”}”(hŒ``handled_access_net``”h]”jŽ)�”}”(hj·,h]”hŒhandled_access_net”…”�”}”(hj¹,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjµ,ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´K;hj±,ubj=)�”}”(hhh]”j()�”}”(hŒ:Bitmask of handled network actions (cf. `Network flags`_).”h]”(hŒ(Bitmask of handled network actions (cf. ”…”�”}”(hjÐ,h²hh³Nh´Nubj5)�”}”(hŒ`Network flags`_”h]”hŒ Network flags”…”�”}”(hjØ,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ Network flags”jFjI#uh1j4hjÐ,jHKubhŒ).”…”�”}”(hjÐ,h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´K:hjÍ,ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj±,ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jÌ,h´K;hj`,ubj')�”}”(hŒ~``scoped`` Bitmask of scopes (cf. `Scope flags`_) restricting a Landlock domain from accessing outside resources (e.g. IPCs). ”h]”(j-)�”}”(hŒ ``scoped``”h]”jŽ)�”}”(hj-h]”hŒscoped”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj-ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´KAhjÿ,ubj=)�”}”(hhh]”j()�”}”(hŒrBitmask of scopes (cf. `Scope flags`_) restricting a Landlock domain from accessing outside resources (e.g. IPCs).”h]”(hŒBitmask of scopes (cf. ”…”�”}”(hj-h²hh³Nh´Nubj5)�”}”(hŒ`Scope flags`_”h]”hŒ Scope flags”…”�”}”(hj&-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ Scope flags”jFjæ#uh1j4hj-jHKubhŒM) restricting a Landlock domain from accessing outside resources (e.g. IPCs).”…”�”}”(hj-h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´K?hj-ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjÿ,ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j-h´KAhj`,ubj')�”}”(hŒ~``quiet_access_fs`` Bitmask of filesystem actions which should not be submitted to audit if the per-object quiet flag is set. ”h]”(j-)�”}”(hŒ``quiet_access_fs``”h]”jŽ)�”}”(hjS-h]”hŒquiet_access_fs”…”�”}”(hjU-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjQ-ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´KFhjM-ubj=)�”}”(hhh]”j()�”}”(hŒiBitmask of filesystem actions which should not be submitted to audit if the per-object quiet flag is set.”h]”hŒiBitmask of filesystem actions which should not be submitted to audit if the per-object quiet flag is set.”…”�”}”(hjl-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´KEhji-ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjM-ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jh-h´KFhj`,ubj')�”}”(hŒ|``quiet_access_net`` Bitmask of network actions which should not be submitted to audit if the per-object quiet flag is set. ”h]”(j-)�”}”(hŒ``quiet_access_net``”h]”jŽ)�”}”(hj�-h]”hŒquiet_access_net”…”�”}”(hj�-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj‹-ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´KKhj‡-ubj=)�”}”(hhh]”j()�”}”(hŒfBitmask of network actions which should not be submitted to audit if the per-object quiet flag is set.”h]”hŒfBitmask of network actions which should not be submitted to audit if the per-object quiet flag is set.”…”�”}”(hj¦-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´KJhj£-ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj‡-ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j¢-h´KKhj`,ubj')�”}”(hŒS``quiet_scoped`` Bitmask of scoped actions which should not be submitted to audit. ”h]”(j-)�”}”(hŒ``quiet_scoped``”h]”jŽ)�”}”(hjÇ-h]”hŒ quiet_scoped”…”�”}”(hjÉ-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÅ-ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´KPhjÁ-ubj=)�”}”(hhh]”j()�”}”(hŒABitmask of scoped actions which should not be submitted to audit.”h]”hŒABitmask of scoped actions which should not be submitted to audit.”…”�”}”(hjà-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´KOhjÝ-ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjÁ-ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jÜ-h´KPhj`,ubj')�”}”(hŒQ``handled_permissions`` Bitmask of handled permissions (cf. `Permission flags`_).”h]”(j-)�”}”(hŒ``handled_permissions``”h]”jŽ)�”}”(hj.h]”hŒhandled_permissions”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÿ-ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´KThjû-ubj=)�”}”(hhh]”j()�”}”(hŒ9Bitmask of handled permissions (cf. `Permission flags`_).”h]”(hŒ$Bitmask of handled permissions (cf. ”…”�”}”(hj.h²hh³Nh´Nubj5)�”}”(hŒ`Permission flags`_”h]”hŒPermission flags”…”�”}”(hj".h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒPermission flags”jFj%uh1j4hj.jHKubhŒ).”…”�”}”(hj.h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j.h´KThj.ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjû-ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j.h´KThj`,ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hj,ubeh}”(h]”h ]”Œ kernelindent”ah"]”h$]”h&]”uh1jl'hj%h²hh³j®+h´Nubj()�”}”(hŒ**Description**”h]”j|)�”}”(hjW.h]”hŒ Description”…”�”}”(hjY.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjU.ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´KXhj%h²hubj()�”}”(hŒ*Argument of sys_landlock_create_ruleset().”h]”hŒ*Argument of sys_landlock_create_ruleset().”…”�”}”(hjm.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´Khj%h²hubj()�”}”(hX#This structure defines a set of *handled access rights*, a set of actions on different object types, which should be denied by default when the ruleset is enacted. Vice versa, access rights that are not specifically listed here are not going to be denied by this ruleset when it is enacted.”h]”(hŒ This structure defines a set of ”…”�”}”(hj|.h²hh³Nh´Nubj| )�”}”(hŒ*handled access rights*”h]”hŒhandled access rights”…”�”}”(hj„.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{ hj|.ubhŒì, a set of actions on different object types, which should be denied by default when the ruleset is enacted. Vice versa, access rights that are not specifically listed here are not going to be denied by this ruleset when it is enacted.”…”�”}”(hj|.h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´Khj%h²hubj()�”}”(hXFor historical reasons, the ``LANDLOCK_ACCESS_FS_REFER`` right is always denied by default, even when its bit is not set in **handled_access_fs**. In order to add new rules with this access right, the bit must still be set explicitly (cf. `Filesystem flags`_).”h]”(hŒFor historical reasons, the ”…”�”}”(hj�.h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_REFER``”h]”hŒLANDLOCK_ACCESS_FS_REFER”…”�”}”(hj¥.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj�.ubhŒD right is always denied by default, even when its bit is not set in ”…”�”}”(hj�.h²hh³Nh´Nubj|)�”}”(hŒ**handled_access_fs**”h]”hŒhandled_access_fs”…”�”}”(hj·.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj�.ubhŒ_. In order to add new rules with this access right, the bit must still be set explicitly (cf. ”…”�”}”(hj�.h²hh³Nh´Nubj5)�”}”(hŒ`Filesystem flags`_”h]”hŒFilesystem flags”…”�”}”(hjÉ.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒFilesystem flags”jFj9!uh1j4hj�.jHKubhŒ).”…”�”}”(hj�.h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´Khj%h²hubj()�”}”(hX&The explicit listing of *handled access rights* is required for backwards compatibility reasons. In most use cases, processes that use Landlock will *handle* a wide range or all access rights that they know about at build time (and that they have tested with a kernel that supported them all).”h]”(hŒThe explicit listing of ”…”�”}”(hjä.h²hh³Nh´Nubj| )�”}”(hŒ*handled access rights*”h]”hŒhandled access rights”…”�”}”(hjì.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{ hjä.ubhŒg is required for backwards compatibility reasons. In most use cases, processes that use Landlock will ”…”�”}”(hjä.h²hh³Nh´Nubj| )�”}”(hŒ*handle*”h]”hŒhandle”…”�”}”(hjþ.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{ hjä.ubhŒˆ a wide range or all access rights that they know about at build time (and that they have tested with a kernel that supported them all).”…”�”}”(hjä.h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´Khj%h²hubj()�”}”(hX~**quiet_access_fs** and **quiet_access_net** are bitmasks of actions for which a denial by this layer will not trigger an audit record if the corresponding object (or its children, for filesystem rules) is marked with the "quiet" bit via ``LANDLOCK_ADD_RULE_QUIET``, even if logging would normally take place per landlock_restrict_self() flags. **quiet_scoped** is similar, except that it does not require marking any objects as quiet - if the ruleset is created with any bits set in **quiet_scoped**, then denial of such scoped resources will not trigger an audit record. These three fields are available since Landlock ABI version 10.”h]”(j|)�”}”(hŒ**quiet_access_fs**”h]”hŒquiet_access_fs”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj/ubhŒ and ”…”�”}”(hj/h²hh³Nh´Nubj|)�”}”(hŒ**quiet_access_net**”h]”hŒquiet_access_net”…”�”}”(hj-/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj/ubhŒÆ are bitmasks of actions for which a denial by this layer will not trigger an audit record if the corresponding object (or its children, for filesystem rules) is marked with the “quietâ€� bit via ”…”�”}”(hj/h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ADD_RULE_QUIET``”h]”hŒLANDLOCK_ADD_RULE_QUIET”…”�”}”(hj?/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj/ubhŒQ, even if logging would normally take place per landlock_restrict_self() flags. ”…”�”}”(hj/h²hh³Nh´Nubj|)�”}”(hŒ**quiet_scoped**”h]”hŒ quiet_scoped”…”�”}”(hjQ/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj/ubhŒ{ is similar, except that it does not require marking any objects as quiet - if the ruleset is created with any bits set in ”…”�”}”(hj/h²hh³Nh´Nubj|)�”}”(hŒ**quiet_scoped**”h]”hŒ quiet_scoped”…”�”}”(hjc/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj/ubhŒ‰, then denial of such scoped resources will not trigger an audit record. These three fields are available since Landlock ABI version 10.”…”�”}”(hj/h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´K"hj%h²hubj()�”}”(hŒ�**quiet_access_fs**, **quiet_access_net** and **quiet_scoped** must be a subset of **handled_access_fs**, **handled_access_net** and **scoped** respectively.”h]”(j|)�”}”(hŒ**quiet_access_fs**”h]”hŒquiet_access_fs”…”�”}”(hj€/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj|/ubhŒ, ”…”�”}”(hj|/h²hh³Nh´Nubj|)�”}”(hŒ**quiet_access_net**”h]”hŒquiet_access_net”…”�”}”(hj’/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj|/ubhŒ and ”…”�”}”(hj|/h²hh³Nh´Nubj|)�”}”(hŒ**quiet_scoped**”h]”hŒ quiet_scoped”…”�”}”(hj¤/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj|/ubhŒ must be a subset of ”…”�”}”(hj|/h²hh³Nh´Nubj|)�”}”(hŒ**handled_access_fs**”h]”hŒhandled_access_fs”…”�”}”(hj¶/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj|/ubhŒ, ”…”�”}”hj|/sbj|)�”}”(hŒ**handled_access_net**”h]”hŒhandled_access_net”…”�”}”(hjÈ/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj|/ubhŒ and ”…”�”}”hj|/sbj|)�”}”(hŒ **scoped**”h]”hŒscoped”…”�”}”(hjÚ/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj|/ubhŒ respectively.”…”�”}”(hj|/h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´K,hj%h²hubj()�”}”(hŒ4This structure can grow in future Landlock versions.”h]”hŒ4This structure can grow in future Landlock versions.”…”�”}”(hjó/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:820: ./include/uapi/linux/landlock.h”h´K/hj%h²hubeh}”(h]”Œcreating-a-new-ruleset”ah ]”h"]”Œcreating a new ruleset”ah$]”h&]”uh1hòhjih²hh³hÇh´M/ubhó)�”}”(hhh]”(hø)�”}”(hŒExtending a ruleset”h]”hŒExtending a ruleset”…”�”}”(hj 0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj 0h²hh³hÇh´M8ubj0%)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j<%Œ"sys_landlock_add_rule (C function)”Œc.sys_landlock_add_rule”hNt”auh1j/%hj 0h²hh³Nh´NubjA%)�”}”(hhh]”(jF%)�”}”(hŒ‘long sys_landlock_add_rule (const int ruleset_fd, const enum landlock_rule_type rule_type, const void __user *const rule_attr, const __u32 flags)”h]”jL%)�”}”(hŒ�long sys_landlock_add_rule(const int ruleset_fd, const enum landlock_rule_type rule_type, const void __user *const rule_attr, const __u32 flags)”h]”(jR%)�”}”(hŒlong”h]”hŒlong”…”�”}”(hj40h²hh³Nh´Nubah}”(h]”h ]”j^%ah"]”h$]”h&]”uh1jQ%hj00h²hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Meubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjC0h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj00h²hh³jB0h´Meubju%)�”}”(hŒsys_landlock_add_rule”h]”j{%)�”}”(hŒsys_landlock_add_rule”h]”hŒsys_landlock_add_rule”…”�”}”(hjU0h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjQ0ubah}”(h]”h ]”(jŽ%j�%eh"]”h$]”h&]”hÅhÆuh1jt%hj00h²hh³jB0h´Meubj”%)�”}”(hŒv(const int ruleset_fd, const enum landlock_rule_type rule_type, const void __user *const rule_attr, const __u32 flags)”h]”(jš%)�”}”(hŒconst int ruleset_fd”h]”(j %)�”}”(hj£%h]”hŒconst”…”�”}”(hjq0h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hjm0ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj~0h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjm0ubjR%)�”}”(hŒint”h]”hŒint”…”�”}”(hjŒ0h²hh³Nh´Nubah}”(h]”h ]”j^%ah"]”h$]”h&]”uh1jQ%hjm0ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjš0h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjm0ubj{%)�”}”(hŒ ruleset_fd”h]”hŒ ruleset_fd”…”�”}”(hj¨0h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjm0ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j™%hji0ubjš%)�”}”(hŒ'const enum landlock_rule_type rule_type”h]”(j %)�”}”(hj£%h]”hŒconst”…”�”}”(hjÁ0h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hj½0ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjÎ0h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj½0ubj %)�”}”(hŒenum”h]”hŒenum”…”�”}”(hjÜ0h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hj½0ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjê0h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj½0ubh)�”}”(hhh]”j{%)�”}”(hŒlandlock_rule_type”h]”hŒlandlock_rule_type”…”�”}”(hjû0h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjø0ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”j³Œreftype”jó%Œ reftarget”jý0Œmodname”NŒ classname”Nj÷%jú%)�”}”jý%]”j&)�”}”jó%jW0sbŒc.sys_landlock_add_rule”†”asbuh1hhj½0ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj½0ubj{%)�”}”(hŒ rule_type”h]”hŒ rule_type”…”�”}”(hj)1h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hj½0ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j™%hji0ubjš%)�”}”(hŒ"const void __user *const rule_attr”h]”(j %)�”}”(hj£%h]”hŒconst”…”�”}”(hjB1h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hj>1ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjO1h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj>1ubjR%)�”}”(hŒvoid”h]”hŒvoid”…”�”}”(hj]1h²hh³Nh´Nubah}”(h]”h ]”j^%ah"]”h$]”h&]”uh1jQ%hj>1ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjk1h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj>1ubhŒ__user”…”�”}”(hj>1h²hh³Nh´Nubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj}1h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj>1ubj&&)�”}”(hjõh]”hŒ*”…”�”}”(hj‹1h²hh³Nh´Nubah}”(h]”h ]”j1&ah"]”h$]”h&]”uh1j%&hj>1ubj %)�”}”(hj£%h]”hŒconst”…”�”}”(hj˜1h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hj>1ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj¥1h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj>1ubj{%)�”}”(hŒ rule_attr”h]”hŒ rule_attr”…”�”}”(hj³1h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hj>1ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j™%hji0ubjš%)�”}”(hŒconst __u32 flags”h]”(j %)�”}”(hj£%h]”hŒconst”…”�”}”(hjÌ1h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hjÈ1ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjÙ1h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjÈ1ubh)�”}”(hhh]”j{%)�”}”(hŒ__u32”h]”hŒ__u32”…”�”}”(hjê1h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjç1ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”j³Œreftype”jó%Œ reftarget”jì1Œmodname”NŒ classname”Nj÷%jú%)�”}”jý%]”j1Œc.sys_landlock_add_rule”†”asbuh1hhjÈ1ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjÈ1ubj{%)�”}”(hŒflags”h]”hŒflags”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjÈ1ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j™%hji0ubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j“%hj00h²hh³jB0h´Meubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆj7'ˆuh1jK%j8'j9'hj,0h²hh³jB0h´Meubah}”(h]”j'0ah ]”(j='j>'eh"]”h$]”h&]”jB'ˆjC')jD'huh1jE%h³jB0h´Mehj)0h²hubjF')�”}”(hhh]”j()�”}”(hŒAdd a new rule to a ruleset”h]”hŒAdd a new rule to a ruleset”…”�”}”(hj@2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mehj=2h²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jE'hj)0h²hh³jB0h´Meubeh}”(h]”h ]”(j³Œfunction”eh"]”h$]”h&]”jf'j³jg'jX2jh'jX2ji'‰jj'‰jk'‰uh1j@%h²hhj 0h³Nh´Nubjm')�”}”(hX¢ **Parameters** ``const int ruleset_fd`` File descriptor tied to the ruleset that should be extended with the new rule. ``const enum landlock_rule_type rule_type`` Identify the structure type pointed to by **rule_attr**: ``LANDLOCK_RULE_PATH_BENEATH``, ``LANDLOCK_RULE_NET_PORT``, ``LANDLOCK_RULE_NAMESPACE``, or ``LANDLOCK_RULE_CAPABILITY``. ``const void __user *const rule_attr`` Pointer to a rule (matching the **rule_type**). ``const __u32 flags`` Must be 0 or ``LANDLOCK_ADD_RULE_QUIET``. **Description** This system call enables to define a new rule and add it to an existing ruleset. - ``EOPNOTSUPP``: Landlock is supported by the kernel but disabled at boot time; - ``EAFNOSUPPORT``: **rule_type** is ``LANDLOCK_RULE_NET_PORT`` but TCP/IP is not supported by the running kernel; - ``EINVAL``: **flags** is not valid; - ``EINVAL``: The rule accesses are inconsistent (i.e. :c:type:`landlock_path_beneath_attr.allowed_access ` or :c:type:`landlock_net_port_attr.allowed_access ` is not a subset of the ruleset handled accesses) - ``EINVAL``: A nonzero :c:type:`landlock_namespace_attr.permissions ` is not ``LANDLOCK_PERMISSION_NAMESPACE_USE`` or is not handled by the ruleset; - ``EINVAL``: A nonzero :c:type:`landlock_capability_attr.permissions ` is not ``LANDLOCK_PERMISSION_CAPABILITY_USE`` or is not handled by the ruleset; - ``EINVAL``: :c:type:`landlock_net_port_attr.port ` is greater than 65535; - ``EINVAL``: LANDLOCK_ADD_RULE_QUIET is passed but the ruleset has no quiet access bits set for the corresponding rule type. - ``ENOMSG``: Empty accesses (e.g. :c:type:`landlock_path_beneath_attr.allowed_access ` is 0) and no flags; - ``ENOMSG``: :c:type:`landlock_namespace_attr.permissions ` is 0, or both :c:type:`landlock_namespace_attr.allowed_namespace_types ` and :c:type:`landlock_namespace_attr.quiet_namespace_types ` are 0; - ``ENOMSG``: :c:type:`landlock_capability_attr.permissions ` is 0, or both :c:type:`landlock_capability_attr.allowed_capabilities ` and :c:type:`landlock_capability_attr.quiet_capabilities ` are 0; - ``EBADF``: **ruleset_fd** is not a file descriptor for the current thread, or a member of **rule_attr** is not a file descriptor as expected; - ``EBADFD``: **ruleset_fd** is not a ruleset file descriptor, or a member of **rule_attr** is not the expected file descriptor type; - ``EPERM``: **ruleset_fd** has no write access to the underlying ruleset; - ``EFAULT``: **rule_attr** was not a valid address. .. kernel-doc:: include/uapi/linux/landlock.h :identifiers: landlock_add_rule_flags **Return** 0 on success, or -errno on failure. Possible returned errors are:”h]”(j()�”}”(hŒ**Parameters**”h]”j|)�”}”(hjb2h]”hŒ Parameters”…”�”}”(hjd2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj`2ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mihj\2ubj")�”}”(hhh]”(j')�”}”(hŒh``const int ruleset_fd`` File descriptor tied to the ruleset that should be extended with the new rule. ”h]”(j-)�”}”(hŒ``const int ruleset_fd``”h]”jŽ)�”}”(hj�2h]”hŒconst int ruleset_fd”…”�”}”(hjƒ2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj2ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mhhj{2ubj=)�”}”(hhh]”j()�”}”(hŒNFile descriptor tied to the ruleset that should be extended with the new rule.”h]”hŒNFile descriptor tied to the ruleset that should be extended with the new rule.”…”�”}”(hjš2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mghj—2ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj{2ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j–2h´Mhhjx2ubj')�”}”(hŒß``const enum landlock_rule_type rule_type`` Identify the structure type pointed to by **rule_attr**: ``LANDLOCK_RULE_PATH_BENEATH``, ``LANDLOCK_RULE_NET_PORT``, ``LANDLOCK_RULE_NAMESPACE``, or ``LANDLOCK_RULE_CAPABILITY``. ”h]”(j-)�”}”(hŒ+``const enum landlock_rule_type rule_type``”h]”jŽ)�”}”(hj»2h]”hŒ'const enum landlock_rule_type rule_type”…”�”}”(hj½2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¹2ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mkhjµ2ubj=)�”}”(hhh]”j()�”}”(hŒ²Identify the structure type pointed to by **rule_attr**: ``LANDLOCK_RULE_PATH_BENEATH``, ``LANDLOCK_RULE_NET_PORT``, ``LANDLOCK_RULE_NAMESPACE``, or ``LANDLOCK_RULE_CAPABILITY``.”h]”(hŒ*Identify the structure type pointed to by ”…”�”}”(hjÔ2h²hh³Nh´Nubj|)�”}”(hŒ **rule_attr**”h]”hŒ rule_attr”…”�”}”(hjÜ2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjÔ2ubhŒ: ”…”�”}”(hjÔ2h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_RULE_PATH_BENEATH``”h]”hŒLANDLOCK_RULE_PATH_BENEATH”…”�”}”(hjî2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÔ2ubhŒ, ”…”�”}”(hjÔ2h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_RULE_NET_PORT``”h]”hŒLANDLOCK_RULE_NET_PORT”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÔ2ubhŒ, ”…”�”}”(hjÔ2h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_RULE_NAMESPACE``”h]”hŒLANDLOCK_RULE_NAMESPACE”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÔ2ubhŒ, or ”…”�”}”(hjÔ2h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_RULE_CAPABILITY``”h]”hŒLANDLOCK_RULE_CAPABILITY”…”�”}”(hj$3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÔ2ubhŒ.”…”�”}”(hjÔ2h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´MihjÑ2ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjµ2ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jÐ2h´Mkhjx2ubj')�”}”(hŒW``const void __user *const rule_attr`` Pointer to a rule (matching the **rule_type**). ”h]”(j-)�”}”(hŒ&``const void __user *const rule_attr``”h]”jŽ)�”}”(hjO3h]”hŒ"const void __user *const rule_attr”…”�”}”(hjQ3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjM3ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´MlhjI3ubj=)�”}”(hhh]”j()�”}”(hŒ/Pointer to a rule (matching the **rule_type**).”h]”(hŒ Pointer to a rule (matching the ”…”�”}”(hjh3h²hh³Nh´Nubj|)�”}”(hŒ **rule_type**”h]”hŒ rule_type”…”�”}”(hjp3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjh3ubhŒ).”…”�”}”(hjh3h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³jd3h´Mlhje3ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjI3ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jd3h´Mlhjx2ubj')�”}”(hŒ@``const __u32 flags`` Must be 0 or ``LANDLOCK_ADD_RULE_QUIET``. ”h]”(j-)�”}”(hŒ``const __u32 flags``”h]”jŽ)�”}”(hjš3h]”hŒconst __u32 flags”…”�”}”(hjœ3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj˜3ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mmhj”3ubj=)�”}”(hhh]”j()�”}”(hŒ)Must be 0 or ``LANDLOCK_ADD_RULE_QUIET``.”h]”(hŒ Must be 0 or ”…”�”}”(hj³3h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ADD_RULE_QUIET``”h]”hŒLANDLOCK_ADD_RULE_QUIET”…”�”}”(hj»3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj³3ubhŒ.”…”�”}”(hj³3h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j¯3h´Mmhj°3ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj”3ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j¯3h´Mmhjx2ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hj\2ubj()�”}”(hŒ**Description**”h]”j|)�”}”(hjç3h]”hŒ Description”…”�”}”(hjé3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjå3ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mohj\2ubj()�”}”(hŒPThis system call enables to define a new rule and add it to an existing ruleset.”h]”hŒPThis system call enables to define a new rule and add it to an existing ruleset.”…”�”}”(hjý3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mnhj\2ubjb)�”}”(hhh]”(jg)�”}”(hŒN``EOPNOTSUPP``: Landlock is supported by the kernel but disabled at boot time;”h]”j()�”}”(hj4h]”(jŽ)�”}”(hŒ``EOPNOTSUPP``”h]”hŒ EOPNOTSUPP”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj4ubhŒ@: Landlock is supported by the kernel but disabled at boot time;”…”�”}”(hj4h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mrhj4ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hŒp``EAFNOSUPPORT``: **rule_type** is ``LANDLOCK_RULE_NET_PORT`` but TCP/IP is not supported by the running kernel;”h]”j()�”}”(hŒp``EAFNOSUPPORT``: **rule_type** is ``LANDLOCK_RULE_NET_PORT`` but TCP/IP is not supported by the running kernel;”h]”(jŽ)�”}”(hŒ``EAFNOSUPPORT``”h]”hŒ EAFNOSUPPORT”…”�”}”(hj=4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj94ubhŒ: ”…”�”}”(hj94h²hh³Nh´Nubj|)�”}”(hŒ **rule_type**”h]”hŒ rule_type”…”�”}”(hjO4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj94ubhŒ is ”…”�”}”(hj94h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_RULE_NET_PORT``”h]”hŒLANDLOCK_RULE_NET_PORT”…”�”}”(hja4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj94ubhŒ3 but TCP/IP is not supported by the running kernel;”…”�”}”(hj94h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mshj54ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hŒ#``EINVAL``: **flags** is not valid;”h]”j()�”}”(hj‚4h]”(jŽ)�”}”(hŒ ``EINVAL``”h]”hŒEINVAL”…”�”}”(hj‡4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj„4ubhŒ: ”…”�”}”(hj„4h²hh³Nh´Nubj|)�”}”(hŒ **flags**”h]”hŒflags”…”�”}”(hj™4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj„4ubhŒ is not valid;”…”�”}”(hj„4h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Muhj€4ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hX``EINVAL``: The rule accesses are inconsistent (i.e. :c:type:`landlock_path_beneath_attr.allowed_access ` or :c:type:`landlock_net_port_attr.allowed_access ` is not a subset of the ruleset handled accesses)”h]”j()�”}”(hX``EINVAL``: The rule accesses are inconsistent (i.e. :c:type:`landlock_path_beneath_attr.allowed_access ` or :c:type:`landlock_net_port_attr.allowed_access ` is not a subset of the ruleset handled accesses)”h]”(jŽ)�”}”(hŒ ``EINVAL``”h]”hŒEINVAL”…”�”}”(hjÀ4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¼4ubhŒ+: The rule accesses are inconsistent (i.e. ”…”�”}”(hj¼4h²hh³Nh´Nubh)�”}”(hŒP:c:type:`landlock_path_beneath_attr.allowed_access `”h]”jŽ)�”}”(hjÔ4h]”hŒ)landlock_path_beneath_attr.allowed_access”…”�”}”(hjÖ4h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hjÒ4ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_path_beneath_attr”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mvhj¼4ubhŒ or ”…”�”}”(hj¼4h²hh³Nh´Nubh)�”}”(hŒH:c:type:`landlock_net_port_attr.allowed_access `”h]”jŽ)�”}”(hjø4h]”hŒ%landlock_net_port_attr.allowed_access”…”�”}”(hjú4h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hjö4ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_net_port_attr”uh1hh³jñ4h´Mvhj¼4ubhŒ1 is not a subset of the ruleset handled accesses)”…”�”}”(hj¼4h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³jñ4h´Mvhj¸4ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hŒ¬``EINVAL``: A nonzero :c:type:`landlock_namespace_attr.permissions ` is not ``LANDLOCK_PERMISSION_NAMESPACE_USE`` or is not handled by the ruleset;”h]”j()�”}”(hŒ¬``EINVAL``: A nonzero :c:type:`landlock_namespace_attr.permissions ` is not ``LANDLOCK_PERMISSION_NAMESPACE_USE`` or is not handled by the ruleset;”h]”(jŽ)�”}”(hŒ ``EINVAL``”h]”hŒEINVAL”…”�”}”(hj-5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj)5ubhŒ : A nonzero ”…”�”}”(hj)5h²hh³Nh´Nubh)�”}”(hŒG:c:type:`landlock_namespace_attr.permissions `”h]”jŽ)�”}”(hjA5h]”hŒ#landlock_namespace_attr.permissions”…”�”}”(hjC5h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hj?5ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_namespace_attr”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mzhj)5ubhŒ is not ”…”�”}”(hj)5h²hh³Nh´NubjŽ)�”}”(hŒ%``LANDLOCK_PERMISSION_NAMESPACE_USE``”h]”hŒ!LANDLOCK_PERMISSION_NAMESPACE_USE”…”�”}”(hjc5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj)5ubhŒ" or is not handled by the ruleset;”…”�”}”(hj)5h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j^5h´Mzhj%5ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hŒ¯``EINVAL``: A nonzero :c:type:`landlock_capability_attr.permissions ` is not ``LANDLOCK_PERMISSION_CAPABILITY_USE`` or is not handled by the ruleset;”h]”j()�”}”(hŒ¯``EINVAL``: A nonzero :c:type:`landlock_capability_attr.permissions ` is not ``LANDLOCK_PERMISSION_CAPABILITY_USE`` or is not handled by the ruleset;”h]”(jŽ)�”}”(hŒ ``EINVAL``”h]”hŒEINVAL”…”�”}”(hj‰5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj…5ubhŒ : A nonzero ”…”�”}”(hj…5h²hh³Nh´Nubh)�”}”(hŒI:c:type:`landlock_capability_attr.permissions `”h]”jŽ)�”}”(hj�5h]”hŒ$landlock_capability_attr.permissions”…”�”}”(hjŸ5h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hj›5ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_capability_attr”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´M|hj…5ubhŒ is not ”…”�”}”(hj…5h²hh³Nh´NubjŽ)�”}”(hŒ&``LANDLOCK_PERMISSION_CAPABILITY_USE``”h]”hŒ"LANDLOCK_PERMISSION_CAPABILITY_USE”…”�”}”(hj¿5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj…5ubhŒ" or is not handled by the ruleset;”…”�”}”(hj…5h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³jº5h´M|hj�5ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hŒa``EINVAL``: :c:type:`landlock_net_port_attr.port ` is greater than 65535;”h]”j()�”}”(hjß5h]”(jŽ)�”}”(hŒ ``EINVAL``”h]”hŒEINVAL”…”�”}”(hjä5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjá5ubhŒ: ”…”�”}”(hjá5h²hh³Nh´Nubh)�”}”(hŒ>:c:type:`landlock_net_port_attr.port `”h]”jŽ)�”}”(hjø5h]”hŒlandlock_net_port_attr.port”…”�”}”(hjú5h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hjö5ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_net_port_attr”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´M~hjá5ubhŒ is greater than 65535;”…”�”}”(hjá5h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j6h´M~hjÝ5ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hŒ{``EINVAL``: LANDLOCK_ADD_RULE_QUIET is passed but the ruleset has no quiet access bits set for the corresponding rule type.”h]”j()�”}”(hŒ{``EINVAL``: LANDLOCK_ADD_RULE_QUIET is passed but the ruleset has no quiet access bits set for the corresponding rule type.”h]”(jŽ)�”}”(hŒ ``EINVAL``”h]”hŒEINVAL”…”�”}”(hj.6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj*6ubhŒq: LANDLOCK_ADD_RULE_QUIET is passed but the ruleset has no quiet access bits set for the corresponding rule type.”…”�”}”(hj*6h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mhj&6ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hŒ…``ENOMSG``: Empty accesses (e.g. :c:type:`landlock_path_beneath_attr.allowed_access ` is 0) and no flags;”h]”j()�”}”(hŒ…``ENOMSG``: Empty accesses (e.g. :c:type:`landlock_path_beneath_attr.allowed_access ` is 0) and no flags;”h]”(jŽ)�”}”(hŒ ``ENOMSG``”h]”hŒENOMSG”…”�”}”(hjU6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjQ6ubhŒ: Empty accesses (e.g. ”…”�”}”(hjQ6h²hh³Nh´Nubh)�”}”(hŒP:c:type:`landlock_path_beneath_attr.allowed_access `”h]”jŽ)�”}”(hji6h]”hŒ)landlock_path_beneath_attr.allowed_access”…”�”}”(hjk6h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hjg6ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_path_beneath_attr”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´M�hjQ6ubhŒ is 0) and no flags;”…”�”}”(hjQ6h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j†6h´M�hjM6ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hX``ENOMSG``: :c:type:`landlock_namespace_attr.permissions ` is 0, or both :c:type:`landlock_namespace_attr.allowed_namespace_types ` and :c:type:`landlock_namespace_attr.quiet_namespace_types ` are 0;”h]”j()�”}”(hX``ENOMSG``: :c:type:`landlock_namespace_attr.permissions ` is 0, or both :c:type:`landlock_namespace_attr.allowed_namespace_types ` and :c:type:`landlock_namespace_attr.quiet_namespace_types ` are 0;”h]”(jŽ)�”}”(hŒ ``ENOMSG``”h]”hŒENOMSG”…”�”}”(hjŸ6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj›6ubhŒ: ”…”�”}”(hj›6h²hh³Nh´Nubh)�”}”(hŒG:c:type:`landlock_namespace_attr.permissions `”h]”jŽ)�”}”(hj³6h]”hŒ#landlock_namespace_attr.permissions”…”�”}”(hjµ6h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hj±6ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_namespace_attr”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mƒhj›6ubhŒ is 0, or both ”…”�”}”(hj›6h²hh³Nh´Nubh)�”}”(hŒS:c:type:`landlock_namespace_attr.allowed_namespace_types `”h]”jŽ)�”}”(hj×6h]”hŒ/landlock_namespace_attr.allowed_namespace_types”…”�”}”(hjÙ6h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hjÕ6ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_namespace_attr”uh1hh³jÐ6h´Mƒhj›6ubhŒ and ”…”�”}”(hj›6h²hh³Nh´Nubh)�”}”(hŒQ:c:type:`landlock_namespace_attr.quiet_namespace_types `”h]”jŽ)�”}”(hjú6h]”hŒ-landlock_namespace_attr.quiet_namespace_types”…”�”}”(hjü6h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hjø6ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_namespace_attr”uh1hh³jÐ6h´Mƒhj›6ubhŒ are 0;”…”�”}”(hj›6h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³jÐ6h´Mƒhj—6ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hX``ENOMSG``: :c:type:`landlock_capability_attr.permissions ` is 0, or both :c:type:`landlock_capability_attr.allowed_capabilities ` and :c:type:`landlock_capability_attr.quiet_capabilities ` are 0;”h]”j()�”}”(hX``ENOMSG``: :c:type:`landlock_capability_attr.permissions ` is 0, or both :c:type:`landlock_capability_attr.allowed_capabilities ` and :c:type:`landlock_capability_attr.quiet_capabilities ` are 0;”h]”(jŽ)�”}”(hŒ ``ENOMSG``”h]”hŒENOMSG”…”�”}”(hj/7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj+7ubhŒ: ”…”�”}”(hj+7h²hh³Nh´Nubh)�”}”(hŒI:c:type:`landlock_capability_attr.permissions `”h]”jŽ)�”}”(hjC7h]”hŒ$landlock_capability_attr.permissions”…”�”}”(hjE7h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hjA7ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_capability_attr”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´M†hj+7ubhŒ is 0, or both ”…”�”}”(hj+7h²hh³Nh´Nubh)�”}”(hŒR:c:type:`landlock_capability_attr.allowed_capabilities `”h]”jŽ)�”}”(hjg7h]”hŒ-landlock_capability_attr.allowed_capabilities”…”�”}”(hji7h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hje7ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_capability_attr”uh1hh³j`7h´M†hj+7ubhŒ and ”…”�”}”(hj+7h²hh³Nh´Nubh)�”}”(hŒP:c:type:`landlock_capability_attr.quiet_capabilities `”h]”jŽ)�”}”(hjŠ7h]”hŒ+landlock_capability_attr.quiet_capabilities”…”�”}”(hjŒ7h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hjˆ7ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_capability_attr”uh1hh³j`7h´M†hj+7ubhŒ are 0;”…”�”}”(hj+7h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j`7h´M†hj'7ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hŒ�``EBADF``: **ruleset_fd** is not a file descriptor for the current thread, or a member of **rule_attr** is not a file descriptor as expected;”h]”j()�”}”(hŒ�``EBADF``: **ruleset_fd** is not a file descriptor for the current thread, or a member of **rule_attr** is not a file descriptor as expected;”h]”(jŽ)�”}”(hŒ ``EBADF``”h]”hŒEBADF”…”�”}”(hj¿7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj»7ubhŒ: ”…”�”}”(hj»7h²hh³Nh´Nubj|)�”}”(hŒ**ruleset_fd**”h]”hŒ ruleset_fd”…”�”}”(hjÑ7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj»7ubhŒA is not a file descriptor for the current thread, or a member of ”…”�”}”(hj»7h²hh³Nh´Nubj|)�”}”(hŒ **rule_attr**”h]”hŒ rule_attr”…”�”}”(hjã7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj»7ubhŒ& is not a file descriptor as expected;”…”�”}”(hj»7h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´M‰hj·7ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hŒƒ``EBADFD``: **ruleset_fd** is not a ruleset file descriptor, or a member of **rule_attr** is not the expected file descriptor type;”h]”j()�”}”(hŒƒ``EBADFD``: **ruleset_fd** is not a ruleset file descriptor, or a member of **rule_attr** is not the expected file descriptor type;”h]”(jŽ)�”}”(hŒ ``EBADFD``”h]”hŒEBADFD”…”�”}”(hj 8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj8ubhŒ: ”…”�”}”(hj8h²hh³Nh´Nubj|)�”}”(hŒ**ruleset_fd**”h]”hŒ ruleset_fd”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj8ubhŒ2 is not a ruleset file descriptor, or a member of ”…”�”}”(hj8h²hh³Nh´Nubj|)�”}”(hŒ **rule_attr**”h]”hŒ rule_attr”…”�”}”(hj.8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj8ubhŒ* is not the expected file descriptor type;”…”�”}”(hj8h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´M‹hj8ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hŒH``EPERM``: **ruleset_fd** has no write access to the underlying ruleset;”h]”j()�”}”(hjO8h]”(jŽ)�”}”(hŒ ``EPERM``”h]”hŒEPERM”…”�”}”(hjT8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjQ8ubhŒ: ”…”�”}”(hjQ8h²hh³Nh´Nubj|)�”}”(hŒ**ruleset_fd**”h]”hŒ ruleset_fd”…”�”}”(hjf8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjQ8ubhŒ/ has no write access to the underlying ruleset;”…”�”}”(hjQ8h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´M�hjM8ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubjg)�”}”(hŒ3``EFAULT``: **rule_attr** was not a valid address. ”h]”j()�”}”(hŒ2``EFAULT``: **rule_attr** was not a valid address.”h]”(jŽ)�”}”(hŒ ``EFAULT``”h]”hŒEFAULT”…”�”}”(hj�8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj‰8ubhŒ: ”…”�”}”(hj‰8h²hh³Nh´Nubj|)�”}”(hŒ **rule_attr**”h]”hŒ rule_attr”…”�”}”(hjŸ8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj‰8ubhŒ was not a valid address.”…”�”}”(hj‰8h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´MŽhj…8ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj 4ubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³j.4h´Mrhj\2ubj()�”}”(hŒ **Flags**”h]”j|)�”}”(hjÆ8h]”hŒFlags”…”�”}”(hjÈ8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjÄ8ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:60: ./include/uapi/linux/landlock.h”h´Kjhj\2ubj")�”}”(hhh]”j')�”}”(hXü``LANDLOCK_ADD_RULE_QUIET`` Together with the quiet_* fields in struct landlock_ruleset_attr, this flag controls whether Landlock will log audit messages when access to the objects covered by this rule is denied by this layer. If logging is enabled, when Landlock denies an access, it will suppress the log if all of the following are true: - this layer is the innermost layer that denied the access; - all accesses denied by this layer are part of the quiet_* fields in the related struct landlock_ruleset_attr; - the object (or one of its parents, for filesystem rules) is marked as "quiet" via ``LANDLOCK_ADD_RULE_QUIET``. Because logging is only suppressed by a layer if the layer denies access, a sandboxed program cannot use this flag to "hide" access denials, without denying itself the access in the first place. The effect of this flag does not depend on the value of allowed_access in the passed in rule_attr. When this flag is present, the caller is also allowed to pass in an empty allowed_access. ”•h]”(j-)�”}”(hŒ``LANDLOCK_ADD_RULE_QUIET``”h]”jŽ)�”}”(hjå8h]”hŒLANDLOCK_ADD_RULE_QUIET”…”�”}”(hjç8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjã8ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:60: ./include/uapi/linux/landlock.h”h´K‚hjß8ubj=)�”}”(hhh]”(j()�”}”(hŒÆTogether with the quiet_* fields in struct landlock_ruleset_attr, this flag controls whether Landlock will log audit messages when access to the objects covered by this rule is denied by this layer.”h]”hŒÆTogether with the quiet_* fields in struct landlock_ruleset_attr, this flag controls whether Landlock will log audit messages when access to the objects covered by this rule is denied by this layer.”…”�”}”(hjþ8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:60: ./include/uapi/linux/landlock.h”h´Kmhjû8ubj()�”}”(hŒqIf logging is enabled, when Landlock denies an access, it will suppress the log if all of the following are true:”h]”hŒqIf logging is enabled, when Landlock denies an access, it will suppress the log if all of the following are true:”…”�”}”(hj 9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:60: ./include/uapi/linux/landlock.h”h´Kqhjû8ubjb)�”}”(hhh]”(jg)�”}”(hŒ9this layer is the innermost layer that denied the access;”h]”j()�”}”(hj!9h]”hŒ9this layer is the innermost layer that denied the access;”…”�”}”(hj#9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:60: ./include/uapi/linux/landlock.h”h´Kthj9ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj9ubjg)�”}”(hŒmall accesses denied by this layer are part of the quiet_* fields in the related struct landlock_ruleset_attr;”h]”j()�”}”(hŒmall accesses denied by this layer are part of the quiet_* fields in the related struct landlock_ruleset_attr;”h]”hŒmall accesses denied by this layer are part of the quiet_* fields in the related struct landlock_ruleset_attr;”…”�”}”(hj;9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:60: ./include/uapi/linux/landlock.h”h´Kuhj79ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj9ubjg)�”}”(hŒothe object (or one of its parents, for filesystem rules) is marked as "quiet" via ``LANDLOCK_ADD_RULE_QUIET``. ”h]”j()�”}”(hŒnthe object (or one of its parents, for filesystem rules) is marked as "quiet" via ``LANDLOCK_ADD_RULE_QUIET``.”h]”(hŒVthe object (or one of its parents, for filesystem rules) is marked as “quietâ€� via ”…”�”}”(hjT9h²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ADD_RULE_QUIET``”h]”hŒLANDLOCK_ADD_RULE_QUIET”…”�”}”(hj\9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjT9ubhŒ.”…”�”}”(hjT9h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:60: ./include/uapi/linux/landlock.h”h´KwhjP9ubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj9ubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³j09h´Kthjû8ubj()�”}”(hŒÂBecause logging is only suppressed by a layer if the layer denies access, a sandboxed program cannot use this flag to "hide" access denials, without denying itself the access in the first place.”h]”hŒÆBecause logging is only suppressed by a layer if the layer denies access, a sandboxed program cannot use this flag to “hideâ€� access denials, without denying itself the access in the first place.”…”�”}”(hj�9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:60: ./include/uapi/linux/landlock.h”h´Kzhjû8ubj()�”}”(hŒ½The effect of this flag does not depend on the value of allowed_access in the passed in rule_attr. When this flag is present, the caller is also allowed to pass in an empty allowed_access.”h]”hŒ½The effect of this flag does not depend on the value of allowed_access in the passed in rule_attr. When this flag is present, the caller is also allowed to pass in an empty allowed_access.”…”�”}”(hj�9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:60: ./include/uapi/linux/landlock.h”h´K~hjû8ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j<hjß8ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jú8h´K‚hjÜ8ubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj\2ubj()�”}”(hŒ **Return**”h]”j|)�”}”(hj³9h]”hŒReturn”…”�”}”(hjµ9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj±9ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´M“hj\2ubj()�”}”(hŒB0 on success, or -errno on failure. Possible returned errors are:”h]”hŒB0 on success, or -errno on failure. Possible returned errors are:”…”�”}”(hjÉ9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:826: ./security/landlock/syscalls.c”h´Mrhj\2ubeh}”(h]”h ]”Œ kernelindent”ah"]”h$]”h&]”uh1jl'hj 0h²hh³Nh´Nubj0%)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j<%Œlandlock_rule_type (C enum)”Œc.landlock_rule_type”hNt”auh1j/%hj 0h²hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´NubjA%)�”}”(hhh]”(jF%)�”}”(hŒlandlock_rule_type”h]”jL%)�”}”(hŒenum landlock_rule_type”h]”(j %)�”}”(hjÞ0h]”hŒenum”…”�”}”(hjù9h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hjõ9h²hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjõ9h²hh³j:h´Kubju%)�”}”(hŒlandlock_rule_type”h]”j{%)�”}”(hjó9h]”hŒlandlock_rule_type”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hj:ubah}”(h]”h ]”(jŽ%j�%eh"]”h$]”h&]”hÅhÆuh1jt%hjõ9h²hh³j:h´Kubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆj7'ˆuh1jK%j8'j9'hjñ9h²hh³j:h´Kubah}”(h]”jë9ah ]”(j='j>'eh"]”h$]”h&]”jB'ˆjC')jD'huh1jE%h³j:h´Khjî9h²hubjF')�”}”(hhh]”j()�”}”(hŒLandlock rule type”h]”hŒLandlock rule type”…”�”}”(hj;:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´KÞhj8:h²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jE'hjî9h²hh³j:h´Kubeh}”(h]”h ]”(j³Œenum”eh"]”h$]”h&]”jf'j³jg'jS:jh'jS:ji'‰jj'‰jk'‰uh1j@%h²hhj 0h³jí9h´Nubjm')�”}”(hXÔ**Constants** ``LANDLOCK_RULE_PATH_BENEATH`` Type of a :c:type:`struct landlock_path_beneath_attr ` . ``LANDLOCK_RULE_NET_PORT`` Type of a :c:type:`struct landlock_net_port_attr ` . ``LANDLOCK_RULE_NAMESPACE`` Type of a :c:type:`struct landlock_namespace_attr ` . ``LANDLOCK_RULE_CAPABILITY`` Type of a :c:type:`struct landlock_capability_attr ` .”h]”(j()�”}”(hŒ **Constants**”h]”j|)�”}”(hj]:h]”hŒ Constants”…”�”}”(hj_:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj[:ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´KâhjW:ubj")�”}”(hhh]”(j')�”}”(hŒt``LANDLOCK_RULE_PATH_BENEATH`` Type of a :c:type:`struct landlock_path_beneath_attr ` . ”h]”(j-)�”}”(hŒ``LANDLOCK_RULE_PATH_BENEATH``”h]”jŽ)�”}”(hj|:h]”hŒLANDLOCK_RULE_PATH_BENEATH”…”�”}”(hj~:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjz:ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kæhjv:ubj=)�”}”(hhh]”j()�”}”(hŒTType of a :c:type:`struct landlock_path_beneath_attr ` .”h]”(hŒ Type of a ”…”�”}”(hj•:h²hh³Nh´Nubh)�”}”(hŒH:c:type:`struct landlock_path_beneath_attr `”h]”jŽ)�”}”(hjŸ:h]”hŒ!struct landlock_path_beneath_attr”…”�”}”(hj¡:h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hj�:ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_path_beneath_attr”uh1hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kåhj•:ubhŒ .”…”�”}”(hj•:h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j¼:h´Kåhj’:ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjv:ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j‘:h´Kæhjs:ubj')�”}”(hŒh``LANDLOCK_RULE_NET_PORT`` Type of a :c:type:`struct landlock_net_port_attr ` . ”h]”(j-)�”}”(hŒ``LANDLOCK_RULE_NET_PORT``”h]”jŽ)�”}”(hjÙ:h]”hŒLANDLOCK_RULE_NET_PORT”…”�”}”(hjÛ:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj×:ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´KêhjÓ:ubj=)�”}”(hhh]”j()�”}”(hŒLType of a :c:type:`struct landlock_net_port_attr ` .”h]”(hŒ Type of a ”…”�”}”(hjò:h²hh³Nh´Nubh)�”}”(hŒ@:c:type:`struct landlock_net_port_attr `”h]”jŽ)�”}”(hjü:h]”hŒstruct landlock_net_port_attr”…”�”}”(hjþ:h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hjú:ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_net_port_attr”uh1hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kéhjò:ubhŒ .”…”�”}”(hjò:h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j;h´Kéhjï:ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjÓ:ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jî:h´Kêhjs:ubj')�”}”(hŒk``LANDLOCK_RULE_NAMESPACE`` Type of a :c:type:`struct landlock_namespace_attr ` . ”h]”(j-)�”}”(hŒ``LANDLOCK_RULE_NAMESPACE``”h]”jŽ)�”}”(hj6;h]”hŒLANDLOCK_RULE_NAMESPACE”…”�”}”(hj8;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj4;ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kíhj0;ubj=)�”}”(hhh]”j()�”}”(hŒNType of a :c:type:`struct landlock_namespace_attr ` .”h]”(hŒ Type of a ”…”�”}”(hjO;h²hh³Nh´Nubh)�”}”(hŒB:c:type:`struct landlock_namespace_attr `”h]”jŽ)�”}”(hjY;h]”hŒstruct landlock_namespace_attr”…”�”}”(hj[;h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hjW;ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_namespace_attr”uh1hh³jK;h´KíhjO;ubhŒ .”…”�”}”(hjO;h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³jK;h´KíhjL;ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj0;ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jK;h´Kíhjs:ubj')�”}”(hŒm``LANDLOCK_RULE_CAPABILITY`` Type of a :c:type:`struct landlock_capability_attr ` .”h]”(j-)�”}”(hŒ``LANDLOCK_RULE_CAPABILITY``”h]”jŽ)�”}”(hj’;h]”hŒLANDLOCK_RULE_CAPABILITY”…”�”}”(hj”;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj�;ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´KðhjŒ;ubj=)�”}”(hhh]”j()�”}”(hŒPType of a :c:type:`struct landlock_capability_attr ` .”h]”(hŒ Type of a ”…”�”}”(hj«;h²hh³Nh´Nubh)�”}”(hŒD:c:type:`struct landlock_capability_attr `”h]”jŽ)�”}”(hjµ;h]”hŒstruct landlock_capability_attr”…”�”}”(hj·;h²hh³Nh´Nubah}”(h]”h ]”(j±j³Œc-type”eh"]”h$]”h&]”uh1j�hj³;ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j¾Œ refdomain”j³Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j÷%jÒ'jÄŒlandlock_capability_attr”uh1hh³j§;h´Kðhj«;ubhŒ .”…”�”}”(hj«;h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j§;h´Kðhj¨;ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjŒ;ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j§;h´Kðhjs:ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hjW:ubeh}”(h]”h ]”Œ kernelindent”ah"]”h$]”h&]”uh1jl'hj 0h²hh³jí9h´Nubj()�”}”(hŒ**Description**”h]”j|)�”}”(hj÷;h]”hŒ Description”…”�”}”(hjù;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjõ;ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kóhj 0h²hubj()�”}”(hŒ$Argument of sys_landlock_add_rule().”h]”hŒ$Argument of sys_landlock_add_rule().”…”�”}”(hj <h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kßhj 0h²hubj0%)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j<%Œ%landlock_path_beneath_attr (C struct)”Œc.landlock_path_beneath_attr”hNt”auh1j/%hj 0h²hh³jí9h´NubjA%)�”}”(hhh]”(jF%)�”}”(hŒlandlock_path_beneath_attr”h]”jL%)�”}”(hŒ!struct landlock_path_beneath_attr”h]”(j %)�”}”(hjÀ%h]”hŒstruct”…”�”}”(hj5<h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hj1<h²hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Käubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjC<h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj1<h²hh³jB<h´Käubju%)�”}”(hŒlandlock_path_beneath_attr”h]”j{%)�”}”(hj/<h]”hŒlandlock_path_beneath_attr”…”�”}”(hjU<h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjQ<ubah}”(h]”h ]”(jŽ%j�%eh"]”h$]”h&]”hÅhÆuh1jt%hj1<h²hh³jB<h´Käubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆj7'ˆuh1jK%j8'j9'hj-<h²hh³jB<h´Käubah}”(h]”j(<ah ]”(j='j>'eh"]”h$]”h&]”jB'ˆjC')jD'huh1jE%h³jB<h´Kähj*<h²hubjF')�”}”(hhh]”j()�”}”(hŒPath hierarchy definition”h]”hŒPath hierarchy definition”…”�”}”(hjw<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kùhjt<h²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jE'hj*<h²hh³jB<h´Käubeh}”(h]”h ]”(j³Œstruct”eh"]”h$]”h&]”jf'j³jg'j�<jh'j�<ji'‰jj'‰jk'‰uh1j@%h²hhj 0h³jí9h´Nubjm')�”}”(hXv**Definition**:: struct landlock_path_beneath_attr { __u64 allowed_access; __s32 parent_fd; }; **Members** ``allowed_access`` Bitmask of allowed actions for this file hierarchy (cf. `Filesystem flags`_). ``parent_fd`` File descriptor, preferably opened with ``O_PATH``, which identifies the parent directory of a file hierarchy, or just a file.”h]”(j()�”}”(hŒ**Definition**::”h]”(j|)�”}”(hŒ**Definition**”h]”hŒ Definition”…”�”}”(hj›<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj—<ubhŒ:”…”�”}”(hj—<h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kýhj“<ubj¢)�”}”(hŒUstruct landlock_path_beneath_attr { __u64 allowed_access; __s32 parent_fd; };”h]”hŒUstruct landlock_path_beneath_attr { __u64 allowed_access; __s32 parent_fd; };”…”�”}”hj´<sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j¡h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kÿhj“<ubj()�”}”(hŒ **Members**”h]”j|)�”}”(hjÅ<h]”hŒMembers”…”�”}”(hjÇ<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjÃ<ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mhj“<ubj")�”}”(hhh]”(j')�”}”(hŒa``allowed_access`` Bitmask of allowed actions for this file hierarchy (cf. `Filesystem flags`_). ”h]”(j-)�”}”(hŒ``allowed_access``”h]”jŽ)�”}”(hjä<h]”hŒallowed_access”…”�”}”(hjæ<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjâ<ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MhjÞ<ubj=)�”}”(hhh]”j()�”}”(hŒMBitmask of allowed actions for this file hierarchy (cf. `Filesystem flags`_).”h]”(hŒ8Bitmask of allowed actions for this file hierarchy (cf. ”…”�”}”(hjý<h²hh³Nh´Nubj5)�”}”(hŒ`Filesystem flags`_”h]”hŒFilesystem flags”…”�”}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒFilesystem flags”jFj9!uh1j4hjý<jHKubhŒ).”…”�”}”(hjý<h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mhjú<ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjÞ<ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jù<h´MhjÛ<ubj')�”}”(hŒŒ``parent_fd`` File descriptor, preferably opened with ``O_PATH``, which identifies the parent directory of a file hierarchy, or just a file.”h]”(j-)�”}”(hŒ ``parent_fd``”h]”jŽ)�”}”(hj2=h]”hŒ parent_fd”…”�”}”(hj4=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj0=ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mhj,=ubj=)�”}”(hhh]”j()�”}”(hŒ~File descriptor, preferably opened with ``O_PATH``, which identifies the parent directory of a file hierarchy, or just a file.”h]”(hŒ(File descriptor, preferably opened with ”…”�”}”(hjK=h²hh³Nh´NubjŽ)�”}”(hŒ ``O_PATH``”h]”hŒO_PATH”…”�”}”(hjS=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjK=ubhŒL, which identifies the parent directory of a file hierarchy, or just a file.”…”�”}”(hjK=h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MhjH=ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj,=ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jG=h´MhjÛ<ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hj“<ubeh}”(h]”h ]”Œ kernelindent”ah"]”h$]”h&]”uh1jl'hj 0h²hh³jí9h´Nubj()�”}”(hŒ**Description**”h]”j|)�”}”(hj‡=h]”hŒ Description”…”�”}”(hj‰=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj…=ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M hj 0h²hubj()�”}”(hŒ$Argument of sys_landlock_add_rule().”h]”hŒ$Argument of sys_landlock_add_rule().”…”�”}”(hj�=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kúhj 0h²hubj0%)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j<%Œ!landlock_net_port_attr (C struct)”Œc.landlock_net_port_attr”hNt”auh1j/%hj 0h²hh³jí9h´NubjA%)�”}”(hhh]”(jF%)�”}”(hŒlandlock_net_port_attr”h]”jL%)�”}”(hŒstruct landlock_net_port_attr”h]”(j %)�”}”(hjÀ%h]”hŒstruct”…”�”}”(hjÅ=h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hjÁ=h²hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Kÿubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjÓ=h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjÁ=h²hh³jÒ=h´Kÿubju%)�”}”(hŒlandlock_net_port_attr”h]”j{%)�”}”(hj¿=h]”hŒlandlock_net_port_attr”…”�”}”(hjå=h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjá=ubah}”(h]”h ]”(jŽ%j�%eh"]”h$]”h&]”hÅhÆuh1jt%hjÁ=h²hh³jÒ=h´Kÿubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆj7'ˆuh1jK%j8'j9'hj½=h²hh³jÒ=h´Kÿubah}”(h]”j¸=ah ]”(j='j>'eh"]”h$]”h&]”jB'ˆjC')jD'huh1jE%h³jÒ=h´Kÿhjº=h²hubjF')�”}”(hhh]”j()�”}”(hŒNetwork port definition”h]”hŒNetwork port definition”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mhj>h²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jE'hjº=h²hh³jÒ=h´Kÿubeh}”(h]”h ]”(j³Œstruct”eh"]”h$]”h&]”jf'j³jg'j>jh'j>ji'‰jj'‰jk'‰uh1j@%h²hhj 0h³jí9h´Nubjm')�”}”(hXB**Definition**:: struct landlock_net_port_attr { __u64 allowed_access; __u64 port; }; **Members** ``allowed_access`` Bitmask of allowed network actions for a port (cf. `Network flags`_). ``port`` Network port in host endianness. It should be noted that port 0 passed to :manpage:`bind(2)` will bind to an available port from the ephemeral port range. This can be configured with the ``/proc/sys/net/ipv4/ip_local_port_range`` sysctl (also used for IPv6), and within that range, on a per-socket basis with ``setsockopt(IP_LOCAL_PORT_RANGE)``. A Landlock rule with port 0 and the ``LANDLOCK_ACCESS_NET_BIND_TCP`` or ``LANDLOCK_ACCESS_NET_BIND_UDP`` right means that requesting to bind on port 0 is allowed and it will automatically translate to binding on a kernel-assigned ephemeral port.”h]”(j()�”}”(hŒ**Definition**::”h]”(j|)�”}”(hŒ**Definition**”h]”hŒ Definition”…”�”}”(hj+>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj'>ubhŒ:”…”�”}”(hj'>h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mhj#>ubj¢)�”}”(hŒLstruct landlock_net_port_attr { __u64 allowed_access; __u64 port; };”h]”hŒLstruct landlock_net_port_attr { __u64 allowed_access; __u64 port; };”…”�”}”hjD>sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j¡h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mhj#>ubj()�”}”(hŒ **Members**”h]”j|)�”}”(hjU>h]”hŒMembers”…”�”}”(hjW>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjS>ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mhj#>ubj")�”}”(hhh]”(j')�”}”(hŒY``allowed_access`` Bitmask of allowed network actions for a port (cf. `Network flags`_). ”h]”(j-)�”}”(hŒ``allowed_access``”h]”jŽ)�”}”(hjt>h]”hŒallowed_access”…”�”}”(hjv>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjr>ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mhjn>ubj=)�”}”(hhh]”j()�”}”(hŒEBitmask of allowed network actions for a port (cf. `Network flags`_).”h]”(hŒ3Bitmask of allowed network actions for a port (cf. ”…”�”}”(hj�>h²hh³Nh´Nubj5)�”}”(hŒ`Network flags`_”h]”hŒ Network flags”…”�”}”(hj•>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ Network flags”jFjI#uh1j4hj�>jHKubhŒ).”…”�”}”(hj�>h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MhjŠ>ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjn>ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j‰>h´Mhjk>ubj')�”}”(hX[``port`` Network port in host endianness. It should be noted that port 0 passed to :manpage:`bind(2)` will bind to an available port from the ephemeral port range. This can be configured with the ``/proc/sys/net/ipv4/ip_local_port_range`` sysctl (also used for IPv6), and within that range, on a per-socket basis with ``setsockopt(IP_LOCAL_PORT_RANGE)``. A Landlock rule with port 0 and the ``LANDLOCK_ACCESS_NET_BIND_TCP`` or ``LANDLOCK_ACCESS_NET_BIND_UDP`` right means that requesting to bind on port 0 is allowed and it will automatically translate to binding on a kernel-assigned ephemeral port.”h]”(j-)�”}”(hŒ``port``”h]”jŽ)�”}”(hjÂ>h]”hŒport”…”�”}”(hjÄ>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÀ>ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M&hj¼>ubj=)�”}”(hhh]”(j()�”}”(hŒ Network port in host endianness.”h]”hŒ Network port in host endianness.”…”�”}”(hjÛ>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MhjØ>ubj()�”}”(hX9It should be noted that port 0 passed to :manpage:`bind(2)` will bind to an available port from the ephemeral port range. This can be configured with the ``/proc/sys/net/ipv4/ip_local_port_range`` sysctl (also used for IPv6), and within that range, on a per-socket basis with ``setsockopt(IP_LOCAL_PORT_RANGE)``.”h]”(hŒ)It should be noted that port 0 passed to ”…”�”}”(hjê>h²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`bind(2)`”h]”hŒbind(2)”…”�”}”(hjò>h²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒbind(2)”jߌbind”jájîuh1jÍhjê>ubhŒ` will bind to an available port from the ephemeral port range. This can be configured with the ”…”�”}”(hjê>h²hh³Nh´NubjŽ)�”}”(hŒ*``/proc/sys/net/ipv4/ip_local_port_range``”h]”hŒ&/proc/sys/net/ipv4/ip_local_port_range”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjê>ubhŒP sysctl (also used for IPv6), and within that range, on a per-socket basis with ”…”�”}”(hjê>h²hh³Nh´NubjŽ)�”}”(hŒ#``setsockopt(IP_LOCAL_PORT_RANGE)``”h]”hŒsetsockopt(IP_LOCAL_PORT_RANGE)”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjê>ubhŒ.”…”�”}”(hjê>h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MhjØ>ubj()�”}”(hŒõA Landlock rule with port 0 and the ``LANDLOCK_ACCESS_NET_BIND_TCP`` or ``LANDLOCK_ACCESS_NET_BIND_UDP`` right means that requesting to bind on port 0 is allowed and it will automatically translate to binding on a kernel-assigned ephemeral port.”h]”(hŒ$A Landlock rule with port 0 and the ”…”�”}”(hj1?h²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_NET_BIND_TCP``”h]”hŒLANDLOCK_ACCESS_NET_BIND_TCP”…”�”}”(hj9?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj1?ubhŒ or ”…”�”}”(hj1?h²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_NET_BIND_UDP``”h]”hŒLANDLOCK_ACCESS_NET_BIND_UDP”…”�”}”(hjK?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj1?ubhŒ� right means that requesting to bind on port 0 is allowed and it will automatically translate to binding on a kernel-assigned ephemeral port.”…”�”}”(hj1?h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M$hjØ>ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j<hj¼>ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j×>h´M&hjk>ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hj#>ubeh}”(h]”h ]”Œ kernelindent”ah"]”h$]”h&]”uh1jl'hj 0h²hh³jí9h´Nubj()�”}”(hŒ**Description**”h]”j|)�”}”(hj?h]”hŒ Description”…”�”}”(hj�?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj}?ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M*hj 0h²hubj()�”}”(hŒ$Argument of sys_landlock_add_rule().”h]”hŒ$Argument of sys_landlock_add_rule().”…”�”}”(hj•?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mhj 0h²hubj0%)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j<%Œ"landlock_namespace_attr (C struct)”Œc.landlock_namespace_attr”hNt”auh1j/%hj 0h²hh³jí9h´NubjA%)�”}”(hhh]”(jF%)�”}”(hŒlandlock_namespace_attr”h]”jL%)�”}”(hŒstruct landlock_namespace_attr”h]”(j %)�”}”(hjÀ%h]”hŒstruct”…”�”}”(hj½?h²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hj¹?h²hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjË?h²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj¹?h²hh³jÊ?h´Mubju%)�”}”(hŒlandlock_namespace_attr”h]”j{%)�”}”(hj·?h]”hŒlandlock_namespace_attr”…”�”}”(hjÝ?h²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjÙ?ubah}”(h]”h ]”(jŽ%j�%eh"]”h$]”h&]”hÅhÆuh1jt%hj¹?h²hh³jÊ?h´Mubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆj7'ˆuh1jK%j8'j9'hjµ?h²hh³jÊ?h´Mubah}”(h]”j°?ah ]”(j='j>'eh"]”h$]”h&]”jB'ˆjC')jD'huh1jE%h³jÊ?h´Mhj²?h²hubjF')�”}”(hhh]”j()�”}”(hŒNamespace type definition”h]”hŒNamespace type definition”…”�”}”(hjÿ?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M,hjü?h²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jE'hj²?h²hh³jÊ?h´Mubeh}”(h]”h ]”(j³Œstruct”eh"]”h$]”h&]”jf'j³jg'j@jh'j@ji'‰jj'‰jk'‰uh1j@%h²hhj 0h³jí9h´Nubjm')�”}”(hXø**Definition**:: struct landlock_namespace_attr { __u64 permissions; __u64 allowed_namespace_types; __u64 quiet_namespace_types; }; **Members** ``permissions`` Must be set to ``LANDLOCK_PERMISSION_NAMESPACE_USE``. ``allowed_namespace_types`` Bitmask of namespace types (``CLONE_NEW*`` flags) to allow under this rule. Unknown bits are silently ignored for forward compatibility. ``quiet_namespace_types`` Bitmask of namespace types (``CLONE_NEW*`` flags) whose denial by this layer should not be submitted to audit, even when landlock_restrict_self() enables audit logging. Only audit records attributed to this layer are suppressed; denial tracepoints still fire (see `Permission flags`_). Bits also set in **allowed_namespace_types** have no effect, since an allowed type is never denied. Unknown bits are silently ignored. At least one of **allowed_namespace_types** or **quiet_namespace_types** must be non-zero, otherwise the call returns ``-ENOMSG``. The non-zero check runs on the raw input before unknown-bit masking, so a rule that sets only bits unknown to the running kernel succeeds but has no runtime effect. Programs should omit this rule when they neither allow nor quiet a namespace type.”h]”(j()�”}”(hŒ**Definition**::”h]”(j|)�”}”(hŒ**Definition**”h]”hŒ Definition”…”�”}”(hj#@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj@ubhŒ:”…”�”}”(hj@h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M0hj@ubj¢)�”}”(hŒ~struct landlock_namespace_attr { __u64 permissions; __u64 allowed_namespace_types; __u64 quiet_namespace_types; };”h]”hŒ~struct landlock_namespace_attr { __u64 permissions; __u64 allowed_namespace_types; __u64 quiet_namespace_types; };”…”�”}”hj<@sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j¡h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M2hj@ubj()�”}”(hŒ **Members**”h]”j|)�”}”(hjM@h]”hŒMembers”…”�”}”(hjO@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjK@ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M8hj@ubj")�”}”(hhh]”(j')�”}”(hŒF``permissions`` Must be set to ``LANDLOCK_PERMISSION_NAMESPACE_USE``. ”h]”(j-)�”}”(hŒ``permissions``”h]”jŽ)�”}”(hjl@h]”hŒ permissions”…”�”}”(hjn@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjj@ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M3hjf@ubj=)�”}”(hhh]”j()�”}”(hŒ5Must be set to ``LANDLOCK_PERMISSION_NAMESPACE_USE``.”h]”(hŒMust be set to ”…”�”}”(hj…@h²hh³Nh´NubjŽ)�”}”(hŒ%``LANDLOCK_PERMISSION_NAMESPACE_USE``”h]”hŒ!LANDLOCK_PERMISSION_NAMESPACE_USE”…”�”}”(hj�@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj…@ubhŒ.”…”�”}”(hj…@h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j�@h´M3hj‚@ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjf@ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j�@h´M3hjc@ubj')�”}”(hŒ¦``allowed_namespace_types`` Bitmask of namespace types (``CLONE_NEW*`` flags) to allow under this rule. Unknown bits are silently ignored for forward compatibility. ”h]”(j-)�”}”(hŒ``allowed_namespace_types``”h]”jŽ)�”}”(hj·@h]”hŒallowed_namespace_types”…”�”}”(hj¹@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjµ@ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M9hj±@ubj=)�”}”(hhh]”j()�”}”(hŒ‰Bitmask of namespace types (``CLONE_NEW*`` flags) to allow under this rule. Unknown bits are silently ignored for forward compatibility.”h]”(hŒBitmask of namespace types (”…”�”}”(hjÐ@h²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEW*``”h]”hŒ CLONE_NEW*”…”�”}”(hjØ@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÐ@ubhŒ_ flags) to allow under this rule. Unknown bits are silently ignored for forward compatibility.”…”�”}”(hjÐ@h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M7hjÍ@ubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj±@ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jÌ@h´M9hjc@ubj')�”}”(hX?``quiet_namespace_types`` Bitmask of namespace types (``CLONE_NEW*`` flags) whose denial by this layer should not be submitted to audit, even when landlock_restrict_self() enables audit logging. Only audit records attributed to this layer are suppressed; denial tracepoints still fire (see `Permission flags`_). Bits also set in **allowed_namespace_types** have no effect, since an allowed type is never denied. Unknown bits are silently ignored. At least one of **allowed_namespace_types** or **quiet_namespace_types** must be non-zero, otherwise the call returns ``-ENOMSG``. The non-zero check runs on the raw input before unknown-bit masking, so a rule that sets only bits unknown to the running kernel succeeds but has no runtime effect. Programs should omit this rule when they neither allow nor quiet a namespace type.”h]”(j-)�”}”(hŒ``quiet_namespace_types``”h]”jŽ)�”}”(hjAh]”hŒquiet_namespace_types”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjAubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MIhjý@ubj=)�”}”(hhh]”(j()�”}”(hX§Bitmask of namespace types (``CLONE_NEW*`` flags) whose denial by this layer should not be submitted to audit, even when landlock_restrict_self() enables audit logging. Only audit records attributed to this layer are suppressed; denial tracepoints still fire (see `Permission flags`_). Bits also set in **allowed_namespace_types** have no effect, since an allowed type is never denied. Unknown bits are silently ignored.”h]”(hŒBitmask of namespace types (”…”�”}”(hjAh²hh³Nh´NubjŽ)�”}”(hŒ``CLONE_NEW*``”h]”hŒ CLONE_NEW*”…”�”}”(hj$Ah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjAubhŒß flags) whose denial by this layer should not be submitted to audit, even when landlock_restrict_self() enables audit logging. Only audit records attributed to this layer are suppressed; denial tracepoints still fire (see ”…”�”}”(hjAh²hh³Nh´Nubj5)�”}”(hŒ`Permission flags`_”h]”hŒPermission flags”…”�”}”(hj6Ah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒPermission flags”jFj%uh1j4hjAjHKubhŒ). Bits also set in ”…”�”}”(hjAh²hh³Nh´Nubj|)�”}”(hŒ**allowed_namespace_types**”h]”hŒallowed_namespace_types”…”�”}”(hjJAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjAubhŒ[ have no effect, since an allowed type is never denied. Unknown bits are silently ignored.”…”�”}”(hjAh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M=hjAubj()�”}”(hX|At least one of **allowed_namespace_types** or **quiet_namespace_types** must be non-zero, otherwise the call returns ``-ENOMSG``. The non-zero check runs on the raw input before unknown-bit masking, so a rule that sets only bits unknown to the running kernel succeeds but has no runtime effect. Programs should omit this rule when they neither allow nor quiet a namespace type.”h]”(hŒAt least one of ”…”�”}”(hjcAh²hh³Nh´Nubj|)�”}”(hŒ**allowed_namespace_types**”h]”hŒallowed_namespace_types”…”�”}”(hjkAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjcAubhŒ or ”…”�”}”(hjcAh²hh³Nh´Nubj|)�”}”(hŒ**quiet_namespace_types**”h]”hŒquiet_namespace_types”…”�”}”(hj}Ah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjcAubhŒ. must be non-zero, otherwise the call returns ”…”�”}”(hjcAh²hh³Nh´NubjŽ)�”}”(hŒ ``-ENOMSG``”h]”hŒ-ENOMSG”…”�”}”(hj�Ah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjcAubhŒû. The non-zero check runs on the raw input before unknown-bit masking, so a rule that sets only bits unknown to the running kernel succeeds but has no runtime effect. Programs should omit this rule when they neither allow nor quiet a namespace type.”…”�”}”(hjcAh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MEhjAubeh}”(h]”h ]”h"]”h$]”h&]”uh1j<hjý@ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jAh´MIhjc@ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hj@ubeh}”(h]”h ]”Œ kernelindent”ah"]”h$]”h&]”uh1jl'hj 0h²hh³jí9h´Nubj()�”}”(hŒ**Description**”h]”j|)�”}”(hjÃAh]”hŒ Description”…”�”}”(hjÅAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjÁAubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MMhj 0h²hubj()�”}”(hŒEArgument of sys_landlock_add_rule() with ``LANDLOCK_RULE_NAMESPACE``.”h]”(hŒ)Argument of sys_landlock_add_rule() with ”…”�”}”(hjÙAh²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_RULE_NAMESPACE``”h]”hŒLANDLOCK_RULE_NAMESPACE”…”�”}”(hjáAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÙAubhŒ.”…”�”}”(hjÙAh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M-hj 0h²hubj0%)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j<%Œ#landlock_capability_attr (C struct)”Œc.landlock_capability_attr”hNt”auh1j/%hj 0h²hh³jí9h´NubjA%)�”}”(hhh]”(jF%)�”}”(hŒlandlock_capability_attr”h]”jL%)�”}”(hŒstruct landlock_capability_attr”h]”(j %)�”}”(hjÀ%h]”hŒstruct”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hjBh²hh³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M2ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hj!Bh²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjBh²hh³j Bh´M2ubju%)�”}”(hŒlandlock_capability_attr”h]”j{%)�”}”(hj Bh]”hŒlandlock_capability_attr”…”�”}”(hj3Bh²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hj/Bubah}”(h]”h ]”(jŽ%j�%eh"]”h$]”h&]”hÅhÆuh1jt%hjBh²hh³j Bh´M2ubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆj7'ˆuh1jK%j8'j9'hj Bh²hh³j Bh´M2ubah}”(h]”jBah ]”(j='j>'eh"]”h$]”h&]”jB'ˆjC')jD'huh1jE%h³j Bh´M2hjBh²hubjF')�”}”(hhh]”j()�”}”(hŒCapability definition”h]”hŒCapability definition”…”�”}”(hjUBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MOhjRBh²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jE'hjBh²hh³j Bh´M2ubeh}”(h]”h ]”(j³Œstruct”eh"]”h$]”h&]”jf'j³jg'jmBjh'jmBji'‰jj'‰jk'‰uh1j@%h²hhj 0h³jí9h´Nubjm')�”}”(hX.**Definition**:: struct landlock_capability_attr { __u64 permissions; __u64 allowed_capabilities; __u64 quiet_capabilities; }; **Members** ``permissions`` Must be set to ``LANDLOCK_PERMISSION_CAPABILITY_USE``. ``allowed_capabilities`` Bitmask of capabilities (``1ULL << CAP_*``) to allow under this rule. Bits above ``CAP_LAST_CAP`` are silently ignored for forward compatibility. ``quiet_capabilities`` Bitmask of capabilities (``1ULL << CAP_*``) whose denial by this layer should not be submitted to audit, even if audit logging would normally take place per landlock_restrict_self() flags. Only audit records attributed to this layer are suppressed; denial tracepoints still fire (see `Permission flags`_). Bits also set in **allowed_capabilities** have no effect, since an allowed capability is never denied. Bits above ``CAP_LAST_CAP`` are silently ignored. At least one of **allowed_capabilities** or **quiet_capabilities** must be non-zero, otherwise the call returns ``-ENOMSG``. The non-zero check runs on the raw input before unknown-bit masking, so a rule that sets only bits unknown to the running kernel (above ``CAP_LAST_CAP``) succeeds but has no runtime effect. Programs should omit this rule when they neither allow nor quiet a capability.”h]”(j()�”}”(hŒ**Definition**::”h]”(j|)�”}”(hŒ**Definition**”h]”hŒ Definition”…”�”}”(hjyBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjuBubhŒ:”…”�”}”(hjuBh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MShjqBubj¢)�”}”(hŒystruct landlock_capability_attr { __u64 permissions; __u64 allowed_capabilities; __u64 quiet_capabilities; };”h]”hŒystruct landlock_capability_attr { __u64 permissions; __u64 allowed_capabilities; __u64 quiet_capabilities; };”…”�”}”hj’Bsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j¡h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MUhjqBubj()�”}”(hŒ **Members**”h]”j|)�”}”(hj£Bh]”hŒMembers”…”�”}”(hj¥Bh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj¡Bubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M[hjqBubj")�”}”(hhh]”(j')�”}”(hŒG``permissions`` Must be set to ``LANDLOCK_PERMISSION_CAPABILITY_USE``. ”h]”(j-)�”}”(hŒ``permissions``”h]”jŽ)�”}”(hjÂBh]”hŒ permissions”…”�”}”(hjÄBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÀBubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MVhj¼Bubj=)�”}”(hhh]”j()�”}”(hŒ6Must be set to ``LANDLOCK_PERMISSION_CAPABILITY_USE``.”h]”(hŒMust be set to ”…”�”}”(hjÛBh²hh³Nh´NubjŽ)�”}”(hŒ&``LANDLOCK_PERMISSION_CAPABILITY_USE``”h]”hŒ"LANDLOCK_PERMISSION_CAPABILITY_USE”…”�”}”(hjãBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÛBubhŒ.”…”�”}”(hjÛBh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³j×Bh´MVhjØBubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj¼Bubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j×Bh´MVhj¹Bubj')�”}”(hŒ¬``allowed_capabilities`` Bitmask of capabilities (``1ULL << CAP_*``) to allow under this rule. Bits above ``CAP_LAST_CAP`` are silently ignored for forward compatibility. ”h]”(j-)�”}”(hŒ``allowed_capabilities``”h]”jŽ)�”}”(hj Ch]”hŒallowed_capabilities”…”�”}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj Cubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M\hjCubj=)�”}”(hhh]”j()�”}”(hŒ’Bitmask of capabilities (``1ULL << CAP_*``) to allow under this rule. Bits above ``CAP_LAST_CAP`` are silently ignored for forward compatibility.”h]”(hŒBitmask of capabilities (”…”�”}”(hj&Ch²hh³Nh´NubjŽ)�”}”(hŒ``1ULL << CAP_*``”h]”hŒ 1ULL << CAP_*”…”�”}”(hj.Ch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj&CubhŒ() to allow under this rule. Bits above ”…”�”}”(hj&Ch²hh³Nh´NubjŽ)�”}”(hŒ``CAP_LAST_CAP``”h]”hŒ CAP_LAST_CAP”…”�”}”(hj@Ch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj&CubhŒ0 are silently ignored for forward compatibility.”…”�”}”(hj&Ch²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MZhj#Cubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjCubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j"Ch´M\hj¹Bubj')�”}”(hXq``quiet_capabilities`` Bitmask of capabilities (``1ULL << CAP_*``) whose denial by this layer should not be submitted to audit, even if audit logging would normally take place per landlock_restrict_self() flags. Only audit records attributed to this layer are suppressed; denial tracepoints still fire (see `Permission flags`_). Bits also set in **allowed_capabilities** have no effect, since an allowed capability is never denied. Bits above ``CAP_LAST_CAP`` are silently ignored. At least one of **allowed_capabilities** or **quiet_capabilities** must be non-zero, otherwise the call returns ``-ENOMSG``. The non-zero check runs on the raw input before unknown-bit masking, so a rule that sets only bits unknown to the running kernel (above ``CAP_LAST_CAP``) succeeds but has no runtime effect. Programs should omit this rule when they neither allow nor quiet a capability.”h]”(j-)�”}”(hŒ``quiet_capabilities``”h]”jŽ)�”}”(hjkCh]”hŒquiet_capabilities”…”�”}”(hjmCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjiCubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MmhjeCubj=)�”}”(hhh]”(j()�”}”(hXÍBitmask of capabilities (``1ULL << CAP_*``) whose denial by this layer should not be submitted to audit, even if audit logging would normally take place per landlock_restrict_self() flags. Only audit records attributed to this layer are suppressed; denial tracepoints still fire (see `Permission flags`_). Bits also set in **allowed_capabilities** have no effect, since an allowed capability is never denied. Bits above ``CAP_LAST_CAP`` are silently ignored.”h]”(hŒBitmask of capabilities (”…”�”}”(hj„Ch²hh³Nh´NubjŽ)�”}”(hŒ``1ULL << CAP_*``”h]”hŒ 1ULL << CAP_*”…”�”}”(hjŒCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj„CubhŒó) whose denial by this layer should not be submitted to audit, even if audit logging would normally take place per landlock_restrict_self() flags. Only audit records attributed to this layer are suppressed; denial tracepoints still fire (see ”…”�”}”(hj„Ch²hh³Nh´Nubj5)�”}”(hŒ`Permission flags`_”h]”hŒPermission flags”…”�”}”(hjžCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒPermission flags”jFj%uh1j4hj„CjHKubhŒ). Bits also set in ”…”�”}”(hj„Ch²hh³Nh´Nubj|)�”}”(hŒ**allowed_capabilities**”h]”hŒallowed_capabilities”…”�”}”(hj²Ch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj„CubhŒJ have no effect, since an allowed capability is never denied. Bits above ”…”�”}”(hj„Ch²hh³Nh´NubjŽ)�”}”(hŒ``CAP_LAST_CAP``”h]”hŒ CAP_LAST_CAP”…”�”}”(hjÄCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj„CubhŒ are silently ignored.”…”�”}”(hj„Ch²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´M`hj�Cubj()�”}”(hX‹At least one of **allowed_capabilities** or **quiet_capabilities** must be non-zero, otherwise the call returns ``-ENOMSG``. The non-zero check runs on the raw input before unknown-bit masking, so a rule that sets only bits unknown to the running kernel (above ``CAP_LAST_CAP``) succeeds but has no runtime effect. Programs should omit this rule when they neither allow nor quiet a capability.”h]”(hŒAt least one of ”…”�”}”(hjÝCh²hh³Nh´Nubj|)�”}”(hŒ**allowed_capabilities**”h]”hŒallowed_capabilities”…”�”}”(hjåCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjÝCubhŒ or ”…”�”}”(hjÝCh²hh³Nh´Nubj|)�”}”(hŒ**quiet_capabilities**”h]”hŒquiet_capabilities”…”�”}”(hj÷Ch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjÝCubhŒ. must be non-zero, otherwise the call returns ”…”�”}”(hjÝCh²hh³Nh´NubjŽ)�”}”(hŒ ``-ENOMSG``”h]”hŒ-ENOMSG”…”�”}”(hj Dh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÝCubhŒ‹. The non-zero check runs on the raw input before unknown-bit masking, so a rule that sets only bits unknown to the running kernel (above ”…”�”}”(hjÝCh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_LAST_CAP``”h]”hŒ CAP_LAST_CAP”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÝCubhŒu) succeeds but has no runtime effect. Programs should omit this rule when they neither allow nor quiet a capability.”…”�”}”(hjÝCh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mihj�Cubeh}”(h]”h ]”h"]”h$]”h&]”uh1j<hjeCubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j€Ch´Mmhj¹Bubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hjqBubeh}”(h]”h ]”Œ kernelindent”ah"]”h$]”h&]”uh1jl'hj 0h²hh³jí9h´Nubj()�”}”(hŒ**Description**”h]”j|)�”}”(hjODh]”hŒ Description”…”�”}”(hjQDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjMDubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´Mqhj 0h²hubj()�”}”(hŒFArgument of sys_landlock_add_rule() with ``LANDLOCK_RULE_CAPABILITY``.”h]”(hŒ)Argument of sys_landlock_add_rule() with ”…”�”}”(hjeDh²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_RULE_CAPABILITY``”h]”hŒLANDLOCK_RULE_CAPABILITY”…”�”}”(hjmDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjeDubhŒ.”…”�”}”(hjeDh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œe/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:829: ./include/uapi/linux/landlock.h”h´MPhj 0h²hubeh}”(h]”Œextending-a-ruleset”ah ]”h"]”Œextending a ruleset”ah$]”h&]”uh1hòhjih²hh³hÇh´M8ubhó)�”}”(hhh]”(hø)�”}”(hŒEnforcing a ruleset”h]”hŒEnforcing a ruleset”…”�”}”(hj‘Dh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjŽDh²hh³hÇh´MCubj0%)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(j<%Œ'sys_landlock_restrict_self (C function)”Œc.sys_landlock_restrict_self”hNt”auh1j/%hjŽDh²hh³Nh´NubjA%)�”}”(hhh]”(jF%)�”}”(hŒIlong sys_landlock_restrict_self (const int ruleset_fd, const __u32 flags)”h]”jL%)�”}”(hŒHlong sys_landlock_restrict_self(const int ruleset_fd, const __u32 flags)”h]”(jR%)�”}”(hŒlong”h]”hŒlong”…”�”}”(hj¸Dh²hh³Nh´Nubah}”(h]”h ]”j^%ah"]”h$]”h&]”uh1jQ%hj´Dh²hh³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´M·ubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjÇDh²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hj´Dh²hh³jÆDh´M·ubju%)�”}”(hŒsys_landlock_restrict_self”h]”j{%)�”}”(hŒsys_landlock_restrict_self”h]”hŒsys_landlock_restrict_self”…”�”}”(hjÙDh²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjÕDubah}”(h]”h ]”(jŽ%j�%eh"]”h$]”h&]”hÅhÆuh1jt%hj´Dh²hh³jÆDh´M·ubj”%)�”}”(hŒ)(const int ruleset_fd, const __u32 flags)”h]”(jš%)�”}”(hŒconst int ruleset_fd”h]”(j %)�”}”(hj£%h]”hŒconst”…”�”}”(hjõDh²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hjñDubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjñDubjR%)�”}”(hŒint”h]”hŒint”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”j^%ah"]”h$]”h&]”uh1jQ%hjñDubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjñDubj{%)�”}”(hŒ ruleset_fd”h]”hŒ ruleset_fd”…”�”}”(hj,Eh²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjñDubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j™%hjíDubjš%)�”}”(hŒconst __u32 flags”h]”(j %)�”}”(hj£%h]”hŒconst”…”�”}”(hjEEh²hh³Nh´Nubah}”(h]”h ]”j¬%ah"]”h$]”h&]”uh1jŸ%hjAEubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjREh²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjAEubh)�”}”(hhh]”j{%)�”}”(hŒ__u32”h]”hŒ__u32”…”�”}”(hjcEh²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hj`Eubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”j³Œreftype”jó%Œ reftarget”jeEŒmodname”NŒ classname”Nj÷%jú%)�”}”jý%]”j&)�”}”jó%jÛDsbŒc.sys_landlock_restrict_self”†”asbuh1hhjAEubjd%)�”}”(hŒ ”h]”hŒ ”…”�”}”(hjƒEh²hh³Nh´Nubah}”(h]”h ]”jp%ah"]”h$]”h&]”uh1jc%hjAEubj{%)�”}”(hŒflags”h]”hŒflags”…”�”}”(hj‘Eh²hh³Nh´Nubah}”(h]”h ]”j‡%ah"]”h$]”h&]”uh1jz%hjAEubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j™%hjíDubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j“%hj´Dh²hh³jÆDh´M·ubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆj7'ˆuh1jK%j8'j9'hj°Dh²hh³jÆDh´M·ubah}”(h]”j«Dah ]”(j='j>'eh"]”h$]”h&]”jB'ˆjC')jD'huh1jE%h³jÆDh´M·hj­Dh²hubjF')�”}”(hhh]”j()�”}”(hŒ'Enforce a ruleset on the calling thread”h]”hŒ'Enforce a ruleset on the calling thread”…”�”}”(hj»Eh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´M·hj¸Eh²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jE'hj­Dh²hh³jÆDh´M·ubeh}”(h]”h ]”(j³Œfunction”eh"]”h$]”h&]”jf'j³jg'jÓEjh'jÓEji'‰jj'‰jk'‰uh1j@%h²hhjŽDh³Nh´Nubjm')�”}”(hXÁ**Parameters** ``const int ruleset_fd`` File descriptor tied to the ruleset to merge with the target. ``const __u32 flags`` Supported values: **Description** - ``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF`` - ``LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON`` - ``LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF`` - ``LANDLOCK_RESTRICT_SELF_TSYNC`` - ``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS`` This system call enforces a Landlock ruleset on the current thread. Enforcing a ruleset requires that the task has ``CAP_SYS_ADMIN`` in its namespace or is running with no_new_privs. This avoids scenarios where unprivileged tasks can affect the behavior of privileged children. With ``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS``, the no_new_privs attribute of the calling thread is set only once the enforcement of the ruleset succeeded, which fulfills the above requirement: no_new_privs is set if and only if the call succeeds. - ``EOPNOTSUPP``: Landlock is supported by the kernel but disabled at boot time; - ``EINVAL``: **flags** contains an unknown bit. - ``EBADF``: **ruleset_fd** is not a file descriptor for the current thread; - ``EBADFD``: **ruleset_fd** is not a ruleset file descriptor; - ``EPERM``: **ruleset_fd** has no read access to the underlying ruleset, or ``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS`` is not set while the current thread is not running with no_new_privs and doesn't have ``CAP_SYS_ADMIN`` in its namespace. - ``E2BIG``: The maximum number of stacked rulesets is reached for the current thread. .. kernel-doc:: include/uapi/linux/landlock.h :identifiers: landlock_restrict_self_flags **Return** 0 on success, or -errno on failure. Possible returned errors are:”h]”(j()�”}”(hŒ**Parameters**”h]”j|)�”}”(hjÝEh]”hŒ Parameters”…”�”}”(hjßEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjÛEubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´M»hj×Eubj")�”}”(hhh]”(j')�”}”(hŒW``const int ruleset_fd`` File descriptor tied to the ruleset to merge with the target. ”h]”(j-)�”}”(hŒ``const int ruleset_fd``”h]”jŽ)�”}”(hjüEh]”hŒconst int ruleset_fd”…”�”}”(hjþEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjúEubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´M¹hjöEubj=)�”}”(hhh]”j()�”}”(hŒ=File descriptor tied to the ruleset to merge with the target.”h]”hŒ=File descriptor tied to the ruleset to merge with the target.”…”�”}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³jFh´M¹hjFubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjöEubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jFh´M¹hjóEubj')�”}”(hŒ(``const __u32 flags`` Supported values: ”h]”(j-)�”}”(hŒ``const __u32 flags``”h]”jŽ)�”}”(hj5Fh]”hŒconst __u32 flags”…”�”}”(hj7Fh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj3Fubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´Mºhj/Fubj=)�”}”(hhh]”j()�”}”(hŒSupported values:”h]”hŒSupported values:”…”�”}”(hjNFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³jJFh´MºhjKFubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj/Fubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jJFh´MºhjóEubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hj×Eubj()�”}”(hŒ**Description**”h]”j|)�”}”(hjpFh]”hŒ Description”…”�”}”(hjrFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjnFubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´M¼hj×Eubj¢()�”}”(hŒÙ- ``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF`` - ``LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON`` - ``LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF`` - ``LANDLOCK_RESTRICT_SELF_TSYNC`` - ``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS`` ”h]”jb)�”}”(hhh]”(jg)�”}”(hŒ,``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF``”h]”j()�”}”(hj�Fh]”jŽ)�”}”(hj�Fh]”hŒ(LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF”…”�”}”(hj”Fh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj‘Fubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´M»hj�Fubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjŠFubjg)�”}”(hŒ*``LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON``”h]”j()�”}”(hj°Fh]”jŽ)�”}”(hj°Fh]”hŒ&LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON”…”�”}”(hjµFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj²Fubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´M¼hj®Fubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjŠFubjg)�”}”(hŒ-``LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF``”h]”j()�”}”(hjÑFh]”jŽ)�”}”(hjÑFh]”hŒ)LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF”…”�”}”(hjÖFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjÓFubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´M½hjÏFubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjŠFubjg)�”}”(hŒ ``LANDLOCK_RESTRICT_SELF_TSYNC``”h]”j()�”}”(hjòFh]”jŽ)�”}”(hjòFh]”hŒLANDLOCK_RESTRICT_SELF_TSYNC”…”�”}”(hj÷Fh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjôFubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´M¾hjðFubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjŠFubjg)�”}”(hŒ(``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS`` ”h]”j()�”}”(hŒ'``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS``”h]”jŽ)�”}”(hjGh]”hŒ#LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS”…”�”}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjGubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´M¿hjGubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjŠFubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³j§Fh´M»hj†Fubah}”(h]”h ]”h"]”h$]”h&]”uh1j¡(h³j§Fh´M»hj×Eubj()�”}”(hXThis system call enforces a Landlock ruleset on the current thread. Enforcing a ruleset requires that the task has ``CAP_SYS_ADMIN`` in its namespace or is running with no_new_privs. This avoids scenarios where unprivileged tasks can affect the behavior of privileged children.”h]”(hŒsThis system call enforces a Landlock ruleset on the current thread. Enforcing a ruleset requires that the task has ”…”�”}”(hj?Gh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hjGGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj?GubhŒ’ in its namespace or is running with no_new_privs. This avoids scenarios where unprivileged tasks can affect the behavior of privileged children.”…”�”}”(hj?Gh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´MÁhj×Eubj()�”}”(hŒõWith ``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS``, the no_new_privs attribute of the calling thread is set only once the enforcement of the ruleset succeeded, which fulfills the above requirement: no_new_privs is set if and only if the call succeeds.”h]”(hŒWith ”…”�”}”(hj`Gh²hh³Nh´NubjŽ)�”}”(hŒ'``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS``”h]”hŒ#LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS”…”�”}”(hjhGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj`GubhŒÉ, the no_new_privs attribute of the calling thread is set only once the enforcement of the ruleset succeeded, which fulfills the above requirement: no_new_privs is set if and only if the call succeeds.”…”�”}”(hj`Gh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´MÆhj×Eubjb)�”}”(hhh]”(jg)�”}”(hŒN``EOPNOTSUPP``: Landlock is supported by the kernel but disabled at boot time;”h]”j()�”}”(hj†Gh]”(jŽ)�”}”(hŒ``EOPNOTSUPP``”h]”hŒ EOPNOTSUPP”…”�”}”(hj‹Gh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjˆGubhŒ@: Landlock is supported by the kernel but disabled at boot time;”…”�”}”(hjˆGh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´MÌhj„Gubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�Gubjg)�”}”(hŒ.``EINVAL``: **flags** contains an unknown bit.”h]”j()�”}”(hj¬Gh]”(jŽ)�”}”(hŒ ``EINVAL``”h]”hŒEINVAL”…”�”}”(hj±Gh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj®GubhŒ: ”…”�”}”(hj®Gh²hh³Nh´Nubj|)�”}”(hŒ **flags**”h]”hŒflags”…”�”}”(hjÃGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hj®GubhŒ contains an unknown bit.”…”�”}”(hj®Gh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´MÍhjªGubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�Gubjg)�”}”(hŒJ``EBADF``: **ruleset_fd** is not a file descriptor for the current thread;”h]”j()�”}”(hjäGh]”(jŽ)�”}”(hŒ ``EBADF``”h]”hŒEBADF”…”�”}”(hjéGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjæGubhŒ: ”…”�”}”(hjæGh²hh³Nh´Nubj|)�”}”(hŒ**ruleset_fd**”h]”hŒ ruleset_fd”…”�”}”(hjûGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjæGubhŒ1 is not a file descriptor for the current thread;”…”�”}”(hjæGh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´MÎhjâGubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�Gubjg)�”}”(hŒ<``EBADFD``: **ruleset_fd** is not a ruleset file descriptor;”h]”j()�”}”(hjHh]”(jŽ)�”}”(hŒ ``EBADFD``”h]”hŒEBADFD”…”�”}”(hj!Hh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjHubhŒ: ”…”�”}”(hjHh²hh³Nh´Nubj|)�”}”(hŒ**ruleset_fd**”h]”hŒ ruleset_fd”…”�”}”(hj3Hh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjHubhŒ" is not a ruleset file descriptor;”…”�”}”(hjHh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´MÏhjHubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�Gubjg)�”}”(hŒì``EPERM``: **ruleset_fd** has no read access to the underlying ruleset, or ``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS`` is not set while the current thread is not running with no_new_privs and doesn't have ``CAP_SYS_ADMIN`` in its namespace.”h]”j()�”}”(hŒì``EPERM``: **ruleset_fd** has no read access to the underlying ruleset, or ``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS`` is not set while the current thread is not running with no_new_privs and doesn't have ``CAP_SYS_ADMIN`` in its namespace.”h]”(jŽ)�”}”(hŒ ``EPERM``”h]”hŒEPERM”…”�”}”(hjZHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjVHubhŒ: ”…”�”}”(hjVHh²hh³Nh´Nubj|)�”}”(hŒ**ruleset_fd**”h]”hŒ ruleset_fd”…”�”}”(hjlHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjVHubhŒ2 has no read access to the underlying ruleset, or ”…”�”}”(hjVHh²hh³Nh´NubjŽ)�”}”(hŒ'``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS``”h]”hŒ#LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS”…”�”}”(hj~Hh²h•ôh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjVHubhŒY is not set while the current thread is not running with no_new_privs and doesn’t have ”…”�”}”(hjVHh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hj�Hh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjVHubhŒ in its namespace.”…”�”}”(hjVHh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´MÐhjRHubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�Gubjg)�”}”(hŒU``E2BIG``: The maximum number of stacked rulesets is reached for the current thread. ”h]”j()�”}”(hŒT``E2BIG``: The maximum number of stacked rulesets is reached for the current thread.”h]”(jŽ)�”}”(hŒ ``E2BIG``”h]”hŒE2BIG”…”�”}”(hj·Hh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj³HubhŒK: The maximum number of stacked rulesets is reached for the current thread.”…”�”}”(hj³Hh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´MÔhj¯Hubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�Gubeh}”(h]”h ]”h"]”h$]”h&]”jôjâuh1jah³j£Gh´MÌhj×Eubj()�”}”(hŒ **Flags**”h]”j|)�”}”(hjÞHh]”hŒFlags”…”�”}”(hjàHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjÜHubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´K‹hj×Eubj()�”}”(hX€By default, denied accesses originating from programs that sandbox themselves are logged via the audit subsystem. Such events typically indicate unexpected behavior, such as bugs or exploitation attempts. However, to avoid excessive logging, access requests denied by a domain not created by the originating program are not logged by default. The rationale is that programs should know their own behavior, but not necessarily the behavior of other programs. This default configuration is suitable for most programs that sandbox themselves. For specific use cases, the following flags allow programs to modify this default logging behavior.”h]”hX€By default, denied accesses originating from programs that sandbox themselves are logged via the audit subsystem. Such events typically indicate unexpected behavior, such as bugs or exploitation attempts. However, to avoid excessive logging, access requests denied by a domain not created by the originating program are not logged by default. The rationale is that programs should know their own behavior, but not necessarily the behavior of other programs. This default configuration is suitable for most programs that sandbox themselves. For specific use cases, the following flags allow programs to modify this default logging behavior.”…”�”}”(hjôHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´K�hj×Eubj()�”}”(hŒ‘The ``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF`` and ``LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON`` flags apply to the newly created Landlock domain.”h]”(hŒThe ”…”�”}”(hjIh²hh³Nh´NubjŽ)�”}”(hŒ,``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF``”h]”hŒ(LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF”…”�”}”(hj Ih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjIubhŒ and ”…”�”}”(hjIh²hh³Nh´NubjŽ)�”}”(hŒ*``LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON``”h]”hŒ&LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON”…”�”}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjIubhŒ2 flags apply to the newly created Landlock domain.”…”�”}”(hjIh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´K—hj×Eubj")�”}”(hhh]”(j')�”}”(hX``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF`` Disables logging of denied accesses originating from the thread creating the Landlock domain, as well as its children, as long as they continue running the same executable code (i.e., without an intervening :manpage:`execve(2)` call). This is intended for programs that execute unknown code without invoking :manpage:`execve(2)`, such as script interpreters. Programs that only sandbox themselves should not set this flag, so users can be notified of unauthorized access attempts via system logs. ”h]”(j-)�”}”(hŒ,``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF``”h]”jŽ)�”}”(hj?Ih]”hŒ(LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF”…”�”}”(hjAIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj=Iubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´K£hj9Iubj=)�”}”(hhh]”j()�”}”(hXðDisables logging of denied accesses originating from the thread creating the Landlock domain, as well as its children, as long as they continue running the same executable code (i.e., without an intervening :manpage:`execve(2)` call). This is intended for programs that execute unknown code without invoking :manpage:`execve(2)`, such as script interpreters. Programs that only sandbox themselves should not set this flag, so users can be notified of unauthorized access attempts via system logs.”h]”(hŒÏDisables logging of denied accesses originating from the thread creating the Landlock domain, as well as its children, as long as they continue running the same executable code (i.e., without an intervening ”…”�”}”(hjXIh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`execve(2)`”h]”hŒ execve(2)”…”�”}”(hj`Ih²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ execve(2)”jߌexecve”jájîuh1jÍhjXIubhŒQ call). This is intended for programs that execute unknown code without invoking ”…”�”}”(hjXIh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`execve(2)`”h]”hŒ execve(2)”…”�”}”(hjtIh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ execve(2)”jߌexecve”jájîuh1jÍhjXIubhŒ¨, such as script interpreters. Programs that only sandbox themselves should not set this flag, so users can be notified of unauthorized access attempts via system logs.”…”�”}”(hjXIh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´KœhjUIubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj9Iubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jTIh´K£hj6Iubj')�”}”(hXÁ``LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON`` Enables logging of denied accesses after an :manpage:`execve(2)` call, providing visibility into unauthorized access attempts by newly executed programs within the created Landlock domain. This flag is recommended only when all potential executables in the domain are expected to comply with the access restrictions, as excessive audit log entries could make it more difficult to identify critical events. ”h]”(j-)�”}”(hŒ*``LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON``”h]”jŽ)�”}”(hj¡Ih]”hŒ&LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON”…”�”}”(hj£Ih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjŸIubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´K«hj›Iubj=)�”}”(hhh]”j()�”}”(hX•Enables logging of denied accesses after an :manpage:`execve(2)` call, providing visibility into unauthorized access attempts by newly executed programs within the created Landlock domain. This flag is recommended only when all potential executables in the domain are expected to comply with the access restrictions, as excessive audit log entries could make it more difficult to identify critical events.”h]”(hŒ,Enables logging of denied accesses after an ”…”�”}”(hjºIh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`execve(2)`”h]”hŒ execve(2)”…”�”}”(hjÂIh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ execve(2)”jߌexecve”jájîuh1jÍhjºIubhXU call, providing visibility into unauthorized access attempts by newly executed programs within the created Landlock domain. This flag is recommended only when all potential executables in the domain are expected to comply with the access restrictions, as excessive audit log entries could make it more difficult to identify critical events.”…”�”}”(hjºIh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´K¦hj·Iubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hj›Iubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³j¶Ih´K«hj6Iubj')�”}”(hXL``LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF`` Disables logging of denied accesses originating from nested Landlock domains created by the caller or its descendants. This flag should be set according to runtime configuration, not hardcoded, to avoid suppressing important security events. It is useful for container runtimes or sandboxing tools that may launch programs which themselves create Landlock domains and could otherwise generate excessive logs. Unlike ``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF``, this flag only affects future nested domains, not the one being created. It can also be used with a **ruleset_fd** value of -1 to mute subdomain logs without creating a domain. When combined with ``LANDLOCK_RESTRICT_SELF_TSYNC`` and a **ruleset_fd** value of -1, this configuration is propagated to all threads of the current process. ”h]”(j-)�”}”(hŒ-``LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF``”h]”jŽ)�”}”(hjïIh]”hŒ)LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF”…”�”}”(hjñIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjíIubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´K¹hjéIubj=)�”}”(hhh]”j()�”}”(hXDisables logging of denied accesses originating from nested Landlock domains created by the caller or its descendants. This flag should be set according to runtime configuration, not hardcoded, to avoid suppressing important security events. It is useful for container runtimes or sandboxing tools that may launch programs which themselves create Landlock domains and could otherwise generate excessive logs. Unlike ``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF``, this flag only affects future nested domains, not the one being created. It can also be used with a **ruleset_fd** value of -1 to mute subdomain logs without creating a domain. When combined with ``LANDLOCK_RESTRICT_SELF_TSYNC`` and a **ruleset_fd** value of -1, this configuration is propagated to all threads of the current process.”h]”(hX Disables logging of denied accesses originating from nested Landlock domains created by the caller or its descendants. This flag should be set according to runtime configuration, not hardcoded, to avoid suppressing important security events. It is useful for container runtimes or sandboxing tools that may launch programs which themselves create Landlock domains and could otherwise generate excessive logs. Unlike ”…”�”}”(hjJh²hh³Nh´NubjŽ)�”}”(hŒ,``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF``”h]”hŒ(LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjJubhŒf, this flag only affects future nested domains, not the one being created. It can also be used with a ”…”�”}”(hjJh²hh³Nh´Nubj|)�”}”(hŒ**ruleset_fd**”h]”hŒ ruleset_fd”…”�”}”(hj"Jh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjJubhŒS value of -1 to mute subdomain logs without creating a domain. When combined with ”…”�”}”(hjJh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_RESTRICT_SELF_TSYNC``”h]”hŒLANDLOCK_RESTRICT_SELF_TSYNC”…”�”}”(hj4Jh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjJubhŒ and a ”…”�”}”(hjJh²hh³Nh´Nubj|)�”}”(hŒ**ruleset_fd**”h]”hŒ ruleset_fd”…”�”}”(hjFJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjJubhŒU value of -1, this configuration is propagated to all threads of the current process.”…”�”}”(hjJh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´K®hjJubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjéIubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jJh´K¹hj6Iubeh}”(h]”h ]”h"]”h$]”h&]”uh1j!hj×Eubj()�”}”(hŒJThe following flag supports policy enforcement in multithreaded processes:”h]”hŒJThe following flag supports policy enforcement in multithreaded processes:”…”�”}”(hjqJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´K»hj×Eubj")�”}”(hhh]”j')�”}”(hXÏ``LANDLOCK_RESTRICT_SELF_TSYNC`` Applies the new Landlock configuration atomically to all threads of the current process, including the Landlock domain and logging configuration. This overrides the Landlock configuration of sibling threads, irrespective of previously established Landlock domains and logging configurations on these threads. If the calling thread is running with no_new_privs, this operation enables no_new_privs on the sibling threads as well. ”h]”(j-)�”}”(hŒ ``LANDLOCK_RESTRICT_SELF_TSYNC``”h]”jŽ)�”}”(hj‰Jh]”hŒLANDLOCK_RESTRICT_SELF_TSYNC”…”�”}”(hj‹Jh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj‡Jubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´KÅhjƒJubj=)�”}”(hhh]”(j()�”}”(hX4Applies the new Landlock configuration atomically to all threads of the current process, including the Landlock domain and logging configuration. This overrides the Landlock configuration of sibling threads, irrespective of previously established Landlock domains and logging configurations on these threads.”h]”hX4Applies the new Landlock configuration atomically to all threads of the current process, including the Landlock domain and logging configuration. This overrides the Landlock configuration of sibling threads, irrespective of previously established Landlock domains and logging configurations on these threads.”…”�”}”(hj¢Jh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´K¾hjŸJubj()�”}”(hŒwIf the calling thread is running with no_new_privs, this operation enables no_new_privs on the sibling threads as well.”h]”hŒwIf the calling thread is running with no_new_privs, this operation enables no_new_privs on the sibling threads as well.”…”�”}”(hj±Jh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´KÄhjŸJubeh}”(h]”h ]”h"]”h$]”h&]”uh1j<hjƒJubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jžJh´KÅhj€Jubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj×Eubj()�”}”(hŒNThe following flag ties the no_new_privs attribute to the ruleset enforcement:”h]”hŒNThe following flag ties the no_new_privs attribute to the ruleset enforcement:”…”�”}”(hjÒJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´KÇhj×Eubj")�”}”(hhh]”j')�”}”(hXÖ``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS`` Sets the no_new_privs attribute of the calling thread only once the enforcement of the ruleset succeeded: no_new_privs is set if and only if sys_landlock_restrict_self() succeeds. This removes the need for a prior :manpage:`prctl(2)` ``PR_SET_NO_NEW_PRIVS`` call (or ``CAP_SYS_ADMIN`` use). This flag requires a ruleset. When combined with ``LANDLOCK_RESTRICT_SELF_TSYNC``, no_new_privs is set on the sibling threads as well. ”h]”(j-)�”}”(hŒ'``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS``”h]”jŽ)�”}”(hjêJh]”hŒ#LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS”…”�”}”(hjìJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjèJubah}”(h]”h ]”h"]”h$]”h&]”uh1j,h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´KÒhjäJubj=)�”}”(hhh]”j()�”}”(hX¬Sets the no_new_privs attribute of the calling thread only once the enforcement of the ruleset succeeded: no_new_privs is set if and only if sys_landlock_restrict_self() succeeds. This removes the need for a prior :manpage:`prctl(2)` ``PR_SET_NO_NEW_PRIVS`` call (or ``CAP_SYS_ADMIN`` use). This flag requires a ruleset. When combined with ``LANDLOCK_RESTRICT_SELF_TSYNC``, no_new_privs is set on the sibling threads as well.”h]”(hŒ×Sets the no_new_privs attribute of the calling thread only once the enforcement of the ruleset succeeded: no_new_privs is set if and only if sys_landlock_restrict_self() succeeds. This removes the need for a prior ”…”�”}”(hjKh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`prctl(2)`”h]”hŒprctl(2)”…”�”}”(hj Kh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒprctl(2)”jߌprctl”jájîuh1jÍhjKubhŒ ”…”�”}”(hjKh²hh³Nh´NubjŽ)�”}”(hŒ``PR_SET_NO_NEW_PRIVS``”h]”hŒPR_SET_NO_NEW_PRIVS”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjKubhŒ call (or ”…”�”}”(hjKh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hj1Kh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjKubhŒ: use). This flag requires a ruleset. When combined with ”…”�”}”(hjKh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_RESTRICT_SELF_TSYNC``”h]”hŒLANDLOCK_RESTRICT_SELF_TSYNC”…”�”}”(hjCKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjKubhŒ5, no_new_privs is set on the sibling threads as well.”…”�”}”(hjKh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:45: ./include/uapi/linux/landlock.h”h´KËhjKubah}”(h]”h ]”h"]”h$]”h&]”uh1j<hjäJubeh}”(h]”h ]”h"]”h$]”h&]”uh1j&h³jÿJh´KÒhjáJubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj×Eubj()�”}”(hŒ **Return**”h]”j|)�”}”(hjpKh]”hŒReturn”…”�”}”(hjrKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{hjnKubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´MÚhj×Eubj()�”}”(hŒB0 on success, or -errno on failure. Possible returned errors are:”h]”hŒB0 on success, or -errno on failure. Possible returned errors are:”…”�”}”(hj†Kh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³Œd/var/lib/git/docbuild/linux/Documentation/userspace-api/landlock:837: ./security/landlock/syscalls.c”h´MÌhj×Eubeh}”(h]”h ]”Œ kernelindent”ah"]”h$]”h&]”uh1jl'hjŽDh²hh³Nh´Nubeh}”(h]”Œenforcing-a-ruleset”ah ]”h"]”Œenforcing a ruleset”ah$]”h&]”uh1hòhjih²hh³hÇh´MCubeh}”(h]”Œkernel-interface”ah ]”h"]”Œkernel interface”ah$]”h&]”uh1hòhhôh²hh³hÇh´M&ubhó)�”}”(hhh]”(hø)�”}”(hŒCurrent limitations”h]”hŒCurrent limitations”…”�”}”(hj¯Kh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj¬Kh²hh³hÇh´MIubhó)�”}”(hhh]”(hø)�”}”(hŒ Filesystem topology modification”h]”hŒ Filesystem topology modification”…”�”}”(hjÀKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj½Kh²hh³hÇh´MLubj()�”}”(hŒÂThreads sandboxed with filesystem restrictions cannot modify filesystem topology, whether via :manpage:`mount(2)` or :manpage:`pivot_root(2)`. However, :manpage:`chroot(2)` calls are not denied.”h]”(hŒ^Threads sandboxed with filesystem restrictions cannot modify filesystem topology, whether via ”…”�”}”(hjÎKh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`mount(2)`”h]”hŒmount(2)”…”�”}”(hjÖKh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒmount(2)”jߌmount”jájîuh1jÍhjÎKubhŒ or ”…”�”}”(hjÎKh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`pivot_root(2)`”h]”hŒ pivot_root(2)”…”�”}”(hjêKh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ pivot_root(2)”jߌ pivot_root”jájîuh1jÍhjÎKubhŒ . However, ”…”�”}”(hjÎKh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`chroot(2)`”h]”hŒ chroot(2)”…”�”}”(hjþKh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒ chroot(2)”jߌchroot”jájîuh1jÍhjÎKubhŒ calls are not denied.”…”�”}”(hjÎKh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MNhj½Kh²hubeh}”(h]”Œ filesystem-topology-modification”ah ]”h"]”Œ filesystem topology modification”ah$]”h&]”uh1hòhj¬Kh²hh³hÇh´MLubhó)�”}”(hhh]”(hø)�”}”(hŒSpecial filesystems”h]”hŒSpecial filesystems”…”�”}”(hj#Lh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj Lh²hh³hÇh´MSubj()�”}”(hXÌAccess to regular files and directories can be restricted by Landlock, according to the handled accesses of a ruleset. However, files that do not come from a user-visible filesystem (e.g. pipe, socket), but can still be accessed through ``/proc//fd/*``, cannot currently be explicitly restricted. Likewise, some special kernel filesystems such as nsfs, which can be accessed through ``/proc//ns/*``, cannot currently be explicitly restricted. However, thanks to the `ptrace restrictions`_, access to such sensitive ``/proc`` files are automatically restricted according to domain hierarchies. Future Landlock evolutions could still enable to explicitly restrict such paths with dedicated ruleset flags.”h]”(hŒîAccess to regular files and directories can be restricted by Landlock, according to the handled accesses of a ruleset. However, files that do not come from a user-visible filesystem (e.g. pipe, socket), but can still be accessed through ”…”�”}”(hj1Lh²hh³Nh´NubjŽ)�”}”(hŒ``/proc//fd/*``”h]”hŒ/proc//fd/*”…”�”}”(hj9Lh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj1LubhŒ„, cannot currently be explicitly restricted. Likewise, some special kernel filesystems such as nsfs, which can be accessed through ”…”�”}”(hj1Lh²hh³Nh´NubjŽ)�”}”(hŒ``/proc//ns/*``”h]”hŒ/proc//ns/*”…”�”}”(hjKLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj1LubhŒE, cannot currently be explicitly restricted. However, thanks to the ”…”�”}”(hj1Lh²hh³Nh´Nubj5)�”}”(hŒ`ptrace restrictions`_”h]”hŒptrace restrictions”…”�”}”(hj]Lh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œptrace restrictions”jFj© uh1j4hj1LjHKubhŒ, access to such sensitive ”…”�”}”(hj1Lh²hh³Nh´NubjŽ)�”}”(hŒ ``/proc``”h]”hŒ/proc”…”�”}”(hjqLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj1LubhŒ³ files are automatically restricted according to domain hierarchies. Future Landlock evolutions could still enable to explicitly restrict such paths with dedicated ruleset flags.”…”�”}”(hj1Lh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MUhj Lh²hubeh}”(h]”Œspecial-filesystems”ah ]”h"]”Œspecial filesystems”ah$]”h&]”uh1hòhj¬Kh²hh³hÇh´MSubhó)�”}”(hhh]”(hø)�”}”(hŒRuleset layers”h]”hŒRuleset layers”…”�”}”(hj”Lh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj‘Lh²hh³hÇh´Maubj()�”}”(hXÒThere is a limit of 16 layers of stacked rulesets. This can be an issue for a task willing to enforce a new ruleset in complement to its 16 inherited rulesets. Once this limit is reached, sys_landlock_restrict_self() returns E2BIG. It is then strongly suggested to carefully build rulesets once in the life of a thread, especially for applications able to launch other applications that may also want to sandbox themselves (e.g. shells, container managers, etc.).”h]”hXÒThere is a limit of 16 layers of stacked rulesets. This can be an issue for a task willing to enforce a new ruleset in complement to its 16 inherited rulesets. Once this limit is reached, sys_landlock_restrict_self() returns E2BIG. It is then strongly suggested to carefully build rulesets once in the life of a thread, especially for applications able to launch other applications that may also want to sandbox themselves (e.g. shells, container managers, etc.).”…”�”}”(hj¢Lh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mchj‘Lh²hubeh}”(h]”Œruleset-layers”ah ]”h"]”Œruleset layers”ah$]”h&]”uh1hòhj¬Kh²hh³hÇh´Maubhó)�”}”(hhh]”(hø)�”}”(hŒ Memory usage”h]”hŒ Memory usage”…”�”}”(hj»Lh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj¸Lh²hh³hÇh´Mlubj()�”}”(hŒ„Kernel memory allocated to create rulesets is accounted and can be restricted by the Documentation/admin-guide/cgroup-v1/memory.rst.”h]”hŒ„Kernel memory allocated to create rulesets is accounted and can be restricted by the Documentation/admin-guide/cgroup-v1/memory.rst.”…”�”}”(hjÉLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mnhj¸Lh²hubeh}”(h]”Œ memory-usage”ah ]”h"]”Œ memory usage”ah$]”h&]”uh1hòhj¬Kh²hh³hÇh´Mlubhó)�”}”(hhh]”(hø)�”}”(hŒ IOCTL support”h]”hŒ IOCTL support”…”�”}”(hjâLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjßLh²hh³hÇh´Mrubj()�”}”(hŒòThe ``LANDLOCK_ACCESS_FS_IOCTL_DEV`` right restricts the use of :manpage:`ioctl(2)`, but it only applies to *newly opened* device files. This means specifically that pre-existing file descriptors like stdin, stdout and stderr are unaffected.”h]”(hŒThe ”…”�”}”(hjðLh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_IOCTL_DEV``”h]”hŒLANDLOCK_ACCESS_FS_IOCTL_DEV”…”�”}”(hjøLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjðLubhŒ right restricts the use of ”…”�”}”(hjðLh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`ioctl(2)`”h]”hŒioctl(2)”…”�”}”(hj Mh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒioctl(2)”jߌioctl”jájîuh1jÍhjðLubhŒ, but it only applies to ”…”�”}”(hjðLh²hh³Nh´Nubj| )�”}”(hŒ*newly opened*”h]”hŒ newly opened”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j{ hjðLubhŒx device files. This means specifically that pre-existing file descriptors like stdin, stdout and stderr are unaffected.”…”�”}”(hjðLh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MthjßLh²hubj()�”}”(hXUsers should be aware that TTY devices have traditionally permitted to control other processes on the same TTY through the ``TIOCSTI`` and ``TIOCLINUX`` IOCTL commands. Both of these require ``CAP_SYS_ADMIN`` on modern Linux systems, but the behavior is configurable for ``TIOCSTI``.”h]”(hŒ{Users should be aware that TTY devices have traditionally permitted to control other processes on the same TTY through the ”…”�”}”(hj6Mh²hh³Nh´NubjŽ)�”}”(hŒ ``TIOCSTI``”h]”hŒTIOCSTI”…”�”}”(hj>Mh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj6MubhŒ and ”…”�”}”(hj6Mh²hh³Nh´NubjŽ)�”}”(hŒ ``TIOCLINUX``”h]”hŒ TIOCLINUX”…”�”}”(hjPMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj6MubhŒ( IOCTL commands. Both of these require ”…”�”}”(hj6Mh²hh³Nh´NubjŽ)�”}”(hŒ``CAP_SYS_ADMIN``”h]”hŒ CAP_SYS_ADMIN”…”�”}”(hjbMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj6MubhŒ? on modern Linux systems, but the behavior is configurable for ”…”�”}”(hj6Mh²hh³Nh´NubjŽ)�”}”(hŒ ``TIOCSTI``”h]”hŒTIOCSTI”…”�”}”(hjtMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj6MubhŒ.”…”�”}”(hj6Mh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MyhjßLh²hubj()�”}”(hŒÂOn older systems, it is therefore recommended to close inherited TTY file descriptors, or to reopen them from ``/proc/self/fd/*`` without the ``LANDLOCK_ACCESS_FS_IOCTL_DEV`` right, if possible.”h]”(hŒnOn older systems, it is therefore recommended to close inherited TTY file descriptors, or to reopen them from ”…”�”}”(hjŒMh²hh³Nh´NubjŽ)�”}”(hŒ``/proc/self/fd/*``”h]”hŒ/proc/self/fd/*”…”�”}”(hj”Mh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjŒMubhŒ without the ”…”�”}”(hjŒMh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_IOCTL_DEV``”h]”hŒLANDLOCK_ACCESS_FS_IOCTL_DEV”…”�”}”(hj¦Mh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjŒMubhŒ right, if possible.”…”�”}”(hjŒMh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M~hjßLh²hubj()�”}”(hX1Landlock's IOCTL support is coarse-grained at the moment, but may become more fine-grained in the future. Until then, users are advised to establish the guarantees that they need through the file hierarchy, by only allowing the ``LANDLOCK_ACCESS_FS_IOCTL_DEV`` right on files where it is really required.”h]”(hŒçLandlock’s IOCTL support is coarse-grained at the moment, but may become more fine-grained in the future. Until then, users are advised to establish the guarantees that they need through the file hierarchy, by only allowing the ”…”�”}”(hj¾Mh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_IOCTL_DEV``”h]”hŒLANDLOCK_ACCESS_FS_IOCTL_DEV”…”�”}”(hjÆMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj¾MubhŒ, right on files where it is really required.”…”�”}”(hj¾Mh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M‚hjßLh²hubeh}”(h]”Œ ioctl-support”ah ]”h"]”Œ ioctl support”ah$]”h&]”uh1hòhj¬Kh²hh³hÇh´Mrubeh}”(h]”Œcurrent-limitations”ah ]”h"]”Œcurrent limitations”ah$]”h&]”uh1hòhhôh²hh³hÇh´MIubhó)�”}”(hhh]”(hø)�”}”(hŒPrevious limitations”h]”hŒPrevious limitations”…”�”}”(hjñMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjîMh²hh³hÇh´Mˆubhó)�”}”(hhh]”(hø)�”}”(hŒ#File renaming and linking (ABI < 2)”h]”hŒ#File renaming and linking (ABI < 2)”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjÿMh²hh³hÇh´M‹ubj()�”}”(hX•Because Landlock targets unprivileged access controls, it needs to properly handle composition of rules. Such property also implies rules nesting. Properly handling multiple layers of rulesets, each one of them able to restrict access to files, also implies inheritance of the ruleset restrictions from a parent to its hierarchy. Because files are identified and restricted by their hierarchy, moving or linking a file from one directory to another implies propagation of the hierarchy constraints, or restriction of these actions according to the potentially lost constraints. To protect against privilege escalations through renaming or linking, and for the sake of simplicity, Landlock previously limited linking and renaming to the same directory. Starting with the Landlock ABI version 2, it is now possible to securely control renaming and linking thanks to the new ``LANDLOCK_ACCESS_FS_REFER`` access right.”h]”(hXkBecause Landlock targets unprivileged access controls, it needs to properly handle composition of rules. Such property also implies rules nesting. Properly handling multiple layers of rulesets, each one of them able to restrict access to files, also implies inheritance of the ruleset restrictions from a parent to its hierarchy. Because files are identified and restricted by their hierarchy, moving or linking a file from one directory to another implies propagation of the hierarchy constraints, or restriction of these actions according to the potentially lost constraints. To protect against privilege escalations through renaming or linking, and for the sake of simplicity, Landlock previously limited linking and renaming to the same directory. Starting with the Landlock ABI version 2, it is now possible to securely control renaming and linking thanks to the new ”…”�”}”(hjNh²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_REFER``”h]”hŒLANDLOCK_ACCESS_FS_REFER”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjNubhŒ access right.”…”�”}”(hjNh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M�hjÿMh²hubeh}”(h]”Œfile-renaming-and-linking-abi-2”ah ]”h"]”Œ#file renaming and linking (abi < 2)”ah$]”h&]”uh1hòhjîMh²hh³hÇh´M‹ubhó)�”}”(hhh]”(hø)�”}”(hŒFile truncation (ABI < 3)”h]”hŒFile truncation (ABI < 3)”…”�”}”(hj;Nh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj8Nh²hh³hÇh´Mœubj()�”}”(hŒšFile truncation could not be denied before the third Landlock ABI, so it is always allowed when using a kernel that only supports the first or second ABI.”h]”hŒšFile truncation could not be denied before the third Landlock ABI, so it is always allowed when using a kernel that only supports the first or second ABI.”…”�”}”(hjINh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Mžhj8Nh²hubj()�”}”(hŒ›Starting with the Landlock ABI version 3, it is now possible to securely control truncation thanks to the new ``LANDLOCK_ACCESS_FS_TRUNCATE`` access right.”h]”(hŒnStarting with the Landlock ABI version 3, it is now possible to securely control truncation thanks to the new ”…”�”}”(hjWNh²hh³Nh´NubjŽ)�”}”(hŒ``LANDLOCK_ACCESS_FS_TRUNCATE``”h]”hŒLANDLOCK_ACCESS_FS_TRUNCATE”…”�”}”(hj_Nh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjWNubhŒ access right.”…”�”}”(hjWNh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M¡hj8Nh²hubeh}”(h]”Œfile-truncation-abi-3”ah ]”h"]”Œfile truncation (abi < 3)”ah$]”h&]”uh1hòhjîMh²hh³hÇh´Mœubhó)�”}”(hhh]”(hø)�”}”(hŒTCP bind and connect (ABI < 4)”h]”hŒTCP bind and connect (ABI < 4)”…”�”}”(hj‚Nh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjNh²hh³hÇh´M¥ubj()�”}”(hŒîStarting with the Landlock ABI version 4, it is now possible to restrict TCP bind and connect actions to only a set of allowed ports thanks to the new ``LANDLOCK_ACCESS_NET_BIND_TCP`` and ``LANDLOCK_ACCESS_NET_CONNECT_TCP`` access rights.”h]”(hŒ—Starting with the Landlock ABI version 4, it is now possible to restrict TCP bind and connect actions to only a set of allowed ports thanks to the new ”…”�”}”(hj�Nh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_NET_BIND_TCP``”h]”hŒLANDLOCK_ACCESS_NET_BIND_TCP”…”�”}”(hj˜Nh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj�NubhŒ and ”…”�”}”(hj�Nh²hh³Nh´NubjŽ)�”}”(hŒ#``LANDLOCK_ACCESS_NET_CONNECT_TCP``”h]”hŒLANDLOCK_ACCESS_NET_CONNECT_TCP”…”�”}”(hjªNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj�NubhŒ access rights.”…”�”}”(hj�Nh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M§hjNh²hubeh}”(h]”Œtcp-bind-and-connect-abi-4”ah ]”h"]”Œtcp bind and connect (abi < 4)”ah$]”h&]”uh1hòhjîMh²hh³hÇh´M¥ubhó)�”}”(hhh]”(hø)�”}”(hŒDevice IOCTL (ABI < 5)”h]”hŒDevice IOCTL (ABI < 5)”…”�”}”(hjÍNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjÊNh²hh³hÇh´M­ubj()�”}”(hŒ£IOCTL operations could not be denied before the fifth Landlock ABI, so :manpage:`ioctl(2)` is always allowed when using a kernel that only supports an earlier ABI.”h]”(hŒGIOCTL operations could not be denied before the fifth Landlock ABI, so ”…”�”}”(hjÛNh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`ioctl(2)`”h]”hŒioctl(2)”…”�”}”(hjãNh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒioctl(2)”jߌioctl”jájîuh1jÍhjÛNubhŒI is always allowed when using a kernel that only supports an earlier ABI.”…”�”}”(hjÛNh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M¯hjÊNh²hubj()�”}”(hŒ¸Starting with the Landlock ABI version 5, it is possible to restrict the use of :manpage:`ioctl(2)` on character and block devices using the new ``LANDLOCK_ACCESS_FS_IOCTL_DEV`` right.”h]”(hŒPStarting with the Landlock ABI version 5, it is possible to restrict the use of ”…”�”}”(hjýNh²hh³Nh´NubjÎ)�”}”(hŒ:manpage:`ioctl(2)`”h]”hŒioctl(2)”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”jÍah"]”h$]”h&]”hÅhÆjÝŒioctl(2)”jߌioctl”jájîuh1jÍhjýNubhŒ. on character and block devices using the new ”…”�”}”(hjýNh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_FS_IOCTL_DEV``”h]”hŒLANDLOCK_ACCESS_FS_IOCTL_DEV”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjýNubhŒ right.”…”�”}”(hjýNh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M³hjÊNh²hubeh}”(h]”Œdevice-ioctl-abi-5”ah ]”h"]”Œdevice ioctl (abi < 5)”ah$]”h&]”uh1hòhjîMh²hh³hÇh´M­ubhó)�”}”(hhh]”(hø)�”}”(hŒAbstract UNIX socket (ABI < 6)”h]”hŒAbstract UNIX socket (ABI < 6)”…”�”}”(hj/dev/null CONFIG_LSM="lockdown,yama,integrity,apparmor"”h]”hŒ~$ zgrep -h "^CONFIG_LSM=" "/boot/config-$(uname -r)" /proc/config.gz 2>/dev/null CONFIG_LSM="lockdown,yama,integrity,apparmor"”…”�”}”hj�Tsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj±‰j²Œconsole”j´}”uh1j¡h³hÇh´M8hj:Th²hubj()�”}”(hŒ:...and if the cmdline doesn't contain ``landlock`` either:”h]”(hŒ(...and if the cmdline doesn’t contain ”…”�”}”(hj­Th²hh³Nh´NubjŽ)�”}”(hŒ ``landlock``”h]”hŒlandlock”…”�”}”(hjµTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj­TubhŒ either:”…”�”}”(hj­Th²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M=hj:Th²hubj¢)�”}”(hŒW$ sed -n 's/.*\(\The kernel may be configured at build time to always load the ”…”�”}”(hj;Uh²hh³Nh´NubjŽ)�”}”(hŒ ``lockdown``”h]”hŒlockdown”…”�”}”(hjCUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj;UubhŒ and ”…”�”}”(hj;Uh²hh³Nh´NubjŽ)�”}”(hŒ``capability``”h]”hŒ capability”…”�”}”(hjUUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj;UubhŒE LSMs. In that case, these LSMs will appear at the beginning of the ”…”�”}”(hj;Uh²hh³Nh´NubjŽ)�”}”(hŒ``LSM: initializing``”h]”hŒLSM: initializing”…”�”}”(hjgUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj;UubhŒF log line as well, even if they are not configured in the boot loader.”…”�”}”(hj;Uh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MThj:Th²hubeh}”(h]”Œboot-time-configuration”ah ]”h"]”Œboot time configuration”ah$]”h&]”uh1hòhj¨Sh²hh³hÇh´M/ubhó)�”}”(hhh]”(hø)�”}”(hŒNetwork support”h]”hŒNetwork support”…”�”}”(hjŠUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj‡Uh²hh³hÇh´MZubj()�”}”(hXfTo be able to explicitly allow TCP or UDP operations (e.g., adding a network rule with ``LANDLOCK_ACCESS_NET_BIND_TCP``), the kernel must support the TCP/IP protocol suite (``CONFIG_INET=y``). Otherwise, sys_landlock_add_rule() returns an ``EAFNOSUPPORT`` error, which can safely be ignored because this kind of TCP or UDP operation is already not possible.”h]”(hŒWTo be able to explicitly allow TCP or UDP operations (e.g., adding a network rule with ”…”�”}”(hj˜Uh²hh³Nh´NubjŽ)�”}”(hŒ ``LANDLOCK_ACCESS_NET_BIND_TCP``”h]”hŒLANDLOCK_ACCESS_NET_BIND_TCP”…”�”}”(hj Uh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj˜UubhŒ6), the kernel must support the TCP/IP protocol suite (”…”�”}”(hj˜Uh²hh³Nh´NubjŽ)�”}”(hŒ``CONFIG_INET=y``”h]”hŒ CONFIG_INET=y”…”�”}”(hj²Uh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj˜UubhŒ2). Otherwise, sys_landlock_add_rule() returns an ”…”�”}”(hj˜Uh²hh³Nh´NubjŽ)�”}”(hŒ``EAFNOSUPPORT``”h]”hŒ EAFNOSUPPORT”…”�”}”(hjÄUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hj˜UubhŒf error, which can safely be ignored because this kind of TCP or UDP operation is already not possible.”…”�”}”(hj˜Uh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M\hj‡Uh²hubeh}”(h]”Œnetwork-support”ah ]”h"]”Œnetwork support”ah$]”h&]”uh1hòhj¨Sh²hh³hÇh´MZubeh}”(h]”(j—SŒid2”eh ]”h"]”(Œkernel support”Œkernel_support”eh$]”h&]”uh1hòhhôh²hh³hÇh´M!j}”jêUj�Ssj!}”j—Sj�Ssubhó)�”}”(hhh]”(hø)�”}”(hŒQuestions and answers”h]”hŒQuestions and answers”…”�”}”(hjòUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjïUh²hh³hÇh´Mcubhó)�”}”(hhh]”(hø)�”}”(hŒ'What about user space sandbox managers?”h]”hŒ'What about user space sandbox managers?”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjVh²hh³hÇh´Mfubj()�”}”(hX6Using user space processes to enforce restrictions on kernel resources can lead to race conditions or inconsistent evaluations (i.e. `Incorrect mirroring of the OS code and state `_).”h]”(hŒ…Using user space processes to enforce restrictions on kernel resources can lead to race conditions or inconsistent evaluations (i.e. ”…”�”}”(hjVh²hh³Nh´Nubj5)�”}”(hŒ¯`Incorrect mirroring of the OS code and state `_”h]”hŒ,Incorrect mirroring of the OS code and state”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ,Incorrect mirroring of the OS code and state”j²Œ}https://www.ndss-symposium.org/ndss2003/traps-and-pitfalls-practical-problems-system-call-interposition-based-security-tools/”uh1j4hjVubj¯)�”}”(hŒ€ ”h]”h}”(h]”Œ,incorrect-mirroring-of-the-os-code-and-state”ah ]”h"]”Œ,incorrect mirroring of the os code and state”ah$]”h&]”Œrefuri”j)Vuh1j®j¯ KhjVubhŒ).”…”�”}”(hjVh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MhhjVh²hubeh}”(h]”Œ&what-about-user-space-sandbox-managers”ah ]”h"]”Œ'what about user space sandbox managers?”ah$]”h&]”uh1hòhjïUh²hh³hÇh´Mfubhó)�”}”(hhh]”(hø)�”}”(hŒ%What about namespaces and containers?”h]”hŒ%What about namespaces and containers?”…”�”}”(hjLVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjIVh²hh³hÇh´Mnubj()�”}”(hXjNamespaces can help create sandboxes but they are not designed for access-control and then miss useful features for such use case (e.g. no fine-grained restrictions). Moreover, their complexity can lead to security issues, especially when untrusted processes can manipulate them (cf. `Controlling access to user namespaces `_).”•n!h]”(hXNamespaces can help create sandboxes but they are not designed for access-control and then miss useful features for such use case (e.g. no fine-grained restrictions). Moreover, their complexity can lead to security issues, especially when untrusted processes can manipulate them (cf. ”…”�”}”(hjZVh²hh³Nh´Nubj5)�”}”(hŒK`Controlling access to user namespaces `_”h]”hŒ%Controlling access to user namespaces”…”�”}”(hjbVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ%Controlling access to user namespaces”j²Œ https://lwn.net/Articles/673597/”uh1j4hjZVubj¯)�”}”(hŒ# ”h]”h}”(h]”Œ%controlling-access-to-user-namespaces”ah ]”h"]”Œ%controlling access to user namespaces”ah$]”h&]”Œrefuri”jrVuh1j®j¯ KhjZVubhŒ).”…”�”}”(hjZVh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MphjIVh²hubeh}”(h]”Œ$what-about-namespaces-and-containers”ah ]”h"]”Œ%what about namespaces and containers?”ah$]”h&]”uh1hòhjïUh²hh³hÇh´Mnubhó)�”}”(hhh]”(hø)�”}”(hŒ&How to disable Landlock audit records?”h]”hŒ&How to disable Landlock audit records?”…”�”}”(hj•Vh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj’Vh²hh³hÇh´Mwubj()�”}”(hŒdYou might want to put in place filters as explained here: Documentation/admin-guide/LSM/landlock.rst”h]”hŒdYou might want to put in place filters as explained here: Documentation/admin-guide/LSM/landlock.rst”…”�”}”(hj£Vh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´Myhj’Vh²hubeh}”(h]”Œ%how-to-disable-landlock-audit-records”ah ]”h"]”Œ&how to disable landlock audit records?”ah$]”h&]”uh1hòhjïUh²hh³hÇh´Mwubeh}”(h]”Œquestions-and-answers”ah ]”h"]”Œquestions and answers”ah$]”h&]”uh1hòhhôh²hh³hÇh´Mcubhó)�”}”(hhh]”(hø)�”}”(hŒAdditional documentation”h]”hŒAdditional documentation”…”�”}”(hjÄVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjÁVh²hh³hÇh´M}ubjb)�”}”(hhh]”(jg)�”}”(hŒ*Documentation/admin-guide/LSM/landlock.rst”h]”j()�”}”(hj×Vh]”hŒ*Documentation/admin-guide/LSM/landlock.rst”…”�”}”(hjÙVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´MhjÕVubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjÒVh²hh³hÇh´Nubjg)�”}”(hŒ'Documentation/trace/events-landlock.rst”h]”j()�”}”(hjîVh]”hŒ'Documentation/trace/events-landlock.rst”…”�”}”(hjðVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M€hjìVubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjÒVh²hh³hÇh´Nubjg)�”}”(hŒ#Documentation/security/landlock.rst”h]”j()�”}”(hjWh]”hŒ#Documentation/security/landlock.rst”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M�hjWubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjÒVh²hh³hÇh´Nubjg)�”}”(hŒhttps://landlock.io ”h]”j()�”}”(hŒhttps://landlock.io”h]”j5)�”}”(hj Wh]”hŒhttps://landlock.io”…”�”}”(hj"Wh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j Wuh1j4hjWubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´M‚hjWubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjÒVh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jôjõuh1jah³hÇh´MhjÁVh²hubh¶)�”}”(hŒLinks”h]”hŒLinks”…”�”}”hjBWsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhjÁVh²hh³hÇh´M„ubj¯)�”}”(hŒ‡.. _samples/landlock/sandboxer.c: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/samples/landlock/sandboxer.c”h]”h}”(h]”Œsamples-landlock-sandboxer-c”ah ]”h"]”Œsamples/landlock/sandboxer.c”ah$]”h&]”j²j³uh1j®h´M…hjÁVh²hh³hÇj¯ Kubeh}”(h]”Œadditional-documentation”ah ]”h"]”Œadditional documentation”ah$]”h&]”uh1hòhhôh²hh³hÇh´M}ubeh}”(h]”Œ$landlock-unprivileged-access-control”ah ]”h"]”Œ%landlock: unprivileged access control”ah$]”h&]”uh1hòhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(h÷NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j�WŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”(Œ%capability and namespace restrictions”]”(j6j¥eŒsamples/landlock/sandboxer.c”]”j¢aŒptrace restrictions”]”(jÉ j]LeŒfilesystem flags”]”(jŠ,jÉ.j=eŒ network flags”]”(jØ,j•>eŒ scope flags”]”j&-aŒpermission flags”]”(j".j6AjžCeuŒrefids”}”(jÑ]”jÇajùO]”jïOaj—S]”j�SauŒnameids”}”(jiWjfWjPjMjÃjÀjˆj…j½jºj jýjq jn j¬ j© j j jpjGj‹jˆjHjEjfjcj×jÔj¹j¶jjÑjjj^j[j*j'jÁj¾jjjjjVjSj©Kj¦Kj%j%j%jG%j¬+j²+jˆDj 0j'0j,0jë9jñ9j(<j-<j¸=j½=j°?jµ?jBj BjžKjŽDj«Dj°DjèMj¬KjLj½Kj‹Lj Lj²Lj‘LjÙLj¸LjàMjßLj¢SjîMj2NjÿMjyNj8NjÄNjNj3OjÊNj’Oj9OjüOj˜OjùOjPjYPjPj•PjbPjâPj›PjUQjèPjÖQj[QjYRjÜQj¸Rj_RjšSj¾Rj—Sj¨SjæUj¨Sj4Tj¹Sj�Uj:TjÞUj‡Uj»VjïUjCVjVj0Vj*VjŒVjIVjyVjsVj³Vj’Vj^WjÁVjVWjPWuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”j�WKs…”R”Œparse_messages”]”Œtransform_messages”]”(hŒsystem_message”“”)�”}”(hhh]”j()�”}”(hhh]”hŒ;Hyperlink target "landlock-abi-versions" is not referenced.”…”�”}”hj Xsbah}”(h]”h ]”h"]”h$]”h&]”uh1j'hjXubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”MÇuh1jXubjX)�”}”(hhh]”j()�”}”(hhh]”hŒ8Hyperlink target "landlock-log-flags" is not referenced.”…”�”}”hj$Xsbah}”(h]”h ]”h"]”h$]”h&]”uh1j'hj!Xubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”jXŒsource”hÇŒline”MÅuh1jXubjX)�”}”(hhh]”j()�”}”(hhh]”hŒ4Hyperlink target "kernel-support" is not referenced.”…”�”}”hj>Xsbah}”(h]”h ]”h"]”h$]”h&]”uh1j'hj;Xubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”jXŒsource”hÇŒline”Muh1jXubeŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.