summaryrefslogtreecommitdiffstats
path: root/test/fuzz/fuzz-network-parser/directives
diff options
context:
space:
mode:
authorTopi Miettinen <toiwoton@gmail.com>2022-08-20 19:52:48 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-08-29 07:23:17 +0200
commit4b3590c32457c938b0e351053069ddb344f35b31 (patch)
tree552531ae81eafefa429c0d895a710bc10aba7560 /test/fuzz/fuzz-network-parser/directives
parentsd-netlink: add NetLabel support (diff)
downloadsystemd-4b3590c32457c938b0e351053069ddb344f35b31.tar.xz
systemd-4b3590c32457c938b0e351053069ddb344f35b31.zip
network: NetLabel integration
New directive `NetLabel=` provides a method for integrating static and dynamic network configuration into Linux NetLabel subsystem rules, used by Linux Security Modules (LSMs) for network access control. The label, with suitable LSM rules, can be used to control connectivity of (for example) a service with peers in the local network. At least with SELinux, only the ingress can be controlled but not egress. The benefit of using this setting is that it may be possible to apply interface independent part of NetLabel configuration at very early stage of system boot sequence, at the time when the network interfaces are not available yet, with netlabelctl(8), and the per-interface configuration with systemd-networkd once the interfaces appear later. Currently this feature is only implemented for SELinux. The option expects a single NetLabel label. The label must conform to lexical restrictions of LSM labels. When an interface is configured with IP addresses, the addresses and subnetwork masks will be appended to the NetLabel Fallback Peer Labeling rules. They will be removed when the interface is deconfigured. Failures to manage the labels will be ignored. Example: ``` [DHCPv4] NetLabel=system_u:object_r:localnet_peer_t:s0 ``` With the above rules for interface `eth0`, when the interface is configured with an IPv4 address of 10.0.0.123/8, `systemd-networkd` performs the equivalent of `netlabelctl` operation ``` $ sudo netlabelctl unlbl add interface eth0 address:10.0.0.0/8 label:system_u:object_r:localnet_peer_t:s0 ``` Result: ``` $ sudo netlabelctl -p unlbl list ... interface: eth0 address: 10.0.0.0/8 label: "system_u:object_r:localnet_peer_t:s0" ... ```
Diffstat (limited to '')
-rw-r--r--test/fuzz/fuzz-network-parser/directives5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/fuzz/fuzz-network-parser/directives b/test/fuzz/fuzz-network-parser/directives
index 6f76f7ee18..171322ef20 100644
--- a/test/fuzz/fuzz-network-parser/directives
+++ b/test/fuzz/fuzz-network-parser/directives
@@ -132,6 +132,7 @@ MUDURL=
RouteMTUBytes=
FallbackLeaseLifetimeSec=
Use6RD=
+NetLabel=
[DHCPv6]
UseAddress=
UseDelegatedPrefix=
@@ -153,6 +154,7 @@ RouteMetric=
IAID=
DUIDType=
DUIDRawData=
+NetLabel=
[DHCPv6PrefixDelegation]
SubnetId=
Announce=
@@ -160,6 +162,7 @@ Assign=
ManageTemporaryAddress=
Token=
RouteMetric=
+NetLabel=
[DHCPPrefixDelegation]
UplinkInterface=
SubnetId=
@@ -168,6 +171,7 @@ Assign=
ManageTemporaryAddress=
Token=
RouteMetric=
+NetLabel=
[Route]
Destination=
Protocol=
@@ -346,6 +350,7 @@ EmitDomains=
Managed=
OtherInformation=
UplinkInterface=
+NetLabel=
[IPv6PrefixDelegation]
RouterPreference=
DNSLifetimeSec=