From ead968a4300c0adeff89b9886e888b6d284c75cc Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sat, 17 Dec 2011 01:36:51 +0700 Subject: xserver: check for elevated privileges not uid=0 This allows us to run the server as a normal user whilst still being able to use the -modulepath, -logfile and -config switches We define a xf86PrivsElevated which will do the checks and cache the result in case it is called more than once. Also renamed the paths #defines to match their new meaning. Original discussion which led to this patch can be found here: http://lists.freedesktop.org/archives/xorg-devel/2011-September/025853.html Signed-off-by: Antoine Martin Tested-by: Michal Suchanek Reviewed-by: Jamey Sharp Reviewed-by: Adam Jackson --- hw/xfree86/common/xf86Priv.h | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/xfree86/common/xf86Priv.h') diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index e0b18098e..255407b48 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -145,6 +145,7 @@ extern _X_EXPORT Bool xf86LoadModules(char **list, pointer *optlist); extern _X_EXPORT int xf86SetVerbosity(int verb); extern _X_EXPORT int xf86SetLogVerbosity(int verb); extern _X_EXPORT Bool xf86CallDriverProbe( struct _DriverRec * drv, Bool detect_only ); +extern _X_EXPORT Bool xf86PrivsElevated(void); #endif /* _NO_XF86_PROTOTYPES */ -- cgit v1.2.3