mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:36:09 +00:00
Driver: Force reauth on conf changes.
This commit is contained in:
parent
3e00b080da
commit
9655bb564a
@ -304,6 +304,26 @@ fort_callout_remove (void)
|
||||
g_device->active = FALSE;
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
fort_callout_force_reauth (PDEVICE_OBJECT device)
|
||||
{
|
||||
NTSTATUS status;
|
||||
|
||||
// Unregister
|
||||
fort_callout_remove();
|
||||
fort_prov_unregister();
|
||||
|
||||
// Register
|
||||
status = fort_prov_register(!g_device->prov_temporary,
|
||||
g_device->prov_boot, NULL, NULL);
|
||||
|
||||
if (status == STATUS_SUCCESS) {
|
||||
status = fort_callout_install(device);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
fort_device_create (PDEVICE_OBJECT device, PIRP irp)
|
||||
{
|
||||
@ -375,7 +395,7 @@ fort_device_control (PDEVICE_OBJECT device, PIRP irp)
|
||||
status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
} else {
|
||||
fort_conf_ref_set(conf_ref);
|
||||
status = STATUS_SUCCESS;
|
||||
status = fort_callout_force_reauth(device);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -386,7 +406,7 @@ fort_device_control (PDEVICE_OBJECT device, PIRP irp)
|
||||
|
||||
if (len == sizeof(FORT_CONF_FLAGS)) {
|
||||
fort_conf_ref_flags_set(conf_flags);
|
||||
status = STATUS_SUCCESS;
|
||||
status = fort_callout_force_reauth(device);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user