security/unix-selfauth-helper: Update to 1.1

Changes:
https://github.com/Zirias/unix-selfauth-helper/releases/tag/v1.1

Also remove the post-install script checking for FreeBSD versions with
unpatched pam_exec.so. 13.0 and 13.1 were affected, 13.0 is long since
EOL, 13.1 will be EOL in a few days and the issue was already fixed in
-p1.

Approved by:	tcberner (mentor, implicit)
This commit is contained in:
Felix Palmen 2023-07-13 19:46:54 +02:00
parent 3cd077fcff
commit ca20c3923e
3 changed files with 9 additions and 64 deletions

View file

@ -1,20 +1,18 @@
PORTNAME= unix-selfauth-helper
DISTVERSION= 1.0.1
DISTVERSIONPREFIX= v
DISTVERSION= 1.1
CATEGORIES= security
MASTER_SITES= ${WWW}/releases/download/v${DISTVERSION}/
MAINTAINER= zirias@FreeBSD.org
COMMENT= Local self-authentication for pam_exec
WWW= https://github.com/Zirias/unix-selfauth-helper
WWW= https://github.com/Zirias/${PORTNAME}
LICENSE= BSD2CLAUSE
USES= uidfix
USES= tar:xz
USE_GITHUB= yes
GH_ACCOUNT= Zirias
PLIST_FILES= libexec/unix-selfauth-helper \
PLIST_FILES= etc/pam.d/unix-selfauth \
libexec/unix-selfauth-helper \
man/man8/unix-selfauth-helper.8.gz
.include <bsd.port.mk>

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1659607930
SHA256 (Zirias-unix-selfauth-helper-v1.0.1_GH0.tar.gz) = 24d72c04cc6f42b198378926af0e3d3c0efd7d39e68616482c8b218d4732d261
SIZE (Zirias-unix-selfauth-helper-v1.0.1_GH0.tar.gz) = 3927
TIMESTAMP = 1689275552
SHA256 (unix-selfauth-helper-1.1.tar.xz) = a92c1269c5950425df4eee9cba3d96509807a68ac7973f430f3a7c2538a3ff29
SIZE (unix-selfauth-helper-1.1.tar.xz) = 3960

View file

@ -1,53 +0,0 @@
function getfbsduvers ()
local osrel = io.open("/etc/os-release")
if (not osrel) then return nil end
local reldat = {}
for line in osrel:lines() do
local k, v = string.match(line,
'%s*(.+)%s*=%s*"?%s*([^"]+)%s*"?')
if (k and v) then reldat[k] = v end
end
osrel:close()
if (not reldat["ID"] or reldat["ID"] ~= "freebsd") then return nil end
return reldat["VERSION"]
end
function printwarning (uvers, required)
local msg=[=[
======
Message from $pkg:
!!! ATTENTION !!!
You are currently running FreeBSD $vcurr.
Correct operation of $pkg requires a bugfix that was delivered
in $vreq.
This package is probably installed as a dependency of some screen locker,
and without the bugfix, YOU WILL PROBABLY BE UNABLE TO UNLOCK YOUR SCREEN.
Please use freebsd-update(8) to update your system before you continue.
See also:
<URL:https://security.FreeBSD.org/advisories/FreeBSD-EN-22:19.pam_exec.asc>
]=]
local warning = string.gsub(msg, '$(%w+)',
{pkg = pkg_name, vcurr = uvers, vreq = required})
pkg.print_msg(warning)
end
fbsduvers = getfbsduvers()
if (fbsduvers and string.match(fbsduvers, '-RELEASE')) then
umaj = tonumber(string.match(fbsduvers, '^[0-9]+'))
umin = tonumber(string.match(fbsduvers, '%.([0-9]+)-'))
uplv = tonumber(string.match(fbsduvers, '-p([0-9]+)'))
if (not uplv) then uplv = 0 end
if (umaj == 13 and umin <= 1) then
if (umin == 0 and uplv < 12) then
printwarning(fbsduvers, "13.0-RELEASE-p12")
elseif (umin == 1 and uplv < 1) then
printwarning(fbsduvers, "13.1-RELEASE-p1")
end
end
end