OSDN Git Service

xf86drm: fallback to normal path when realpath fails
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 23 Aug 2018 09:49:54 +0000 (10:49 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 24 Aug 2018 12:37:33 +0000 (13:37 +0100)
commitbcb9d976cd91c018aa4eef13563813288984601f
treeee8c845e4b901a5514b455ebc020016091f4f54e
parent8389c5454804d5cd7f62f1cadb841fb1b8a51817
xf86drm: fallback to normal path when realpath fails

Earlier commit reworked our sysfs handling to use realpath.
Sadly that backfired since the Firefox sandboxing mechanism rejects
that. Despite the files/folders being in the allowed list, of the
sandboxing mechanism.

Oddly enough, the Chromium sandboxing doesn't complain about any of
this.

Since there are no Firefox releases with the fix, add a temporary
solution which falls back to the original handling.

Sadly, this won't work for virgl.

v2: drop return type - function cannot return NULL (Eric)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107516
Fixes: a02900133b3 ("xf86drm: introduce a get_real_pci_path() helper")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
xf86drm.c