HomeFreeBSD

Properly patch up dirname()/basename() calls to not clobber ent->log.

Description

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.

Reported by: Ryan Steinmetz, gjb
Reviewed by: bdrewery, allanjude
Differential Revision: https://reviews.freebsd.org/D7838

Details

Provenance
edAuthored on
Reviewer
bdrewery
Differential Revision
D7838: Properly patch up dirname()/basename() calls to not clobber ent->log.
Parents
rS305650: MFC r305469:
Branches
Unknown
Tags
Unknown