30 lines
839 B
Diff
30 lines
839 B
Diff
|
From 697e42284fdd1e18fef1d1747f64cb75be1e0bef Mon Sep 17 00:00:00 2001
|
||
|
From: Duncan Mac-Vicar P <dmacvicar@suse.de>
|
||
|
Date: Wed, 10 Feb 2016 09:24:57 +0100
|
||
|
Subject: [PATCH 06/22] add_key/reject_key: do not crash w/Permission denied:
|
||
|
'/var/cache/salt/master/.dfn' (#27796)
|
||
|
|
||
|
already upstream
|
||
|
https://github.com/saltstack/salt/pull/30998
|
||
|
---
|
||
|
salt/crypt.py | 3 +++
|
||
|
1 file changed, 3 insertions(+)
|
||
|
|
||
|
diff --git a/salt/crypt.py b/salt/crypt.py
|
||
|
index ce27d9f..907ec0c 100644
|
||
|
--- a/salt/crypt.py
|
||
|
+++ b/salt/crypt.py
|
||
|
@@ -55,6 +55,9 @@ def dropfile(cachedir, user=None):
|
||
|
mask = os.umask(191)
|
||
|
try:
|
||
|
log.info('Rotating AES key')
|
||
|
+ if os.path.isfile(dfn):
|
||
|
+ log.info('AES key rotation already requested')
|
||
|
+ return
|
||
|
|
||
|
with salt.utils.fopen(dfn, 'wb+') as fp_:
|
||
|
fp_.write('')
|
||
|
--
|
||
|
2.1.4
|
||
|
|