hw/xwin: Remove XSetAuthorization() for helper clients
All helper client code now uses xcb, so calling XSetAuthorization() is no longer needed. This is the last reference to libX11 from helper clients, so linking with x11-xcb and libX11 is no longer required. Also drop (unneeded?) linking with libXau. Also drop installing these prerequistes on AppvVeyor. Also move prototypes for functions in winauth.c from win.h into a new header, winauth.h, and include that where needed.
This commit is contained in:
parent
9e02e023b0
commit
4055fed1e7
|
@ -37,9 +37,7 @@ libGL-devel,\
|
|||
libnettle-devel,\
|
||||
libpixman1-devel,\
|
||||
libtirpc-devel,\
|
||||
libX11-devel,\
|
||||
libXRes-devel,\
|
||||
libXau-devel,\
|
||||
libXaw-devel,\
|
||||
libXdmcp-devel,\
|
||||
libXext-devel,\
|
||||
|
|
|
@ -2081,7 +2081,7 @@ if test "x$XWIN" = xyes; then
|
|||
AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support])
|
||||
AC_CHECK_TOOL(WINDRES, windres)
|
||||
|
||||
PKG_CHECK_MODULES([XWINMODULES],[x11 xau xdmcp x11-xcb xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes])
|
||||
PKG_CHECK_MODULES([XWINMODULES],[xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes])
|
||||
|
||||
if test "x$WINDOWSDRI" = xauto; then
|
||||
PKG_CHECK_EXISTS([windowsdriproto], [WINDOWSDRI=yes], [WINDOWSDRI=no])
|
||||
|
|
|
@ -66,6 +66,7 @@ typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner,
|
|||
#include "glx/glwindows.h"
|
||||
#include "dri/windowsdri.h"
|
||||
#endif
|
||||
#include "winauth.h"
|
||||
|
||||
/*
|
||||
* References to external symbols
|
||||
|
|
|
@ -132,7 +132,6 @@ srcs_windows += pfiles
|
|||
|
||||
xwin_dep = [
|
||||
common_dep,
|
||||
dependency('x11-xcb'),
|
||||
dependency('xcb-aux'),
|
||||
dependency('xcb-image'),
|
||||
dependency('xcb-ewmh'),
|
||||
|
|
|
@ -669,14 +669,6 @@ Bool
|
|||
Bool
|
||||
winAllocateCmapPrivates(ColormapPtr pCmap);
|
||||
|
||||
/*
|
||||
* winauth.c
|
||||
*/
|
||||
|
||||
Bool
|
||||
winGenerateAuthorization(void);
|
||||
void winSetAuthorization(void);
|
||||
|
||||
/*
|
||||
* winblock.c
|
||||
*/
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
#include <xwin-config.h>
|
||||
#endif
|
||||
|
||||
#include "win.h"
|
||||
#include "winauth.h"
|
||||
#include "winmsg.h"
|
||||
|
||||
/* Includes for authorization */
|
||||
#include "securitysrv.h"
|
||||
|
@ -40,14 +41,6 @@
|
|||
|
||||
#include <xcb/xcb.h>
|
||||
|
||||
/* Need to get this from Xlib.h */
|
||||
extern void XSetAuthorization(
|
||||
const char * /* name */,
|
||||
int /* namelen */,
|
||||
const char * /* data */,
|
||||
int /* datalen */
|
||||
);
|
||||
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
|
@ -68,9 +61,7 @@ static xcb_auth_info_t auth_info;
|
|||
*/
|
||||
|
||||
#ifndef XCSECURITY
|
||||
|
||||
static
|
||||
XID
|
||||
static XID
|
||||
GenerateAuthorization(unsigned name_length,
|
||||
const char *name,
|
||||
unsigned data_length,
|
||||
|
@ -89,7 +80,9 @@ GenerateAuthorization(unsigned name_length,
|
|||
Bool
|
||||
winGenerateAuthorization(void)
|
||||
{
|
||||
#ifdef XCSECURITY
|
||||
SecurityAuthorizationPtr pAuth = NULL;
|
||||
#endif
|
||||
|
||||
/* Call OS layer to generate authorization key */
|
||||
g_authId = GenerateAuthorization(strlen(AUTH_NAME),
|
||||
|
@ -106,7 +99,7 @@ winGenerateAuthorization(void)
|
|||
g_uiAuthDataLen, g_pAuthData);
|
||||
}
|
||||
|
||||
auth_info.name = AUTH_NAME;
|
||||
auth_info.name = strdup(AUTH_NAME);
|
||||
auth_info.namelen = strlen(AUTH_NAME);
|
||||
auth_info.data = g_pAuthData;
|
||||
auth_info.datalen = g_uiAuthDataLen;
|
||||
|
@ -141,14 +134,6 @@ winGenerateAuthorization(void)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* Use our generated cookie for authentication */
|
||||
void
|
||||
winSetAuthorization(void)
|
||||
{
|
||||
XSetAuthorization(AUTH_NAME,
|
||||
strlen(AUTH_NAME), g_pAuthData, g_uiAuthDataLen);
|
||||
}
|
||||
|
||||
xcb_auth_info_t *
|
||||
winGetXcbAuthInfo(void)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <X11/Xdefs.h> // for Bool
|
||||
|
||||
Bool winGenerateAuthorization(void);
|
||||
xcb_auth_info_t * winGetXcbAuthInfo(void);
|
|
@ -38,12 +38,11 @@
|
|||
#include "win.h"
|
||||
#include "winclipboard/winclipboard.h"
|
||||
#include "windisplay.h"
|
||||
#include "winauth.h"
|
||||
|
||||
#define WIN_CLIPBOARD_RETRIES 40
|
||||
#define WIN_CLIPBOARD_DELAY 1
|
||||
|
||||
extern xcb_auth_info_t *winGetXcbAuthInfo(void);
|
||||
|
||||
/*
|
||||
* Local variables
|
||||
*/
|
||||
|
@ -66,9 +65,6 @@ winClipboardThreadProc(void *arg)
|
|||
|
||||
++clipboardRestarts;
|
||||
|
||||
/* Use our generated cookie for authentication */
|
||||
winSetAuthorization();
|
||||
|
||||
/* Setup the display connection string */
|
||||
/*
|
||||
* NOTE: Always connect to screen 0 since we require that screen
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
#include "winglobals.h"
|
||||
#include "windisplay.h"
|
||||
#include "winmultiwindowicons.h"
|
||||
#include "winauth.h"
|
||||
|
||||
/* We need the native HWND atom for intWM, so for consistency use the
|
||||
same name as extWM does */
|
||||
|
@ -75,7 +76,6 @@
|
|||
extern void winDebug(const char *format, ...);
|
||||
extern void winReshapeMultiWindow(WindowPtr pWin);
|
||||
extern void winUpdateRgnMultiWindow(WindowPtr pWin);
|
||||
extern xcb_auth_info_t *winGetXcbAuthInfo(void);
|
||||
|
||||
#ifndef CYGDEBUG
|
||||
#define CYGDEBUG NO
|
||||
|
|
Loading…
Reference in New Issue