From cfee09ea2c7e38555f0ff0c701c82119be50a722 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 17 Oct 2019 12:30:47 -0700 Subject: [PATCH 01/15] Set umask of 027 (on non-windows systems) for all Beats-created files --- libbeat/cmd/instance/beat.go | 1 + libbeat/cmd/instance/umask_other.go | 26 ++++++++++++++++++++++++++ libbeat/cmd/instance/umask_windows.go | 23 +++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 libbeat/cmd/instance/umask_other.go create mode 100644 libbeat/cmd/instance/umask_windows.go diff --git a/libbeat/cmd/instance/beat.go b/libbeat/cmd/instance/beat.go index a8f92f84c12..f57d96472ca 100644 --- a/libbeat/cmd/instance/beat.go +++ b/libbeat/cmd/instance/beat.go @@ -147,6 +147,7 @@ func initRand() { // instance. // XXX Move this as a *Beat method? func Run(settings Settings, bt beat.Creator) error { + setUmask() name := settings.Name idxPrefix := settings.IndexPrefix version := settings.Version diff --git a/libbeat/cmd/instance/umask_other.go b/libbeat/cmd/instance/umask_other.go new file mode 100644 index 00000000000..725706ffe1a --- /dev/null +++ b/libbeat/cmd/instance/umask_other.go @@ -0,0 +1,26 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// +build !windows + +package instance + +import "syscall" + +func setUmask() int { + return syscall.Umask(027) // 640 for files | 751 for dirs +} diff --git a/libbeat/cmd/instance/umask_windows.go b/libbeat/cmd/instance/umask_windows.go new file mode 100644 index 00000000000..c32ce947f32 --- /dev/null +++ b/libbeat/cmd/instance/umask_windows.go @@ -0,0 +1,23 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package instance + +func setUmask() int { + // Do nothing; no way to set umask on Windows + return -1 +} From f9eeffb1c4860ade89e4e8dc5dc70c3756d3842a Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 17 Oct 2019 13:28:32 -0700 Subject: [PATCH 02/15] Fixing comment --- libbeat/cmd/instance/umask_other.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbeat/cmd/instance/umask_other.go b/libbeat/cmd/instance/umask_other.go index 725706ffe1a..0be85f31ed9 100644 --- a/libbeat/cmd/instance/umask_other.go +++ b/libbeat/cmd/instance/umask_other.go @@ -22,5 +22,5 @@ package instance import "syscall" func setUmask() int { - return syscall.Umask(027) // 640 for files | 751 for dirs + return syscall.Umask(027) // 640 for files | 750 for dirs } From 35f2ad276315772bd920e620e5717079305721c9 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 17 Oct 2019 17:58:08 -0700 Subject: [PATCH 03/15] Update tests --- filebeat/tests/system/test_registrar.py | 8 +++--- libbeat/tests/system/test_meta.py | 35 +++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 libbeat/tests/system/test_meta.py diff --git a/filebeat/tests/system/test_registrar.py b/filebeat/tests/system/test_registrar.py index db2ad49f2d8..6604361457b 100644 --- a/filebeat/tests/system/test_registrar.py +++ b/filebeat/tests/system/test_registrar.py @@ -206,7 +206,7 @@ def test_registry_file_custom_permissions(self): self.render_config_template( path=os.path.abspath(self.working_dir) + "/log/*", registry_home=registry_home, - registry_file_permissions=0644, + registry_file_permissions=0640, ) os.mkdir(self.working_dir + "/log/") testfile_path = self.working_dir + "/log/test.log" @@ -223,7 +223,7 @@ def test_registry_file_custom_permissions(self): max_timeout=1) filebeat.check_kill_and_wait() - self.assertEqual(self.file_permissions(registry_file), "0644") + self.assertEqual(self.file_permissions(registry_file), "0640") def test_registry_file_update_permissions(self): """ @@ -262,7 +262,7 @@ def test_registry_file_update_permissions(self): self.render_config_template( path=os.path.abspath(self.working_dir) + "/log/*", registry_home="a/b/c/registry_x", - registry_file_permissions=0644 + registry_file_permissions=0640 ) filebeat = self.start_beat() @@ -280,7 +280,7 @@ def test_registry_file_update_permissions(self): filebeat.check_kill_and_wait() - self.assertEqual(self.file_permissions(registry_file), "0644") + self.assertEqual(self.file_permissions(registry_file), "0640") def test_rotating_file(self): """ diff --git a/libbeat/tests/system/test_meta.py b/libbeat/tests/system/test_meta.py new file mode 100644 index 00000000000..c79684c874e --- /dev/null +++ b/libbeat/tests/system/test_meta.py @@ -0,0 +1,35 @@ +from base import BaseTest +from elasticsearch import Elasticsearch, TransportError + +import logging +import os + + +INTEGRATION_TESTS = os.environ.get('INTEGRATION_TESTS', False) + + +class TestMetaFile(BaseTest): + """ + Test beat subcommands + """ + + def setUp(self): + super(BaseTest, self).setUp() + + self.elasticsearch_url = self.get_elasticsearch_url() + print("Using elasticsearch: {}".format(self.elasticsearch_url)) + self.es = Elasticsearch([self.elasticsearch_url]) + logging.getLogger("urllib3").setLevel(logging.WARNING) + logging.getLogger("elasticsearch").setLevel(logging.ERROR) + + def test_version(self): + """ + Test version command + """ + exit_code = self.run_beat( + extra_args=["version"], logging_args=["-v", "-d", "*"]) + assert exit_code == 0 + + assert self.log_contains("mockbeat") + assert self.log_contains("version") + assert self.log_contains("9.9.9") From b1c0efdc53f83caa327518f59d00d423b565f28b Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Fri, 18 Oct 2019 11:27:12 -0700 Subject: [PATCH 04/15] Updating docs for filebeat.registry.file_permissions --- filebeat/docs/filebeat-general-options.asciidoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/filebeat/docs/filebeat-general-options.asciidoc b/filebeat/docs/filebeat-general-options.asciidoc index 9de97f2949a..d0310ec92dc 100644 --- a/filebeat/docs/filebeat-general-options.asciidoc +++ b/filebeat/docs/filebeat-general-options.asciidoc @@ -42,13 +42,15 @@ NOTE: The content stored in filebeat/data.json is compatible to the old registry The permissions mask to apply on registry data file. The default value is 0600. The permissions option must be a valid Unix-style file permissions mask expressed in octal notation. In Go, numbers in octal notation must start with 0. +The most permissive mask allowed is 0640. If a higher permissions mask is +specified via this setting, it will be subject to a umask of 0027. + This option is not supported on Windows. Examples: - 0644: give read and write access to the file owner, and read access to all others. + 0640: give read and write access to the file owner, and read access to members of the group associated with the file. 0600: give read and write access to the file owner, and no access to all others. - 0664: give read and write access to the file owner and members of the group associated with the file, as well as read access to all other users. [source,yaml] ------------------------------------------------------------------------------------- From e7686d4d6b5435e253a550c813d6a7e383f009e6 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Fri, 18 Oct 2019 11:35:36 -0700 Subject: [PATCH 05/15] Denoting octal --- libbeat/cmd/instance/umask_other.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbeat/cmd/instance/umask_other.go b/libbeat/cmd/instance/umask_other.go index 0be85f31ed9..f281a5cbb3d 100644 --- a/libbeat/cmd/instance/umask_other.go +++ b/libbeat/cmd/instance/umask_other.go @@ -22,5 +22,5 @@ package instance import "syscall" func setUmask() int { - return syscall.Umask(027) // 640 for files | 750 for dirs + return syscall.Umask(0027) // 0640 for files | 0750 for dirs } From 66f3ca9e33f16fbe1a387e0b672d39521ff3e75f Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Fri, 18 Oct 2019 11:53:58 -0700 Subject: [PATCH 06/15] Allow beats to override umask --- libbeat/cmd/instance/beat.go | 9 ++++++++- libbeat/cmd/instance/settings.go | 2 ++ libbeat/cmd/instance/umask_other.go | 4 ++-- libbeat/cmd/instance/umask_windows.go | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/libbeat/cmd/instance/beat.go b/libbeat/cmd/instance/beat.go index f57d96472ca..4f67a06560b 100644 --- a/libbeat/cmd/instance/beat.go +++ b/libbeat/cmd/instance/beat.go @@ -147,7 +147,7 @@ func initRand() { // instance. // XXX Move this as a *Beat method? func Run(settings Settings, bt beat.Creator) error { - setUmask() + setUmaskWithSettings(settings) name := settings.Name idxPrefix := settings.IndexPrefix version := settings.Version @@ -1047,3 +1047,10 @@ func initPaths(cfg *common.Config) error { } return nil } + +func setUmaskWithSettings(settings Settings) int { + if settings.Umask != nil { + return setUmask(*settings.Umask) + } + return setUmask(0027) // 0640 for files | 0750 for dirs +} diff --git a/libbeat/cmd/instance/settings.go b/libbeat/cmd/instance/settings.go index 7ada3870daa..138809557b0 100644 --- a/libbeat/cmd/instance/settings.go +++ b/libbeat/cmd/instance/settings.go @@ -43,4 +43,6 @@ type Settings struct { ILM ilm.SupportFactory Processing processing.SupportFactory + + Umask *int } diff --git a/libbeat/cmd/instance/umask_other.go b/libbeat/cmd/instance/umask_other.go index f281a5cbb3d..9f3544e41bd 100644 --- a/libbeat/cmd/instance/umask_other.go +++ b/libbeat/cmd/instance/umask_other.go @@ -21,6 +21,6 @@ package instance import "syscall" -func setUmask() int { - return syscall.Umask(0027) // 0640 for files | 0750 for dirs +func setUmask(newmask int) int { + return syscall.Umask(newmask) } diff --git a/libbeat/cmd/instance/umask_windows.go b/libbeat/cmd/instance/umask_windows.go index c32ce947f32..89fb6496f03 100644 --- a/libbeat/cmd/instance/umask_windows.go +++ b/libbeat/cmd/instance/umask_windows.go @@ -17,7 +17,7 @@ package instance -func setUmask() int { +func setUmask(newmask int) int { // Do nothing; no way to set umask on Windows return -1 } From 9f8bb39f7b3b822cc2b4c017f22392b05525f074 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Fri, 18 Oct 2019 12:06:05 -0700 Subject: [PATCH 07/15] Removing accidentally-committed file --- libbeat/tests/system/test_meta.py | 35 ------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 libbeat/tests/system/test_meta.py diff --git a/libbeat/tests/system/test_meta.py b/libbeat/tests/system/test_meta.py deleted file mode 100644 index c79684c874e..00000000000 --- a/libbeat/tests/system/test_meta.py +++ /dev/null @@ -1,35 +0,0 @@ -from base import BaseTest -from elasticsearch import Elasticsearch, TransportError - -import logging -import os - - -INTEGRATION_TESTS = os.environ.get('INTEGRATION_TESTS', False) - - -class TestMetaFile(BaseTest): - """ - Test beat subcommands - """ - - def setUp(self): - super(BaseTest, self).setUp() - - self.elasticsearch_url = self.get_elasticsearch_url() - print("Using elasticsearch: {}".format(self.elasticsearch_url)) - self.es = Elasticsearch([self.elasticsearch_url]) - logging.getLogger("urllib3").setLevel(logging.WARNING) - logging.getLogger("elasticsearch").setLevel(logging.ERROR) - - def test_version(self): - """ - Test version command - """ - exit_code = self.run_beat( - extra_args=["version"], logging_args=["-v", "-d", "*"]) - assert exit_code == 0 - - assert self.log_contains("mockbeat") - assert self.log_contains("version") - assert self.log_contains("9.9.9") From 52171217c51149f570e64e0286b5eb69cd6cb2b2 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Fri, 18 Oct 2019 12:54:26 -0700 Subject: [PATCH 08/15] Adding system test for default umask --- libbeat/tests/system/config/mockbeat.yml.j2 | 3 ++ libbeat/tests/system/test_umask.py | 34 +++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 libbeat/tests/system/test_umask.py diff --git a/libbeat/tests/system/config/mockbeat.yml.j2 b/libbeat/tests/system/config/mockbeat.yml.j2 index df185c8ca58..6023545f660 100644 --- a/libbeat/tests/system/config/mockbeat.yml.j2 +++ b/libbeat/tests/system/config/mockbeat.yml.j2 @@ -62,6 +62,9 @@ output: path: {{ output_file_path|default(beat.working_dir + "/output") }} filename: "{{ output_file_filename|default("mockbeat") }}" rotate_every_kb: 1000 + {% if output_file_permissions %} + permissions: {{ output_file_permissions }} + {% endif %} #number_of_files: 7 {%- endif %} diff --git a/libbeat/tests/system/test_umask.py b/libbeat/tests/system/test_umask.py new file mode 100644 index 00000000000..f2763c94d40 --- /dev/null +++ b/libbeat/tests/system/test_umask.py @@ -0,0 +1,34 @@ +from base import BaseTest + +import os +import stat + + +INTEGRATION_TESTS = os.environ.get('INTEGRATION_TESTS', False) + + +class TestUmask(BaseTest): + """ + Test default umask + """ + + DEFAULT_UMASK = 0027 + + def setUp(self): + super(BaseTest, self).setUp() + + self.output_file_permissions = 0666 + + self.render_config_template(output_file_permissions=self.output_file_permissions) + proc = self.start_beat() + self.wait_until(lambda: self.output_lines() > 0, max_timeout=2) + proc.check_kill_and_wait() + + def test_output_file_perms(self): + """ + Test that output file permissions respect default umask + """ + output_file_path = os.path.join(self.working_dir, "output", "mockbeat") + perms = stat.S_IMODE(os.lstat(output_file_path).st_mode) + + self.assertEqual(perms, self.output_file_permissions & ~TestUmask.DEFAULT_UMASK) From 2e9be6e7dea917e78ca69c9a2bf7a8c01167f1b3 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Mon, 21 Oct 2019 10:01:48 -0700 Subject: [PATCH 09/15] Make setUmask return error --- libbeat/cmd/instance/umask_other.go | 5 +++-- libbeat/cmd/instance/umask_windows.go | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libbeat/cmd/instance/umask_other.go b/libbeat/cmd/instance/umask_other.go index 9f3544e41bd..6175edcaabf 100644 --- a/libbeat/cmd/instance/umask_other.go +++ b/libbeat/cmd/instance/umask_other.go @@ -21,6 +21,7 @@ package instance import "syscall" -func setUmask(newmask int) int { - return syscall.Umask(newmask) +func setUmask(newmask int) error { + syscall.Umask(newmask) + return nil // the umask syscall always succeeds: http://man7.org/linux/man-pages/man2/umask.2.html#RETURN_VALUE } diff --git a/libbeat/cmd/instance/umask_windows.go b/libbeat/cmd/instance/umask_windows.go index 89fb6496f03..7a9ffd39b09 100644 --- a/libbeat/cmd/instance/umask_windows.go +++ b/libbeat/cmd/instance/umask_windows.go @@ -17,7 +17,9 @@ package instance -func setUmask(newmask int) int { - // Do nothing; no way to set umask on Windows - return -1 +import "github.com/elastic/go-sysinfo/types" + +func setUmask(newmask int) error { + // No way to set umask on Windows + return types.ErrNotImplemented } From a2b157b5bf2d6a496711513d710e33883b27a89e Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Mon, 21 Oct 2019 10:15:30 -0700 Subject: [PATCH 10/15] Defining ErrNotImplemented locally --- libbeat/cmd/instance/beat.go | 8 ++++++-- libbeat/cmd/instance/umask_other.go | 7 ++++++- libbeat/cmd/instance/umask_windows.go | 6 ++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/libbeat/cmd/instance/beat.go b/libbeat/cmd/instance/beat.go index 4f67a06560b..89e5ee18f52 100644 --- a/libbeat/cmd/instance/beat.go +++ b/libbeat/cmd/instance/beat.go @@ -147,7 +147,11 @@ func initRand() { // instance. // XXX Move this as a *Beat method? func Run(settings Settings, bt beat.Creator) error { - setUmaskWithSettings(settings) + err := setUmaskWithSettings(settings) + if err != nil && err != ErrNotImplemented { + return errw.Wrap(err, "could not set umask") + } + name := settings.Name idxPrefix := settings.IndexPrefix version := settings.Version @@ -1048,7 +1052,7 @@ func initPaths(cfg *common.Config) error { return nil } -func setUmaskWithSettings(settings Settings) int { +func setUmaskWithSettings(settings Settings) error { if settings.Umask != nil { return setUmask(*settings.Umask) } diff --git a/libbeat/cmd/instance/umask_other.go b/libbeat/cmd/instance/umask_other.go index 6175edcaabf..6820dc1b4a8 100644 --- a/libbeat/cmd/instance/umask_other.go +++ b/libbeat/cmd/instance/umask_other.go @@ -19,7 +19,12 @@ package instance -import "syscall" +import ( + "errors" + "syscall" +) + +var ErrNotImplemented = errors.New("not implemented on platform") func setUmask(newmask int) error { syscall.Umask(newmask) diff --git a/libbeat/cmd/instance/umask_windows.go b/libbeat/cmd/instance/umask_windows.go index 7a9ffd39b09..ccc18373971 100644 --- a/libbeat/cmd/instance/umask_windows.go +++ b/libbeat/cmd/instance/umask_windows.go @@ -17,9 +17,11 @@ package instance -import "github.com/elastic/go-sysinfo/types" +import "errors" + +var ErrNotImplemented = errors.New("not implemented on windows") func setUmask(newmask int) error { // No way to set umask on Windows - return types.ErrNotImplemented + return ErrNotImplemented } From 02908638fb17ef71052bc9b76b02ad79690e19e8 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Mon, 21 Oct 2019 10:16:58 -0700 Subject: [PATCH 11/15] Defining not implemented error locally --- libbeat/cmd/instance/beat.go | 2 +- libbeat/cmd/instance/umask_other.go | 2 +- libbeat/cmd/instance/umask_windows.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libbeat/cmd/instance/beat.go b/libbeat/cmd/instance/beat.go index 89e5ee18f52..ba799d9ab7d 100644 --- a/libbeat/cmd/instance/beat.go +++ b/libbeat/cmd/instance/beat.go @@ -148,7 +148,7 @@ func initRand() { // XXX Move this as a *Beat method? func Run(settings Settings, bt beat.Creator) error { err := setUmaskWithSettings(settings) - if err != nil && err != ErrNotImplemented { + if err != nil && err != errNotImplemented { return errw.Wrap(err, "could not set umask") } diff --git a/libbeat/cmd/instance/umask_other.go b/libbeat/cmd/instance/umask_other.go index 6820dc1b4a8..e3af909f785 100644 --- a/libbeat/cmd/instance/umask_other.go +++ b/libbeat/cmd/instance/umask_other.go @@ -24,7 +24,7 @@ import ( "syscall" ) -var ErrNotImplemented = errors.New("not implemented on platform") +var errNotImplemented = errors.New("not implemented on platform") func setUmask(newmask int) error { syscall.Umask(newmask) diff --git a/libbeat/cmd/instance/umask_windows.go b/libbeat/cmd/instance/umask_windows.go index ccc18373971..35cdf01ab5b 100644 --- a/libbeat/cmd/instance/umask_windows.go +++ b/libbeat/cmd/instance/umask_windows.go @@ -19,7 +19,7 @@ package instance import "errors" -var ErrNotImplemented = errors.New("not implemented on windows") +var errNotImplemented = errors.New("not implemented on windows") func setUmask(newmask int) error { // No way to set umask on Windows From 62ae1f1c32358cf65cddeabb2821c329cd1f05db Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Tue, 22 Oct 2019 12:29:54 -0700 Subject: [PATCH 12/15] Fixing typo --- libbeat/cmd/instance/umask_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbeat/cmd/instance/umask_windows.go b/libbeat/cmd/instance/umask_windows.go index 35cdf01ab5b..e52886301fb 100644 --- a/libbeat/cmd/instance/umask_windows.go +++ b/libbeat/cmd/instance/umask_windows.go @@ -23,5 +23,5 @@ var errNotImplemented = errors.New("not implemented on windows") func setUmask(newmask int) error { // No way to set umask on Windows - return ErrNotImplemented + return errNotImplemented } From c213c50a1642ff2594bdf8af4ecbb65595b1e3d3 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Tue, 22 Oct 2019 14:37:32 -0700 Subject: [PATCH 13/15] Skip umask test on Windows --- libbeat/tests/system/test_umask.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libbeat/tests/system/test_umask.py b/libbeat/tests/system/test_umask.py index f2763c94d40..5b4f3deafcd 100644 --- a/libbeat/tests/system/test_umask.py +++ b/libbeat/tests/system/test_umask.py @@ -24,6 +24,7 @@ def setUp(self): self.wait_until(lambda: self.output_lines() > 0, max_timeout=2) proc.check_kill_and_wait() + @unittest.skipIf(sys.platform.startswith("win"), "umask is not available on Windows") def test_output_file_perms(self): """ Test that output file permissions respect default umask From d408ac29c2ea02083d44e79b58918d72aef9a79d Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Tue, 22 Oct 2019 15:50:25 -0700 Subject: [PATCH 14/15] Adding missed imports --- libbeat/tests/system/test_umask.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libbeat/tests/system/test_umask.py b/libbeat/tests/system/test_umask.py index 5b4f3deafcd..dd3a6df96a0 100644 --- a/libbeat/tests/system/test_umask.py +++ b/libbeat/tests/system/test_umask.py @@ -2,7 +2,8 @@ import os import stat - +import unittest +import sys INTEGRATION_TESTS = os.environ.get('INTEGRATION_TESTS', False) From 2d30f9898115b24b798e15f4295d02d42d2658b0 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Wed, 23 Oct 2019 14:01:36 -0700 Subject: [PATCH 15/15] Adding CHANGELOG entry --- CHANGELOG.next.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 083362cb0c0..2584883f554 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -20,6 +20,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Disable Alibaba Cloud and Tencent Cloud metadata providers by default. {pull}13812[12812] - Libbeat HTTP's Server can listen to a unix socket using the `unix:///tmp/hello.sock` syntax. {pull}13655[13655] - Libbeat HTTP's Server can listen to a Windows named pipe using the `npipe:///hello` syntax. {pull}13655[13655] +- By default, all Beats-created files and folders will have a umask of 0027 (on POSIX systems). {pull}14119[14119] *Auditbeat*