• 1.0.0-5 c00523a20b

    amnesia released this 2026-07-11 19:43:32 +02:00 | 2 commits to main since this release

    sdwdate (LainOS Layer 02 port) ~ Changelog

    1.0.0-5 ~ Hardware clock sync fix

    Bug Fix

    • Fixed FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/leaprun' during a real sync cycle. Two call sites in sdwdate.py (run_sclockadj_and_hwclock() and run_sclockadj()) shell out to leaprun sdwdate-sync-hwclock after applying a time correction, to sync the hardware clock (hwclock --systohc) so the correction survives a reboot. leaprun is part of Kicksecure's privleap privilege-delegation tool, not used on LainOS ~ this call site was missed during the initial port (the CLI wrapper's leaprun call was caught and fixed earlier; these two daemon-internal calls were not).
    • Fix: patched both call sites to invoke /usr/bin/hwclock --systohc directly.
    • This surfaced a second, distinct permission issue: hwclock: ioctl(RTC_SET_TIME) to /dev/rtc to set the time failed: Permission denied. /dev/rtc0 was root-only (0600) with no group access, and even after granting access, the RTC_SET_TIME ioctl itself additionally requires the calling process to hold CAP_SYS_TIME beyond plain file permissions.
    • Fix:
      • Added a udev rule (99-lainos-sdwdate-rtc.rules) granting the sdwdate group read/write access to /dev/rtc0 (mode 0660).
      • Granted CAP_SYS_TIME to /usr/bin/hwclock via setcap, alongside the existing grants for sdwdate, sclockadj, and /bin/date.
    • Verified end-to-end from a clean package install: forced a real 30-second clock discrepancy, triggered a fresh sync, confirmed sclockadj completed, Syncing hardware clock logged with no error, and the sync loop returned to its normal sleep cycle ~ the full corrected chain, not just a zero-diff no-op.

    Downloads