View | Details | Raw Unified | Return to bug 212471 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-19 / +29 lines)
Lines 2-12 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=		open-vm-tools
4
PORTNAME=		open-vm-tools
5
PORTVERSION=		${BUILD_VER}
5
PORTVERSION=		${RELEASE_VER}
6
PORTREVISION=		16
6
PORTEPOCH=		2
7
PORTEPOCH=		1
8
CATEGORIES=		emulators
7
CATEGORIES=		emulators
9
MASTER_SITES=		SF/${PORTNAME}/${PORTNAME}/stable-9.4.x
8
MASTER_SITES=		https://github.com/vmware/open-vm-tools/files/590760/
10
DISTNAME=		open-vm-tools-${RELEASE_VER}-${BUILD_VER}
9
DISTNAME=		open-vm-tools-${RELEASE_VER}-${BUILD_VER}
11
10
12
MAINTAINER=		swills@FreeBSD.org
11
MAINTAINER=		swills@FreeBSD.org
Lines 15-22 Link Here
15
LICENSE=		LGPL21
14
LICENSE=		LGPL21
16
LICENSE_FILE=		${WRKSRC}/COPYING
15
LICENSE_FILE=		${WRKSRC}/COPYING
17
16
18
RELEASE_VER=		9.4.0
17
RELEASE_VER=		10.1.0
19
BUILD_VER=		1280544
18
BUILD_VER=		4449150
20
19
21
OPTIONS_DEFINE=		X11 LIBNOTIFY UNITY FUSE DNET ICU
20
OPTIONS_DEFINE=		X11 LIBNOTIFY UNITY FUSE DNET ICU
22
OPTIONS_DEFAULT=	X11 LIBNOTIFY FUSE DNET ICU
21
OPTIONS_DEFAULT=	X11 LIBNOTIFY FUSE DNET ICU
Lines 26-36 Link Here
26
LIBNOTIFY_DESC=		Desktop notification support
25
LIBNOTIFY_DESC=		Desktop notification support
27
UNITY_DESC=		liburiparser support
26
UNITY_DESC=		liburiparser support
28
27
28
# TODO add USE_GITHUB=yes after switching to USES=autoreconf
29
29
X11_CONFIGURE_WITH=	x gtk2 gtkmm
30
X11_CONFIGURE_WITH=	x gtk2 gtkmm
30
X11_LDFLAGS=		-L${LOCALBASE}/lib
31
X11_USE=		xorg=x11,ice,sm,xext,xineramaproto,xinerama,xrandr,xrender,xtst,xi \
31
X11_USE=		xorg=x11,ice,sm,xext,xineramaproto,xinerama,xrandr,xrender,xtst \
32
			gnome=gtk20,gtkmm24
32
			gnome=gtk20,gtkmm24
33
X11_USES=		fuse
33
X11_LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
34
			libfreetype.so:print/freetype2
34
LIBNOTIFY_LIB_DEPENDS=	libnotify.so:devel/libnotify
35
LIBNOTIFY_LIB_DEPENDS=	libnotify.so:devel/libnotify
35
UNITY_CONFIGURE_ENV=	CUSTOM_URIPARSER_CPPFLAGS="-I${LOCALBASE}/include/uriparser"
36
UNITY_CONFIGURE_ENV=	CUSTOM_URIPARSER_CPPFLAGS="-I${LOCALBASE}/include/uriparser"
36
UNITY_LIB_DEPENDS=	liburiparser.so:net/uriparser
37
UNITY_LIB_DEPENDS=	liburiparser.so:net/uriparser
Lines 40-55 Link Here
40
ICU_CONFIGURE_WITH=	icu
41
ICU_CONFIGURE_WITH=	icu
41
ICU_LIB_DEPENDS=	libicuuc.so:devel/icu
42
ICU_LIB_DEPENDS=	libicuuc.so:devel/icu
42
43
43
WRKSRC=			${WRKDIR}/open-vm-tools-${RELEASE_VER}-${BUILD_VER}
44
WRKSRC=			${WRKDIR}/open-vm-tools-${RELEASE_VER}-${BUILD_VER}/open-vm-tools
44
GNU_CONFIGURE=		yes
45
GNU_CONFIGURE=		yes
45
USES=			pathfix pkgconfig kmod libtool
46
# TODO add autoreconf when included files are compatible
46
USE_GNOME=		glib20
47
USES=			fuse gettext-runtime kmod libtool pathfix pkgconfig
48
49
LIB_DEPENDS=		libmspack.so:archivers/libmspack \
50
			libxerces-c.so.3:textproc/xerces-c3 \
51
			libxml-security-c.so:security/apache-xml-security-c
52
53
USE_GNOME=		glib20 gdkpixbuf2
47
USE_LDCONFIG=		yes
54
USE_LDCONFIG=		yes
48
CPPFLAGS+=		-Wno-deprecated-declarations
55
CPPFLAGS+=		-Wno-deprecated-declarations
56
LDFLAGS=		-L${LOCALBASE}/lib
49
57
50
SSP_UNSAFE=		kernel module does not support ssp
58
SSP_UNSAFE=		kernel module does not support ssp
51
59
52
CONFIGURE_ARGS+=	--without-procps --sysconfdir=${LOCALBASE}/etc
60
CONFIGURE_ARGS+=	--disable-grabbitmqproxy --disable-deploypkg \
61
			--disable-vgauth --without-procps \
62
			--sysconfdir=${LOCALBASE}/etc
53
63
54
CONFLICTS+=		vmware-guestd[0-9]* vmware-tools[0-9]*
64
CONFLICTS+=		vmware-guestd[0-9]* vmware-tools[0-9]*
55
SUB_FILES=		pkg-message
65
SUB_FILES=		pkg-message
Lines 64-88 Link Here
64
CONFLICTS=		open-vm-tools-[0-9]*
74
CONFLICTS=		open-vm-tools-[0-9]*
65
.endif
75
.endif
66
76
67
BROKEN_aarch64=		Fails to configure: error: Unknown architecture
77
ONLY_FOR_ARCHS=		i386 amd64
68
78
69
NOT_FOR_ARCHS=		sparc64
70
NOT_FOR_ARCHS_REASON=	not yet ported to this architecture
71
72
.include <bsd.port.pre.mk>
79
.include <bsd.port.pre.mk>
73
80
74
post-build:
81
post-build:
75
	cd ${WRKSRC}/modules && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS}
82
	cd ${WRKSRC}/modules && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS}
