VirtualBox

vbox的更動 62201 路徑 trunk/src/VBox/Additions


忽略:
時間撮記:
2016-7-12 下午02:14:55 (8 年 以前)
作者:
vboxsync
訊息:

bugref:8087: Additions/x11: support non-root X server: improve preventing loading of OpenGL libraries by the X server. We support client-side OpenGL, but not server-side. Now we intercept functions that the X server will call and check for it rather than trying to overwrite the libraries in memory with the Mesa OpenGL ones. Also fix locating the Mesa libraries. Hopefully this can be removed altogether, but not just before the release.

位置:
trunk/src/VBox/Additions
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Additions/common/crOpenGL/egl.c

    r62074 r62201  
    2929#include <GL/glx.h>
    3030#include <X11/Xlib.h>
     31
     32#include <stdlib.h>
    3133
    3234/*******************************************************************************
     
    133135    Display *pDisplay;
    134136    int rc, cError, cEvent, cMajor, cMinor;
    135 
     137    /* Prevent working from inside the X server by requiring a valid DISPLAY. */
     138    char *pszDisplay = getenv("DISPLAY");
     139   
     140    if (!pszDisplay || !*pszDisplay)
     141        return EGL_NO_DISPLAY;
    136142    rc = RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
    137143    if (RT_FAILURE(rc))
     
    164170DECLEXPORT(EGLBoolean) eglInitialize (EGLDisplay hDisplay, EGLint *pcMajor, EGLint *pcMinor)
    165171{
     172    /* Prevent working from inside the X server by requiring a valid DISPLAY. */
     173    char *pszDisplay = getenv("DISPLAY");
     174   
     175    if (!pszDisplay || !*pszDisplay)
     176        return EGL_FALSE;
    166177    if (!VALID_PTR(hDisplay))
    167178        return setEGLError(EGL_BAD_DISPLAY);
     
    730741DECLEXPORT(EGLBoolean) eglBindAPI(EGLenum enmApi)
    731742{
     743    /* Prevent working from inside the X server by requiring a valid DISPLAY. */
     744    char *pszDisplay = getenv("DISPLAY");
     745   
     746    if (!pszDisplay || !*pszDisplay)
     747        return EGL_FALSE;
    732748    return enmApi == EGL_OPENGL_API ? clearEGLError() : setEGLError(EGL_BAD_PARAMETER);
    733749}
  • trunk/src/VBox/Additions/linux/installer/vboxadd.sh

    r62195 r62201  
    227227    # Install the guest OpenGL drivers.  For now we don't support
    228228    # multi-architecture installations
     229    rm -f /etc/ld.so.conf.d/00vboxvideo.conf
     230    ldconfig
    229231    if /usr/bin/VBoxClient --check3d 2>/dev/null; then
    230232        rm -f /var/lib/VBoxGuestAdditions/lib/system/tmp.so
     
    247249        ln -sf "${INSTALL_DIR}/lib/VBoxEGL.so" /var/lib/VBoxGuestAdditions/lib/libEGL.so.1
    248250        echo "/var/lib/VBoxGuestAdditions/lib" > /etc/ld.so.conf.d/00vboxvideo.conf
    249     else
    250         rm -f /etc/ld.so.conf.d/00vboxvideo.conf
    251251    fi
    252252    ldconfig
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette