Commit Graph

107 Commits

Author SHA1 Message Date
Glenn Strauss fdc4c324c4 [mod_authn_ldap] replace use of deprecated funcs
[mod_authn_ldap,mod_vhostdb_ldap]
replace use of deprecated funcs
remove -DLDAP_DEPRECATED
2017-11-05 18:50:25 -05:00
Glenn Strauss 82d374328f [autobuild] allow sendfile() in cross-compile (fixes #2836)
allow sendfile() in cross-compile if sys/sendfile.h header detected
and sendfile() symbol detected (e.g. in libc)

If sendfile() is present but always returns ENOSYS, lighttpd will
be slightly less efficient, but will fall back to writev() or write()

User should explicitly set server.network-backend = "writev" in
lighttpd.conf on systems with broken sendfile()

x-ref:
  "Remove check for broken sendfile implementations"
  https://redmine.lighttpd.net/issues/2836
2017-11-02 00:41:53 -04:00
Glenn Strauss caab4cdf8a [autobuild] remove obsolete warning about mmap use
lighttpd protects against SIGBUS when accessing mmap'd files
2017-10-28 23:02:32 -04:00
Stefan Bühler 6976b5e8a8 [autobuild] generate version id with m4 instead of awk 2017-10-28 22:48:12 -04:00
Stefan Bühler a45f3bac58 [autobuild] improve feature+module counting 2017-10-28 22:48:12 -04:00
Stefan Bühler 6751571805 [autobuild] simple check for fork 2017-10-28 22:48:12 -04:00
Stefan Bühler 5854466908 [autobuild] improve crypt[_r] 2017-10-28 22:48:12 -04:00
Stefan Bühler 34ded72469 [autobuild] improve openssl 2017-10-28 22:48:12 -04:00
Stefan Bühler 2c69ef6704 [autobuild] kerberos improvements 2017-10-28 22:48:12 -04:00
Stefan Bühler 955b029f2f [autobuild] move some checks to the top
Moved some generic checks from the middle of the "feature checks" to the
top.
2017-10-28 22:48:12 -04:00
Stefan Bühler 41cd7d25a8 [autobuild] lots of small cleanups
- remove checks with unused results
- make some failures explicit
- improve some fail messages
2017-10-28 22:48:12 -04:00
Stefan Bühler d8d7d1977a [autobuild] m4 and shell quoting, whitespace changes, sort some lists 2017-10-28 22:48:12 -04:00
Stefan Bühler f107bac819 [autobuild] require autoconf >= 2.60, automake >= 1.14
- AC_USE_SYSTEM_EXTENSIONS requires autoconf 2.60; using it replaces
  AC_AIX, AC_ISC_POSIX, AC_MINIX and -D__EXTENSIONS__
- require at least automake 1.12 to remove hack for serial-tests
- automake 1.12 is from 2012, automake 1.14 from 2013
- automake 1.14 allows us to drop AM_PROG_CC_C_O
- we don't use $LN_S, drop AC_PROG_LN_S
- silent-rules replaces AM_SILENT_RULES
2017-10-28 22:48:12 -04:00
Glenn Strauss 6a17133a75 - next is 1.4.48 2017-10-22 16:43:33 -04:00
Glenn Strauss 6be68f569f [mod_authn_gssapi] needs -lcom_err under Darwin 2017-10-21 19:16:33 -04:00
Glenn Strauss 5780d6cc58 - next is 1.4.47 2017-10-21 16:37:13 -04:00
Glenn Strauss 477534084a [mod_wstunnel] websocket tunnel to other protocol
*experimental*

decodes websockets and passes body back and forth from backend
(body could be known protocol such as JSON, or any custom protocol)

originally based off https://github.com/nori0428/mod_websocket
2017-07-25 02:29:23 -04:00
Glenn Strauss 6f88c28c44 [core] fix compiler warnings on Mac OS X
(thx wardw)
2017-06-13 08:56:13 -04:00
Glenn Strauss 6f75cdddda [build] autotools use AC_PROG_CC_STDC macro
autotools now use AC_PROG_CC_STDC macro instead of -std=gnu99.
The default in current modern gcc compilers is -std=gnu11

(Note: src/CMakeLists.txt and SConstruct still specify -std=gnu99)
2017-05-15 22:02:33 -04:00
Glenn Strauss 1e8147fc3a [build] -Werror if --enable-extra-warnings=error
enable -Werror if ./configure --enable-extra-warnings=error

x-ref:
   "Fix warnings"
   https://github.com/lighttpd/lighttpd1.4/pull/81
2017-05-15 22:02:33 -04:00
Glenn Strauss 2986221cab [core] sys-strings.h abstraction for strings.h 2017-04-24 10:14:17 -04:00
Glenn Strauss f94d666d15 [mod_authn_gssapi] needs -lcom_err under cygwin 2017-03-10 02:42:35 -05:00
Glenn Strauss 92c724eac6 [doc] doc/initscripts.txt (fixes #2782)
add doc/initscripts.txt with description of lighttpd signal handling
  and links to the initscripts of various operating system distros

remove doc/initscripts/*

x-ref:
  "init scripts outdated, should be removed"
  https://redmine.lighttpd.net/issues/2782
2017-01-31 14:40:02 -05:00
Glenn Strauss 2f83aac9fb mod_vhostdb* (dbi,mysql,pgsql,ldap) (fixes #485, fixes #1936, fixes #2297)
mod_vhostdb - vhost docroot lookups

backends:

mod_vhostdb_dbi
mod_vhostdb_ldap
mod_vhostdb_mysql  (now preferred over mod_mysql_vhost.c)
mod_vhostdb_pgsql

STATUS: experimental  (testing and feedback appreciated)

x-ref:
  "PostgreSQL virtual host support"
  https://redmine.lighttpd.net/issues/485
  "LDAP Virtual Host Definition Storage Integration"
  https://redmine.lighttpd.net/issues/1936
  "mod_dbi_vhost (patch included)"
  https://redmine.lighttpd.net/issues/2297
2017-01-31 14:36:15 -05:00
Glenn Strauss cb9ebe9fa6 [mod_openssl] new module (preliminary layout) 2017-01-14 01:06:16 -05:00
Glenn Strauss b0d63e31e8 - next is 1.4.46 2017-01-14 01:06:00 -05:00
Glenn Strauss 656f9e454d - next is 1.4.45 2016-12-24 01:07:46 -05:00
Glenn Strauss 22ca2778a8 [build] check for pipe2() at configure time
Lack of pipe2() on relic Unix as well as missing on Mac OSX is likely
one reason why threaded web servers such as nginx choose not to support
CGI except via an external service to the process.  Without pipe2(),
race conditions exist and it is not safe for a threaded server to use
pipe() and fork() when the server also does not want to potentially leak
open file descriptors to various unrelated CGI scripts.
2016-12-17 18:07:42 -05:00
Glenn Strauss 539deb7370 [autobuild] set NO_RDYNAMIC=yes for midipix
(thx Redfoxmoon)
2016-12-16 17:43:10 -05:00
Glenn Strauss df61f19daf [core] compile fix for Mac OS X 10.6 (old) (fixes #2773)
Mac OS X 10.7 Lion introduces arc4random_buf()

(thx ryandesign)

x-ref:
  "Mac OS X build issue Undefined symbols"
  https://redmine.lighttpd.net/issues/2773
2016-11-28 12:39:11 -05:00
Glenn Strauss 33e3504bcb - next is 1.4.44 2016-10-31 09:58:23 -04:00
Glenn Strauss f910e0917d [autotools] fix configure.ac for opensuse 13.2
x-ref:
  https://mail.gnome.org/archives/commits-list/2016-June/msg02601.html
2016-10-31 08:45:09 -04:00
Glenn Strauss 3d04bc45f6 [build] move some build scripts to scripts/ 2016-10-30 16:47:53 -04:00
Stefan Bühler 8e678653be [autobuild] put ax_prog_cc_for_build.m4 in top directory
- "autoreconf --force --install" should be enough to get autobuild
  running, manual cp / running ./autogen.sh should not be required
- reorganize files laters, e.g. scripts/{cmake,m4}
- include ax_prog_cc_for_build.m4 manually in configure.ac as it is not
  automatically loaded if it is not in m4/
2016-10-29 18:02:12 +02:00
Andreas Oberritter 30c54b65e4 build: use CC_FOR_BUILD for lemon when cross-compiling 2016-10-20 16:50:28 -04:00
Glenn Strauss 1f3ad401ba [mod_deflate] skip deflate if loadavg too high (fixes #1505)
[mod_deflate] skip deflate if 1 min loadavg too high
deflate.max-loadavg  = "3.50"  # express value as string of float num

[mod_compress] skip compression if 1 min loadavg too high
compress.max-loadavg = "3.50"  # express value as string of float num

Feature available on BSD-like systems which have getloadavg() in libc

Note: load average calculations are different on different operating
systems and different types of system loads, so there is no value that
can be recommended for one-size-fits-all.

x-ref:
  "Enable mod_compress to abandon compression when load average is too high"
  https://redmine.lighttpd.net/issues/1505
2016-10-19 16:38:47 -04:00
Glenn Strauss c073a31f69 [autobuild] omit module stubs when missing deps
do not build any module (containing module stubs) when the dependencies
for a given module are not present.
2016-10-17 14:15:50 -04:00
Glenn Strauss 5feb2694f7 [autobuild] remove mod_authn_gssapi dep on resolv
remove mod_authn_gssapi explicit dependency on -lresolv
This fixes build on FreeBSD when ./configure --with-krb5
(On systems that need libresolv, libkrb5 depends on libresolv)

Also remove obsolete hstrerror() references from build
2016-10-16 08:56:30 -04:00
Glenn Strauss 22c560c228 - next is 1.4.43 2016-10-16 07:58:46 -04:00
Glenn Strauss 032772ab6c add random() to list of rand() fallbacks
(but prefer better mechanisms)
2016-10-16 05:11:38 -04:00
Glenn Strauss 7f4e156e5f [core] rand.[ch] to use better RNGs when available
prefer RAND_pseudo_bytes() (openssl), arc4random() or jrand48(),
if available, over rand()

These are not necessarily cryptographically secure, but should be better
than rand()
2016-10-15 23:28:09 -04:00
Glenn Strauss 06cb0c3024 [autobuild] update module/feature report
update module/feature report at end of ./configure run
2016-10-04 05:03:15 -04:00
Glenn Strauss 1c1a63786e [mod_auth] mod_authn_gssapi Kerberos auth backend (fixes #1899)
module status: experimental; more testing and review needed

Kerberos library calls have been preserved from original patch set
and should be reviewed.

module has been quickly tested with Basic auth (Use over TLS!)

SPNEGO -has not- been tested.  Again, kerberos library calls have
been preserved from original patch set.  YMMV. (Use over TLS!)

x-ref:
  "Kerberos/GSSAPI Delegation Support"
  https://redmine.lighttpd.net/issues/1899
2016-09-22 23:15:38 -04:00
Glenn Strauss cb1a3c6299 backport mod_deflate to lighttpd 1.4 (fixes #1824, fixes #2753)
lots of fixes and improvements

limitations: see comments at top of mod_deflate.c

missing functionality: encode streaming response
  (module currently requires response be collected before being sent)

potential functionality: addition of compressed file cache would
  allow mod_deflate to fully supplant mod_compress in lighttpd 1.4.x

x-ref:
  "Adding mod_deflate to 1.4.xx"
  https://redmine.lighttpd.net/issues/1824
  "mod_deflate backport compile error if ENABLE_MMAP not defined"
  https://redmine.lighttpd.net/issues/2753

github: closes #67
2016-09-22 13:36:04 -04:00
Glenn Strauss 5dfe21acc9 [mod_geoip] add to default build (fixes #2705, fixes #2101, fixes #2092, fixes #2025, fixes #1962, fixes #1938)
(add to default build to reduce distributor package maintenance)

x-ref:
  "broken module API since 1.4.38"
  https://redmine.lighttpd.net/issues/2705
  "lighttpd-1.4.24 fails to compile with mod_geoip.c"
  https://redmine.lighttpd.net/issues/2101
  "unsafe sprintfs mod_geoip"
  https://redmine.lighttpd.net/issues/2092
  "mod_geoip crashes lighttpd 1.5.x on FreeBSD 7.2 AMD64"
  https://redmine.lighttpd.net/issues/2025
  "mod_geoip"
  https://redmine.lighttpd.net/issues/1962
  "lighttpd 1.4 crashes on FreeBSD 7.0 AMD64 when mod_geoip compiled in"
  https://redmine.lighttpd.net/issues/1938
2016-09-13 02:49:00 -04:00
Glenn Strauss ccd817d3c9 - next is 1.4.42 2016-07-31 08:40:41 -04:00
Glenn Strauss 4d920466f7 [autobuild] clock_gettime() -lrt with glibc < 2.17
clock_gettime() needs -lrt with glibc < 2.17,
and possibly other platforms

On systems without clock_gettime (-cough- Mac OSX -cough-),
use gettimeofday() (deprecated in POSIX.1-2008) which is slightly
lower precision, but reasonably fast in execution.  References:
http://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x
http://stackoverflow.com/questions/11680461/monotonic-clock-on-osx
https://discussions.apple.com/thread/6023936?tstart=0
2016-07-18 23:24:42 -04:00
fbrosson 72abc87b40 [autobuild] move inet_pton detection later
HAVE_INET_PTON was probably not being defined on Solaris.

While at it, also add detection for accept() in libnetwork for Haiku.

github: closes #68
2016-07-18 00:30:27 -04:00
Glenn Strauss 8f8fa606ca - next is 1.4.41 2016-07-16 07:58:40 -04:00
Glenn Strauss a5fcfee6fc [mod_ssi] more flexible quoting (fixes #1768)
allow double-quotes, single-quotes or no quote on SSI param values

remove use of PCRE from mod_ssi

fix misspelling of 'unknow' to be 'unknown'

x-ref:
  "mod_ssi doesn't accept single quotes"
  https://redmine.lighttpd.net/issues/1768
2016-05-14 05:50:37 -04:00