From nobody Wed Sep 4 21:35:22 2024 X-Original-To: bugs@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 4WzbPn2Qqbz5VQnM for ; Wed, 04 Sep 2024 21:35:25 +0000 (UTC) (envelope-from bugzilla-noreply@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 4WzbPn0S1xz4dq5 for ; Wed, 4 Sep 2024 21:35:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725485725; a=rsa-sha256; cv=none; b=p8EPFW7mTkFtq8uhuYoybZNtxxEAmx1ZoRe2Pl91TexMXbZSMHflhbzFKzPoFl+KM2vy1y 17ogqUOrFBv70nYyeK/eHw1b3TWW2unx4+H4q665zeEQISg3gk4b6NzEBpKEJe9Vd6+H1j qYqX1HPu2tLTR2DhLPt1VfswZgHZPQMgW9ihmNWo0xf7e8VElOpGH96EnpNM6qYvb+z8Zx yzXkrHJh2NxlvPAtB8ZahfT0FeQxfG+2nCP9ZX0RnQjAaQXU17XdLRQInFVnM7r4oa4dPL Riq8RMzeiyqHZ1ctW8I79mOVZHHfoTO+R/Jp1pb5qTQxZU8vn+8Ci0IkiTvetg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725485725; 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: in-reply-to:in-reply-to:references:references; bh=EgE+mg3+fLcy+g7UXb+6JCQeR0V7h5Z3seNRo91Y2zQ=; b=wO3lWVL3vluSRFQ2giOADYBnEBtyxv8ZvY82R3do6Zujp9fVR1h/7u6jhsIAkZZcW8ZrUU TfLXNnNJb5gAOO4BXUNXeq/Lu71w0YwY0HHw3RfL08NktKXHmIQRewL+w5EieGzRRSBRN3 j/dkS1aMLPVwMKkYCIEwU6lw2F0KG3gHsbHR2J3LxYG04xTYFTooA98u1/Mb0EFhSVz/JG Rl+uGYNH08MmVRSOVM+c0K1sMZP5jBUAX7iv1sjS61Of98tSHOjW+UIyG8/DbZExvtWf0a ndzv9KfuKo6LPpe4s8JM7bMI/50/5gCFtbK/5LSKqJRPEQaT1QMpYHccylUL5Q== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4WzbPn03nWzhJv for ; Wed, 4 Sep 2024 21:35:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 484LZOZ2039409 for ; Wed, 4 Sep 2024 21:35:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 484LZOgD039406 for bugs@FreeBSD.org; Wed, 4 Sep 2024 21:35:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 280418] calendar -a trashes parent's pgrp login setting Date: Wed, 04 Sep 2024 21:35:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: kevans@freebsd.org X-Bugzilla-Flags: mfc-stable14? mfc-stable13? needs_errata? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280418 --- Comment #16 from commit-hook@FreeBSD.org --- A commit in branch releng/14.1 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D86d01789bf412b216b11021c44b60f93f= 6af8955 commit 86d01789bf412b216b11021c44b60f93f6af8955 Author: Kyle Evans AuthorDate: 2024-08-05 18:43:56 +0000 Commit: Gordon Tetlow CommitDate: 2024-09-04 21:31:57 +0000 calendar: don't setlogin(2) in the -a user handlers As of e67975d331 ("Fix 'calendar -a' in several ways."), `calendar -a` will now fork off a new process for each user and do all of its own processing in the user's own context. As a side-effect, calendar(1) started calling setlogin(2) in each of the forked processes and inadvertently hijacked the login name for the session it was running under, which was typically not a fresh session but rather that of whatever cron/periodic run spawned it. Thus, daily and security e-mails started coming from completely arbitrary user. We could create a new session, but it appears that nothing calendar(1) does really needs the login name to be clobbered; opt to just avoid the setlogin(2) call entirely rather than incur the overhead of a new session for each process. PR: 280418 Reviewed by: des, olce Fixes: e67975d331 ("Fix 'calendar -a' in several ways.") (cherry picked from commit 6cb8b61efe8899ee9194563108d0ae90c1eb89e3) (cherry picked from commit 33708452aaabca205d81eceb83e0813e5882815c) Approved by: so usr.bin/calendar/calendar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --=20 You are receiving this mail because: You are on the CC list for the bug.=