DragonFlyBSD/src 3a34e56usr.bin/calendar io.c calendar.c

calendar(1): Do not ignore errors of setuid/setgid in '-a' mode

Also clear the supplementary groups list up front when becoming another
user, to avoid leaking any extra group privileges that we might have.

In addition, introduce the 'changeuser()' function to make the
'closecal()' function a bit cleaner.

Obtained-from: NetBSD
(https://github.com/NetBSD/src/commit/d23503416735cd0ca069bbd4e59c9c5b93278d8b)
DeltaFile
+33-15usr.bin/calendar/io.c
+18-5usr.bin/calendar/calendar.c
+51-202 files

UnifiedSplitRaw