]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix calendar -a processing of files included in the user's home directory
authorStefan Eßer <se@FreeBSD.org>
Thu, 29 Oct 2020 08:26:38 +0000 (08:26 +0000)
committerStefan Eßer <se@FreeBSD.org>
Thu, 29 Oct 2020 08:26:38 +0000 (08:26 +0000)
commit3fa2a149d68d22fa32ba7b6c09773388ac490fd1
treeae8088a6a9ed94eb596dc3cdf2e6c439fa06f7bf
parent9abc7621384fcbf0bb8954f9c5e2a491304a82bd
Fix calendar -a processing of files included in the user's home directory

The existing code performed a chdir() into the home directory, but the
parser fell back to using the invoking user's home directory as the base
directory for the search for an include file.

Since use of the -a option is limited to UID==0, the directory searched
was typically ~root/.calendar, not the .calendar directory of the user
whose file is being processed.

PR: 205580
Reported by: greg.bal4@gmail.com (Greg Balfour)
MFC after: 3 days
usr.bin/calendar/calendar.c