|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-12 18:05 UTC] sniper@php.net
[2006-04-03 14:03 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 09 03:00:01 2025 UTC |
Description: ------------ The cgi module does not accept unix domain sockets as parameters to option "-b", as it will be prefixed by ":". This is needed so I don't have to revert to using iptables with owner matching to set access restrictions for local users; but use directory/file permissions. Here's a patch against the latest CVS version to not prepend bindpath with ":" when it looks like a file: Index: sapi/cgi/cgi_main.c =================================================================== RCS file: /repository/php-src/sapi/cgi/cgi_main.c,v retrieving revision 1.256 diff -u -r1.256 cgi_main.c --- sapi/cgi/cgi_main.c 14 Jul 2004 22:30:27 -0000 1.256 +++ sapi/cgi/cgi_main.c 8 Aug 2004 14:53:57 -0000 @@ -1130,7 +1130,7 @@ * path (it's what the fastcgi library expects) */ - if (strchr(bindpath, ':') == NULL) { + if ((strchr(bindpath, ':') == NULL) && (strchr(bindpath, '/') == NULL)) { char *tmp; tmp = malloc(strlen(bindpath) + 2); Reproduce code: --------------- php -b /var/run/fastcgi/php4-someuser Expected result: ---------------- Start a FastCgi server listening on "/var/run/fastcgi/php4-someuser". Actual result: -------------- No server starting as ":/var/run/fastcgi/php4-someuser" is passed to libfcgi.