diff --git a/autotests/folding/systemd-unit.service.fold b/autotests/folding/systemd-unit.service.fold
index 7c80348cf4f221992488d783ea509257e3e85dca..acfa52d91a845d32455725daf8b74e888df4947c 100644
--- a/autotests/folding/systemd-unit.service.fold
+++ b/autotests/folding/systemd-unit.service.fold
@@ -85,6 +85,12 @@ USBFunctionDescriptors = /some/absolute/path
USBFunctionStrings = /some/absolute/path
OOMPolicy = stop
+## from systemd.exec
+ExecPaths = some/path some/other/path
+ExtensionImages = /source/path
+IPCNamespacePath = /some/absolute/path
+NoExecPaths = some/path some/other/path
+PrivateIPC = false
## from systemd.exec Paths
WorkingDirectory = ~
RootDirectory = /some/path
@@ -281,7 +287,7 @@ Delegate = bpf-firewall
DisableControllers = cpu io
ManagedOOMSwap = auto
ManagedOOMMemoryPressure = kill
-ManagedOOMMemoryPressureLimitPercent = 50%
+ManagedOOMMemoryPressureLimit = 50%
[Slice]
@@ -981,6 +987,7 @@ ConditionCapability = CAP_AUDIT_CONTROL
ConditionCapability = CAP_AUDIT_READ
ConditionCapability = CAP_AUDIT_WRITE
ConditionCapability = CAP_BLOCK_SUSPEND
+ConditionCapability = CAP_CHECKPOINT_RESTORE
ConditionCapability = CAP_CHOWN
ConditionCapability = CAP_DAC_OVERRIDE
ConditionCapability = CAP_DAC_READ_SEARCH
@@ -1125,6 +1132,8 @@ AssertControlGroupController = cpuacct
AssertControlGroupController = devices
AssertControlGroupController = io
AssertControlGroupController = memory
+AssertControlGroupController = v1
+AssertControlGroupController = v2
## invalid values
AssertControlGroupController = invalid
AssertControlGroupController = bpf-firewall
@@ -1167,6 +1176,65 @@ CPUAffinity = numa 0 1 2
CPUAffinity = 0 1 2 numa
+###### cpu feature
+[Unit]
+ConditionCPUFeature = abm
+ConditionCPUFeature = adx
+ConditionCPUFeature = aes
+ConditionCPUFeature = apic
+ConditionCPUFeature = avx
+ConditionCPUFeature = avx2
+ConditionCPUFeature = bmi1
+ConditionCPUFeature = bmi2
+ConditionCPUFeature = clflush
+ConditionCPUFeature = cmov
+ConditionCPUFeature = constant_tsc
+ConditionCPUFeature = cx16
+ConditionCPUFeature = cx8
+ConditionCPUFeature = de
+ConditionCPUFeature = f16c
+ConditionCPUFeature = fma3
+ConditionCPUFeature = fpu
+ConditionCPUFeature = fxsr
+ConditionCPUFeature = ht
+ConditionCPUFeature = lahf_lm
+ConditionCPUFeature = lm
+ConditionCPUFeature = mca
+ConditionCPUFeature = mce
+ConditionCPUFeature = mmx
+ConditionCPUFeature = monitor
+ConditionCPUFeature = movbe
+ConditionCPUFeature = msr
+ConditionCPUFeature = mtrr
+ConditionCPUFeature = osxsave
+ConditionCPUFeature = pae
+ConditionCPUFeature = pat
+ConditionCPUFeature = pclmul
+ConditionCPUFeature = pge
+ConditionCPUFeature = pni
+ConditionCPUFeature = popcnt
+ConditionCPUFeature = pse
+ConditionCPUFeature = pse36
+ConditionCPUFeature = rdrand
+ConditionCPUFeature = rdseed
+ConditionCPUFeature = rdtscp
+ConditionCPUFeature = sep
+ConditionCPUFeature = sha_ni
+ConditionCPUFeature = sse
+ConditionCPUFeature = sse2
+ConditionCPUFeature = sse4_1
+ConditionCPUFeature = sse4_2
+ConditionCPUFeature = ssse3
+ConditionCPUFeature = syscall
+ConditionCPUFeature = tsc
+ConditionCPUFeature = vme
+ConditionCPUFeature = xsave
+## invalid values
+ConditionCPUFeature = invalid
+# multiple values
+ConditionCPUFeature = tsc mmx
+
+
###### cpu index list
[Service]
NUMAMask = 0 1 2
@@ -1283,7 +1351,7 @@ ExecStart = /some/cmd %u arg $var1 inside${var2}word ${var3} $var4
ExecStart = cmd1 %h arg1_1 $var1, cmd2 %u arg2_1 $var2_1\
$var2_2
# escapes (not exactly the same as detected by HlCStringChar)
-ExecStart = cmd \, \' \" \\ \a \b \f \n \r \s \t \v \x0A \012
+ExecStart = cmd \, \' \" \\ \a \b \f \n \r \s \t \v \x0A \012 \u1234 \U12abcdef
# prefix
ExecStart = @/some/cmd arg "@!+-:"
ExecStart = -/some/cmd-1 -option arg
@@ -1320,6 +1388,7 @@ SuccessExitStatus = CONFIG
SuccessExitStatus = CONFIGURATION_DIRECTORY
SuccessExitStatus = CONFIRM
SuccessExitStatus = CPUAFFINITY
+SuccessExitStatus = CREDENTIALS
SuccessExitStatus = DATAERR
SuccessExitStatus = EXCEPTION
SuccessExitStatus = EXEC
@@ -1822,6 +1891,17 @@ ManagedOOMSwap = invalid
ManagedOOMSwap = auto kill
+###### oom preference (out-of-memory killer preference)
+[Service]
+ManagedOOMPreference = avoid
+ManagedOOMPreference = none
+ManagedOOMPreference = omit
+## invalid values
+ManagedOOMPreference = invalid
+# multiple values
+ManagedOOMPreference = avoid none
+
+
###### oom policy (out-of-memory killer policy)
[Service]
OOMPolicy = continue
@@ -1966,6 +2046,7 @@ ConditionSecurity = ima
ConditionSecurity = selinux
ConditionSecurity = smack
ConditionSecurity = tomoyo
+ConditionSecurity = tpm2
ConditionSecurity = uefi-secureboot
## invalid values
ConditionSecurity = invalid
@@ -2085,6 +2166,7 @@ StandardOutput = kmsg
StandardOutput = kmsg+console
StandardOutput = null
StandardOutput = socket
+StandardOutput = truncate:/some/absolute/path
StandardOutput = tty
## invalid values
StandardOutput = invalid
diff --git a/autotests/html/systemd-unit.service.dark.html b/autotests/html/systemd-unit.service.dark.html
index 9af1f3ba1dad050a1eabbe8ddc7b95ee2e47d92f..f7d3965f6190ade92d1123859312b2a69f9ccad1 100644
--- a/autotests/html/systemd-unit.service.dark.html
+++ b/autotests/html/systemd-unit.service.dark.html
@@ -91,6 +91,12 @@
USBFunctionStrings = /some/absolute/path
OOMPolicy = stop
+## from systemd.exec
+ExecPaths = some/path some/other/path
+ExtensionImages = /source/path
+IPCNamespacePath = /some/absolute/path
+NoExecPaths = some/path some/other/path
+PrivateIPC = false
## from systemd.exec Paths
WorkingDirectory = ~
RootDirectory = /some/path
@@ -287,7 +293,7 @@
DisableControllers = cpu io
ManagedOOMSwap = auto
ManagedOOMMemoryPressure = kill
-ManagedOOMMemoryPressureLimitPercent = 50%
+ManagedOOMMemoryPressureLimit = 50%
[Slice]
@@ -987,6 +993,7 @@ WantedBy = some.service some.socket
ConditionCapability = CAP_AUDIT_READ
ConditionCapability = CAP_AUDIT_WRITE
ConditionCapability = CAP_BLOCK_SUSPEND
+ConditionCapability = CAP_CHECKPOINT_RESTORE
ConditionCapability = CAP_CHOWN
ConditionCapability = CAP_DAC_OVERRIDE
ConditionCapability = CAP_DAC_READ_SEARCH
@@ -1131,6 +1138,8 @@ WantedBy = some.service some.socket
AssertControlGroupController = devices
AssertControlGroupController = io
AssertControlGroupController = memory
+AssertControlGroupController = v1
+AssertControlGroupController = v2
## invalid values
AssertControlGroupController = invalid
AssertControlGroupController = bpf-firewall
@@ -1173,6 +1182,65 @@ WantedBy = some.service some.socket
CPUAffinity = 0 1 2 numa
+###### cpu feature
+[Unit]
+ConditionCPUFeature = abm
+ConditionCPUFeature = adx
+ConditionCPUFeature = aes
+ConditionCPUFeature = apic
+ConditionCPUFeature = avx
+ConditionCPUFeature = avx2
+ConditionCPUFeature = bmi1
+ConditionCPUFeature = bmi2
+ConditionCPUFeature = clflush
+ConditionCPUFeature = cmov
+ConditionCPUFeature = constant_tsc
+ConditionCPUFeature = cx16
+ConditionCPUFeature = cx8
+ConditionCPUFeature = de
+ConditionCPUFeature = f16c
+ConditionCPUFeature = fma3
+ConditionCPUFeature = fpu
+ConditionCPUFeature = fxsr
+ConditionCPUFeature = ht
+ConditionCPUFeature = lahf_lm
+ConditionCPUFeature = lm
+ConditionCPUFeature = mca
+ConditionCPUFeature = mce
+ConditionCPUFeature = mmx
+ConditionCPUFeature = monitor
+ConditionCPUFeature = movbe
+ConditionCPUFeature = msr
+ConditionCPUFeature = mtrr
+ConditionCPUFeature = osxsave
+ConditionCPUFeature = pae
+ConditionCPUFeature = pat
+ConditionCPUFeature = pclmul
+ConditionCPUFeature = pge
+ConditionCPUFeature = pni
+ConditionCPUFeature = popcnt
+ConditionCPUFeature = pse
+ConditionCPUFeature = pse36
+ConditionCPUFeature = rdrand
+ConditionCPUFeature = rdseed
+ConditionCPUFeature = rdtscp
+ConditionCPUFeature = sep
+ConditionCPUFeature = sha_ni
+ConditionCPUFeature = sse
+ConditionCPUFeature = sse2
+ConditionCPUFeature = sse4_1
+ConditionCPUFeature = sse4_2
+ConditionCPUFeature = ssse3
+ConditionCPUFeature = syscall
+ConditionCPUFeature = tsc
+ConditionCPUFeature = vme
+ConditionCPUFeature = xsave
+## invalid values
+ConditionCPUFeature = invalid
+# multiple values
+ConditionCPUFeature = tsc mmx
+
+
###### cpu index list
[Service]
NUMAMask = 0 1 2
@@ -1289,7 +1357,7 @@ WantedBy = some.service some.socket
ExecStart = cmd1 %h arg1_1 $var1, cmd2 %u arg2_1 $var2_1\
$var2_2
# escapes (not exactly the same as detected by HlCStringChar)
-ExecStart = cmd \, \' \" \\ \a \b \f \n \r \s \t \v \x0A \012
+ExecStart = cmd \, \' \" \\ \a \b \f \n \r \s \t \v \x0A \012 \u1234 \U12abcdef
# prefix
ExecStart = @/some/cmd arg "@!+-:"
ExecStart = -/some/cmd-1 -option arg
@@ -1326,6 +1394,7 @@ WantedBy = some.service some.socket
SuccessExitStatus = CONFIGURATION_DIRECTORY
SuccessExitStatus = CONFIRM
SuccessExitStatus = CPUAFFINITY
+SuccessExitStatus = CREDENTIALS
SuccessExitStatus = DATAERR
SuccessExitStatus = EXCEPTION
SuccessExitStatus = EXEC
@@ -1828,6 +1897,17 @@ WantedBy = some.service some.socket
ManagedOOMSwap = auto kill
+###### oom preference (out-of-memory killer preference)
+[Service]
+ManagedOOMPreference = avoid
+ManagedOOMPreference = none
+ManagedOOMPreference = omit
+## invalid values
+ManagedOOMPreference = invalid
+# multiple values
+ManagedOOMPreference = avoid none
+
+
###### oom policy (out-of-memory killer policy)
[Service]
OOMPolicy = continue
@@ -1972,6 +2052,7 @@ WantedBy = some.service some.socket
ConditionSecurity = selinux
ConditionSecurity = smack
ConditionSecurity = tomoyo
+ConditionSecurity = tpm2
ConditionSecurity = uefi-secureboot
## invalid values
ConditionSecurity = invalid
@@ -2091,6 +2172,7 @@ WantedBy = some.service some.socket
StandardOutput = kmsg+console
StandardOutput = null
StandardOutput = socket
+StandardOutput = truncate:/some/absolute/path
StandardOutput = tty
## invalid values
StandardOutput = invalid
diff --git a/autotests/html/systemd-unit.service.html b/autotests/html/systemd-unit.service.html
index 5e786690ecbd33de14c9f8b55368b9415d634cd7..6d2ea76e2fd6b4eaf8006865eac5161eca17e137 100644
--- a/autotests/html/systemd-unit.service.html
+++ b/autotests/html/systemd-unit.service.html
@@ -91,6 +91,12 @@
USBFunctionStrings = /some/absolute/path
OOMPolicy = stop
+## from systemd.exec
+ExecPaths = some/path some/other/path
+ExtensionImages = /source/path
+IPCNamespacePath = /some/absolute/path
+NoExecPaths = some/path some/other/path
+PrivateIPC = false
## from systemd.exec Paths
WorkingDirectory = ~
RootDirectory = /some/path
@@ -287,7 +293,7 @@
DisableControllers = cpu io
ManagedOOMSwap = auto
ManagedOOMMemoryPressure = kill
-ManagedOOMMemoryPressureLimitPercent = 50%
+ManagedOOMMemoryPressureLimit = 50%
[Slice]
@@ -987,6 +993,7 @@ WantedBy = some.service some.socket
ConditionCapability = CAP_AUDIT_READ
ConditionCapability = CAP_AUDIT_WRITE
ConditionCapability = CAP_BLOCK_SUSPEND
+ConditionCapability = CAP_CHECKPOINT_RESTORE
ConditionCapability = CAP_CHOWN
ConditionCapability = CAP_DAC_OVERRIDE
ConditionCapability = CAP_DAC_READ_SEARCH
@@ -1131,6 +1138,8 @@ WantedBy = some.service some.socket
AssertControlGroupController = devices
AssertControlGroupController = io
AssertControlGroupController = memory
+AssertControlGroupController = v1
+AssertControlGroupController = v2
## invalid values
AssertControlGroupController = invalid
AssertControlGroupController = bpf-firewall
@@ -1173,6 +1182,65 @@ WantedBy = some.service some.socket
CPUAffinity = 0 1 2 numa
+###### cpu feature
+[Unit]
+ConditionCPUFeature = abm
+ConditionCPUFeature = adx
+ConditionCPUFeature = aes
+ConditionCPUFeature = apic
+ConditionCPUFeature = avx
+ConditionCPUFeature = avx2
+ConditionCPUFeature = bmi1
+ConditionCPUFeature = bmi2
+ConditionCPUFeature = clflush
+ConditionCPUFeature = cmov
+ConditionCPUFeature = constant_tsc
+ConditionCPUFeature = cx16
+ConditionCPUFeature = cx8
+ConditionCPUFeature = de
+ConditionCPUFeature = f16c
+ConditionCPUFeature = fma3
+ConditionCPUFeature = fpu
+ConditionCPUFeature = fxsr
+ConditionCPUFeature = ht
+ConditionCPUFeature = lahf_lm
+ConditionCPUFeature = lm
+ConditionCPUFeature = mca
+ConditionCPUFeature = mce
+ConditionCPUFeature = mmx
+ConditionCPUFeature = monitor
+ConditionCPUFeature = movbe
+ConditionCPUFeature = msr
+ConditionCPUFeature = mtrr
+ConditionCPUFeature = osxsave
+ConditionCPUFeature = pae
+ConditionCPUFeature = pat
+ConditionCPUFeature = pclmul
+ConditionCPUFeature = pge
+ConditionCPUFeature = pni
+ConditionCPUFeature = popcnt
+ConditionCPUFeature = pse
+ConditionCPUFeature = pse36
+ConditionCPUFeature = rdrand
+ConditionCPUFeature = rdseed
+ConditionCPUFeature = rdtscp
+ConditionCPUFeature = sep
+ConditionCPUFeature = sha_ni
+ConditionCPUFeature = sse
+ConditionCPUFeature = sse2
+ConditionCPUFeature = sse4_1
+ConditionCPUFeature = sse4_2
+ConditionCPUFeature = ssse3
+ConditionCPUFeature = syscall
+ConditionCPUFeature = tsc
+ConditionCPUFeature = vme
+ConditionCPUFeature = xsave
+## invalid values
+ConditionCPUFeature = invalid
+# multiple values
+ConditionCPUFeature = tsc mmx
+
+
###### cpu index list
[Service]
NUMAMask = 0 1 2
@@ -1289,7 +1357,7 @@ WantedBy = some.service some.socket
ExecStart = cmd1 %h arg1_1 $var1, cmd2 %u arg2_1 $var2_1\
$var2_2
# escapes (not exactly the same as detected by HlCStringChar)
-ExecStart = cmd \, \' \" \\ \a \b \f \n \r \s \t \v \x0A \012
+ExecStart = cmd \, \' \" \\ \a \b \f \n \r \s \t \v \x0A \012 \u1234 \U12abcdef
# prefix
ExecStart = @/some/cmd arg "@!+-:"
ExecStart = -/some/cmd-1 -option arg
@@ -1326,6 +1394,7 @@ WantedBy = some.service some.socket
SuccessExitStatus = CONFIGURATION_DIRECTORY
SuccessExitStatus = CONFIRM
SuccessExitStatus = CPUAFFINITY
+SuccessExitStatus = CREDENTIALS
SuccessExitStatus = DATAERR
SuccessExitStatus = EXCEPTION
SuccessExitStatus = EXEC
@@ -1828,6 +1897,17 @@ WantedBy = some.service some.socket
ManagedOOMSwap = auto kill
+###### oom preference (out-of-memory killer preference)
+[Service]
+ManagedOOMPreference = avoid
+ManagedOOMPreference = none
+ManagedOOMPreference = omit
+## invalid values
+ManagedOOMPreference = invalid
+# multiple values
+ManagedOOMPreference = avoid none
+
+
###### oom policy (out-of-memory killer policy)
[Service]
OOMPolicy = continue
@@ -1972,6 +2052,7 @@ WantedBy = some.service some.socket
ConditionSecurity = selinux
ConditionSecurity = smack
ConditionSecurity = tomoyo
+ConditionSecurity = tpm2
ConditionSecurity = uefi-secureboot
## invalid values
ConditionSecurity = invalid
@@ -2091,6 +2172,7 @@ WantedBy = some.service some.socket
StandardOutput = kmsg+console
StandardOutput = null
StandardOutput = socket
+StandardOutput = truncate:/some/absolute/path
StandardOutput = tty
## invalid values
StandardOutput = invalid
diff --git a/autotests/input/systemd-unit.service b/autotests/input/systemd-unit.service
index 3b96e408d6d95311ed0e7614e9ce60f7481a9ea0..a8c01f54a11fcef8adbd369bcb966dd78e2d3607 100644
--- a/autotests/input/systemd-unit.service
+++ b/autotests/input/systemd-unit.service
@@ -85,6 +85,12 @@ USBFunctionDescriptors = /some/absolute/path
USBFunctionStrings = /some/absolute/path
OOMPolicy = stop
+## from systemd.exec
+ExecPaths = some/path some/other/path
+ExtensionImages = /source/path
+IPCNamespacePath = /some/absolute/path
+NoExecPaths = some/path some/other/path
+PrivateIPC = false
## from systemd.exec Paths
WorkingDirectory = ~
RootDirectory = /some/path
@@ -281,7 +287,7 @@ Delegate = bpf-firewall
DisableControllers = cpu io
ManagedOOMSwap = auto
ManagedOOMMemoryPressure = kill
-ManagedOOMMemoryPressureLimitPercent = 50%
+ManagedOOMMemoryPressureLimit = 50%
[Slice]
@@ -981,6 +987,7 @@ ConditionCapability = CAP_AUDIT_CONTROL
ConditionCapability = CAP_AUDIT_READ
ConditionCapability = CAP_AUDIT_WRITE
ConditionCapability = CAP_BLOCK_SUSPEND
+ConditionCapability = CAP_CHECKPOINT_RESTORE
ConditionCapability = CAP_CHOWN
ConditionCapability = CAP_DAC_OVERRIDE
ConditionCapability = CAP_DAC_READ_SEARCH
@@ -1125,6 +1132,8 @@ AssertControlGroupController = cpuacct
AssertControlGroupController = devices
AssertControlGroupController = io
AssertControlGroupController = memory
+AssertControlGroupController = v1
+AssertControlGroupController = v2
## invalid values
AssertControlGroupController = invalid
AssertControlGroupController = bpf-firewall
@@ -1167,6 +1176,65 @@ CPUAffinity = numa 0 1 2
CPUAffinity = 0 1 2 numa
+###### cpu feature
+[Unit]
+ConditionCPUFeature = abm
+ConditionCPUFeature = adx
+ConditionCPUFeature = aes
+ConditionCPUFeature = apic
+ConditionCPUFeature = avx
+ConditionCPUFeature = avx2
+ConditionCPUFeature = bmi1
+ConditionCPUFeature = bmi2
+ConditionCPUFeature = clflush
+ConditionCPUFeature = cmov
+ConditionCPUFeature = constant_tsc
+ConditionCPUFeature = cx16
+ConditionCPUFeature = cx8
+ConditionCPUFeature = de
+ConditionCPUFeature = f16c
+ConditionCPUFeature = fma3
+ConditionCPUFeature = fpu
+ConditionCPUFeature = fxsr
+ConditionCPUFeature = ht
+ConditionCPUFeature = lahf_lm
+ConditionCPUFeature = lm
+ConditionCPUFeature = mca
+ConditionCPUFeature = mce
+ConditionCPUFeature = mmx
+ConditionCPUFeature = monitor
+ConditionCPUFeature = movbe
+ConditionCPUFeature = msr
+ConditionCPUFeature = mtrr
+ConditionCPUFeature = osxsave
+ConditionCPUFeature = pae
+ConditionCPUFeature = pat
+ConditionCPUFeature = pclmul
+ConditionCPUFeature = pge
+ConditionCPUFeature = pni
+ConditionCPUFeature = popcnt
+ConditionCPUFeature = pse
+ConditionCPUFeature = pse36
+ConditionCPUFeature = rdrand
+ConditionCPUFeature = rdseed
+ConditionCPUFeature = rdtscp
+ConditionCPUFeature = sep
+ConditionCPUFeature = sha_ni
+ConditionCPUFeature = sse
+ConditionCPUFeature = sse2
+ConditionCPUFeature = sse4_1
+ConditionCPUFeature = sse4_2
+ConditionCPUFeature = ssse3
+ConditionCPUFeature = syscall
+ConditionCPUFeature = tsc
+ConditionCPUFeature = vme
+ConditionCPUFeature = xsave
+## invalid values
+ConditionCPUFeature = invalid
+# multiple values
+ConditionCPUFeature = tsc mmx
+
+
###### cpu index list
[Service]
NUMAMask = 0 1 2
@@ -1283,7 +1351,7 @@ ExecStart = /some/cmd %u arg $var1 inside${var2}word ${var3} $var4
ExecStart = cmd1 %h arg1_1 $var1, cmd2 %u arg2_1 $var2_1\
$var2_2
# escapes (not exactly the same as detected by HlCStringChar)
-ExecStart = cmd \, \' \" \\ \a \b \f \n \r \s \t \v \x0A \012
+ExecStart = cmd \, \' \" \\ \a \b \f \n \r \s \t \v \x0A \012 \u1234 \U12abcdef
# prefix
ExecStart = @/some/cmd arg "@!+-:"
ExecStart = -/some/cmd-1 -option arg
@@ -1320,6 +1388,7 @@ SuccessExitStatus = CONFIG
SuccessExitStatus = CONFIGURATION_DIRECTORY
SuccessExitStatus = CONFIRM
SuccessExitStatus = CPUAFFINITY
+SuccessExitStatus = CREDENTIALS
SuccessExitStatus = DATAERR
SuccessExitStatus = EXCEPTION
SuccessExitStatus = EXEC
@@ -1822,6 +1891,17 @@ ManagedOOMSwap = invalid
ManagedOOMSwap = auto kill
+###### oom preference (out-of-memory killer preference)
+[Service]
+ManagedOOMPreference = avoid
+ManagedOOMPreference = none
+ManagedOOMPreference = omit
+## invalid values
+ManagedOOMPreference = invalid
+# multiple values
+ManagedOOMPreference = avoid none
+
+
###### oom policy (out-of-memory killer policy)
[Service]
OOMPolicy = continue
@@ -1966,6 +2046,7 @@ ConditionSecurity = ima
ConditionSecurity = selinux
ConditionSecurity = smack
ConditionSecurity = tomoyo
+ConditionSecurity = tpm2
ConditionSecurity = uefi-secureboot
## invalid values
ConditionSecurity = invalid
@@ -2085,6 +2166,7 @@ StandardOutput = kmsg
StandardOutput = kmsg+console
StandardOutput = null
StandardOutput = socket
+StandardOutput = truncate:/some/absolute/path
StandardOutput = tty
## invalid values
StandardOutput = invalid
diff --git a/autotests/reference/systemd-unit.service.ref b/autotests/reference/systemd-unit.service.ref
index 178c68aace2e752122e30e6253c85f1448a90f4c..5d22a8be37dc18cbe48f92164baa9b59bcd161ac 100644
--- a/autotests/reference/systemd-unit.service.ref
+++ b/autotests/reference/systemd-unit.service.ref
@@ -85,6 +85,12 @@
= /some/absolute/path
= stop
+## from systemd.exec
+ = some/path some/other/path
+ = /source/path
+ = /some/absolute/path
+ = some/path some/other/path
+ = false
## from systemd.exec Paths
= ~
= /some/path
@@ -281,7 +287,7 @@
= cpu io
= auto
= kill
- = 50%
+ = 50%
@@ -981,6 +987,7 @@
= CAP_AUDIT_READ
= CAP_AUDIT_WRITE
= CAP_BLOCK_SUSPEND
+ = CAP_CHECKPOINT_RESTORE
= CAP_CHOWN
= CAP_DAC_OVERRIDE
= CAP_DAC_READ_SEARCH
@@ -1125,6 +1132,8 @@
= devices
= io
= memory
+ = v1
+ = v2
## invalid values
= invalid
= bpf-firewall
@@ -1167,6 +1176,65 @@
= 0 1 2 numa
+###### cpu feature
+
+ = abm
+ = adx
+ = aes
+ = apic
+ = avx
+ = avx2
+ = bmi1
+ = bmi2
+ = clflush
+ = cmov
+ = constant_tsc
+ = cx16
+ = cx8
+ = de
+ = f16c
+ = fma3
+ = fpu
+ = fxsr
+ = ht
+ = lahf_lm
+ = lm
+ = mca
+ = mce
+ = mmx
+ = monitor
+ = movbe
+ = msr
+ = mtrr
+ = osxsave
+ = pae
+ = pat
+ = pclmul
+ = pge
+ = pni
+ = popcnt
+ = pse
+ = pse36
+ = rdrand
+ = rdseed
+ = rdtscp
+ = sep
+ = sha_ni
+ = sse
+ = sse2
+ = sse4_1
+ = sse4_2
+ = ssse3
+ = syscall
+ = tsc
+ = vme
+ = xsave
+## invalid values
+ = invalid
+# multiple values
+ = tsc mmx
+
+
###### cpu index list
= 0 1 2
@@ -1283,7 +1351,7 @@
= cmd1 %h arg1_1 $var1, cmd2 %u arg2_1 $var2_1\
$var2_2
# escapes (not exactly the same as detected by HlCStringChar)
- = cmd \, \' \" \\ \a \b \f \n \r \s \t \v \x0A \012
+ = cmd \, \' \" \\ \a \b \f \n \r \s \t \v \x0A \012 \u1234 \U12abcdef
# prefix
= @/some/cmd arg "@!+-:"
= -/some/cmd-1 -option arg
@@ -1320,6 +1388,7 @@
= CONFIGURATION_DIRECTORY
= CONFIRM
= CPUAFFINITY
+ = CREDENTIALS
= DATAERR
= EXCEPTION
= EXEC
@@ -1822,6 +1891,17 @@
= auto kill
+###### oom preference (out-of-memory killer preference)
+
+ = avoid
+ = none
+ = omit
+## invalid values
+ = invalid
+# multiple values
+ = avoid none
+
+
###### oom policy (out-of-memory killer policy)
= continue
@@ -1966,6 +2046,7 @@
= selinux
= smack
= tomoyo
+ = tpm2
= uefi-secureboot
## invalid values
= invalid
@@ -2085,6 +2166,7 @@
= kmsg+console
= null
= socket
+ = truncate:/some/absolute/path
= tty
## invalid values
= invalid
diff --git a/data/syntax/systemd-unit.xml b/data/syntax/systemd-unit.xml
index 1bf5173c079729f4341fe88ead6803397dcdd800..ed9dd20a0a9166866dbbd7484788481b5f22f89a 100644
--- a/data/syntax/systemd-unit.xml
+++ b/data/syntax/systemd-unit.xml
@@ -1,9 +1,10 @@
-
+
+
@@ -20,7 +21,7 @@
]>
-
+
@@ -171,6 +172,7 @@
- CAP_DAC_READ_SEARCH
- CAP_DAC_OVERRIDE
- CAP_CHOWN
+ - CAP_CHECKPOINT_RESTORE
- CAP_BPF
- CAP_BLOCK_SUSPEND
- CAP_AUDIT_WRITE
@@ -195,6 +197,8 @@
- blkio
+ - v2
+ - v1
- pids
- memory
- io
@@ -203,6 +207,59 @@
- cpu
- blkio
+
+ - xsave
+ - vme
+ - tsc
+ - syscall
+ - ssse3
+ - sse4_2
+ - sse4_1
+ - sse2
+ - sse
+ - sha_ni
+ - sep
+ - rdtscp
+ - rdseed
+ - rdrand
+ - pse36
+ - pse
+ - popcnt
+ - pni
+ - pge
+ - pclmul
+ - pat
+ - pae
+ - osxsave
+ - mtrr
+ - msr
+ - movbe
+ - monitor
+ - mmx
+ - mce
+ - mca
+ - lm
+ - lahf_lm
+ - ht
+ - fxsr
+ - fpu
+ - fma3
+ - f16c
+ - de
+ - cx8
+ - cx16
+ - constant_tsc
+ - cmov
+ - clflush
+ - bmi2
+ - bmi1
+ - avx2
+ - avx
+ - apic
+ - aes
+ - adx
+ - abm
+
- rr
- other
@@ -398,6 +455,7 @@
- EXEC
- EXCEPTION
- DATAERR
+ - CREDENTIALS
- CPUAFFINITY
- CONFIRM
- CONFIGURATION_DIRECTORY
@@ -575,6 +633,11 @@
- kill
- continue
+
+ - omit
+ - none
+ - avoid
+
- x86-64
- x86
@@ -619,6 +682,7 @@
- uefi-secureboot
+ - tpm2
- tomoyo
- smack
- selinux
@@ -785,6 +849,8 @@
- CacheDirectory
- ConfigurationDirectory
+ - ExtensionImages
+ - IPCNamespacePath
- InaccessiblePaths
- LoadCredential
- LogNamespace
@@ -872,7 +938,6 @@
- - AssertEnvironment
- Description
- Documentation
- JobTimeoutRebootArgument
@@ -1073,6 +1138,9 @@
+
+
+
@@ -1104,9 +1172,8 @@
-
-
-
+
+
@@ -1246,6 +1313,9 @@
+
+
+
@@ -1321,7 +1391,7 @@
-
+
@@ -1435,6 +1505,7 @@
+
@@ -1468,10 +1539,12 @@
+
+
@@ -1574,7 +1647,8 @@
-
+
+
@@ -1696,9 +1770,11 @@
+
+
@@ -1706,6 +1782,7 @@
+
@@ -1722,6 +1799,7 @@
+