mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
PAM: Fix uninitialized value read
Clang's static analyzer found that config.uid is uninitialized when zfs_key_config_load() returns an error. Oddly, this was not included in the unchecked return values that Coverity found. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #13957
This commit is contained in:
parent
a51288aabb
commit
9a49c6b782
@ -810,7 +810,9 @@ pam_sm_close_session(pam_handle_t *pamh, int flags,
|
||||
return (PAM_SUCCESS);
|
||||
}
|
||||
zfs_key_config_t config;
|
||||
zfs_key_config_load(pamh, &config, argc, argv);
|
||||
if (zfs_key_config_load(pamh, &config, argc, argv) != 0) {
|
||||
return (PAM_SESSION_ERR);
|
||||
}
|
||||
if (config.uid < 1000) {
|
||||
zfs_key_config_free(&config);
|
||||
return (PAM_SUCCESS);
|
||||
|
Loading…
Reference in New Issue
Block a user