Bug 205580 - Running "calendar -a" as root fails when user calendar files contain #include
Summary: Running "calendar -a" as root fails when user calendar files contain #include
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-24 14:45 UTC by Robert Ames
Modified: 2020-09-28 16:08 UTC (History)
3 users (show)

See Also:


Attachments
Patch for 11.4-RELEASE requires devel/tradcpp (8.49 KB, patch)
2020-09-28 15:00 UTC, Greg Balfour
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Ames 2015-12-24 14:45:24 UTC
In 10.2-RELEASE running "calendar -a" as root fails when user calendar files contain #include.  This worked in 10.0-RELEASE (and previous releases).

$ uname -a
FreeBSD freebsd.example.com 10.2-RELEASE FreeBSD 10.2-RELEASE #0: Sun Dec 20 10:00:14 CST 2015     root@freebsd.example.com:/usr/obj/usr/src/sys/GENERIC  i386
$ id
uid=1000(robert) gid=20(staff) groups=20(staff),0(wheel),5(operator)
$ date
Sun Dec 20 16:47:44 CST 2015
$ cat ~/.calendar/calendar 
#include <moredates>
$ cat ~/.calendar/moredates 
12/20   Today is December 20
$ calendar
Dec 20  Today is December 20

root@freebsd# id
uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)
root@freebsd# calendar -a
calendar: can't open calendar file "moredates"



My original post to -stable and commentary about calendar's -a option:
http://docs.freebsd.org/cgi/mid.cgi?1450670833.594.12.camel

Related (but closed) bug report:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200815
Comment 1 Greg Balfour 2020-09-28 15:00:52 UTC
Created attachment 218378 [details]
Patch for 11.4-RELEASE requires devel/tradcpp
Comment 2 Greg Balfour 2020-09-28 15:02:00 UTC
I was asked (http://docs.FreeBSD.org/cgi/mid.cgi?20200928045733.GE72348)
to add my patch to fix this issue here.  This patch is against
11.4-RELEASE.  Note that it requires the installation of the
devel/tradcpp port/package.