Skip to content

Commit

Permalink
generator: force load usbhid and hid_sensor_hub (#236)
Browse files Browse the repository at this point in the history
If fido2-assert tool is used then the usb modules are required.
  • Loading branch information
c3Ls1US authored Aug 4, 2023
1 parent 30d1a2e commit 1b65577
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,15 @@ func generateInitRamfs(conf *generatorConfig) error {
}
}

// force load usbhid and hid_sensor_hub modules when unlocking encrypted LUKS2 volumes with fido2 tokens/devices
for _, file := range conf.extraFiles {
if file == "fido2-assert" {
conf.modulesForceLoad = append(conf.modulesForceLoad, "usbhid", "hid_sensor_hub")

break
}
}

if err := kmod.resolveDependencies(); err != nil {
return err
}
Expand Down

0 comments on commit 1b65577

Please sign in to comment.