- Workaround for a problem when access one symbolic link and end with /.

- Bump PORTREVISION.

Take from:	http://redmine.lighttpd.net/issues/1989
This commit is contained in:
Marcus Alves Grando 2009-06-06 23:09:27 +00:00
parent 81b3ce3c32
commit 1d224692aa
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=235342
2 changed files with 22 additions and 1 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= lighttpd
PORTVERSION= 1.4.22
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= http://www.lighttpd.net/download/ \
http://mirrors.cat.pdx.edu/lighttpd/

View file

@ -0,0 +1,21 @@
#
# Do not remove until http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/21768
# is not applied and release new versions.
#
Index: stat_cache.c
===================================================================
--- src/stat_cache.c (revision 1006)
+++ src/stat_cache.c (revision 1008)
@@ -487,6 +487,12 @@
if (S_ISREG(st.st_mode)) {
+ /* fix broken stat/open for symlinks to reg files with appended slash on freebsd,osx */
+ if (name->ptr[name->used-2] == '/') {
+ errno = ENOTDIR;
+ return HANDLER_ERROR;
+ }
+
/* try to open the file to check if we can read it */
if (-1 == (fd = open(name->ptr, O_RDONLY))) {
return HANDLER_ERROR;