From nobody Fri Aug 12 13:08:54 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M43sL4DTDz4ZCJ8; Fri, 12 Aug 2022 13:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M43sL3kRYz3d3N; Fri, 12 Aug 2022 13:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660309734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6jli8vkpV8iWhTWfxJcHl5FQQrpPmHowcBXDrONjhSg=; b=V5zbaTaoTEYPSxoM3p2UDrJZU/HH+/HEz9b9myMF63bKlFMfgQWTwHXKpV3Bt8POdnOYJI Zr9Al1dz8KnuEKflT+nEy4CHnMIEq62ovfSdnMA1AW17ALAmBfOkUDpNK8XXf86fao5kzc cJ90XAIWr2AwEZy4LUvsjJ33cTv0PxnkLCxIHthRn9DbzK0XAmq9pWWJz1E05yTdwkVOls 7GVO0EjEx/cWzs+lzpxiShOEdu2rRZWY+Xff9vzbk9jG3Udj+y1N5OwqGMGuDmigXyDhPF 2S4yvGt0fxT1Pl30gKFP0o9LuLXzAELSseLc4E27twlSBwVkXTdgiC6lJUzcgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M43sL2n0MzXr6; Fri, 12 Aug 2022 13:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27CD8sZU039109; Fri, 12 Aug 2022 13:08:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27CD8snv039108; Fri, 12 Aug 2022 13:08:54 GMT (envelope-from git) Date: Fri, 12 Aug 2022 13:08:54 GMT Message-Id: <202208121308.27CD8snv039108@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Felix Palmen Subject: git: 22e6df529b6b - main - security/unix-selfauth-helper: Update to 1.0.1 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zirias X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22e6df529b6b46ef831b0834a390ba4080856f61 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660309734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6jli8vkpV8iWhTWfxJcHl5FQQrpPmHowcBXDrONjhSg=; b=eSCmZT5lNBjpaN7qDIm6xUexgN78SUiSDCRf6FOGYWeEDQSvA3ebK9MdpK+C7g4pFBbGJj s0JLUlC6TltUh6Bs/dbO2N7Im4ZP7vJHx5XE4YWHBYMIdxoNwx7WxVYKhcM3pEbT32iQ6R etz7xeaX5hgdXQsWXb9uVkzo5tCFcSDQVzsm94/frYK5yeZUW3evCmcxqQQ4sEoc5vjI5/ i+gvgoXjBs3kQL9Gl7ew/hiLfnNW754pdfw550bJqLQbt4HdmVB7qI9yn2p4aRdKRDv2ay No7OxsEOCWphFTesVOpOBgRYkHPZkY1/v5hwwVrVSpF/K8njmm1HF1HnZVlz7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660309734; a=rsa-sha256; cv=none; b=S5MlmIlDgJ+LkaP53/G2Ta5VJDvVa8MW0IWFWB4H976aWffYjKwsXnBD6QTy3Njp3V5S53 CCmhF/m40jtJyIw2vChLc9bBO2zzTQfCLWwJyw9srQ3hjb6wGQkZ/ZhEXXMBrOyoSLNfq/ 6qzf02hS8cPiGcIZ2VIQuDmxSn7ApZh2ffdEiiYFpAr+zJsIhRq23iSIQul67g+b3b5GmW 3HydCb2Yn67X3W1WaMHq9jEpF+l6IhUH5DvPqF9bj3um9w5ctzA24MbN0Xhwfd0TFPalT+ BCrGt9CclAMyal1u2nOlqAouV0kngyVRgslhclBSpj522CYhkIu1W2LkFB4cnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zirias: URL: https://cgit.FreeBSD.org/ports/commit/?id=22e6df529b6b46ef831b0834a390ba4080856f61 commit 22e6df529b6b46ef831b0834a390ba4080856f61 Author: Felix Palmen AuthorDate: 2022-08-12 13:07:58 +0000 Commit: Felix Palmen CommitDate: 2022-08-12 13:07:58 +0000 security/unix-selfauth-helper: Update to 1.0.1 Add warning about base bug: pam_exec.so contained a bug that would prevent the helper to work correctly in most cases. For 13.x-RELEASE, add a script checking the patch level and displaying a warning on installation. Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D36115 --- security/unix-selfauth-helper/Makefile | 2 +- security/unix-selfauth-helper/distinfo | 6 +-- security/unix-selfauth-helper/pkg-post-install.lua | 53 ++++++++++++++++++++++ 3 files changed, 57 insertions(+), 4 deletions(-) diff --git a/security/unix-selfauth-helper/Makefile b/security/unix-selfauth-helper/Makefile index cb12102b94d7..acab471f6b9b 100644 --- a/security/unix-selfauth-helper/Makefile +++ b/security/unix-selfauth-helper/Makefile @@ -1,5 +1,5 @@ PORTNAME= unix-selfauth-helper -PORTVERSION= 1.0 +DISTVERSION= 1.0.1 DISTVERSIONPREFIX= v CATEGORIES= security diff --git a/security/unix-selfauth-helper/distinfo b/security/unix-selfauth-helper/distinfo index b544eeb0fea9..b87f0b8f8154 100644 --- a/security/unix-selfauth-helper/distinfo +++ b/security/unix-selfauth-helper/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1655634372 -SHA256 (Zirias-unix-selfauth-helper-v1.0_GH0.tar.gz) = 5a1aff046fb9e76555d7289afbe9c54d73269b5903a2f77f40b456840149a6ef -SIZE (Zirias-unix-selfauth-helper-v1.0_GH0.tar.gz) = 3924 +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 diff --git a/security/unix-selfauth-helper/pkg-post-install.lua b/security/unix-selfauth-helper/pkg-post-install.lua new file mode 100644 index 000000000000..24b211cc0246 --- /dev/null +++ b/security/unix-selfauth-helper/pkg-post-install.lua @@ -0,0 +1,53 @@ +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: + +]=] + 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