xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Thu Jun 28 10:41:28 PDT 2012


 hw/xfree86/dri2/dri2.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a7b97b0fa85d695ae19d194cfa3267159d149e5d
Author: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com>
Date:   Thu Jun 28 12:07:11 2012 +1000

    dri2: Fix authentication for < v8 clients (v2).
    
    The legacy logic was embarassingly wrong; AuthMagic should return errno,
    so returning FALSE only when AuthMagic returns nonzero is exactly wrong.
    
    v2: Match drmAuthMagic by returning -EINVAL rather than EINVAL
        Fix trailing whitespace
    
    https://bugs.freedesktop.org/show_bug.cgi?id=51400
    Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com>
    Tested-by: Chris Wilson <chris at chris-wilson.co.uk>
    Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
    Tested-by: Knut Petersen <knut_petersen at t-online.de>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index d0f1789..d3b3c73 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -1111,14 +1111,14 @@ DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd,
     return TRUE;
 }
 
-static Bool
+static int
 DRI2AuthMagic (ScreenPtr pScreen, uint32_t magic)
 {
     DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
-    if (ds == NULL || (*ds->LegacyAuthMagic) (ds->fd, magic))
-        return FALSE;
+    if (ds == NULL)
+        return -EINVAL;
 
-    return TRUE;
+    return (*ds->LegacyAuthMagic) (ds->fd, magic);
 }
 
 Bool


More information about the xorg-commit mailing list