fprintd_shim_phase2_SUCCESS.txt 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Phase 2 fprintd shim — GNOME Settings enrollment + deletion evidence
  2. =====================================================================
  3. Date: 2026-10-15 (continues work/debug/fprintd_shim_lock_screen_SUCCESS.txt)
  4. What works
  5. ----------
  6. * Enrollment from GNOME Settings (Users -> Fingerprint Authentication ->
  7. Add Fingerprint): verification of the flow 2026-10-15 13:04, 8 stages
  8. then commit; the finger is listed and matches:
  9. journalctl -u fprintd:
  10. 13:04:38 enroll start (right-middle-finger) by :1.2110
  11. 13:04:51..13:05:00 enroll: stages 1..8 passed
  12. 13:05:04 enroll: committed
  13. 13:05:04 enroll: user nebulon -> right-middle-finger (harness eof rc=0)
  14. $ fprintd-list nebulon
  15. Fingerprints for user nebulon on Synaptics 06cb:0081 (press):
  16. - #0: right-middle-finger
  17. $ fprintd-verify -f any nebulon (touch)
  18. Verify result: verify-match (done) rc=0
  19. * Deletion (executed end-to-end through the shim's DeleteEnrolledFinger):
  20. ListEnrolledFingers -> ['right-middle-finger']
  21. DeleteEnrolledFinger ok
  22. ListEnrolledFingers -> net.reactivated.Fprint.Error.NoEnrolledPrints
  23. Device-side, `delete.exe` (a.exe with enroll() redirected to the existing
  24. deleteRecord()) returns:
  25. about to 442034
  26. Got back 0x8 bytes: 0100000000000000 <- success
  27. Artifacts
  28. ---------
  29. * work/artifacts/make-enroll-delete.sh -> enroll.exe / delete.exe
  30. (a.exe ignores argv - the nop|identify|enroll dispatch is #if 0 upstream -
  31. so the hardcoded default flow is patched instead; no WDK headers needed)
  32. * state: /var/lib/fprintd-shim/state.json (created by the service;
  33. default for nebulon is right-index-finger = the original enrollment)
  34. Findings / caveats (all reproduced, all with log evidence)
  35. ----------------------------------------------------------
  36. 1. winusb stub exit(0): the hacked Wine winusb calls exit(0) on any failed
  37. libusb transfer (res_err/winusb.c). With WINEDEBUG=-all this is silent.
  38. Harness runs now use -all,err+all and log to /tmp/opencode/harness-*.log.
  39. 2. Re-enrolling an EXISTING record can die in the commit phase (the stub
  40. exits mid-write; both attempts 12:46 and 12:47 ended after the commit
  41. request with no response). A fresh commit (no record / after delete)
  42. committed cleanly (12:59 and 13:05). Recovery for a broken record:
  43. delete -> enroll again.
  44. 3. The 12:47 aborted update-commit left a device record that matched
  45. nothing (0x8009801F WINBIO_E_NO_MATCH for both fingers). Cleared with
  46. delete.exe; a fresh enroll then matched.
  47. 4. GNOME Settings' delete flow starts with an identify step (VerifyStart,
  48. expects a touch) and appears to abandon the delete call after ~10 s; the
  49. shim now (a) keeps a running delete.exe alive when the client releases,
  50. (b) updates the reported state optimistically at delete start (restored
  51. if the harness fails) so the UI immediately reflects the deletion, and
  52. (c) updates state after a successful harness run even if the client is
  53. gone (previously the release-during-delete left state.json stale).
  54. Verified 2026-10-15 13:5x: removal via Settings worked.
  55. 5. Why re-enrollments failed (13:10-13:13): a commit that *replaces* an
  56. existing record makes the device re-enumerate mid-write:
  57. /tmp/opencode/harness-enroll.exe-1792062705.log:
  58. 0009:err:winusb:WinUsb_WritePipe xfer Failed - LIBUSB_ERROR_NO_DEVICE
  59. (last marker: "about to Commit Enrollment", no response, harness rc=0)
  60. while a fresh commit (no record) completes normally:
  61. ... about to Commit Enrollment -> Got back 0x1 bytes: 01
  62. Fix in the shim: always delete any existing record before enrolling
  63. (delete ioctl does not reset the device), so every enrollment is a fresh
  64. write; state is cleared accordingly and set again on commit.
  65. Result: an enrollment that previously failed on the second attempt now
  66. runs delete -> fresh commit on every try.