Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mc-send-to-console running with uid=0(root) #3106

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

GiriNeko
Copy link
Contributor

I found an error in the conditional statement if [ "$(id -u)" != 0 ]; then.
This condition incorrectly allows the ‘minecraft’ user to access the pipe /tmp/minecraft-console-in when the UID is 0 (i.e., when running as the root user), resulting in permission errors.
This pull request corrects the erroneous check.

change the permission to exec pipe.
change the get uid ways.
@GiriNeko
Copy link
Contributor Author

i found the pipe /tmp/minecraft-console-in will grant by the environment $UID and $GID
the orignal if statement only can take the running user's id, so i changed.

bin/mc-send-to-console Outdated Show resolved Hide resolved
Co-authored-by: Geoff Bourne <itzgeoff@gmail.com>
@GiriNeko GiriNeko reopened this Oct 15, 2024
Copy link
Owner

@itzg itzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing that.

@itzg itzg merged commit 4085d28 into itzg:master Oct 15, 2024
5 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.

2 participants