Enable NX (prevent data to be executable) and ASLR (address
randomisation).
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
When the user wants to copy files, new spice-gtk can share those
files using the existing phodav server. In that case, it advertises
the VD_AGENT_CLIPBOARD_FILE_LIST type in the clipboard grab message.
Upon request of the clipboard data in the mentioned type, spice-gtk
provides a list of absolute paths in the phodav server - these are
the files that are supposed to be copied/moved.
The role of the vdagent is to adjust this data given the drive
letter of the mapped webdav share.
Files can be both copied and moved, although move was tested
only with Windows' File Explorer.
Copying files from the vdagnet side to the client is not
supported yet.
Signed-off-by: Jakub Janků <jjanku@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
The EXTRA_DIST part in Makefile.am is needed as spice-protocol
removed support for Autoconf.
We don't need anymore "ignore=untracked" in the submodule as
we are not going to add or modify files anymore.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
These project files were not correctly tested and updated for a
while.
Now that CMake is present it can be used to generate proper
updated Visual Studio projects instead.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Allows to build out-of-tree and have a clean working directory.
Autoconf used to work with out-of-tree and "config.h" in the
build directory as a "common" directory in the build directory
was created, so including "../config.h" in version.rc and having
"-I $(top_builddir)/common" used to work.
CMake does not create "common" under the build directory so the
"../config.h" inclusion fails.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Although for other projects we started moving to Meson instead of
Autoconf add support for CMake for Windows agent.
Windows has more support for CMake than for Meson, there are
many tools (like Visual Studio, NuGet and vcpkg) and libraries
(like libz and libpng that we use here) that support CMake instead
of Meson.
This will also make easier to add automatic builds using Microsoft
tools.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Have the same behaviour of Linux machines.
The directory is not opened again and again, only is not already
opened.
This is done checking the directory opened in explorer.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Some declarations are available in MingW only defining a more recent
version of WINVER. Set WINVER to 0x0601 (Windows 7) to enable these
definitions.
This allows to clean some files.
The definition were already available in Fedora 22.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Customize these properties of WIX script during build under
WIXL or Windows.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
There's no reason to tell the package installed on the build system
used.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This allows git.mk to include some missing files to ignore.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
LTO option allows to have smaller executable stripping
unneeded part of code.
These options were added by a095f4806e ("build-sys: statically
build agent").
The gain of using these options currently are quite small,
from a small test:
$ ll *.exe
-rwxrwxr-x. 1 freddy freddy 506880 Jul 26 11:26 vdagent.exe
-rwxrwxr-x. 1 freddy freddy 198656 Jul 26 11:26 vdservice.exe
$ ll *.exe
-rwxrwxr-x. 1 freddy freddy 509952 Jul 26 11:26 vdagent.exe
-rwxrwxr-x. 1 freddy freddy 200192 Jul 26 11:26 vdservice.exe
Considering that there are some bug in some recent MinGW distributions
like https://bugzilla.redhat.com/show_bug.cgi?id=1475237 and
the small gain I would disable these options.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Test various image and formats.
The idea is to decode and encode again an image and
check for differences. ImageMagick is used to create
some test image and compare results.
Wine is used to execute a test helper.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This will make easier to change code that handle images.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
The versions/copyright in version.rc are very outdated.
Updating them automatically at configure time should ensure they are
updated more often.
Looks a bit weird to distribute config.h file however in this
case it contain only version information and the file is
useful to compile under Windows.
This patch is inspired by a work of Christophe Fergeau
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Allows to reuse code. Differences between the two
version information are managed using additional defines
in the top rc files.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
The Connecting and Configuring Displays (CCD) Win32 APIs
provide more control over the desktop display setup. The CCD APIs
move away from using Windows Graphics Device Interface (GDI)
concepts like view name and toward Windows Display Driver Model
(WDDM) concepts like adapter, source, and target identifiers.
More info on the CCD API can be found here:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff539590(v=vs.85).aspx
This patch introduces partial functionality from the CCD API
needed by vdagent. It is needed by vdagent in order to support
multiple monitors and arbitrary resolution on Windows 10.
Based on a patch by Sandy Stutsman <sstutsma@redhat.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Having this file pregenerated is useful if one wants to use it to
generate a package from tarball with:
tar xf vdagent-win-$version.tar.xz mingw-virt-viewer.spec
rpmbuild mingw-virt-viewer.spec
This is more convenient than extracting the whole tarball, and configuring
it in order to generate mingw-virt-viewer.spec
The class calls Impersonate upon begin(), and Revert
upon end() or destruction.
The user is the current user that is logged in.
create mode 100644 vdagent/as_user.cpp
create mode 100644 vdagent/as_user.h
Fix build by default when using mingw (when more compiler are
supported we could do case by case)
Since we are statically building, strip resulting binary (we
also use lto, whole-program but that doesn't seem to change
much..)