Dont use dangerous os.tmpnam

This commit is contained in:
Mircea Ulinic 2017-11-15 13:34:49 +00:00 committed by Mircea Ulinic
parent 2d6176b0bc
commit 6689bd3b2d
No known key found for this signature in database
GPG key ID: 4286FAD4BACBB073

View file

@ -6,8 +6,9 @@ from __future__ import absolute_import
# Import python libs
import os
import logging
import pickle
import logging
import tempfile
# This must be present or the Salt loader won't load this module
__proxyenabled__ = ['dummy']
@ -19,7 +20,7 @@ DETAILS = {}
DETAILS['services'] = {'apache': 'running', 'ntp': 'running', 'samba': 'stopped'}
DETAILS['packages'] = {'coreutils': '1.0', 'apache': '2.4', 'tinc': '1.4', 'redbull': '999.99'}
FILENAME = os.tmpnam()
FILENAME = tempfile.mkstemp()[1]
# Want logging!
log = logging.getLogger(__file__)