Uh oh!
There was an error while loading. Please reload this page.
Remove posix_getpwuid and compare only userid - #23158
Conversation
kesselb
commented
Oct 3, 2020
Thanks 👍
|
hoellen
commented
Oct 3, 2020
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>
hoellen
commented
Oct 6, 2020
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
MorrisJobke
commented
Oct 6, 2020
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? |
Spilarix
commented
Oct 7, 2020
I don't think so because in this case, /etc/passwd is not readable at all. |
kesselb
commented
Oct 7, 2020
|
Spilarix
commented
Oct 11, 2020
@hoellen Will you take these changes in charge or do you need help ? |
hoellen
commented
Oct 12, 2020
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 ? |
kesselb
commented
Oct 13, 2020
@MorrisJobke from my POV this is good to merge without the third commit. Mind to drop the third commit and merge it? |
Uh oh!
There was an error while loading. Please reload this page.
MorrisJobke
commented
Oct 14, 2020
@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 ? |
MorrisJobke
commented
Oct 14, 2020
@hoellen I count your 🚀 reaction to my comment as "ship it" 😄 |
MorrisJobke
commented
Oct 14, 2020
#23436 is merged -> let's close this here. |
MorrisJobke
commented
Oct 14, 2020
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
occand the cron job freezing and causing a thread to load 100% infinitely.This patch fixed it for me.
posix_getpwuidreturns 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.phpandcron.php.