Files
Kyle Evans d94dbaa516 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 6cb8b61efe)
(cherry picked from commit 33708452aa)

Approved by:	so
2024-09-04 20:31:04 +00:00
..
2023-08-16 11:55:20 -06:00
2023-08-16 11:55:20 -06:00
2023-08-16 11:55:26 -06:00
2023-08-16 11:55:03 -06:00
2023-09-14 10:59:38 +02:00
2023-08-16 11:55:34 -06:00
2023-09-07 20:28:31 +00:00
2023-08-16 11:55:20 -06:00
2023-08-17 15:08:30 +02:00
2023-08-16 11:55:03 -06:00
2023-08-16 11:55:03 -06:00
2023-08-17 15:08:30 +02:00
2023-09-07 20:28:31 +00:00
2023-08-16 11:55:03 -06:00
2023-08-16 11:55:03 -06:00
2023-08-16 11:55:03 -06:00
…
2023-08-16 11:55:03 -06:00
2023-08-16 11:55:03 -06:00
2023-08-16 11:55:03 -06:00