File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
magnum/conductor/handlers/common Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -189,23 +189,22 @@ def create_client_files(cluster, context=None):
189
189
magnum_cert = get_cluster_magnum_cert (cluster , context )
190
190
191
191
ca_file = open (cached_ca_file , "w+" )
192
+ os .chmod (cached_ca_file , 0o600 )
192
193
ca_file .write (encodeutils .safe_decode (ca_cert .get_certificate ()))
193
194
ca_file .flush ()
194
195
195
196
key_file = open (cached_key_file , "w+" )
197
+ os .chmod (cached_key_file , 0o600 )
196
198
key_file .write (encodeutils .safe_decode (
197
199
magnum_cert .get_decrypted_private_key ()))
198
200
key_file .flush ()
199
201
200
202
cert_file = open (cached_cert_file , "w+" )
203
+ os .chmod (cached_cert_file , 0o600 )
201
204
cert_file .write (
202
205
encodeutils .safe_decode (magnum_cert .get_certificate ()))
203
206
cert_file .flush ()
204
207
205
- os .chmod (cached_ca_file , 0o600 )
206
- os .chmod (cached_key_file , 0o600 )
207
- os .chmod (cached_cert_file , 0o600 )
208
-
209
208
else :
210
209
ca_file = open (cached_ca_file , "r" )
211
210
key_file = open (cached_key_file , "r" )
You can’t perform that action at this time.
0 commit comments