Skip to content

Keep the credential permission test independent of the caller umask. - #3

Open
tral wants to merge 1 commit into
telegramdesktop:masterfrom
tral:fix-credential-permission-test
Open

Keep the credential permission test independent of the caller umask.#3
tral wants to merge 1 commit into
telegramdesktop:masterfrom
tral:fix-credential-permission-test

Conversation

@tral

@tral tral commented Aug 22, 2026

Copy link
Copy Markdown

The installer runs with umask 077, so os.WriteFile could not create the group/other-readable profiles file the second half of the test relies on: the mode landed at 0400, Load correctly accepted it, and the assertion that a permissive file outside a credential directory is rejected failed. go test ./... therefore aborted every installation from a clean checkout.

Restore the intended mode with an explicit chmod. The permission check in loadProfiles is unchanged; only the fixture was umask-sensitive.

The installer runs with umask 077, so os.WriteFile could not create the
group/other-readable profiles file the second half of the test relies on:
the mode landed at 0400, Load correctly accepted it, and the assertion
that a permissive file outside a credential directory is rejected failed.
go test ./... therefore aborted every installation from a clean checkout.

Restore the intended mode with an explicit chmod. The permission check in
loadProfiles is unchanged; only the fixture was umask-sensitive.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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