debian/0000775000000000000000000000000012571573274007205 5ustar debian/control0000664000000000000000000000555512571573143010615 0ustar Source: libvdpau Section: libs Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian NVIDIA Maintainers Uploaders: Jean-Yves Avenard , Andres Mejia , Russ Allbery , Andreas Beckmann , Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config, libx11-dev, x11proto-dri2-dev (>= 2.2), libxext-dev, Build-Depends-Indep: doxygen-latex, graphviz, ghostscript, Standards-Version: 3.9.4 Homepage: http://cgit.freedesktop.org/~aplattner/libvdpau Vcs-Git: git://anonscm.debian.org/pkg-nvidia/libvdpau.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-nvidia/libvdpau.git Package: libvdpau-dev Multi-Arch: same Architecture: any Section: libdevel Depends: libvdpau1 (= ${binary:Version}), libx11-dev, ${misc:Depends} Suggests: libvdpau-doc Description: Video Decode and Presentation API for Unix (development files) VDPAU (Video Decode and Presentation API for Unix) is an open source library (libvdpau) and API designed by NVIDIA originally for its GeForce 8 series and later GPU hardware, targeted at the X Window System on Unix operating-systems (including Linux, FreeBSD, and Solaris). This VDPAU API allows video programs to offload portions of the video decoding process and video post-processing to the GPU video-hardware. . This package contains the files necessary for development with VDPAU. Package: libvdpau1 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: lib32vdpau1, Conflicts: lib32vdpau1, Suggests: nvidia-vdpau-driver [amd64 i386] | vdpau-driver Description: Video Decode and Presentation API for Unix (libraries) VDPAU (Video Decode and Presentation API for Unix) is an open source library (libvdpau) and API designed by NVIDIA originally for its GeForce 8 series and later GPU hardware, targeted at the X Window System on Unix operating-systems (including Linux, FreeBSD, and Solaris). This VDPAU API allows video programs to offload portions of the video decoding process and video post-processing to the GPU video-hardware. . This package contains the VDPAU wrapper and trace libraries. Package: libvdpau-doc Architecture: all Section: doc Depends: ${misc:Depends} Description: Video Decode and Presentation API for Unix (documentation) VDPAU (Video Decode and Presentation API for Unix) is an open source library (libvdpau) and API designed by NVIDIA originally for its GeForce 8 series and later GPU hardware, targeted at the X Window System on Unix operating-systems (including Linux, FreeBSD, and Solaris). This VDPAU API allows video programs to offload portions of the video decoding process and video post-processing to the GPU video-hardware. . This package contains the VDPAU documentation. debian/libvdpau-doc.lintian-overrides0000664000000000000000000000017612203006115015113 0ustar # doxygen generated files duplicate-files usr/share/doc/libvdpau-doc/html/ftv2*.png usr/share/doc/libvdpau-doc/html/ftv2*.png debian/changelog0000664000000000000000000002166112571573133011057 0ustar libvdpau (0.7-1ubuntu0.1) trusty-security; urgency=medium * SECURITY UPDATE: privilege escalation when used in setuid or setgid applications - debian/patches/CVE-2015-5xxx.patch: use secure_getenv and protect against directory traversal in configure.ac, src/Makefile.am, src/mesa_dri2.c, src/util.h, src/vdpau_wrapper.c, trace/vdpau_trace.cpp. - CVE-2015-5198 - CVE-2015-5199 - CVE-2015-5200 -- Marc Deslauriers Wed, 02 Sep 2015 09:15:07 -0400 libvdpau (0.7-1) unstable; urgency=low * New upstream release. * Add README.source describing the import of a new upstream release. -- Andreas Beckmann Thu, 15 Aug 2013 00:59:45 +0200 libvdpau (0.6-2) unstable; urgency=low * Drop Conflicts/Replaces against obsolete squeeze packages. * libvdpau1: Drop postinst, ancient cleanup code already in squeeze. * Bump Standards-Version to 3.9.4. No changes needed. * Use canonical Vcs-* URLs. * Upload to unstable. -- Andreas Beckmann Mon, 06 May 2013 00:42:22 +0200 libvdpau (0.6-1) experimental; urgency=low * New upstream release. * Drop patches cherry-picked from upstream git: 0001, 0002, 0003. -- Andreas Beckmann Tue, 12 Feb 2013 20:27:10 +0100 libvdpau (0.5-1) experimental; urgency=low * New upstream release. (Closes: #689586) * Drop patches that are now applied upstream: libvdpau_flashplayer.patch, track_dynamic_library_handles_and_free_them_on_exit.patch. * Update my email address and remove DMUA. * Cherry-pick upstream commits: - 0001-Make-use-of-dri2proto_CFLAGS-when-building.patch - 0002-Change-mailing-list-to-vdpau-lists.freedesktop.org.patch - 0003-Fix-leaked-extension-info-on-library-unload.patch (Closes: #592204) * libvdpau1.symbols: Add _vdp_DRI2RemoveExtension, added in above patches. * Change Upstream-Contact to vdpau@lists.freedesktop.org. * Upload to experimental. -- Andreas Beckmann Fri, 25 Jan 2013 21:59:57 +0100 libvdpau (0.4.1-8) unstable; urgency=low * Update my email address and remove DMUA. * Cherry-pick upstream commit 3b43955 from 0.5+git: 0003-Fix-leaked-extension-info-on-library-unload.patch (Closes: #592204) * libvdpau1.symbols: Add _vdp_DRI2RemoveExtension, added in above patch. * Change Upstream-Contact to vdpau@lists.freedesktop.org. -- Andreas Beckmann Sun, 27 Jan 2013 01:49:23 +0100 libvdpau (0.4.1-7) unstable; urgency=low * The last (and only) reverse dependency of lib32vdpau1 was the non-free nvidia-vdpau-driver-ia32 which is now an empty transitional package. * d/{control,lib32vdpau1.*}: Drop lib32vdpau1 package. (Closes: #679524) * d/{control,rules}: Remove support for building the extra 32-bit biarch library on amd64. * libvdpau1: Add Replaces/Conflicts: lib32vdpau1 to ensure the old biarch package gets removed properly. * Update lintian overrides for duplicate files generated by doxygen. -- Andreas Beckmann Thu, 16 Aug 2012 02:05:59 +0200 libvdpau (0.4.1-6) unstable; urgency=low [ Maurizio Avogadro ] * Apply the wise patch supplied by Stephen Warren to fix Adobe Flash insanities. (Closes: #668512) [ Andreas Beckmann ] * debian/copyright: Switch to copyright-format 1.0 and update years. -- Andreas Beckmann Tue, 22 May 2012 23:13:00 +0200 libvdpau (0.4.1-5) unstable; urgency=low * Use debhelper 9 to use hardened compiler flags. -- Andres Mejia Mon, 19 Mar 2012 10:21:23 -0400 libvdpau (0.4.1-4) unstable; urgency=low * Allow dev package to be multiarch installable. * Bump to Standards-Version 3.9.3. -- Andres Mejia Fri, 16 Mar 2012 19:01:46 -0400 libvdpau (0.4.1-3) unstable; urgency=low [ Andres Mejia ] * Update to my @debian.org email. [ Andreas Beckmann ] * Build for multiarch. Patch from Daniel Schaal. (Closes: #631174) * Search the vdpau module in multiple directories, starting with ${ORIGIN}/vdpau and fall back to /usr/lib/vdpau in the end. * Add Conflicts to prevent mixing biarch and multiarch packages (i.e. lib32vdpau1:amd64 and libvdpau1:i386). * Use unversioned Conflicts/Replaces on nvidia-libvdpau* to remove the old transitional packages. * Use binary:Version for relationship between libvdpau1 and libvdpau-dev. * Switch Build-Depends-Indep to doxygen-latex, graphviz, ghostscript. (Closes: #616264) * track_dynamic_library_handles_and_free_them_on_exit.patch: Pick upstream commit 4262513e: "vdpau_wrapper.c: Track dynamic library handles and free them on exit using __attribute__((destructor))". * Switch to debhelper 8. * Switch to dh-autoreconf: add to B-D, use dh --with autoreconf and drop autoreconf_-fi.patch. * Remove debian/libvdpau-get-orig-source, repackaging is no longer necessary with dh-autoreconf. * Build with LDFLAGS="-Wl,--as-needed". * Add myself to Uploaders. -- Andreas Beckmann Thu, 08 Sep 2011 10:32:24 +0200 libvdpau (0.4.1-2) unstable; urgency=high * Provide an upload to unstable to fix build failure. (Closes: #603220) * Set urgency to high so it enters testing ASAP. -- Andres Mejia Fri, 12 Nov 2010 17:14:33 -0500 libvdpau (0.4.1-1) experimental; urgency=low * New upstream release. * Use script to generate latest source. * Add get-orig-source rule that runs libvdpau-get-orig-source script. * Update Vcs-* entries for new location for packaging. * Refresh patches. * Change Build-Depends of ia32-libs to ia32-libs-dev. * Bump Standards-Version to 3.9.1. No other changes needed. * Use proper Depends versioning for a binary-all package depending on a binary-any package. -- Andres Mejia Mon, 20 Sep 2010 13:52:11 -0400 libvdpau (0.4-5) unstable; urgency=low [ Russ Allbery ] * Also version the Conflicts and Replaces for libvdpau-dev so that the nvidia-libvdpau-dev transitional package will work properly. * Add an explicit license for the Debian packaging files. [ Andreas Beckmann ] * Add Depends: libx11-dev to libvdpau-dev because vdpau_x11.h includes X11/Xlib.h. * Tighten the dependency of libvdpau-dev on libvdpau1 to only allow the matching binary:Version or binary NMUs thereof. * Remove dh_make boilerplate code and comments from maintainer scripts. * Unify symbols control files. -- Russ Allbery Sat, 12 Jun 2010 18:33:51 -0700 libvdpau (0.4-4) unstable; urgency=low [ Andreas Beckmann ] * Build lib32vdpau1 [amd64], so we can replace nvidia-libvdpau-ia32. Build rules inspired by lib32z1. (Closes: #572206) * lib32vdpau1: take over postinst script from nvidia-libvdpau-ia32. * Add lib{,32}vdpau1.symbols. * libvdpau-dev: do not ship /usr/lib/vdpau/libvdpau_trace.so, won't be used. * libvdpau1: cleanup /usr/lib/libvdpau_trace.so left over by some old versions of the nvidia-libvdpau* packages. [ Russ Allbery ] * Link libvdpau with libX11 since it uses symbols from that library. * Add myself to Uploaders. * Convert debian/copyright to the DEP-5 format and add the slightly different license used for two of the source files. * Version the Conflicts and Replaces against nvidia-libvdpau1*. * Also remove /usr/lib/libvdpau_nvidia.so, left by some old versions of the nvidia-libvdpau* packages. -- Russ Allbery Sat, 22 May 2010 19:11:37 -0700 libvdpau (0.4-3) unstable; urgency=low * Enable dri2 feature. Requires x11proto-dri2-dev (>= 2.2) and libxext-dev. -- Andres Mejia Thu, 25 Feb 2010 20:08:17 -0500 libvdpau (0.4-2) unstable; urgency=low * Add dependencies for documentation to Build-Depends-Indep. * Define a function in debian/rules that can be used to enable or disable building of the documentation depending on if the necessary dependencies are installed. -- Andres Mejia Wed, 10 Feb 2010 19:53:29 -0500 libvdpau (0.4-1) unstable; urgency=low * New upstream release. * Bump Standards-Version to 3.8.4. * Fix libvdpau-dev dependency on libvdpau1. * Perform autoreconf -fi. * Explicitly enable documentation. * Use texlive-binaries instead of texlive-base-bin for pdftex build dependency. * Fix build error install texlive-binaries, which depends on tex-common. Just Build-Depend on texlive-base for now, until bug #567714 is resolved. -- Andres Mejia Wed, 10 Feb 2010 19:20:49 -0500 libvdpau (0.3-2) unstable; urgency=low [ Andres Mejia ] * Have libvdpau1 suggest a vdpau driver package to install, rather than depend on one. (Closes: #558434) (Closes: #558464) * Remove libvdpau-driver package. * Move libvdpau to main. -- Randall Donald Wed, 02 Dec 2009 14:22:14 -0800 libvdpau (0.3-1) unstable; urgency=low [ Andres Mejia ] * Initial release. (Closes: #549626) -- Randall Donald Wed, 25 Nov 2009 10:30:10 -0800 debian/libvdpau-dev.install0000664000000000000000000000006612203006115013132 0ustar usr/lib/*/libvdpau.so usr/lib/*/pkgconfig usr/include debian/source/0000775000000000000000000000000012203006115010456 5ustar debian/source/format0000664000000000000000000000001412203006115011664 0ustar 3.0 (quilt) debian/compat0000664000000000000000000000000212203006115010354 0ustar 9 debian/patches/0000775000000000000000000000000012571573107010627 5ustar debian/patches/vdpau-module-searchpath.patch0000664000000000000000000000353112203006115016352 0ustar From: Andreas Beckmann Subject: search the vdpau module in multiple directories start searching the vdpau module in ${ORIGIN}/vdpau, then the MODULEDIR and finally fall back to /usr/lib/vdpau Index: b/src/vdpau_wrapper.c =================================================================== --- a/src/vdpau_wrapper.c +++ b/src/vdpau_wrapper.c @@ -98,6 +98,14 @@ return driver_name; } +static char const * _vdpau_module_search_paths[] = { + "${ORIGIN}/vdpau/", + VDPAU_MODULEDIR "/", + "/usr/lib/vdpau/", + "", + NULL +}; + static VdpStatus _vdp_open_driver( Display * display, int screen) @@ -107,6 +115,7 @@ char vdpau_driver_lib[PATH_MAX]; char const * vdpau_trace; char const * func_name; + char const ** module_path; vdpau_driver = getenv("VDPAU_DRIVER"); if (!vdpau_driver) { @@ -118,12 +127,17 @@ } _vdp_driver_dll = NULL; - if (snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT, - VDPAU_MODULEDIR "/", vdpau_driver, ".1") >= - sizeof(vdpau_driver_lib)) { - fprintf(stderr, "Failed to construct driver path: path too long\n"); - } else { - _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL); + + for (module_path = _vdpau_module_search_paths; *module_path; ++module_path) { + if (snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT, + *module_path, vdpau_driver, ".1") >= sizeof(vdpau_driver_lib)) { + fprintf(stderr, "Failed to construct driver path: path too long\n"); + } else { + _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL); + if (_vdp_driver_dll) { + break; + } + } } if (!_vdp_driver_dll) { debian/patches/series0000664000000000000000000000017312571573015012043 0ustar link-with-libx11.patch simplify-dlopen-path-length-error-handling.patch vdpau-module-searchpath.patch CVE-2015-5xxx.patch debian/patches/simplify-dlopen-path-length-error-handling.patch0000664000000000000000000000352712203006115022072 0ustar From: Andreas Beckmann Subject: simplify path overflow error handling "path too long" is not a fatal error, there may be other search paths that don't overflow, so try them as well Index: b/src/vdpau_wrapper.c =================================================================== --- a/src/vdpau_wrapper.c +++ b/src/vdpau_wrapper.c @@ -117,25 +117,23 @@ vdpau_driver = "nvidia"; } + _vdp_driver_dll = NULL; if (snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT, VDPAU_MODULEDIR "/", vdpau_driver, ".1") >= sizeof(vdpau_driver_lib)) { fprintf(stderr, "Failed to construct driver path: path too long\n"); - if (vdpau_driver_dri2) { - XFree(vdpau_driver_dri2); - vdpau_driver_dri2 = NULL; - } - _VDP_ERROR_BREAKPOINT(); - return VDP_STATUS_NO_IMPLEMENTATION; + } else { + _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL); } - _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL); if (!_vdp_driver_dll) { - /* Try again using the old path, which is guaranteed to fit in PATH_MAX - * if the complete path fit above. */ - snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT, - "", vdpau_driver, ""); - _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL); + /* Try again using the old path. */ + if (snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT, + "", vdpau_driver, "") >= sizeof(vdpau_driver_lib)) { + fprintf(stderr, "Failed to construct driver path: path too long\n"); + } else { + _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL); + } } if (vdpau_driver_dri2) { debian/patches/link-with-libx11.patch0000664000000000000000000000112712203006115014633 0ustar Subject: Link libvdpao with libX11 since it uses symbols from it Author: Russ Allbery Forwarded: no libvdpau uses the symbols: _XEatData _XReply _XFlush _XReadPad XFree which are provided by libX11, but wasn't linking with it directly, resulting in warnings during the package build (and possibly errors later with better linkers). --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,7 +18,8 @@ libvdpau_la_LIBADD = \ $(DLOPEN_LIBS) \ - $(XEXT_LIBS) + $(XEXT_LIBS) \ + $(X11_LIBS) libvdpau_la_LDFLAGS = -version-info 1:0:0 -no-undefined debian/patches/CVE-2015-5xxx.patch0000664000000000000000000001736412571573107013577 0ustar Backport of: From d1f9c16b1a8187110e501c9116d21ffee25c0ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Hiram=20Soltren?= Date: Mon, 17 Aug 2015 16:01:44 -0500 Subject: Use secure_getenv(3) to improve security This patch is in response to the following security vulnerabilities (CVEs) reported to NVIDIA against libvdpau: CVE-2015-5198 CVE-2015-5199 CVE-2015-5200 To address these CVEs, this patch: - replaces all uses of getenv(3) with secure_getenv(3); - uses secure_getenv(3) when available, with a fallback option; - protects VDPAU_DRIVER against directory traversal by checking for '/' On platforms where secure_getenv(3) is not available, the C preprocessor will print a warning at compile time. Then, a preprocessor macro will replace secure_getenv(3) with our getenv_wrapper(), which utilizes the check: getuid() == geteuid() && getgid() == getegid() See getuid(2) and getgid(2) for further details. Signed-off-by: Aaron Plattner Reviewed-by: Florian Weimer Index: libvdpau-0.7/configure.ac =================================================================== --- libvdpau-0.7.orig/configure.ac 2015-09-02 09:13:54.329495971 -0400 +++ libvdpau-0.7/configure.ac 2015-09-02 09:13:54.325495924 -0400 @@ -6,6 +6,10 @@ AC_CONFIG_HEADERS(config.h) +# Check for secure_getenv +AC_USE_SYSTEM_EXTENSIONS +AC_CHECK_FUNCS([__secure_getenv secure_getenv]) + # Disable static libraries by default. Use --enable-static if you really want # them. AC_DISABLE_STATIC Index: libvdpau-0.7/src/Makefile.am =================================================================== --- libvdpau-0.7.orig/src/Makefile.am 2015-09-02 09:13:54.329495971 -0400 +++ libvdpau-0.7/src/Makefile.am 2015-09-02 09:13:54.325495924 -0400 @@ -9,6 +9,7 @@ libvdpau_la_SOURCES = \ vdpau_wrapper.c \ + util.h \ $(DRI2_SOURCES) if DRI2 Index: libvdpau-0.7/src/mesa_dri2.c =================================================================== --- libvdpau-0.7.orig/src/mesa_dri2.c 2015-09-02 09:13:54.329495971 -0400 +++ libvdpau-0.7/src/mesa_dri2.c 2015-09-02 09:13:54.325495924 -0400 @@ -1,6 +1,6 @@ /* * Copyright © 2008 Red Hat, Inc. - * Copyright © 2010 NVIDIA Corporation + * Copyright © 2010-2015 NVIDIA Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Soft- @@ -30,15 +30,21 @@ * Authors: * Kristian Høgsberg (krh@redhat.com) * Modified for VDPAU by Aaron Plattner (aplattner@nvidia.com) + * and José Hiram Soltren (jsoltren@nvidia.com) */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #define NEED_REPLIES #include #include #include #include #include "mesa_dri2.h" +#include "util.h" static char dri2ExtensionName[] = DRI2_NAME; static XExtensionInfo *dri2Info; @@ -130,7 +136,7 @@ req->driverType = DRI2DriverVDPAU; #ifdef DRI2DriverPrimeShift { - char *prime = getenv("DRI_PRIME"); + char *prime = secure_getenv("DRI_PRIME"); if (prime) { unsigned int primeid; errno = 0; Index: libvdpau-0.7/src/util.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ libvdpau-0.7/src/util.h 2015-09-02 09:13:54.325495924 -0400 @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015 NVIDIA Corporation + * + * 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +static char * getenv_wrapper(const char *name) +{ + if (getuid() == geteuid() && getgid() == getegid()) { + return getenv(name); + } + else { + return NULL; + } +} + +#ifndef HAVE_SECURE_GETENV +# ifdef HAVE___SECURE_GETENV +# define secure_getenv __secure_getenv +# else +# warning Neither secure_getenv nor __secure_getenv is available. +# define secure_getenv getenv_wrapper +# endif +#endif Index: libvdpau-0.7/src/vdpau_wrapper.c =================================================================== --- libvdpau-0.7.orig/src/vdpau_wrapper.c 2015-09-02 09:13:54.329495971 -0400 +++ libvdpau-0.7/src/vdpau_wrapper.c 2015-09-02 09:13:54.325495924 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008-2009 NVIDIA, Corporation + * Copyright (c) 2008-2015 NVIDIA Corporation * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -35,6 +35,7 @@ #include "mesa_dri2.h" #include #endif +#include "util.h" typedef void SetDllHandle( void * driver_dll_handle @@ -120,7 +121,12 @@ char const * func_name; char const ** module_path; - vdpau_driver = getenv("VDPAU_DRIVER"); + vdpau_driver = secure_getenv("VDPAU_DRIVER"); + if (vdpau_driver) { + if (strchr(vdpau_driver, '/')) { + vdpau_driver = NULL; + } + } if (!vdpau_driver) { vdpau_driver = vdpau_driver_dri2 = _vdp_get_driver_name_from_dri2(display, screen); @@ -166,7 +172,7 @@ _vdp_backend_dll = _vdp_driver_dll; - vdpau_trace = getenv("VDPAU_TRACE"); + vdpau_trace = secure_getenv("VDPAU_TRACE"); if (vdpau_trace && atoi(vdpau_trace)) { SetDllHandle * set_dll_handle; Index: libvdpau-0.7/trace/vdpau_trace.cpp =================================================================== --- libvdpau-0.7.orig/trace/vdpau_trace.cpp 2015-09-02 09:13:54.329495971 -0400 +++ libvdpau-0.7/trace/vdpau_trace.cpp 2015-09-02 09:13:54.325495924 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008-2009 NVIDIA, Corporation + * Copyright (c) 2008-2015 NVIDIA Corporation * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -31,6 +31,8 @@ #include #include +#include "../src/util.h" + #define _VDP_TRACE_ARSIZE(_x_) ((sizeof (_x_)) / (sizeof ((_x_)[0]))) #if DEBUG @@ -4558,13 +4560,13 @@ } else { _vdp_cap_data.level = 0; - char const * vdpau_trace = getenv("VDPAU_TRACE"); + char const * vdpau_trace = secure_getenv("VDPAU_TRACE"); if (vdpau_trace) { _vdp_cap_data.level = atoi(vdpau_trace); } _vdp_cap_data.fp = 0; - char const * vdpau_trace_file = getenv("VDPAU_TRACE_FILE"); + char const * vdpau_trace_file = secure_getenv("VDPAU_TRACE_FILE"); if (vdpau_trace_file && strlen(vdpau_trace_file)) { if (vdpau_trace_file[0] == '&') { int fd = atoi(&vdpau_trace_file[1]); debian/copyright0000664000000000000000000000620612203006115011115 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: VDPAU wrapper and trace libraries Upstream-Contact: Source: http://people.freedesktop.org/~aplattner/vdpau/ Files: * Copyright: © 2008-2010 NVIDIA Corporation © 2008 Red Hat, Inc. License: Expat Files: debian/* Copyright: 2009-2012 Andres Mejia © 2010-2013 Andreas Beckmann 2010 Russ Allbery License: Expat Files: src/mesa_dri2.c src/mesa_dri2.h Copyright: © 2007,2008 Red Hat, Inc. © 2010 NVIDIA Corporation License: other Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Soft- ware"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Soft- ware and that both the above copyright notice(s) and this permission notice appear in supporting documentation. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- MANCE OF THIS SOFTWARE. . Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. License: Expat 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. debian/REAME.source0000664000000000000000000000130512203006115011230 0ustar The upstream repository: git remote add libvdpau git://people.freedesktop.org/~aplattner/libvdpau git fetch --all --prune Importing a new upstream tarball: The tarball contains all the autotools generated files that we don't need in the master branch thanks to dh_autoreconf. VER=0.7 git-import-orig --upstream-vcs-tag libvdpau-$VER libvdpau-$VER.tar.gz Merge the new upstream release: git checkout upstream git merge --ff-only libvdpau-$VER^{commit} git tag -m "Upstream version $VER" upstream/$VER libvdpau-$VER^{commit} git checkout master git merge upstream/$VER Pushing to origin: git push origin libvdpau-$VER tarball pristine-tar tarball/$VER upstream upstream/$VER master debian/watch0000664000000000000000000000036512203006115010213 0ustar version=3 opts=uversionmangle=s/\.(tar.*|tgz|zip|gz|bz2)$//i,dversionmangle=s/[-.+~]?(cvs|svn|git|snapshot|pre|hg)(.*)$//i,pasv \ http://people.freedesktop.org/~aplattner/vdpau/libvdpau-?_?([\d+\.]+|\d+)\.(tar.*|tgz|zip|gz|bz2|) debian uupdate debian/libvdpau-doc.docs0000664000000000000000000000004712203006115012402 0ustar debian/tmp/usr/share/doc/libvdpau/html debian/libvdpau1.install0000664000000000000000000000012212203006115012430 0ustar etc/vdpau_wrapper.cfg usr/lib/*/libvdpau.so.* usr/lib/*/vdpau/libvdpau_trace.so.* debian/gbp.conf0000664000000000000000000000036212203006115010576 0ustar [DEFAULT] upstream-branch = upstream debian-branch = master upstream-tag = upstream/%(version)s debian-tag = debian/%(version)s pristine-tar = True [git-import-orig] upstream-branch = tarball upstream-tag = tarball/%(version)s merge = False debian/libvdpau-doc.doc-base0000664000000000000000000000043712203006115013132 0ustar Document: libvdpau-doc Title: VDPAU Documentation Author: NVIDIA Corporation Abstract: Video Decode and Presentation API for Unix (VDPAU) Documentation. Section: Programming Format: HTML Index: /usr/share/doc/libvdpau-doc/html/index.html Files: /usr/share/doc/libvdpau-doc/html/*.html debian/libvdpau1.symbols0000664000000000000000000000030612203006115012456 0ustar libvdpau.so.1 #PACKAGE# #MINVER# _vdp_DRI2Connect@Base 0.4 _vdp_DRI2QueryExtension@Base 0.4 _vdp_DRI2QueryVersion@Base 0.4 _vdp_DRI2RemoveExtension@Base 0.4.1-8~ vdp_device_create_x11@Base 0.2 debian/rules0000775000000000000000000000212412203006115010235 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) # Used to enable documentation if dependencies are available define cond_enable $(shell if test -x /usr/bin/doxygen && test -x /usr/bin/dot \ && test -x /usr/bin/pdftex; then echo --enable-documentation; \ else echo --disable-documentation; fi ) endef CONFIGURE_OPTIONS ?= $(call cond_enable) \ --enable-dri2 %: dh $@ --with autoreconf binary: binary-indep binary-arch ; override_dh_autoreconf: dh_autoreconf --as-needed override_dh_auto_configure: dh_testdir LDFLAGS="-Wl,--as-needed $$(dpkg-buildflags --get LDFLAGS)" ./configure \ --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ $(CONFIGURE_OPTIONS) override_dh_auto_build: dh_auto_build override_dh_auto_install: dh_auto_install override_dh_installdocs: dh_installdocs -X.md5 # ignore the plugin override_dh_makeshlibs: dh_makeshlibs -Xvdpau/libvdpau_trace.so.1 get-orig-source: $(dir $_)libvdpau-get-orig-source