Skip to content

ttp.service: stay stoppable on exit 3/9; notification recipient in ttp.conf - #202

Merged
onyks-os merged 3 commits into
mainfrom
fix/service-notifications
Dec 1, 2026
Merged

onyks-os merged 3 commits into
mainfrom
fix/service-notifications

Conversation

@onyks-os

@onyks-os onyks-os commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Follows a report by Rafael Dominiquini, maintainer of the AUR package, who tested packaging/ttp.service with notifications enabled.

Fixed: systemctl stop ttp could remove nothing. ttp start exits 3 (Tor not verified) or 9 (notifications unavailable) with the session installed. For a oneshot unit that is a failed start, and systemd never runs ExecStop for a unit that did not start, so the table and DNS overlay stayed until sudo ttp stop. The unit now has SuccessExitStatus=3 9. A static test ties the values to ExitCode. Exit 3 is deliberately not a teardown: that would turn a blocked, unverified session into a cleartext one.

Added: notifications.user in /etc/ttp/ttp.conf. ttp.service has no SUDO_UID, so notifications needed --notification-user in the unit. The key names the recipient when no flag is given; the flag wins. It lives in LoadedSettings, not in the frozen Settings snapshot, so a lock written before an upgrade still reads. The recipient's graphical session must exist when TTP starts; a session started at boot now gets an error saying exactly that.

Changed:

  • assets/ttp.conf.example has every value commented out, so installing it as /etc/ttp/ttp.conf (as the AUR package does, with backup=) pins no defaults.
  • The inconclusive-verification message says what holds meanwhile: the table was read back from the kernel as applied, and it blocks non-exempt traffic rather than sending it in clear. It still says this does not prove Tor carries traffic, and does not claim isolation (ADR 0013).

Docs: interfaces, CLI reference (exit codes + unit), session-observations how-to, changelog with credit.

🤖 Generated with Claude Code

onyks-os and others added 3 commits December 1, 2026 11:55
`ttp start` exits 3 (Tor not verified) and 9 (notifications unavailable)
with the session installed. As a oneshot unit, ttp.service was then
`failed`, and systemd never runs ExecStop for a unit that did not start:
`systemctl stop ttp` removed nothing. SuccessExitStatus=3 9 keeps the unit
active; the reason stays in the journal and in `ttp status`.

Reported by the AUR maintainer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
…r is unverified

ttp.service has no SUDO_UID, so notifications could not start without
--notification-user in the unit. `user` under [notifications] now names
the recipient when no flag is given. It lives in LoadedSettings, not in the
frozen Settings snapshot, so a lock written before an upgrade still reads.
With no graphical session yet, as at boot, the error says so.

The example config has its values commented out: installed as
/etc/ttp/ttp.conf, as the AUR package does, it pins nothing.

The inconclusive-verification message now says what holds meanwhile,
from evidence start has (the table read back from the kernel), without
claiming isolation (ADR 0013).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
@onyks-os
onyks-os merged commit b13ee48 into main Dec 1, 2026
63 of 68 checks passed
@onyks-os
onyks-os deleted the fix/service-notifications branch December 1, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant