aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/parser/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/parser/scan.c')
-rw-r--r--xorg-server/hw/xfree86/parser/scan.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c
index cdca9ca1c..8aab0cf41 100644
--- a/xorg-server/hw/xfree86/parser/scan.c
+++ b/xorg-server/hw/xfree86/parser/scan.c
@@ -599,6 +599,8 @@ xf86pathIsSafe(const char *path)
* %F config file environment ($XORGCONFIG) as a relative path
* %G config file environment ($XORGCONFIG) as a safe path
* %P projroot
+ * %C sysconfdir
+ * %D datadir
* %M major version number
* %% %
*/
@@ -615,6 +617,12 @@ xf86pathIsSafe(const char *path)
#ifndef PROJECTROOT
#define PROJECTROOT "/usr/X11R6"
#endif
+#ifndef SYSCONFDIR
+#define SYSCONFDIR PROJECTROOT "/etc"
+#endif
+#ifndef DATADIR
+#define DATADIR PROJECTROOT "/share"
+#endif
#ifndef XCONFENV
#define XCONFENV "XORGCONFIG"
#endif
@@ -755,6 +763,12 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
else
BAIL_OUT;
break;
+ case 'C':
+ APPEND_STR(SYSCONFDIR);
+ break;
+ case 'D':
+ APPEND_STR(DATADIR);
+ break;
case 'M':
if (!majorvers[0]) {
if (XF86_VERSION_MAJOR < 0 || XF86_VERSION_MAJOR > 99) {