diff options
-rw-r--r-- | src/providers/krb5/krb5_child.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c index f647bf79..8cf62555 100644 --- a/src/providers/krb5/krb5_child.c +++ b/src/providers/krb5/krb5_child.c @@ -1329,6 +1329,8 @@ static errno_t unpack_buffer(uint8_t *buf, size_t size, struct pam_data *pd, DEBUG(SSSDBG_TRACE_LIBS, ("total buffer size: [%d]\n", size)); + if (!offline || !kr) return EINVAL; + SAFEALIGN_COPY_UINT32_CHECK(&pd->cmd, buf + p, size, &p); SAFEALIGN_COPY_UINT32_CHECK(&kr->uid, buf + p, size, &p); SAFEALIGN_COPY_UINT32_CHECK(&kr->gid, buf + p, size, &p); @@ -1344,7 +1346,7 @@ static errno_t unpack_buffer(uint8_t *buf, size_t size, struct pam_data *pd, DEBUG(SSSDBG_CONF_SETTINGS, ("cmd [%d] uid [%llu] gid [%llu] validate [%s] offline [%s] " "UPN [%s]\n", pd->cmd, kr->uid, kr->gid, - kr->validate ? "true" : "false", offline ? "true" : "false", + kr->validate ? "true" : "false", *offline ? "true" : "false", kr->upn ? kr->upn : "none")); if (pd->cmd == SSS_PAM_AUTHENTICATE || |