-
sdwdate-1.0.0-1 Stable
released this
2026-07-10 18:19:31 +02:00 | 7 commits to main since this releasesdwdate (lainOS layer 02 port) ~ Changelog
1.0.0-1 (2026-07-10) ~ Initial port
First working LainOS Layer 02 / OpenRC port of Kicksecure's sdwdate.
Ported from upstream (GPLv3):
- Core Python daemon and
sclockadjC helper (compiled with upstream's full hardened compiler flag set) - Default time-source pool configuration
url_to_unixtimeper-source fetcher
New, LainOS-native components (not vendored from Kicksecure):
sanitize_string/guimessages.translations~ minimal reimplementations of two cosmetic Kicksecure helper packageslainos-minimum-unixtime-show~ reimplementation of the anti-replay-protection floor-timestamp mechanism (replaces Kicksecure'stimesanitycheckpackage dependency)lainos-onion-time-pre-script~ no-op replacement for upstream's privleap/AppArmor-dependent Tor-restart-request signaling (not applicable on LainOS)- OpenRC init script, translated from upstream's systemd unit:
need tor/after tordependency ordering,setcap cap_sys_time+epin place ofAmbientCapabilities=CAP_SYS_TIME, required runtime directories created instart_pre()
Deliberately not ported: AppArmor profiles, privleap integration, Qubes-specific conditionals, the Tor-restart-request file-watcher mechanism, and dev-only test scripts. See README for full rationale on each.
Known gaps relative to upstream:
- No seccomp/
SystemCallFilterequivalent yet (OpenRC has no direct translation; a wrapper-based approach similar toprotocol7-core's daemons would be needed) - Tor-restart-on-request is not implemented (daemon runs fine without it; only affects the specific edge case upstream's file-watcher mechanism handles)
Verified working end-to-end (2026-07-10): real onion time sources contacted over Tor, Tor consensus sanity checks passing, correct median computation across sources,
sclockadjcorrectly applying a real (small) gradual clock correction, all with a genuinely accurate result.Companion change (in
lainos-utils): addedlainos-sdwdatetoggle script (enable/disable/status) to switch betweenchrony(default) andsdwdate, since sdwdate has no fallback if Tor is unreachable and the two should not run simultaneously.
Bugs found and fixed during initial porting/testing
For reference, the real issues found getting this daemon running for the first time, each confirmed via actual testing rather than assumed:
/usr/bin/sdwdate(the interactive CLI wrapper) callsleaprun, a privleap command not present on LainOS ~ resolved by pointing the OpenRC service at the real daemon entry point (/usr/libexec/sdwdate/sdwdate) directly, matching what upstream's own systemd unit does (the wrapper script was never meant to be the service entry point).- Python package files installed to Debian's
dist-packagesconvention; Arch usessite-packages~ fixed install paths in the PKGBUILD. sdwdatesystem user's home directory didn't match what the daemon's status-file logic expects (/run/sdwdate) ~ fixed viausermod/.install./var/lib/sdwdate-forbidden-temp(a directory upstream's code creates unconditionally, originally to work around an AppArmor constraint that doesn't apply here) wasn't being created ~ added to the init script'sstart_pre()./usr/libexec/helper-scripts/onion-time-pre-scriptwas missing entirely (privleap/AppArmor-specific upstream component) ~ replaced with the no-oplainos-onion-time-pre-scriptdescribed above.url_to_unixtimewasn't installed at all (missed in the initial package file list) ~ added.- Tor's control-port authentication cookie (
/var/lib/tor/control_auth_cookie) wasn't readable by thesdwdateuser, causing Tor consensus sanity checks to fail even though basic SOCKS-based fetching worked ~ fixed by addingsdwdateto thetorgroup.
Downloads
- Core Python daemon and