From nobody Thu Aug 8 20:07:40 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 4Wfyl05dd0z5S8pS for ; Thu, 08 Aug 2024 20:07:40 +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 4Wfyl04FLpz4qSK for ; Thu, 8 Aug 2024 20:07:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723147660; a=rsa-sha256; cv=none; b=EbK6Kz/RE96DsCz3DMZ6fuxQO0fmUh6EhfFyFWm/WBI0bWiZa6fV3MeRGLzJnsQCtVWeeU O4gnNLcCP6WrSRdPLGsVnMhF0Rk8gJHniaYbh2v7CNjihIDJSloj8j5A7froOGQ6qYlL0n 5k5NWpo9fyQvUvdXoMCUSKbjQnugk/NreHejxDRkMuf0ChozoDgZt4vN68gH7UV5z6JRvv BtnU/kQ3MUz1ES3ux8W0kHaAWwzmnmuOrvIEGwOd0aka1TVgNBnnPhEg/+ISJNME6Bf+CY wECVu95+tDVl7gBjUznJGgxTCIZJIKT6tOHu6Y4gyHDtJ/bhxDhy1yOjCQNa2w== 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=1723147660; 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=uMuUESxXEda6ZZlrCvpDB7Xy2TQ0ZcgaIwGf636+yBQ=; b=ATrgWenyUkp6iUs4aBvrGX5ilVm5a/LQmT6qe/vluwdhzBkWJcjKhtufPVnP+itxR5oo0f kW/6evQwRGU+7ReH3LNmlUJ/YpYNjsm0PzoTPpf8voYg9NMA5gOCLU0sUqIA1ij2a6p4t7 T5X0Tnw4gvFiqTfOwlDPKvLiREDbl4Q4IDxeD+WFV3tCOf8Ud4vWMCuGaLxH3ebzpgSQ35 QrkqbpgOVoixws20CtvXidn3QJeo++NKfi8gmJR0kmMZa3uQY2Ol14gIH+950PIm5MNgwP bM6k+df78X9L4v7hY/Y7gYmWAmkjdQfYpXT7oK37aRCh5y3PsXDvOeXIQ+oJtw== 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 4Wfyl03qySzn6F for ; Thu, 8 Aug 2024 20:07:40 +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 478K7ei8010119 for ; Thu, 8 Aug 2024 20:07:40 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 478K7eLF010118 for bugs@FreeBSD.org; Thu, 8 Aug 2024 20:07:40 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: Thu, 08 Aug 2024 20:07:40 +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 #9 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D3a9010c98b3d9676307fac20d42cdd3cf= d4bc46d commit 3a9010c98b3d9676307fac20d42cdd3cfd4bc46d Author: Kyle Evans AuthorDate: 2024-08-05 18:43:56 +0000 Commit: Kyle Evans CommitDate: 2024-08-08 20:00:40 +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) 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.=