diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-12-10 12:34:33 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-12-10 13:06:49 +0200 |
commit | e89b25b8dd2d494038971cff9de141449616eac3 (patch) | |
tree | 782957a3d9aa0203e380ebabd1b7bb11e748dbda | |
parent | a9a5d76f3fdac0ddbf76f7d021be3c95b7bfbdef (diff) | |
download | vmod-basicauth-e89b25b8dd2d494038971cff9de141449616eac3.tar.gz vmod-basicauth-e89b25b8dd2d494038971cff9de141449616eac3.tar.bz2 |
Support for varnish 6.0.2release-1.7
-rw-r--r-- | NEWS | 10 | ||||
-rw-r--r-- | README | 5 | ||||
m--------- | acvmod | 0 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/vmod-basicauth.3 | 27 | ||||
-rw-r--r-- | src/vmod_basicauth.c | 3 |
6 files changed, 18 insertions, 31 deletions
@@ -1,9 +1,13 @@ | |||
1 | Vmod-basicauth NEWS -- history of user-visible changes. 2017-10-26 | 1 | Vmod-basicauth NEWS -- history of user-visible changes. 2018-12-10 |
2 | Copyright (C) 2013-2017 Sergey Poznyakoff | ||
3 | See the end of file for copying conditions. | 2 | See the end of file for copying conditions. |
4 | 3 | ||
5 | Please send Vmod-basicauth bug reports to <gray@gnu.org> | 4 | Please send Vmod-basicauth bug reports to <gray@gnu.org> |
6 | 5 | ||
6 | Version 1.7, 2018-12-10 | ||
7 | |||
8 | * Support for Varnish 6.0.2 | ||
9 | |||
10 | |||
7 | Version 1.6, 2017-10-26 | 11 | Version 1.6, 2017-10-26 |
8 | 12 | ||
9 | * Fixed coredump on receiving a valid username with a wrong password | 13 | * Fixed coredump on receiving a valid username with a wrong password |
@@ -53,7 +57,7 @@ Initial release. | |||
53 | 57 | ||
54 | Copyright information: | 58 | Copyright information: |
55 | 59 | ||
56 | Copyright (C) 2013-2017 Sergey Poznyakoff | 60 | Copyright (C) 2013-2018 Sergey Poznyakoff |
57 | 61 | ||
58 | Permission is granted to anyone to make or distribute verbatim copies | 62 | Permission is granted to anyone to make or distribute verbatim copies |
59 | of this document as received, in any medium, provided that the | 63 | of this document as received, in any medium, provided that the |
@@ -1,5 +1,4 @@ | |||
1 | Vmod-basicauth README | 1 | Vmod-basicauth README |
2 | Copyright (C) 2013-2017 Sergey Poznyakoff | ||
3 | See the end of file for copying conditions. | 2 | See the end of file for copying conditions. |
4 | 3 | ||
5 | * Overview | 4 | * Overview |
@@ -8,7 +7,7 @@ This module implements basic HTTP authentication against the password file | |||
8 | created with the htpasswd(1) utility. The following password hashes are | 7 | created with the htpasswd(1) utility. The following password hashes are |
9 | supported: Apache MD5, crypt(3), SHA1, and plaintext. | 8 | supported: Apache MD5, crypt(3), SHA1, and plaintext. |
10 | 9 | ||
11 | The module has been tested with Varnish versions 4.1, and 5.1. | 10 | The module has been tested with Varnish versions 4.1 to 6.0.2 |
12 | 11 | ||
13 | * Example | 12 | * Example |
14 | 13 | ||
@@ -65,7 +64,7 @@ Send bug reports and suggestions to <gray@gnu.org> | |||
65 | 64 | ||
66 | * Copyright information: | 65 | * Copyright information: |
67 | 66 | ||
68 | Copyright (C) 2013-2017 Sergey Poznyakoff | 67 | Copyright (C) 2013-2018 Sergey Poznyakoff |
69 | 68 | ||
70 | Permission is granted to anyone to make or distribute verbatim copies | 69 | Permission is granted to anyone to make or distribute verbatim copies |
71 | of this document as received, in any medium, provided that the | 70 | of this document as received, in any medium, provided that the |
diff --git a/acvmod b/acvmod | |||
Subproject 5f6dce2f7dd35a154333bb42d134a018b981f81 | Subproject 5b214e3d72f9e261a37cf31deb41e7f8a61a181 | ||
diff --git a/configure.ac b/configure.ac index aeee5e1..a85214e 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -14,7 +14,7 @@ | |||
14 | # You should have received a copy of the GNU General Public License | 14 | # You should have received a copy of the GNU General Public License |
15 | # along with vmod-basicauth. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with vmod-basicauth. If not, see <http://www.gnu.org/licenses/>. |
16 | AC_PREREQ(2.69) | 16 | AC_PREREQ(2.69) |
17 | AC_INIT([vmod-basicauth], 1.6, [gray@gnu.org]) | 17 | AC_INIT([vmod-basicauth], 1.7, [gray@gnu.org]) |
18 | AC_CONFIG_AUX_DIR([build-aux]) | 18 | AC_CONFIG_AUX_DIR([build-aux]) |
19 | AC_CONFIG_MACRO_DIR([m4]) | 19 | AC_CONFIG_MACRO_DIR([m4]) |
20 | AC_CONFIG_SRCDIR(src/vmod_basicauth.vcc) | 20 | AC_CONFIG_SRCDIR(src/vmod_basicauth.vcc) |
@@ -42,7 +42,7 @@ AC_PROG_MAKE_SET | |||
42 | AC_HEADER_STDC | 42 | AC_HEADER_STDC |
43 | AC_CHECK_HEADERS([sys/stdlib.h crypt.h]) | 43 | AC_CHECK_HEADERS([sys/stdlib.h crypt.h]) |
44 | 44 | ||
45 | AM_VARNISHAPI([4.1],[5.1]) | 45 | AM_VARNISHAPI([4.1],[6.0.2]) |
46 | 46 | ||
47 | saved_LIBS=$LIBS | 47 | saved_LIBS=$LIBS |
48 | LIBS=-lcrypt | 48 | LIBS=-lcrypt |
diff --git a/src/vmod-basicauth.3 b/src/vmod-basicauth.3 index 24da83e..d0ec1cd 100644 --- a/src/vmod-basicauth.3 +++ b/src/vmod-basicauth.3 | |||
@@ -1,5 +1,5 @@ | |||
1 | .\" This file is part of Vmod-basicauth -*- nroff -*- | 1 | .\" This file is part of Vmod-basicauth -*- nroff -*- |
2 | .\" Copyright (C) 2013-2015 Sergey Poznyakoff | 2 | .\" Copyright (C) 2013-2018 Sergey Poznyakoff |
3 | .\" | 3 | .\" |
4 | .\" Vmod-basicauth is free software; you can redistribute it and/or modify | 4 | .\" Vmod-basicauth is free software; you can redistribute it and/or modify |
5 | .\" it under the terms of the GNU General Public License as published by | 5 | .\" it under the terms of the GNU General Public License as published by |
@@ -13,7 +13,7 @@ | |||
13 | .\" | 13 | .\" |
14 | .\" You should have received a copy of the GNU General Public License | 14 | .\" You should have received a copy of the GNU General Public License |
15 | .\" along with vmod-basicauth. If not, see <http://www.gnu.org/licenses/>. | 15 | .\" along with vmod-basicauth. If not, see <http://www.gnu.org/licenses/>. |
16 | .TH VMOD-BASICAUTH 1 "January 30, 2015" "VMOD-BASICAUTH" "User Reference" | 16 | .TH VMOD-BASICAUTH 1 "December 10, 2018" "VMOD-BASICAUTH" "User Reference" |
17 | .SH NAME | 17 | .SH NAME |
18 | vmod-basicauth \- Basic HTTP authentication | 18 | vmod-basicauth \- Basic HTTP authentication |
19 | .SH SYNOPSIS | 19 | .SH SYNOPSIS |
@@ -40,24 +40,7 @@ supplies the name of the password file to use. The \fIauthstr\fR argument | |||
40 | is the authentication string (normally, the value of the | 40 | is the authentication string (normally, the value of the |
41 | \fBAuthorization\fR HTTP header. | 41 | \fBAuthorization\fR HTTP header. |
42 | .PP | 42 | .PP |
43 | .SS Example: VCL 3.0 | 43 | .SS Example: |
44 | .PP | ||
45 | .EX | ||
46 | sub vcl_recv { | ||
47 | if (!basicauth.match("/var/www/.htpasswd", | ||
48 | req.http.Authorization)) { | ||
49 | error 401 "Restricted"; | ||
50 | } | ||
51 | } | ||
52 | |||
53 | sub vcl_error { | ||
54 | if (obj.status == 401) { | ||
55 | set obj.http.WWW-Authenticate = | ||
56 | {"Basic realm="Restricted area""}; | ||
57 | } | ||
58 | } | ||
59 | .EE | ||
60 | .SS Example: VCL 4.0 | ||
61 | .PP | 44 | .PP |
62 | .EX | 45 | .EX |
63 | sub vcl_recv { | 46 | sub vcl_recv { |
@@ -79,7 +62,7 @@ sub vcl_synth { | |||
79 | .\" for man-based doc pages. | 62 | .\" for man-based doc pages. |
80 | .if "\V[MANCGI]"WEBDOC" \{\ | 63 | .if "\V[MANCGI]"WEBDOC" \{\ |
81 | . ds package vmod-basicauth | 64 | . ds package vmod-basicauth |
82 | . ds version 1.6 | 65 | . ds version 1.7 |
83 | . so download.inc | 66 | . so download.inc |
84 | \} | 67 | \} |
85 | .SH "SEE ALSO" | 68 | .SH "SEE ALSO" |
@@ -90,7 +73,7 @@ Sergey Poznyakoff | |||
90 | .SH "BUG REPORTS" | 73 | .SH "BUG REPORTS" |
91 | Report bugs to <gray@gnu.org>. | 74 | Report bugs to <gray@gnu.org>. |
92 | .SH COPYRIGHT | 75 | .SH COPYRIGHT |
93 | Copyright \(co 2013-2015 Sergey Poznyakoff | 76 | Copyright \(co 2013-2018 Sergey Poznyakoff |
94 | .br | 77 | .br |
95 | .na | 78 | .na |
96 | License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | 79 | License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> |
diff --git a/src/vmod_basicauth.c b/src/vmod_basicauth.c index d106afd..9fd3e23 100644 --- a/src/vmod_basicauth.c +++ b/src/vmod_basicauth.c | |||
@@ -27,8 +27,9 @@ | |||
27 | # include <crypt.h> | 27 | # include <crypt.h> |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #include "vcl.h" | 30 | #include "vdef.h" |
31 | #include "vrt.h" | 31 | #include "vrt.h" |
32 | #include "vcl.h" | ||
32 | #include "vcc_if.h" | 33 | #include "vcc_if.h" |
33 | #include "pthread.h" | 34 | #include "pthread.h" |
34 | 35 | ||