Merge "Correct perms of /var/run/heat-config/heat-config"
This commit is contained in:
commit
051822a179
hot/software-config/elements/heat-config
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
SCRIPTDIR=$(dirname $0)
|
||||
install -D -g root -o root -m 0600 ${SCRIPTDIR}/heat-config /var/run/heat-config/heat-config
|
@ -1 +0,0 @@
|
||||
{}
|
@ -16,6 +16,7 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import stat
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
@ -46,6 +47,10 @@ def main(argv=sys.argv):
|
||||
log.error('No config file %s' % CONF_FILE)
|
||||
return 1
|
||||
|
||||
conf_mode = stat.S_IMODE(os.lstat(CONF_FILE).st_mode)
|
||||
if conf_mode != 0o600:
|
||||
os.chmod(CONF_FILE, 0o600)
|
||||
|
||||
if not os.path.isdir(DEPLOYED_DIR):
|
||||
if DEPLOYED_DIR != OLD_DEPLOYED_DIR and os.path.isdir(OLD_DEPLOYED_DIR):
|
||||
log.debug('Migrating deployed state from %s to %s' %
|
||||
|
Loading…
x
Reference in New Issue
Block a user