Date: Tue, 23 Jul 2024 18:10:21 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 280418] calendar -a trashes parent's pgrp login setting Message-ID: <bug-280418-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280418 Bug ID: 280418 Summary: calendar -a trashes parent's pgrp login setting Product: Base System Version: 14.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: steve@Watt.COM Created attachment 252245 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=252245&action=edit Patch for src/usr.bin/calendar/calendar.c to add the missing setsid() The presenting symptom is that the daily and security emails from cron/periodic were arriving with the envelope-sender set to some completely random user. After much one-experiment-per-day debugging, I isolated it down to 300.calendar changing the login userid. It seems to be missing its setsid() before calling setusercontext(). Easy-to-demonstrate sample: > (root@rivendell) 43# sh > # id -p > uid root > groups users wheel www vboxusers > # calendar -a > # id -p > login _tss > uid root > groups users wheel www vboxusers > # exit > (root@rivendell) 44# id -p > login _tss > uid root > (root@rivendell) 45# The fix is startlingly simple, with a little help on -questions from Kyle Evans, see attached. -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-280418-227>
