Repository navigation
Apply RemoveIPC=no at once, and report it only once it is in effect - #121
Merged
Merged
Conversation
setRemoveIPC.sh wrote logind's config and stopped, and the "Survives logout" row read that file, so the row vanished while the running logind still had RemoveIPC=yes -- and logind reads the loaded value when a user's last session ends, so the next logout killed the database anyway. The script now sends logind SIGHUP, which re-reads its config without a restart, and waits for the live value to change. The row reads logind's RemoveIPC D-Bus property (any user may) and falls back to the files when busctl or logind cannot answer; a file logind has not loaded shows as "not yet applied" instead of hiding the row. unset-os-config.sh reloads the same way. Measured on systemd 249 (Ubuntu 22.04) and 255 (24.04) in containers: writing the file alone leaves the property true; the script flips it with no logind restart; a test user's shared-memory segment survives logout after the script and is destroyed under the default. `--kill-whom` is not used because systemd 249's systemctl does not know it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On Linux, clicking the Survives logout row ran
setRemoveIPC.sh, which wroteRemoveIPC=noto logind's config and stopped there. The row checked that file, so it disappeared straight away. But logind still had the old setting loaded, and it uses the loaded value when a user's last session ends. So the next logout destroyed the database's shared memory even though the sidebar said the problem was fixed. The success message did mention a restart, but the row going away said otherwise.What
setRemoveIPC.shapplies the change. After writing the file it sends logind a reload signal (SIGHUP), which makes it re-read its config without restarting. Then it waits for logind's liveRemoveIPCvalue to change.unset-os-config.shreloads the same way when it removes the file.RemoveIPCD-Bus property withbusctl, which any user can do. Ifbusctlor logind can't answer, it falls back to reading the config files, as before.README.mdanddocs/automation-boundary.mdare updated to match.Worth checking
systemctl. The script callssystemctl kill --signal=SIGHUPwithout--kill-whom, because systemd 249'ssystemctlrejects that option. My first version used it and the reload silently never happened. logind runs as a single process, so leaving the option out makes no difference.busctlfails and the check falls back to the files. That's the same answer the row gave before this change.Testing
Tested against real systemd in privileged Docker containers:
b trueb false, "Config file reloaded", no logind restartb false, no logind restartbusctl's output.npm test(762 passed), lint, format check and both typechecks pass.sudo, so it will now reload logind on the runner too.🤖 Generated with Claude Code