Skip to content

Update makemysql user check for carp#202

Merged
skybound0 merged 2 commits into
masterfrom
makemysql-nix-2
Apr 24, 2026
Merged

Update makemysql user check for carp#202
skybound0 merged 2 commits into
masterfrom
makemysql-nix-2

Conversation

@skybound0

Copy link
Copy Markdown
Contributor

SUDO_USER does not exist as an accessible environment variable on Nix for the Python os module. Replaced with pwd username check.

@skybound0
skybound0 merged commit 7855927 into master Apr 24, 2026
@kpengboy

Copy link
Copy Markdown
Member

Are you sure this works? On Debian at least, sudo python3 -c "import os; print(os.getuid())" prints 0.

@skybound0

Copy link
Copy Markdown
Contributor Author

Yes. Tested and works on tsunami and koi.

sophiebsw added a commit that referenced this pull request Jul 13, 2026
@sophiebsw

Copy link
Copy Markdown
Member

this does not work properly and is not needed

SUDO_USER is properly populated even on nixos, and the code in question will incorrectly return the uid of the mysql user

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.

4 participants