PC-BSD/trueos 7ff75f4usr.bin/calendar calendar.c io.c

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)
DeltaFile
+27-13usr.bin/calendar/calendar.c
+10-16usr.bin/calendar/io.c
+1-1usr.bin/calendar/Makefile
+38-303 files

UnifiedSplitRaw