FreeBSD Bugzilla – Attachment 180202 Details for
Bug 212471
emulators/open-vm-tools: Update to 10.1.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-to-10.1.0
patch (text/plain), 95.05 KB, created by
Enji Cooper
on 2017-02-21 19:48:27 UTC
(
hide
)
Description:
patch-to-10.1.0
Filename:
MIME Type:
Creator:
Enji Cooper
Created:
2017-02-21 19:48:27 UTC
Size:
95.05 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 434550) >+++ Makefile (working copy) >@@ -2,11 +2,10 @@ > # $FreeBSD$ > > PORTNAME= open-vm-tools >-PORTVERSION= ${BUILD_VER} >-PORTREVISION= 17 >-PORTEPOCH= 1 >+PORTVERSION= ${RELEASE_VER} >+PORTEPOCH= 2 > CATEGORIES= emulators >-MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/stable-9.4.x >+MASTER_SITES= https://github.com/vmware/open-vm-tools/files/590760/ > DISTNAME= open-vm-tools-${RELEASE_VER}-${BUILD_VER} > > MAINTAINER= swills@FreeBSD.org >@@ -15,8 +14,8 @@ > LICENSE= LGPL21 > LICENSE_FILE= ${WRKSRC}/COPYING > >-RELEASE_VER= 9.4.0 >-BUILD_VER= 1280544 >+RELEASE_VER= 10.1.0 >+BUILD_VER= 4449150 > > OPTIONS_DEFINE= X11 LIBNOTIFY UNITY FUSE DNET ICU > OPTIONS_DEFAULT= X11 LIBNOTIFY FUSE DNET ICU >@@ -26,11 +25,13 @@ > LIBNOTIFY_DESC= Desktop notification support > UNITY_DESC= liburiparser support > >+# TODO add USE_GITHUB=yes after switching to USES=autoreconf >+ > X11_CONFIGURE_WITH= x gtk2 gtkmm >-X11_LDFLAGS= -L${LOCALBASE}/lib >-X11_USE= xorg=x11,ice,sm,xext,xineramaproto,xinerama,xrandr,xrender,xtst \ >+X11_USE= xorg=x11,ice,sm,xext,xineramaproto,xinerama,xrandr,xrender,xtst,xi \ > gnome=gtk20,gtkmm24 >-X11_USES= fuse >+X11_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ >+ libfreetype.so:print/freetype2 > LIBNOTIFY_LIB_DEPENDS= libnotify.so:devel/libnotify > UNITY_CONFIGURE_ENV= CUSTOM_URIPARSER_CPPFLAGS="-I${LOCALBASE}/include/uriparser" > UNITY_LIB_DEPENDS= liburiparser.so:net/uriparser >@@ -40,16 +41,25 @@ > ICU_CONFIGURE_WITH= icu > ICU_LIB_DEPENDS= libicuuc.so:devel/icu > >-WRKSRC= ${WRKDIR}/open-vm-tools-${RELEASE_VER}-${BUILD_VER} >+WRKSRC= ${WRKDIR}/open-vm-tools-${RELEASE_VER}-${BUILD_VER}/open-vm-tools > GNU_CONFIGURE= yes >-USES= pathfix pkgconfig kmod libtool >-USE_GNOME= glib20 >+# TODO add autoreconf when included files are compatible >+USES= fuse gettext-runtime kmod libtool pathfix pkgconfig >+ >+LIB_DEPENDS= libmspack.so:archivers/libmspack \ >+ libxerces-c.so.3:textproc/xerces-c3 \ >+ libxml-security-c.so:security/apache-xml-security-c >+ >+USE_GNOME= glib20 gdkpixbuf2 > USE_LDCONFIG= yes > CPPFLAGS+= -Wno-deprecated-declarations >+LDFLAGS= -L${LOCALBASE}/lib > > SSP_UNSAFE= kernel module does not support ssp > >-CONFIGURE_ARGS+= --without-procps --sysconfdir=${LOCALBASE}/etc >+CONFIGURE_ARGS+= --disable-grabbitmqproxy --disable-deploypkg \ >+ --disable-vgauth --without-procps \ >+ --sysconfdir=${LOCALBASE}/etc > > CONFLICTS+= vmware-guestd[0-9]* vmware-tools[0-9]* > SUB_FILES= pkg-message >@@ -64,25 +74,25 @@ > CONFLICTS= open-vm-tools-[0-9]* > .endif > >-BROKEN_aarch64= Fails to configure: error: Unknown architecture >+ONLY_FOR_ARCHS= i386 amd64 > >-NOT_FOR_ARCHS= sparc64 >-NOT_FOR_ARCHS_REASON= not yet ported to this architecture >- > .include <bsd.port.pre.mk> > > post-build: > cd ${WRKSRC}/modules && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} > >+# TODO find where ${STAGEDIR}/usr/lib/debug/boot/modules is created and avoid creating it > post-install: > ${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers > ${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/input >+ ${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmblock.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmblock.ko > ${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmmemctl.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmmemctl.ko > ${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmxnet.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmxnet.ko >- ${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmhgfs.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmhgfs.ko >- ${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmblock.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmblock.ko > ${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/vmware/ > ${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/ > ${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/tests/ >+ ${RMDIR} ${STAGEDIR}/usr/lib/debug/boot/modules >+ ${RMDIR} ${STAGEDIR}/usr/lib/debug/boot >+ ${RMDIR} ${STAGEDIR}/usr/lib/debug > > .include <bsd.port.post.mk> >Index: distinfo >=================================================================== >--- distinfo (revision 434550) >+++ distinfo (working copy) >@@ -1,2 +1,3 @@ >-SHA256 (open-vm-tools-9.4.0-1280544.tar.gz) = 5d30652eb0f6dc5e930781029c184837e700be5543b6a7116db4c62a6f3ca399 >-SIZE (open-vm-tools-9.4.0-1280544.tar.gz) = 3659504 >+TIMESTAMP = 1484345963 >+SHA256 (open-vm-tools-10.1.0-4449150.tar.gz) = d579474c9495b504a544dfc2635d291c27488e7e9303ec4fe6b393836dc3b017 >+SIZE (open-vm-tools-10.1.0-4449150.tar.gz) = 5025787 >Index: files/patch-base64rename >=================================================================== >--- files/patch-base64rename (revision 434550) >+++ files/patch-base64rename (nonexistent) >@@ -1,1480 +0,0 @@ >---- lib/include/base64.h.orig 2013-12-27 16:38:14.000000000 +0000 >-+++ lib/include/base64.h 2013-12-27 16:38:30.000000000 +0000 >-@@ -1,46 +0,0 @@ >--/********************************************************* >-- * Copyright (C) 2004 VMware, Inc. All rights reserved. >-- * >-- * This program is free software; you can redistribute it and/or modify it >-- * under the terms of the GNU Lesser General Public License as published >-- * by the Free Software Foundation version 2.1 and no later version. >-- * >-- * This program is distributed in the hope that it will be useful, but >-- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY >-- * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public >-- * License for more details. >-- * >-- * You should have received a copy of the GNU Lesser General Public License >-- * along with this program; if not, write to the Free Software Foundation, Inc., >-- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. >-- * >-- *********************************************************/ >-- >--/* >-- * base64.h -- >-- * >-- * Functions to base64 encode/decode buffers. Implemented in >-- * lib/misc/base64.c. >-- */ >-- >--#ifndef _BASE64_H >--#define _BASE64_H >-- >--Bool Base64_Encode(uint8 const *src, size_t srcLength, >-- char *target, size_t targSize, >-- size_t *dataLength); >--Bool Base64_Decode(char const *src, >-- uint8 *target, size_t targSize, >-- size_t *dataLength); >--Bool Base64_ChunkDecode(char const *src, size_t inSize, >-- uint8 *target, size_t targSize, >-- size_t *dataLength); >--Bool Base64_ValidEncoding(char const *src, size_t srcLength); >--size_t Base64_EncodedLength(uint8 const *src, size_t srcLength); >--size_t Base64_DecodedLength(char const *src, size_t srcLength); >--Bool Base64_EasyEncode(const uint8 *src, size_t srcLength, >-- char **target); >--Bool Base64_EasyDecode(const char *src, >-- uint8 **target, size_t *targSize); >-- >--#endif >---- lib/misc/base64.c.orig 2013-12-27 16:38:22.000000000 +0000 >-+++ lib/misc/base64.c 2013-12-27 16:38:36.000000000 +0000 >-@@ -1,634 +0,0 @@ >--/* >-- * Copyright (c) 1996, 1998 by Internet Software Consortium. >-- * >-- * Permission to use, copy, modify, and distribute this software for any >-- * purpose with or without fee is hereby granted, provided that the above >-- * copyright notice and this permission notice appear in all copies. >-- * >-- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS >-- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES >-- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE >-- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL >-- * 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 PERFORMANCE OF THIS >-- * SOFTWARE. >-- */ >-- >--/* >-- * Portions Copyright (c) 1995 by International Business Machines, Inc. >-- * >-- * International Business Machines, Inc. (hereinafter called IBM) grants >-- * permission under its copyrights to use, copy, modify, and distribute this >-- * Software with or without fee, provided that the above copyright notice and >-- * all paragraphs of this notice appear in all copies, and that the name of IBM >-- * not be used in connection with the marketing of any product incorporating >-- * the Software or modifications thereof, without specific, written prior >-- * permission. >-- * >-- * To the extent it has a right to do so, IBM grants an immunity from suit >-- * under its patents, if any, for the use, sale or manufacture of products to >-- * the extent that such products are used for performing Domain Name System >-- * dynamic updates in TCP/IP networks by means of the Software. No immunity is >-- * granted for any product per se or for any other function of any product. >-- * >-- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, >-- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A >-- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, >-- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING >-- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN >-- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. >-- */ >-- >--#include <sys/types.h> >-- >--#include <ctype.h> >--#include <stdio.h> >--#include <stdlib.h> >--#include <string.h> >--#include "vm_basic_types.h" >--#include "vm_assert.h" >--#include "base64.h" >-- >--static const char Base64[] = >--"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; >--static const char Pad64 = '='; >-- >--// Special markers >--enum { >-- ILLEGAL = -1, EOM = -2, WS = -3 >--}; >-- >--/* >-- * Reverse byte map used for decoding. Except for specials (negative values), contains the index >-- * into Base64[] where given value is found, ie: base64Reverse[Base64[n]] = n, for 0 <= n < 64 >-- * >-- * This static initialization replaces, and should have identical result to, this runtime init: >-- * >-- * for (i = 0; i < 256; ++i) { >-- * base64Reverse[i] = isspace(i) ? WS : ILLEGAL; >-- * } >-- * base64Reverse['\0'] = EOM; >-- * base64Reverse['='] = EOM; >-- * for (i = 0; Base64[i]; ++i) { >-- * base64Reverse[(unsigned)Base64[i]] = (char) i; >-- * } >-- */ >-- >--static const signed char base64Reverse[256] = { >-- EOM, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 00-07 */ >-- ILLEGAL, WS, WS, WS, WS, WS, ILLEGAL, ILLEGAL, /* 08-0F */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 10-17 */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 18-1F */ >-- WS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 20-27 */ >-- ILLEGAL, ILLEGAL, ILLEGAL, 62, ILLEGAL, ILLEGAL, ILLEGAL, 63, /* 28-2F */ >-- 52, 53, 54, 55, 56, 57, 58, 59, /* 30-37 */ >-- 60, 61, ILLEGAL, ILLEGAL, ILLEGAL, EOM, ILLEGAL, ILLEGAL, /* 38-3F */ >-- ILLEGAL, 0, 1, 2, 3, 4, 5, 6, /* 40-47 */ >-- 7, 8, 9, 10, 11, 12, 13, 14, /* 48-4F */ >-- 15, 16, 17, 18, 19, 20, 21, 22, /* 50-57 */ >-- 23, 24, 25, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 58-5F */ >-- ILLEGAL, 26, 27, 28, 29, 30, 31, 32, /* 60-67 */ >-- 33, 34, 35, 36, 37, 38, 39, 40, /* 68-6F */ >-- 41, 42, 43, 44, 45, 46, 47, 48, /* 70-77 */ >-- 49, 50, 51, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 78-7F */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 80-87 */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 88-8F */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 90-97 */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 98-9F */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* A0-A7 */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* A8-AF */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* B0-B7 */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* B8-BF */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* C0-C7 */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* C8-CF */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* D0-D7 */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* D8-DF */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* E0-E7 */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* E8-EF */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* F0-F7 */ >-- ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL }; /* F8-FF */ >-- >--/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt) >-- The following encoding technique is taken from RFC 1521 by Borenstein >-- and Freed. It is reproduced here in a slightly edited form for >-- convenience. >-- >-- A 65-character subset of US-ASCII is used, enabling 6 bits to be >-- represented per printable character. (The extra 65th character, "=", >-- is used to signify a special processing function.) >-- >-- The encoding process represents 24-bit groups of input bits as output >-- strings of 4 encoded characters. Proceeding from left to right, a >-- 24-bit input group is formed by concatenating 3 8-bit input groups. >-- These 24 bits are then treated as 4 concatenated 6-bit groups, each >-- of which is translated into a single digit in the base64 alphabet. >-- >-- Each 6-bit group is used as an index into an array of 64 printable >-- characters. The character referenced by the index is placed in the >-- output string. >-- >-- Table 1: The Base64 Alphabet >-- >-- Value Encoding Value Encoding Value Encoding Value Encoding >-- 0 A 17 R 34 i 51 z >-- 1 B 18 S 35 j 52 0 >-- 2 C 19 T 36 k 53 1 >-- 3 D 20 U 37 l 54 2 >-- 4 E 21 V 38 m 55 3 >-- 5 F 22 W 39 n 56 4 >-- 6 G 23 X 40 o 57 5 >-- 7 H 24 Y 41 p 58 6 >-- 8 I 25 Z 42 q 59 7 >-- 9 J 26 a 43 r 60 8 >-- 10 K 27 b 44 s 61 9 >-- 11 L 28 c 45 t 62 + >-- 12 M 29 d 46 u 63 / >-- 13 N 30 e 47 v >-- 14 O 31 f 48 w (pad) = >-- 15 P 32 g 49 x >-- 16 Q 33 h 50 y >-- >-- Special processing is performed if fewer than 24 bits are available >-- at the end of the data being encoded. A full encoding quantum is >-- always completed at the end of a quantity. When fewer than 24 input >-- bits are available in an input group, zero bits are added (on the >-- right) to form an integral number of 6-bit groups. Padding at the >-- end of the data is performed using the '=' character. >-- >-- Since all base64 input is an integral number of octets, only the >-- ------------------------------------------------- >-- following cases can arise: >-- >-- (1) the final quantum of encoding input is an integral >-- multiple of 24 bits; here, the final unit of encoded >-- output will be an integral multiple of 4 characters >-- with no "=" padding, >-- (2) the final quantum of encoding input is exactly 8 bits; >-- here, the final unit of encoded output will be two >-- characters followed by two "=" padding characters, or >-- (3) the final quantum of encoding input is exactly 16 bits; >-- here, the final unit of encoded output will be three >-- characters followed by one "=" padding character. >--*/ >-- >--/* >-- *---------------------------------------------------------------------------- >-- * >-- * Base64_Encode -- >-- * >-- * Base64-encodes srcLength bytes from src and stores result in dst. >-- * >-- * Results: >-- * TRUE if the destination held enough space for the decoded result, >-- * FALSE otherwise. >-- * >-- * Side effects: >-- * Updates dstSize with the number of encoded bytes (excluding the >-- * terminating '\0'). >-- * >-- *---------------------------------------------------------------------------- >-- */ >-- >--Bool >--Base64_Encode(uint8 const *src, // IN: >-- size_t srcSize, // IN: >-- char *dst, // OUT: >-- size_t dstMax, // IN: max result length, including NUL byte >-- size_t *dstSize) // OUT: result length, may be NULL >--{ >-- char *dst0 = dst; >-- >-- ASSERT(src || srcSize == 0); >-- ASSERT(dst); >-- >-- if (4 * ((srcSize + 2) / 3) >= dstMax) { >-- if (dstSize) { >-- *dstSize = 0; >-- } >-- >-- return FALSE; >-- } >-- >-- while (LIKELY(srcSize > 2)) { >-- dst[0] = Base64[src[0] >> 2]; >-- dst[1] = Base64[(src[0] & 0x03) << 4 | src[1] >> 4]; >-- dst[2] = Base64[(src[1] & 0x0f) << 2 | src[2] >> 6]; >-- dst[3] = Base64[src[2] & 0x3f]; >-- >-- srcSize -= 3; >-- src += 3; >-- dst += 4; >-- } >-- >-- /* Now we worry about padding. */ >-- if (LIKELY(srcSize--)) { >-- uint8 src1 = srcSize ? src[1] : 0; >-- >-- dst[0] = Base64[src[0] >> 2]; >-- dst[1] = Base64[(src[0] & 0x03) << 4 | src1 >> 4]; >-- dst[2] = srcSize ? Base64[(src1 & 0x0f) << 2] : Pad64; >-- dst[3] = Pad64; >-- dst += 4; >-- } >-- >-- dst[0] = '\0'; /* Returned value doesn't count \0. */ >-- if (dstSize) { >-- *dstSize = dst - dst0; >-- } >-- >-- return TRUE; >--} >-- >-- >--#ifdef __I_WANT_TO_TEST_THIS__ >--main() >--{ >-- struct { >-- char *in, *out; >-- } tests[] = { >-- {"", ""}, >-- {"MQ==", "1"}, >-- {"MTI=", "12"}, >-- {"MTIz", "123"}, >-- {"MTIzNA==", "1234"}, >-- {"SGVsbG8gRWR3YXJkIGFuZCBKb2huIQ==","Hello Edward and John!"}, >-- {NULL, NULL} >-- }, *test; >-- >-- size_t bufMax; >-- if (1) { >-- for (bufMax = 0; bufMax < 7; ++bufMax) { >-- char buf[999]; >-- size_t bufSize; >-- >-- if (bufMax == 6) { >-- bufMax = sizeof buf; >-- } >-- >-- printf("\nBuffer size %ld:\n", bufMax); >-- >-- test = tests; >-- for (; test->in; ++test) { >-- Bool r; >-- >-- r = Base64_Decode(test->in, buf, bufMax, &bufSize); >-- >-- if ((bufMax > strlen(test->out)) && (bufSize < strlen(test->out))) { >-- printf("Decoding of %s failed. Decoded size %ld < expected %ld\n", >-- test->in, bufSize, strlen(test->out)); >-- } >-- if (memcmp(test->out, buf, bufSize) != 0) { >-- printf("Decoding of %s failed. Got %s (%ld), not %s\n", >-- test->in, buf, bufSize, test->out); >-- } else { >-- printf("Good: %s -> %s (%ld)\n", test->in, buf, bufSize); >-- } >-- >-- r = Base64_Encode(test->out, strlen(test->out), >-- buf, bufMax, &bufSize); >-- buf[bufMax] = 0; >-- >-- if (bufMax <= strlen(test->in) && r == 0) { >-- printf("Good: %s. Failed for bufMax %ld (required %ld)\n", test->out, bufMax, strlen(test->in)); >-- } else { >-- if (!r || bufSize != strlen(test->in) || >-- strncmp(test->in, buf, bufSize) != 0) { >-- printf("Encoding of %s failed. r = %d. Got %s (%ld), not %s\n", >-- test->out, r, buf, bufSize, test->in); >-- } else { >-- printf("Good: %s -> %s (%ld)\n", test->out, buf, bufSize); >-- } >-- } >-- } >-- } >-- } >-- >-- for (bufMax = 0; bufMax < 100000; ++bufMax) { >-- char random_in[8000]; >-- char random_out[16000]; >-- size_t bufSize; >-- >-- Bool r = Base64_Encode(random_in, sizeof random_in, >-- random_out, sizeof random_out, &bufSize); >-- >-- if (!r) { >-- printf("Encoding failed.\n"); >-- } >-- } >--} >--#endif >-- >-- >--/* >-- *---------------------------------------------------------------------------- >-- * >-- * Base64_Decode -- >-- * >-- * Skips all whitespace anywhere. Converts characters, four at >-- * a time, starting at (or after) src from base - 64 numbers into three >-- * 8 bit bytes in the target area. Returns the number of data bytes >-- * stored at the target in the provided out parameter. >-- * >-- * Results: >-- * TRUE on success, FALSE on failure. >-- * >-- * Side effects: >-- * None. >-- * >-- *---------------------------------------------------------------------------- >-- */ >-- >--Bool >--Base64_Decode(char const *in, // IN: >-- uint8 *out, // OUT: >-- size_t outSize, // IN: >-- size_t *dataLength) // OUT: >--{ >-- return Base64_ChunkDecode(in, -1, out, outSize, dataLength); >--} >-- >-- >--/* >-- *---------------------------------------------------------------------------- >-- * >-- * Base64_ChunkDecode -- >-- * >-- * Skips all whitespace anywhere. Converts characters, four at >-- * a time, starting at (or after) src from base - 64 numbers into three >-- * 8 bit bytes in the target area. Conversion stops after inSize (which >-- * must be a multiple of 4) characters, or an EOM marker. Returns the >-- * number of data bytes stored at the target in the provided out parameter. >-- * >-- * Results: >-- * TRUE on success, FALSE on failure. >-- * >-- * Side effects: >-- * None. >-- * >-- *---------------------------------------------------------------------------- >-- */ >-- >--Bool >--Base64_ChunkDecode(char const *in, // IN: >-- size_t inSize, // IN: >-- uint8 *out, // OUT: >-- size_t outSize, // IN: >-- size_t *dataLength) // OUT: >--{ >-- uint32 b = 0; >-- int n = 0; >-- uintptr_t i = 0; >-- size_t inputIndex = 0; >-- >-- ASSERT(in); >-- ASSERT(out || outSize == 0); >-- ASSERT(dataLength); >-- ASSERT((inSize == -1) || (inSize % 4) == 0); >-- *dataLength = 0; >-- >-- i = 0; >-- for (;inputIndex < inSize;) { >-- int p = base64Reverse[(unsigned char)in[inputIndex]]; >-- >-- if (UNLIKELY(p < 0)) { >-- switch (p) { >-- case WS: >-- inputIndex++; >-- break; >-- case EOM: >-- *dataLength = i; >-- return TRUE; >-- case ILLEGAL: >-- default: >-- return FALSE; >-- } >-- } else { >-- inputIndex++; >-- if (UNLIKELY(i >= outSize)) { >-- return FALSE; >-- } >-- b = (b << 6) | p; >-- n += 6; >-- if (LIKELY(n >= 8)) { >-- n -= 8; >-- out[i++] = b >> n; >-- } >-- } >-- } >-- *dataLength = i; >-- return TRUE; >--} >-- >-- >--/* >-- *---------------------------------------------------------------------------- >-- * >-- * Base64_ValidEncoding -- >-- * >-- * Returns TRUE if the specified input buffer is valid Base64 input. >-- * >-- * Results: >-- * TRUE or FALSE. >-- * >-- * Side effects: >-- * None. >-- * >-- *---------------------------------------------------------------------------- >-- */ >-- >--Bool >--Base64_ValidEncoding(char const *src, // IN: >-- size_t srcLength) // IN: >--{ >-- size_t i; >-- >-- ASSERT(src); >-- for (i = 0; i < srcLength; i++) { >-- uint8 c = src[i]; /* MSVC CRT will die on negative arguments to is* */ >-- >-- if (!isalpha(c) && !isdigit(c) && >-- c != '+' && c != '=' && c != '/') { >-- return FALSE; >-- } >-- } >-- >-- return TRUE; >--} >-- >-- >--/* >-- *---------------------------------------------------------------------------- >-- * >-- * Base64_EncodedLength -- >-- * >-- * Given a binary buffer, how many bytes would it take to encode it. >-- * >-- * Results: >-- * Number of bytes needed to encode, including terminating NUL byte. >-- * >-- * Side effects: >-- * None. >-- * >-- *---------------------------------------------------------------------------- >-- */ >-- >--size_t >--Base64_EncodedLength(uint8 const *src, // IN: >-- size_t srcLength) // IN: >--{ >-- return ((srcLength + 2) / 3 * 4) + 1; >--} >-- >-- >--/* >-- *---------------------------------------------------------------------------- >-- * >-- * Base64_DecodedLength -- >-- * >-- * Given a base64 encoded string, how many bytes do we need to decode it. >-- * Assumes no whitespace. This is not necessarily the length of the >-- * decoded data (Base64_Decode requires a few extra bytes... don't blame >-- * me, I didn't write it). >-- * >-- * Results: >-- * Number of bytes needed to decode input. >-- * >-- * Side effects: >-- * None. >-- * >-- *---------------------------------------------------------------------------- >-- */ >-- >--size_t >--Base64_DecodedLength(char const *src, // IN: >-- size_t srcLength) // IN: >--{ >-- size_t length; >-- >-- ASSERT(src); >-- >-- length = srcLength / 4 * 3; >-- // PR 303173 - do the following check to avoid a negative value returned >-- // from this function. Note: length can only be in a multiple of 3 >-- if (length > 2) { >-- if (src[srcLength-1] == '=') { >-- length--; >-- } >-- if (src[srcLength-2] == '=') { >-- length--; >-- } >-- } >-- return length; >--} >-- >-- >--/* >-- *----------------------------------------------------------------------------- >-- * >-- * Base64_EasyEncode -- >-- * >-- * Base64-encode 'data' into a NUL-terminated string. >-- * >-- * Results: >-- * On success: TRUE. '*target' is set to an allocated string, that the >-- * caller must eventually free(). >-- * On failure: FALSE. '*target' is set to NULL. >-- * >-- * Side effects: >-- * None. >-- * >-- *----------------------------------------------------------------------------- >-- */ >-- >--Bool >--Base64_EasyEncode(const uint8 *src, // IN: data to encode >-- size_t srcLength, // IN: data size >-- char **target) // OUT: encoded string >--{ >-- Bool succeeded = FALSE; >-- size_t size; >-- >-- ASSERT(src); >-- ASSERT(target); >-- >-- size = Base64_EncodedLength(src, srcLength); >-- >-- *target = (char *) malloc(size); >-- >-- if (!*target) { >-- goto exit; >-- } >-- >-- if (!Base64_Encode(src, srcLength, *target, size, NULL)) { >-- goto exit; >-- } >-- >-- succeeded = TRUE; >-- >--exit: >-- if (!succeeded) { >-- free(*target); >-- *target = NULL; >-- } >-- >-- return succeeded; >--} >-- >-- >--/* >-- *----------------------------------------------------------------------------- >-- * >-- * Base64_EasyDecode -- >-- * >-- * Base64-decode 'src' into a buffer. >-- * >-- * Results: >-- * TRUE on success, FALSE otherwise, plus the decoded data on success. >-- * Caller must free 'target' with free(). >-- * >-- * Side effects: >-- * None. >-- * >-- *----------------------------------------------------------------------------- >-- */ >-- >--Bool >--Base64_EasyDecode(const char *src, // IN: data to decode >-- uint8 **target, // OUT: decoded data >-- size_t *targSize) // OUT: data size >--{ >-- Bool succeeded = FALSE; >-- size_t theDataSize; >-- uint8 *theData; >-- >-- ASSERT(src); >-- ASSERT(target); >-- ASSERT(targSize); >-- >-- theDataSize = Base64_DecodedLength(src, strlen(src)); >-- >-- theData = (uint8 *) malloc(theDataSize); >-- >-- if (!theData) { >-- goto exit; >-- } >-- >-- if (!Base64_Decode(src, theData, theDataSize, &theDataSize)) { >-- free(theData); >-- goto exit; >-- } >-- >-- *target = theData; >-- *targSize = theDataSize; >-- >-- succeeded = TRUE; >-- >--exit: >-- if (!succeeded) { >-- *target = NULL; >-- *targSize = 0; >-- } >-- >-- return succeeded; >--} >---- lib/include/ovmbase64.h.orig 2013-12-27 16:39:12.000000000 +0000 >-+++ lib/include/ovmbase64.h 2013-12-27 16:39:46.000000000 +0000 >-@@ -0,0 +1,46 @@ >-+/********************************************************* >-+ * Copyright (C) 2004 VMware, Inc. All rights reserved. >-+ * >-+ * This program is free software; you can redistribute it and/or modify it >-+ * under the terms of the GNU Lesser General Public License as published >-+ * by the Free Software Foundation version 2.1 and no later version. >-+ * >-+ * This program is distributed in the hope that it will be useful, but >-+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY >-+ * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public >-+ * License for more details. >-+ * >-+ * You should have received a copy of the GNU Lesser General Public License >-+ * along with this program; if not, write to the Free Software Foundation, Inc., >-+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. >-+ * >-+ *********************************************************/ >-+ >-+/* >-+ * base64.h -- >-+ * >-+ * Functions to base64 encode/decode buffers. Implemented in >-+ * lib/misc/base64.c. >-+ */ >-+ >-+#ifndef _BASE64_H >-+#define _BASE64_H >-+ >-+Bool Base64_Encode(uint8 const *src, size_t srcLength, >-+ char *target, size_t targSize, >-+ size_t *dataLength); >-+Bool Base64_Decode(char const *src, >-+ uint8 *target, size_t targSize, >-+ size_t *dataLength); >-+Bool Base64_ChunkDecode(char const *src, size_t inSize, >-+ uint8 *target, size_t targSize, >-+ size_t *dataLength); >-+Bool Base64_ValidEncoding(char const *src, size_t srcLength); >-+size_t Base64_EncodedLength(uint8 const *src, size_t srcLength); >-+size_t Base64_DecodedLength(char const *src, size_t srcLength); >-+Bool Base64_EasyEncode(const uint8 *src, size_t srcLength, >-+ char **target); >-+Bool Base64_EasyDecode(const char *src, >-+ uint8 **target, size_t *targSize); >-+ >-+#endif >---- lib/misc/ovmbase64.c.orig 2013-12-27 16:39:33.000000000 +0000 >-+++ lib/misc/ovmbase64.c 2013-12-27 16:39:56.000000000 +0000 >-@@ -0,0 +1,634 @@ >-+/* >-+ * Copyright (c) 1996, 1998 by Internet Software Consortium. >-+ * >-+ * Permission to use, copy, modify, and distribute this software for any >-+ * purpose with or without fee is hereby granted, provided that the above >-+ * copyright notice and this permission notice appear in all copies. >-+ * >-+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS >-+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES >-+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE >-+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL >-+ * 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 PERFORMANCE OF THIS >-+ * SOFTWARE. >-+ */ >-+ >-+/* >-+ * Portions Copyright (c) 1995 by International Business Machines, Inc. >-+ * >-+ * International Business Machines, Inc. (hereinafter called IBM) grants >-+ * permission under its copyrights to use, copy, modify, and distribute this >-+ * Software with or without fee, provided that the above copyright notice and >-+ * all paragraphs of this notice appear in all copies, and that the name of IBM >-+ * not be used in connection with the marketing of any product incorporating >-+ * the Software or modifications thereof, without specific, written prior >-+ * permission. >-+ * >-+ * To the extent it has a right to do so, IBM grants an immunity from suit >-+ * under its patents, if any, for the use, sale or manufacture of products to >-+ * the extent that such products are used for performing Domain Name System >-+ * dynamic updates in TCP/IP networks by means of the Software. No immunity is >-+ * granted for any product per se or for any other function of any product. >-+ * >-+ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, >-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A >-+ * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, >-+ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING >-+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN >-+ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. >-+ */ >-+ >-+#include <sys/types.h> >-+ >-+#include <ctype.h> >-+#include <stdio.h> >-+#include <stdlib.h> >-+#include <string.h> >-+#include "vm_basic_types.h" >-+#include "vm_assert.h" >-+#include "base64.h" >-+ >-+static const char Base64[] = >-+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; >-+static const char Pad64 = '='; >-+ >-+// Special markers >-+enum { >-+ ILLEGAL = -1, EOM = -2, WS = -3 >-+}; >-+ >-+/* >-+ * Reverse byte map used for decoding. Except for specials (negative values), contains the index >-+ * into Base64[] where given value is found, ie: base64Reverse[Base64[n]] = n, for 0 <= n < 64 >-+ * >-+ * This static initialization replaces, and should have identical result to, this runtime init: >-+ * >-+ * for (i = 0; i < 256; ++i) { >-+ * base64Reverse[i] = isspace(i) ? WS : ILLEGAL; >-+ * } >-+ * base64Reverse['\0'] = EOM; >-+ * base64Reverse['='] = EOM; >-+ * for (i = 0; Base64[i]; ++i) { >-+ * base64Reverse[(unsigned)Base64[i]] = (char) i; >-+ * } >-+ */ >-+ >-+static const signed char base64Reverse[256] = { >-+ EOM, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 00-07 */ >-+ ILLEGAL, WS, WS, WS, WS, WS, ILLEGAL, ILLEGAL, /* 08-0F */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 10-17 */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 18-1F */ >-+ WS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 20-27 */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, 62, ILLEGAL, ILLEGAL, ILLEGAL, 63, /* 28-2F */ >-+ 52, 53, 54, 55, 56, 57, 58, 59, /* 30-37 */ >-+ 60, 61, ILLEGAL, ILLEGAL, ILLEGAL, EOM, ILLEGAL, ILLEGAL, /* 38-3F */ >-+ ILLEGAL, 0, 1, 2, 3, 4, 5, 6, /* 40-47 */ >-+ 7, 8, 9, 10, 11, 12, 13, 14, /* 48-4F */ >-+ 15, 16, 17, 18, 19, 20, 21, 22, /* 50-57 */ >-+ 23, 24, 25, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 58-5F */ >-+ ILLEGAL, 26, 27, 28, 29, 30, 31, 32, /* 60-67 */ >-+ 33, 34, 35, 36, 37, 38, 39, 40, /* 68-6F */ >-+ 41, 42, 43, 44, 45, 46, 47, 48, /* 70-77 */ >-+ 49, 50, 51, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 78-7F */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 80-87 */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 88-8F */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 90-97 */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* 98-9F */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* A0-A7 */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* A8-AF */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* B0-B7 */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* B8-BF */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* C0-C7 */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* C8-CF */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* D0-D7 */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* D8-DF */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* E0-E7 */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* E8-EF */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, /* F0-F7 */ >-+ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL }; /* F8-FF */ >-+ >-+/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt) >-+ The following encoding technique is taken from RFC 1521 by Borenstein >-+ and Freed. It is reproduced here in a slightly edited form for >-+ convenience. >-+ >-+ A 65-character subset of US-ASCII is used, enabling 6 bits to be >-+ represented per printable character. (The extra 65th character, "=", >-+ is used to signify a special processing function.) >-+ >-+ The encoding process represents 24-bit groups of input bits as output >-+ strings of 4 encoded characters. Proceeding from left to right, a >-+ 24-bit input group is formed by concatenating 3 8-bit input groups. >-+ These 24 bits are then treated as 4 concatenated 6-bit groups, each >-+ of which is translated into a single digit in the base64 alphabet. >-+ >-+ Each 6-bit group is used as an index into an array of 64 printable >-+ characters. The character referenced by the index is placed in the >-+ output string. >-+ >-+ Table 1: The Base64 Alphabet >-+ >-+ Value Encoding Value Encoding Value Encoding Value Encoding >-+ 0 A 17 R 34 i 51 z >-+ 1 B 18 S 35 j 52 0 >-+ 2 C 19 T 36 k 53 1 >-+ 3 D 20 U 37 l 54 2 >-+ 4 E 21 V 38 m 55 3 >-+ 5 F 22 W 39 n 56 4 >-+ 6 G 23 X 40 o 57 5 >-+ 7 H 24 Y 41 p 58 6 >-+ 8 I 25 Z 42 q 59 7 >-+ 9 J 26 a 43 r 60 8 >-+ 10 K 27 b 44 s 61 9 >-+ 11 L 28 c 45 t 62 + >-+ 12 M 29 d 46 u 63 / >-+ 13 N 30 e 47 v >-+ 14 O 31 f 48 w (pad) = >-+ 15 P 32 g 49 x >-+ 16 Q 33 h 50 y >-+ >-+ Special processing is performed if fewer than 24 bits are available >-+ at the end of the data being encoded. A full encoding quantum is >-+ always completed at the end of a quantity. When fewer than 24 input >-+ bits are available in an input group, zero bits are added (on the >-+ right) to form an integral number of 6-bit groups. Padding at the >-+ end of the data is performed using the '=' character. >-+ >-+ Since all base64 input is an integral number of octets, only the >-+ ------------------------------------------------- >-+ following cases can arise: >-+ >-+ (1) the final quantum of encoding input is an integral >-+ multiple of 24 bits; here, the final unit of encoded >-+ output will be an integral multiple of 4 characters >-+ with no "=" padding, >-+ (2) the final quantum of encoding input is exactly 8 bits; >-+ here, the final unit of encoded output will be two >-+ characters followed by two "=" padding characters, or >-+ (3) the final quantum of encoding input is exactly 16 bits; >-+ here, the final unit of encoded output will be three >-+ characters followed by one "=" padding character. >-+*/ >-+ >-+/* >-+ *---------------------------------------------------------------------------- >-+ * >-+ * Base64_Encode -- >-+ * >-+ * Base64-encodes srcLength bytes from src and stores result in dst. >-+ * >-+ * Results: >-+ * TRUE if the destination held enough space for the decoded result, >-+ * FALSE otherwise. >-+ * >-+ * Side effects: >-+ * Updates dstSize with the number of encoded bytes (excluding the >-+ * terminating '\0'). >-+ * >-+ *---------------------------------------------------------------------------- >-+ */ >-+ >-+Bool >-+Base64_Encode(uint8 const *src, // IN: >-+ size_t srcSize, // IN: >-+ char *dst, // OUT: >-+ size_t dstMax, // IN: max result length, including NUL byte >-+ size_t *dstSize) // OUT: result length, may be NULL >-+{ >-+ char *dst0 = dst; >-+ >-+ ASSERT(src || srcSize == 0); >-+ ASSERT(dst); >-+ >-+ if (4 * ((srcSize + 2) / 3) >= dstMax) { >-+ if (dstSize) { >-+ *dstSize = 0; >-+ } >-+ >-+ return FALSE; >-+ } >-+ >-+ while (LIKELY(srcSize > 2)) { >-+ dst[0] = Base64[src[0] >> 2]; >-+ dst[1] = Base64[(src[0] & 0x03) << 4 | src[1] >> 4]; >-+ dst[2] = Base64[(src[1] & 0x0f) << 2 | src[2] >> 6]; >-+ dst[3] = Base64[src[2] & 0x3f]; >-+ >-+ srcSize -= 3; >-+ src += 3; >-+ dst += 4; >-+ } >-+ >-+ /* Now we worry about padding. */ >-+ if (LIKELY(srcSize--)) { >-+ uint8 src1 = srcSize ? src[1] : 0; >-+ >-+ dst[0] = Base64[src[0] >> 2]; >-+ dst[1] = Base64[(src[0] & 0x03) << 4 | src1 >> 4]; >-+ dst[2] = srcSize ? Base64[(src1 & 0x0f) << 2] : Pad64; >-+ dst[3] = Pad64; >-+ dst += 4; >-+ } >-+ >-+ dst[0] = '\0'; /* Returned value doesn't count \0. */ >-+ if (dstSize) { >-+ *dstSize = dst - dst0; >-+ } >-+ >-+ return TRUE; >-+} >-+ >-+ >-+#ifdef __I_WANT_TO_TEST_THIS__ >-+main() >-+{ >-+ struct { >-+ char *in, *out; >-+ } tests[] = { >-+ {"", ""}, >-+ {"MQ==", "1"}, >-+ {"MTI=", "12"}, >-+ {"MTIz", "123"}, >-+ {"MTIzNA==", "1234"}, >-+ {"SGVsbG8gRWR3YXJkIGFuZCBKb2huIQ==","Hello Edward and John!"}, >-+ {NULL, NULL} >-+ }, *test; >-+ >-+ size_t bufMax; >-+ if (1) { >-+ for (bufMax = 0; bufMax < 7; ++bufMax) { >-+ char buf[999]; >-+ size_t bufSize; >-+ >-+ if (bufMax == 6) { >-+ bufMax = sizeof buf; >-+ } >-+ >-+ printf("\nBuffer size %ld:\n", bufMax); >-+ >-+ test = tests; >-+ for (; test->in; ++test) { >-+ Bool r; >-+ >-+ r = Base64_Decode(test->in, buf, bufMax, &bufSize); >-+ >-+ if ((bufMax > strlen(test->out)) && (bufSize < strlen(test->out))) { >-+ printf("Decoding of %s failed. Decoded size %ld < expected %ld\n", >-+ test->in, bufSize, strlen(test->out)); >-+ } >-+ if (memcmp(test->out, buf, bufSize) != 0) { >-+ printf("Decoding of %s failed. Got %s (%ld), not %s\n", >-+ test->in, buf, bufSize, test->out); >-+ } else { >-+ printf("Good: %s -> %s (%ld)\n", test->in, buf, bufSize); >-+ } >-+ >-+ r = Base64_Encode(test->out, strlen(test->out), >-+ buf, bufMax, &bufSize); >-+ buf[bufMax] = 0; >-+ >-+ if (bufMax <= strlen(test->in) && r == 0) { >-+ printf("Good: %s. Failed for bufMax %ld (required %ld)\n", test->out, bufMax, strlen(test->in)); >-+ } else { >-+ if (!r || bufSize != strlen(test->in) || >-+ strncmp(test->in, buf, bufSize) != 0) { >-+ printf("Encoding of %s failed. r = %d. Got %s (%ld), not %s\n", >-+ test->out, r, buf, bufSize, test->in); >-+ } else { >-+ printf("Good: %s -> %s (%ld)\n", test->out, buf, bufSize); >-+ } >-+ } >-+ } >-+ } >-+ } >-+ >-+ for (bufMax = 0; bufMax < 100000; ++bufMax) { >-+ char random_in[8000]; >-+ char random_out[16000]; >-+ size_t bufSize; >-+ >-+ Bool r = Base64_Encode(random_in, sizeof random_in, >-+ random_out, sizeof random_out, &bufSize); >-+ >-+ if (!r) { >-+ printf("Encoding failed.\n"); >-+ } >-+ } >-+} >-+#endif >-+ >-+ >-+/* >-+ *---------------------------------------------------------------------------- >-+ * >-+ * Base64_Decode -- >-+ * >-+ * Skips all whitespace anywhere. Converts characters, four at >-+ * a time, starting at (or after) src from base - 64 numbers into three >-+ * 8 bit bytes in the target area. Returns the number of data bytes >-+ * stored at the target in the provided out parameter. >-+ * >-+ * Results: >-+ * TRUE on success, FALSE on failure. >-+ * >-+ * Side effects: >-+ * None. >-+ * >-+ *---------------------------------------------------------------------------- >-+ */ >-+ >-+Bool >-+Base64_Decode(char const *in, // IN: >-+ uint8 *out, // OUT: >-+ size_t outSize, // IN: >-+ size_t *dataLength) // OUT: >-+{ >-+ return Base64_ChunkDecode(in, -1, out, outSize, dataLength); >-+} >-+ >-+ >-+/* >-+ *---------------------------------------------------------------------------- >-+ * >-+ * Base64_ChunkDecode -- >-+ * >-+ * Skips all whitespace anywhere. Converts characters, four at >-+ * a time, starting at (or after) src from base - 64 numbers into three >-+ * 8 bit bytes in the target area. Conversion stops after inSize (which >-+ * must be a multiple of 4) characters, or an EOM marker. Returns the >-+ * number of data bytes stored at the target in the provided out parameter. >-+ * >-+ * Results: >-+ * TRUE on success, FALSE on failure. >-+ * >-+ * Side effects: >-+ * None. >-+ * >-+ *---------------------------------------------------------------------------- >-+ */ >-+ >-+Bool >-+Base64_ChunkDecode(char const *in, // IN: >-+ size_t inSize, // IN: >-+ uint8 *out, // OUT: >-+ size_t outSize, // IN: >-+ size_t *dataLength) // OUT: >-+{ >-+ uint32 b = 0; >-+ int n = 0; >-+ uintptr_t i = 0; >-+ size_t inputIndex = 0; >-+ >-+ ASSERT(in); >-+ ASSERT(out || outSize == 0); >-+ ASSERT(dataLength); >-+ ASSERT((inSize == -1) || (inSize % 4) == 0); >-+ *dataLength = 0; >-+ >-+ i = 0; >-+ for (;inputIndex < inSize;) { >-+ int p = base64Reverse[(unsigned char)in[inputIndex]]; >-+ >-+ if (UNLIKELY(p < 0)) { >-+ switch (p) { >-+ case WS: >-+ inputIndex++; >-+ break; >-+ case EOM: >-+ *dataLength = i; >-+ return TRUE; >-+ case ILLEGAL: >-+ default: >-+ return FALSE; >-+ } >-+ } else { >-+ inputIndex++; >-+ if (UNLIKELY(i >= outSize)) { >-+ return FALSE; >-+ } >-+ b = (b << 6) | p; >-+ n += 6; >-+ if (LIKELY(n >= 8)) { >-+ n -= 8; >-+ out[i++] = b >> n; >-+ } >-+ } >-+ } >-+ *dataLength = i; >-+ return TRUE; >-+} >-+ >-+ >-+/* >-+ *---------------------------------------------------------------------------- >-+ * >-+ * Base64_ValidEncoding -- >-+ * >-+ * Returns TRUE if the specified input buffer is valid Base64 input. >-+ * >-+ * Results: >-+ * TRUE or FALSE. >-+ * >-+ * Side effects: >-+ * None. >-+ * >-+ *---------------------------------------------------------------------------- >-+ */ >-+ >-+Bool >-+Base64_ValidEncoding(char const *src, // IN: >-+ size_t srcLength) // IN: >-+{ >-+ size_t i; >-+ >-+ ASSERT(src); >-+ for (i = 0; i < srcLength; i++) { >-+ uint8 c = src[i]; /* MSVC CRT will die on negative arguments to is* */ >-+ >-+ if (!isalpha(c) && !isdigit(c) && >-+ c != '+' && c != '=' && c != '/') { >-+ return FALSE; >-+ } >-+ } >-+ >-+ return TRUE; >-+} >-+ >-+ >-+/* >-+ *---------------------------------------------------------------------------- >-+ * >-+ * Base64_EncodedLength -- >-+ * >-+ * Given a binary buffer, how many bytes would it take to encode it. >-+ * >-+ * Results: >-+ * Number of bytes needed to encode, including terminating NUL byte. >-+ * >-+ * Side effects: >-+ * None. >-+ * >-+ *---------------------------------------------------------------------------- >-+ */ >-+ >-+size_t >-+Base64_EncodedLength(uint8 const *src, // IN: >-+ size_t srcLength) // IN: >-+{ >-+ return ((srcLength + 2) / 3 * 4) + 1; >-+} >-+ >-+ >-+/* >-+ *---------------------------------------------------------------------------- >-+ * >-+ * Base64_DecodedLength -- >-+ * >-+ * Given a base64 encoded string, how many bytes do we need to decode it. >-+ * Assumes no whitespace. This is not necessarily the length of the >-+ * decoded data (Base64_Decode requires a few extra bytes... don't blame >-+ * me, I didn't write it). >-+ * >-+ * Results: >-+ * Number of bytes needed to decode input. >-+ * >-+ * Side effects: >-+ * None. >-+ * >-+ *---------------------------------------------------------------------------- >-+ */ >-+ >-+size_t >-+Base64_DecodedLength(char const *src, // IN: >-+ size_t srcLength) // IN: >-+{ >-+ size_t length; >-+ >-+ ASSERT(src); >-+ >-+ length = srcLength / 4 * 3; >-+ // PR 303173 - do the following check to avoid a negative value returned >-+ // from this function. Note: length can only be in a multiple of 3 >-+ if (length > 2) { >-+ if (src[srcLength-1] == '=') { >-+ length--; >-+ } >-+ if (src[srcLength-2] == '=') { >-+ length--; >-+ } >-+ } >-+ return length; >-+} >-+ >-+ >-+/* >-+ *----------------------------------------------------------------------------- >-+ * >-+ * Base64_EasyEncode -- >-+ * >-+ * Base64-encode 'data' into a NUL-terminated string. >-+ * >-+ * Results: >-+ * On success: TRUE. '*target' is set to an allocated string, that the >-+ * caller must eventually free(). >-+ * On failure: FALSE. '*target' is set to NULL. >-+ * >-+ * Side effects: >-+ * None. >-+ * >-+ *----------------------------------------------------------------------------- >-+ */ >-+ >-+Bool >-+Base64_EasyEncode(const uint8 *src, // IN: data to encode >-+ size_t srcLength, // IN: data size >-+ char **target) // OUT: encoded string >-+{ >-+ Bool succeeded = FALSE; >-+ size_t size; >-+ >-+ ASSERT(src); >-+ ASSERT(target); >-+ >-+ size = Base64_EncodedLength(src, srcLength); >-+ >-+ *target = (char *) malloc(size); >-+ >-+ if (!*target) { >-+ goto exit; >-+ } >-+ >-+ if (!Base64_Encode(src, srcLength, *target, size, NULL)) { >-+ goto exit; >-+ } >-+ >-+ succeeded = TRUE; >-+ >-+exit: >-+ if (!succeeded) { >-+ free(*target); >-+ *target = NULL; >-+ } >-+ >-+ return succeeded; >-+} >-+ >-+ >-+/* >-+ *----------------------------------------------------------------------------- >-+ * >-+ * Base64_EasyDecode -- >-+ * >-+ * Base64-decode 'src' into a buffer. >-+ * >-+ * Results: >-+ * TRUE on success, FALSE otherwise, plus the decoded data on success. >-+ * Caller must free 'target' with free(). >-+ * >-+ * Side effects: >-+ * None. >-+ * >-+ *----------------------------------------------------------------------------- >-+ */ >-+ >-+Bool >-+Base64_EasyDecode(const char *src, // IN: data to decode >-+ uint8 **target, // OUT: decoded data >-+ size_t *targSize) // OUT: data size >-+{ >-+ Bool succeeded = FALSE; >-+ size_t theDataSize; >-+ uint8 *theData; >-+ >-+ ASSERT(src); >-+ ASSERT(target); >-+ ASSERT(targSize); >-+ >-+ theDataSize = Base64_DecodedLength(src, strlen(src)); >-+ >-+ theData = (uint8 *) malloc(theDataSize); >-+ >-+ if (!theData) { >-+ goto exit; >-+ } >-+ >-+ if (!Base64_Decode(src, theData, theDataSize, &theDataSize)) { >-+ free(theData); >-+ goto exit; >-+ } >-+ >-+ *target = theData; >-+ *targSize = theDataSize; >-+ >-+ succeeded = TRUE; >-+ >-+exit: >-+ if (!succeeded) { >-+ *target = NULL; >-+ *targSize = 0; >-+ } >-+ >-+ return succeeded; >-+} >---- lib/foundryMsg/foundryMsg.c.orig 2013-12-27 16:40:58.000000000 +0000 >-+++ lib/foundryMsg/foundryMsg.c 2013-12-27 16:41:30.000000000 +0000 >-@@ -29,7 +29,7 @@ >- #include "vm_version.h" >- #include "util.h" >- #include "str.h" >--#include "base64.h" >-+#include "ovmbase64.h" >- >- #include "vixOpenSource.h" >- #include "vixCommands.h" >---- lib/file/file.c.orig 2013-12-27 16:40:58.000000000 +0000 >-+++ lib/file/file.c 2013-12-27 16:41:39.000000000 +0000 >-@@ -60,7 +60,7 @@ >- #include "fileIO.h" >- #include "fileInt.h" >- #include "dynbuf.h" >--#include "base64.h" >-+#include "ovmbase64.h" >- #include "timeutil.h" >- #include "hostinfo.h" >- #include "hostType.h" >---- lib/misc/Makefile.in.orig 2013-09-23 15:51:46.000000000 +0000 >-+++ lib/misc/Makefile.in 2013-12-27 16:57:14.000000000 +0000 >-@@ -82,7 +82,7 @@ >- CONFIG_CLEAN_VPATH_FILES = >- LTLIBRARIES = $(noinst_LTLIBRARIES) >- libMisc_la_LIBADD = >--am_libMisc_la_OBJECTS = atomic.lo base64.lo codeset.lo codesetBase.lo \ >-+am_libMisc_la_OBJECTS = atomic.lo ovmbase64.lo codeset.lo codesetBase.lo \ >- codesetOld.lo dynarray.lo dynbuf.lo escape.lo hashTable.lo \ >- hostinfo.lo hostinfoHV.lo hostinfoPosix.lo hostname.lo \ >- hostType.lo idLinux.lo iovector.lo logFixed.lo machineID.lo \ >-@@ -301,7 +301,7 @@ >- top_builddir = @top_builddir@ >- top_srcdir = @top_srcdir@ >- noinst_LTLIBRARIES = libMisc.la >--libMisc_la_SOURCES = atomic.c base64.c codeset.c codesetBase.c \ >-+libMisc_la_SOURCES = atomic.c ovmbase64.c codeset.c codesetBase.c \ >- codesetOld.c dynarray.c dynbuf.c escape.c hashTable.c \ >- hostinfo.c hostinfoHV.c hostinfoPosix.c hostname.c hostType.c \ >- idLinux.c iovector.c logFixed.c machineID.c miscSolaris.c \ >---- lib/misc/Makefile.am.orig 2013-12-27 16:40:58.000000000 +0000 >-+++ lib/misc/Makefile.am 2013-12-27 16:42:00.000000000 +0000 >-@@ -19,7 +19,7 @@ >- >- libMisc_la_SOURCES = >- libMisc_la_SOURCES += atomic.c >--libMisc_la_SOURCES += base64.c >-+libMisc_la_SOURCES += ovmbase64.c >- libMisc_la_SOURCES += codeset.c >- libMisc_la_SOURCES += codesetBase.c >- libMisc_la_SOURCES += codesetOld.c >---- lib/user/util.c.orig 2013-12-27 16:40:58.000000000 +0000 >-+++ lib/user/util.c 2013-12-27 16:42:25.000000000 +0000 >-@@ -69,7 +69,7 @@ >- #include "file.h" >- #include "util_shared.h" >- #include "escape.h" >--#include "base64.h" >-+#include "ovmbase64.h" >- #include "unicode.h" >- #include "posix.h" >- >---- services/plugins/vix/foundryToolsDaemon.c.orig 2013-12-27 16:40:58.000000000 +0000 >-+++ services/plugins/vix/foundryToolsDaemon.c 2013-12-27 16:42:38.000000000 +0000 >-@@ -68,7 +68,7 @@ >- #include "guest_msg_def.h" >- #include "conf.h" >- #include "vixCommands.h" >--#include "base64.h" >-+#include "ovmbase64.h" >- #include "syncDriver.h" >- #include "hgfsServerManager.h" >- #include "hgfs.h" >---- services/plugins/vix/vixTools.c.orig 2013-12-27 16:40:58.000000000 +0000 >-+++ services/plugins/vix/vixTools.c 2013-12-27 16:42:46.000000000 +0000 >-@@ -87,7 +87,7 @@ >- #include "guest_msg_def.h" >- #include "conf.h" >- #include "vixCommands.h" >--#include "base64.h" >-+#include "ovmbase64.h" >- #include "hostinfo.h" >- #include "hgfsServerManager.h" >- #include "hgfs.h" >---- xferlogs/xferlogs.c.orig 2013-12-27 16:40:58.000000000 +0000 >-+++ xferlogs/xferlogs.c 2013-12-27 16:43:01.000000000 +0000 >-@@ -50,7 +50,7 @@ >- #include "debug.h" >- #include "rpcvmx.h" >- #include "rpcout.h" >--#include "base64.h" >-+#include "ovmbase64.h" >- #include "str.h" >- #include "strutil.h" >- >---- lib/misc/ovmbase64.c.orig 2013-12-27 16:50:49.000000000 +0000 >-+++ lib/misc/ovmbase64.c 2013-12-27 16:50:58.000000000 +0000 >-@@ -48,7 +48,7 @@ >- #include <string.h> >- #include "vm_basic_types.h" >- #include "vm_assert.h" >--#include "base64.h" >-+#include "ovmbase64.h" >- >- static const char Base64[] = >- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; > >Property changes on: files/patch-base64rename >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-configure >=================================================================== >--- files/patch-configure (revision 434550) >+++ files/patch-configure (working copy) >@@ -1,40 +1,11 @@ >---- ./configure.orig 2013-09-23 15:51:43.000000000 +0000 >-+++ ./configure 2014-04-23 15:36:44.174844399 +0000 >-@@ -2823,6 +2823,9 @@ >- x86_64) >- userSpaceBitness="64" >- ;; >-+ amd64) >-+ userSpaceBitness="64" >-+ ;; >- *) >- as_fn_error $? "Unknown architecture." "$LINENO" 5 >- ;; >-@@ -21733,18 +21736,6 @@ >- >- done >- >--for ac_header in unwind.h >--do : >-- ac_fn_c_check_header_mongrel "$LINENO" "unwind.h" "ac_cv_header_unwind_h" "$ac_includes_default" >--if test "x$ac_cv_header_unwind_h" = xyes; then : >-- cat >>confdefs.h <<_ACEOF >--#define HAVE_UNWIND_H 1 >--_ACEOF >-- >--fi >-- >--done >-- >- >- ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" >- if test "x$ac_cv_header_wchar_h" = xyes; then : >-@@ -22238,7 +22229,7 @@ >- >- ### General flags / actions >- CFLAGS="$CFLAGS -Wall" >--CFLAGS="$CFLAGS -Werror" >-+CFLAGS="$CFLAGS -Werror -Wno-unused-function" >- >- # -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident' in Xlib.h on OpenSolaris. >- for TEST_CFLAG in -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing \ >+--- configure.orig 2017-01-11 20:40:42.694207000 +0000 >++++ configure 2017-01-11 20:41:03.256056000 +0000 >+@@ -20602,7 +20602,7 @@ >+ # First, try any user-defined CUSTOM_* flags. >+ # >+ if test -n "${CUSTOM_SSL_CPPFLAGS}" || test -n "${CUSTOM_SSL_LIBS}"; then >+- ac_vmw_custom_libs="${CUSTOM_SSL_LIBS} -lssl" >++ ac_vmw_custom_libs="${CUSTOM_SSL_LIBS} -lssl -lcrypto" >+ if test -n ""; then >+ ORIGINAL_CPPFLAGS="$CPPFLAGS" >+ CPPFLAGS="${CUSTOM_SSL_CPPFLAGS} $CPPFLAGS" >Index: files/patch-freebsd-8 >=================================================================== >--- files/patch-freebsd-8 (revision 434550) >+++ files/patch-freebsd-8 (nonexistent) >@@ -1,170 +0,0 @@ >---- modules/freebsd/vmhgfs/vnops.c.orig 2009-02-18 17:02:35.000000000 +0900 >-+++ modules/freebsd/vmhgfs/vnops.c 2009-03-01 17:47:10.000000000 +0900 >-@@ -325,7 +325,11 @@ >- */ >- { >- struct vnode *vp = ap->a_vp; >-+#if __FreeBSD_version >= 800001 >-+ int mode = ap->a_accmode; >-+#else >- int mode = ap->a_mode; >-+#endif >- HgfsAccessMode accessMode = 0; >- Bool isDir = vp->v_type == VDIR; >- if (mode & VREAD) { >---- modules/freebsd/vmblock/vfsops.c.orig 2009-03-18 03:03:21.000000000 -0400 >-+++ modules/freebsd/vmblock/vfsops.c 2009-05-23 02:25:50.892549675 -0400 >-@@ -126,6 +126,11 @@ >- char *target; >- int len, error = 0; >- >-+#if __FreeBSD_version >= 800087 >-+ struct thread *td; >-+ td = curthread; >-+#endif >-+ >- VMBLOCKDEBUG("VMBlockVFSMount(mp = %p)\n", (void *)mp); >- >- /* >-@@ -273,6 +278,11 @@ >- int error; >- int flags = 0, removed = 0; >- >-+#if __FreeBSD_version >= 800087 >-+ struct thread *td; >-+ td = curthread; >-+#endif >-+ >- VMBLOCKDEBUG("VMBlockVFSUnmount: mp = %p\n", (void *)mp); >- >- xmp = MNTTOVMBLOCKMNT(mp); >-@@ -448,10 +458,15 @@ >- VMBlockVFSSync(struct mount *mp, // Ignored >- int waitfor) // Ignored >- #else >-+#if __FreeBSD_version >= 800087 >-+VMBlockVFSSync(struct mount *mp, >-+ int waitfor) >-+#else >- VMBlockVFSSync(struct mount *mp, // Ignored >- int waitfor, // Ignored >- struct thread *td) // Ignored >- #endif >-+#endif >- { >- return 0; >- } >---- modules/freebsd/vmhgfs/vfsops.c.orig 2009-03-18 03:03:26.000000000 -0400 >-+++ modules/freebsd/vmhgfs/vfsops.c 2009-05-23 02:56:39.608109670 -0400 >-@@ -109,8 +109,12 @@ >- */ >- >- static int >-+#if __FreeBSD_version >= 800087 >-+HgfsVfsMount(struct mount *mp) >-+#else >- HgfsVfsMount(struct mount *mp, // IN: structure representing the file system >- struct thread *td) // IN: thread which is mounting the file system >-+#endif >- { >- HgfsSuperInfo *sip; >- struct vnode *vp; >-@@ -122,6 +126,10 @@ >- int *uid = NULL; >- Bool *gidSet = NULL; >- int *gid = NULL; >-+#if __FreeBSD_version >= 800087 >-+ struct thread *td; >-+ td = curthread; >-+#endif >- >- /* >- * - Examine/validate mount flags from userland. >-@@ -145,7 +153,11 @@ >- * Since Hgfs requires the caller to be root, only allow mount attempts made >- * by the superuser. >- */ >-+#if __FreeBSD_version >= 800001 >-+ if ((ret = priv_check(td, PRIV_VFS_MOUNT)) != 0) { >-+#else >- if ((ret = suser(td)) != 0) { >-+#endif >- return ret; >- } >- >-@@ -277,11 +289,19 @@ >- */ >- >- static int >-+#if __FreeBSD_version >= 800087 >-+HgfsVfsUnmount(struct mount *mp, int mntflags) >-+#else >- HgfsVfsUnmount(struct mount *mp, int mntflags, struct thread *td) >-+#endif >- { >- HgfsSuperInfo *sip; >- int ret = 0; >- int flags = 0; >-+#if __FreeBSD_version >= 800087 >-+ struct thread *td; >-+ td = curthread; >-+#endif >- >- sip = (HgfsSuperInfo *)mp->mnt_data; >- >-@@ -348,10 +368,18 @@ >- */ >- >- static int >-+#if __FreeBSD_version >= 800087 >-+HgfsVfsStatfs(struct mount *mp, struct statfs *sbp) >-+#else >- HgfsVfsStatfs(struct mount *mp, struct statfs *sbp, struct thread *td) >-+#endif >- { >- int ret = 0; >- struct vnode *vp; >-+#if __FreeBSD_version >= 800087 >-+ struct thread *td; >-+ td = curthread; >-+#endif >- >- /* We always want HGFS_BLOCKSIZE to be a power of two */ >- ASSERT_ON_COMPILE(HGFS_IS_POWER_OF_TWO(HGFS_BLOCKSIZE)); >-@@ -361,8 +389,11 @@ >- * we got from a call to vfs_getnewfsid() in HgfsVfsMount() >- */ >- bcopy(&mp->mnt_stat, sbp, sizeof mp->mnt_stat); >-- >-+#if __FreeBSD_version >= 800087 >-+ ret = HgfsVfsRoot(mp, LK_SHARED, &vp); >-+#else >- ret = HgfsVfsRoot(mp, LK_SHARED, &vp, td); >-+#endif >- if (ret) { >- DEBUG(VM_DEBUG_FAIL, "HgfsVfsRoot failed\n"); >- return ret; >-@@ -397,13 +428,23 @@ >- */ >- >- static int >-+#if __FreeBSD_version >= 800087 >-+HgfsVfsRoot(struct mount *mp, >-+ int flags, >-+ struct vnode **vpp) >-+#else >- HgfsVfsRoot(struct mount *mp, // IN: Filesystem structure >- int flags, // IN: Flags to vget >- struct vnode **vpp, // OUT: Address of root vnode >- struct thread *td) // IN: Thread structure >-+#endif >- { >- HgfsSuperInfo *sip = (HgfsSuperInfo *)mp->mnt_data; >- int ret = 0; >-+#if __FreeBSD_version >= 800087 >-+ struct thread *td; >-+ td = curthread; >-+#endif >- >- *vpp = NULL; >- > >Property changes on: files/patch-freebsd-8 >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-getpwnam >=================================================================== >--- files/patch-getpwnam (revision 434550) >+++ files/patch-getpwnam (nonexistent) >@@ -1,40 +0,0 @@ >---- lib/auth/authPosix.c 2008-03-19 08:49:49.000000000 +0100 >-+++ lib/auth/authPosix.c 2008-03-27 11:20:20.000000000 +0100 >-@@ -264,7 +264,11 @@ >- #endif >- /* If this point is reached, the user has been authenticated. */ >- setpwent(); >-+#if defined(__FreeBSD__) >-+ pwd = getpwnam(user); >-+#else >- pwd = Posix_Getpwnam(user); >-+#endif >- endpwent(); >- >- #else /* !USE_PAM */ >-@@ -274,7 +278,11 @@ >- corresponding #endif below. */ >- >- setpwent(); //XXX can kill? >-+#if defined(__FreeBSD__) >-+ pwd = getpwnam(user); >-+#else >- pwd = Posix_Getpwnam(user); >-+#endif >- endpwent(); //XXX can kill? >- >- if (!pwd) { >---- lib/impersonate/impersonatePosix.c 2008-03-19 08:49:50.000000000 +0100 >-+++ lib/impersonate/impersonatePosix.c 2008-03-27 11:21:38.000000000 +0100 >-@@ -432,7 +432,11 @@ >- struct passwd *ppw = &pw; >- int error; >- >-+#if defined(__FreeBSD__) >-+ if ((error = getpwnam_r(user, &pw, buffer, BUFSIZ, &ppw)) != 0 || !ppw) { >-+#else >- if ((error = Posix_Getpwnam_r(user, &pw, buffer, BUFSIZ, &ppw)) != 0 || !ppw) { >-+#endif >- if (error == 0) { >- error = ENOENT; >- } > >Property changes on: files/patch-getpwnam >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-hgfsProto.h >=================================================================== >--- files/patch-hgfsProto.h (revision 434550) >+++ files/patch-hgfsProto.h (nonexistent) >@@ -1,22 +0,0 @@ >---- lib/include/hgfsProto.h.orig >-+++ lib/include/hgfsProto.h >-@@ -148,6 +148,9 @@ >- HGFS_OP_SET_EAS_V4, /* Add or modify extended attributes. */ >- >- HGFS_OP_MAX, /* Dummy op, must be last in enum */ >-+ >-+/* If a V4 packet is being processed as a legacy packet it will have this opcode. */ >-+ HGFS_V4_LEGACY_OPCODE = 0xff, >- } HgfsOp; >- >- >-@@ -155,9 +158,6 @@ >- #define HGFS_VERSION_OLD (1 << 0) >- #define HGFS_VERSION_3 (1 << 1) >- >--/* If a V4 packet is being processed as a legacy packet it will have this opcode. */ >--#define HGFS_V4_LEGACY_OPCODE 0xff >-- >- /* XXX: Needs change when VMCI is supported. */ >- #define HGFS_REQ_PAYLOAD_SIZE_V3(hgfsReq) (sizeof *hgfsReq + sizeof(HgfsRequest)) >- #define HGFS_REP_PAYLOAD_SIZE_V3(hgfsRep) (sizeof *hgfsRep + sizeof(HgfsReply)) > >Property changes on: files/patch-hgfsProto.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-hgfsmounter-Makefile.in >=================================================================== >--- files/patch-hgfsmounter-Makefile.in (revision 434550) >+++ files/patch-hgfsmounter-Makefile.in (working copy) >@@ -1,22 +1,12 @@ >---- hgfsmounter/Makefile.in.orig 2011-09-21 18:25:50.000000000 +0000 >-+++ hgfsmounter/Makefile.in 2011-09-25 04:03:22.000000000 +0000 >-@@ -606,14 +606,14 @@ >+--- hgfsmounter/Makefile.in.orig 2017-01-11 21:31:30.246368000 -0500 >++++ hgfsmounter/Makefile.in 2017-01-11 21:31:57.886822000 -0500 >+@@ -584,9 +584,6 @@ >+ @FREEBSD_TRUE@install-exec-hook: > @FREEBSD_TRUE@ mv $(DESTDIR)$(sbindir)/mount.vmhgfs \ > @FREEBSD_TRUE@ $(DESTDIR)$(sbindir)/mount_vmhgfs >- @FREEBSD_TRUE@ -$(MKDIR_P) $(DESTDIR)/sbin >+-@FREEBSD_TRUE@ -$(MKDIR_P) $(DESTDIR)/sbin > -@FREEBSD_TRUE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount_vmhgfs \ > -@FREEBSD_TRUE@ $(DESTDIR)/sbin/mount_vmhgfs &> /dev/null >-+#@FREEBSD_TRUE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount_vmhgfs \ >-+#@FREEBSD_TRUE@ $(DESTDIR)/sbin/mount_vmhgfs &> /dev/null > @FREEBSD_TRUE@uninstall-hook: > @FREEBSD_TRUE@ rm -f $(DESTDIR)$(sbindir)/mount_vmhgfs > @FREEBSD_FALSE@install-exec-hook: >--@FREEBSD_FALSE@ -$(MKDIR_P) $(DESTDIR)/sbin >--@FREEBSD_FALSE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount.vmhgfs \ >--@FREEBSD_FALSE@ $(DESTDIR)/sbin/mount.vmhgfs &> /dev/null >-+#@FREEBSD_FALSE@ -$(MKDIR_P) $(DESTDIR)/sbin >-+#@FREEBSD_FALSE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount.vmhgfs \ >-+#@FREEBSD_FALSE@ $(DESTDIR)/sbin/mount.vmhgfs &> /dev/null >- @FREEBSD_FALSE@uninstall-hook: >- @FREEBSD_FALSE@ rm -f $(DESTDIR)/sbin/mount.vmhgfs >- >Index: files/patch-libDeployPkg__processPosix.c >=================================================================== >--- files/patch-libDeployPkg__processPosix.c (nonexistent) >+++ files/patch-libDeployPkg__processPosix.c (working copy) >@@ -0,0 +1,11 @@ >+--- libDeployPkg/processPosix.c.orig 2017-01-11 22:58:15.400763000 +0000 >++++ libDeployPkg/processPosix.c 2017-01-11 22:59:14.103985000 +0000 >+@@ -28,6 +28,8 @@ >+ #include <unistd.h> >+ #include <fcntl.h> >+ #include <sys/wait.h> >++#include <sys/types.h> >++#include <signal.h> >+ >+ #include "util.h" >+ >Index: files/patch-lib__include__vm_assert.h >=================================================================== >--- files/patch-lib__include__vm_assert.h (revision 434550) >+++ files/patch-lib__include__vm_assert.h (nonexistent) >@@ -1,12 +0,0 @@ >---- lib/include/vm_assert.h.orig 2013-09-23 17:51:10.000000000 +0200 >-+++ lib/include/vm_assert.h 2015-02-04 15:55:56.011187000 +0100 >-@@ -363,7 +363,8 @@ >- #define ASSERT_ON_COMPILE(e) \ >- do { \ >- enum { AssertOnCompileMisused = ((e) ? 1 : -1) }; \ >-- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \ >-+ typedef char AssertOnCompileFailed[AssertOnCompileMisused] \ >-+ __attribute__((__unused__)); \ >- } while (0) >- >- > >Property changes on: files/patch-lib__include__vm_assert.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-lib__include__vm_atomic.h >=================================================================== >--- files/patch-lib__include__vm_atomic.h (revision 434550) >+++ files/patch-lib__include__vm_atomic.h (nonexistent) >@@ -1,12 +0,0 @@ >---- lib/include/vm_atomic.h.orig 2013-09-23 17:51:10.000000000 +0200 >-+++ lib/include/vm_atomic.h 2015-02-04 16:28:59.372337000 +0100 >-@@ -2460,7 +2460,8 @@ >- && 8 * sizeof (out) == size \ >- && 8 * sizeof (cast) == size \ >- ? 1 : -1 }; \ >-- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \ >-+ typedef char AssertOnCompileFailed[AssertOnCompileMisused] \ >-+ __attribute__((__unused__)); \ >- } \ >- \ >- \ > >Property changes on: files/patch-lib__include__vm_atomic.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-lib_include_vmware_tools_log.h >=================================================================== >--- files/patch-lib_include_vmware_tools_log.h (revision 434550) >+++ files/patch-lib_include_vmware_tools_log.h (nonexistent) >@@ -1,13 +0,0 @@ >---- lib/include/vmware/tools/log.h.orig 2014-11-07 12:41:57.111095753 +0100 >-+++ lib/include/vmware/tools/log.h 2014-11-07 12:42:24.867212316 +0100 >-@@ -134,8 +134,9 @@ >- ******************************************************************************* >- */ >- >-+#ifndef g_info >- #define g_info(fmt, ...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, fmt, ## __VA_ARGS__) >-- >-+#endif >- >- /* >- ******************************************************************************* > >Property changes on: files/patch-lib_include_vmware_tools_log.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-libvmtools__i18n.c >=================================================================== >--- files/patch-libvmtools__i18n.c (revision 434550) >+++ files/patch-libvmtools__i18n.c (nonexistent) >@@ -1,18 +0,0 @@ >---- libvmtools/i18n.c.orig 2014-04-17 19:02:44.102203216 +0000 >-+++ libvmtools/i18n.c 2014-04-17 19:08:48.881598972 +0000 >-@@ -88,6 +88,7 @@ >- } >- >- >-+#ifdef BUG_ON >- /* >- ****************************************************************************** >- * MsgHasMsgID -- */ /** >-@@ -112,6 +113,7 @@ >- *(s += MSG_MAGIC_LEN) == '(' && >- strchr(s + 1, ')') != NULL; >- } >-+#endif >- >- >- /* > >Property changes on: files/patch-libvmtools__i18n.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-modules-Makefile.in >=================================================================== >--- files/patch-modules-Makefile.in (revision 434550) >+++ files/patch-modules-Makefile.in (working copy) >@@ -1,6 +1,6 @@ >---- modules/Makefile.in.orig 2009-04-06 18:44:58.000000000 -0400 >-+++ modules/Makefile.in 2009-04-06 18:45:57.000000000 -0400 >-@@ -528,11 +528,11 @@ >+--- modules/Makefile.in.orig 2017-01-11 21:40:55.849672000 -0500 >++++ modules/Makefile.in 2017-01-11 21:41:10.446157000 -0500 >+@@ -543,11 +543,6 @@ > @SOLARIS_TRUE@ $(MAKE) VM_UNAME=$(KERNEL_RELEASE) MV=mv RM=rm \ > @SOLARIS_TRUE@ -C "$(modulesrc)/$(MODULES_OS)/$$MOD" install || exit 1; \ > @SOLARIS_TRUE@ done >@@ -9,11 +9,6 @@ > -@FREEBSD_TRUE@ $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko \ > -@FREEBSD_TRUE@ $(DESTDIR)$(MODULES_DIR); \ > -@FREEBSD_TRUE@ done >-+#@FREEBSD_TRUE@ for MOD in $(MODULES); do \ >-+#@FREEBSD_TRUE@ $(INSTALL) -d $(DESTDIR)$(MODULES_DIR); \ >-+#@FREEBSD_TRUE@ $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko \ >-+#@FREEBSD_TRUE@ $(DESTDIR)$(MODULES_DIR); \ >-+#@FREEBSD_TRUE@ done > @LINUX_TRUE@ for MOD in $(MODULES); do \ > @LINUX_TRUE@ $(INSTALL) -d $(DESTDIR)`eval echo '$$'$${MOD}dir`; \ > @LINUX_TRUE@ $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD/$$MOD.ko \ >Index: files/patch-modules__freebsd__vmhgfs__channel.h >=================================================================== >--- files/patch-modules__freebsd__vmhgfs__channel.h (revision 434550) >+++ files/patch-modules__freebsd__vmhgfs__channel.h (nonexistent) >@@ -1,11 +0,0 @@ >---- modules/freebsd/vmhgfs/channel.h.orig 2014-04-23 15:36:34.432844311 +0000 >-+++ modules/freebsd/vmhgfs/channel.h 2014-04-23 15:36:44.389843756 +0000 >-@@ -21,7 +21,7 @@ >- */ >- >- #ifndef _HGFS_CHANNEL_H_ >--#define _HGFS_CHANNEL__H_ >-+#define _HGFS_CHANNEL_H_ >- >- #include "hgfs_kernel.h" >- #include "requestInt.h" > >Property changes on: files/patch-modules__freebsd__vmhgfs__channel.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-net_compat.h >=================================================================== >--- files/patch-net_compat.h (revision 434550) >+++ files/patch-net_compat.h (working copy) >@@ -1,17 +1,13 @@ >---- modules/freebsd/vmxnet/net_compat.h.orig 2011-09-21 14:25:15.000000000 -0400 >-+++ modules/freebsd/vmxnet/net_compat.h 2012-06-28 17:05:44.638526644 -0400 >-@@ -170,9 +170,12 @@ >- #if __FreeBSD_version < 505000 >- # define VXN_IF_ADDR_LOCK(_ifp) >- # define VXN_IF_ADDR_UNLOCK(_ifp) >-+#elif __FreeBSD_version < 1000000 >-+# define VXN_IF_ADDR_LOCK(_ifp) IF_ADDR_LOCK((_ifp)) >-+# define VXN_IF_ADDR_UNLOCK(_ifp) IF_ADDR_UNLOCK((_ifp)) >+--- modules/freebsd/vmxnet/net_compat.h.orig 2017-01-12 00:25:56.262647000 -0500 >++++ modules/freebsd/vmxnet/net_compat.h 2017-01-12 00:26:48.037008000 -0500 >+@@ -174,8 +174,8 @@ >+ # define VXN_IF_ADDR_LOCK(_ifp) IF_ADDR_LOCK((_ifp)) >+ # define VXN_IF_ADDR_UNLOCK(_ifp) IF_ADDR_UNLOCK((_ifp)) > #else >--# define VXN_IF_ADDR_LOCK(_ifp) IF_ADDR_LOCK((_ifp)) >--# define VXN_IF_ADDR_UNLOCK(_ifp) IF_ADDR_UNLOCK((_ifp)) >-+# define VXN_IF_ADDR_LOCK(_ifp) IF_ADDR_WLOCK((_ifp)) >-+# define VXN_IF_ADDR_UNLOCK(_ifp) IF_ADDR_WUNLOCK((_ifp)) >+-# define VXN_IF_ADDR_LOCK(_ifp) if_maddr_rlock((_ifp)) >+-# define VXN_IF_ADDR_UNLOCK(_ifp) if_maddr_runlock((_ifp)) >++# define VXN_IF_ADDR_LOCK(_ifp) IF_ADDR_WLOCK((_ifp)) >++# define VXN_IF_ADDR_UNLOCK(_ifp) IF_ADDR_WUNLOCK((_ifp)) > #endif > > #endif /* _VXN_NET_COMPAT_H_ */ >Index: files/patch-scripts-Makefile >=================================================================== >--- files/patch-scripts-Makefile (revision 434550) >+++ files/patch-scripts-Makefile (working copy) >@@ -1,6 +1,6 @@ >---- scripts/Makefile.in.orig 2010-05-22 04:41:58.000000000 +0200 >-+++ scripts/Makefile.in 2010-05-22 04:43:57.000000000 +0200 >-@@ -236,7 +236,7 @@ >+--- scripts/Makefile.in.orig 2017-01-11 20:52:28.004220000 -0500 >++++ scripts/Makefile.in 2017-01-11 20:52:42.153725000 -0500 >+@@ -256,7 +256,7 @@ > top_srcdir = @top_srcdir@ > defaultscripts = poweron-vm-default poweroff-vm-default \ > suspend-vm-default resume-vm-default >@@ -7,5 +7,5 @@ > -confdir = /etc/vmware-tools > +confdir = ${prefix}/share/vmware-tools > conf_SCRIPTS = ./common/vm-support ./common/statechange.subr \ >- $(defaultscripts) >+ $(am__append_1) $(defaultscripts) > vmwsrcdir = $(confdir)/scripts/vmware >Index: files/patch-scripts_linux_pam.d_vmtoolsd >=================================================================== >--- files/patch-scripts_linux_pam.d_vmtoolsd (revision 434550) >+++ files/patch-scripts_linux_pam.d_vmtoolsd (working copy) >@@ -1,10 +1,10 @@ >---- scripts/linux/pam.d/vmtoolsd.orig 2013-09-23 15:51:10 UTC >-+++ scripts/linux/pam.d/vmtoolsd >-@@ -1,7 +1,3 @@ >+--- scripts/linux/pam.d/vmtoolsd.orig 2017-01-12 00:17:37.539274000 -0500 >++++ scripts/linux/pam.d/vmtoolsd 2017-01-12 00:18:35.031527000 -0500 >+@@ -1,7 +1,5 @@ > #%PAM-1.0 >--auth sufficient pam_unix2.so nullok >- auth sufficient pam_unix.so shadow nullok >--auth required pam_unix_auth.so shadow nullok >--account sufficient pam_unix2.so >+ auth required pam_shells.so >+ auth sufficient pam_unix.so shadow >+-auth required pam_unix_auth.so shadow >+ account required pam_shells.so > account sufficient pam_unix.so > -account required pam_unix_acct.so >Index: files/patch-toolbox__toolboxcmd-shrink.c >=================================================================== >--- files/patch-toolbox__toolboxcmd-shrink.c (revision 434550) >+++ files/patch-toolbox__toolboxcmd-shrink.c (nonexistent) >@@ -1,11 +0,0 @@ >---- toolbox/toolboxcmd-shrink.c.orig 2013-09-23 17:51:10.000000000 +0200 >-+++ toolbox/toolboxcmd-shrink.c 2014-11-25 17:57:44.000000000 +0100 >-@@ -391,7 +391,7 @@ ShrinkDoWipeAndShrink(char *mountPoint, >- * Verify that wiping/shrinking are permitted before going through with the >- * wiping operation. >- */ >-- if (!ShrinkGetWiperState() == WIPER_ENABLED && !Wiper_IsWipeSupported(part)) { >-+ if (ShrinkGetWiperState() != WIPER_ENABLED && !Wiper_IsWipeSupported(part)) { >- g_debug("%s cannot be wiped / shrunk\n", mountPoint); >- ToolsCmd_PrintErr("%s", >- SU_(disk.shrink.disabled, SHRINK_DISABLED_ERR)); > >Property changes on: files/patch-toolbox__toolboxcmd-shrink.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-util_misc.c >=================================================================== >--- files/patch-util_misc.c (revision 434550) >+++ files/patch-util_misc.c (working copy) >@@ -1,6 +1,6 @@ >---- lib/misc/util_misc.c.orig 2009-04-14 02:38:09.000000000 +0200 >-+++ lib/misc/util_misc.c 2009-04-14 02:39:00.000000000 +0200 >-@@ -292,7 +292,7 @@ >+--- lib/misc/util_misc.c.orig 2017-01-12 00:14:04.989252000 -0500 >++++ lib/misc/util_misc.c 2017-01-12 00:14:12.099031000 -0500 >+@@ -307,7 +307,7 @@ Util_CanonicalPathsIdentical(const char > return (strcmp(path1, path2) == 0); > #elif defined(_WIN32) > return (_stricmp(path1, path2) == 0); >@@ -9,12 +9,3 @@ > return (strcasecmp(path1, path2) == 0); > #else > NOT_IMPLEMENTED(); >-@@ -319,7 +319,7 @@ >- Bool >- Util_IsAbsolutePath(const char *path) // IN: path to check >- { >--#if defined(__linux__) || defined(__APPLE__) >-+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) >- // path[0] is valid even for the empty string. >- return path && path[0] == DIRSEPC; >- #elif defined(_WIN32) >Index: files/patch-vm_basic_asm.h >=================================================================== >--- files/patch-vm_basic_asm.h (revision 434550) >+++ files/patch-vm_basic_asm.h (nonexistent) >@@ -1,11 +0,0 @@ >---- lib/include/vm_basic_asm.h.orig 2013-11-13 03:22:29.000000000 +0000 >-+++ lib/include/vm_basic_asm.h 2013-11-13 03:24:26.000000000 +0000 >-@@ -208,7 +208,7 @@ >- GetCallerEFlags(void) >- { >- unsigned long flags; >-- asm volatile("pushf; pop %0" : "=r"(flags)); >-+ __asm__ volatile("pushf; pop %0" : "=r"(flags)); >- return flags; >- } >- > >Property changes on: files/patch-vm_basic_asm.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-vm_basic_types.h >=================================================================== >--- files/patch-vm_basic_types.h (revision 434550) >+++ files/patch-vm_basic_types.h (nonexistent) >@@ -1,10 +0,0 @@ >---- ./lib/include/vm_basic_types.h.orig 2010-10-20 05:19:54.000000000 +0900 >-+++ ./lib/include/vm_basic_types.h 2010-10-29 20:11:03.000000000 +0900 >-@@ -333,6 +333,7 @@ >- #define FMTPD "" >- #endif >- #elif defined(__linux__) \ >-+ || (defined(__clang__)) \ >- || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) \ >- || (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) \ >- || (defined(_POSIX2_VERSION) && _POSIX2_VERSION >= 200112L) > >Property changes on: files/patch-vm_basic_types.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-vmblock-vfsops.c >=================================================================== >--- files/patch-vmblock-vfsops.c (revision 434550) >+++ files/patch-vmblock-vfsops.c (nonexistent) >@@ -1,11 +0,0 @@ >---- modules/freebsd/vmblock/vfsops.c.orig >-+++ modules/freebsd/vmblock/vfsops.c >-@@ -236,7 +236,7 @@ >- */ >- MNT_ILOCK(mp); >- mp->mnt_flag |= lowerrootvp->v_mount->mnt_flag & MNT_LOCAL; >--#if __FreeBSD_version >= 600000 >-+#if __FreeBSD_version >= 600000 && __FreeBSD_version < 1000021 >- mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE; >- #endif >- MNT_IUNLOCK(mp); > >Property changes on: files/patch-vmblock-vfsops.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-vmblock-vnops.c >=================================================================== >--- files/patch-vmblock-vnops.c (revision 434550) >+++ files/patch-vmblock-vnops.c (nonexistent) >@@ -1,24 +0,0 @@ >---- modules/freebsd/vmblock/vnops.c.orig 2011-09-21 14:25:15.000000000 -0400 >-+++ modules/freebsd/vmblock/vnops.c 2012-06-28 20:51:22.897344202 -0400 >-@@ -1362,7 +1362,9 @@ >- */ >- { >- struct vnode *vp = ap->a_vp; >-+#if __FreeBSD_version < 1000000 >- struct thread *td = ap->a_td; >-+#endif >- >- vp->v_object = NULL; >- >-@@ -1370,7 +1372,11 @@ >- * If this is the last reference, then free up the vnode so as not to >- * tie up the lower vnode. >- */ >-+#if __FreeBSD_version < 1000000 >- vrecycle(vp, td); >-+#else >-+ vrecycle(vp); >-+#endif >- >- return 0; >- } > >Property changes on: files/patch-vmblock-vnops.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-vmblockmounter-Makefile.in >=================================================================== >--- files/patch-vmblockmounter-Makefile.in (revision 434550) >+++ files/patch-vmblockmounter-Makefile.in (working copy) >@@ -1,6 +1,6 @@ >---- vmblockmounter/Makefile.in.orig 2013-12-27 17:42:57.000000000 +0000 >-+++ vmblockmounter/Makefile.in 2013-12-27 17:44:31.000000000 +0000 >-@@ -644,9 +644,6 @@ >+--- vmblockmounter/Makefile.in.orig 2017-01-11 20:47:51.559298000 -0500 >++++ vmblockmounter/Makefile.in 2017-01-11 20:48:04.188633000 -0500 >+@@ -578,9 +578,6 @@ > @FREEBSD_TRUE@install-exec-hook: > @FREEBSD_TRUE@ mv $(DESTDIR)$(sbindir)/mount.vmblock \ > @FREEBSD_TRUE@ $(DESTDIR)$(sbindir)/mount_vmblock >Index: files/patch-vmhgfs-Makefile >=================================================================== >--- files/patch-vmhgfs-Makefile (revision 434550) >+++ files/patch-vmhgfs-Makefile (nonexistent) >@@ -1,21 +0,0 @@ >---- modules/freebsd/vmhgfs/Makefile.orig 2013-04-17 22:12:22.000000000 +0000 >-+++ modules/freebsd/vmhgfs/Makefile 2013-11-16 03:21:39.890032940 +0000 >-@@ -47,7 +47,7 @@ >- .endif >- >- COMMON_HGFS_SRCS := debug.c >--COMMON_HGFS_SRCS := bdhandler.c >-+COMMON_HGFS_SRCS += bdhandler.c >- COMMON_HGFS_SRCS += request.c >- COMMON_HGFS_SRCS += worker.c >- COMMON_HGFS_SRCS += fsutil.c >-@@ -108,7 +108,9 @@ >- CWARNFLAGS += -Wpointer-arith >- CWARNFLAGS += -Winline >- CWARNFLAGS += -Wcast-qual >-+CWARNFLAGS += ${NO_WUNNEEDED_INTERNAL_DECL} >- >- EXPORT_SYMS = NO >- >-+.include <bsd.own.mk> >- .include <bsd.kmod.mk> > >Property changes on: files/patch-vmhgfs-Makefile >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-vmhgfs-kernelStubs.h >=================================================================== >--- files/patch-vmhgfs-kernelStubs.h (revision 434550) >+++ files/patch-vmhgfs-kernelStubs.h (nonexistent) >@@ -1,11 +0,0 @@ >---- modules/freebsd/vmhgfs/kernelStubs.h.orig 2010-10-20 05:19:54.000000000 +0900 >-+++ modules/freebsd/vmhgfs/kernelStubs.h 2010-11-16 13:26:24.000000000 +0900 >-@@ -132,7 +132,7 @@ >- * Stub functions we provide. >- */ >- >--void Panic(const char *fmt, ...); >-+/* void Panic(const char *fmt, ...); -> vm_assert.h */ >- >- char *Str_Strcpy(char *buf, const char *src, size_t maxSize); >- int Str_Vsnprintf(char *str, size_t size, const char *format, > >Property changes on: files/patch-vmhgfs-kernelStubs.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-vmhgfs-os.c >=================================================================== >--- files/patch-vmhgfs-os.c (revision 434550) >+++ files/patch-vmhgfs-os.c (nonexistent) >@@ -1,11 +0,0 @@ >---- modules/freebsd/vmhgfs/os.c.orig >-+++ modules/freebsd/vmhgfs/os.c >-@@ -647,7 +647,7 @@ >- OS_THREAD_T *newThread) // OUT >- { >- return compat_kthread_create(function, parameter, >-- newThread, 0, 0, threadName); >-+ newThread, 0, 0, "%s", threadName); >- } >- >- > >Property changes on: files/patch-vmhgfs-os.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-vmhgfs-vfsops.c >=================================================================== >--- files/patch-vmhgfs-vfsops.c (revision 434550) >+++ files/patch-vmhgfs-vfsops.c (nonexistent) >@@ -1,12 +0,0 @@ >---- modules/freebsd/vmhgfs/vfsops.c.orig >-+++ modules/freebsd/vmhgfs/vfsops.c >-@@ -201,7 +201,9 @@ >- * structures, not oplocks/leases with the VM's host.) >- */ >-+#if __FreeBSD_version < 1000021 >- MNT_ILOCK(mp); >- mp->mnt_kern_flag |= MNTK_MPSAFE; >- MNT_IUNLOCK(mp); >-+#endif >- >- /* Get a new unique filesystem ID */ > >Property changes on: files/patch-vmhgfs-vfsops.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-vmhgfs-vnopscommon.c >=================================================================== >--- files/patch-vmhgfs-vnopscommon.c (revision 434550) >+++ files/patch-vmhgfs-vnopscommon.c (nonexistent) >@@ -1,11 +0,0 @@ >---- modules/freebsd/vmhgfs/vnopscommon.c.orig 2010-10-20 05:19:54.000000000 +0900 >-+++ modules/freebsd/vmhgfs/vnopscommon.c 2010-11-16 13:26:55.000000000 +0900 >-@@ -50,7 +50,7 @@ >- static int HgfsDoGetattrInt(const char *path, const HgfsHandle handle, HgfsSuperInfo *sip, >- HgfsAttrV2 *hgfsAttrV2); >- static int HgfsDoGetattrByName(const char *path, HgfsSuperInfo *sip, HgfsAttrV2 *hgfsAttrV2); >--int HgfsReadlinkInt(struct vnode *vp, struct uio *uiop); >-+/* int HgfsReadlinkInt(struct vnode *vp, struct uio *uiop); -> vnopscommon.h */ >- static int HgfsQueryAttrInt(const char *path, HgfsHandle handle, HgfsSuperInfo *sip, >- HgfsKReqHandle req); >- static int HgfsRefreshHandle(struct vnode *vp, HgfsSuperInfo *sip, HgfsHandle *handle); > >Property changes on: files/patch-vmhgfs-vnopscommon.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-vmmemctl-os.c >=================================================================== >--- files/patch-vmmemctl-os.c (revision 434550) >+++ files/patch-vmmemctl-os.c (working copy) >@@ -1,5 +1,5 @@ >---- modules/freebsd/vmmemctl/os.c.orig 2013-09-23 08:51:10.000000000 -0700 >-+++ modules/freebsd/vmmemctl/os.c 2017-02-20 21:19:02.000000000 -0800 >+--- modules/freebsd/vmmemctl/os.c.orig 2016-09-29 03:07:23.000000000 -0700 >++++ modules/freebsd/vmmemctl/os.c 2017-02-21 11:38:17.000000000 -0800 > @@ -37,9 +37,11 @@ > #include <sys/param.h> > #include <sys/systm.h> >@@ -24,33 +24,7 @@ > } > > >-@@ -295,7 +301,13 @@ >- Mapping >- OS_MapPageHandle(PageHandle handle) // IN >- { >-+ >-+#if __FreeBSD_version >= 1000042 >-+ vm_offset_t res = kva_alloc(PAGE_SIZE); >-+#else >- vm_offset_t res = kmem_alloc_nofault(kernel_map, PAGE_SIZE); >-+#endif >-+ >- vm_page_t page = (vm_page_t)handle; >- >- if (!res) { >-@@ -352,7 +364,11 @@ >- OS_UnmapPage(Mapping mapping) // IN >- { >- pmap_qremove((vm_offset_t)mapping, 1); >-+#if __FreeBSD_version >= 1000042 >-+ kva_free((vm_offset_t)mapping, PAGE_SIZE); >-+#else >- kmem_free(kernel_map, (vm_offset_t)mapping, PAGE_SIZE); >-+#endif >- } >- >- >-@@ -360,7 +376,11 @@ >+@@ -369,7 +375,11 @@ > os_pmap_alloc(os_pmap *p) // IN > { > /* number of pages (div. 8) */ >@@ -61,32 +35,8 @@ > +#endif > > /* >- * expand to nearest word boundary >-@@ -369,14 +389,23 @@ >- p->size = (p->size + sizeof(unsigned long) - 1) & >- ~(sizeof(unsigned long) - 1); >- >-+#if __FreeBSD_version >= 1000042 >-+ p->bitmap = (unsigned long *)kmem_malloc(kernel_arena, p->size, >-+ M_WAITOK | M_ZERO); >-+#else >- p->bitmap = (unsigned long *)kmem_alloc(kernel_map, p->size); >-+#endif >- } >- >- >- static void >- os_pmap_free(os_pmap *p) // IN >- { >-+#if __FreeBSD_version >= 1000042 >-+ kva_free((vm_offset_t)p->bitmap, p->size); >-+#else >- kmem_free(kernel_map, (vm_offset_t)p->bitmap, p->size); >-+#endif >- p->size = 0; >- p->bitmap = NULL; >- } >-@@ -449,12 +478,31 @@ >+ * expand to nearest word boundary >+@@ -466,12 +476,31 @@ > os_state *state = &global_state; > os_pmap *pmap = &state->pmap; > >@@ -123,7 +73,7 @@ > } > > >-@@ -466,8 +514,19 @@ >+@@ -483,8 +512,19 @@ > os_state *state = &global_state; > os_pmap *pmap = &state->pmap; > >@@ -143,7 +93,7 @@ > return NULL; > } > >-@@ -488,6 +547,11 @@ >+@@ -505,6 +545,11 @@ > if (!page) { > os_pmap_putindex(pmap, pindex); > } >@@ -155,7 +105,7 @@ > > return page; > } >-@@ -824,7 +888,7 @@ >+@@ -847,7 +892,7 @@ > static void > vmmemctl_init_sysctl(void) > { >Index: files/patch-vmtoolsd-Makefile.in >=================================================================== >--- files/patch-vmtoolsd-Makefile.in (revision 434550) >+++ files/patch-vmtoolsd-Makefile.in (working copy) >@@ -1,7 +1,7 @@ >---- services/vmtoolsd/Makefile.in.orig 2009-04-06 18:40:27.000000000 -0400 >-+++ services/vmtoolsd/Makefile.in 2009-04-06 18:41:16.000000000 -0400 >-@@ -722,7 +722,7 @@ >- $@ || (rm -f $@ && exit 1) >+--- services/vmtoolsd/Makefile.in.orig 2017-01-11 21:00:01.938705000 -0500 >++++ services/vmtoolsd/Makefile.in 2017-01-11 21:00:22.495767000 -0500 >+@@ -761,7 +761,7 @@ >+ @INSTVMSG@ vmtoolsd $(srcdir)/l10n $(DESTDIR)$(datadir) > > install-exec-hook: > - $(INSTALL) -d $(DESTDIR)/etc/vmware-tools >Index: files/vm_basic_asm_x86_common.h >=================================================================== >--- files/vm_basic_asm_x86_common.h (nonexistent) >+++ files/vm_basic_asm_x86_common.h (working copy) >@@ -0,0 +1,11 @@ >+--- lib/include/vm_basic_asm_x86_common.h.orig 2017-01-12 00:09:21.410468000 -0500 >++++ lib/include/vm_basic_asm_x86_common.h 2017-01-12 00:09:26.883729000 -0500 >+@@ -197,7 +197,7 @@ static INLINE unsigned int >+ GetCallerEFlags(void) >+ { >+ unsigned long flags; >+- asm volatile("pushf; pop %0" : "=r"(flags)); >++ __asm__ volatile("pushf; pop %0" : "=r"(flags)); >+ return flags; >+ } >+ >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 434550) >+++ pkg-plist (working copy) >@@ -1,9 +1,11 @@ >+bin/vmhgfs-fuse >+bin/vmtoolsd > bin/vmware-checkvm > bin/vmware-hgfsclient >+bin/vmware-namespace-cmd > bin/vmware-rpctool >+bin/vmware-toolbox-cmd > bin/vmware-xferlogs >-bin/vmtoolsd >-bin/vmware-toolbox-cmd > %%X11%%%%FUSE%%bin/vmware-vmblock-fuse > lib/open-vm-tools/plugins/vmsvc/libguestInfo.so > lib/open-vm-tools/plugins/vmsvc/libpowerOps.so >@@ -29,7 +31,6 @@ > lib/libguestlib.so.0.0.0 > libdata/pkgconfig/vmguestlib.pc > lib/vmware-tools/modules/drivers/vmblock.ko >-lib/vmware-tools/modules/drivers/vmhgfs.ko > lib/vmware-tools/modules/drivers/vmmemctl.ko > lib/vmware-tools/modules/drivers/vmxnet.ko > include/vmGuestLib/includeCheck.h >@@ -37,16 +38,15 @@ > include/vmGuestLib/vmSessionId.h > include/vmGuestLib/vm_basic_types.h > @dir lib/vmware-tools/modules/input >-sbin/mount_vmhgfs > sbin/mount_vmblock > %%X11%%bin/vmware-user-suid-wrapper > share/vmware-tools/poweroff-vm-default > share/vmware-tools/poweron-vm-default > share/vmware-tools/resume-vm-default >+share/vmware-tools/scripts/vmware/network >+share/vmware-tools/statechange.subr > share/vmware-tools/suspend-vm-default > share/vmware-tools/vm-support >-share/vmware-tools/statechange.subr >-share/vmware-tools/scripts/vmware/network > %%DATADIR%%/messages/de/toolboxcmd.vmsg > %%DATADIR%%/messages/de/vmtoolsd.vmsg > %%DATADIR%%/messages/ja/toolboxcmd.vmsg
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 212471
:
180200
|
180202
|
180207
|
180275
|
180346
|
180364