PAM: Mount if key is already available
If, for some reason, the key is already loaded for an unmounted dataset, proceed with mounting the filesystem instead of failing. Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com>
This commit is contained in:
parent
ce51ecb312
commit
df5be2c1b7
|
@ -389,7 +389,7 @@ decrypt_mount(pam_handle_t *pamh, const char *ds_name,
|
||||||
int ret = lzc_load_key(ds_name, B_FALSE, (uint8_t *)key->value,
|
int ret = lzc_load_key(ds_name, B_FALSE, (uint8_t *)key->value,
|
||||||
WRAPPING_KEY_LEN);
|
WRAPPING_KEY_LEN);
|
||||||
pw_free(key);
|
pw_free(key);
|
||||||
if (ret) {
|
if (ret && ret != EEXIST) {
|
||||||
pam_syslog(pamh, LOG_ERR, "load_key failed: %d", ret);
|
pam_syslog(pamh, LOG_ERR, "load_key failed: %d", ret);
|
||||||
zfs_close(ds);
|
zfs_close(ds);
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
Loading…
Reference in New Issue