2023-09-25 01:22:41 +02:00
|
|
|
// apparmor.d - Full set of apparmor profiles
|
2024-02-07 00:16:21 +01:00
|
|
|
// Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
2023-09-25 01:22:41 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
|
|
|
|
package aa
|
|
|
|
|
|
|
|
import (
|
|
|
|
"reflect"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2024-06-27 12:39:36 +02:00
|
|
|
func TestRule_FromLog(t *testing.T) {
|
2024-05-29 22:17:21 +02:00
|
|
|
for _, tt := range testRule {
|
|
|
|
if tt.fromLog == nil {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
if got := tt.fromLog(tt.log); !reflect.DeepEqual(got, tt.rule) {
|
|
|
|
t.Errorf("RuleFromLog() = %v, want %v", got, tt.rule)
|
|
|
|
}
|
|
|
|
})
|
2023-09-25 01:22:41 +02:00
|
|
|
}
|
2024-05-29 22:17:21 +02:00
|
|
|
}
|
|
|
|
|
2024-06-27 12:39:36 +02:00
|
|
|
func TestRule_String(t *testing.T) {
|
2024-05-29 22:17:21 +02:00
|
|
|
for _, tt := range testRule {
|
2023-09-25 01:22:41 +02:00
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
2024-06-27 12:39:36 +02:00
|
|
|
if got := tt.rule.String(); got != tt.wString {
|
|
|
|
t.Errorf("Rule.String() = %v, want %v", got, tt.wString)
|
2023-09-25 01:22:41 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-27 12:39:36 +02:00
|
|
|
func TestRule_Validate(t *testing.T) {
|
2024-05-29 22:17:21 +02:00
|
|
|
for _, tt := range testRule {
|
2023-09-25 01:22:41 +02:00
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
2024-06-27 12:39:36 +02:00
|
|
|
if err := tt.rule.Validate(); (err != nil) != tt.wValidErr {
|
|
|
|
t.Errorf("Rules.Validate() error = %v, wantErr %v", err, tt.wValidErr)
|
2023-09-25 01:22:41 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2024-04-23 22:26:09 +02:00
|
|
|
|
2024-06-27 12:39:36 +02:00
|
|
|
func TestRule_Compare(t *testing.T) {
|
2024-05-29 22:17:21 +02:00
|
|
|
for _, tt := range testRule {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
2024-06-27 12:39:36 +02:00
|
|
|
if got := tt.rule.Compare(tt.other); got != tt.wCompare {
|
|
|
|
t.Errorf("Rule.Compare() = %v, want %v", got, tt.wCompare)
|
2024-05-29 22:17:21 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-27 12:39:36 +02:00
|
|
|
func TestRule_Merge(t *testing.T) {
|
2024-06-23 11:42:18 +02:00
|
|
|
for _, tt := range testRule {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
if got := tt.rule.Merge(tt.other); got != tt.wMerge {
|
|
|
|
t.Errorf("Rule.Merge() = %v, want %v", got, tt.wMerge)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-29 22:17:21 +02:00
|
|
|
var (
|
|
|
|
// Test cases for the Rule interface
|
|
|
|
testRule = []struct {
|
|
|
|
name string
|
|
|
|
fromLog func(map[string]string) Rule
|
|
|
|
log map[string]string
|
|
|
|
rule Rule
|
|
|
|
wValidErr bool
|
2024-06-19 19:39:16 +02:00
|
|
|
other Rule
|
|
|
|
wCompare int
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge bool
|
2024-05-29 22:17:21 +02:00
|
|
|
wString string
|
2024-04-23 22:26:09 +02:00
|
|
|
}{
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "comment",
|
|
|
|
rule: comment1,
|
|
|
|
other: comment2,
|
|
|
|
wCompare: 0,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "#comment",
|
2024-05-28 19:23:37 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "abi",
|
|
|
|
rule: abi1,
|
|
|
|
other: abi2,
|
|
|
|
wCompare: 1,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "abi <abi/4.0>,",
|
2024-05-28 19:23:37 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "alias",
|
|
|
|
rule: alias1,
|
|
|
|
other: alias2,
|
|
|
|
wCompare: -1,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "alias /mnt/usr -> /usr,",
|
2024-04-23 22:26:09 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "include1",
|
|
|
|
rule: include1,
|
|
|
|
other: includeLocal1,
|
|
|
|
wCompare: -11,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "include <abstraction/base>",
|
2024-04-23 22:26:09 +02:00
|
|
|
},
|
|
|
|
{
|
2024-05-29 22:17:21 +02:00
|
|
|
name: "include2",
|
|
|
|
rule: include1,
|
2024-06-19 19:39:16 +02:00
|
|
|
other: include2,
|
|
|
|
wCompare: 1,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-05-29 22:17:21 +02:00
|
|
|
wString: "include <abstraction/base>",
|
2024-04-23 22:26:09 +02:00
|
|
|
},
|
2024-05-28 19:23:37 +02:00
|
|
|
{
|
2024-05-29 22:17:21 +02:00
|
|
|
name: "include-local",
|
|
|
|
rule: includeLocal1,
|
2024-06-19 19:39:16 +02:00
|
|
|
other: include1,
|
|
|
|
wCompare: 11,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-05-29 22:17:21 +02:00
|
|
|
wString: "include if exists <local/foo>",
|
2024-05-28 19:23:37 +02:00
|
|
|
},
|
|
|
|
{
|
2024-09-27 13:20:48 +02:00
|
|
|
name: "include-abs",
|
2024-06-19 19:39:16 +02:00
|
|
|
rule: &Include{Path: "/usr/share/apparmor.d/", IsMagic: false},
|
|
|
|
other: &Include{Path: "/usr/share/apparmor.d/", IsMagic: true},
|
|
|
|
wCompare: -1,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: `include "/usr/share/apparmor.d/"`,
|
2024-05-28 19:23:37 +02:00
|
|
|
},
|
2024-04-23 22:26:09 +02:00
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "variable",
|
|
|
|
rule: variable1,
|
|
|
|
other: variable2,
|
2024-06-23 11:42:18 +02:00
|
|
|
wCompare: -3,
|
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "@{bin} = /{,usr/}{,s}bin",
|
2024-04-23 22:26:09 +02:00
|
|
|
},
|
2024-05-28 19:23:37 +02:00
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "all",
|
|
|
|
rule: all1,
|
|
|
|
other: all2,
|
|
|
|
wCompare: 0,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: true,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "all,",
|
2024-05-28 19:23:37 +02:00
|
|
|
},
|
2024-04-23 22:26:09 +02:00
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "rlimit",
|
|
|
|
rule: rlimit1,
|
|
|
|
other: rlimit2,
|
|
|
|
wCompare: 11,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "set rlimit nproc <= 200,",
|
2024-04-23 22:26:09 +02:00
|
|
|
},
|
|
|
|
{
|
2024-05-29 22:17:21 +02:00
|
|
|
name: "rlimit2",
|
|
|
|
rule: rlimit2,
|
2024-06-19 19:39:16 +02:00
|
|
|
other: rlimit2,
|
|
|
|
wCompare: 0,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-05-29 22:17:21 +02:00
|
|
|
wString: "set rlimit cpu <= 2,",
|
2024-04-23 22:26:09 +02:00
|
|
|
},
|
|
|
|
{
|
2024-05-29 22:17:21 +02:00
|
|
|
name: "rlimit3",
|
|
|
|
rule: rlimit3,
|
2024-06-19 19:39:16 +02:00
|
|
|
other: rlimit1,
|
|
|
|
wCompare: -1,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "set rlimit nproc < 2,",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "userns",
|
|
|
|
rule: userns1,
|
|
|
|
other: userns2,
|
|
|
|
wCompare: 1,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: true,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "userns,",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "capbability",
|
|
|
|
fromLog: newCapabilityFromLog,
|
|
|
|
log: capability1Log,
|
|
|
|
rule: capability1,
|
|
|
|
other: capability2,
|
|
|
|
wCompare: -5,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "capability net_admin,",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-09-27 13:20:48 +02:00
|
|
|
name: "capability-multi",
|
2024-06-19 19:39:16 +02:00
|
|
|
rule: &Capability{Names: []string{"dac_override", "dac_read_search"}},
|
|
|
|
other: capability2,
|
|
|
|
wCompare: -15,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "capability dac_override dac_read_search,",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-09-27 13:20:48 +02:00
|
|
|
name: "capability-all",
|
2024-06-19 19:39:16 +02:00
|
|
|
rule: &Capability{},
|
|
|
|
other: capability2,
|
|
|
|
wCompare: -1,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "capability,",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "network",
|
|
|
|
fromLog: newNetworkFromLog,
|
|
|
|
log: network1Log,
|
|
|
|
rule: network1,
|
|
|
|
wValidErr: true,
|
2024-06-19 19:39:16 +02:00
|
|
|
other: network2,
|
|
|
|
wCompare: 5,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-05-29 22:17:21 +02:00
|
|
|
wString: "network netlink raw,",
|
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "mount",
|
|
|
|
fromLog: newMountFromLog,
|
|
|
|
log: mount1Log,
|
|
|
|
rule: mount1,
|
|
|
|
other: mount2,
|
2024-09-27 13:20:48 +02:00
|
|
|
wCompare: 37,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "mount fstype=overlay overlay -> /var/lib/docker/overlay2/opaque-bug-check1209538631/merged/, # failed perms check",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "remount",
|
|
|
|
rule: remount1,
|
|
|
|
other: remount2,
|
|
|
|
wCompare: -6,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "remount /,",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "umount",
|
|
|
|
fromLog: newUmountFromLog,
|
|
|
|
log: umount1Log,
|
|
|
|
rule: umount1,
|
|
|
|
other: umount2,
|
|
|
|
wCompare: -8,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "umount /,",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "pivot_root1",
|
|
|
|
fromLog: newPivotRootFromLog,
|
|
|
|
log: pivotroot1Log,
|
|
|
|
rule: pivotroot1,
|
|
|
|
other: pivotroot2,
|
2024-09-27 13:20:48 +02:00
|
|
|
wCompare: -5,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "pivot_root oldroot=@{run}/systemd/mount-rootfs/ @{run}/systemd/mount-rootfs/,",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "pivot_root2",
|
|
|
|
rule: pivotroot1,
|
2024-06-19 19:39:16 +02:00
|
|
|
other: pivotroot3,
|
|
|
|
wCompare: 28,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-05-29 22:17:21 +02:00
|
|
|
wString: "pivot_root oldroot=@{run}/systemd/mount-rootfs/ @{run}/systemd/mount-rootfs/,",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "change_profile1",
|
|
|
|
fromLog: newChangeProfileFromLog,
|
|
|
|
log: changeprofile1Log,
|
|
|
|
rule: changeprofile1,
|
2024-06-19 19:39:16 +02:00
|
|
|
other: changeprofile2,
|
|
|
|
wCompare: 17,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-05-29 22:17:21 +02:00
|
|
|
wString: "change_profile -> systemd-user,",
|
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "change_profile2",
|
|
|
|
rule: changeprofile2,
|
|
|
|
other: changeprofile3,
|
|
|
|
wCompare: -4,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "change_profile -> brwap,",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "mqueue",
|
|
|
|
rule: mqueue1,
|
|
|
|
other: mqueue2,
|
|
|
|
wCompare: -3,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "mqueue r type=posix /,",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "iouring",
|
|
|
|
rule: iouring1,
|
|
|
|
other: iouring2,
|
|
|
|
wCompare: 4,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "io_uring sqpoll label=foo,",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "signal",
|
|
|
|
fromLog: newSignalFromLog,
|
|
|
|
log: signal1Log,
|
|
|
|
rule: signal1,
|
|
|
|
other: signal2,
|
|
|
|
wCompare: -10,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: true,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "signal receive set=kill peer=firefox//&firejail-default,",
|
|
|
|
},
|
|
|
|
{
|
2024-09-27 13:20:48 +02:00
|
|
|
name: "ptrace-xdg-document-portal",
|
2024-06-19 19:39:16 +02:00
|
|
|
fromLog: newPtraceFromLog,
|
|
|
|
log: ptrace1Log,
|
|
|
|
rule: ptrace1,
|
|
|
|
other: ptrace1,
|
|
|
|
wCompare: 0,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: true,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "ptrace read peer=nautilus,",
|
|
|
|
},
|
|
|
|
{
|
2024-09-27 13:20:48 +02:00
|
|
|
name: "ptrace-snap-update-ns.firefox",
|
2024-06-19 19:39:16 +02:00
|
|
|
fromLog: newPtraceFromLog,
|
|
|
|
log: ptrace2Log,
|
|
|
|
rule: ptrace2,
|
|
|
|
other: ptrace1,
|
|
|
|
wCompare: 2,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "ptrace readby peer=systemd-journald,",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "unix",
|
|
|
|
fromLog: newUnixFromLog,
|
|
|
|
log: unix1Log,
|
|
|
|
rule: unix1,
|
|
|
|
other: unix1,
|
|
|
|
wCompare: 0,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: true,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "unix (send receive) type=stream protocol=0 addr=none peer=(label=dbus-daemon, addr=@/tmp/dbus-AaKMpxzC4k),",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "dbus",
|
|
|
|
fromLog: newDbusFromLog,
|
|
|
|
log: dbus1Log,
|
|
|
|
rule: dbus1,
|
|
|
|
other: dbus1,
|
|
|
|
wCompare: 0,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: true,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "dbus receive bus=session path=/org/gtk/vfs/metadata\n interface=org.gtk.vfs.Metadata\n member=Remove\n peer=(name=:1.15, label=tracker-extract),",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "dbus2",
|
|
|
|
rule: dbus2,
|
2024-06-19 19:39:16 +02:00
|
|
|
other: dbus3,
|
|
|
|
wCompare: 9,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-05-29 22:17:21 +02:00
|
|
|
wString: "dbus bind bus=session name=org.gnome.evolution.dataserver.Sources5,",
|
|
|
|
},
|
|
|
|
{
|
2024-09-27 13:20:48 +02:00
|
|
|
name: "dbus-bind",
|
2024-06-19 19:39:16 +02:00
|
|
|
rule: &Dbus{Access: []string{"bind"}, Bus: "session", Name: "org.gnome.*"},
|
|
|
|
other: dbus2,
|
2024-06-23 11:42:18 +02:00
|
|
|
wCompare: -39,
|
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: `dbus bind bus=session name=org.gnome.*,`,
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "dbus/full",
|
|
|
|
rule: &Dbus{Bus: "accessibility"},
|
|
|
|
other: dbus1,
|
|
|
|
wCompare: -1,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: `dbus bus=accessibility,`,
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "file",
|
|
|
|
fromLog: newFileFromLog,
|
|
|
|
log: file1Log,
|
|
|
|
rule: file1,
|
|
|
|
other: file2,
|
|
|
|
wCompare: -14,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "/usr/share/poppler/cMap/Identity-H r,",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-09-27 13:20:48 +02:00
|
|
|
name: "file-all",
|
2024-05-29 22:17:21 +02:00
|
|
|
rule: &File{},
|
2024-06-19 19:39:16 +02:00
|
|
|
other: &File{},
|
|
|
|
wCompare: 0,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: true,
|
2024-09-27 13:20:48 +02:00
|
|
|
wString: " ,", // FIXME:
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-09-27 13:20:48 +02:00
|
|
|
name: "file-equal",
|
|
|
|
rule: &File{Path: "/usr/share/poppler/cMap/Identity-H"},
|
|
|
|
other: &File{Path: "/usr/share/poppler/cMap/Identity-H"},
|
|
|
|
wValidErr: true,
|
|
|
|
wCompare: 0,
|
|
|
|
wMerge: true,
|
|
|
|
wString: "/usr/share/poppler/cMap/Identity-H ,",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-09-27 13:20:48 +02:00
|
|
|
name: "file-owner",
|
|
|
|
rule: &File{Path: "/usr/share/poppler/cMap/Identity-H", Owner: true},
|
|
|
|
other: &File{Path: "/usr/share/poppler/cMap/Identity-H"},
|
|
|
|
wCompare: 1,
|
|
|
|
wValidErr: true,
|
|
|
|
wMerge: false,
|
|
|
|
wString: "owner /usr/share/poppler/cMap/Identity-H ,",
|
2024-05-29 22:17:21 +02:00
|
|
|
},
|
|
|
|
{
|
2024-09-27 13:20:48 +02:00
|
|
|
name: "file-access",
|
2024-05-29 22:17:21 +02:00
|
|
|
rule: &File{Path: "/usr/share/poppler/cMap/Identity-H", Access: []string{"r"}},
|
2024-06-19 19:39:16 +02:00
|
|
|
other: &File{Path: "/usr/share/poppler/cMap/Identity-H", Access: []string{"w"}},
|
|
|
|
wCompare: -5,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: true,
|
2024-05-29 22:17:21 +02:00
|
|
|
wString: "/usr/share/poppler/cMap/Identity-H r,",
|
2024-04-23 22:26:09 +02:00
|
|
|
},
|
|
|
|
{
|
2024-09-27 13:20:48 +02:00
|
|
|
name: "file-close",
|
|
|
|
rule: &File{Path: "/usr/share/poppler/cMap/"},
|
|
|
|
other: &File{Path: "/usr/share/poppler/cMap/Identity-H"},
|
|
|
|
wCompare: -10,
|
|
|
|
wValidErr: true,
|
|
|
|
wMerge: false,
|
|
|
|
wString: "/usr/share/poppler/cMap/ ,",
|
2024-04-23 22:26:09 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-19 19:39:16 +02:00
|
|
|
name: "link1",
|
|
|
|
fromLog: newLinkFromLog,
|
|
|
|
log: link1Log,
|
|
|
|
rule: link1,
|
|
|
|
other: link2,
|
|
|
|
wCompare: -1,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "link /tmp/mkinitcpio.QDWtza/early@{lib}/firmware/i915/dg1_dmc_ver2_02.bin.zst -> /tmp/mkinitcpio.QDWtza/root@{lib}/firmware/i915/dg1_dmc_ver2_02.bin.zst,",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "link2",
|
|
|
|
fromLog: newFileFromLog,
|
|
|
|
log: link3Log,
|
|
|
|
rule: link3,
|
|
|
|
other: link1,
|
|
|
|
wCompare: 1,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "owner link @{user_config_dirs}/kiorc -> @{user_config_dirs}/#3954,",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "profile",
|
|
|
|
rule: profile1,
|
|
|
|
other: profile2,
|
|
|
|
wCompare: -4,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "profile sudo {\n}",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "hat",
|
|
|
|
rule: hat1,
|
|
|
|
other: hat2,
|
|
|
|
wCompare: 3,
|
2024-06-23 11:42:18 +02:00
|
|
|
wMerge: false,
|
2024-06-19 19:39:16 +02:00
|
|
|
wString: "hat user {\n}",
|
2024-05-28 19:23:37 +02:00
|
|
|
},
|
2024-04-23 22:26:09 +02:00
|
|
|
}
|
2024-05-29 22:17:21 +02:00
|
|
|
)
|