This is a build fix for MinGW Commit 4b4b9086 "os: support new implicit local user access mode [CVE-2015-3164 2/3]" carefully places the relevant code it adds under !NO_LOCAL_CLIENT_CRED, but unfortunately doesn't notice that NO_LOCAL_CLIENT_CRED is defined as a side-effect in the middle of GetLocalClientCreds(), so many of these checks precede it's definition.
Move the check if NO_LOCAL_CLIENT_CRED should be defined to before it's first use. Signed-off-by: Jon TURNEY <jon.tur...@dronecode.org.uk> --- include/os.h | 4 ++++ os/access.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/os.h b/include/os.h index b2b96c8..5f29c58 100644 --- a/include/os.h +++ b/include/os.h @@ -442,6 +442,10 @@ EnableLocalHost(void); extern _X_EXPORT void DisableLocalHost(void); +#if !defined(HAVE_GETPEEREID) && !defined(HAVE_GETPEERUCRED) && !defined(SO_PEERCRED) +#define NO_LOCAL_CLIENT_CRED +#endif + #ifndef NO_LOCAL_CLIENT_CRED extern _X_EXPORT void EnableLocalUser(void); diff --git a/os/access.c b/os/access.c index 75e7a69..54f0690 100644 --- a/os/access.c +++ b/os/access.c @@ -1221,7 +1221,6 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec ** lccp) #endif #else /* No system call available to get the credentials of the peer */ -#define NO_LOCAL_CLIENT_CRED return -1; #endif } -- 2.1.4 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel