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@canonical.com> Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Tested-by: Knut Petersen <knut_petersen@t-online.de> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
8b4f0a4fdd
commit
a7b97b0fa8
|
@ -1111,14 +1111,14 @@ DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static int
|
||||||
DRI2AuthMagic (ScreenPtr pScreen, uint32_t magic)
|
DRI2AuthMagic (ScreenPtr pScreen, uint32_t magic)
|
||||||
{
|
{
|
||||||
DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
|
DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
|
||||||
if (ds == NULL || (*ds->LegacyAuthMagic) (ds->fd, magic))
|
if (ds == NULL)
|
||||||
return FALSE;
|
return -EINVAL;
|
||||||
|
|
||||||
return TRUE;
|
return (*ds->LegacyAuthMagic) (ds->fd, magic);
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
|
|
Loading…
Reference in New Issue