76
83
84
# TODO find where ${STAGEDIR}/usr/lib/debug/boot/modules is created and avoid creating it
77
post-install:
85
post-install:
78
	${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers
86
	${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers
79
	${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/input
87
	${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/input
88
	${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmblock.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmblock.ko
80
	${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmmemctl.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmmemctl.ko
89
	${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmmemctl.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmmemctl.ko
81
	${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmxnet.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmxnet.ko
90
	${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmxnet.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmxnet.ko
82
	${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmhgfs.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmhgfs.ko
83
	${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmblock.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmblock.ko
84
	${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/vmware/
91
	${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/vmware/
85
	${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/
92
	${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/
86
	${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/tests/
93
	${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/tests/
94
	${RMDIR} ${STAGEDIR}/usr/lib/debug/boot/modules
95
	${RMDIR} ${STAGEDIR}/usr/lib/debug/boot
96
	${RMDIR} ${STAGEDIR}/usr/lib/debug
87
97
88
.include <bsd.port.post.mk>
98
.include <bsd.port.post.mk>
(-)distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (open-vm-tools-9.4.0-1280544.tar.gz) = 5d30652eb0f6dc5e930781029c184837e700be5543b6a7116db4c62a6f3ca399
1
TIMESTAMP = 1484345963
2
SIZE (open-vm-tools-9.4.0-1280544.tar.gz) = 3659504
2
SHA256 (open-vm-tools-10.1.0-4449150.tar.gz) = d579474c9495b504a544dfc2635d291c27488e7e9303ec4fe6b393836dc3b017
3
SIZE (open-vm-tools-10.1.0-4449150.tar.gz) = 5025787
(-)files/patch-base64rename (-1480 lines)
Lines 1-1480 Link Here
1
--- lib/include/base64.h.orig	2013-12-27 16:38:14.000000000 +0000
2
+++ lib/include/base64.h	2013-12-27 16:38:30.000000000 +0000
3
@@ -1,46 +0,0 @@
4
-/*********************************************************
5
- * Copyright (C) 2004 VMware, Inc. All rights reserved.
6
- *
7
- * This program is free software; you can redistribute it and/or modify it
8
- * under the terms of the GNU Lesser General Public License as published
9
- * by the Free Software Foundation version 2.1 and no later version.
10
- *
11
- * This program is distributed in the hope that it will be useful, but
12
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
14
- * License for more details.
15
- *
16
- * You should have received a copy of the GNU Lesser General Public License
17
- * along with this program; if not, write to the Free Software Foundation, Inc.,
18
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
19
- *
20
- *********************************************************/
21
-
22
-/*
23
- * base64.h --
24
- *
25
- *      Functions to base64 encode/decode buffers. Implemented in
26
- *      lib/misc/base64.c.
27
- */
28
-
29
-#ifndef _BASE64_H
30
-#define _BASE64_H
31
-
32
-Bool Base64_Encode(uint8 const *src, size_t srcLength,
33
-                   char *target, size_t targSize,
34
-                   size_t *dataLength);
35
-Bool Base64_Decode(char const *src,
36
-                   uint8 *target, size_t targSize,
37
-                   size_t *dataLength);
38
-Bool Base64_ChunkDecode(char const *src, size_t inSize,
39
-                        uint8 *target, size_t targSize,
40
-                        size_t *dataLength);
41
-Bool Base64_ValidEncoding(char const *src, size_t srcLength);
42
-size_t Base64_EncodedLength(uint8 const *src, size_t srcLength);
43
-size_t Base64_DecodedLength(char const *src, size_t srcLength);
44
-Bool Base64_EasyEncode(const uint8 *src, size_t srcLength,
45
-                       char **target);
46
-Bool Base64_EasyDecode(const char *src,
47
-                       uint8 **target, size_t *targSize);
48
-
49
-#endif
50
--- lib/misc/base64.c.orig	2013-12-27 16:38:22.000000000 +0000
51
+++ lib/misc/base64.c	2013-12-27 16:38:36.000000000 +0000
52
@@ -1,634 +0,0 @@
53
-/*
54
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
55
- *
56
- * Permission to use, copy, modify, and distribute this software for any
57
- * purpose with or without fee is hereby granted, provided that the above
58
- * copyright notice and this permission notice appear in all copies.
59
- *
60
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
61
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
62
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
63
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
64
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
65
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
66
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
67
- * SOFTWARE.
68
- */
69
-
70
-/*
71
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
72
- *
73
- * International Business Machines, Inc. (hereinafter called IBM) grants
74
- * permission under its copyrights to use, copy, modify, and distribute this
75
- * Software with or without fee, provided that the above copyright notice and
76
- * all paragraphs of this notice appear in all copies, and that the name of IBM
77
- * not be used in connection with the marketing of any product incorporating
78
- * the Software or modifications thereof, without specific, written prior
79
- * permission.
80
- *
81
- * To the extent it has a right to do so, IBM grants an immunity from suit
82
- * under its patents, if any, for the use, sale or manufacture of products to
83
- * the extent that such products are used for performing Domain Name System
84
- * dynamic updates in TCP/IP networks by means of the Software.  No immunity is
85
- * granted for any product per se or for any other function of any product.
86
- *
87
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
88
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
89
- * PARTICULAR PURPOSE.  IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
90
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
91
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
92
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
93
- */
94
-
95
-#include <sys/types.h>
96
-
97
-#include <ctype.h>
98
-#include <stdio.h>
99
-#include <stdlib.h>
100
-#include <string.h>
101
-#include "vm_basic_types.h"
102
-#include "vm_assert.h"
103
-#include "base64.h"
104
-
105
-static const char Base64[] =
106
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
107
-static const char Pad64 = '=';
108
-
109
-// Special markers
110
-enum {
111
-   ILLEGAL = -1, EOM = -2, WS = -3
112
-};
113
-
114
-/*
115
- * Reverse byte map used for decoding. Except for specials (negative values), contains the index
116
- * into Base64[] where given value is found, ie: base64Reverse[Base64[n]] = n, for 0 <= n < 64
117
- *
118
- * This static initialization replaces, and should have identical result to, this runtime init:
119
- *
120
- *  for (i = 0; i < 256; ++i) {
121
- *     base64Reverse[i] = isspace(i) ? WS : ILLEGAL;
122
- *  }
123
- *  base64Reverse['\0']  = EOM;
124
- *  base64Reverse['=']   = EOM;
125
- *  for (i = 0; Base64[i]; ++i) {
126
- *     base64Reverse[(unsigned)Base64[i]] = (char) i;
127
- *  }
128
- */
129
-
130
-static const signed char base64Reverse[256] = {
131
-   EOM,     ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 00-07 */
132
-   ILLEGAL, WS,      WS,      WS,      WS,      WS,      ILLEGAL, ILLEGAL,   /* 08-0F */
133
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 10-17 */
134
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 18-1F */
135
-   WS,      ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 20-27 */
136
-   ILLEGAL, ILLEGAL, ILLEGAL, 62,      ILLEGAL, ILLEGAL, ILLEGAL, 63,        /* 28-2F */
137
-   52,      53,      54,      55,      56,      57,      58,      59,        /* 30-37 */
138
-   60,      61,      ILLEGAL, ILLEGAL, ILLEGAL, EOM,     ILLEGAL, ILLEGAL,   /* 38-3F */
139
-   ILLEGAL, 0,       1,       2,       3,       4,       5,       6,         /* 40-47 */
140
-   7,       8,       9,       10,      11,      12,      13,      14,        /* 48-4F */
141
-   15,      16,      17,      18,      19,      20,      21,      22,        /* 50-57 */
142
-   23,      24,      25,      ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 58-5F */
143
-   ILLEGAL, 26,      27,      28,      29,      30,      31,      32,        /* 60-67 */
144
-   33,      34,      35,      36,      37,      38,      39,      40,        /* 68-6F */
145
-   41,      42,      43,      44,      45,      46,      47,      48,        /* 70-77 */
146
-   49,      50,      51,      ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 78-7F */
147
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 80-87 */
148
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 88-8F */
149
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 90-97 */
150
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 98-9F */
151
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* A0-A7 */
152
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* A8-AF */
153
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* B0-B7 */
154
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* B8-BF */
155
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* C0-C7 */
156
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* C8-CF */
157
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* D0-D7 */
158
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* D8-DF */
159
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* E0-E7 */
160
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* E8-EF */
161
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* F0-F7 */
162
-   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL }; /* F8-FF */
163
-
164
-/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
165
-   The following encoding technique is taken from RFC 1521 by Borenstein
166
-   and Freed.  It is reproduced here in a slightly edited form for
167
-   convenience.
168
-
169
-   A 65-character subset of US-ASCII is used, enabling 6 bits to be
170
-   represented per printable character. (The extra 65th character, "=",
171
-   is used to signify a special processing function.)
172
-
173
-   The encoding process represents 24-bit groups of input bits as output
174
-   strings of 4 encoded characters. Proceeding from left to right, a
175
-   24-bit input group is formed by concatenating 3 8-bit input groups.
176
-   These 24 bits are then treated as 4 concatenated 6-bit groups, each
177
-   of which is translated into a single digit in the base64 alphabet.
178
-
179
-   Each 6-bit group is used as an index into an array of 64 printable
180
-   characters. The character referenced by the index is placed in the
181
-   output string.
182
-
183
-   Table 1: The Base64 Alphabet
184
-
185
-   Value Encoding  Value Encoding  Value Encoding  Value Encoding
186
-   0 A            17 R            34 i            51 z
187
-   1 B            18 S            35 j            52 0
188
-   2 C            19 T            36 k            53 1
189
-   3 D            20 U            37 l            54 2
190
-   4 E            21 V            38 m            55 3
191
-   5 F            22 W            39 n            56 4
192
-   6 G            23 X            40 o            57 5
193
-   7 H            24 Y            41 p            58 6
194
-   8 I            25 Z            42 q            59 7
195
-   9 J            26 a            43 r            60 8
196
-   10 K            27 b            44 s            61 9
197
-   11 L            28 c            45 t            62 +
198
-   12 M            29 d            46 u            63 /
199
-   13 N            30 e            47 v
200
-   14 O            31 f            48 w         (pad) =
201
-   15 P            32 g            49 x
202
-   16 Q            33 h            50 y
203
-
204
-   Special processing is performed if fewer than 24 bits are available
205
-   at the end of the data being encoded.  A full encoding quantum is
206
-   always completed at the end of a quantity.  When fewer than 24 input
207
-   bits are available in an input group, zero bits are added (on the
208
-   right) to form an integral number of 6-bit groups.  Padding at the
209
-   end of the data is performed using the '=' character.
210
-
211
-   Since all base64 input is an integral number of octets, only the
212
-   -------------------------------------------------
213
-   following cases can arise:
214
-
215
-   (1) the final quantum of encoding input is an integral
216
-   multiple of 24 bits; here, the final unit of encoded
217
-   output will be an integral multiple of 4 characters
218
-   with no "=" padding,
219
-   (2) the final quantum of encoding input is exactly 8 bits;
220
-   here, the final unit of encoded output will be two
221
-   characters followed by two "=" padding characters, or
222
-   (3) the final quantum of encoding input is exactly 16 bits;
223
-   here, the final unit of encoded output will be three
224
-   characters followed by one "=" padding character.
225
-*/
226
-
227
-/*
228
- *----------------------------------------------------------------------------
229
- *
230
- * Base64_Encode --
231
- *
232
- *      Base64-encodes srcLength bytes from src and stores result in dst.
233
- *
234
- * Results:
235
- *      TRUE if the destination held enough space for the decoded result,
236
- *      FALSE otherwise.
237
- *
238
- * Side effects:
239
- *      Updates dstSize with the number of encoded bytes (excluding the
240
- *      terminating '\0').
241
- *
242
- *----------------------------------------------------------------------------
243
- */
244
-
245
-Bool
246
-Base64_Encode(uint8 const *src,  // IN:
247
-              size_t srcSize,    // IN:
248
-              char *dst,         // OUT:
249
-              size_t dstMax,     // IN: max result length, including NUL byte
250
-              size_t *dstSize)   // OUT: result length, may be NULL
251
-{
252
-   char *dst0 = dst;
253
-
254
-   ASSERT(src || srcSize == 0);
255
-   ASSERT(dst);
256
-
257
-   if (4 * ((srcSize + 2) / 3) >= dstMax) {
258
-      if (dstSize) {
259
-         *dstSize = 0;
260
-      }
261
-
262
-      return FALSE;
263
-   }
264
-
265
-   while (LIKELY(srcSize > 2)) {
266
-      dst[0] = Base64[src[0] >> 2];
267
-      dst[1] = Base64[(src[0] & 0x03) << 4 | src[1] >> 4];
268
-      dst[2] = Base64[(src[1] & 0x0f) << 2 | src[2] >> 6];
269
-      dst[3] = Base64[src[2] & 0x3f];
270
-
271
-      srcSize -= 3;
272
-      src += 3;
273
-      dst += 4;
274
-   }
275
-
276
-   /* Now we worry about padding. */
277
-   if (LIKELY(srcSize--)) {
278
-      uint8 src1 = srcSize ? src[1] : 0;
279
-
280
-      dst[0] = Base64[src[0] >> 2];
281
-      dst[1] = Base64[(src[0] & 0x03) << 4 | src1 >> 4];
282
-      dst[2] = srcSize ? Base64[(src1 & 0x0f) << 2] : Pad64;
283
-      dst[3] = Pad64;
284
-      dst += 4;
285
-   }
286
-
287
-   dst[0] = '\0';	/* Returned value doesn't count \0. */
288
-   if (dstSize) {
289
-      *dstSize = dst - dst0;
290
-   }
291
-
292
-   return TRUE;
293
-}
294
-
295
-
296
-#ifdef __I_WANT_TO_TEST_THIS__
297
-main()
298
-{
299
-   struct {
300
-      char *in, *out;
301
-   } tests[] = {
302
-      {"", ""},
303
-      {"MQ==", "1"},
304
-      {"MTI=", "12"},
305
-      {"MTIz", "123"},
306
-      {"MTIzNA==", "1234"},
307
-      {"SGVsbG8gRWR3YXJkIGFuZCBKb2huIQ==","Hello Edward and John!"},
308
-      {NULL, NULL}
309
-   }, *test;
310
-
311
-   size_t bufMax;
312
-   if (1) {
313
-      for (bufMax = 0; bufMax < 7; ++bufMax) {
314
-         char buf[999];
315
-         size_t bufSize;
316
-
317
-         if (bufMax == 6) {
318
-            bufMax = sizeof buf;
319
-         }
320
-
321
-         printf("\nBuffer size %ld:\n", bufMax);
322
-
323
-         test = tests;
324
-         for (; test->in; ++test) {
325
-            Bool r;
326
-
327
-            r = Base64_Decode(test->in, buf, bufMax, &bufSize);
328
-
329
-            if ((bufMax > strlen(test->out)) && (bufSize < strlen(test->out))) {
330
-               printf("Decoding of %s failed. Decoded size %ld < expected %ld\n",
331
-                      test->in, bufSize, strlen(test->out));
332
-            }
333
-            if (memcmp(test->out, buf, bufSize) != 0) {
334
-               printf("Decoding of %s failed.  Got %s (%ld), not %s\n",
335
-                      test->in, buf, bufSize, test->out);
336
-            } else {
337
-               printf("Good: %s -> %s (%ld)\n", test->in, buf, bufSize);
338
-            }
339
-
340
-            r = Base64_Encode(test->out, strlen(test->out),
341
-                              buf, bufMax, &bufSize);
342
-            buf[bufMax] = 0;
343
-
344
-            if (bufMax <= strlen(test->in) && r == 0) {
345
-               printf("Good: %s. Failed for bufMax %ld (required %ld)\n", test->out, bufMax, strlen(test->in));
346
-            } else {
347
-                if (!r || bufSize != strlen(test->in) ||
348
-                    strncmp(test->in, buf, bufSize) != 0) {
349
-                   printf("Encoding of %s failed.  r = %d. Got %s (%ld), not %s\n",
350
-                          test->out, r, buf, bufSize, test->in);
351
-                } else {
352
-                   printf("Good: %s -> %s (%ld)\n", test->out, buf, bufSize);
353
-                }
354
-            }
355
-         }
356
-      }
357
-   }
358
-
359
-   for (bufMax = 0; bufMax < 100000; ++bufMax) {
360
-      char random_in[8000];
361
-      char random_out[16000];
362
-      size_t bufSize;
363
-
364
-      Bool r = Base64_Encode(random_in, sizeof random_in,
365
-                             random_out, sizeof random_out, &bufSize);
366
-
367
-      if (!r) {
368
-            printf("Encoding failed.\n");
369
-      }
370
-   }
371
-}
372
-#endif
373
-
374
-
375
-/*
376
- *----------------------------------------------------------------------------
377
- *
378
- * Base64_Decode --
379
- *
380
- *       Skips all whitespace anywhere. Converts characters, four at
381
- *       a time, starting at (or after) src from base - 64 numbers into three
382
- *       8 bit bytes in the target area. Returns the number of data bytes
383
- *       stored at the target in the provided out parameter.
384
- *
385
- * Results:
386
- *      TRUE on success, FALSE on failure.
387
- *
388
- * Side effects:
389
- *      None.
390
- *
391
- *----------------------------------------------------------------------------
392
- */
393
-
394
-Bool
395
-Base64_Decode(char const *in,      // IN:
396
-              uint8 *out,          // OUT:
397
-              size_t outSize,      // IN:
398
-              size_t *dataLength)  // OUT:
399
-{
400
-   return Base64_ChunkDecode(in, -1, out, outSize, dataLength);
401
-}
402
-
403
-
404
-/*
405
- *----------------------------------------------------------------------------
406
- *
407
- * Base64_ChunkDecode --
408
- *
409
- *       Skips all whitespace anywhere. Converts characters, four at
410
- *       a time, starting at (or after) src from base - 64 numbers into three
411
- *       8 bit bytes in the target area. Conversion stops after inSize (which
412
- *       must be a multiple of 4) characters, or an EOM marker. Returns the
413
- *       number of data bytes stored at the target in the provided out parameter.
414
- *
415
- * Results:
416
- *      TRUE on success, FALSE on failure.
417
- *
418
- * Side effects:
419
- *      None.
420
- *
421
- *----------------------------------------------------------------------------
422
- */
423
-
424
-Bool
425
-Base64_ChunkDecode(char const *in,      // IN:
426
-                   size_t inSize,       // IN:
427
-                   uint8 *out,          // OUT:
428
-                   size_t outSize,      // IN:
429
-                   size_t *dataLength)  // OUT:
430
-{
431
-   uint32 b = 0;
432
-   int n = 0;
433
-   uintptr_t i = 0;
434
-   size_t inputIndex = 0;
435
-
436
-   ASSERT(in);
437
-   ASSERT(out || outSize == 0);
438
-   ASSERT(dataLength);
439
-   ASSERT((inSize == -1) || (inSize % 4) == 0);
440
-   *dataLength = 0;
441
-
442
-   i = 0;
443
-   for (;inputIndex < inSize;) {
444
-      int p = base64Reverse[(unsigned char)in[inputIndex]];
445
-
446
-      if (UNLIKELY(p < 0)) {
447
-         switch (p) {
448
-         case WS:
449
-            inputIndex++;
450
-            break;
451
-         case EOM:
452
-            *dataLength = i;
453
-            return TRUE;
454
-         case ILLEGAL:
455
-         default:
456
-            return FALSE;
457
-         }
458
-      } else {
459
-         inputIndex++;
460
-         if (UNLIKELY(i >= outSize)) {
461
-            return FALSE;
462
-         }
463
-         b = (b << 6) | p;
464
-         n += 6;
465
-         if (LIKELY(n >= 8)) {
466
-            n -= 8;
467
-            out[i++] = b >> n;
468
-         }
469
-      }
470
-   }
471
-   *dataLength = i;
472
-   return TRUE;
473
-}
474
-
475
-
476
-/*
477
- *----------------------------------------------------------------------------
478
- *
479
- * Base64_ValidEncoding --
480
- *
481
- *      Returns TRUE if the specified input buffer is valid Base64 input.
482
- *
483
- * Results:
484
- *      TRUE or FALSE.
485
- *
486
- * Side effects:
487
- *      None.
488
- *
489
- *----------------------------------------------------------------------------
490
- */
491
-
492
-Bool
493
-Base64_ValidEncoding(char const *src,   // IN:
494
-                     size_t srcLength)  // IN:
495
-{
496
-   size_t i;
497
-
498
-   ASSERT(src);
499
-   for (i = 0; i < srcLength; i++) {
500
-      uint8 c = src[i]; /* MSVC CRT will die on negative arguments to is* */
501
-
502
-      if (!isalpha(c) && !isdigit(c) &&
503
-          c != '+' && c != '=' && c != '/') {
504
-         return FALSE;
505
-      }
506
-   }
507
-
508
-   return TRUE;
509
-}
510
-
511
-
512
-/*
513
- *----------------------------------------------------------------------------
514
- *
515
- * Base64_EncodedLength --
516
- *
517
- *      Given a binary buffer, how many bytes would it take to encode it.
518
- *
519
- * Results:
520
- *      Number of bytes needed to encode, including terminating NUL byte.
521
- *
522
- * Side effects:
523
- *      None.
524
- *
525
- *----------------------------------------------------------------------------
526
- */
527
-
528
-size_t
529
-Base64_EncodedLength(uint8 const *src,  // IN:
530
-                     size_t srcLength)  // IN:
531
-{
532
-   return ((srcLength + 2) / 3 * 4) + 1;
533
-}
534
-
535
-
536
-/*
537
- *----------------------------------------------------------------------------
538
- *
539
- * Base64_DecodedLength --
540
- *
541
- *      Given a base64 encoded string, how many bytes do we need to decode it.
542
- *      Assumes no whitespace.  This is not necessarily the length of the
543
- *      decoded data (Base64_Decode requires a few extra bytes... don't blame
544
- *      me, I didn't write it).
545
- *
546
- * Results:
547
- *      Number of bytes needed to decode input.
548
- *
549
- * Side effects:
550
- *      None.
551
- *
552
- *----------------------------------------------------------------------------
553
- */
554
-
555
-size_t
556
-Base64_DecodedLength(char const *src,   // IN:
557
-                     size_t srcLength)  // IN:
558
-{
559
-   size_t length;
560
-
561
-   ASSERT(src);
562
-
563
-   length = srcLength / 4 * 3;
564
-   // PR 303173 - do the following check to avoid a negative value returned
565
-   // from this function. Note: length can only be in a multiple of 3
566
-   if (length > 2) {
567
-      if (src[srcLength-1] == '=') {
568
-         length--;
569
-      }
570
-      if (src[srcLength-2] == '=') {
571
-         length--;
572
-      }
573
-   }
574
-   return length;
575
-}
576
-
577
-
578
-/*
579
- *-----------------------------------------------------------------------------
580
- *
581
- * Base64_EasyEncode --
582
- *
583
- *      Base64-encode 'data' into a NUL-terminated string.
584
- *
585
- * Results:
586
- *      On success: TRUE. '*target' is set to an allocated string, that the
587
- *                  caller must eventually free().
588
- *      On failure: FALSE. '*target' is set to NULL.
589
- *
590
- * Side effects:
591
- *      None.
592
- *
593
- *-----------------------------------------------------------------------------
594
- */
595
-
596
-Bool
597
-Base64_EasyEncode(const uint8 *src,  // IN: data to encode
598
-                  size_t srcLength,  // IN: data size
599
-                  char **target)     // OUT: encoded string
600
-{
601
-   Bool succeeded = FALSE;
602
-   size_t size;
603
-
604
-   ASSERT(src);
605
-   ASSERT(target);
606
-
607
-   size = Base64_EncodedLength(src, srcLength);
608
-
609
-   *target = (char *) malloc(size);
610
-
611
-   if (!*target) {
612
-      goto exit;
613
-   }
614
-
615
-   if (!Base64_Encode(src, srcLength, *target, size, NULL)) {
616
-      goto exit;
617
-   }
618
-
619
-   succeeded = TRUE;
620
-
621
-exit:
622
-   if (!succeeded) {
623
-      free(*target);
624
-      *target = NULL;
625
-   }
626
-
627
-   return succeeded;
628
-}
629
-
630
-
631
-/*
632
- *-----------------------------------------------------------------------------
633
- *
634
- * Base64_EasyDecode --
635
- *
636
- *      Base64-decode 'src' into a buffer.
637
- *
638
- * Results:
639
- *      TRUE on success, FALSE otherwise, plus the decoded data on success.
640
- *      Caller must free 'target' with free().
641
- *
642
- * Side effects:
643
- *      None.
644
- *
645
- *-----------------------------------------------------------------------------
646
- */
647
-
648
-Bool
649
-Base64_EasyDecode(const char *src,   // IN: data to decode
650
-                  uint8 **target,    // OUT: decoded data
651
-                  size_t *targSize)  // OUT: data size
652
-{
653
-   Bool succeeded = FALSE;
654
-   size_t theDataSize;
655
-   uint8 *theData;
656
-
657
-   ASSERT(src);
658
-   ASSERT(target);
659
-   ASSERT(targSize);
660
-
661
-   theDataSize = Base64_DecodedLength(src, strlen(src));
662
-
663
-   theData = (uint8 *) malloc(theDataSize);
664
-
665
-   if (!theData) {
666
-      goto exit;
667
-   }
668
-
669
-   if (!Base64_Decode(src, theData, theDataSize, &theDataSize)) {
670
-      free(theData);
671
-      goto exit;
672
-   }
673
-
674
-   *target = theData;
675
-   *targSize = theDataSize;
676
-
677
-   succeeded = TRUE;
678
-
679
-exit:
680
-   if (!succeeded) {
681
-      *target = NULL;
682
-      *targSize = 0;
683
-   }
684
-
685
-   return succeeded;
686
-}
687
--- lib/include/ovmbase64.h.orig	2013-12-27 16:39:12.000000000 +0000
688
+++ lib/include/ovmbase64.h	2013-12-27 16:39:46.000000000 +0000
689
@@ -0,0 +1,46 @@
690
+/*********************************************************
691
+ * Copyright (C) 2004 VMware, Inc. All rights reserved.
692
+ *
693
+ * This program is free software; you can redistribute it and/or modify it
694
+ * under the terms of the GNU Lesser General Public License as published
695
+ * by the Free Software Foundation version 2.1 and no later version.
696
+ *
697
+ * This program is distributed in the hope that it will be useful, but
698
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
699
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
700
+ * License for more details.
701
+ *
702
+ * You should have received a copy of the GNU Lesser General Public License
703
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
704
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
705
+ *
706
+ *********************************************************/
707
+
708
+/*
709
+ * base64.h --
710
+ *
711
+ *      Functions to base64 encode/decode buffers. Implemented in
712
+ *      lib/misc/base64.c.
713
+ */
714
+
715
+#ifndef _BASE64_H
716
+#define _BASE64_H
717
+
718
+Bool Base64_Encode(uint8 const *src, size_t srcLength,
719
+                   char *target, size_t targSize,
720
+                   size_t *dataLength);
721
+Bool Base64_Decode(char const *src,
722
+                   uint8 *target, size_t targSize,
723
+                   size_t *dataLength);
724
+Bool Base64_ChunkDecode(char const *src, size_t inSize,
725
+                        uint8 *target, size_t targSize,
726
+                        size_t *dataLength);
727
+Bool Base64_ValidEncoding(char const *src, size_t srcLength);
728
+size_t Base64_EncodedLength(uint8 const *src, size_t srcLength);
729
+size_t Base64_DecodedLength(char const *src, size_t srcLength);
730
+Bool Base64_EasyEncode(const uint8 *src, size_t srcLength,
731
+                       char **target);
732
+Bool Base64_EasyDecode(const char *src,
733
+                       uint8 **target, size_t *targSize);
734
+
735
+#endif
736
--- lib/misc/ovmbase64.c.orig	2013-12-27 16:39:33.000000000 +0000
737
+++ lib/misc/ovmbase64.c	2013-12-27 16:39:56.000000000 +0000
738
@@ -0,0 +1,634 @@
739
+/*
740
+ * Copyright (c) 1996, 1998 by Internet Software Consortium.
741
+ *
742
+ * Permission to use, copy, modify, and distribute this software for any
743
+ * purpose with or without fee is hereby granted, provided that the above
744
+ * copyright notice and this permission notice appear in all copies.
745
+ *
746
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
747
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
748
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
749
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
750
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
751
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
752
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
753
+ * SOFTWARE.
754
+ */
755
+
756
+/*
757
+ * Portions Copyright (c) 1995 by International Business Machines, Inc.
758
+ *
759
+ * International Business Machines, Inc. (hereinafter called IBM) grants
760
+ * permission under its copyrights to use, copy, modify, and distribute this
761
+ * Software with or without fee, provided that the above copyright notice and
762
+ * all paragraphs of this notice appear in all copies, and that the name of IBM
763
+ * not be used in connection with the marketing of any product incorporating
764
+ * the Software or modifications thereof, without specific, written prior
765
+ * permission.
766
+ *
767
+ * To the extent it has a right to do so, IBM grants an immunity from suit
768
+ * under its patents, if any, for the use, sale or manufacture of products to
769
+ * the extent that such products are used for performing Domain Name System
770
+ * dynamic updates in TCP/IP networks by means of the Software.  No immunity is
771
+ * granted for any product per se or for any other function of any product.
772
+ *
773
+ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
774
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
775
+ * PARTICULAR PURPOSE.  IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
776
+ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
777
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
778
+ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
779
+ */
780
+
781
+#include <sys/types.h>
782
+
783
+#include <ctype.h>
784
+#include <stdio.h>
785
+#include <stdlib.h>
786
+#include <string.h>
787
+#include "vm_basic_types.h"
788
+#include "vm_assert.h"
789
+#include "base64.h"
790
+
791
+static const char Base64[] =
792
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
793
+static const char Pad64 = '=';
794
+
795
+// Special markers
796
+enum {
797
+   ILLEGAL = -1, EOM = -2, WS = -3
798
+};
799
+
800
+/*
801
+ * Reverse byte map used for decoding. Except for specials (negative values), contains the index
802
+ * into Base64[] where given value is found, ie: base64Reverse[Base64[n]] = n, for 0 <= n < 64
803
+ *
804
+ * This static initialization replaces, and should have identical result to, this runtime init:
805
+ *
806
+ *  for (i = 0; i < 256; ++i) {
807
+ *     base64Reverse[i] = isspace(i) ? WS : ILLEGAL;
808
+ *  }
809
+ *  base64Reverse['\0']  = EOM;
810
+ *  base64Reverse['=']   = EOM;
811
+ *  for (i = 0; Base64[i]; ++i) {
812
+ *     base64Reverse[(unsigned)Base64[i]] = (char) i;
813
+ *  }
814
+ */
815
+
816
+static const signed char base64Reverse[256] = {
817
+   EOM,     ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 00-07 */
818
+   ILLEGAL, WS,      WS,      WS,      WS,      WS,      ILLEGAL, ILLEGAL,   /* 08-0F */
819
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 10-17 */
820
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 18-1F */
821
+   WS,      ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 20-27 */
822
+   ILLEGAL, ILLEGAL, ILLEGAL, 62,      ILLEGAL, ILLEGAL, ILLEGAL, 63,        /* 28-2F */
823
+   52,      53,      54,      55,      56,      57,      58,      59,        /* 30-37 */
824
+   60,      61,      ILLEGAL, ILLEGAL, ILLEGAL, EOM,     ILLEGAL, ILLEGAL,   /* 38-3F */
825
+   ILLEGAL, 0,       1,       2,       3,       4,       5,       6,         /* 40-47 */
826
+   7,       8,       9,       10,      11,      12,      13,      14,        /* 48-4F */
827
+   15,      16,      17,      18,      19,      20,      21,      22,        /* 50-57 */
828
+   23,      24,      25,      ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 58-5F */
829
+   ILLEGAL, 26,      27,      28,      29,      30,      31,      32,        /* 60-67 */
830
+   33,      34,      35,      36,      37,      38,      39,      40,        /* 68-6F */
831
+   41,      42,      43,      44,      45,      46,      47,      48,        /* 70-77 */
832
+   49,      50,      51,      ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 78-7F */
833
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 80-87 */
834
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 88-8F */
835
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 90-97 */
836
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* 98-9F */
837
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* A0-A7 */
838
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* A8-AF */
839
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* B0-B7 */
840
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* B8-BF */
841
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* C0-C7 */
842
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* C8-CF */
843
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* D0-D7 */
844
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* D8-DF */
845
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* E0-E7 */
846
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* E8-EF */
847
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,   /* F0-F7 */
848
+   ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL }; /* F8-FF */
849
+
850
+/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
851
+   The following encoding technique is taken from RFC 1521 by Borenstein
852
+   and Freed.  It is reproduced here in a slightly edited form for
853
+   convenience.
854
+
855
+   A 65-character subset of US-ASCII is used, enabling 6 bits to be
856
+   represented per printable character. (The extra 65th character, "=",
857
+   is used to signify a special processing function.)
858
+
859
+   The encoding process represents 24-bit groups of input bits as output
860
+   strings of 4 encoded characters. Proceeding from left to right, a
861
+   24-bit input group is formed by concatenating 3 8-bit input groups.
862
+   These 24 bits are then treated as 4 concatenated 6-bit groups, each
863
+   of which is translated into a single digit in the base64 alphabet.
864
+
865
+   Each 6-bit group is used as an index into an array of 64 printable
866
+   characters. The character referenced by the index is placed in the
867
+   output string.
868
+
869
+   Table 1: The Base64 Alphabet
870
+
871
+   Value Encoding  Value Encoding  Value Encoding  Value Encoding
872
+   0 A            17 R            34 i            51 z
873
+   1 B            18 S            35 j            52 0
874
+   2 C            19 T            36 k            53 1
875
+   3 D            20 U            37 l            54 2
876
+   4 E            21 V            38 m            55 3
877
+   5 F            22 W            39 n            56 4
878
+   6 G            23 X            40 o            57 5
879
+   7 H            24 Y            41 p            58 6
880
+   8 I            25 Z            42 q            59 7
881
+   9 J            26 a            43 r            60 8
882
+   10 K            27 b            44 s            61 9
883
+   11 L            28 c            45 t            62 +
884
+   12 M            29 d            46 u            63 /
885
+   13 N            30 e            47 v
886
+   14 O            31 f            48 w         (pad) =
887
+   15 P            32 g            49 x
888
+   16 Q            33 h            50 y
889
+
890
+   Special processing is performed if fewer than 24 bits are available
891
+   at the end of the data being encoded.  A full encoding quantum is
892
+   always completed at the end of a quantity.  When fewer than 24 input
893
+   bits are available in an input group, zero bits are added (on the
894
+   right) to form an integral number of 6-bit groups.  Padding at the
895
+   end of the data is performed using the '=' character.
896
+
897
+   Since all base64 input is an integral number of octets, only the
898
+   -------------------------------------------------
899
+   following cases can arise:
900
+
901
+   (1) the final quantum of encoding input is an integral
902
+   multiple of 24 bits; here, the final unit of encoded
903
+   output will be an integral multiple of 4 characters
904
+   with no "=" padding,
905
+   (2) the final quantum of encoding input is exactly 8 bits;
906
+   here, the final unit of encoded output will be two
907
+   characters followed by two "=" padding characters, or
908
+   (3) the final quantum of encoding input is exactly 16 bits;
909
+   here, the final unit of encoded output will be three
910
+   characters followed by one "=" padding character.
911
+*/
912
+
913
+/*
914
+ *----------------------------------------------------------------------------
915
+ *
916
+ * Base64_Encode --
917
+ *
918
+ *      Base64-encodes srcLength bytes from src and stores result in dst.
919
+ *
920
+ * Results:
921
+ *      TRUE if the destination held enough space for the decoded result,
922
+ *      FALSE otherwise.
923
+ *
924
+ * Side effects:
925
+ *      Updates dstSize with the number of encoded bytes (excluding the
926
+ *      terminating '\0').
927
+ *
928
+ *----------------------------------------------------------------------------
929
+ */
930
+
931
+Bool
932
+Base64_Encode(uint8 const *src,  // IN:
933
+              size_t srcSize,    // IN:
934
+              char *dst,         // OUT:
935
+              size_t dstMax,     // IN: max result length, including NUL byte
936
+              size_t *dstSize)   // OUT: result length, may be NULL
937
+{
938
+   char *dst0 = dst;
939
+
940
+   ASSERT(src || srcSize == 0);
941
+   ASSERT(dst);
942
+
943
+   if (4 * ((srcSize + 2) / 3) >= dstMax) {
944
+      if (dstSize) {
945
+         *dstSize = 0;
946
+      }
947
+
948
+      return FALSE;
949
+   }
950
+
951
+   while (LIKELY(srcSize > 2)) {
952
+      dst[0] = Base64[src[0] >> 2];
953
+      dst[1] = Base64[(src[0] & 0x03) << 4 | src[1] >> 4];
954
+      dst[2] = Base64[(src[1] & 0x0f) << 2 | src[2] >> 6];
955
+      dst[3] = Base64[src[2] & 0x3f];
956
+
957
+      srcSize -= 3;
958
+      src += 3;
959
+      dst += 4;
960
+   }
961
+
962
+   /* Now we worry about padding. */
963
+   if (LIKELY(srcSize--)) {
964
+      uint8 src1 = srcSize ? src[1] : 0;
965
+
966
+      dst[0] = Base64[src[0] >> 2];
967
+      dst[1] = Base64[(src[0] & 0x03) << 4 | src1 >> 4];
968
+      dst[2] = srcSize ? Base64[(src1 & 0x0f) << 2] : Pad64;
969
+      dst[3] = Pad64;
970
+      dst += 4;
971
+   }
972
+
973
+   dst[0] = '\0';	/* Returned value doesn't count \0. */
974
+   if (dstSize) {
975
+      *dstSize = dst - dst0;
976
+   }
977
+
978
+   return TRUE;
979
+}
980
+
981
+
982
+#ifdef __I_WANT_TO_TEST_THIS__
983
+main()
984
+{
985
+   struct {
986
+      char *in, *out;
987
+   } tests[] = {
988
+      {"", ""},
989
+      {"MQ==", "1"},
990
+      {"MTI=", "12"},
991
+      {"MTIz", "123"},
992
+      {"MTIzNA==", "1234"},
993
+      {"SGVsbG8gRWR3YXJkIGFuZCBKb2huIQ==","Hello Edward and John!"},
994
+      {NULL, NULL}
995
+   }, *test;
996
+
997
+   size_t bufMax;
998
+   if (1) {
999
+      for (bufMax = 0; bufMax < 7; ++bufMax) {
1000
+         char buf[999];
1001
+         size_t bufSize;
1002
+
1003
+         if (bufMax == 6) {
1004
+            bufMax = sizeof buf;
1005
+         }
1006
+
1007
+         printf("\nBuffer size %ld:\n", bufMax);
1008
+
1009
+         test = tests;
1010
+         for (; test->in; ++test) {
1011
+            Bool r;
1012
+
1013
+            r = Base64_Decode(test->in, buf, bufMax, &bufSize);
1014
+
1015
+            if ((bufMax > strlen(test->out)) && (bufSize < strlen(test->out))) {
1016
+               printf("Decoding of %s failed. Decoded size %ld < expected %ld\n",
1017
+                      test->in, bufSize, strlen(test->out));
1018
+            }
1019
+            if (memcmp(test->out, buf, bufSize) != 0) {
1020
+               printf("Decoding of %s failed.  Got %s (%ld), not %s\n",
1021
+                      test->in, buf, bufSize, test->out);
1022
+            } else {
1023
+               printf("Good: %s -> %s (%ld)\n", test->in, buf, bufSize);
1024
+            }
1025
+
1026
+            r = Base64_Encode(test->out, strlen(test->out),
1027
+                              buf, bufMax, &bufSize);
1028
+            buf[bufMax] = 0;
1029
+
1030
+            if (bufMax <= strlen(test->in) && r == 0) {
1031
+               printf("Good: %s. Failed for bufMax %ld (required %ld)\n", test->out, bufMax, strlen(test->in));
1032
+            } else {
1033
+                if (!r || bufSize != strlen(test->in) ||
1034
+                    strncmp(test->in, buf, bufSize) != 0) {
1035
+                   printf("Encoding of %s failed.  r = %d. Got %s (%ld), not %s\n",
1036
+                          test->out, r, buf, bufSize, test->in);
1037
+                } else {
1038
+                   printf("Good: %s -> %s (%ld)\n", test->out, buf, bufSize);
1039
+                }
1040
+            }
1041
+         }
1042
+      }
1043
+   }
1044
+
1045
+   for (bufMax = 0; bufMax < 100000; ++bufMax) {
1046
+      char random_in[8000];
1047
+      char random_out[16000];
1048
+      size_t bufSize;
1049
+
1050
+      Bool r = Base64_Encode(random_in, sizeof random_in,
1051
+                             random_out, sizeof random_out, &bufSize);
1052
+
1053
+      if (!r) {
1054
+            printf("Encoding failed.\n");
1055
+      }
1056
+   }
1057
+}
1058
+#endif
1059
+
1060
+
1061
+/*
1062
+ *----------------------------------------------------------------------------
1063
+ *
1064
+ * Base64_Decode --
1065
+ *
1066
+ *       Skips all whitespace anywhere. Converts characters, four at
1067
+ *       a time, starting at (or after) src from base - 64 numbers into three
1068
+ *       8 bit bytes in the target area. Returns the number of data bytes
1069
+ *       stored at the target in the provided out parameter.
1070
+ *
1071
+ * Results:
1072
+ *      TRUE on success, FALSE on failure.
1073
+ *
1074
+ * Side effects:
1075
+ *      None.
1076
+ *
1077
+ *----------------------------------------------------------------------------
1078
+ */
1079
+
1080
+Bool
1081
+Base64_Decode(char const *in,      // IN:
1082
+              uint8 *out,          // OUT:
1083
+              size_t outSize,      // IN:
1084
+              size_t *dataLength)  // OUT:
1085
+{
1086
+   return Base64_ChunkDecode(in, -1, out, outSize, dataLength);
1087
+}
1088
+
1089
+
1090
+/*
1091
+ *----------------------------------------------------------------------------
1092
+ *
1093
+ * Base64_ChunkDecode --
1094
+ *
1095
+ *       Skips all whitespace anywhere. Converts characters, four at
1096
+ *       a time, starting at (or after) src from base - 64 numbers into three
1097
+ *       8 bit bytes in the target area. Conversion stops after inSize (which
1098
+ *       must be a multiple of 4) characters, or an EOM marker. Returns the
1099
+ *       number of data bytes stored at the target in the provided out parameter.
1100
+ *
1101
+ * Results:
1102
+ *      TRUE on success, FALSE on failure.
1103
+ *
1104
+ * Side effects:
1105
+ *      None.
1106
+ *
1107
+ *----------------------------------------------------------------------------
1108
+ */
1109
+
1110
+Bool
1111
+Base64_ChunkDecode(char const *in,      // IN:
1112
+                   size_t inSize,       // IN:
1113
+                   uint8 *out,          // OUT:
1114
+                   size_t outSize,      // IN:
1115
+                   size_t *dataLength)  // OUT:
1116
+{
1117
+   uint32 b = 0;
1118
+   int n = 0;
1119
+   uintptr_t i = 0;
1120
+   size_t inputIndex = 0;
1121
+
1122
+   ASSERT(in);
1123
+   ASSERT(out || outSize == 0);
1124
+   ASSERT(dataLength);
1125
+   ASSERT((inSize == -1) || (inSize % 4) == 0);
1126
+   *dataLength = 0;
1127
+
1128
+   i = 0;
1129
+   for (;inputIndex < inSize;) {
1130
+      int p = base64Reverse[(unsigned char)in[inputIndex]];
1131
+
1132
+      if (UNLIKELY(p < 0)) {
1133
+         switch (p) {
1134
+         case WS:
1135
+            inputIndex++;
1136
+            break;
1137
+         case EOM:
1138
+            *dataLength = i;
1139
+            return TRUE;
1140
+         case ILLEGAL:
1141
+         default:
1142
+            return FALSE;
1143
+         }
1144
+      } else {
1145
+         inputIndex++;
1146
+         if (UNLIKELY(i >= outSize)) {
1147
+            return FALSE;
1148
+         }
1149
+         b = (b << 6) | p;
1150
+         n += 6;
1151
+         if (LIKELY(n >= 8)) {
1152
+            n -= 8;
1153
+            out[i++] = b >> n;
1154
+         }
1155
+      }
1156
+   }
1157
+   *dataLength = i;
1158
+   return TRUE;
1159
+}
1160
+
1161
+
1162
+/*
1163
+ *----------------------------------------------------------------------------
1164
+ *
1165
+ * Base64_ValidEncoding --
1166
+ *
1167
+ *      Returns TRUE if the specified input buffer is valid Base64 input.
1168
+ *
1169
+ * Results:
1170
+ *      TRUE or FALSE.
1171
+ *
1172
+ * Side effects:
1173
+ *      None.
1174
+ *
1175
+ *----------------------------------------------------------------------------
1176
+ */
1177
+
1178
+Bool
1179
+Base64_ValidEncoding(char const *src,   // IN:
1180
+                     size_t srcLength)  // IN:
1181
+{
1182
+   size_t i;
1183
+
1184
+   ASSERT(src);
1185
+   for (i = 0; i < srcLength; i++) {
1186
+      uint8 c = src[i]; /* MSVC CRT will die on negative arguments to is* */
1187
+
1188
+      if (!isalpha(c) && !isdigit(c) &&
1189
+          c != '+' && c != '=' && c != '/') {
1190
+         return FALSE;
1191
+      }
1192
+   }
1193
+
1194
+   return TRUE;
1195
+}
1196
+
1197
+
1198
+/*
1199
+ *----------------------------------------------------------------------------
1200
+ *
1201
+ * Base64_EncodedLength --
1202
+ *
1203
+ *      Given a binary buffer, how many bytes would it take to encode it.
1204
+ *
1205
+ * Results:
1206
+ *      Number of bytes needed to encode, including terminating NUL byte.
1207
+ *
1208
+ * Side effects:
1209
+ *      None.
1210
+ *
1211
+ *----------------------------------------------------------------------------
1212
+ */
1213
+
1214
+size_t
1215
+Base64_EncodedLength(uint8 const *src,  // IN:
1216
+                     size_t srcLength)  // IN:
1217
+{
1218
+   return ((srcLength + 2) / 3 * 4) + 1;
1219
+}
1220
+
1221
+
1222
+/*
1223
+ *----------------------------------------------------------------------------
1224
+ *
1225
+ * Base64_DecodedLength --
1226
+ *
1227
+ *      Given a base64 encoded string, how many bytes do we need to decode it.
1228
+ *      Assumes no whitespace.  This is not necessarily the length of the
1229
+ *      decoded data (Base64_Decode requires a few extra bytes... don't blame
1230
+ *      me, I didn't write it).
1231
+ *
1232
+ * Results:
1233
+ *      Number of bytes needed to decode input.
1234
+ *
1235
+ * Side effects:
1236
+ *      None.
1237
+ *
1238
+ *----------------------------------------------------------------------------
1239
+ */
1240
+
1241
+size_t
1242
+Base64_DecodedLength(char const *src,   // IN:
1243
+                     size_t srcLength)  // IN:
1244
+{
1245
+   size_t length;
1246
+
1247
+   ASSERT(src);
1248
+
1249
+   length = srcLength / 4 * 3;
1250
+   // PR 303173 - do the following check to avoid a negative value returned
1251
+   // from this function. Note: length can only be in a multiple of 3
1252
+   if (length > 2) {
1253
+      if (src[srcLength-1] == '=') {
1254
+         length--;
1255
+      }
1256
+      if (src[srcLength-2] == '=') {
1257
+         length--;
1258
+      }
1259
+   }
1260
+   return length;
1261
+}
1262
+
1263
+
1264
+/*
1265
+ *-----------------------------------------------------------------------------
1266
+ *
1267
+ * Base64_EasyEncode --
1268
+ *
1269
+ *      Base64-encode 'data' into a NUL-terminated string.
1270
+ *
1271
+ * Results:
1272
+ *      On success: TRUE. '*target' is set to an allocated string, that the
1273
+ *                  caller must eventually free().
1274
+ *      On failure: FALSE. '*target' is set to NULL.
1275
+ *
1276
+ * Side effects:
1277
+ *      None.
1278
+ *
1279
+ *-----------------------------------------------------------------------------
1280
+ */
1281
+
1282
+Bool
1283
+Base64_EasyEncode(const uint8 *src,  // IN: data to encode
1284
+                  size_t srcLength,  // IN: data size
1285
+                  char **target)     // OUT: encoded string
1286
+{
1287
+   Bool succeeded = FALSE;
1288
+   size_t size;
1289
+
1290
+   ASSERT(src);
1291
+   ASSERT(target);
1292
+
1293
+   size = Base64_EncodedLength(src, srcLength);
1294
+
1295
+   *target = (char *) malloc(size);
1296
+
1297
+   if (!*target) {
1298
+      goto exit;
1299
+   }
1300
+
1301
+   if (!Base64_Encode(src, srcLength, *target, size, NULL)) {
1302
+      goto exit;
1303
+   }
1304
+
1305
+   succeeded = TRUE;
1306
+
1307
+exit:
1308
+   if (!succeeded) {
1309
+      free(*target);
1310
+      *target = NULL;
1311
+   }
1312
+
1313
+   return succeeded;
1314
+}
1315
+
1316
+
1317
+/*
1318
+ *-----------------------------------------------------------------------------
1319
+ *
1320
+ * Base64_EasyDecode --
1321
+ *
1322
+ *      Base64-decode 'src' into a buffer.
1323
+ *
1324
+ * Results:
1325
+ *      TRUE on success, FALSE otherwise, plus the decoded data on success.
1326
+ *      Caller must free 'target' with free().
1327
+ *
1328
+ * Side effects:
1329
+ *      None.
1330
+ *
1331
+ *-----------------------------------------------------------------------------
1332
+ */
1333
+
1334
+Bool
1335
+Base64_EasyDecode(const char *src,   // IN: data to decode
1336
+                  uint8 **target,    // OUT: decoded data
1337
+                  size_t *targSize)  // OUT: data size
1338
+{
1339
+   Bool succeeded = FALSE;
1340
+   size_t theDataSize;
1341
+   uint8 *theData;
1342
+
1343
+   ASSERT(src);
1344
+   ASSERT(target);
1345
+   ASSERT(targSize);
1346
+
1347
+   theDataSize = Base64_DecodedLength(src, strlen(src));
1348
+
1349
+   theData = (uint8 *) malloc(theDataSize);
1350
+
1351
+   if (!theData) {
1352
+      goto exit;
1353
+   }
1354
+
1355
+   if (!Base64_Decode(src, theData, theDataSize, &theDataSize)) {
1356
+      free(theData);
1357
+      goto exit;
1358
+   }
1359
+
1360
+   *target = theData;
1361
+   *targSize = theDataSize;
1362
+
1363
+   succeeded = TRUE;
1364
+
1365
+exit:
1366
+   if (!succeeded) {
1367
+      *target = NULL;
1368
+      *targSize = 0;
1369
+   }
1370
+
1371
+   return succeeded;
1372
+}
1373
--- lib/foundryMsg/foundryMsg.c.orig	2013-12-27 16:40:58.000000000 +0000
1374
+++ lib/foundryMsg/foundryMsg.c	2013-12-27 16:41:30.000000000 +0000
1375
@@ -29,7 +29,7 @@
1376
 #include "vm_version.h"
1377
 #include "util.h"
1378
 #include "str.h"
1379
-#include "base64.h"
1380
+#include "ovmbase64.h"
1381
 
1382
 #include "vixOpenSource.h"
1383
 #include "vixCommands.h"
1384
--- lib/file/file.c.orig	2013-12-27 16:40:58.000000000 +0000
1385
+++ lib/file/file.c	2013-12-27 16:41:39.000000000 +0000
1386
@@ -60,7 +60,7 @@
1387
 #include "fileIO.h"
1388
 #include "fileInt.h"
1389
 #include "dynbuf.h"
1390
-#include "base64.h"
1391
+#include "ovmbase64.h"
1392
 #include "timeutil.h"
1393
 #include "hostinfo.h"
1394
 #include "hostType.h"
1395
--- lib/misc/Makefile.in.orig	2013-09-23 15:51:46.000000000 +0000
1396
+++ lib/misc/Makefile.in	2013-12-27 16:57:14.000000000 +0000
1397
@@ -82,7 +82,7 @@
1398
 CONFIG_CLEAN_VPATH_FILES =
1399
 LTLIBRARIES = $(noinst_LTLIBRARIES)
1400
 libMisc_la_LIBADD =
1401
-am_libMisc_la_OBJECTS = atomic.lo base64.lo codeset.lo codesetBase.lo \
1402
+am_libMisc_la_OBJECTS = atomic.lo ovmbase64.lo codeset.lo codesetBase.lo \
1403
 	codesetOld.lo dynarray.lo dynbuf.lo escape.lo hashTable.lo \
1404
 	hostinfo.lo hostinfoHV.lo hostinfoPosix.lo hostname.lo \
1405
 	hostType.lo idLinux.lo iovector.lo logFixed.lo machineID.lo \
1406
@@ -301,7 +301,7 @@
1407
 top_builddir = @top_builddir@
1408
 top_srcdir = @top_srcdir@
1409
 noinst_LTLIBRARIES = libMisc.la
1410
-libMisc_la_SOURCES = atomic.c base64.c codeset.c codesetBase.c \
1411
+libMisc_la_SOURCES = atomic.c ovmbase64.c codeset.c codesetBase.c \
1412
 	codesetOld.c dynarray.c dynbuf.c escape.c hashTable.c \
1413
 	hostinfo.c hostinfoHV.c hostinfoPosix.c hostname.c hostType.c \
1414
 	idLinux.c iovector.c logFixed.c machineID.c miscSolaris.c \
1415
--- lib/misc/Makefile.am.orig	2013-12-27 16:40:58.000000000 +0000
1416
+++ lib/misc/Makefile.am	2013-12-27 16:42:00.000000000 +0000
1417
@@ -19,7 +19,7 @@
1418
 
1419
 libMisc_la_SOURCES =
1420
 libMisc_la_SOURCES += atomic.c
1421
-libMisc_la_SOURCES += base64.c
1422
+libMisc_la_SOURCES += ovmbase64.c
1423
 libMisc_la_SOURCES += codeset.c
1424
 libMisc_la_SOURCES += codesetBase.c
1425
 libMisc_la_SOURCES += codesetOld.c
1426
--- lib/user/util.c.orig	2013-12-27 16:40:58.000000000 +0000
1427
+++ lib/user/util.c	2013-12-27 16:42:25.000000000 +0000
1428
@@ -69,7 +69,7 @@
1429
 #include "file.h"
1430
 #include "util_shared.h"
1431
 #include "escape.h"
1432
-#include "base64.h"
1433
+#include "ovmbase64.h"
1434
 #include "unicode.h"
1435
 #include "posix.h"
1436
 
1437
--- services/plugins/vix/foundryToolsDaemon.c.orig	2013-12-27 16:40:58.000000000 +0000
1438
+++ services/plugins/vix/foundryToolsDaemon.c	2013-12-27 16:42:38.000000000 +0000
1439
@@ -68,7 +68,7 @@
1440
 #include "guest_msg_def.h"
1441
 #include "conf.h"
1442
 #include "vixCommands.h"
1443
-#include "base64.h"
1444
+#include "ovmbase64.h"
1445
 #include "syncDriver.h"
1446
 #include "hgfsServerManager.h"
1447
 #include "hgfs.h"
1448
--- services/plugins/vix/vixTools.c.orig	2013-12-27 16:40:58.000000000 +0000
1449
+++ services/plugins/vix/vixTools.c	2013-12-27 16:42:46.000000000 +0000
1450
@@ -87,7 +87,7 @@
1451
 #include "guest_msg_def.h"
1452
 #include "conf.h"
1453
 #include "vixCommands.h"
1454
-#include "base64.h"
1455
+#include "ovmbase64.h"
1456
 #include "hostinfo.h"
1457
 #include "hgfsServerManager.h"
1458
 #include "hgfs.h"
1459
--- xferlogs/xferlogs.c.orig	2013-12-27 16:40:58.000000000 +0000
1460
+++ xferlogs/xferlogs.c	2013-12-27 16:43:01.000000000 +0000
1461
@@ -50,7 +50,7 @@
1462
 #include "debug.h"
1463
 #include "rpcvmx.h"
1464
 #include "rpcout.h"
1465
-#include "base64.h"
1466
+#include "ovmbase64.h"
1467
 #include "str.h"
1468
 #include "strutil.h"
1469
 
1470
--- lib/misc/ovmbase64.c.orig	2013-12-27 16:50:49.000000000 +0000
1471
+++ lib/misc/ovmbase64.c	2013-12-27 16:50:58.000000000 +0000
1472
@@ -48,7 +48,7 @@
1473
 #include <string.h>
1474
 #include "vm_basic_types.h"
1475
 #include "vm_assert.h"
1476
-#include "base64.h"
1477
+#include "ovmbase64.h"
1478
 
1479
 static const char Base64[] =
1480
 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
(-)files/patch-configure (-40 / +11 lines)
Lines 1-40 Link Here
1
--- ./configure.orig	2013-09-23 15:51:43.000000000 +0000
1
--- configure.orig	2017-01-11 20:40:42.694207000 +0000
2
+++ ./configure	2014-04-23 15:36:44.174844399 +0000
2
+++ configure	2017-01-11 20:41:03.256056000 +0000
3
@@ -2823,6 +2823,9 @@
3
@@ -20602,7 +20602,7 @@
4
    x86_64)
4
    # First, try any user-defined CUSTOM_* flags.
5
       userSpaceBitness="64"
5
    #
6
       ;;
6
    if test -n "${CUSTOM_SSL_CPPFLAGS}" || test -n "${CUSTOM_SSL_LIBS}"; then
7
+   amd64)
7
-      ac_vmw_custom_libs="${CUSTOM_SSL_LIBS} -lssl"
8
+      userSpaceBitness="64"
8
+      ac_vmw_custom_libs="${CUSTOM_SSL_LIBS} -lssl -lcrypto"
9
+      ;;
9
       if test -n ""; then
10
    *)
10
          ORIGINAL_CPPFLAGS="$CPPFLAGS"
11
       as_fn_error $? "Unknown architecture." "$LINENO" 5
11
          CPPFLAGS="${CUSTOM_SSL_CPPFLAGS} $CPPFLAGS"
12
       ;;
13
@@ -21733,18 +21736,6 @@
14
 
15
 done
16
 
17
-for ac_header in unwind.h
18
-do :
19
-  ac_fn_c_check_header_mongrel "$LINENO" "unwind.h" "ac_cv_header_unwind_h" "$ac_includes_default"
20
-if test "x$ac_cv_header_unwind_h" = xyes; then :
21
-  cat >>confdefs.h <<_ACEOF
22
-#define HAVE_UNWIND_H 1
23
-_ACEOF
24
-
25
-fi
26
-
27
-done
28
-
29
 
30
 ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
31
 if test "x$ac_cv_header_wchar_h" = xyes; then :
32
@@ -22238,7 +22229,7 @@
33
 
34
 ### General flags / actions
35
 CFLAGS="$CFLAGS -Wall"
36
-CFLAGS="$CFLAGS -Werror"
37
+CFLAGS="$CFLAGS -Werror -Wno-unused-function"
38
 
39
 # -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident' in Xlib.h on OpenSolaris.
40
 for TEST_CFLAG in -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing \
(-)files/patch-freebsd-8 (-170 lines)
Lines 1-170 Link Here
1
--- modules/freebsd/vmhgfs/vnops.c.orig	2009-02-18 17:02:35.000000000 +0900
2
+++ modules/freebsd/vmhgfs/vnops.c	2009-03-01 17:47:10.000000000 +0900
3
@@ -325,7 +325,11 @@
4
 */
5
 {
6
    struct vnode *vp = ap->a_vp;
7
+#if __FreeBSD_version >= 800001
8
+   int mode = ap->a_accmode;
9
+#else
10
    int mode = ap->a_mode;
11
+#endif
12
    HgfsAccessMode accessMode = 0;
13
    Bool isDir = vp->v_type == VDIR;
14
    if (mode & VREAD) {
15
--- modules/freebsd/vmblock/vfsops.c.orig	2009-03-18 03:03:21.000000000 -0400
16
+++ modules/freebsd/vmblock/vfsops.c	2009-05-23 02:25:50.892549675 -0400
17
@@ -126,6 +126,11 @@
18
    char *target;
19
    int len, error = 0;
20
 
21
+#if __FreeBSD_version >= 800087
22
+   struct thread *td;
23
+   td = curthread;
24
+#endif
25
+
26
    VMBLOCKDEBUG("VMBlockVFSMount(mp = %p)\n", (void *)mp);
27
 
28
    /*
29
@@ -273,6 +278,11 @@
30
    int error;
31
    int flags = 0, removed = 0;
32
 
33
+#if __FreeBSD_version >= 800087
34
+   struct thread *td;
35
+   td = curthread;
36
+#endif
37
+
38
    VMBLOCKDEBUG("VMBlockVFSUnmount: mp = %p\n", (void *)mp);
39
 
40
    xmp = MNTTOVMBLOCKMNT(mp);
41
@@ -448,10 +458,15 @@
42
 VMBlockVFSSync(struct mount *mp,        // Ignored
43
                int waitfor)             // Ignored
44
 #else
45
+#if __FreeBSD_version >= 800087
46
+VMBlockVFSSync(struct mount *mp,
47
+               int waitfor)
48
+#else
49
 VMBlockVFSSync(struct mount *mp,        // Ignored
50
                int waitfor,             // Ignored
51
                struct thread *td)       // Ignored
52
 #endif
53
+#endif
54
 {
55
    return 0;
56
 }
57
--- modules/freebsd/vmhgfs/vfsops.c.orig	2009-03-18 03:03:26.000000000 -0400
58
+++ modules/freebsd/vmhgfs/vfsops.c	2009-05-23 02:56:39.608109670 -0400
59
@@ -109,8 +109,12 @@
60
  */
61
 
62
 static int
63
+#if __FreeBSD_version >= 800087
64
+HgfsVfsMount(struct mount *mp)
65
+#else
66
 HgfsVfsMount(struct mount *mp,  // IN: structure representing the file system
67
              struct thread *td) // IN: thread which is mounting the file system
68
+#endif
69
 {
70
    HgfsSuperInfo *sip;
71
    struct vnode *vp;
72
@@ -122,6 +126,10 @@
73
    int *uid = NULL;
74
    Bool *gidSet = NULL;
75
    int *gid = NULL;
76
+#if __FreeBSD_version >= 800087
77
+   struct thread *td;
78
+   td = curthread;
79
+#endif
80
 
81
    /*
82
     * - Examine/validate mount flags from userland.
83
@@ -145,7 +153,11 @@
84
     * Since Hgfs requires the caller to be root, only allow mount attempts made
85
     * by the superuser.
86
     */
87
+#if __FreeBSD_version >= 800001
88
+   if ((ret = priv_check(td, PRIV_VFS_MOUNT)) != 0) {
89
+#else
90
    if ((ret = suser(td)) != 0) {
91
+#endif
92
       return ret;
93
    }
94
 
95
@@ -277,11 +289,19 @@
96
  */
97
 
98
 static int
99
+#if __FreeBSD_version >= 800087
100
+HgfsVfsUnmount(struct mount *mp, int mntflags)
101
+#else
102
 HgfsVfsUnmount(struct mount *mp, int mntflags, struct thread *td)
103
+#endif
104
 {
105
    HgfsSuperInfo *sip;
106
    int ret = 0;
107
    int flags = 0;
108
+#if __FreeBSD_version >= 800087
109
+   struct thread *td;
110
+   td = curthread;
111
+#endif
112
 
113
    sip = (HgfsSuperInfo *)mp->mnt_data;
114
 
115
@@ -348,10 +368,18 @@
116
  */
117
 
118
 static int
119
+#if __FreeBSD_version >= 800087
120
+HgfsVfsStatfs(struct mount *mp, struct statfs *sbp)
121
+#else
122
 HgfsVfsStatfs(struct mount *mp, struct statfs *sbp, struct thread *td)
123
+#endif
124
 {
125
    int ret = 0;
126
    struct vnode *vp;
127
+#if __FreeBSD_version >= 800087
128
+   struct thread *td;
129
+   td = curthread;
130
+#endif
131
 
132
    /* We always want HGFS_BLOCKSIZE to be a power of two */
133
    ASSERT_ON_COMPILE(HGFS_IS_POWER_OF_TWO(HGFS_BLOCKSIZE));
134
@@ -361,8 +389,11 @@
135
     * we got from a call to vfs_getnewfsid() in HgfsVfsMount()
136
     */
137
    bcopy(&mp->mnt_stat, sbp, sizeof mp->mnt_stat);
138
-
139
+#if __FreeBSD_version >= 800087
140
+   ret = HgfsVfsRoot(mp, LK_SHARED, &vp);
141
+#else
142
    ret = HgfsVfsRoot(mp, LK_SHARED, &vp, td);
143
+#endif
144
    if (ret) {
145
       DEBUG(VM_DEBUG_FAIL, "HgfsVfsRoot failed\n");
146
       return ret;
147
@@ -397,13 +428,23 @@
148
  */
149
 
150
 static int
151
+#if __FreeBSD_version >= 800087
152
+HgfsVfsRoot(struct mount *mp,
153
+            int flags,
154
+	    struct vnode **vpp)
155
+#else
156
 HgfsVfsRoot(struct mount *mp,   // IN: Filesystem structure
157
             int flags,          // IN: Flags to vget
158
             struct vnode **vpp, // OUT: Address of root vnode
159
             struct thread *td)  // IN: Thread structure
160
+#endif
161
 {
162
    HgfsSuperInfo *sip = (HgfsSuperInfo *)mp->mnt_data;
163
    int ret = 0;
164
+#if __FreeBSD_version >= 800087
165
+   struct thread *td;
166
+   td = curthread;
167
+#endif
168
 
169
    *vpp = NULL;
170
 
(-)files/patch-getpwnam (-40 lines)
Lines 1-40 Link Here
1
--- lib/auth/authPosix.c	2008-03-19 08:49:49.000000000 +0100
2
+++ lib/auth/authPosix.c	2008-03-27 11:20:20.000000000 +0100
3
@@ -264,7 +264,11 @@
4
 #endif
5
    /* If this point is reached, the user has been authenticated. */
6
    setpwent();
7
+#if defined(__FreeBSD__)
8
+   pwd = getpwnam(user);
9
+#else
10
    pwd = Posix_Getpwnam(user);
11
+#endif
12
    endpwent();
13
 
14
 #else /* !USE_PAM */
15
@@ -274,7 +278,11 @@
16
       corresponding #endif below. */
17
    
18
    setpwent(); //XXX can kill?
19
+#if defined(__FreeBSD__)
20
+   pwd = getpwnam(user);
21
+#else
22
    pwd = Posix_Getpwnam(user);
23
+#endif
24
    endpwent(); //XXX can kill?
25
 
26
    if (!pwd) {
27
--- lib/impersonate/impersonatePosix.c	2008-03-19 08:49:50.000000000 +0100
28
+++ lib/impersonate/impersonatePosix.c	2008-03-27 11:21:38.000000000 +0100
29
@@ -432,7 +432,11 @@
30
    struct passwd *ppw = &pw;
31
    int error;
32
 
33
+#if defined(__FreeBSD__)
34
+   if ((error = getpwnam_r(user, &pw, buffer, BUFSIZ, &ppw)) != 0 || !ppw) {
35
+#else
36
    if ((error = Posix_Getpwnam_r(user, &pw, buffer, BUFSIZ, &ppw)) != 0 || !ppw) {
37
+#endif
38
       if (error == 0) {
39
          error = ENOENT;
40
       }
(-)files/patch-hgfsProto.h (-22 lines)
Lines 1-22 Link Here
1
--- lib/include/hgfsProto.h.orig
2
+++ lib/include/hgfsProto.h
3
@@ -148,6 +148,9 @@
4
    HGFS_OP_SET_EAS_V4,            /* Add or modify extended attributes. */
5
 
6
    HGFS_OP_MAX,                   /* Dummy op, must be last in enum */
7
+
8
+/* If a V4 packet is being processed as a legacy packet it will have this opcode. */
9
+   HGFS_V4_LEGACY_OPCODE = 0xff,
10
 } HgfsOp;
11
 
12
 
13
@@ -155,9 +158,6 @@
14
 #define HGFS_VERSION_OLD           (1 << 0)
15
 #define HGFS_VERSION_3             (1 << 1)
16
 
17
-/* If a V4 packet is being processed as a legacy packet it will have this opcode. */
18
-#define HGFS_V4_LEGACY_OPCODE      0xff
19
-
20
 /* XXX: Needs change when VMCI is supported. */
21
 #define HGFS_REQ_PAYLOAD_SIZE_V3(hgfsReq) (sizeof *hgfsReq + sizeof(HgfsRequest))
22
 #define HGFS_REP_PAYLOAD_SIZE_V3(hgfsRep) (sizeof *hgfsRep + sizeof(HgfsReply))
(-)files/patch-hgfsmounter-Makefile.in (-15 / +5 lines)
Lines 1-22 Link Here
1
--- hgfsmounter/Makefile.in.orig	2011-09-21 18:25:50.000000000 +0000
1
--- hgfsmounter/Makefile.in.orig	2017-01-11 21:31:30.246368000 -0500
2
+++ hgfsmounter/Makefile.in	2011-09-25 04:03:22.000000000 +0000
2
+++ hgfsmounter/Makefile.in	2017-01-11 21:31:57.886822000 -0500
3
@@ -606,14 +606,14 @@
3
@@ -584,9 +584,6 @@
4
 @FREEBSD_TRUE@install-exec-hook:
4
 @FREEBSD_TRUE@	mv $(DESTDIR)$(sbindir)/mount.vmhgfs \
5
 @FREEBSD_TRUE@	mv $(DESTDIR)$(sbindir)/mount.vmhgfs \
5
 @FREEBSD_TRUE@		$(DESTDIR)$(sbindir)/mount_vmhgfs
6
 @FREEBSD_TRUE@		$(DESTDIR)$(sbindir)/mount_vmhgfs
6
 @FREEBSD_TRUE@	-$(MKDIR_P) $(DESTDIR)/sbin
7
-@FREEBSD_TRUE@	-$(MKDIR_P) $(DESTDIR)/sbin
7
-@FREEBSD_TRUE@	-$(LN_S) $(DESTDIR)$(sbindir)/mount_vmhgfs \
8
-@FREEBSD_TRUE@	-$(LN_S) $(DESTDIR)$(sbindir)/mount_vmhgfs \
8
-@FREEBSD_TRUE@		$(DESTDIR)/sbin/mount_vmhgfs &> /dev/null
9
-@FREEBSD_TRUE@		$(DESTDIR)/sbin/mount_vmhgfs &> /dev/null
9
+#@FREEBSD_TRUE@	-$(LN_S) $(DESTDIR)$(sbindir)/mount_vmhgfs \
10
+#@FREEBSD_TRUE@		$(DESTDIR)/sbin/mount_vmhgfs &> /dev/null
11
 @FREEBSD_TRUE@uninstall-hook:
10
 @FREEBSD_TRUE@uninstall-hook:
12
 @FREEBSD_TRUE@	rm -f $(DESTDIR)$(sbindir)/mount_vmhgfs
11
 @FREEBSD_TRUE@	rm -f $(DESTDIR)$(sbindir)/mount_vmhgfs
13
 @FREEBSD_FALSE@install-exec-hook:
12
 @FREEBSD_FALSE@install-exec-hook:
14
-@FREEBSD_FALSE@	-$(MKDIR_P) $(DESTDIR)/sbin
15
-@FREEBSD_FALSE@	-$(LN_S) $(DESTDIR)$(sbindir)/mount.vmhgfs \
16
-@FREEBSD_FALSE@		$(DESTDIR)/sbin/mount.vmhgfs &> /dev/null
17
+#@FREEBSD_FALSE@	-$(MKDIR_P) $(DESTDIR)/sbin
18
+#@FREEBSD_FALSE@	-$(LN_S) $(DESTDIR)$(sbindir)/mount.vmhgfs \
19
+#@FREEBSD_FALSE@		$(DESTDIR)/sbin/mount.vmhgfs &> /dev/null
20
 @FREEBSD_FALSE@uninstall-hook:
21
 @FREEBSD_FALSE@	rm -f $(DESTDIR)/sbin/mount.vmhgfs
22
 
(-)files/patch-libDeployPkg__processPosix.c (+11 lines)
Line 0 Link Here
1
--- libDeployPkg/processPosix.c.orig	2017-01-11 22:58:15.400763000 +0000
2
+++ libDeployPkg/processPosix.c	2017-01-11 22:59:14.103985000 +0000
3
@@ -28,6 +28,8 @@
4
 #include <unistd.h>
5
 #include <fcntl.h>
6
 #include <sys/wait.h>
7
+#include <sys/types.h>
8
+#include <signal.h>
9
 
10
 #include "util.h"
11
 
(-)files/patch-lib__include__vm_assert.h (-12 lines)
Lines 1-12 Link Here
1
--- lib/include/vm_assert.h.orig	2013-09-23 17:51:10.000000000 +0200
2
+++ lib/include/vm_assert.h	2015-02-04 15:55:56.011187000 +0100
3
@@ -363,7 +363,8 @@
4
 #define ASSERT_ON_COMPILE(e) \
5
    do { \
6
       enum { AssertOnCompileMisused = ((e) ? 1 : -1) }; \
7
-      typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
8
+      typedef char AssertOnCompileFailed[AssertOnCompileMisused] \
9
+         __attribute__((__unused__)); \
10
    } while (0)
11
 
12
 
(-)files/patch-lib__include__vm_atomic.h (-12 lines)
Lines 1-12 Link Here
1
--- lib/include/vm_atomic.h.orig	2013-09-23 17:51:10.000000000 +0200
2
+++ lib/include/vm_atomic.h	2015-02-04 16:28:59.372337000 +0100
3
@@ -2460,7 +2460,8 @@
4
                                       && 8 * sizeof (out) == size             \
5
                                       && 8 * sizeof (cast) == size            \
6
                                          ? 1 : -1 };                          \
7
-      typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
8
+      typedef char AssertOnCompileFailed[AssertOnCompileMisused]              \
9
+         __attribute__((__unused__));                                         \
10
    }                                                                          \
11
                                                                               \
12
                                                                               \
(-)files/patch-lib_include_vmware_tools_log.h (-13 lines)
Lines 1-13 Link Here
1
--- lib/include/vmware/tools/log.h.orig	2014-11-07 12:41:57.111095753 +0100
2
+++ lib/include/vmware/tools/log.h	2014-11-07 12:42:24.867212316 +0100
3
@@ -134,8 +134,9 @@
4
  *******************************************************************************
5
  */
6
 
7
+#ifndef g_info
8
 #define g_info(fmt, ...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, fmt, ## __VA_ARGS__)
9
-
10
+#endif
11
 
12
 /*
13
  *******************************************************************************
(-)files/patch-libvmtools__i18n.c (-18 lines)
Lines 1-18 Link Here
1
--- libvmtools/i18n.c.orig	2014-04-17 19:02:44.102203216 +0000
2
+++ libvmtools/i18n.c	2014-04-17 19:08:48.881598972 +0000
3
@@ -88,6 +88,7 @@
4
 }
5
 
6
 
7
+#ifdef BUG_ON
8
 /*
9
  ******************************************************************************
10
  * MsgHasMsgID --                                                       */ /**
11
@@ -112,6 +113,7 @@
12
           *(s += MSG_MAGIC_LEN) == '(' &&
13
           strchr(s + 1, ')') != NULL;
14
 }
15
+#endif
16
 
17
 
18
 /*
(-)files/patch-modules-Makefile.in (-8 / +3 lines)
Lines 1-6 Link Here
1
--- modules/Makefile.in.orig	2009-04-06 18:44:58.000000000 -0400
1
--- modules/Makefile.in.orig	2017-01-11 21:40:55.849672000 -0500
2
+++ modules/Makefile.in	2009-04-06 18:45:57.000000000 -0400
2
+++ modules/Makefile.in	2017-01-11 21:41:10.446157000 -0500
3
@@ -528,11 +528,11 @@
3
@@ -543,11 +543,6 @@
4
 @SOLARIS_TRUE@	   $(MAKE) VM_UNAME=$(KERNEL_RELEASE) MV=mv RM=rm                      \
4
 @SOLARIS_TRUE@	   $(MAKE) VM_UNAME=$(KERNEL_RELEASE) MV=mv RM=rm                      \
5
 @SOLARIS_TRUE@	      -C "$(modulesrc)/$(MODULES_OS)/$$MOD" install || exit 1;         \
5
 @SOLARIS_TRUE@	      -C "$(modulesrc)/$(MODULES_OS)/$$MOD" install || exit 1;         \
6
 @SOLARIS_TRUE@	done
6
 @SOLARIS_TRUE@	done
Lines 9-19 Link Here
9
-@FREEBSD_TRUE@	   $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko                \
9
-@FREEBSD_TRUE@	   $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko                \
10
-@FREEBSD_TRUE@	      $(DESTDIR)$(MODULES_DIR);                                        \
10
-@FREEBSD_TRUE@	      $(DESTDIR)$(MODULES_DIR);                                        \
11
-@FREEBSD_TRUE@	done
11
-@FREEBSD_TRUE@	done
12
+#@FREEBSD_TRUE@	for MOD in $(MODULES); do                                              \
13
+#@FREEBSD_TRUE@	   $(INSTALL) -d $(DESTDIR)$(MODULES_DIR);                             \
14
+#@FREEBSD_TRUE@	   $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko                \
15
+#@FREEBSD_TRUE@	      $(DESTDIR)$(MODULES_DIR);                                        \
16
+#@FREEBSD_TRUE@	done
17
 @LINUX_TRUE@	for MOD in $(MODULES); do                                              \
12
 @LINUX_TRUE@	for MOD in $(MODULES); do                                              \
18
 @LINUX_TRUE@	   $(INSTALL) -d $(DESTDIR)`eval echo '$$'$${MOD}dir`;                 \
13
 @LINUX_TRUE@	   $(INSTALL) -d $(DESTDIR)`eval echo '$$'$${MOD}dir`;                 \
19
 @LINUX_TRUE@	   $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD/$$MOD.ko          \
14
 @LINUX_TRUE@	   $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD/$$MOD.ko          \
(-)files/patch-modules__freebsd__vmhgfs__channel.h (-11 lines)
Lines 1-11 Link Here
1
--- modules/freebsd/vmhgfs/channel.h.orig	2014-04-23 15:36:34.432844311 +0000
2
+++ modules/freebsd/vmhgfs/channel.h	2014-04-23 15:36:44.389843756 +0000
3
@@ -21,7 +21,7 @@
4
  */
5
 
6
 #ifndef _HGFS_CHANNEL_H_
7
-#define _HGFS_CHANNEL__H_
8
+#define _HGFS_CHANNEL_H_
9
 
10
 #include "hgfs_kernel.h"
11
 #include "requestInt.h"
(-)files/patch-net_compat.h (-13 / +9 lines)
Lines 1-17 Link Here
1
--- modules/freebsd/vmxnet/net_compat.h.orig	2011-09-21 14:25:15.000000000 -0400
1
--- modules/freebsd/vmxnet/net_compat.h.orig	2017-01-12 00:25:56.262647000 -0500
2
+++ modules/freebsd/vmxnet/net_compat.h	2012-06-28 17:05:44.638526644 -0400
2
+++ modules/freebsd/vmxnet/net_compat.h	2017-01-12 00:26:48.037008000 -0500
3
@@ -170,9 +170,12 @@
3
@@ -174,8 +174,8 @@
4
 #if __FreeBSD_version < 505000
4
 #   define VXN_IF_ADDR_LOCK(_ifp)       IF_ADDR_LOCK((_ifp))
5
 #   define VXN_IF_ADDR_LOCK(_ifp)
5
 #   define VXN_IF_ADDR_UNLOCK(_ifp)     IF_ADDR_UNLOCK((_ifp))
6
 #   define VXN_IF_ADDR_UNLOCK(_ifp)
7
+#elif __FreeBSD_version < 1000000
8
+#  define VXN_IF_ADDR_LOCK(_ifp)           IF_ADDR_LOCK((_ifp))
9
+#  define VXN_IF_ADDR_UNLOCK(_ifp)         IF_ADDR_UNLOCK((_ifp))
10
 #else
6
 #else
11
-#   define VXN_IF_ADDR_LOCK(_ifp)       IF_ADDR_LOCK((_ifp))
7
-#   define VXN_IF_ADDR_LOCK(_ifp)       if_maddr_rlock((_ifp))
12
-#   define VXN_IF_ADDR_UNLOCK(_ifp)     IF_ADDR_UNLOCK((_ifp))
8
-#   define VXN_IF_ADDR_UNLOCK(_ifp)     if_maddr_runlock((_ifp))
13
+#  define VXN_IF_ADDR_LOCK(_ifp)           IF_ADDR_WLOCK((_ifp))
9
+#   define VXN_IF_ADDR_LOCK(_ifp)       IF_ADDR_WLOCK((_ifp))
14
+#  define VXN_IF_ADDR_UNLOCK(_ifp)         IF_ADDR_WUNLOCK((_ifp))
10
+#   define VXN_IF_ADDR_UNLOCK(_ifp)     IF_ADDR_WUNLOCK((_ifp))
15
 #endif
11
 #endif
16
 
12
 
17
 #endif /* _VXN_NET_COMPAT_H_ */
13
 #endif /* _VXN_NET_COMPAT_H_ */
(-)files/patch-scripts-Makefile (-4 / +4 lines)
Lines 1-6 Link Here
1
--- scripts/Makefile.in.orig	2010-05-22 04:41:58.000000000 +0200
1
--- scripts/Makefile.in.orig	2017-01-11 20:52:28.004220000 -0500
2
+++ scripts/Makefile.in	2010-05-22 04:43:57.000000000 +0200
2
+++ scripts/Makefile.in	2017-01-11 20:52:42.153725000 -0500
3
@@ -236,7 +236,7 @@
3
@@ -256,7 +256,7 @@
4
 top_srcdir = @top_srcdir@
4
 top_srcdir = @top_srcdir@
5
 defaultscripts = poweron-vm-default poweroff-vm-default \
5
 defaultscripts = poweron-vm-default poweroff-vm-default \
6
 	suspend-vm-default resume-vm-default
6
 	suspend-vm-default resume-vm-default
Lines 7-11 Link Here
7
-confdir = /etc/vmware-tools
7
-confdir = /etc/vmware-tools
8
+confdir = ${prefix}/share/vmware-tools
8
+confdir = ${prefix}/share/vmware-tools
9
 conf_SCRIPTS = ./common/vm-support ./common/statechange.subr \
9
 conf_SCRIPTS = ./common/vm-support ./common/statechange.subr \
10
 	$(defaultscripts)
10
 	$(am__append_1) $(defaultscripts)
11
 vmwsrcdir = $(confdir)/scripts/vmware
11
 vmwsrcdir = $(confdir)/scripts/vmware
(-)files/patch-scripts_linux_pam.d_vmtoolsd (-7 / +7 lines)
Lines 1-10 Link Here
1
--- scripts/linux/pam.d/vmtoolsd.orig	2013-09-23 15:51:10 UTC
1
--- scripts/linux/pam.d/vmtoolsd.orig	2017-01-12 00:17:37.539274000 -0500
2
+++ scripts/linux/pam.d/vmtoolsd
2
+++ scripts/linux/pam.d/vmtoolsd	2017-01-12 00:18:35.031527000 -0500
3
@@ -1,7 +1,3 @@
3
@@ -1,7 +1,5 @@
4
 #%PAM-1.0
4
 #%PAM-1.0
5
-auth       sufficient       pam_unix2.so nullok
5
 auth       required         pam_shells.so
6
 auth       sufficient       pam_unix.so shadow nullok
6
 auth       sufficient       pam_unix.so shadow
7
-auth       required         pam_unix_auth.so shadow nullok
7
-auth       required         pam_unix_auth.so shadow
8
-account    sufficient       pam_unix2.so
8
 account    required         pam_shells.so
9
 account    sufficient       pam_unix.so
9
 account    sufficient       pam_unix.so
10
-account    required         pam_unix_acct.so
10
-account    required         pam_unix_acct.so
(-)files/patch-toolbox__toolboxcmd-shrink.c (-11 lines)
Lines 1-11 Link Here
1
--- toolbox/toolboxcmd-shrink.c.orig	2013-09-23 17:51:10.000000000 +0200
2
+++ toolbox/toolboxcmd-shrink.c	2014-11-25 17:57:44.000000000 +0100
3
@@ -391,7 +391,7 @@ ShrinkDoWipeAndShrink(char *mountPoint, 
4
     * Verify that wiping/shrinking are permitted before going through with the
5
     * wiping operation.
6
     */
7
-   if (!ShrinkGetWiperState() == WIPER_ENABLED && !Wiper_IsWipeSupported(part)) {
8
+   if (ShrinkGetWiperState() != WIPER_ENABLED && !Wiper_IsWipeSupported(part)) {
9
       g_debug("%s cannot be wiped / shrunk\n", mountPoint);
10
       ToolsCmd_PrintErr("%s",
11
                         SU_(disk.shrink.disabled, SHRINK_DISABLED_ERR));
(-)files/patch-util_misc.c (-12 / +3 lines)
Lines 1-6 Link Here
1
--- lib/misc/util_misc.c.orig	2009-04-14 02:38:09.000000000 +0200
1
--- lib/misc/util_misc.c.orig	2017-01-12 00:14:04.989252000 -0500
2
+++ lib/misc/util_misc.c	2009-04-14 02:39:00.000000000 +0200
2
+++ lib/misc/util_misc.c	2017-01-12 00:14:12.099031000 -0500
3
@@ -292,7 +292,7 @@
3
@@ -307,7 +307,7 @@ Util_CanonicalPathsIdentical(const char 
4
    return (strcmp(path1, path2) == 0);
4
    return (strcmp(path1, path2) == 0);
5
 #elif defined(_WIN32)
5
 #elif defined(_WIN32)
6
    return (_stricmp(path1, path2) == 0);
6
    return (_stricmp(path1, path2) == 0);
Lines 9-20 Link Here
9
    return (strcasecmp(path1, path2) == 0);
9
    return (strcasecmp(path1, path2) == 0);
10
 #else
10
 #else
11
    NOT_IMPLEMENTED();
11
    NOT_IMPLEMENTED();
12
@@ -319,7 +319,7 @@
13
 Bool
14
 Util_IsAbsolutePath(const char *path)  // IN: path to check
15
 {
16
-#if defined(__linux__) || defined(__APPLE__)
17
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
18
    // path[0] is valid even for the empty string.
19
    return path && path[0] == DIRSEPC;
20
 #elif defined(_WIN32)
(-)files/patch-vm_basic_asm.h (-11 lines)
Lines 1-11 Link Here
1
--- lib/include/vm_basic_asm.h.orig	2013-11-13 03:22:29.000000000 +0000
2
+++ lib/include/vm_basic_asm.h	2013-11-13 03:24:26.000000000 +0000
3
@@ -208,7 +208,7 @@
4
 GetCallerEFlags(void)
5
 {
6
    unsigned long flags;
7
-   asm volatile("pushf; pop %0" : "=r"(flags));
8
+   __asm__ volatile("pushf; pop %0" : "=r"(flags));
9
    return flags;
10
 }
11
 
(-)files/patch-vm_basic_types.h (-10 lines)
Lines 1-10 Link Here
1
--- ./lib/include/vm_basic_types.h.orig	2010-10-20 05:19:54.000000000 +0900
2
+++ ./lib/include/vm_basic_types.h	2010-10-29 20:11:03.000000000 +0900
3
@@ -333,6 +333,7 @@
4
          #define FMTPD  ""
5
       #endif
6
    #elif defined(__linux__) \
7
+      || (defined(__clang__)) \
8
       || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) \
9
       || (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) \
10
       || (defined(_POSIX2_VERSION) && _POSIX2_VERSION >= 200112L)
(-)files/patch-vmblock-vfsops.c (-11 lines)
Lines 1-11 Link Here
1
--- modules/freebsd/vmblock/vfsops.c.orig
2
+++ modules/freebsd/vmblock/vfsops.c
3
@@ -236,7 +236,7 @@
4
     */
5
    MNT_ILOCK(mp);
6
    mp->mnt_flag |= lowerrootvp->v_mount->mnt_flag & MNT_LOCAL;
7
-#if __FreeBSD_version >= 600000
8
+#if __FreeBSD_version >= 600000 && __FreeBSD_version < 1000021
9
    mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE;
10
 #endif
11
    MNT_IUNLOCK(mp);
(-)files/patch-vmblock-vnops.c (-24 lines)
Lines 1-24 Link Here
1
--- modules/freebsd/vmblock/vnops.c.orig	2011-09-21 14:25:15.000000000 -0400
2
+++ modules/freebsd/vmblock/vnops.c	2012-06-28 20:51:22.897344202 -0400
3
@@ -1362,7 +1362,9 @@
4
 */
5
 {
6
    struct vnode *vp = ap->a_vp;
7
+#if __FreeBSD_version < 1000000
8
    struct thread *td = ap->a_td;
9
+#endif
10
 
11
    vp->v_object = NULL;
12
 
13
@@ -1370,7 +1372,11 @@
14
     * If this is the last reference, then free up the vnode so as not to
15
     * tie up the lower vnode.
16
     */
17
+#if __FreeBSD_version < 1000000
18
    vrecycle(vp, td);
19
+#else
20
+   vrecycle(vp);
21
+#endif
22
 
23
    return 0;
24
 }
(-)files/patch-vmblockmounter-Makefile.in (-3 / +3 lines)
Lines 1-6 Link Here
1
--- vmblockmounter/Makefile.in.orig	2013-12-27 17:42:57.000000000 +0000
1
--- vmblockmounter/Makefile.in.orig	2017-01-11 20:47:51.559298000 -0500
2
+++ vmblockmounter/Makefile.in	2013-12-27 17:44:31.000000000 +0000
2
+++ vmblockmounter/Makefile.in	2017-01-11 20:48:04.188633000 -0500
3
@@ -644,9 +644,6 @@
3
@@ -578,9 +578,6 @@
4
 @FREEBSD_TRUE@install-exec-hook:
4
 @FREEBSD_TRUE@install-exec-hook:
5
 @FREEBSD_TRUE@	mv $(DESTDIR)$(sbindir)/mount.vmblock \
5
 @FREEBSD_TRUE@	mv $(DESTDIR)$(sbindir)/mount.vmblock \
6
 @FREEBSD_TRUE@		$(DESTDIR)$(sbindir)/mount_vmblock
6
 @FREEBSD_TRUE@		$(DESTDIR)$(sbindir)/mount_vmblock
(-)files/patch-vmhgfs-Makefile (-21 lines)
Lines 1-21 Link Here
1
--- modules/freebsd/vmhgfs/Makefile.orig	2013-04-17 22:12:22.000000000 +0000
2
+++ modules/freebsd/vmhgfs/Makefile	2013-11-16 03:21:39.890032940 +0000
3
@@ -47,7 +47,7 @@
4
 .endif
5
 
6
 COMMON_HGFS_SRCS := debug.c
7
-COMMON_HGFS_SRCS := bdhandler.c
8
+COMMON_HGFS_SRCS += bdhandler.c
9
 COMMON_HGFS_SRCS += request.c
10
 COMMON_HGFS_SRCS += worker.c
11
 COMMON_HGFS_SRCS += fsutil.c
12
@@ -108,7 +108,9 @@
13
 CWARNFLAGS += -Wpointer-arith
14
 CWARNFLAGS += -Winline
15
 CWARNFLAGS += -Wcast-qual
16
+CWARNFLAGS += ${NO_WUNNEEDED_INTERNAL_DECL}
17
 
18
 EXPORT_SYMS = NO
19
 
20
+.include <bsd.own.mk>
21
 .include <bsd.kmod.mk>
(-)files/patch-vmhgfs-kernelStubs.h (-11 lines)
Lines 1-11 Link Here
1
--- modules/freebsd/vmhgfs/kernelStubs.h.orig	2010-10-20 05:19:54.000000000 +0900
2
+++ modules/freebsd/vmhgfs/kernelStubs.h	2010-11-16 13:26:24.000000000 +0900
3
@@ -132,7 +132,7 @@
4
  * Stub functions we provide.
5
  */
6
 
7
-void Panic(const char *fmt, ...);
8
+/* void Panic(const char *fmt, ...); -> vm_assert.h */
9
 
10
 char *Str_Strcpy(char *buf, const char *src, size_t maxSize);
11
 int Str_Vsnprintf(char *str, size_t size, const char *format,
(-)files/patch-vmhgfs-os.c (-11 lines)
Lines 1-11 Link Here
1
--- modules/freebsd/vmhgfs/os.c.orig
2
+++ modules/freebsd/vmhgfs/os.c
3
@@ -647,7 +647,7 @@
4
 		 OS_THREAD_T *newThread)   // OUT
5
 {
6
    return compat_kthread_create(function, parameter,
7
-                                newThread, 0, 0, threadName);
8
+                                newThread, 0, 0, "%s", threadName);
9
 }
10
 
11
 
(-)files/patch-vmhgfs-vfsops.c (-12 lines)
Lines 1-12 Link Here
1
--- modules/freebsd/vmhgfs/vfsops.c.orig
2
+++ modules/freebsd/vmhgfs/vfsops.c
3
@@ -201,7 +201,9 @@
4
     * structures, not oplocks/leases with the VM's host.)
5
     */
6
+#if __FreeBSD_version < 1000021
7
    MNT_ILOCK(mp);
8
    mp->mnt_kern_flag |= MNTK_MPSAFE;
9
    MNT_IUNLOCK(mp);
10
+#endif
11
 
12
    /* Get a new unique filesystem ID */
(-)files/patch-vmhgfs-vnopscommon.c (-11 lines)
Lines 1-11 Link Here
1
--- modules/freebsd/vmhgfs/vnopscommon.c.orig	2010-10-20 05:19:54.000000000 +0900
2
+++ modules/freebsd/vmhgfs/vnopscommon.c	2010-11-16 13:26:55.000000000 +0900
3
@@ -50,7 +50,7 @@
4
 static int HgfsDoGetattrInt(const char *path, const HgfsHandle handle, HgfsSuperInfo *sip,
5
 			    HgfsAttrV2 *hgfsAttrV2);
6
 static int HgfsDoGetattrByName(const char *path, HgfsSuperInfo *sip, HgfsAttrV2 *hgfsAttrV2);
7
-int HgfsReadlinkInt(struct vnode *vp, struct uio *uiop);
8
+/* int HgfsReadlinkInt(struct vnode *vp, struct uio *uiop); -> vnopscommon.h */
9
 static int HgfsQueryAttrInt(const char *path, HgfsHandle handle, HgfsSuperInfo *sip,
10
                             HgfsKReqHandle req);
11
 static int HgfsRefreshHandle(struct vnode *vp, HgfsSuperInfo *sip, HgfsHandle *handle);
(-)files/patch-vmmemctl-os.c (-57 / +25 lines)
Lines 1-5 Link Here
1
--- modules/freebsd/vmmemctl/os.c.orig	2013-09-23 10:51:10.000000000 -0500
1
--- modules/freebsd/vmmemctl/os.c.orig	2016-09-29 10:07:23.000000000 +0000
2
+++ modules/freebsd/vmmemctl/os.c	2014-04-23 15:51:43.823041178 -0500
2
+++ modules/freebsd/vmmemctl/os.c	2017-01-12 04:50:19.429404000 +0000
3
@@ -37,9 +37,11 @@
3
@@ -37,9 +37,11 @@
4
 #include <sys/param.h>
4
 #include <sys/param.h>
5
 #include <sys/systm.h>
5
 #include <sys/systm.h>
Lines 24-56 Link Here
24
 }
24
 }
25
 
25
 
26
 
26
 
27
@@ -295,7 +301,13 @@ OS_ReservedPageGetHandle(PA64 pa)     //
27
@@ -369,7 +375,11 @@ static void
28
 Mapping
29
 OS_MapPageHandle(PageHandle handle)     // IN
30
 {
31
+
32
+#if __FreeBSD_version >= 1000042
33
+   vm_offset_t res = kva_alloc(PAGE_SIZE);
34
+#else
35
    vm_offset_t res = kmem_alloc_nofault(kernel_map, PAGE_SIZE);
36
+#endif
37
+
38
    vm_page_t page = (vm_page_t)handle;
39
 
40
    if (!res) {
41
@@ -352,7 +364,11 @@ void
42
 OS_UnmapPage(Mapping mapping)           // IN
43
 {
44
    pmap_qremove((vm_offset_t)mapping, 1);
45
+#if __FreeBSD_version >= 1000042
46
+   kva_free((vm_offset_t)mapping, PAGE_SIZE);
47
+#else
48
    kmem_free(kernel_map, (vm_offset_t)mapping, PAGE_SIZE);
49
+#endif
50
 }
51
 
52
 
53
@@ -360,7 +376,11 @@ static void
54
 os_pmap_alloc(os_pmap *p) // IN
28
 os_pmap_alloc(os_pmap *p) // IN
55
 {
29
 {
56
    /* number of pages (div. 8) */
30
    /* number of pages (div. 8) */
Lines 61-92 Link Here
61
+#endif
35
+#endif
62
 
36
 
63
    /*
37
    /*
64
     * expand to nearest word boundary 
38
     * expand to nearest word boundary
65
@@ -369,14 +389,23 @@ os_pmap_alloc(os_pmap *p) // IN
39
@@ -466,12 +476,31 @@ os_kmem_free(vm_page_t page) // IN
66
    p->size = (p->size + sizeof(unsigned long) - 1) & 
67
                          ~(sizeof(unsigned long) - 1);
68
 
69
+#if __FreeBSD_version >= 1000042
70
+   p->bitmap = (unsigned long *)kmem_malloc(kernel_arena, p->size,
71
+                         M_WAITOK | M_ZERO);
72
+#else
73
    p->bitmap = (unsigned long *)kmem_alloc(kernel_map, p->size);
74
+#endif
75
 }
76
 
77
 
78
 static void
79
 os_pmap_free(os_pmap *p) // IN
80
 {
81
+#if __FreeBSD_version >= 1000042
82
+   kva_free((vm_offset_t)p->bitmap, p->size);
83
+#else
84
    kmem_free(kernel_map, (vm_offset_t)p->bitmap, p->size);
85
+#endif
86
    p->size = 0;
87
    p->bitmap = NULL;
88
 }
89
@@ -449,12 +478,31 @@ os_kmem_free(vm_page_t page) // IN
90
    os_state *state = &global_state;
40
    os_state *state = &global_state;
91
    os_pmap *pmap = &state->pmap;
41
    os_pmap *pmap = &state->pmap;
92
 
42
 
Lines 123-129 Link Here
123
 }
73
 }
124
 
74
 
125
 
75
 
126
@@ -466,8 +514,19 @@ os_kmem_alloc(int alloc_normal_failed) /
76
@@ -483,8 +512,19 @@ os_kmem_alloc(int alloc_normal_failed) /
127
    os_state *state = &global_state;
77
    os_state *state = &global_state;
128
    os_pmap *pmap = &state->pmap;
78
    os_pmap *pmap = &state->pmap;
129
 
79
 
Lines 143-149 Link Here
143
       return NULL;
93
       return NULL;
144
    }
94
    }
145
 
95
 
146
@@ -488,6 +547,11 @@ os_kmem_alloc(int alloc_normal_failed) /
96
@@ -505,6 +545,11 @@ os_kmem_alloc(int alloc_normal_failed) /
147
    if (!page) {
97
    if (!page) {
148
       os_pmap_putindex(pmap, pindex);
98
       os_pmap_putindex(pmap, pindex);
149
    }
99
    }
Lines 155-157 Link Here
155
 
105
 
156
    return page;
106
    return page;
157
 }
107
 }
108
@@ -847,10 +892,17 @@ vmmemctl_sysctl(SYSCTL_HANDLER_ARGS)
109
 static void
110
 vmmemctl_init_sysctl(void)
111
 {
112
+#if __FreeBSD_version < 1200019
113
    oid =  sysctl_add_oid(NULL, SYSCTL_STATIC_CHILDREN(_vm), OID_AUTO,
114
                          BALLOON_NAME, CTLTYPE_STRING | CTLFLAG_RD,
115
                          0, 0, vmmemctl_sysctl, "A",
116
                          BALLOON_NAME_VERBOSE);
117
+#else
118
+   oid =  sysctl_add_oid(NULL, SYSCTL_STATIC_CHILDREN(_vm), OID_AUTO,
119
+                         BALLOON_NAME, CTLTYPE_STRING | CTLFLAG_RD,
120
+                         0, 0, vmmemctl_sysctl, "A",
121
+                         BALLOON_NAME_VERBOSE, NULL);
122
+#endif
123
 }
124
 
125
 
(-)files/patch-vmtoolsd-Makefile.in (-4 / +4 lines)
Lines 1-7 Link Here
1
--- services/vmtoolsd/Makefile.in.orig	2009-04-06 18:40:27.000000000 -0400
1
--- services/vmtoolsd/Makefile.in.orig	2017-01-11 21:00:01.938705000 -0500
2
+++ services/vmtoolsd/Makefile.in	2009-04-06 18:41:16.000000000 -0400
2
+++ services/vmtoolsd/Makefile.in	2017-01-11 21:00:22.495767000 -0500
3
@@ -722,7 +722,7 @@
3
@@ -761,7 +761,7 @@
4
 	   $@ || (rm -f $@ && exit 1)
4
 	@INSTVMSG@ vmtoolsd $(srcdir)/l10n $(DESTDIR)$(datadir)
5
 
5
 
6
 install-exec-hook:
6
 install-exec-hook:
7
-	$(INSTALL) -d $(DESTDIR)/etc/vmware-tools
7
-	$(INSTALL) -d $(DESTDIR)/etc/vmware-tools
(-)files/vm_basic_asm_x86_common.h (+11 lines)
Line 0 Link Here
1
--- lib/include/vm_basic_asm_x86_common.h.orig	2017-01-12 00:09:21.410468000 -0500
2
+++ lib/include/vm_basic_asm_x86_common.h	2017-01-12 00:09:26.883729000 -0500
3
@@ -197,7 +197,7 @@ static INLINE unsigned int
4
 GetCallerEFlags(void)
5
 {
6
    unsigned long flags;
7
-   asm volatile("pushf; pop %0" : "=r"(flags));
8
+   __asm__ volatile("pushf; pop %0" : "=r"(flags));
9
    return flags;
10
 }
11
 
(-)pkg-plist (-6 / +6 lines)
Lines 1-9 Link Here
1
bin/vmhgfs-fuse
2
bin/vmtoolsd
1
bin/vmware-checkvm
3
bin/vmware-checkvm
2
bin/vmware-hgfsclient
4
bin/vmware-hgfsclient
5
bin/vmware-namespace-cmd
3
bin/vmware-rpctool
6
bin/vmware-rpctool
7
bin/vmware-toolbox-cmd
4
bin/vmware-xferlogs
8
bin/vmware-xferlogs
5
bin/vmtoolsd
6
bin/vmware-toolbox-cmd
7
%%X11%%%%FUSE%%bin/vmware-vmblock-fuse
9
%%X11%%%%FUSE%%bin/vmware-vmblock-fuse
8
lib/open-vm-tools/plugins/vmsvc/libguestInfo.so
10
lib/open-vm-tools/plugins/vmsvc/libguestInfo.so
9
lib/open-vm-tools/plugins/vmsvc/libpowerOps.so
11
lib/open-vm-tools/plugins/vmsvc/libpowerOps.so
Lines 29-35 Link Here
29
lib/libguestlib.so.0.0.0
31
lib/libguestlib.so.0.0.0
30
libdata/pkgconfig/vmguestlib.pc
32
libdata/pkgconfig/vmguestlib.pc
31
lib/vmware-tools/modules/drivers/vmblock.ko
33
lib/vmware-tools/modules/drivers/vmblock.ko
32
lib/vmware-tools/modules/drivers/vmhgfs.ko
33
lib/vmware-tools/modules/drivers/vmmemctl.ko
34
lib/vmware-tools/modules/drivers/vmmemctl.ko
34
lib/vmware-tools/modules/drivers/vmxnet.ko
35
lib/vmware-tools/modules/drivers/vmxnet.ko
35
include/vmGuestLib/includeCheck.h
36
include/vmGuestLib/includeCheck.h
Lines 37-52 Link Here
37
include/vmGuestLib/vmSessionId.h
38
include/vmGuestLib/vmSessionId.h
38
include/vmGuestLib/vm_basic_types.h
39
include/vmGuestLib/vm_basic_types.h
39
@dir lib/vmware-tools/modules/input
40
@dir lib/vmware-tools/modules/input
40
sbin/mount_vmhgfs
41
sbin/mount_vmblock
41
sbin/mount_vmblock
42
%%X11%%bin/vmware-user-suid-wrapper
42
%%X11%%bin/vmware-user-suid-wrapper
43
share/vmware-tools/poweroff-vm-default
43
share/vmware-tools/poweroff-vm-default
44
share/vmware-tools/poweron-vm-default
44
share/vmware-tools/poweron-vm-default
45
share/vmware-tools/resume-vm-default
45
share/vmware-tools/resume-vm-default
46
share/vmware-tools/scripts/vmware/network
47
share/vmware-tools/statechange.subr
46
share/vmware-tools/suspend-vm-default
48
share/vmware-tools/suspend-vm-default
47
share/vmware-tools/vm-support
49
share/vmware-tools/vm-support
48
share/vmware-tools/statechange.subr
49
share/vmware-tools/scripts/vmware/network
50
%%DATADIR%%/messages/de/toolboxcmd.vmsg
50
%%DATADIR%%/messages/de/toolboxcmd.vmsg
51
%%DATADIR%%/messages/de/vmtoolsd.vmsg
51
%%DATADIR%%/messages/de/vmtoolsd.vmsg
52
%%DATADIR%%/messages/ja/toolboxcmd.vmsg
52
%%DATADIR%%/messages/ja/toolboxcmd.vmsg

Return to bug 212471