summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarini Ramakrishnan <haramakr@microsoft.com>2019-02-28 14:28:19 -0800
committerHarini Ramakrishnan <haramakr@microsoft.com>2019-04-08 13:07:53 -0700
commitee2a97789c51c09a488c44905d2447d29e2d71f4 (patch)
tree6f7ca579a2e544c149a69e86f2224d4414aa0dab
parentc7520c282d0f75f78a600806e8fa300e33670384 (diff)
downloaddpdk-draft-windows-ee2a97789c51c09a488c44905d2447d29e2d71f4.zip
dpdk-draft-windows-ee2a97789c51c09a488c44905d2447d29e2d71f4.tar.gz
dpdk-draft-windows-ee2a97789c51c09a488c44905d2447d29e2d71f4.tar.xz
uio: move SDDL string to INF on Windows
-rw-r--r--kernel/windows/netuio/netuio.inf7
-rw-r--r--kernel/windows/netuio/netuio_dev.c15
2 files changed, 12 insertions, 10 deletions
diff --git a/kernel/windows/netuio/netuio.inf b/kernel/windows/netuio/netuio.inf
index 0453b37..b1696cc 100644
--- a/kernel/windows/netuio/netuio.inf
+++ b/kernel/windows/netuio/netuio.inf
@@ -62,6 +62,13 @@ CopyFiles=Drivers_Dir
[Drivers_Dir]
netuio.sys
+[netuio_Device.NT.HW]
+AddReg=Device.HW.Registry
+
+[Device.HW.Registry]
+; Ensure that only administrators can access our device object.
+HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)"
+
;-------------- Service installation
[netuio_Device.NT.Services]
AddService = netuio,%SPSVCINST_ASSOCSERVICE%, netuio_Service_Inst
diff --git a/kernel/windows/netuio/netuio_dev.c b/kernel/windows/netuio/netuio_dev.c
index f5d41cb..a1fe447 100644
--- a/kernel/windows/netuio/netuio_dev.c
+++ b/kernel/windows/netuio/netuio_dev.c
@@ -33,18 +33,13 @@ netuio_create_device(_Inout_ PWDFDEVICE_INIT DeviceInit)
PAGED_CODE();
- // Ensure that only administrators can access our device object.
- status = WdfDeviceInitAssignSDDLString(DeviceInit, &SDDL_DEVOBJ_SYS_ALL_ADM_ALL);
+ WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&deviceAttributes, NETUIO_CONTEXT_DATA);
- if (NT_SUCCESS(status)) {
- WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&deviceAttributes, NETUIO_CONTEXT_DATA);
-
- // Set the device context cleanup callback.
- // This function will be called when the WDF Device Object associated to the current device is destroyed
- deviceAttributes.EvtCleanupCallback = netuio_evt_device_context_cleanup;
+ // Set the device context cleanup callback.
+ // This function will be called when the WDF Device Object associated to the current device is destroyed
+ deviceAttributes.EvtCleanupCallback = netuio_evt_device_context_cleanup;
- status = WdfDeviceCreate(&DeviceInit, &deviceAttributes, &device);
- }
+ status = WdfDeviceCreate(&DeviceInit, &deviceAttributes, &device);
if (NT_SUCCESS(status)) {
// Create a device interface so that applications can find and talk to us.