From 33a317f48eb3fe888177235ee49b635fbb8cda2f Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 4 Jan 2010 15:34:07 +0000 Subject: Git update 4/1/2010 --- xorg-server/hw/xfree86/common/xf86Init.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'xorg-server/hw/xfree86/common/xf86Init.c') 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"); -- cgit v1.2.3