mirror_zfs/contrib/pam_zfs_key
Richard Yao 2ba240f358
PAM: Fix unchecked return value from zfs_key_config_load()
9a49c6b782 was intended to fix this issue,
but I had missed the case in pam_sm_open_session(). Clang's static
analyzer had not reported it and I forgot to look for other cases.

Interestingly, GCC gcc-12.1.1_p20220625's static analyzer had caught
this as multiple double-free bugs, since another failure after the
failure in zfs_key_config_load() will cause us to attempt to free the
memory that zfs_key_config_load() was supposed to allocate, but had
cleaned up upon failure.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13978
2022-10-05 17:09:24 -07:00
..
Makefile.am autoconf: use include directives instead of recursing down contrib 2022-05-10 10:19:44 -07:00
pam_zfs_key.c PAM: Fix unchecked return value from zfs_key_config_load() 2022-10-05 17:09:24 -07:00
zfs_key pam: implement a zfs_key pam module 2020-06-24 18:45:44 -07:00