aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2022-03-31 19:19:52 +0000
committerKyle Evans <kevans@FreeBSD.org>2022-03-31 19:23:57 +0000
commit31190aa02eef05b1b58ba89212dc8c8738770e37 (patch)
tree5d4c1496c79f53faf7fc7d5544b254eecd63eb7f /lib
parentd155d8e138563c0b39c658684e6a4fe6e2e36f8a (diff)
downloadsrc-31190aa02eef05b1b58ba89212dc8c8738770e37.tar.gz
src-31190aa02eef05b1b58ba89212dc8c8738770e37.zip
libbe: pull props for the correct dataset in be_mounted_at()
The props feature to this API was added as a "just in case", with no planned consumer. It turns out that it was implemented incorrectly, tapping out props for the BE root (BE's parent) rather than the BE itself in all cases. Fetch properties for the dataset that's actually mounted at the queried path. Reported by: Christian McDonald <cmcdonald netgate com> MFC after: 3 days
Diffstat (limited to 'lib')
-rw-r--r--lib/libbe/be_access.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libbe/be_access.c b/lib/libbe/be_access.c
index a591a4f61d02..ec966bc85fb7 100644
--- a/lib/libbe/be_access.c
+++ b/lib/libbe/be_access.c
@@ -210,7 +210,7 @@ be_mounted_at(libbe_handle_t *lbh, const char *path, nvlist_t *details)
if (info.name != NULL) {
if (details != NULL) {
- if ((root_hdl = zfs_open(lbh->lzh, lbh->root,
+ if ((root_hdl = zfs_open(lbh->lzh, info.name,
ZFS_TYPE_FILESYSTEM)) == NULL) {
free(info.name);
return (BE_ERR_ZFSOPEN);