From nobody Thu Aug 8 20:07:39 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 4Wfykz1mfdz5S962 for ; Thu, 08 Aug 2024 20:07:39 +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 4Wfykz0Rxnz4qbp for ; Thu, 8 Aug 2024 20:07:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723147659; a=rsa-sha256; cv=none; b=xhEILx6dlX4tYX1x06STm8phvfzX5Pfb6DecM5Vib8gAbJNSlJp8S/GwwZ/9kzw3gjPRqV Vs3eao894T+2FbtlJw/ErRjtaSTbzos8W+jY5FIBc21Clu54TNNnkaxa1rJiGuPbPrC9MT i12UrlDQNR6+vBQw6LtASRaW4kW+5TFg5GTKRyaSbFD/fBKAlCd+dnWQmkBfliJ9E232B3 x60ELBdQVF3i4Y657e8m8wtSYvEEToBVBEmrAv8/6ibXQESSwCqfxdBrTntpDXvE1FT3TC MaGf3S2oM9mu5hpz/5E+3WsHeqKW6Ye4t9XBOtv1K2QbbyfZUo1a2jyr3qoCIg== 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=1723147659; 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=gFbV7dEhITl4geUSWHr7NGuSJ/OiApzotRyfTPnYEXg=; b=GpfXl4+e5IDoBhRjhDYqRblk3V8ywO+whfGlgUZPXPf9oLa+CNlVbBcZyjuNXniEPOsOD8 eXHjY9H3gXzfoKv5a34+B99y+mEDTgxh/U0qzdjmvmd4Wbo7/OiEALGH+vs2fFr/FQaVh7 UNmkKZQbli0apT09uIV0joq5prp9+94K7XWuWKCD27p8krAK3arNFWM20QfGlA5TySd8zk Hb0EFKzw1iHOjYFtxly0bqr0y7akb/l1CgRR5H8xBLT7yVfjTfoF6AVrZLgYCv+DsF9oek HcIF3yLQaxrCefjHAyxSrMbjGIlNhzmBmOW1h//tM7cWsEKtbYSElReGPggwyw== 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 4Wfyky73Cnzn7X for ; Thu, 8 Aug 2024 20:07:38 +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 478K7caA010018 for ; Thu, 8 Aug 2024 20:07:38 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 478K7cqS010017 for bugs@FreeBSD.org; Thu, 8 Aug 2024 20:07:38 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:39 +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 #8 from commit-hook@FreeBSD.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D33708452aaabca205d81eceb83e0813e5= 882815c commit 33708452aaabca205d81eceb83e0813e5882815c Author: Kyle Evans AuthorDate: 2024-08-05 18:43:56 +0000 Commit: Kyle Evans CommitDate: 2024-08-08 19:59:21 +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.=