Skip to content

Commit 017d17d

Browse files
Use environment variable for keytab file location
Use the environment variable defined in settings.py instead of hardcoding the path. Signed-off-by: Antonio Torres <[email protected]>
1 parent 9432bd3 commit 017d17d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ipa-tuura/domains/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def undeploy_ipa_service(domain):
154154
hostname = socket.gethostname()
155155
realm = domain["name"].upper()
156156
ipatuura_principal = "ipatuura/%s@%s" % (hostname, realm)
157-
keytab_file = os.path.join("/var/lib/ipa/ipatuura/", "service.keytab")
157+
keytab_file = os.environ.get("KRB5_CLIENT_KTNAME", None)
158158
ipa_api_connect(domain)
159159

160160
# remove keytab
@@ -197,7 +197,7 @@ def deploy_ipa_service(domain):
197197
hostname = socket.gethostname()
198198
realm = domain["name"].upper()
199199
ipatuura_principal = "ipatuura/%s@%s" % (hostname, realm)
200-
keytab_file = os.path.join("/var/lib/ipa/ipatuura/", "service.keytab")
200+
keytab_file = os.environ.get("KRB5_CLIENT_KTNAME", None)
201201
ipa_api_connect(domain)
202202

203203
# add extra attribute mappings to domain

0 commit comments

Comments
 (0)