Page MenuHomePhabricator

do not run rads outside of boot process
Closed, ResolvedPublic

Description

There is a bug. When installing/updating rads when no login manager is started, rads is started. Example: when running no login manager and running "apt-get dist-upgrade" during a rads upgrade.

Half solution: make rads exit early if stdin and/or a tty is detected. (When run by systemd during boot, there is no stdin connected.)

Full Solution: somehow distinguish "boot -> run rads normally" vs "run by apt-get/dpkg -> exit rads early".

Details

Impact
High

Event Timeline

Patrick created this task.May 16 2015, 4:57 AM
Patrick claimed this task.
Patrick raised the priority of this task from to Normal.
Patrick updated the task description. (Show Details)
Patrick added projects: rads, Whonix 11, bug.
Patrick set Impact to High.
Patrick added a subscriber: Patrick.
Patrick added a comment.EditedMay 18 2015, 2:36 PM

Implemented the half solution.
Do not run rads outside of boot process.
When started by systemd, there is no stdin connected and "tty" exit code is 1.
In these cases, rads is likely run during an interactive apt-get upgrade.
Exit in those cases.
https://phabricator.whonix.org/T308:
https://github.com/Whonix/rads/commit/d3c27f735155033f53fb6ce8e75330255cc29bf9

How to distinguish if a systemd unit is run by apt-get or during boot?:
https://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/2015-May/007274.html

Patrick changed the task status from Open to Review.May 23 2015, 2:19 AM

do not run rads outside of boot process - https://phabricator.whonix.org/T308:
https://github.com/Whonix/rads/commit/cb90ac1c54900fc27e9b80ccc2c46ea95f98a324

In T308#4679, @Patrick wrote:

Implemented the half solution.
Do not run rads outside of boot process.
When started by systemd, there is no stdin connected and "tty" exit code is 1.
In these cases, rads is likely run during an interactive apt-get upgrade.
Exit in those cases.
https://phabricator.whonix.org/T308:
https://github.com/Whonix/rads/commit/d3c27f735155033f53fb6ce8e75330255cc29bf9

Undone because of better implementation (https://phabricator.whonix.org/T57#4891) and because dh_systemd_start --no-start (https://phabricator.whonix.org/T308#4837) is enough.

Patrick closed this task as Resolved.May 24 2015, 5:18 PM

Fixed in Whonix 11.0.0.2.0-developers-only.

Running sudo apt-get install --reinstall rads and sudo apt-get purge rads && sudo apt-get install rads succeeded (didn't start rads during re-installation). (Currently from developers repository that was upgraded as per 11.0.0.2.0-developers-only.)