From 75a869a4e7c06072380931b714ac83b1037d3bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= Date: Tue, 13 Mar 2018 17:46:36 -0400 Subject: [PATCH] xfree86: replace all uses of xf86PrivsElevated with PrivsElevated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [... but leave it defined and exported, since we're ABI-frozen - ajax] Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker Reviewed-by: Antoine Martin Tested-by: Ben Crocker restore abi --- hw/xfree86/common/xf86Config.c | 2 +- hw/xfree86/common/xf86Init.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 2f72c2f76..05991d319 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -2275,7 +2275,7 @@ xf86HandleConfigFile(Bool autoconfig) MessageType filefrom = X_DEFAULT; MessageType dirfrom = X_DEFAULT; - if (!xf86PrivsElevated()) { + if (!PrivsElevated()) { filesearch = ALL_CONFIGPATH; dirsearch = ALL_CONFIGDIRPATH; } diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 88d202463..0663186b6 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -853,7 +853,7 @@ OsVendorInit(void) #ifdef O_NONBLOCK if (!beenHere) { - if (xf86PrivsElevated()) { + if (PrivsElevated()) { int status; status = fcntl(fileno(stderr), F_GETFL, 0); @@ -1002,7 +1002,7 @@ xf86PrintDefaultLibraryPath(void) static void xf86CheckPrivs(const char *option, const char *arg) { - if (xf86PrivsElevated() && !xf86PathIsSafe(arg)) { + if (PrivsElevated() && !xf86PathIsSafe(arg)) { FatalError("\nInvalid argument for %s - \"%s\"\n" "\tWith elevated privileges %s must specify a relative path\n" "\twithout any \"..\" elements.\n\n", option, arg, option); @@ -1299,7 +1299,7 @@ ddxUseMsg(void) ErrorF("\n"); ErrorF("\n"); ErrorF("Device Dependent Usage\n"); - if (!xf86PrivsElevated()) { + if (!PrivsElevated()) { ErrorF("-modulepath paths specify the module search path\n"); ErrorF("-logfile file specify a log file name\n"); ErrorF("-configure probe for devices and write an "