• 1.0.0-4 e950798ecc

    amnesia released this 2026-07-11 17:49:46 +02:00 | 3 commits to main since this release

    sdwdate (lainOS layer 02 port) ~ Changelog

    1.0.0-4 ~ First-sync permission fix

    Bug Fix

    • Fixed date: cannot set date: Operation not permitted on sdwdate's first successful sync after being enabled (or after any hard clock-jump correction). sdwdate's own code (set_time_using_date() in sdwdate.py) shells out directly to /bin/date --set for the first sync and any explicit hard jump, rather than the gradual sclockadj path used for all subsequent, smaller corrections. This path was missing the CAP_SYS_TIME capability grant that sdwdate and sclockadj already had.
    • Fix: granted CAP_SYS_TIME to /bin/date via setcap in the init script's start_pre(), alongside the existing grants for sdwdate and sclockadj.
    • Note on scope: unlike the other two setcap grants (which apply to single-purpose binaries only the sdwdate user ever invokes), /bin/date is a general system utility used by every user on the system. This capability grant is file-wide, meaning any local user could technically use date --set to change the system clock, not just the sdwdate daemon. CAP_SYS_TIME alone grants no other capability (no file access, no broader privilege escalation path), and this was accepted as a reasonable, documented tradeoff rather than patching upstream's source to avoid the /bin/date call entirely for the first-sync case. Commented clearly in the init script for future reference.
    • Verified fixed: a forced first-sync (via lainos-sdwdate disable / enable) completed successfully with the correction applied and no permission error.
    Downloads