Index: head/emulators/open-vm-tools/Makefile =================================================================== --- head/emulators/open-vm-tools/Makefile (revision 464377) +++ head/emulators/open-vm-tools/Makefile (revision 464378) @@ -1,96 +1,96 @@ # Created by: mbr@FreeBSD.org # $FreeBSD$ PORTNAME= open-vm-tools PORTVERSION= ${RELEASE_VER} DISTVERSIONPREFIX= stable- -PORTREVISION= 4 +PORTREVISION= 5 PORTEPOCH= 2 CATEGORIES= emulators MAINTAINER= jpaetzel@FreeBSD.org COMMENT?= Open VMware tools for FreeBSD VMware guests LICENSE= LGPL21 LICENSE_FILE= ${WRKSRC}/COPYING ONLY_FOR_ARCHS= amd64 i386 LIB_DEPENDS= libmspack.so:archivers/libmspack RELEASE_VER= 10.2.0 BUILD_VER= 7253323 OPTIONS_DEFINE= DNET LIBNOTIFY OPENSSL X11 OPTIONS_DEFAULT= DNET LIBNOTIFY OPENSSL X11 OPTIONS_SUB= DNET_DESC= libdnet support LIBNOTIFY_DESC= Desktop notification support X11_CONFIGURE_WITH= x gtk2 gtkmm X11_USE= xorg=ice,sm,x11,xext,xi,xinerama,xineramaproto,xrandr,xrender,xtst \ gnome=gdkpixbuf2,gtk20,gtkmm24 X11_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 LIBNOTIFY_LIB_DEPENDS= libnotify.so:devel/libnotify DNET_CONFIGURE_WITH= dnet DNET_LIB_DEPENDS= libdnet.so:net/libdnet OPENSSL_CONFIGURE_WITH= ssl WRKSRC_SUBDIR= open-vm-tools GNU_CONFIGURE= yes USES= autoreconf fuse gettext-runtime kmod libtool localbase pathfix pkgconfig USE_GNOME= glib20 USE_GITHUB= yes GH_ACCOUNT= vmware USE_LDCONFIG= yes CPPFLAGS+= -Wno-deprecated-declarations SSP_UNSAFE= kernel module does not support ssp CONFIGURE_ARGS+= --without-icu \ --disable-vgauth \ --sysconfdir=${PREFIX}/etc CONFLICTS+= vmware-guestd[0-9]* vmware-tools[0-9]* USE_RC_SUBR= vmware-guestd vmware-kmod INSTALL_TARGET= install-strip .include .if ${PORT_OPTIONS:MX11} CONFLICTS= open-vm-tools-nox11-[0-9]* .else CONFLICTS= open-vm-tools-[0-9]* .endif CONFIGURE_ENV+= SYSDIR=${SRC_BASE}/sys .include post-patch: @${REINPLACE_CMD} -e "s@%%PREFIX%%@${PREFIX}@"\ ${WRKSRC}/lib/guestApp/guestApp.c post-build: cd ${WRKSRC}/modules && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers ${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/input ${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmblock.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmblock.ko ${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmmemctl.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmmemctl.ko ${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmxnet.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmxnet.ko ${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/vmware/ ${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/ ${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/tests/ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/rc.conf.d .include Index: head/emulators/open-vm-tools/files/patch-lib_hgfsServer_hgfsServerLinux.c =================================================================== --- head/emulators/open-vm-tools/files/patch-lib_hgfsServer_hgfsServerLinux.c (revision 464377) +++ head/emulators/open-vm-tools/files/patch-lib_hgfsServer_hgfsServerLinux.c (nonexistent) @@ -1,15 +0,0 @@ ---- lib/hgfsServer/hgfsServerLinux.c.orig 2017-07-28 21:59:15 UTC -+++ lib/hgfsServer/hgfsServerLinux.c -@@ -178,6 +178,12 @@ getdents_linux(unsigned int fd, - # endif - } - # define getdents getdents_linux -+#elif defined(__FreeBSD__) && defined(__INO64) -+#define getdents(fd, dirp, count) \ -+({ \ -+ off_t basep; \ -+ getdirentries(fd, dirp, count, &basep); \ -+}) - #elif defined(__FreeBSD__) - #define getdents(fd, dirp, count) \ - ({ \ Property changes on: head/emulators/open-vm-tools/files/patch-lib_hgfsServer_hgfsServerLinux.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/emulators/open-vm-tools/files/patch-services_plugins_vix_vixTools.c =================================================================== --- head/emulators/open-vm-tools/files/patch-services_plugins_vix_vixTools.c (revision 464377) +++ head/emulators/open-vm-tools/files/patch-services_plugins_vix_vixTools.c (revision 464378) @@ -1,29 +1,56 @@ ---- services/plugins/vix/vixTools.c.orig 2018-02-24 17:50:37 UTC +--- services/plugins/vix/vixTools.c.orig 2017-12-15 21:11:49 UTC +++ services/plugins/vix/vixTools.c -@@ -10135,7 +10135,7 @@ abort: +@@ -52,6 +52,7 @@ + #include + #include + #include ++#include + + #ifdef _WIN32 + #include +@@ -7330,7 +7331,7 @@ VixToolsRunScript(VixCommandRequestHeader *requestMsg, + goto abort; + } + } +- for (var = 0; var <= 0xFFFFFFFF; var++) { ++ for (var = 0; ; var++) { + free(tempScriptFilePath); + tempScriptFilePath = Str_SafeAsprintf(NULL, + "%s"DIRSEPS"%s%d%s", +@@ -7373,6 +7374,9 @@ VixToolsRunScript(VixCommandRequestHeader *requestMsg, + */ + break; + } ++ if (var == INT_MAX) { ++ break; ++ } + } + if (fd < 0) { + /* +@@ -10131,7 +10135,7 @@ abort: struct passwd pwd; struct passwd *ppwd = &pwd; char *buffer = NULL; // a pool of memory for Posix_Getpwnam_r() to use. - size_t bufferSize; + long bufferSize; /* * For POSIX systems, look up the uid of 'username', and compare -@@ -10148,9 +10148,15 @@ abort: +@@ -10144,9 +10148,15 @@ abort: * Multiply by 4 to compensate for the conversion to UTF-8 by * the Posix_Getpwnam_r() wrapper. */ - bufferSize = (size_t) sysconf(_SC_GETPW_R_SIZE_MAX) * 4; + errno = 0; + bufferSize = sysconf(_SC_GETPW_R_SIZE_MAX); + if ((errno != 0) || (bufferSize <= 0)) { + bufferSize = 16 * 1024; // Unlimited; pick something reasonable + } - buffer = Util_SafeMalloc(bufferSize); + bufferSize *= 4; + + buffer = Util_SafeMalloc((size_t)bufferSize); if (Posix_Getpwnam_r(username, &pwd, buffer, bufferSize, &ppwd) != 0 || NULL == ppwd) {