git: newsyslog - More basename/dirname changes

Antonio Huete Jimenez tuxillo at crater.dragonflybsd.org
Sun Jan 28 17:16:14 PST 2018


commit fe742af3e544f46a206a45ce6e68382bee28f653
Author: Antonio Huete Jimenez <tuxillo at quantumachine.net>
Date:   Mon Jan 29 01:38:39 2018 +0100

    newsyslog - More basename/dirname changes
    
    Properly patch up dirname()/basename() calls to not clobber ent->log.
    
    It turns out that we had a couple of more calls to dirname()/basename()
    in newsyslog(8) that assume the input isn't clobbered. This is bad,
    because it apparently breaks log rotation now that the new dirname()
    implementation has been merged.
    
    Fix this by first copying the input and then calling
    dirname()/basename(). While there, improve the naming of variables in
    this function a bit.
    
    Obtained-from: FreeBSD (r305651)

Summary of changes:
 usr.sbin/newsyslog/newsyslog.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fe742af3e544f46a206a45ce6e68382bee28f653


-- 
DragonFly BSD source repository



More information about the Commits mailing list