From ceb78d971e26b9f6bde5aebc8f6e65e6d73e9b81 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Tue, 19 Mar 2024 21:15:50 +0000 Subject: [PATCH] feat(tunables): improve hex variables. --- apparmor.d/tunables/multiarch.d/system | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/apparmor.d/tunables/multiarch.d/system b/apparmor.d/tunables/multiarch.d/system index b1c5cf22..fe4b1edf 100644 --- a/apparmor.d/tunables/multiarch.d/system +++ b/apparmor.d/tunables/multiarch.d/system @@ -12,24 +12,26 @@ # Single alphanumeric character @{c}=[0-9a-zA-Z] -# Up to 10 digits (0-9999999999) +# Integer up to 10 digits (0-9999999999) @{int}=[0-9]{[0-9],}{[0-9],}{[0-9],}{[0-9],}{[0-9],}{[0-9],}{[0-9],}{[0-9],}{[0-9],} +# Hexadecimal up to 64 characters +@{hex}=@{h}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},}{@{h},} +@{hex32}=@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h} +@{hex64}=@{hex32}@{hex32} +@{md5}=@{hex32} # kept for now for compatibility + # Any x alphanumeric characters +@{rand2}=@{c}@{c} +@{rand4}=@{c}@{c}@{c}@{c} @{rand6}=@{c}@{c}@{c}@{c}@{c}@{c} @{rand8}=@{c}@{c}@{c}@{c}@{c}@{c}@{c}@{c} @{rand9}=@{c}@{c}@{c}@{c}@{c}@{c}@{c}@{c}@{c} @{rand10}=@{c}@{c}@{c}@{c}@{c}@{c}@{c}@{c}@{c}@{c} -# MD5 hash -@{md5}=@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h} - # Universally unique identifier @{uuid}=@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}[-_]@{h}@{h}@{h}@{h}[-_]@{h}@{h}@{h}@{h}[-_]@{h}@{h}@{h}@{h}[-_]@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h}@{h} -# Hexadecimal -@{hex}=@{h}*@{h} - # Shortcut for PCI device @{pci_id}=@{h}@{h}@{h}@{h}:@{h}@{h}:@{h}@{h}.@{h} @{pci_bus}=pci@{h}@{h}@{h}@{h}:@{h}@{h}