Skip to content

Commit c123201

Browse files
sumit-boseaplopez
authored andcommitted
pac: fix issue with pac_check=no_check
So far SSSD expected that the PAC contains the logon_info buffer even if PAC checks are disabled with the 'no_check' option. This causes issues with PACs issues by MIT Kerberos KDCs which do not contain this buffer. This patches makes sure that the logon_info is not expected if 'no_check' is set and adds some clarifications to the man page. Resolves: #8300 Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Alejandro López <allopez@redhat.com>
1 parent d9ab8a8 commit c123201

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

src/man/sssd.conf.5.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,6 +2262,13 @@ pam_json_services = gdm-switchable-auth
22622262
IPA and AD provider. If krb5_validate is set to
22632263
'False' the PAC checks will be skipped.
22642264
</para>
2265+
<para>
2266+
Please note that the checks listed below only apply
2267+
to PACs issued by Active Directory or recent
2268+
versions of FreeIPA. PACs issued e.g. by a plain
2269+
MIT Kerberos KDC will not contain the needed PAC
2270+
data buffers to run the checks.
2271+
</para>
22652272
<para>
22662273
The following options can be used alone or in a
22672274
comma-separated list:

src/providers/ad/ad_pac_common.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -394,13 +394,18 @@ errno_t ad_get_data_from_pac(TALLOC_CTX *mem_ctx, const uint32_t pac_check_opts,
394394
}
395395
}
396396

397-
/* The logon_info buffer is the main PAC buffer with the basic user
398-
* information, if this is missing we consider the PAC as broken. */
399-
if (_logon_info != NULL && *_logon_info == NULL) {
400-
DEBUG(SSSDBG_CRIT_FAILURE,
401-
"LOGON_INFO pac buffer missing.\n");
402-
ret = ERR_CHECK_PAC_FAILED;
403-
goto done;
397+
/* The logon_info buffer is the main PAC buffer for AD and FreeIPA users
398+
* with the basic user information, if this is missing we consider the PAC
399+
* as broken if PAC checking is not switched off. This is important
400+
* because new versions MIT Kerberos will add a PAC buffer as well, but
401+
* without an AD logon_info buffer. */
402+
if (pac_check_opts != 0) {
403+
if (_logon_info != NULL && *_logon_info == NULL) {
404+
DEBUG(SSSDBG_CRIT_FAILURE,
405+
"LOGON_INFO pac buffer missing.\n");
406+
ret = ERR_CHECK_PAC_FAILED;
407+
goto done;
408+
}
404409
}
405410

406411
/* The upn_dns_info buffer was added with Windows 2008, so there might be

0 commit comments

Comments
 (0)