diff --git a/usr.sbin/ctld/kernel.cc b/usr.sbin/ctld/kernel.cc --- a/usr.sbin/ctld/kernel.cc +++ b/usr.sbin/ctld/kernel.cc @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -635,12 +636,12 @@ NULL) { if (strcmp(key, "file") == 0 || strcmp(key, "dev") == 0) { - cl->l_path = nvlist_take_string(lun->attr_list, - key); + cl->l_path = checked_strdup( + cnvlist_get_string(cookie)); continue; } nvlist_add_string(cl->l_options, key, - nvlist_get_string(lun->attr_list, key)); + cnvlist_get_string(cookie)); error = nvlist_error(cl->l_options); if (error != 0) log_warnc(error, "unable to add CTL lun option "