VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk@ 94076

最後變更 在這個檔案從94076是 93469,由 vboxsync 提交於 3 年 前

Additions: Linux: VBoxDRMClient: make IPC socket access configurable via guest property, bugref:10134.

Guest property '/VirtualBox/GuestAdd/DRMIpcRestricted' when set with RDONLYGUEST
flag is used to restrict DRM IPC server socket access to root and users of 'vboxdrmipc'
group. If property is not set or has no RDONLYGUEST flag, access is granted to all users.

VBoxDRMClient subscribes to guest property update notifications and updates server socket
access mode accordingly in runtime. When switching from unrestricted mode to the restricted
one, all established IPC connections will be kept, new connections will require corresponding
access permissions.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 6.5 KB
 
1# $Id: Makefile.kmk 93469 2022-01-27 21:25:39Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox Guest Addition X11 Client.
4#
5
6#
7# Copyright (C) 2006-2022 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.alldomusa.eu.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21# Use header files from our tree for randr and xinerama. and don't link but rather dlopen libXrand
22# This is mostly because the GA build boxes can have a very old xrandr lib, so instead of linking we dlopen.
23VBOX_WITH_DISTRO_XRAND_XINERAMA=
24
25# We don't yet have a seamless mode compilation flag, so define it here unconditionally.
26VBOX_WITH_SEAMLESS:=1
27
28#
29# VBoxClient - clipboard and seamless.
30#
31PROGRAMS += VBoxClient
32#
33# Please make sure that you grep the source tree and modify all occurences accordingly
34# if you rename the following program name.
35#
36PROGRAMS.linux += VBoxDRMClient
37
38VBoxClient_TEMPLATE = NewVBoxGuestR3Exe
39VBoxClient_DEFS += VBOX_X11_CLIPBOARD VBOX_WITH_HGCM
40VBoxClient_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
41ifdef VBOX_WITH_DBUS
42 VBoxClient_DEFS += VBOX_WITH_DBUS
43endif
44
45VBoxClient_DEFS.linux += _GNU_SOURCE
46VBoxClient_INCS = $(VBOX_GRAPHICS_INCS)
47VBoxClient_INCS += ../x11include/panoramiXproto-1.1
48VBoxClient_INCS += ../x11include/libXrandr-1.5.2
49VBoxClient_INCS += ../x11include/randrproto-1.6.0
50VBoxClient_SOURCES = \
51 main.cpp \
52 logging.cpp
53
54VBoxDRMClient_TEMPLATE = NewVBoxGuestR3Exe
55VBoxDRMClient_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
56VBoxDRMClient_SOURCES = \
57 display-drm.cpp \
58 display-ipc.cpp \
59 logging.cpp
60
61
62VBoxClient_SOURCES.linux = \
63 chk_stubs.c
64VBoxClient_LIBPATH = \
65 $(VBOX_LIBPATH32_X11)
66VBoxClient_LIBS.freebsd = \
67 iconv
68VBoxClient_LIBS.linux = \
69 dl
70VBoxClient_LIBS.netbsd = \
71 crypt
72VBoxClient_LIBS.solaris = \
73 dl
74VBoxClient_LIBS = \
75 X11 Xt Xext Xmu
76ifdef VBOX_WITH_DISTRO_XRAND_XINERAMA
77 VBoxClient_DEFS += WITH_DISTRO_XRAND_XINERAMA
78 VBoxClient_LIBS += Xrandr
79endif
80
81# XXX: -L comes from the template, but not rpath
82VBoxClient_LDFLAGS.netbsd = \
83 -Wl,-rpath /usr/X11R7/lib
84
85ifdef VBOX_WITH_DRAG_AND_DROP
86 ifdef VBOX_DND_WITH_XTEST
87 VBoxClient_DEFS += VBOX_DND_WITH_XTEST
88 VBoxClient_LIBS += \
89 Xtst
90 endif
91endif
92
93# This forces the memcpy references in the static libraries to go to
94# __wrap_memcpy, which we can wrap around memcpy@GLIBC_2.2.5. I do not know
95# how else to do that without recompiling or implementing our own memcpy.
96ifeq ($(KBUILD_TARGET),linux)
97 VBoxClient_LDFLAGS.amd64 += \
98 -Wl,--wrap=memcpy
99endif
100
101ifdef VBOX_WITH_GUEST_PROPS
102 VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
103 VBoxClient_SOURCES += \
104 hostversion.cpp
105 VBoxDRMClient_DEFS += VBOX_WITH_GUEST_PROPS
106endif
107
108ifdef VBOX_WITH_DRAG_AND_DROP
109 VBoxClient_DEFS += \
110 VBOX_WITH_DRAG_AND_DROP \
111 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
112 VBoxClient_SOURCES += \
113 draganddrop.cpp
114 VBoxClient_LIBS += \
115 $(VBOX_LIB_VBGL_R3) \
116 $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB)
117endif
118
119ifdef VBOX_WITH_SEAMLESS
120 VBoxClient_DEFS += VBOX_WITH_SEAMLESS
121 VBoxClient_SOURCES += \
122 seamless.cpp \
123 seamless-x11.cpp
124endif
125
126ifdef VBOX_WITH_VMSVGA
127 VBoxClient_DEFS += VBOX_WITH_VMSVGA
128 VBoxClient_SOURCES += \
129 display-svga-x11.cpp
130 VBoxClient_SOURCES.linux += \
131 display-svga-session.cpp \
132 display-ipc.cpp \
133 display-helper-gnome3.cpp \
134 display-helper-generic.cpp
135
136### include $(PATH_SUB_CURRENT)/helpers/Makefile.kmk
137endif
138
139ifdef VBOX_WITH_SHARED_CLIPBOARD
140 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD
141 VBoxClient_SOURCES += \
142 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
143 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
144 clipboard.cpp
145 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
146 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS VBOX_WITH_SHARED_CLIPBOARD_GUEST
147 VBoxClient_SOURCES += \
148 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
149 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp
150 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
151 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
152 VBoxClient_SOURCES += \
153 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-http.cpp
154 endif
155 ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
156 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_FUSE
157 # @todo Make this dynamic loading more generic.
158 VBoxClient_SOURCES += \
159 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount/fuse.cpp \
160 clipboard-fuse.cpp
161 # @todo Ditto.
162 VBoxClient_INCS += \
163 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount
164 endif
165 endif
166endif
167
168if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
169 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
170
171# Set this in LocalConfig.kmk if you are working on the X11 clipboard service
172# to automatically run the unit test at build time.
173# OTHERS += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run
174
175 PROGRAMS += tstSeamlessX11-auto
176 tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
177 tstSeamlessX11-auto_SOURCES = \
178 testcase/tstSeamlessX11-auto.cpp \
179 seamless-x11.cpp
180 tstSeamlessX11-auto_DEFS = TESTCASE
181 tstSeamlessX11-auto_LIBS = \
182 $(LIB_RUNTIME)
183
184 TESTING += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto
185$$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \
186 $$(tstSeamlessX11-auto_1_STAGE_TARGET)
187 export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet
188 $(QUIET)$(APPEND) -t "$@" "done"
189
190 #
191 # Additional testcase designed to be run manually, which initiates and starts the Linux
192 # guest client part of the seamless additions in the host, faking seamless events from
193 # the host and writing information about guest events to standard output.
194 #
195 PROGRAMS += tstSeamlessX11
196 tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
197 tstSeamlessX11_SOURCES = \
198 testcase/tstSeamlessX11.cpp \
199 seamless.cpp \
200 seamless-x11.cpp
201 tstSeamlessX11_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
202 tstSeamlessX11_LIBPATH = \
203 $(VBOX_LIBPATH_X11)
204 tstSeamlessX11_LIBS = \
205 $(LIB_RUNTIME) \
206 Xext \
207 Xmu \
208 X11
209 endif
210endif
211
212include $(FILE_KBUILD_SUB_FOOTER)
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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