From be6984348e3774bf57566fd201f027c0bc30dae2 Mon Sep 17 00:00:00 2001 From: Lee Hinman <57081003+leehinman@users.noreply.github.com> Date: Mon, 26 Oct 2020 09:36:36 -0500 Subject: [PATCH] Incorporate librpm fix feedback (#22098) (#22116) - re-order imports - fix capitalization in error string (cherry picked from commit 3842bee898759378781ec37e0d0697637fcff60b) --- x-pack/auditbeat/module/system/package/rpm_linux.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/auditbeat/module/system/package/rpm_linux.go b/x-pack/auditbeat/module/system/package/rpm_linux.go index 6e5df7e0c6e..399c121f878 100644 --- a/x-pack/auditbeat/module/system/package/rpm_linux.go +++ b/x-pack/auditbeat/module/system/package/rpm_linux.go @@ -7,6 +7,7 @@ package pkg import ( + "debug/elf" "errors" "fmt" "runtime" @@ -14,8 +15,6 @@ import ( "time" "unsafe" - "debug/elf" - "github.com/coreos/pkg/dlopen" ) @@ -257,7 +256,7 @@ func openLibrpm() (*librpm, error) { librpm.handle, err = dlopen.GetHandle(librpmNames) if err != nil { - return nil, fmt.Errorf("Couldn't open %v", librpmNames) + return nil, fmt.Errorf("couldn't open %v: %v", librpmNames, err) } librpm.rpmtsCreate, err = librpm.handle.GetSymbolPointer("rpmtsCreate")