diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2022-11-15 09:19:55 -0500 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2022-11-21 14:19:17 -0500 |
commit | 4be5ad213c4c6e7602b9dee0c948dd706ef4676c (patch) | |
tree | 441442999f98afafa3dcba7bc403190e21a7b034 | |
parent | 1bdbfc963b4d456a0f247a1b82ac2ceec5c391df (diff) | |
download | sos-4be5ad213c4c6e7602b9dee0c948dd706ef4676c.tar.gz |
[collect] Restrict permissions on host group files
Tighten the permissions on the host group file(s) written by `sos
collect` to no longer be world readable.
Related: #3066
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/collector/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/collector/__init__.py b/sos/collector/__init__.py index 4c9e0009..627ab5c1 100644 --- a/sos/collector/__init__.py +++ b/sos/collector/__init__.py @@ -755,7 +755,7 @@ class SoSCollector(SoSComponent): fname = os.path.join(group_path, cfg['name']) with open(fname, 'w') as hf: json.dump(cfg, hf) - os.chmod(fname, 0o644) + os.chmod(fname, 0o600) return fname def prep(self): |