]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix 'calendar -a' in several ways.
authorglebius <glebius@FreeBSD.org>
Tue, 10 Sep 2019 04:21:48 +0000 (04:21 +0000)
committerglebius <glebius@FreeBSD.org>
Tue, 10 Sep 2019 04:21:48 +0000 (04:21 +0000)
commit7ff75f4a5a3d9ada5bd68384fdded357fa4c1105
tree7f9de52f149449fdf4fa81c5d7e1449c60800028
parent259fac94399127186906acf0e975dffdb6e48bc7
Fix 'calendar -a' in several ways.

o Do not run any iconv() processing in -a. The locale of root user is not
  what is desired by most of the users who receive their calendar mail.
  Just assume that users store their calendars in a format that is readable
  to them. This fixes regression from r344340.
o fork() and setusercontext(LOGIN_SETALL) for every user. This makes LANG
  set inside a calendar file mostly excessive, as we will pick up user's
  login class LANG.
o This also executes complex function cal() that parses user owned files
  with appropriate user privileges.
  Previously it was run with privileges dropped only temporary for execution
  of cal(), and fully dropped only before invoking sendmail (see r22473).

Reviewed by: bapt (older version of patch)
usr.bin/calendar/Makefile
usr.bin/calendar/calendar.c
usr.bin/calendar/io.c