-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Remove posix_getpwuid and compare only userid #23158
Conversation
Thanks 👍
|
Thanks @kesselb, fixed 👍 |
Thanks for your PR. Could you add them to your pull request please ? |
Signed-off-by: hoellen <dev@hoellen.eu>
Signed-off-by: hoellen <dev@hoellen.eu>
Signed-off-by: hoellen <dev@hoellen.eu>
I can understand the idea behind this, but it then reduces the UX for admins. Now a numerical value is shown as a hint in the setup checks. Isn't it possible to get the user name somehow to properly show it in the UI? |
I don't think so because in this case, /etc/passwd is not readable at all. |
|
@hoellen Will you take these changes in charge or do you need help ? |
If I execute the function, the PHP script freezes and fully loads a thread. I believe this is some misconfiguration on my side. I still need to investigate it.
I have no time this week to do this. Feel free to take over, if it is urgent for you. |
@hoellen Does it freeze when the call to posix_getpwuid return false or whatever its value ? |
@MorrisJobke from my POV this is good to merge without the third commit. Mind to drop the third commit and merge it? |
@hoellen I opened a PR with only the first 2 commits in #23436 (review) I you want to get this for your Hacktoberfest count, then feel free to open a new PR with only the two commits so it counts towards your PR number. 😃 |
@MorrisJobke Is it possible to include this in a 20.0.X release instead of 21 ? |
@hoellen I count your 🚀 reaction to my comment as "ship it" 😄 |
#23436 is merged -> let's close this here. |
I would not do it for now. Is this causing that much trouble? |
@MorrisJobke It's a fix and not an evolution, that's the first reason why it seems strange to me to not get it before 21.x. |
I had some trouble with the command
occ
and the cron job freezing and causing a thread to load 100% infinitely.This patch fixed it for me.
posix_getpwuid
returns an array with information about user/group/etc. for current user. These information is not available when /etc/passwd is not readable (see https://secure.php.net/manual/en/function.posix-getpwuid.php#45994).Calling posix_getpwuid() twice should not result in something different for the same input, and if it is not the same input, the result is also never the same. So comparing only the user id should be fine.
Same as #11091 for
console.php
andcron.php
.