aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-12-10 12:34:33 +0200
committerSergey Poznyakoff <gray@gnu.org>2018-12-10 13:06:49 +0200
commite89b25b8dd2d494038971cff9de141449616eac3 (patch)
tree782957a3d9aa0203e380ebabd1b7bb11e748dbda
parenta9a5d76f3fdac0ddbf76f7d021be3c95b7bfbdef (diff)
downloadvmod-basicauth-e89b25b8dd2d494038971cff9de141449616eac3.tar.gz
vmod-basicauth-e89b25b8dd2d494038971cff9de141449616eac3.tar.bz2
Support for varnish 6.0.2release-1.7
-rw-r--r--NEWS10
-rw-r--r--README5
m---------acvmod0
-rw-r--r--configure.ac4
-rw-r--r--src/vmod-basicauth.327
-rw-r--r--src/vmod_basicauth.c3
6 files changed, 18 insertions, 31 deletions
diff --git a/NEWS b/NEWS
index f2290c2..b78a16d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,13 @@
1Vmod-basicauth NEWS -- history of user-visible changes. 2017-10-26 1Vmod-basicauth NEWS -- history of user-visible changes. 2018-12-10
2Copyright (C) 2013-2017 Sergey Poznyakoff
3See the end of file for copying conditions. 2See the end of file for copying conditions.
4 3
5Please send Vmod-basicauth bug reports to <gray@gnu.org> 4Please send Vmod-basicauth bug reports to <gray@gnu.org>
6 5
6Version 1.7, 2018-12-10
7
8* Support for Varnish 6.0.2
9
10
7Version 1.6, 2017-10-26 11Version 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
54Copyright information: 58Copyright information:
55 59
56Copyright (C) 2013-2017 Sergey Poznyakoff 60Copyright (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
diff --git a/README b/README
index bb82cc8..c1eb761 100644
--- a/README
+++ b/README
@@ -1,5 +1,4 @@
1Vmod-basicauth README 1Vmod-basicauth README
2Copyright (C) 2013-2017 Sergey Poznyakoff
3See the end of file for copying conditions. 2See 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
8created with the htpasswd(1) utility. The following password hashes are 7created with the htpasswd(1) utility. The following password hashes are
9supported: Apache MD5, crypt(3), SHA1, and plaintext. 8supported: Apache MD5, crypt(3), SHA1, and plaintext.
10 9
11The module has been tested with Varnish versions 4.1, and 5.1. 10The 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
68Copyright (C) 2013-2017 Sergey Poznyakoff 67Copyright (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/>.
16AC_PREREQ(2.69) 16AC_PREREQ(2.69)
17AC_INIT([vmod-basicauth], 1.6, [gray@gnu.org]) 17AC_INIT([vmod-basicauth], 1.7, [gray@gnu.org])
18AC_CONFIG_AUX_DIR([build-aux]) 18AC_CONFIG_AUX_DIR([build-aux])
19AC_CONFIG_MACRO_DIR([m4]) 19AC_CONFIG_MACRO_DIR([m4])
20AC_CONFIG_SRCDIR(src/vmod_basicauth.vcc) 20AC_CONFIG_SRCDIR(src/vmod_basicauth.vcc)
@@ -42,7 +42,7 @@ AC_PROG_MAKE_SET
42AC_HEADER_STDC 42AC_HEADER_STDC
43AC_CHECK_HEADERS([sys/stdlib.h crypt.h]) 43AC_CHECK_HEADERS([sys/stdlib.h crypt.h])
44 44
45AM_VARNISHAPI([4.1],[5.1]) 45AM_VARNISHAPI([4.1],[6.0.2])
46 46
47saved_LIBS=$LIBS 47saved_LIBS=$LIBS
48LIBS=-lcrypt 48LIBS=-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
18vmod-basicauth \- Basic HTTP authentication 18vmod-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
40is the authentication string (normally, the value of the 40is 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
46sub vcl_recv {
47 if (!basicauth.match("/var/www/.htpasswd",
48 req.http.Authorization)) {
49 error 401 "Restricted";
50 }
51}
52
53sub 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
63sub vcl_recv { 46sub 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"
91Report bugs to <gray@gnu.org>. 74Report bugs to <gray@gnu.org>.
92.SH COPYRIGHT 75.SH COPYRIGHT
93Copyright \(co 2013-2015 Sergey Poznyakoff 76Copyright \(co 2013-2018 Sergey Poznyakoff
94.br 77.br
95.na 78.na
96License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 79License 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

Return to:

Send suggestions and report system problems to the System administrator.