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

Aaron LI aly at crater.dragonflybsd.org
Sat Nov 9 21:11:52 PST 2019


commit 3a34e56dfb1697f92c7ee23ad476a2dab13e46b2
Author: Aaron LI <aly at aaronly.me>
Date:   Sun Nov 3 11:30:27 2019 +0800

    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)

Summary of changes:
 usr.bin/calendar/calendar.c | 23 +++++++++++++++++-----
 usr.bin/calendar/io.c       | 48 +++++++++++++++++++++++++++++++--------------
 2 files changed, 51 insertions(+), 20 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3a34e56dfb1697f92c7ee23ad476a2dab13e46b2


-- 
DragonFly BSD source repository



More information about the Commits mailing list