Skip to content

Commit 3a8ef73

Browse files
sumit-bosealexey-tikhonov
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> (cherry picked from commit c123201)
1 parent 02108cb commit 3a8ef73

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
@@ -2342,6 +2342,13 @@ pam_gssapi_indicators_map = sudo:pkinit, sudo-i:pkinit
23422342
IPA and AD provider. If krb5_validate is set to
23432343
'False' the PAC checks will be skipped.
23442344
</para>
2345+
<para>
2346+
Please note that the checks listed below only apply
2347+
to PACs issued by Active Directory or recent
2348+
versions of FreeIPA. PACs issued e.g. by a plain
2349+
MIT Kerberos KDC will not contain the needed PAC
2350+
data buffers to run the checks.
2351+
</para>
23452352
<para>
23462353
The following options can be used alone or in a
23472354
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)