diff options
author | Stefan Eßer <se@FreeBSD.org> | 2020-10-23 09:22:23 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2020-10-23 09:22:23 +0000 |
commit | 34b38e1245edc730c4a5707cac2121780031770b (patch) | |
tree | 3eb5443a11bb332a8eb5c605f74e08f910158cbd /usr.bin | |
parent | a71074e0af2b37a3f9082bafb8a0a0feb3cd4515 (diff) | |
download | src-test-34b38e1245edc730c4a5707cac2121780031770b.tar.gz src-test-34b38e1245edc730c4a5707cac2121780031770b.zip |
Add search of LOCALBASE/share/calendar for calendars supplied by a port.
Calendar files in LOCALBASE override similarily named ones in the base
system. This could easily be changed if the base system calendars should
have precedence, but it could lead to a violation of POLA since then the
port's files were ignored unless those in base have been deleted.
There was no definition of _PATH_LOCALBASE in paths.h, but verbatim uses
of /usr/local existed for _PATH_DEFPATH. Use _PATH_LOCALBASE here to ease
a consistent modification of this prefix.
Reviewed by: imp, pfg
Differential Revision: https://reviews.freebsd.org/D26882
Notes
Notes:
svn path=/head/; revision=366962
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/calendar/io.c | 2 | ||||
-rw-r--r-- | usr.bin/calendar/pathnames.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index f363289878b9d..a95f71e7b7cad 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -71,7 +71,7 @@ enum { }; const char *calendarFile = "calendar"; /* default calendar file */ -static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE}; /* HOME */ +static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE_LOCAL, _PATH_INCLUDE}; /* HOME */ static const char *calendarNoMail = "nomail";/* don't sent mail if file exist */ static char path[MAXPATHLEN]; diff --git a/usr.bin/calendar/pathnames.h b/usr.bin/calendar/pathnames.h index 006f5bcd5cdc8..95f41a25758fd 100644 --- a/usr.bin/calendar/pathnames.h +++ b/usr.bin/calendar/pathnames.h @@ -35,3 +35,4 @@ #include <paths.h> #define _PATH_INCLUDE "/usr/share/calendar" +#define _PATH_INCLUDE_LOCAL _PATH_LOCALBASE "/share/calendar" |