Skip to content

Commit e39557b

Browse files
Fixing the path that the gpg module uses if the user is salt to be pulled from salt.syspaths. Similar fix to saltstack#18968
1 parent 4b3135b commit e39557b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

salt/modules/gpg.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
# Import python libs
1515
import distutils.version # pylint: disable=import-error,no-name-in-module
1616
import logging
17+
import os
1718
import re
1819
import time
1920

2021
# Import salt libs
2122
import salt.utils
23+
import salt.syspaths
2224
from salt.ext.six import string_types
2325

2426
from salt.exceptions import (
@@ -107,6 +109,7 @@ def _create_gpg(user=None):
107109

108110
if user == 'salt':
109111
homeDir = '/etc/salt/gpg'
112+
homeDir = os.path.join(salt.syspaths.CONFIG_DIR, 'gpg')
110113
else:
111114
userinfo = __salt__['user.info'](user)
112115
if userinfo:

0 commit comments

Comments
 (0)