Skip to content

Commit

Permalink
NAS-110773 / 21.08 / Fix kerberos error (#6954)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2f0f71f)

Co-authored-by: themylogin <themylogin@gmail.com>
  • Loading branch information
bugclerk and themylogin committed Jun 4, 2021
1 parent 7e71ccb commit 3dfb3e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/middlewared/middlewared/plugins/kerberos.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,15 @@ async def do_kinit(self, data):
f"with principal [{data['kerberos_principal']}] "
f"failed: {kinit.stderr.decode()}")

elif dstype == DSType.LDAP:
elif dstype == DSType.DS_TYPE_LDAP:
raise CallError(f"kinit with principal [{data['kerberos_principal']}] "
f"failed: {kinit.stderr.decode()}")
return True

if dstype == DSType.DS_TYPE_ACTIVEDIRECTORY:
principal = f'{data["bindname"]}@{data["domainname"].upper()}'

elif dstype == DSType.LDAP:
elif dstype == DSType.DS_TYPE_LDAP:
krb_realm = await self.middleware.call(
'kerberos.realm.query',
[('id', '=', data['kerberos_realm'])],
Expand Down

0 comments on commit 3dfb3e2

Please sign in to comment.