Skip to content

Commit c21d056

Browse files
authored
rule: fix filter by arch on ppc64le (#175)
Allow adding rules with filters like "-F arch=b64" and "-F arch=b32" on ppc64le.
1 parent 28d994d commit c21d056

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
### Changed
1313

14+
- rule: On ppc64le, fix handling of rules with filters like `-F arch=b64` or `-F arch=b32`. [#175](https://github.com/elastic/go-libaudit/pull/175)
15+
1416
### Removed
1517

1618
### Deprecated

rule/rule.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ func getArch(arch string) (string, uint32, error) {
865865
}
866866

867867
switch runtimeArch {
868-
case "aarch64", "x86_64", "ppc64", "s390x":
868+
case "aarch64", "x86_64", "ppc64", "ppc64le", "s390x":
869869
realArch = runtimeArch
870870
default:
871871
return "", 0, fmt.Errorf("cannot use b64 on %v", runtimeArch)
@@ -883,7 +883,7 @@ func getArch(arch string) (string, uint32, error) {
883883
realArch = "arm"
884884
case "x86_64":
885885
realArch = "i386"
886-
case "ppc64":
886+
case "ppc64", "ppc64le":
887887
realArch = "ppc"
888888
case "s390x":
889889
realArch = "s390"

0 commit comments

Comments
 (0)