Commit b23fb97c authored by Corey Bryant's avatar Corey Bryant
Browse files

Limit metrics_socket_file permissions

This limits the metrics_socket_file permissions to 0o660. Prior
to this change, symbolic constants were used, resulting in
0o707 permissions.

Closes-Bug: #1945533
Change-Id: I009ffbc10d3400881c6f8b2178494ba180d6549f
parent e9086be0
......@@ -17,7 +17,6 @@ import os
import select
import signal
import socket
import stat
import sys
import threading
from wsgiref.simple_server import make_server
......@@ -97,7 +96,7 @@ def main():
socket_path = cfg.CONF.oslo_metrics.metrics_socket_file
m = MetricsListener(socket_path)
try:
os.chmod(socket_path, stat.S_IRWXU | stat.S_IRWXO)
os.chmod(socket_path, 0o660)
except OSError:
LOG.error("Changing the mode of the file failed.... continuing")
mt = threading.Thread(target=m.serve)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment