Use the generated ccache in novajoin-ipa-setup

We were falling back to using the KRB5CCNAME that the user had set
beforehand instead of relying on the one that we get from using the
credentials that the user actually provided.

This lead to the credentials being ignored, and the setup failing.

Closes-Bug: #1746989
Change-Id: I90daa2d3341989878b7b4da8ed9cbb23e08da68b
This commit is contained in:
Juan Antonio Osorio Robles 2018-02-02 13:35:17 +00:00
parent a0f2799f26
commit c48e2c85ee
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,9 @@ if __name__ == '__main__':
try:
ccache_dir = novajoin.kinit(opts.principal, opts.realm,
opts.password, krb5_conf)
# We use the ccache that we just created inside the kinit
# function.
os.environ['KRB5CCNAME'] = novajoin.ccache_name
except ConfigurationError:
if krb5_conf:
os.remove(krb5_conf)