diff options
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Init.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Init.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c index 3b25c89a6..670744802 100644 --- a/xorg-server/hw/xfree86/common/xf86Init.c +++ b/xorg-server/hw/xfree86/common/xf86Init.c @@ -1387,6 +1387,19 @@ ddxProcessArgument(int argc, char **argv, int i) xf86ConfigFile = argv[i + 1]; return 2; } + if (!strcmp(argv[i], "-configdir")) + { + CHECK_FOR_REQUIRED_ARGUMENT(); + if (getuid() != 0 && !xf86PathIsSafe(argv[i + 1])) { + FatalError("\nInvalid argument for %s\n" + "\tFor non-root users, the file specified with %s must be\n" + "\ta relative path and must not contain any \"..\" elements.\n" + "\tUsing default "__XCONFIGDIR__" search path.\n\n", + argv[i], argv[i]); + } + xf86ConfigDir = argv[i + 1]; + return 2; + } if (!strcmp(argv[i],"-flipPixels")) { xf86FlipPixels = TRUE; @@ -1670,6 +1683,8 @@ ddxUseMsg(void) } ErrorF("-config file specify a configuration file, relative to the\n"); ErrorF(" "__XCONFIGFILE__" search path, only root can use absolute\n"); + ErrorF("-configdir dir specify a configuration directory, relative to the\n"); + ErrorF(" "__XCONFIGDIR__" search path, only root can use absolute\n"); ErrorF("-verbose [n] verbose startup messages\n"); ErrorF("-logverbose [n] verbose log messages\n"); ErrorF("-quiet minimal startup messages\n"); |