]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix calendar -a processing of files included in the user's home directory
authorse <se@FreeBSD.org>
Thu, 29 Oct 2020 08:26:38 +0000 (08:26 +0000)
committerse <se@FreeBSD.org>
Thu, 29 Oct 2020 08:26:38 +0000 (08:26 +0000)
commit5b36556680f3392074afbc02b7347a1d69f7009e
treeae8088a6a9ed94eb596dc3cdf2e6c439fa06f7bf
parenteeadb46c9d33bb525070ceb0f973e3dd0b9f5c5c
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