Commit 7626af93 authored by Stan Hu's avatar Stan Hu Committed by Rémy Coutable

Avoid requiring krb5 in migration

This simplifies source installations.

The Kerberos gem is not required to be installed, so don't fail
if we can't load this in the migration.

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/7980.
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 81d07bc5
...@@ -12,7 +12,7 @@ class CanonicalizeKerberosIdentities < ActiveRecord::Migration ...@@ -12,7 +12,7 @@ class CanonicalizeKerberosIdentities < ActiveRecord::Migration
default_realm = krb5.get_default_realm default_realm = krb5.get_default_realm
krb5.close # release memory allocated by the krb5 library krb5.close # release memory allocated by the krb5 library
default_realm || '' default_realm || ''
rescue StandardError rescue StandardError, LoadError
'' # could not find the system's default realm, maybe there's no Kerberos at all '' # could not find the system's default realm, maybe there's no Kerberos at all
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment