kojira: Allow using Kerberos without krbV
"Error: Unknown login error" message is very misleading because no authentication is being performed when krbV is not installed. Quit with error message if no authentication has been performed and also update such error message in kojid to mentioned cert auth. Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
88f692d45d
commit
e46fffe26b
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