os: move xf86PrivsElevated here

Having different types of code all trying to check for elevated privileges
is a bad idea. This implementation is the most thorough one.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Antoine Martin <antoine@nagafix.co.uk>
Tested-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Nicolai Hähnle
2018-03-13 17:46:34 -04:00
committed by Adam Jackson
parent 1519475a43
commit 9ef602de46
3 changed files with 67 additions and 58 deletions

View File

@@ -366,6 +366,9 @@ System(const char *cmdline);
#define Fclose(a) fclose(a)
#endif
extern _X_EXPORT Bool
PrivsElevated(void);
extern _X_EXPORT void
CheckUserParameters(int argc, char **argv, char **envp);
extern _X_EXPORT void