diff options
author | Patrick Hanft | 2018-05-05 22:21:17 +0200 |
---|---|---|
committer | Patrick Hanft | 2018-05-05 22:21:17 +0200 |
commit | 97f165fa496cfea144e14cec2e51c701c9b3157c (patch) | |
tree | d48f738ad765499ae8cf074c8b01604f6ec02ea3 | |
parent | 758caa89a16da4fa66fb076031ab1e409fe32467 (diff) | |
download | aur-97f165fa496cfea144e14cec2e51c701c9b3157c.tar.gz |
update to 1.7 – otp 2fa patch should be obsolete
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | use-otp-for-2fa.patch | 52 |
3 files changed, 7 insertions, 62 deletions
@@ -1,7 +1,7 @@ pkgbase = openfortivpn pkgdesc = An open implementation of Fortinet's proprietary PPP+SSL VPN solution - pkgver = 1.6.0 - pkgrel = 2 + pkgver = 1.7.0 + pkgrel = 1 url = https://github.com/adrienverge/openfortivpn arch = i686 arch = x86_64 @@ -10,7 +10,7 @@ pkgbase = openfortivpn depends = openssl depends = ppp backup = etc/openfortivpn/config - source = git+https://github.com/adrienverge/openfortivpn.git#tag=v1.6.0 + source = git+https://github.com/adrienverge/openfortivpn.git#tag=v1.7.0 source = allow-no-unused-functions.patch md5sums = SKIP md5sums = cb2d5a8b3f799ec3d0267722f0a0206b @@ -1,7 +1,7 @@ # Maintainer: Patrick Hanft <mail@patrick-hanft.de> pkgname=openfortivpn -pkgver=1.6.0 -pkgrel=2 +pkgver=1.7.0 +pkgrel=1 pkgdesc="An open implementation of Fortinet's proprietary PPP+SSL VPN solution" arch=('i686' 'x86_64') url="https://github.com/adrienverge/openfortivpn" @@ -15,16 +15,14 @@ replaces=() backup=('etc/openfortivpn/config') options=() install= -source=("git+https://github.com/adrienverge/$pkgname.git#tag=v$pkgver" "allow-no-unused-functions.patch" "use-otp-for-2fa.patch") +source=("git+https://github.com/adrienverge/$pkgname.git#tag=v$pkgver" "allow-no-unused-functions.patch") noextract=() md5sums=('SKIP' - 'cb2d5a8b3f799ec3d0267722f0a0206b' - '039b464ef44a7c9e13130f938e5fc255') + 'cb2d5a8b3f799ec3d0267722f0a0206b') prepare() { cd "$srcdir/$pkgname" patch -Np0 -i "${srcdir}/allow-no-unused-functions.patch" - patch -Np0 -i "${srcdir}/use-otp-for-2fa.patch" } build() { @@ -45,4 +43,3 @@ package() { cd "$srcdir/$pkgname" make DESTDIR="$pkgdir/" install } - diff --git a/use-otp-for-2fa.patch b/use-otp-for-2fa.patch deleted file mode 100644 index f4f4e6b49126..000000000000 --- a/use-otp-for-2fa.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- src/http.c 2018-03-30 20:06:27.834717998 +0700 -+++ src/http.c.new 2018-03-30 20:07:07.524800224 +0700 -@@ -155,8 +155,8 @@ - } - - if (header_size) { -- /* We saw the whole header, let's check if the -- * body is done as well */ -+ /* We saw the whole header, */ -+ /* let's check if the body is done as well */ - if (chunked) { - /* Last chunk terminator. Done naively. */ - if (bytes_read >= 7 && -@@ -481,7 +481,7 @@ - char reqid[32] = { '\0' }; - char polid[32] = { '\0' }; - char group[128] = { '\0' }; -- char data[256], token[128], tokenresponse[256]; -+ char data[256], token[128]; - char *res = NULL; - - url_encode(username, tunnel->config->username); -@@ -511,6 +511,8 @@ - } - ret = get_auth_cookie(tunnel, res); - if (ret == ERR_HTTP_NO_COOKIE) { -+ struct vpn_config *cfg = tunnel->config; -+ - /* If the response body includes a tokeninfo= parameter, - * it means the VPN gateway expects two-factor authentication. - * It sends a one-time authentication credential for example -@@ -534,11 +536,18 @@ - get_value_from_response(res, "reqid=", reqid, 32); - get_value_from_response(res, "polid=", polid, 32); - -- read_password("Two-factor authentication token: ", tokenresponse, 255); -+ if (cfg->otp[0] == '\0') { -+ read_password("Two-factor authentication token: ", -+ cfg->otp, FIELD_SIZE); -+ if (cfg->otp[0] == '\0') { -+ log_error("No token specified\n"); -+ return 0; -+ } -+ } - - snprintf(data, 256, "username=%s&realm=%s&reqid=%s&polid=%s&grp=%s" - "&code=%s&code2=&redir=%%2Fremote%%2Findex&just_logged_in=1", -- username, realm, reqid, polid, group, tokenresponse); -+ username, realm, reqid, polid, group, cfg->otp); - - ret = http_request(tunnel, "POST", "/remote/logincheck", data, &res); - if (ret != 1) |