Skip to content

Commit

Permalink
Osquerybeat: Fix osqueryd binary on linux executable permissions (#25760
Browse files Browse the repository at this point in the history
)

* Osquerybeat: Fix osqueryd binary on linux executable permissions

(cherry picked from commit 053b582)
  • Loading branch information
aleksmaus authored and mergify-bot committed May 18, 2021
1 parent 64ec737 commit a6cbdba
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion x-pack/osquerybeat/scripts/mage/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package mage

import (
"os"
"path/filepath"

devtools "github.com/elastic/beats/v7/dev-tools/mage"
Expand All @@ -15,8 +16,16 @@ func CustomizePackaging() {
for _, args := range devtools.Packages {
distFile := distro.OsquerydDistroPlatformFilename(args.OS)

// The minimal change to fix the issue for 7.13
// https://github.com/elastic/beats/issues/25762
// TODO: this could be moved to dev-tools/packaging/packages.yml for the next release
var mode os.FileMode = 0644
// If distFile is osqueryd binary then it should be executable
if distFile == distro.OsquerydFilename() {
mode = 0750
}
packFile := devtools.PackageFile{
Mode: 0644,
Mode: mode,
Source: filepath.Join(distro.DataInstallDir, distFile),
}
args.Spec.Files[distFile] = packFile
Expand Down

0 comments on commit a6cbdba

Please sign in to comment.