PR#2106: kojira: Allow using Kerberos without krbV
Merges #2106 https://pagure.io/koji/pull-request/2106 Fixes #2114 https://pagure.io/koji/issue/2114
This commit is contained in:
commit
d5dab2c660
2 changed files with 4 additions and 2 deletions
|
|
@ -6527,7 +6527,7 @@ if __name__ == "__main__":
|
|||
except socket.error as e:
|
||||
quit("Could not connect to Kerberos authentication service: '%s'" % e.args[1])
|
||||
else:
|
||||
quit("No username/password supplied and Kerberos missing or not configured")
|
||||
quit("No username/password/certificate supplied and Kerberos missing or not configured")
|
||||
# make session exclusive
|
||||
try:
|
||||
session.exclusiveSession(force=options.force_lock)
|
||||
|
|
|
|||
|
|
@ -1031,8 +1031,10 @@ if __name__ == "__main__":
|
|||
elif options.user:
|
||||
# authenticate using user/password
|
||||
session.login()
|
||||
elif koji.krbV and options.principal and options.keytab:
|
||||
elif (koji.krbV or koji.requests_kerberos) and options.principal and options.keytab:
|
||||
session.krb_login(options.principal, options.keytab, options.ccache)
|
||||
else:
|
||||
quit("No username/password/certificate supplied and Kerberos missing or not configured")
|
||||
# get an exclusive session
|
||||
try:
|
||||
session.exclusiveSession(force=options.force_lock)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue