Commit Graph

36 Commits (bedfd8a78e8a5cfd2d40affb3486dec9723596d6)

Author SHA1 Message Date
Glenn Strauss 4863c9a63c [multiple] pass len when copying constant strings 2 years ago
Glenn Strauss 367f30a645 [multiple] extend enum http_header_e list 2 years ago
Glenn Strauss 33c8cf41db [multiple] rename connection_reset hook to request
rename connection_reset to handle_request_reset
3 years ago
Glenn Strauss 7c7f8c467c [multiple] split con, request (very large change)
NB: r->tmp_buf == srv->tmp_buf (pointer is copied for quicker access)

NB: request read and write chunkqueues currently point to connection
    chunkqueues; per-request and per-connection chunkqueues are
    not distinct from one another
      con->read_queue  == r->read_queue
      con->write_queue == r->write_queue

NB: in the future, a separate connection config may be needed for
    connection-level module hooks.  Similarly, might need to have
    per-request chunkqueues separate from per-connection chunkqueues.
    Should probably also have a request_reset() which is distinct from
    connection_reset().
3 years ago
Glenn Strauss cc2134c88b [multiple] copy small struct instead of memcpy()
when patching config
3 years ago
Glenn Strauss 31d9495330 [core] store subrequest_handler instead of mode
store pointer to module in handler_module instead of con->mode id
3 years ago
Glenn Strauss a22cdca1cb [core] move addtl request-specific struct members 3 years ago
Glenn Strauss 100dfaa3f3 [core] move plugin_ctx into (request_st *)
NB: in the future, a separate plugin_ctx may be needed for
    connection-level plugins to keep state across multiple requests
3 years ago
Glenn Strauss 8131e4396d [core] move addtl request-specific struct members 3 years ago
Glenn Strauss 50bdb55de8 [multiple] connection hooks no longer get (srv *)
(explicit (server *) not passed; available in con->srv)
3 years ago
Glenn Strauss 010c28949c [multiple] prefer (connection *) to (srv *)
convert all log_error_write() to log_error() and pass (log_error_st *)

use con->errh in preference to srv->errh (even though currently same)

avoid passing (server *) when previously used only for logging (errh)
3 years ago
Glenn Strauss b73949e03f [multiple] plugin.c handles common FREE_FUNC code
(simpler for modules; less boilerplate to cut-n-paste)
3 years ago
Glenn Strauss 8e713130b3 [mod_auth*] use config_plugin_values_init() 3 years ago
Glenn Strauss e2de4e581e [core] const char *name in struct plugin
put void *data (always used) as first member of struct plugin

add int nconfig member to PLUGIN_DATA

calloc() inits p->data to NULL
3 years ago
Glenn Strauss 36f64b26a1 [core] simpler config_check_cond()
optimize for common case where condition has been evaluated for
the request and a cached result exists

(also: begin isolating data_config)
3 years ago
Glenn Strauss 6eb34ef5ab [core] add const to callers of http_header_*_get()
(The few places where value is modified in-place were not made const)
3 years ago
Glenn Strauss 47a758f959 [core] inline buffer key for *_patch_connection()
handle buffer key as part of DATA_UNSET in *_patch_connection()
(instead of key being (buffer *))
3 years ago
Glenn Strauss 3390642285 [mod_authn_gssapi] option to store delegated creds (fixes #2967)
default enabled for backwards compatibility; disable in future

(thx lameventanas)

x-ref:
  "mod_authn_gssapi requires delegation?"
  https://redmine.lighttpd.net/issues/2967
4 years ago
Glenn Strauss e9440ecfdf [mod_authn_gssapi] 500 if fail to delegate creds (#2967)
x-ref:
  "mod_authn_gssapi requires delegation?"
  https://redmine.lighttpd.net/issues/2967
4 years ago
Glenn Strauss 1300815688 [core] use buffer_eq_icase_ssn func
specialized buffer_eq_icase_ssn func replace strncasecmp()
in cases where string lengths are not known to be at least
as large as the len being compared case-insensitively.
(Separate commit in case any future changes modify the
implementation to be unsafe for shorter strings, where
strncasecmp() would stop at '\0' in either string)
4 years ago
Mohammed Sadiq 6a988bb0d0 [multiple] cleaner calloc use in SETDEFAULTS_FUNC
github: closes #99

x-ref:
  "cleaner calloc use in SETDEFAULTS_FUNC"
  https://github.com/lighttpd/lighttpd1.4/pull/99
4 years ago
Glenn Strauss 65fcd7810f [core] prefer buffer_append_string_len()
prefer buffer_append_string_len() when string len is known
(instead of buffer_append_string() which will recalculate strlen)
5 years ago
Glenn Strauss 3dd3cde902 [core] abstraction layer for HTTP header manip
http_header.[ch]
convert existing calls to manip request/response headers
convert existing calls to manip environment array (often header-related)
5 years ago
Glenn Strauss 9bc61f16cb [core] attempt to quiet coverity false positives 6 years ago
Glenn Strauss 9e75b81982 [core] reduce exposure of unistd.h, other includes
reduce exposure of unistd.h, and some other include cleanup
6 years ago
Glenn Strauss 162e754d0d [core] report file path when mkstemp() fails (fixes #2802)
x-ref:
  "Could the error-log be improved a tiny bit in regards to "Permission denied" errors"
  https://redmine.lighttpd.net/issues/2802
6 years ago
Glenn Strauss 7ef58b5a81 [mod_authn_gssapi] fix missing error ret, coverity
fix missing error returns and coverity warnings
6 years ago
Glenn Strauss e628fc3509 [mod_authn_gssapi] better resource cleanup 6 years ago
Stefan Bühler d352790331 [mod_authn_gssapi] fix memory leak 6 years ago
Glenn Strauss 204df06814 minor: coverity comments 6 years ago
Glenn Strauss ac90699d28 [autobuild] rm module stub code for missing deps
remove module stub code since the build system(s) no longer build any
module when the dependencies for a given module are not present.
7 years ago
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
7 years ago
Glenn Strauss 28d1213470 [mod_auth] fix printing of IP in error trace 7 years ago
Glenn Strauss a401c9469a [mod_auth] HTTP Basic auth backends also do authz (#1817)
HTTP Basic auth backends now do both authn and authz
in order to allow provide a means to extend backends to optionally
support group authz

x-ref:
  "LDAP-Group support for HTTP-Authentication"
  https://redmine.lighttpd.net/issues/1817
7 years ago
Glenn Strauss d2b7c7bad2 remove excess initializers (fix compiler warnings) 7 years ago
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
7 years ago