From nobody Wed Jul 12 07:26:56 2023 X-Original-To: dev-commits-ports-main@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 4R18Sd0096z4lWV3; Wed, 12 Jul 2023 07:26:57 +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 4R18Sc6cRWz4Ckb; Wed, 12 Jul 2023 07:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689146816; 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=jScNr2RH+A5hXsvH+CiFdIY/0q6+NgQ/jYFAaZUvrQs=; b=cEuasrtTVxiR0rSclDO2f7YnGOLuL+nhXmEizB7WBC49zwrrPmUx6mex23VpTqaskWGH1n 9v7ZqZmhKwSYjFR0wU8PSzszb5xFOEaTUPCtS/MD5+qG3AY8usJeyVYGw1ZT4fVDXxiU0A MPtaWRu4KXKq7SNxMLHIMLnVxy0lZ3ANhmIN7dHsgXChQu/GXjuvxPMnjpFvdRmZGO2GsI 7+qLSM5S/NoYGst0YcJGbqFoYT/ygBeiyzZ4fSBo0AqaNMewuCdhetSbXj+/fUyUVLubpu /BykkNirmxdzw+cqn2XekKuztU2he+QbiEbf5SvKuPu/rUKRMVEk9kC2sDJ87Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689146816; 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=jScNr2RH+A5hXsvH+CiFdIY/0q6+NgQ/jYFAaZUvrQs=; b=uuwtBw7dalJriHcouT+tgMav0pvsqD4h7erYz94kPrWleu9P/BXxd6N5QqmAW94Sldki5N DkdMIFJUnru6GJMu+SCy92erO467ZHBwaHKZyS/xSxPjTfJK/WNVjDITw/Mj8cVyUesq1b Upbb1R846jdQP7zssLHpiyGTb6UxBNfo92xXBE5jZPkeQ2DLiGZr03gfyzwJ7DVfuF6VCi M58/MQ4vARI2mGBZw5uCoD/Lr8QaMQRrTGhO46DUh+D3DodvbW5ZY0MSBJuACdZ4J1RMLl QJU42RbEFq10xpRPwuV192fQcI9Gx8gcZ40+3e35TNLdZFfbqcPe1hsJBkyrKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689146816; a=rsa-sha256; cv=none; b=hKL3bKznbxHpPA0W8BYf2xnVK4eCmmkKk7rUEkN6tak6ZcPB5yKf6OydOzRP6a1NHAQnKU hHaiL/KMrDnW/ej+dggEfZM4gVhawwOf2xFTfPKkzXgojB5SdgXQbyy2hds/9pq4iS/oVD 17vk82AWmt2mUlSgxK04zUjCWtXKyWW6w6QSWsTcIO/U87iQkkWtRhcQM3K1jugh/wjGBq cr2zXZaGuZ++2hFMmiyTYHdbwWkJeuzLywaY22zrZBqmA5C6AOGB7rG75lB8mIJXM9uddy svfFdtpuYWhCGSn9wiilDZZ+TBlMNmSG6cjByAtFfL6hn0s3ILU1DntNn+o5lQ== 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 4R18Sc5fj0z10ZT; Wed, 12 Jul 2023 07:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36C7QukH032125; Wed, 12 Jul 2023 07:26:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36C7QuPn032124; Wed, 12 Jul 2023 07:26:56 GMT (envelope-from git) Date: Wed, 12 Jul 2023 07:26:56 GMT Message-Id: <202307120726.36C7QuPn032124@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: b9050914a875 - main - i3lock: remove the setuid bit List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9050914a87578a38b52ad197cbbb34574eb03e7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=b9050914a87578a38b52ad197cbbb34574eb03e7 commit b9050914a87578a38b52ad197cbbb34574eb03e7 Author: Baptiste Daroussin AuthorDate: 2023-07-12 07:24:06 +0000 Commit: Baptiste Daroussin CommitDate: 2023-07-12 07:26:55 +0000 i3lock: remove the setuid bit Following swaylock example, by using unix-selfauth-helper and pam_exec we can avoid requiring setuid bit on i3lock. Reported by: Mateusz Kocielski --- deskutils/i3lock/Makefile | 11 +++++++++-- deskutils/i3lock/files/i3lock.pam.in | 7 +++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/deskutils/i3lock/Makefile b/deskutils/i3lock/Makefile index 78a0426807db..a269e22cd3cc 100644 --- a/deskutils/i3lock/Makefile +++ b/deskutils/i3lock/Makefile @@ -1,5 +1,6 @@ PORTNAME= i3lock PORTVERSION= 2.13 +PORTREVISION= 1 CATEGORIES= deskutils x11 MASTER_SITES= http://i3wm.org/${PORTNAME}/ @@ -19,12 +20,17 @@ LIB_DEPENDS= libcairo.so:graphics/cairo \ libxcb-util.so:x11/xcb-util \ libxcb-xrm.so:x11/xcb-util-xrm +RUN_DEPENDS= unix-selfauth-helper>0:security/unix-selfauth-helper + MAKE_ARGS= PREFIX="${PREFIX}" X11LIB="${LOCALBASE}/lib" \ X11INC="${LOCALBASE}/include" CC="${CC}" \ MANDIR="${MANPREFIX}/man" -PLIST_FILES= "@(,,4755) bin/i3lock" \ - man/man1/i3lock.1.gz +PLIST_FILES= bin/i3lock \ + man/man1/i3lock.1.gz \ + etc/pam.d/i3lock + +SUB_FILES= i3lock.pam USES= gmake iconv localbase pkgconfig tar:bzip2 xorg LDFLAGS+= ${ICONV_LIB} @@ -41,6 +47,7 @@ OPTIONS_DEFINE= DOCS post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/i3lock @${RM} ${STAGEDIR}${PREFIX}/etc/pam.d/i3lock + @${INSTALL_DATA} ${WRKDIR}/i3lock.pam ${STAGEDIR}${PREFIX}/etc/pam.d/i3lock post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} diff --git a/deskutils/i3lock/files/i3lock.pam.in b/deskutils/i3lock/files/i3lock.pam.in new file mode 100644 index 000000000000..942be88359ac --- /dev/null +++ b/deskutils/i3lock/files/i3lock.pam.in @@ -0,0 +1,7 @@ +# +# PAM configuration for the "i3lock" service. i3lock(1) only uses +# auth facilities. +# + +auth sufficient pam_exec.so return_prog_exit_status expose_authtok %%LOCALBASE%%/libexec/unix-selfauth-helper +auth include system