8000 Comparing main...env-unquote · gominimal/min-zed · GitHub
[go: up one dir, main page]

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gominimal/min-zed
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: gominimal/min-zed
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: env-unquote
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 7 files changed
  • 2 contributors

Commits on Oct 30, 2026

  1. Write sshd's environment file from env -0, so values keep no quotes

    The box has GNU coreutils 9.12, whose plain `env` shell-quotes a value
    with a space or quote (FOO='a b'; MINIMAL_MOTD='[ -t 1 ] && ...').
    sshd reads ~/.ssh/environment literally, so such variables reached ssh
    shells with the quotes in them: Minimal's banner did not show, and a
    loadout variable with a space was wrong.
    
    PREP and the loadout hook now write the file from `env -0`, NUL-separated
    entries turned into lines, any entry whose value holds a newline dropped
    (the file cannot hold one). The filters after it are unchanged and still
    identical in both writers. Not awk with a NUL RS: macOS awk stops after
    the first record, and the tests run PREP on the Mac.
    
    Tests: tests/stubs/env prints like the box's env (quotes plain output,
    raw for -0). prep_env_values_raw and loadout_env_values_raw set FOO='a b'
    and a value with a newline, and assert FOO=a b raw and nothing of the
    multi-line value. Both fail with plain env put back.
    norrietaylor committed Oct 30, 2026
    Configuration menu
    Copy the full SHA
    f33f14a View commit details
    Browse the repository at this point in the history
  2. Run the environment-file tr and greps under LC_ALL=C

    In a UTF-8 locale GNU grep treats a line that is not valid UTF-8 as
    binary and suppresses it, so a value with such a byte dropped its entry
    (seen in a box: "binary file matches"). Both writers now run tr and every
    grep under LC_ALL=C. Tests: RAW=x\377y is kept by PREP and the loadout
    hook; the checks run under LC_ALL=C.
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    norrietaylor and claude committed Oct 30, 2026
    Configuration menu
    Copy the full SHA
    4e5bdaf View commit details
    Browse the repository at this point in the history
Loading
0