summaryrefslogtreecommitdiffstats
path: root/src/util/sss_krb5.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2013-03-25 17:41:19 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-04-22 15:33:40 +0200
commitedaa983d094c239c3e1ba667bcd20ed3934be3b8 (patch)
tree3772f4bd4c396cb72784c698a2e66d911793aeff /src/util/sss_krb5.c
parentb3e247cef1f1c81a24ae7759903c11289744e94c (diff)
downloadsssd-edaa983d094c239c3e1ba667bcd20ed3934be3b8.tar.gz
sssd-edaa983d094c239c3e1ba667bcd20ed3934be3b8.tar.xz
sssd-edaa983d094c239c3e1ba667bcd20ed3934be3b8.zip
Allow usage of enterprise principals
Enterprise principals are currently most useful for the AD provider and hence enabled here by default while for the other Kerberos based authentication providers they are disabled by default. If additional UPN suffixes are configured for the AD domain the user principal stored in the AD LDAP server might not contain the real Kerberos realm of the AD domain but one of the additional suffixes which might be completely randomly chooses, e.g. are not related to any existing DNS domain. This make it hard for a client to figure out the right KDC to send requests to. To get around this enterprise principals (see http://tools.ietf.org/html/rfc6806 for details) were introduced. Basically a default realm is added to the principal so that the Kerberos client libraries at least know where to send the request to. It is not in the responsibility of the KDC to either handle the request itself, return a client referral if he thinks a different KDC can handle the request or return and error. This feature is also use to allow authentication in AD environments with cross forest trusts. Fixes https://fedorahosted.org/sssd/ticket/1842
Diffstat (limited to 'src/util/sss_krb5.c')
-rw-r--r--src/util/sss_krb5.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index ab0344c80..674e9fcdd 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -766,6 +766,25 @@ sss_krb5_component_length_quoted(const krb5_data *src, int flags)
krb5_error_code
+sss_krb5_parse_name_flags(krb5_context context, const char *name, int flags,
+ krb5_principal *principal)
+{
+#ifdef HAVE_KRB5_PARSE_NAME_FLAGS
+ return krb5_parse_name_flags(context, name, flags, principal);
+#else
+ if (flags != 0) {
+ DEBUG(SSSDBG_MINOR_FAILURE, ("krb5_parse_name_flags not available on " \
+ "this plattform, names are parsed " \
+ "without flags. Some features like " \
+ "enterprise principals might not work " \
+ "as expected.\n"));
+ }
+
+ return krb5_parse_name(context, name, principal);
+#endif
+}
+
+krb5_error_code
sss_krb5_unparse_name_flags(krb5_context context, krb5_const_principal principal,
int flags, char **name)
{