Skip to content

Fix the game start with docker-compose 1.29; ship worlds with god locked - #3

Merged
vejeta merged 2 commits into
masterfrom
claude/cool-feynman-97nv7c
Oct 2, 2026
Merged

vejeta merged 2 commits into
masterfrom
claude/cool-feynman-97nv7c

Conversation

@vejeta

@vejeta vejeta commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Summary

Fix: the game container did not start on the VPS after the hardening in #1. Debian's docker-compose 1.29 hands ${VARIABLES} to Docker as strings, and Docker refused pids_limit: "512" (TypeError: Invalid type for pids_limit param: expected int). The limits are literal again (512 processes, 1g) in both compose files, and tests/test_compose.py keeps numeric settings literal. CI did not catch it because it runs Compose v2, which converts the type.

God's password locked in the shipped worlds. God's password opens every nation, and the game keeps only the first seven characters of a DES crypt (two of them the fixed salt), so the hash in a published world can be guessed back.

  • conqpasswd -l NATION stores a value no crypt() output can match (*LOCKED); conqpasswd -q NATION exits 3 while it is locked.
  • conquer/lib and conquer/practice-world now ship with god locked; the nations (trainee included) are unchanged, and the administrator's builder still works.
  • Each server sets its own: deploy-to-vps.sh and new-season.sh ask for it, set-nation-password.sh god --if-locked asks only while none is set, update-vps.sh and the container log warn while it is missing.
  • Running worlds keep their current password: change it with ./set-nation-password.sh god.

Testing

  • Against the real game: with god locked, no password (*LOCKED included) opens it; after setting one, only that one does; other nations are unaffected. The nation builder test passes with the locked world.
  • docker-compose 1.29 renders the VPS file with integer limits; the new test fails on the previous files and passes now.
  • CI: the shipped world is locked, the container logs the warning, conqpasswd -l and -q work.

Deploying

On the VPS, undo the hand fix first, then update:

runuser -u conquer -- git checkout -- docker-compose.vps.yml
./update-vps.sh

🤖 Generated with Claude Code

https://claude.ai/code/session_012PbWLvRqPFczMuZwP12Gte


Generated by Claude Code

vejeta added 2 commits October 2, 2026 19:44
God's password opens every nation, and the game keeps only the first seven
characters of a DES crypt (two of them the fixed salt), so the hash in a
published world can be guessed back. conqpasswd gains -l, which stores a
value no crypt() output can match ("*LOCKED"), and -q, which tells
whether a nation's password is locked (exit 3). The default and practice
worlds of the repository now have god locked; nations, the trainee
included, are unchanged, and the game's own builder still works for the
administrator.

The server sets its own: deploy-to-vps.sh and new-season.sh ask for it,
set-nation-password.sh god --if-locked asks only while none is set,
update-vps.sh and the container log warn while it is missing. CI checks
the shipped world is locked and conqpasswd -l/-q.
The VPS runs Debian's docker-compose 1.29, which hands ${VARIABLES} to
Docker as strings; Docker refused pids_limit: "512" and the game did not
start after the hardening. The limits are literal again (512 processes,
1g), and a test keeps numeric settings literal in both compose files.
@vejeta
vejeta merged commit c7a2174 into master Oct 2, 2026
3 checks passed
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