benluteijn / cherokee

Automatically exported from code.google.com/p/cherokee
0 stars 1 forks source link

getpwuid why bork on non presence? #224

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Get a system that doesn't implement /etc/passwd
2. server.c:1073: Can't get username for UID 0
3. Executing stops

What is the expected output? What do you see instead?
I think we could make it possible to to just warn the user, and not change
the user. The ent is only used in change_execution_user.

My suggestion would be:

Move getpwuid under chroot, skip the ret_error, create an else with the
change user.

Original issue reported on code.google.com by ste...@konink.de on 14 Nov 2008 at 9:51

GoogleCodeExporter commented 9 years ago
Might be a good thing to first compare if a change of user should be done.

Original comment by ste...@konink.de on 14 Nov 2008 at 9:56

GoogleCodeExporter commented 9 years ago
r2421 should have fixed it.
Stefan, could you please confirm? :-)

Original comment by alobbs on 17 Nov 2008 at 5:32

GoogleCodeExporter commented 9 years ago
Still alo, why execute the call if the user switch is not required?

Original comment by ste...@konink.de on 17 Nov 2008 at 5:44

GoogleCodeExporter commented 9 years ago
Yes, you are right on that.
Please check r2422.

Original comment by alobbs on 17 Nov 2008 at 5:56

GoogleCodeExporter commented 9 years ago
Thank you!

Original comment by ste...@konink.de on 17 Nov 2008 at 6:11