cloudbase / wnbd

Windows Ceph RBD NBD driver
GNU Lesser General Public License v2.1
58 stars 26 forks source link

driver: avoid absolute registry paths #103

Closed petrutlucian94 closed 1 year ago

petrutlucian94 commented 1 year ago

The driver certification tests fail if we access absolute registry paths, which means we can't directly use the registry path received by the DriverEntry function.

Instead, we'll have to use "IoOpenDriverRegistryKey" to open the registry key associated with this driver and then use Zw functions instead of Rtl when accessing the registry.

We'll go ahead and remove the WNBD_REGISTRY_KEY definition since it no longer applies. Wnbd users are expected to use libwnbd or DeviceIOControl in order to get/set driver settings, for example through wnbd-client.exe.

While at it, we're adding some tests for the driver settings. Those tests uncovered an issue affecting IOCTL_WNBD_GET_DRV_OPT requests, which is being addressed.

Signed-off-by: Lucian Petrut lpetrut@cloudbasesolutions.com