From nobody Fri Oct 11 15:55:32 2024 X-Original-To: dev-commits-src-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 4XQB6Y3wxrz5Z4GJ; Fri, 11 Oct 2024 15:55:33 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XQB6Y1PWXz4w80; Fri, 11 Oct 2024 15:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728662133; 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=a55L9UJAMhHJKwHxRIGD0/ZZ/zH8+Ccymd3/1MVbXj0=; b=fzxqTtrEz00mXIL1qybGqKzYrW8uMJPrrdcL4ZDWCKNDjB2YuBEKjpsY7SBY/i7mAWh0XY zKnZz14KZ055/vxwtK4IuAv1bY57weu5ihUCoJqvzXM1nYrw7JpvlrqVowHfi6ViIM5nzM VwKKjMzLw+5eNb1mRLZbQnhjw/xj4zEgQc47JsedNTLGDq/5T/Z3VxPVK37sdn1HpsSH7v Wxz2N5Jdu6IUcC82g+DAMs8jbHLC1ez478AF+c2WNI5YTzovVoWYEijMN3Ll4vpK6Av4Yi mlGPAuLGEcwePAX9D38KKaEw3KNOyavWYS+0cr3pCj4GZVAEMTjcVxlqV7m1Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728662133; 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=a55L9UJAMhHJKwHxRIGD0/ZZ/zH8+Ccymd3/1MVbXj0=; b=KC1tNUhZ4lUzoOgcydgwt45IhwVDhiJb0kY3z5Flu1tOFMIlzZuXDnDr5EGMBj0yuSQQK7 eciDujhF5aHAAoSwa5gxqOK+HXm8FV/TBEDXmrKIIvVV5WHzwqpi/Pt3Zy7k+6UEMXesZ0 K4VOxUbQPgKjjQfdDwMaFhPp5NuA/q/ubR+r6VaYKRt0EMjsyVqSQSD4q/AI9Vd0Rad8L2 +3M94UuXqLP66UmbZE4pjrLUhM/jK7Vk3ih0gz/VHHfmmzPDR7MxlvrWNYP+vG11WsWmCY YF07F0OT0jHUl7fn7RA/xGPJuwO2p8cAouRedWS6K2GU36YoZOmT/nIGosrG1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728662133; a=rsa-sha256; cv=none; b=nCTG6gZsiNIgf/VSx7FJc3dBq7vJdy+6aVc4Pl6MzvKHDgDV1rRJlMEtSF7mgWNprRIhZZ y8La+Vb/roKF7gFRCpxIcofafMVm5Ift6Xu5C3zxkFvri8gF4mrT8UZeYlYg0sGm1HKmce 7BVati8+dGWOE8FM0+87uYQjLZmh/NBOoOZHvIKqpYKwWth8HiDRQGtcEWq2MCrztroUjl acrpbq4Nan7w4LXU5jd42k/0QV3/wgHrBfGCuXJsPtTEF3s2G/wDraMec2tIv4SFkCSim0 1XLD/lAiRTMzJWbIz2AR+f1yMONYNYdl1BLdygCxk6FsfnCWJ8a8AMo6ZWDRrA== 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 4XQB6Y0tcxzp6V; Fri, 11 Oct 2024 15:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49BFtW0Z088290; Fri, 11 Oct 2024 15:55:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49BFtWZ7088287; Fri, 11 Oct 2024 15:55:32 GMT (envelope-from git) Date: Fri, 11 Oct 2024 15:55:32 GMT Message-Id: <202410111555.49BFtWZ7088287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6cde8f3ef7cd - main - lpd: Tighten permissions on /var/run/printer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6cde8f3ef7cd060be39d78055eaf982b06b19a3b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6cde8f3ef7cd060be39d78055eaf982b06b19a3b commit 6cde8f3ef7cd060be39d78055eaf982b06b19a3b Author: Stanislav Shalunov AuthorDate: 2024-10-11 15:49:02 +0000 Commit: Warner Losh CommitDate: 2024-10-11 15:50:08 +0000 lpd: Tighten permissions on /var/run/printer Exclude group read/write permissions as well. Otherwise, group wheel can submit things w/o the normal accounting. While group wheel is generally trusted on the machine, submitting jobs w/o checks is not one of the functions we document for that group. PR: 17289 Differential Revision: https://reviews.freebsd.org/D47040 --- usr.sbin/lpr/lpd/lpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index b78077dfa225..089b8fedc2d5 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -314,7 +314,7 @@ main(int argc, char **argv) sigaddset(&nmask, SIGTERM); sigprocmask(SIG_BLOCK, &nmask, &omask); - (void) umask(07); + (void) umask(077); signal(SIGHUP, mcleanup); signal(SIGINT, mcleanup); signal(SIGQUIT, mcleanup);