diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2011-03-28 06:45:35 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-04-25 08:06:34 -0400 |
commit | 8cf1b4183577237d965068d70cd06bd0716aea84 (patch) | |
tree | 29e815914029e6ab886d784256c5af2280f1199a /src/providers/krb5/krb5_common.c | |
parent | cfd79b92d3813ed53ef51ae2cf93be6287e73a27 (diff) | |
download | sssd-8cf1b4183577237d965068d70cd06bd0716aea84.tar.gz sssd-8cf1b4183577237d965068d70cd06bd0716aea84.tar.xz sssd-8cf1b4183577237d965068d70cd06bd0716aea84.zip |
Allow new option to specify principal for FAST
https://fedorahosted.org/sssd/ticket/700
Diffstat (limited to 'src/providers/krb5/krb5_common.c')
-rw-r--r-- | src/providers/krb5/krb5_common.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/providers/krb5/krb5_common.c b/src/providers/krb5/krb5_common.c index 434fc7fbc..ca37ba7d8 100644 --- a/src/providers/krb5/krb5_common.c +++ b/src/providers/krb5/krb5_common.c @@ -44,7 +44,8 @@ struct dp_option default_krb5_opts[] = { { "krb5_renewable_lifetime", DP_OPT_STRING, NULL_STRING, NULL_STRING }, { "krb5_lifetime", DP_OPT_STRING, NULL_STRING, NULL_STRING }, { "krb5_renew_interval", DP_OPT_NUMBER, NULL_NUMBER, NULL_NUMBER }, - { "krb5_use_fast", DP_OPT_STRING, NULL_STRING, NULL_STRING } + { "krb5_use_fast", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + { "krb5_fast_principal", DP_OPT_STRING, NULL_STRING, NULL_STRING } }; errno_t check_and_export_lifetime(struct dp_option *opts, const int opt_id, @@ -109,6 +110,7 @@ errno_t check_and_export_options(struct dp_option *opts, const char *realm; const char *dummy; char *use_fast_str; + char *fast_principal; realm = dp_opt_get_cstring(opts, KRB5_REALM); if (realm == NULL) { @@ -155,6 +157,14 @@ errno_t check_and_export_options(struct dp_option *opts, ret = setenv(SSSD_KRB5_USE_FAST, use_fast_str, 1); if (ret != EOK) { DEBUG(2, ("setenv [%s] failed.\n", SSSD_KRB5_USE_FAST)); + } else { + fast_principal = dp_opt_get_string(opts, KRB5_FAST_PRINCIPAL); + if (fast_principal != NULL) { + ret = setenv(SSSD_KRB5_FAST_PRINCIPAL, fast_principal, 1); + if (ret != EOK) { + DEBUG(2, ("setenv [%s] failed.\n", SSSD_KRB5_FAST_PRINCIPAL)); + } + } } } } |