aboutsummaryrefslogtreecommitdiff
path: root/pam/pam.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-03-24 23:21:29 -0700
committerEric Biggers <ebiggers3@gmail.com>2018-03-24 23:50:36 -0700
commit81942ab75c02e720970d6af069e8b8cf3ef847bb (patch)
tree1df58e59595ea964928c57ae78136dd53e647d51 /pam/pam.h
parent3ef69aaafcfe6df03097d9ebdc8e4c7f7516999b (diff)
pam: return error when PAM info item is unset
pam_fscrypt is crashing with a segfault in copyIntoSecret() when using Ctrl-C to interrupt a 'sudo' prompt. It is dereferencing a NULL pointer that is supposed point to the PAM_AUTHTOK item. The problem is that the Go code assumes pam_get_item() returns a non-success status if the item is unset, when actually it sets the data pointer to NULL and returns PAM_SUCCESS. Fix it by making pam.Handle.GetItem() return an error in that case.
Diffstat (limited to 'pam/pam.h')
0 files changed, 0 insertions, 0 deletions