diff -Nru open-vm-tools-9.10.2-2822639/autom4te.cache/output.0 open-vm-tools-10.0.0-3000743/autom4te.cache/output.0 --- open-vm-tools-9.10.2-2822639/autom4te.cache/output.0 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/autom4te.cache/output.0 2015-09-10 07:31:38.000000000 +0000 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.61 for open-vm-tools 9.10.2. +@%:@ Generated by GNU Autoconf 2.61 for open-vm-tools 10.0.0. @%:@ @%:@ Report bugs to . @%:@ @@ -728,8 +728,8 @@ # Identity of this package. PACKAGE_NAME='open-vm-tools' PACKAGE_TARNAME='open-vm-tools' -PACKAGE_VERSION='9.10.2' -PACKAGE_STRING='open-vm-tools 9.10.2' +PACKAGE_VERSION='10.0.0' +PACKAGE_STRING='open-vm-tools 10.0.0' PACKAGE_BUGREPORT='open-vm-tools-devel@lists.sourceforge.net' ac_unique_file="checkvm/checkvm.c" @@ -1520,7 +1520,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures open-vm-tools 9.10.2 to adapt to many kinds of systems. +\`configure' configures open-vm-tools 10.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1594,7 +1594,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of open-vm-tools 9.10.2:";; + short | recursive ) echo "Configuration of open-vm-tools 10.0.0:";; esac cat <<\_ACEOF @@ -1729,7 +1729,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -open-vm-tools configure 9.10.2 +open-vm-tools configure 10.0.0 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1743,7 +1743,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by open-vm-tools $as_me 9.10.2, which was +It was created by open-vm-tools $as_me 10.0.0, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2750,7 +2750,7 @@ # Define the identity of the package. PACKAGE='open-vm-tools' - VERSION='9.10.2' + VERSION='10.0.0' cat >>confdefs.h <<_ACEOF @@ -24737,8 +24737,8 @@ else true have_fuse=no; - { echo "$as_me:$LINENO: WARNING: Fuse is missing, vmblock-fuse will be disabled." >&5 -echo "$as_me: WARNING: Fuse is missing, vmblock-fuse will be disabled." >&2;} + { echo "$as_me:$LINENO: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&5 +echo "$as_me: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&2;} fi @@ -35553,15 +35553,14 @@ LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrt" - # vmhgfs is not compiled for kernels 3.17 and newer - # Temporary short term limit until the newer kernel component is included - if test "$osVersion" -lt 317000; then - MODULES="$MODULES vmhgfs" - fi # vmxnet is not supported for kernels 3.3.0 and newer if test "$osVersion" -lt 303000; then MODULES="$MODULES vmxnet" fi + # See if we need vmhgfs module. Starting with 4.0.0 we use FUSE + if test "$osVersion" -lt 400000; then + MODULES="$MODULES vmhgfs" + fi # See if we need vmci and vsock modules. Starting with 3.9 they made # their way into mainline kernel. if test "$osVersion" -lt 309000; then @@ -36088,7 +36087,7 @@ ### ### Create the Makefiles ### -ac_config_files="$ac_config_files Makefile lib/Makefile lib/appUtil/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/asyncsocket/Makefile lib/sslDirect/Makefile lib/pollGtk/Makefile lib/poll/Makefile lib/dataMap/Makefile lib/hashMap/Makefile lib/dict/Makefile lib/dynxdr/Makefile lib/err/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/glibUtils/Makefile lib/guestApp/Makefile lib/guestRpc/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsHelper/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/impersonate/Makefile lib/lock/Makefile lib/message/Makefile lib/misc/Makefile lib/netUtil/Makefile lib/nicInfo/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/printer/Makefile lib/procMgr/Makefile lib/rpcChannel/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcVmx/Makefile lib/slashProc/Makefile lib/string/Makefile lib/stubs/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/unicode/Makefile lib/user/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile lib/xdg/Makefile services/Makefile services/vmtoolsd/Makefile services/plugins/Makefile services/plugins/desktopEvents/Makefile services/plugins/dndcp/Makefile services/plugins/grabbitmqProxy/Makefile services/plugins/guestInfo/Makefile services/plugins/hgfsServer/Makefile services/plugins/powerOps/Makefile services/plugins/resolutionSet/Makefile services/plugins/timeSync/Makefile services/plugins/vix/Makefile services/plugins/vmbackup/Makefile services/plugins/deployPkg/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile rpctool/Makefile guestproxycerttool/Makefile vgauth/Makefile vgauth/lib/Makefile vgauth/cli/Makefile vgauth/service/Makefile libguestlib/Makefile libguestlib/vmguestlib.pc libDeployPkg/Makefile libDeployPkg/libDeployPkg.pc libhgfs/Makefile libvmtools/Makefile xferlogs/Makefile modules/Makefile vmblock-fuse/Makefile vmblockmounter/Makefile tests/Makefile tests/vmrpcdbg/Makefile tests/testDebug/Makefile tests/testPlugin/Makefile tests/testVmblock/Makefile docs/Makefile docs/api/Makefile scripts/Makefile scripts/build/rpcgen_wrapper.sh" +ac_config_files="$ac_config_files Makefile lib/Makefile lib/appUtil/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/asyncsocket/Makefile lib/sslDirect/Makefile lib/pollGtk/Makefile lib/poll/Makefile lib/dataMap/Makefile lib/hashMap/Makefile lib/dict/Makefile lib/dynxdr/Makefile lib/err/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/glibUtils/Makefile lib/guestApp/Makefile lib/guestRpc/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsHelper/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/hgfsUri/Makefile lib/impersonate/Makefile lib/lock/Makefile lib/message/Makefile lib/misc/Makefile lib/netUtil/Makefile lib/nicInfo/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/procMgr/Makefile lib/rpcChannel/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcVmx/Makefile lib/slashProc/Makefile lib/string/Makefile lib/stubs/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/unicode/Makefile lib/user/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile lib/xdg/Makefile services/Makefile services/vmtoolsd/Makefile services/plugins/Makefile services/plugins/desktopEvents/Makefile services/plugins/dndcp/Makefile services/plugins/grabbitmqProxy/Makefile services/plugins/guestInfo/Makefile services/plugins/hgfsServer/Makefile services/plugins/powerOps/Makefile services/plugins/resolutionSet/Makefile services/plugins/timeSync/Makefile services/plugins/vix/Makefile services/plugins/vmbackup/Makefile services/plugins/deployPkg/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile rpctool/Makefile guestproxycerttool/Makefile vgauth/Makefile vgauth/lib/Makefile vgauth/cli/Makefile vgauth/service/Makefile libguestlib/Makefile libguestlib/vmguestlib.pc libDeployPkg/Makefile libDeployPkg/libDeployPkg.pc libhgfs/Makefile libvmtools/Makefile xferlogs/Makefile modules/Makefile vmblock-fuse/Makefile vmhgfs-fuse/Makefile vmblockmounter/Makefile tests/Makefile tests/vmrpcdbg/Makefile tests/testDebug/Makefile tests/testPlugin/Makefile tests/testVmblock/Makefile docs/Makefile docs/api/Makefile scripts/Makefile scripts/build/rpcgen_wrapper.sh" ### @@ -36723,7 +36722,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by open-vm-tools $as_me 9.10.2, which was +This file was extended by open-vm-tools $as_me 10.0.0, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -36770,7 +36769,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -open-vm-tools config.status 9.10.2 +open-vm-tools config.status 10.0.0 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -36901,6 +36900,7 @@ "lib/hgfsServer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServer/Makefile" ;; "lib/hgfsServerManagerGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerManagerGuest/Makefile" ;; "lib/hgfsServerPolicyGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerPolicyGuest/Makefile" ;; + "lib/hgfsUri/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsUri/Makefile" ;; "lib/impersonate/Makefile") CONFIG_FILES="$CONFIG_FILES lib/impersonate/Makefile" ;; "lib/lock/Makefile") CONFIG_FILES="$CONFIG_FILES lib/lock/Makefile" ;; "lib/message/Makefile") CONFIG_FILES="$CONFIG_FILES lib/message/Makefile" ;; @@ -36909,7 +36909,6 @@ "lib/nicInfo/Makefile") CONFIG_FILES="$CONFIG_FILES lib/nicInfo/Makefile" ;; "lib/panic/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panic/Makefile" ;; "lib/panicDefault/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panicDefault/Makefile" ;; - "lib/printer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/printer/Makefile" ;; "lib/procMgr/Makefile") CONFIG_FILES="$CONFIG_FILES lib/procMgr/Makefile" ;; "lib/rpcChannel/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcChannel/Makefile" ;; "lib/rpcIn/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcIn/Makefile" ;; @@ -36960,6 +36959,7 @@ "xferlogs/Makefile") CONFIG_FILES="$CONFIG_FILES xferlogs/Makefile" ;; "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; "vmblock-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmblock-fuse/Makefile" ;; + "vmhgfs-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmhgfs-fuse/Makefile" ;; "vmblockmounter/Makefile") CONFIG_FILES="$CONFIG_FILES vmblockmounter/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/vmrpcdbg/Makefile") CONFIG_FILES="$CONFIG_FILES tests/vmrpcdbg/Makefile" ;; diff -Nru open-vm-tools-9.10.2-2822639/autom4te.cache/output.1 open-vm-tools-10.0.0-3000743/autom4te.cache/output.1 --- open-vm-tools-9.10.2-2822639/autom4te.cache/output.1 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/autom4te.cache/output.1 2015-09-10 07:31:38.000000000 +0000 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.61 for open-vm-tools 9.10.2. +@%:@ Generated by GNU Autoconf 2.61 for open-vm-tools 10.0.0. @%:@ @%:@ Report bugs to . @%:@ @@ -723,8 +723,8 @@ # Identity of this package. PACKAGE_NAME='open-vm-tools' PACKAGE_TARNAME='open-vm-tools' -PACKAGE_VERSION='9.10.2' -PACKAGE_STRING='open-vm-tools 9.10.2' +PACKAGE_VERSION='10.0.0' +PACKAGE_STRING='open-vm-tools 10.0.0' PACKAGE_BUGREPORT='open-vm-tools-devel@lists.sourceforge.net' ac_unique_file="checkvm/checkvm.c" @@ -1517,7 +1517,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures open-vm-tools 9.10.2 to adapt to many kinds of systems. +\`configure' configures open-vm-tools 10.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1591,7 +1591,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of open-vm-tools 9.10.2:";; + short | recursive ) echo "Configuration of open-vm-tools 10.0.0:";; esac cat <<\_ACEOF @@ -1723,7 +1723,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -open-vm-tools configure 9.10.2 +open-vm-tools configure 10.0.0 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1737,7 +1737,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by open-vm-tools $as_me 9.10.2, which was +It was created by open-vm-tools $as_me 10.0.0, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2744,7 +2744,7 @@ # Define the identity of the package. PACKAGE='open-vm-tools' - VERSION='9.10.2' + VERSION='10.0.0' cat >>confdefs.h <<_ACEOF @@ -20000,8 +20000,8 @@ else true have_fuse=no; - { echo "$as_me:$LINENO: WARNING: Fuse is missing, vmblock-fuse will be disabled." >&5 -echo "$as_me: WARNING: Fuse is missing, vmblock-fuse will be disabled." >&2;} + { echo "$as_me:$LINENO: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&5 +echo "$as_me: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&2;} fi @@ -30816,15 +30816,14 @@ LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrt" - # vmhgfs is not compiled for kernels 3.17 and newer - # Temporary short term limit until the newer kernel component is included - if test "$osVersion" -lt 317000; then - MODULES="$MODULES vmhgfs" - fi # vmxnet is not supported for kernels 3.3.0 and newer if test "$osVersion" -lt 303000; then MODULES="$MODULES vmxnet" fi + # See if we need vmhgfs module. Starting with 4.0.0 we use FUSE + if test "$osVersion" -lt 400000; then + MODULES="$MODULES vmhgfs" + fi # See if we need vmci and vsock modules. Starting with 3.9 they made # their way into mainline kernel. if test "$osVersion" -lt 309000; then @@ -31351,7 +31350,7 @@ ### ### Create the Makefiles ### -ac_config_files="$ac_config_files Makefile lib/Makefile lib/appUtil/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/asyncsocket/Makefile lib/sslDirect/Makefile lib/pollGtk/Makefile lib/poll/Makefile lib/dataMap/Makefile lib/hashMap/Makefile lib/dict/Makefile lib/dynxdr/Makefile lib/err/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/glibUtils/Makefile lib/guestApp/Makefile lib/guestRpc/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsHelper/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/impersonate/Makefile lib/lock/Makefile lib/message/Makefile lib/misc/Makefile lib/netUtil/Makefile lib/nicInfo/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/printer/Makefile lib/procMgr/Makefile lib/rpcChannel/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcVmx/Makefile lib/slashProc/Makefile lib/string/Makefile lib/stubs/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/unicode/Makefile lib/user/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile lib/xdg/Makefile services/Makefile services/vmtoolsd/Makefile services/plugins/Makefile services/plugins/desktopEvents/Makefile services/plugins/dndcp/Makefile services/plugins/grabbitmqProxy/Makefile services/plugins/guestInfo/Makefile services/plugins/hgfsServer/Makefile services/plugins/powerOps/Makefile services/plugins/resolutionSet/Makefile services/plugins/timeSync/Makefile services/plugins/vix/Makefile services/plugins/vmbackup/Makefile services/plugins/deployPkg/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile rpctool/Makefile guestproxycerttool/Makefile vgauth/Makefile vgauth/lib/Makefile vgauth/cli/Makefile vgauth/service/Makefile libguestlib/Makefile libguestlib/vmguestlib.pc libDeployPkg/Makefile libDeployPkg/libDeployPkg.pc libhgfs/Makefile libvmtools/Makefile xferlogs/Makefile modules/Makefile vmblock-fuse/Makefile vmblockmounter/Makefile tests/Makefile tests/vmrpcdbg/Makefile tests/testDebug/Makefile tests/testPlugin/Makefile tests/testVmblock/Makefile docs/Makefile docs/api/Makefile scripts/Makefile scripts/build/rpcgen_wrapper.sh" +ac_config_files="$ac_config_files Makefile lib/Makefile lib/appUtil/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/asyncsocket/Makefile lib/sslDirect/Makefile lib/pollGtk/Makefile lib/poll/Makefile lib/dataMap/Makefile lib/hashMap/Makefile lib/dict/Makefile lib/dynxdr/Makefile lib/err/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/glibUtils/Makefile lib/guestApp/Makefile lib/guestRpc/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsHelper/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/hgfsUri/Makefile lib/impersonate/Makefile lib/lock/Makefile lib/message/Makefile lib/misc/Makefile lib/netUtil/Makefile lib/nicInfo/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/procMgr/Makefile lib/rpcChannel/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcVmx/Makefile lib/slashProc/Makefile lib/string/Makefile lib/stubs/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/unicode/Makefile lib/user/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile lib/xdg/Makefile services/Makefile services/vmtoolsd/Makefile services/plugins/Makefile services/plugins/desktopEvents/Makefile services/plugins/dndcp/Makefile services/plugins/grabbitmqProxy/Makefile services/plugins/guestInfo/Makefile services/plugins/hgfsServer/Makefile services/plugins/powerOps/Makefile services/plugins/resolutionSet/Makefile services/plugins/timeSync/Makefile services/plugins/vix/Makefile services/plugins/vmbackup/Makefile services/plugins/deployPkg/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile rpctool/Makefile guestproxycerttool/Makefile vgauth/Makefile vgauth/lib/Makefile vgauth/cli/Makefile vgauth/service/Makefile libguestlib/Makefile libguestlib/vmguestlib.pc libDeployPkg/Makefile libDeployPkg/libDeployPkg.pc libhgfs/Makefile libvmtools/Makefile xferlogs/Makefile modules/Makefile vmblock-fuse/Makefile vmhgfs-fuse/Makefile vmblockmounter/Makefile tests/Makefile tests/vmrpcdbg/Makefile tests/testDebug/Makefile tests/testPlugin/Makefile tests/testVmblock/Makefile docs/Makefile docs/api/Makefile scripts/Makefile scripts/build/rpcgen_wrapper.sh" ### @@ -31993,7 +31992,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by open-vm-tools $as_me 9.10.2, which was +This file was extended by open-vm-tools $as_me 10.0.0, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -32040,7 +32039,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -open-vm-tools config.status 9.10.2 +open-vm-tools config.status 10.0.0 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -32515,6 +32514,7 @@ "lib/hgfsServer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServer/Makefile" ;; "lib/hgfsServerManagerGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerManagerGuest/Makefile" ;; "lib/hgfsServerPolicyGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerPolicyGuest/Makefile" ;; + "lib/hgfsUri/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsUri/Makefile" ;; "lib/impersonate/Makefile") CONFIG_FILES="$CONFIG_FILES lib/impersonate/Makefile" ;; "lib/lock/Makefile") CONFIG_FILES="$CONFIG_FILES lib/lock/Makefile" ;; "lib/message/Makefile") CONFIG_FILES="$CONFIG_FILES lib/message/Makefile" ;; @@ -32523,7 +32523,6 @@ "lib/nicInfo/Makefile") CONFIG_FILES="$CONFIG_FILES lib/nicInfo/Makefile" ;; "lib/panic/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panic/Makefile" ;; "lib/panicDefault/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panicDefault/Makefile" ;; - "lib/printer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/printer/Makefile" ;; "lib/procMgr/Makefile") CONFIG_FILES="$CONFIG_FILES lib/procMgr/Makefile" ;; "lib/rpcChannel/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcChannel/Makefile" ;; "lib/rpcIn/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcIn/Makefile" ;; @@ -32574,6 +32573,7 @@ "xferlogs/Makefile") CONFIG_FILES="$CONFIG_FILES xferlogs/Makefile" ;; "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; "vmblock-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmblock-fuse/Makefile" ;; + "vmhgfs-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmhgfs-fuse/Makefile" ;; "vmblockmounter/Makefile") CONFIG_FILES="$CONFIG_FILES vmblockmounter/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/vmrpcdbg/Makefile") CONFIG_FILES="$CONFIG_FILES tests/vmrpcdbg/Makefile" ;; diff -Nru open-vm-tools-9.10.2-2822639/autom4te.cache/output.2 open-vm-tools-10.0.0-3000743/autom4te.cache/output.2 --- open-vm-tools-9.10.2-2822639/autom4te.cache/output.2 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/autom4te.cache/output.2 2015-09-10 07:31:38.000000000 +0000 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.61 for open-vm-tools 9.10.2. +@%:@ Generated by GNU Autoconf 2.61 for open-vm-tools 10.0.0. @%:@ @%:@ Report bugs to . @%:@ @@ -723,8 +723,8 @@ # Identity of this package. PACKAGE_NAME='open-vm-tools' PACKAGE_TARNAME='open-vm-tools' -PACKAGE_VERSION='9.10.2' -PACKAGE_STRING='open-vm-tools 9.10.2' +PACKAGE_VERSION='10.0.0' +PACKAGE_STRING='open-vm-tools 10.0.0' PACKAGE_BUGREPORT='open-vm-tools-devel@lists.sourceforge.net' ac_unique_file="checkvm/checkvm.c" @@ -1517,7 +1517,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures open-vm-tools 9.10.2 to adapt to many kinds of systems. +\`configure' configures open-vm-tools 10.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1591,7 +1591,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of open-vm-tools 9.10.2:";; + short | recursive ) echo "Configuration of open-vm-tools 10.0.0:";; esac cat <<\_ACEOF @@ -1723,7 +1723,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -open-vm-tools configure 9.10.2 +open-vm-tools configure 10.0.0 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1737,7 +1737,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by open-vm-tools $as_me 9.10.2, which was +It was created by open-vm-tools $as_me 10.0.0, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2744,7 +2744,7 @@ # Define the identity of the package. PACKAGE='open-vm-tools' - VERSION='9.10.2' + VERSION='10.0.0' cat >>confdefs.h <<_ACEOF @@ -20000,8 +20000,8 @@ else true have_fuse=no; - { echo "$as_me:$LINENO: WARNING: Fuse is missing, vmblock-fuse will be disabled." >&5 -echo "$as_me: WARNING: Fuse is missing, vmblock-fuse will be disabled." >&2;} + { echo "$as_me:$LINENO: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&5 +echo "$as_me: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&2;} fi @@ -30816,15 +30816,14 @@ LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrt" - # vmhgfs is not compiled for kernels 3.17 and newer - # Temporary short term limit until the newer kernel component is included - if test "$osVersion" -lt 317000; then - MODULES="$MODULES vmhgfs" - fi # vmxnet is not supported for kernels 3.3.0 and newer if test "$osVersion" -lt 303000; then MODULES="$MODULES vmxnet" fi + # See if we need vmhgfs module. Starting with 4.0.0 we use FUSE + if test "$osVersion" -lt 400000; then + MODULES="$MODULES vmhgfs" + fi # See if we need vmci and vsock modules. Starting with 3.9 they made # their way into mainline kernel. if test "$osVersion" -lt 309000; then @@ -31351,7 +31350,7 @@ ### ### Create the Makefiles ### -ac_config_files="$ac_config_files Makefile lib/Makefile lib/appUtil/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/asyncsocket/Makefile lib/sslDirect/Makefile lib/pollGtk/Makefile lib/poll/Makefile lib/dataMap/Makefile lib/hashMap/Makefile lib/dict/Makefile lib/dynxdr/Makefile lib/err/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/glibUtils/Makefile lib/guestApp/Makefile lib/guestRpc/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsHelper/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/impersonate/Makefile lib/lock/Makefile lib/message/Makefile lib/misc/Makefile lib/netUtil/Makefile lib/nicInfo/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/printer/Makefile lib/procMgr/Makefile lib/rpcChannel/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcVmx/Makefile lib/slashProc/Makefile lib/string/Makefile lib/stubs/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/unicode/Makefile lib/user/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile lib/xdg/Makefile services/Makefile services/vmtoolsd/Makefile services/plugins/Makefile services/plugins/desktopEvents/Makefile services/plugins/dndcp/Makefile services/plugins/grabbitmqProxy/Makefile services/plugins/guestInfo/Makefile services/plugins/hgfsServer/Makefile services/plugins/powerOps/Makefile services/plugins/resolutionSet/Makefile services/plugins/timeSync/Makefile services/plugins/vix/Makefile services/plugins/vmbackup/Makefile services/plugins/deployPkg/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile rpctool/Makefile guestproxycerttool/Makefile vgauth/Makefile vgauth/lib/Makefile vgauth/cli/Makefile vgauth/service/Makefile libguestlib/Makefile libguestlib/vmguestlib.pc libDeployPkg/Makefile libDeployPkg/libDeployPkg.pc libhgfs/Makefile libvmtools/Makefile xferlogs/Makefile modules/Makefile vmblock-fuse/Makefile vmblockmounter/Makefile tests/Makefile tests/vmrpcdbg/Makefile tests/testDebug/Makefile tests/testPlugin/Makefile tests/testVmblock/Makefile docs/Makefile docs/api/Makefile scripts/Makefile scripts/build/rpcgen_wrapper.sh" +ac_config_files="$ac_config_files Makefile lib/Makefile lib/appUtil/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/asyncsocket/Makefile lib/sslDirect/Makefile lib/pollGtk/Makefile lib/poll/Makefile lib/dataMap/Makefile lib/hashMap/Makefile lib/dict/Makefile lib/dynxdr/Makefile lib/err/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/glibUtils/Makefile lib/guestApp/Makefile lib/guestRpc/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsHelper/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/hgfsUri/Makefile lib/impersonate/Makefile lib/lock/Makefile lib/message/Makefile lib/misc/Makefile lib/netUtil/Makefile lib/nicInfo/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/procMgr/Makefile lib/rpcChannel/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcVmx/Makefile lib/slashProc/Makefile lib/string/Makefile lib/stubs/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/unicode/Makefile lib/user/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile lib/xdg/Makefile services/Makefile services/vmtoolsd/Makefile services/plugins/Makefile services/plugins/desktopEvents/Makefile services/plugins/dndcp/Makefile services/plugins/grabbitmqProxy/Makefile services/plugins/guestInfo/Makefile services/plugins/hgfsServer/Makefile services/plugins/powerOps/Makefile services/plugins/resolutionSet/Makefile services/plugins/timeSync/Makefile services/plugins/vix/Makefile services/plugins/vmbackup/Makefile services/plugins/deployPkg/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile rpctool/Makefile guestproxycerttool/Makefile vgauth/Makefile vgauth/lib/Makefile vgauth/cli/Makefile vgauth/service/Makefile libguestlib/Makefile libguestlib/vmguestlib.pc libDeployPkg/Makefile libDeployPkg/libDeployPkg.pc libhgfs/Makefile libvmtools/Makefile xferlogs/Makefile modules/Makefile vmblock-fuse/Makefile vmhgfs-fuse/Makefile vmblockmounter/Makefile tests/Makefile tests/vmrpcdbg/Makefile tests/testDebug/Makefile tests/testPlugin/Makefile tests/testVmblock/Makefile docs/Makefile docs/api/Makefile scripts/Makefile scripts/build/rpcgen_wrapper.sh" ### @@ -31993,7 +31992,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by open-vm-tools $as_me 9.10.2, which was +This file was extended by open-vm-tools $as_me 10.0.0, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -32040,7 +32039,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -open-vm-tools config.status 9.10.2 +open-vm-tools config.status 10.0.0 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -32515,6 +32514,7 @@ "lib/hgfsServer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServer/Makefile" ;; "lib/hgfsServerManagerGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerManagerGuest/Makefile" ;; "lib/hgfsServerPolicyGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerPolicyGuest/Makefile" ;; + "lib/hgfsUri/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsUri/Makefile" ;; "lib/impersonate/Makefile") CONFIG_FILES="$CONFIG_FILES lib/impersonate/Makefile" ;; "lib/lock/Makefile") CONFIG_FILES="$CONFIG_FILES lib/lock/Makefile" ;; "lib/message/Makefile") CONFIG_FILES="$CONFIG_FILES lib/message/Makefile" ;; @@ -32523,7 +32523,6 @@ "lib/nicInfo/Makefile") CONFIG_FILES="$CONFIG_FILES lib/nicInfo/Makefile" ;; "lib/panic/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panic/Makefile" ;; "lib/panicDefault/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panicDefault/Makefile" ;; - "lib/printer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/printer/Makefile" ;; "lib/procMgr/Makefile") CONFIG_FILES="$CONFIG_FILES lib/procMgr/Makefile" ;; "lib/rpcChannel/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcChannel/Makefile" ;; "lib/rpcIn/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcIn/Makefile" ;; @@ -32574,6 +32573,7 @@ "xferlogs/Makefile") CONFIG_FILES="$CONFIG_FILES xferlogs/Makefile" ;; "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; "vmblock-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmblock-fuse/Makefile" ;; + "vmhgfs-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmhgfs-fuse/Makefile" ;; "vmblockmounter/Makefile") CONFIG_FILES="$CONFIG_FILES vmblockmounter/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/vmrpcdbg/Makefile") CONFIG_FILES="$CONFIG_FILES tests/vmrpcdbg/Makefile" ;; diff -Nru open-vm-tools-9.10.2-2822639/autom4te.cache/traces.0 open-vm-tools-10.0.0-3000743/autom4te.cache/traces.0 --- open-vm-tools-9.10.2-2822639/autom4te.cache/traces.0 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/autom4te.cache/traces.0 2015-09-10 07:31:38.000000000 +0000 @@ -9313,7 +9313,7 @@ m4trace:configure.ac:350: -1- m4_pattern_allow([^GTHREAD_LIBS$]) m4trace:configure.ac:359: -1- m4_pattern_allow([^have_genmarshal$]) m4trace:configure.ac:371: -1- AC_VMW_CHECK_LIB([fuse], [FUSE], [fuse], [], [], [fuse.h], [fuse_main], [have_fuse=yes], [have_fuse=no; - AC_MSG_WARN([Fuse is missing, vmblock-fuse will be disabled.])]) + AC_MSG_WARN([Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled.])]) m4trace:configure.ac:371: -1- m4_pattern_allow([^ac_vmw_lib_cfg$]) m4trace:configure.ac:371: -1- m4_pattern_allow([^FUSE_CPPFLAGS$]) m4trace:configure.ac:371: -1- m4_pattern_allow([^FUSE_LIBS$]) @@ -9428,165 +9428,165 @@ m4trace:configure.ac:1012: -1- m4_pattern_allow([^HAVE_DOT$]) m4trace:configure.ac:1014: -1- m4_pattern_allow([^MSCGEN$]) m4trace:configure.ac:1022: -1- m4_pattern_allow([^MSCGEN_DIR$]) -m4trace:configure.ac:1133: -1- AM_CONDITIONAL([BUILD_HGFSMOUNTER], [test "$buildHgfsmounter" = "yes"]) -m4trace:configure.ac:1133: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_TRUE$]) -m4trace:configure.ac:1133: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_FALSE$]) -m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_TRUE]) -m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_FALSE]) -m4trace:configure.ac:1134: -1- AM_CONDITIONAL([LINUX], [test "$os" = "linux"]) -m4trace:configure.ac:1134: -1- m4_pattern_allow([^LINUX_TRUE$]) -m4trace:configure.ac:1134: -1- m4_pattern_allow([^LINUX_FALSE$]) -m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([LINUX_TRUE]) -m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([LINUX_FALSE]) -m4trace:configure.ac:1135: -1- AM_CONDITIONAL([SOLARIS], [test "$os" = "solaris"]) -m4trace:configure.ac:1135: -1- m4_pattern_allow([^SOLARIS_TRUE$]) -m4trace:configure.ac:1135: -1- m4_pattern_allow([^SOLARIS_FALSE$]) -m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([SOLARIS_TRUE]) -m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([SOLARIS_FALSE]) -m4trace:configure.ac:1136: -1- AM_CONDITIONAL([FREEBSD], [test "$os" = "freebsd" -o "$os" = "kfreebsd-gnu"]) -m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_TRUE$]) -m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_FALSE$]) -m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_TRUE]) -m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_FALSE]) -m4trace:configure.ac:1137: -1- AM_CONDITIONAL([FREEBSD_CUSTOM_SYSDIR], [test \( "$os" = "freebsd" -o "$os" = "kfreebsd-gnu" \) -a -n "$SYSDIR"]) -m4trace:configure.ac:1137: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_TRUE$]) -m4trace:configure.ac:1137: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_FALSE$]) -m4trace:configure.ac:1137: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_TRUE]) -m4trace:configure.ac:1137: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_FALSE]) -m4trace:configure.ac:1139: -1- AM_CONDITIONAL([THIRTY_TWO_BIT_USERSPACE], [test "$userSpaceBitness" = "32"]) -m4trace:configure.ac:1139: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_TRUE$]) -m4trace:configure.ac:1139: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_FALSE$]) -m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_TRUE]) -m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_FALSE]) -m4trace:configure.ac:1140: -1- AM_CONDITIONAL([HAVE_X11], [test "$have_x" = "yes"]) -m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_X11_TRUE$]) -m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_X11_FALSE$]) -m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_X11_TRUE]) -m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_X11_FALSE]) -m4trace:configure.ac:1141: -1- AM_CONDITIONAL([HAVE_ICU], [test "$with_icu" = "yes"]) -m4trace:configure.ac:1141: -1- m4_pattern_allow([^HAVE_ICU_TRUE$]) -m4trace:configure.ac:1141: -1- m4_pattern_allow([^HAVE_ICU_FALSE$]) -m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_TRUE]) -m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_FALSE]) -m4trace:configure.ac:1142: -1- AM_CONDITIONAL([WITH_KERNEL_MODULES], [test "$with_kernel_modules" = "yes"]) -m4trace:configure.ac:1142: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_TRUE$]) -m4trace:configure.ac:1142: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_FALSE$]) -m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_TRUE]) -m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_FALSE]) -m4trace:configure.ac:1143: -1- AM_CONDITIONAL([HAVE_XSM], [test "$have_xsm" = "yes"]) -m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XSM_TRUE$]) -m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XSM_FALSE$]) -m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_TRUE]) -m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_FALSE]) -m4trace:configure.ac:1144: -1- AM_CONDITIONAL([HAVE_XCOMPOSITE], [test "$have_xcomposite" = "yes"]) -m4trace:configure.ac:1144: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_TRUE$]) -m4trace:configure.ac:1144: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_FALSE$]) -m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_TRUE]) -m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_FALSE]) -m4trace:configure.ac:1145: -1- AM_CONDITIONAL([ENABLE_TESTS], [test "$have_cunit" = "yes"]) -m4trace:configure.ac:1145: -1- m4_pattern_allow([^ENABLE_TESTS_TRUE$]) -m4trace:configure.ac:1145: -1- m4_pattern_allow([^ENABLE_TESTS_FALSE$]) -m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_TRUE]) -m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_FALSE]) -m4trace:configure.ac:1146: -1- AM_CONDITIONAL([WITH_ROOT_PRIVILEGES], [test "$with_root_privileges" = "yes"]) -m4trace:configure.ac:1146: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_TRUE$]) -m4trace:configure.ac:1146: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_FALSE$]) -m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_TRUE]) -m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_FALSE]) -m4trace:configure.ac:1147: -1- AM_CONDITIONAL([HAVE_DNET], [test "$have_dnet" = "yes"]) -m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DNET_TRUE$]) -m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DNET_FALSE$]) -m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_TRUE]) -m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_FALSE]) -m4trace:configure.ac:1148: -1- AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = "yes"]) -m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_DOXYGEN_TRUE$]) -m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_DOXYGEN_FALSE$]) -m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_TRUE]) -m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_FALSE]) -m4trace:configure.ac:1149: -1- AM_CONDITIONAL([HAVE_FUSE], [test "$have_fuse" = "yes"]) -m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_FUSE_TRUE$]) -m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_FUSE_FALSE$]) -m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_TRUE]) -m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_FALSE]) -m4trace:configure.ac:1150: -1- AM_CONDITIONAL([HAVE_GNU_LD], [test "$with_gnu_ld" = "yes"]) -m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GNU_LD_TRUE$]) -m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GNU_LD_FALSE$]) -m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_TRUE]) -m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_FALSE]) -m4trace:configure.ac:1151: -1- AM_CONDITIONAL([HAVE_GTKMM], [test "$have_x" = "yes" -a "$with_gtkmm" = "yes"]) -m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_GTKMM_TRUE$]) -m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_GTKMM_FALSE$]) -m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_TRUE]) -m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_FALSE]) -m4trace:configure.ac:1152: -1- AM_CONDITIONAL([HAVE_PAM], [test "$with_pam" = "yes"]) -m4trace:configure.ac:1152: -1- m4_pattern_allow([^HAVE_PAM_TRUE$]) -m4trace:configure.ac:1152: -1- m4_pattern_allow([^HAVE_PAM_FALSE$]) -m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_TRUE]) -m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_FALSE]) -m4trace:configure.ac:1153: -1- AM_CONDITIONAL([USE_SLASH_PROC], [test "$os" = "linux"]) -m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_SLASH_PROC_TRUE$]) -m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_SLASH_PROC_FALSE$]) -m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_TRUE]) -m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_FALSE]) -m4trace:configure.ac:1154: -1- AM_CONDITIONAL([USE_PRINTF_WRAPPERS], [test "$bsdPrintfWrappers" = "yes"]) -m4trace:configure.ac:1154: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_TRUE$]) -m4trace:configure.ac:1154: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_FALSE$]) -m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_TRUE]) -m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_FALSE]) -m4trace:configure.ac:1155: -1- AM_CONDITIONAL([ENABLE_DEPLOYPKG], [test "$enable_deploypkg" = "yes"]) -m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_TRUE$]) -m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_FALSE$]) -m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_TRUE]) -m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_FALSE]) -m4trace:configure.ac:1156: -1- AM_CONDITIONAL([ENABLE_GRABBITMQPROXY], [test "$enable_grabbitmqproxy" = "yes"]) -m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_TRUE$]) -m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_FALSE$]) -m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_TRUE]) -m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_FALSE]) -m4trace:configure.ac:1157: -1- AM_CONDITIONAL([ENABLE_VGAUTH], [test "$enable_vgauth" = "yes"]) -m4trace:configure.ac:1157: -1- m4_pattern_allow([^ENABLE_VGAUTH_TRUE$]) -m4trace:configure.ac:1157: -1- m4_pattern_allow([^ENABLE_VGAUTH_FALSE$]) -m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_TRUE]) -m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_FALSE]) -m4trace:configure.ac:1158: -1- AM_CONDITIONAL([HAVE_VSOCK], [test "$os" = "linux"]) -m4trace:configure.ac:1158: -1- m4_pattern_allow([^HAVE_VSOCK_TRUE$]) -m4trace:configure.ac:1158: -1- m4_pattern_allow([^HAVE_VSOCK_FALSE$]) -m4trace:configure.ac:1158: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_TRUE]) -m4trace:configure.ac:1158: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_FALSE]) -m4trace:configure.ac:1161: -1- m4_pattern_allow([^NO_XSM$]) -m4trace:configure.ac:1165: -1- m4_pattern_allow([^NO_XCOMPOSITE$]) -m4trace:configure.ac:1177: -1- m4_pattern_allow([^NO_MULTIMON$]) -m4trace:configure.ac:1219: -1- m4_pattern_allow([^HGFS_LIBS$]) -m4trace:configure.ac:1220: -1- m4_pattern_allow([^TOOLS_VERSION$]) -m4trace:configure.ac:1221: -1- m4_pattern_allow([^TARGET_OS$]) -m4trace:configure.ac:1222: -1- m4_pattern_allow([^KERNEL_RELEASE$]) -m4trace:configure.ac:1223: -1- m4_pattern_allow([^LINUXINCLUDE$]) -m4trace:configure.ac:1224: -1- m4_pattern_allow([^MODULES_OS$]) -m4trace:configure.ac:1225: -1- m4_pattern_allow([^MODULES_DIR$]) -m4trace:configure.ac:1226: -1- m4_pattern_allow([^MODULES$]) -m4trace:configure.ac:1227: -1- m4_pattern_allow([^COMMON_XLIBS$]) -m4trace:configure.ac:1228: -1- m4_pattern_allow([^XSM_LIBS$]) -m4trace:configure.ac:1229: -1- m4_pattern_allow([^XCOMPOSITE_LIBS$]) -m4trace:configure.ac:1230: -1- m4_pattern_allow([^PAM_PREFIX$]) -m4trace:configure.ac:1231: -1- m4_pattern_allow([^PLUGIN_CPPFLAGS$]) -m4trace:configure.ac:1232: -1- m4_pattern_allow([^PLUGIN_LDFLAGS$]) -m4trace:configure.ac:1233: -1- m4_pattern_allow([^VMTOOLS_CPPFLAGS$]) -m4trace:configure.ac:1234: -1- m4_pattern_allow([^VMTOOLS_LIBS$]) -m4trace:configure.ac:1235: -1- m4_pattern_allow([^RPCGENFLAGS$]) -m4trace:configure.ac:1236: -1- m4_pattern_allow([^XDR_LIBS$]) -m4trace:configure.ac:1237: -1- m4_pattern_allow([^TEST_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1238: -1- m4_pattern_allow([^COMMON_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1239: -1- m4_pattern_allow([^VMSVC_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1240: -1- m4_pattern_allow([^VMUSR_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1245: -1- m4_pattern_allow([^SYSDIR$]) -m4trace:configure.ac:1247: -1- m4_pattern_allow([^INSTVMSG$]) -m4trace:configure.ac:1248: -1- m4_pattern_allow([^RPCGEN_WRAPPER$]) -m4trace:configure.ac:1252: -1- m4_pattern_allow([^LIB_AUTH_CPPFLAGS$]) -m4trace:configure.ac:1253: -1- m4_pattern_allow([^LIB_IMPERSONATE_CPPFLAGS$]) -m4trace:configure.ac:1254: -1- m4_pattern_allow([^LIB_USER_CPPFLAGS$]) -m4trace:configure.ac:1255: -1- m4_pattern_allow([^LIBVMTOOLS_LIBADD$]) -m4trace:configure.ac:1259: -1- m4_pattern_allow([^VIX_LIBADD$]) -m4trace:configure.ac:1260: -1- m4_pattern_allow([^VGAUTH_LIBADD$]) +m4trace:configure.ac:1132: -1- AM_CONDITIONAL([BUILD_HGFSMOUNTER], [test "$buildHgfsmounter" = "yes"]) +m4trace:configure.ac:1132: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_TRUE$]) +m4trace:configure.ac:1132: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_FALSE$]) +m4trace:configure.ac:1132: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_TRUE]) +m4trace:configure.ac:1132: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_FALSE]) +m4trace:configure.ac:1133: -1- AM_CONDITIONAL([LINUX], [test "$os" = "linux"]) +m4trace:configure.ac:1133: -1- m4_pattern_allow([^LINUX_TRUE$]) +m4trace:configure.ac:1133: -1- m4_pattern_allow([^LINUX_FALSE$]) +m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([LINUX_TRUE]) +m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([LINUX_FALSE]) +m4trace:configure.ac:1134: -1- AM_CONDITIONAL([SOLARIS], [test "$os" = "solaris"]) +m4trace:configure.ac:1134: -1- m4_pattern_allow([^SOLARIS_TRUE$]) +m4trace:configure.ac:1134: -1- m4_pattern_allow([^SOLARIS_FALSE$]) +m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([SOLARIS_TRUE]) +m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([SOLARIS_FALSE]) +m4trace:configure.ac:1135: -1- AM_CONDITIONAL([FREEBSD], [test "$os" = "freebsd" -o "$os" = "kfreebsd-gnu"]) +m4trace:configure.ac:1135: -1- m4_pattern_allow([^FREEBSD_TRUE$]) +m4trace:configure.ac:1135: -1- m4_pattern_allow([^FREEBSD_FALSE$]) +m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([FREEBSD_TRUE]) +m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([FREEBSD_FALSE]) +m4trace:configure.ac:1136: -1- AM_CONDITIONAL([FREEBSD_CUSTOM_SYSDIR], [test \( "$os" = "freebsd" -o "$os" = "kfreebsd-gnu" \) -a -n "$SYSDIR"]) +m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_TRUE$]) +m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_FALSE$]) +m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_TRUE]) +m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_FALSE]) +m4trace:configure.ac:1138: -1- AM_CONDITIONAL([THIRTY_TWO_BIT_USERSPACE], [test "$userSpaceBitness" = "32"]) +m4trace:configure.ac:1138: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_TRUE$]) +m4trace:configure.ac:1138: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_FALSE$]) +m4trace:configure.ac:1138: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_TRUE]) +m4trace:configure.ac:1138: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_FALSE]) +m4trace:configure.ac:1139: -1- AM_CONDITIONAL([HAVE_X11], [test "$have_x" = "yes"]) +m4trace:configure.ac:1139: -1- m4_pattern_allow([^HAVE_X11_TRUE$]) +m4trace:configure.ac:1139: -1- m4_pattern_allow([^HAVE_X11_FALSE$]) +m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([HAVE_X11_TRUE]) +m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([HAVE_X11_FALSE]) +m4trace:configure.ac:1140: -1- AM_CONDITIONAL([HAVE_ICU], [test "$with_icu" = "yes"]) +m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_ICU_TRUE$]) +m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_ICU_FALSE$]) +m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_TRUE]) +m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_FALSE]) +m4trace:configure.ac:1141: -1- AM_CONDITIONAL([WITH_KERNEL_MODULES], [test "$with_kernel_modules" = "yes"]) +m4trace:configure.ac:1141: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_TRUE$]) +m4trace:configure.ac:1141: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_FALSE$]) +m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_TRUE]) +m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_FALSE]) +m4trace:configure.ac:1142: -1- AM_CONDITIONAL([HAVE_XSM], [test "$have_xsm" = "yes"]) +m4trace:configure.ac:1142: -1- m4_pattern_allow([^HAVE_XSM_TRUE$]) +m4trace:configure.ac:1142: -1- m4_pattern_allow([^HAVE_XSM_FALSE$]) +m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_TRUE]) +m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_FALSE]) +m4trace:configure.ac:1143: -1- AM_CONDITIONAL([HAVE_XCOMPOSITE], [test "$have_xcomposite" = "yes"]) +m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_TRUE$]) +m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_FALSE$]) +m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_TRUE]) +m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_FALSE]) +m4trace:configure.ac:1144: -1- AM_CONDITIONAL([ENABLE_TESTS], [test "$have_cunit" = "yes"]) +m4trace:configure.ac:1144: -1- m4_pattern_allow([^ENABLE_TESTS_TRUE$]) +m4trace:configure.ac:1144: -1- m4_pattern_allow([^ENABLE_TESTS_FALSE$]) +m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_TRUE]) +m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_FALSE]) +m4trace:configure.ac:1145: -1- AM_CONDITIONAL([WITH_ROOT_PRIVILEGES], [test "$with_root_privileges" = "yes"]) +m4trace:configure.ac:1145: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_TRUE$]) +m4trace:configure.ac:1145: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_FALSE$]) +m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_TRUE]) +m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_FALSE]) +m4trace:configure.ac:1146: -1- AM_CONDITIONAL([HAVE_DNET], [test "$have_dnet" = "yes"]) +m4trace:configure.ac:1146: -1- m4_pattern_allow([^HAVE_DNET_TRUE$]) +m4trace:configure.ac:1146: -1- m4_pattern_allow([^HAVE_DNET_FALSE$]) +m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_TRUE]) +m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_FALSE]) +m4trace:configure.ac:1147: -1- AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = "yes"]) +m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DOXYGEN_TRUE$]) +m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DOXYGEN_FALSE$]) +m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_TRUE]) +m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_FALSE]) +m4trace:configure.ac:1148: -1- AM_CONDITIONAL([HAVE_FUSE], [test "$have_fuse" = "yes"]) +m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_FUSE_TRUE$]) +m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_FUSE_FALSE$]) +m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_TRUE]) +m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_FALSE]) +m4trace:configure.ac:1149: -1- AM_CONDITIONAL([HAVE_GNU_LD], [test "$with_gnu_ld" = "yes"]) +m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_GNU_LD_TRUE$]) +m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_GNU_LD_FALSE$]) +m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_TRUE]) +m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_FALSE]) +m4trace:configure.ac:1150: -1- AM_CONDITIONAL([HAVE_GTKMM], [test "$have_x" = "yes" -a "$with_gtkmm" = "yes"]) +m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GTKMM_TRUE$]) +m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GTKMM_FALSE$]) +m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_TRUE]) +m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_FALSE]) +m4trace:configure.ac:1151: -1- AM_CONDITIONAL([HAVE_PAM], [test "$with_pam" = "yes"]) +m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_PAM_TRUE$]) +m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_PAM_FALSE$]) +m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_TRUE]) +m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_FALSE]) +m4trace:configure.ac:1152: -1- AM_CONDITIONAL([USE_SLASH_PROC], [test "$os" = "linux"]) +m4trace:configure.ac:1152: -1- m4_pattern_allow([^USE_SLASH_PROC_TRUE$]) +m4trace:configure.ac:1152: -1- m4_pattern_allow([^USE_SLASH_PROC_FALSE$]) +m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_TRUE]) +m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_FALSE]) +m4trace:configure.ac:1153: -1- AM_CONDITIONAL([USE_PRINTF_WRAPPERS], [test "$bsdPrintfWrappers" = "yes"]) +m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_TRUE$]) +m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_FALSE$]) +m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_TRUE]) +m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_FALSE]) +m4trace:configure.ac:1154: -1- AM_CONDITIONAL([ENABLE_DEPLOYPKG], [test "$enable_deploypkg" = "yes"]) +m4trace:configure.ac:1154: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_TRUE$]) +m4trace:configure.ac:1154: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_FALSE$]) +m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_TRUE]) +m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_FALSE]) +m4trace:configure.ac:1155: -1- AM_CONDITIONAL([ENABLE_GRABBITMQPROXY], [test "$enable_grabbitmqproxy" = "yes"]) +m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_TRUE$]) +m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_FALSE$]) +m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_TRUE]) +m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_FALSE]) +m4trace:configure.ac:1156: -1- AM_CONDITIONAL([ENABLE_VGAUTH], [test "$enable_vgauth" = "yes"]) +m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_VGAUTH_TRUE$]) +m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_VGAUTH_FALSE$]) +m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_TRUE]) +m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_FALSE]) +m4trace:configure.ac:1157: -1- AM_CONDITIONAL([HAVE_VSOCK], [test "$os" = "linux"]) +m4trace:configure.ac:1157: -1- m4_pattern_allow([^HAVE_VSOCK_TRUE$]) +m4trace:configure.ac:1157: -1- m4_pattern_allow([^HAVE_VSOCK_FALSE$]) +m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_TRUE]) +m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_FALSE]) +m4trace:configure.ac:1160: -1- m4_pattern_allow([^NO_XSM$]) +m4trace:configure.ac:1164: -1- m4_pattern_allow([^NO_XCOMPOSITE$]) +m4trace:configure.ac:1176: -1- m4_pattern_allow([^NO_MULTIMON$]) +m4trace:configure.ac:1218: -1- m4_pattern_allow([^HGFS_LIBS$]) +m4trace:configure.ac:1219: -1- m4_pattern_allow([^TOOLS_VERSION$]) +m4trace:configure.ac:1220: -1- m4_pattern_allow([^TARGET_OS$]) +m4trace:configure.ac:1221: -1- m4_pattern_allow([^KERNEL_RELEASE$]) +m4trace:configure.ac:1222: -1- m4_pattern_allow([^LINUXINCLUDE$]) +m4trace:configure.ac:1223: -1- m4_pattern_allow([^MODULES_OS$]) +m4trace:configure.ac:1224: -1- m4_pattern_allow([^MODULES_DIR$]) +m4trace:configure.ac:1225: -1- m4_pattern_allow([^MODULES$]) +m4trace:configure.ac:1226: -1- m4_pattern_allow([^COMMON_XLIBS$]) +m4trace:configure.ac:1227: -1- m4_pattern_allow([^XSM_LIBS$]) +m4trace:configure.ac:1228: -1- m4_pattern_allow([^XCOMPOSITE_LIBS$]) +m4trace:configure.ac:1229: -1- m4_pattern_allow([^PAM_PREFIX$]) +m4trace:configure.ac:1230: -1- m4_pattern_allow([^PLUGIN_CPPFLAGS$]) +m4trace:configure.ac:1231: -1- m4_pattern_allow([^PLUGIN_LDFLAGS$]) +m4trace:configure.ac:1232: -1- m4_pattern_allow([^VMTOOLS_CPPFLAGS$]) +m4trace:configure.ac:1233: -1- m4_pattern_allow([^VMTOOLS_LIBS$]) +m4trace:configure.ac:1234: -1- m4_pattern_allow([^RPCGENFLAGS$]) +m4trace:configure.ac:1235: -1- m4_pattern_allow([^XDR_LIBS$]) +m4trace:configure.ac:1236: -1- m4_pattern_allow([^TEST_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1237: -1- m4_pattern_allow([^COMMON_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1238: -1- m4_pattern_allow([^VMSVC_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1239: -1- m4_pattern_allow([^VMUSR_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1244: -1- m4_pattern_allow([^SYSDIR$]) +m4trace:configure.ac:1246: -1- m4_pattern_allow([^INSTVMSG$]) +m4trace:configure.ac:1247: -1- m4_pattern_allow([^RPCGEN_WRAPPER$]) +m4trace:configure.ac:1251: -1- m4_pattern_allow([^LIB_AUTH_CPPFLAGS$]) +m4trace:configure.ac:1252: -1- m4_pattern_allow([^LIB_IMPERSONATE_CPPFLAGS$]) +m4trace:configure.ac:1253: -1- m4_pattern_allow([^LIB_USER_CPPFLAGS$]) +m4trace:configure.ac:1254: -1- m4_pattern_allow([^LIBVMTOOLS_LIBADD$]) +m4trace:configure.ac:1258: -1- m4_pattern_allow([^VIX_LIBADD$]) +m4trace:configure.ac:1259: -1- m4_pattern_allow([^VGAUTH_LIBADD$]) m4trace:configure.ac:1365: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:1365: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:1365: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS diff -Nru open-vm-tools-9.10.2-2822639/autom4te.cache/traces.1 open-vm-tools-10.0.0-3000743/autom4te.cache/traces.1 --- open-vm-tools-9.10.2-2822639/autom4te.cache/traces.1 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/autom4te.cache/traces.1 2015-09-10 07:31:38.000000000 +0000 @@ -4,7 +4,7 @@ m4trace:aclocal.m4:900: -1- m4_include([m4/ltversion.m4]) m4trace:aclocal.m4:901: -1- m4_include([m4/lt~obsolete.m4]) m4trace:aclocal.m4:902: -1- m4_include([m4/vmtools.m4]) -m4trace:configure.ac:43: -1- AC_INIT([open-vm-tools], [9.10.2], [open-vm-tools-devel@lists.sourceforge.net]) +m4trace:configure.ac:43: -1- AC_INIT([open-vm-tools], [10.0.0], [open-vm-tools-devel@lists.sourceforge.net]) m4trace:configure.ac:43: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:43: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:43: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) @@ -970,333 +970,333 @@ m4trace:configure.ac:1022: -1- AC_SUBST([MSCGEN_DIR]) m4trace:configure.ac:1022: -1- AC_SUBST_TRACE([MSCGEN_DIR]) m4trace:configure.ac:1022: -1- m4_pattern_allow([^MSCGEN_DIR$]) -m4trace:configure.ac:1133: -1- AM_CONDITIONAL([BUILD_HGFSMOUNTER], [test "$buildHgfsmounter" = "yes"]) -m4trace:configure.ac:1133: -1- AC_SUBST([BUILD_HGFSMOUNTER_TRUE]) -m4trace:configure.ac:1133: -1- AC_SUBST_TRACE([BUILD_HGFSMOUNTER_TRUE]) -m4trace:configure.ac:1133: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_TRUE$]) -m4trace:configure.ac:1133: -1- AC_SUBST([BUILD_HGFSMOUNTER_FALSE]) -m4trace:configure.ac:1133: -1- AC_SUBST_TRACE([BUILD_HGFSMOUNTER_FALSE]) -m4trace:configure.ac:1133: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_FALSE$]) -m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_TRUE]) -m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_FALSE]) -m4trace:configure.ac:1134: -1- AM_CONDITIONAL([LINUX], [test "$os" = "linux"]) -m4trace:configure.ac:1134: -1- AC_SUBST([LINUX_TRUE]) -m4trace:configure.ac:1134: -1- AC_SUBST_TRACE([LINUX_TRUE]) -m4trace:configure.ac:1134: -1- m4_pattern_allow([^LINUX_TRUE$]) -m4trace:configure.ac:1134: -1- AC_SUBST([LINUX_FALSE]) -m4trace:configure.ac:1134: -1- AC_SUBST_TRACE([LINUX_FALSE]) -m4trace:configure.ac:1134: -1- m4_pattern_allow([^LINUX_FALSE$]) -m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([LINUX_TRUE]) -m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([LINUX_FALSE]) -m4trace:configure.ac:1135: -1- AM_CONDITIONAL([SOLARIS], [test "$os" = "solaris"]) -m4trace:configure.ac:1135: -1- AC_SUBST([SOLARIS_TRUE]) -m4trace:configure.ac:1135: -1- AC_SUBST_TRACE([SOLARIS_TRUE]) -m4trace:configure.ac:1135: -1- m4_pattern_allow([^SOLARIS_TRUE$]) -m4trace:configure.ac:1135: -1- AC_SUBST([SOLARIS_FALSE]) -m4trace:configure.ac:1135: -1- AC_SUBST_TRACE([SOLARIS_FALSE]) -m4trace:configure.ac:1135: -1- m4_pattern_allow([^SOLARIS_FALSE$]) -m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([SOLARIS_TRUE]) -m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([SOLARIS_FALSE]) -m4trace:configure.ac:1136: -1- AM_CONDITIONAL([FREEBSD], [test "$os" = "freebsd" -o "$os" = "kfreebsd-gnu"]) -m4trace:configure.ac:1136: -1- AC_SUBST([FREEBSD_TRUE]) -m4trace:configure.ac:1136: -1- AC_SUBST_TRACE([FREEBSD_TRUE]) -m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_TRUE$]) -m4trace:configure.ac:1136: -1- AC_SUBST([FREEBSD_FALSE]) -m4trace:configure.ac:1136: -1- AC_SUBST_TRACE([FREEBSD_FALSE]) -m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_FALSE$]) -m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_TRUE]) -m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_FALSE]) -m4trace:configure.ac:1137: -1- AM_CONDITIONAL([FREEBSD_CUSTOM_SYSDIR], [test \( "$os" = "freebsd" -o "$os" = "kfreebsd-gnu" \) -a -n "$SYSDIR"]) -m4trace:configure.ac:1137: -1- AC_SUBST([FREEBSD_CUSTOM_SYSDIR_TRUE]) -m4trace:configure.ac:1137: -1- AC_SUBST_TRACE([FREEBSD_CUSTOM_SYSDIR_TRUE]) -m4trace:configure.ac:1137: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_TRUE$]) -m4trace:configure.ac:1137: -1- AC_SUBST([FREEBSD_CUSTOM_SYSDIR_FALSE]) -m4trace:configure.ac:1137: -1- AC_SUBST_TRACE([FREEBSD_CUSTOM_SYSDIR_FALSE]) -m4trace:configure.ac:1137: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_FALSE$]) -m4trace:configure.ac:1137: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_TRUE]) -m4trace:configure.ac:1137: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_FALSE]) -m4trace:configure.ac:1139: -1- AM_CONDITIONAL([THIRTY_TWO_BIT_USERSPACE], [test "$userSpaceBitness" = "32"]) -m4trace:configure.ac:1139: -1- AC_SUBST([THIRTY_TWO_BIT_USERSPACE_TRUE]) -m4trace:configure.ac:1139: -1- AC_SUBST_TRACE([THIRTY_TWO_BIT_USERSPACE_TRUE]) -m4trace:configure.ac:1139: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_TRUE$]) -m4trace:configure.ac:1139: -1- AC_SUBST([THIRTY_TWO_BIT_USERSPACE_FALSE]) -m4trace:configure.ac:1139: -1- AC_SUBST_TRACE([THIRTY_TWO_BIT_USERSPACE_FALSE]) -m4trace:configure.ac:1139: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_FALSE$]) -m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_TRUE]) -m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_FALSE]) -m4trace:configure.ac:1140: -1- AM_CONDITIONAL([HAVE_X11], [test "$have_x" = "yes"]) -m4trace:configure.ac:1140: -1- AC_SUBST([HAVE_X11_TRUE]) -m4trace:configure.ac:1140: -1- AC_SUBST_TRACE([HAVE_X11_TRUE]) -m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_X11_TRUE$]) -m4trace:configure.ac:1140: -1- AC_SUBST([HAVE_X11_FALSE]) -m4trace:configure.ac:1140: -1- AC_SUBST_TRACE([HAVE_X11_FALSE]) -m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_X11_FALSE$]) -m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_X11_TRUE]) -m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_X11_FALSE]) -m4trace:configure.ac:1141: -1- AM_CONDITIONAL([HAVE_ICU], [test "$with_icu" = "yes"]) -m4trace:configure.ac:1141: -1- AC_SUBST([HAVE_ICU_TRUE]) -m4trace:configure.ac:1141: -1- AC_SUBST_TRACE([HAVE_ICU_TRUE]) -m4trace:configure.ac:1141: -1- m4_pattern_allow([^HAVE_ICU_TRUE$]) -m4trace:configure.ac:1141: -1- AC_SUBST([HAVE_ICU_FALSE]) -m4trace:configure.ac:1141: -1- AC_SUBST_TRACE([HAVE_ICU_FALSE]) -m4trace:configure.ac:1141: -1- m4_pattern_allow([^HAVE_ICU_FALSE$]) -m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_TRUE]) -m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_FALSE]) -m4trace:configure.ac:1142: -1- AM_CONDITIONAL([WITH_KERNEL_MODULES], [test "$with_kernel_modules" = "yes"]) -m4trace:configure.ac:1142: -1- AC_SUBST([WITH_KERNEL_MODULES_TRUE]) -m4trace:configure.ac:1142: -1- AC_SUBST_TRACE([WITH_KERNEL_MODULES_TRUE]) -m4trace:configure.ac:1142: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_TRUE$]) -m4trace:configure.ac:1142: -1- AC_SUBST([WITH_KERNEL_MODULES_FALSE]) -m4trace:configure.ac:1142: -1- AC_SUBST_TRACE([WITH_KERNEL_MODULES_FALSE]) -m4trace:configure.ac:1142: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_FALSE$]) -m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_TRUE]) -m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_FALSE]) -m4trace:configure.ac:1143: -1- AM_CONDITIONAL([HAVE_XSM], [test "$have_xsm" = "yes"]) -m4trace:configure.ac:1143: -1- AC_SUBST([HAVE_XSM_TRUE]) -m4trace:configure.ac:1143: -1- AC_SUBST_TRACE([HAVE_XSM_TRUE]) -m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XSM_TRUE$]) -m4trace:configure.ac:1143: -1- AC_SUBST([HAVE_XSM_FALSE]) -m4trace:configure.ac:1143: -1- AC_SUBST_TRACE([HAVE_XSM_FALSE]) -m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XSM_FALSE$]) -m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_TRUE]) -m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_FALSE]) -m4trace:configure.ac:1144: -1- AM_CONDITIONAL([HAVE_XCOMPOSITE], [test "$have_xcomposite" = "yes"]) -m4trace:configure.ac:1144: -1- AC_SUBST([HAVE_XCOMPOSITE_TRUE]) -m4trace:configure.ac:1144: -1- AC_SUBST_TRACE([HAVE_XCOMPOSITE_TRUE]) -m4trace:configure.ac:1144: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_TRUE$]) -m4trace:configure.ac:1144: -1- AC_SUBST([HAVE_XCOMPOSITE_FALSE]) -m4trace:configure.ac:1144: -1- AC_SUBST_TRACE([HAVE_XCOMPOSITE_FALSE]) -m4trace:configure.ac:1144: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_FALSE$]) -m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_TRUE]) -m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_FALSE]) -m4trace:configure.ac:1145: -1- AM_CONDITIONAL([ENABLE_TESTS], [test "$have_cunit" = "yes"]) -m4trace:configure.ac:1145: -1- AC_SUBST([ENABLE_TESTS_TRUE]) -m4trace:configure.ac:1145: -1- AC_SUBST_TRACE([ENABLE_TESTS_TRUE]) -m4trace:configure.ac:1145: -1- m4_pattern_allow([^ENABLE_TESTS_TRUE$]) -m4trace:configure.ac:1145: -1- AC_SUBST([ENABLE_TESTS_FALSE]) -m4trace:configure.ac:1145: -1- AC_SUBST_TRACE([ENABLE_TESTS_FALSE]) -m4trace:configure.ac:1145: -1- m4_pattern_allow([^ENABLE_TESTS_FALSE$]) -m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_TRUE]) -m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_FALSE]) -m4trace:configure.ac:1146: -1- AM_CONDITIONAL([WITH_ROOT_PRIVILEGES], [test "$with_root_privileges" = "yes"]) -m4trace:configure.ac:1146: -1- AC_SUBST([WITH_ROOT_PRIVILEGES_TRUE]) -m4trace:configure.ac:1146: -1- AC_SUBST_TRACE([WITH_ROOT_PRIVILEGES_TRUE]) -m4trace:configure.ac:1146: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_TRUE$]) -m4trace:configure.ac:1146: -1- AC_SUBST([WITH_ROOT_PRIVILEGES_FALSE]) -m4trace:configure.ac:1146: -1- AC_SUBST_TRACE([WITH_ROOT_PRIVILEGES_FALSE]) -m4trace:configure.ac:1146: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_FALSE$]) -m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_TRUE]) -m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_FALSE]) -m4trace:configure.ac:1147: -1- AM_CONDITIONAL([HAVE_DNET], [test "$have_dnet" = "yes"]) -m4trace:configure.ac:1147: -1- AC_SUBST([HAVE_DNET_TRUE]) -m4trace:configure.ac:1147: -1- AC_SUBST_TRACE([HAVE_DNET_TRUE]) -m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DNET_TRUE$]) -m4trace:configure.ac:1147: -1- AC_SUBST([HAVE_DNET_FALSE]) -m4trace:configure.ac:1147: -1- AC_SUBST_TRACE([HAVE_DNET_FALSE]) -m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DNET_FALSE$]) -m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_TRUE]) -m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_FALSE]) -m4trace:configure.ac:1148: -1- AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = "yes"]) -m4trace:configure.ac:1148: -1- AC_SUBST([HAVE_DOXYGEN_TRUE]) -m4trace:configure.ac:1148: -1- AC_SUBST_TRACE([HAVE_DOXYGEN_TRUE]) -m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_DOXYGEN_TRUE$]) -m4trace:configure.ac:1148: -1- AC_SUBST([HAVE_DOXYGEN_FALSE]) -m4trace:configure.ac:1148: -1- AC_SUBST_TRACE([HAVE_DOXYGEN_FALSE]) -m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_DOXYGEN_FALSE$]) -m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_TRUE]) -m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_FALSE]) -m4trace:configure.ac:1149: -1- AM_CONDITIONAL([HAVE_FUSE], [test "$have_fuse" = "yes"]) -m4trace:configure.ac:1149: -1- AC_SUBST([HAVE_FUSE_TRUE]) -m4trace:configure.ac:1149: -1- AC_SUBST_TRACE([HAVE_FUSE_TRUE]) -m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_FUSE_TRUE$]) -m4trace:configure.ac:1149: -1- AC_SUBST([HAVE_FUSE_FALSE]) -m4trace:configure.ac:1149: -1- AC_SUBST_TRACE([HAVE_FUSE_FALSE]) -m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_FUSE_FALSE$]) -m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_TRUE]) -m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_FALSE]) -m4trace:configure.ac:1150: -1- AM_CONDITIONAL([HAVE_GNU_LD], [test "$with_gnu_ld" = "yes"]) -m4trace:configure.ac:1150: -1- AC_SUBST([HAVE_GNU_LD_TRUE]) -m4trace:configure.ac:1150: -1- AC_SUBST_TRACE([HAVE_GNU_LD_TRUE]) -m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GNU_LD_TRUE$]) -m4trace:configure.ac:1150: -1- AC_SUBST([HAVE_GNU_LD_FALSE]) -m4trace:configure.ac:1150: -1- AC_SUBST_TRACE([HAVE_GNU_LD_FALSE]) -m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GNU_LD_FALSE$]) -m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_TRUE]) -m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_FALSE]) -m4trace:configure.ac:1151: -1- AM_CONDITIONAL([HAVE_GTKMM], [test "$have_x" = "yes" -a "$with_gtkmm" = "yes"]) -m4trace:configure.ac:1151: -1- AC_SUBST([HAVE_GTKMM_TRUE]) -m4trace:configure.ac:1151: -1- AC_SUBST_TRACE([HAVE_GTKMM_TRUE]) -m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_GTKMM_TRUE$]) -m4trace:configure.ac:1151: -1- AC_SUBST([HAVE_GTKMM_FALSE]) -m4trace:configure.ac:1151: -1- AC_SUBST_TRACE([HAVE_GTKMM_FALSE]) -m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_GTKMM_FALSE$]) -m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_TRUE]) -m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_FALSE]) -m4trace:configure.ac:1152: -1- AM_CONDITIONAL([HAVE_PAM], [test "$with_pam" = "yes"]) -m4trace:configure.ac:1152: -1- AC_SUBST([HAVE_PAM_TRUE]) -m4trace:configure.ac:1152: -1- AC_SUBST_TRACE([HAVE_PAM_TRUE]) -m4trace:configure.ac:1152: -1- m4_pattern_allow([^HAVE_PAM_TRUE$]) -m4trace:configure.ac:1152: -1- AC_SUBST([HAVE_PAM_FALSE]) -m4trace:configure.ac:1152: -1- AC_SUBST_TRACE([HAVE_PAM_FALSE]) -m4trace:configure.ac:1152: -1- m4_pattern_allow([^HAVE_PAM_FALSE$]) -m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_TRUE]) -m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_FALSE]) -m4trace:configure.ac:1153: -1- AM_CONDITIONAL([USE_SLASH_PROC], [test "$os" = "linux"]) -m4trace:configure.ac:1153: -1- AC_SUBST([USE_SLASH_PROC_TRUE]) -m4trace:configure.ac:1153: -1- AC_SUBST_TRACE([USE_SLASH_PROC_TRUE]) -m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_SLASH_PROC_TRUE$]) -m4trace:configure.ac:1153: -1- AC_SUBST([USE_SLASH_PROC_FALSE]) -m4trace:configure.ac:1153: -1- AC_SUBST_TRACE([USE_SLASH_PROC_FALSE]) -m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_SLASH_PROC_FALSE$]) -m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_TRUE]) -m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_FALSE]) -m4trace:configure.ac:1154: -1- AM_CONDITIONAL([USE_PRINTF_WRAPPERS], [test "$bsdPrintfWrappers" = "yes"]) -m4trace:configure.ac:1154: -1- AC_SUBST([USE_PRINTF_WRAPPERS_TRUE]) -m4trace:configure.ac:1154: -1- AC_SUBST_TRACE([USE_PRINTF_WRAPPERS_TRUE]) -m4trace:configure.ac:1154: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_TRUE$]) -m4trace:configure.ac:1154: -1- AC_SUBST([USE_PRINTF_WRAPPERS_FALSE]) -m4trace:configure.ac:1154: -1- AC_SUBST_TRACE([USE_PRINTF_WRAPPERS_FALSE]) -m4trace:configure.ac:1154: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_FALSE$]) -m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_TRUE]) -m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_FALSE]) -m4trace:configure.ac:1155: -1- AM_CONDITIONAL([ENABLE_DEPLOYPKG], [test "$enable_deploypkg" = "yes"]) -m4trace:configure.ac:1155: -1- AC_SUBST([ENABLE_DEPLOYPKG_TRUE]) -m4trace:configure.ac:1155: -1- AC_SUBST_TRACE([ENABLE_DEPLOYPKG_TRUE]) -m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_TRUE$]) -m4trace:configure.ac:1155: -1- AC_SUBST([ENABLE_DEPLOYPKG_FALSE]) -m4trace:configure.ac:1155: -1- AC_SUBST_TRACE([ENABLE_DEPLOYPKG_FALSE]) -m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_FALSE$]) -m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_TRUE]) -m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_FALSE]) -m4trace:configure.ac:1156: -1- AM_CONDITIONAL([ENABLE_GRABBITMQPROXY], [test "$enable_grabbitmqproxy" = "yes"]) -m4trace:configure.ac:1156: -1- AC_SUBST([ENABLE_GRABBITMQPROXY_TRUE]) -m4trace:configure.ac:1156: -1- AC_SUBST_TRACE([ENABLE_GRABBITMQPROXY_TRUE]) -m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_TRUE$]) -m4trace:configure.ac:1156: -1- AC_SUBST([ENABLE_GRABBITMQPROXY_FALSE]) -m4trace:configure.ac:1156: -1- AC_SUBST_TRACE([ENABLE_GRABBITMQPROXY_FALSE]) -m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_FALSE$]) -m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_TRUE]) -m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_FALSE]) -m4trace:configure.ac:1157: -1- AM_CONDITIONAL([ENABLE_VGAUTH], [test "$enable_vgauth" = "yes"]) -m4trace:configure.ac:1157: -1- AC_SUBST([ENABLE_VGAUTH_TRUE]) -m4trace:configure.ac:1157: -1- AC_SUBST_TRACE([ENABLE_VGAUTH_TRUE]) -m4trace:configure.ac:1157: -1- m4_pattern_allow([^ENABLE_VGAUTH_TRUE$]) -m4trace:configure.ac:1157: -1- AC_SUBST([ENABLE_VGAUTH_FALSE]) -m4trace:configure.ac:1157: -1- AC_SUBST_TRACE([ENABLE_VGAUTH_FALSE]) -m4trace:configure.ac:1157: -1- m4_pattern_allow([^ENABLE_VGAUTH_FALSE$]) -m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_TRUE]) -m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_FALSE]) -m4trace:configure.ac:1158: -1- AM_CONDITIONAL([HAVE_VSOCK], [test "$os" = "linux"]) -m4trace:configure.ac:1158: -1- AC_SUBST([HAVE_VSOCK_TRUE]) -m4trace:configure.ac:1158: -1- AC_SUBST_TRACE([HAVE_VSOCK_TRUE]) -m4trace:configure.ac:1158: -1- m4_pattern_allow([^HAVE_VSOCK_TRUE$]) -m4trace:configure.ac:1158: -1- AC_SUBST([HAVE_VSOCK_FALSE]) -m4trace:configure.ac:1158: -1- AC_SUBST_TRACE([HAVE_VSOCK_FALSE]) -m4trace:configure.ac:1158: -1- m4_pattern_allow([^HAVE_VSOCK_FALSE$]) -m4trace:configure.ac:1158: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_TRUE]) -m4trace:configure.ac:1158: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_FALSE]) -m4trace:configure.ac:1161: -1- AC_DEFINE_TRACE_LITERAL([NO_XSM]) -m4trace:configure.ac:1161: -1- m4_pattern_allow([^NO_XSM$]) -m4trace:configure.ac:1165: -1- AC_DEFINE_TRACE_LITERAL([NO_XCOMPOSITE]) -m4trace:configure.ac:1165: -1- m4_pattern_allow([^NO_XCOMPOSITE$]) -m4trace:configure.ac:1177: -1- AC_DEFINE_TRACE_LITERAL([NO_MULTIMON]) -m4trace:configure.ac:1177: -1- m4_pattern_allow([^NO_MULTIMON$]) -m4trace:configure.ac:1177: -1- AH_OUTPUT([NO_MULTIMON], [/* Define to 1 if building without multimon support. */ +m4trace:configure.ac:1132: -1- AM_CONDITIONAL([BUILD_HGFSMOUNTER], [test "$buildHgfsmounter" = "yes"]) +m4trace:configure.ac:1132: -1- AC_SUBST([BUILD_HGFSMOUNTER_TRUE]) +m4trace:configure.ac:1132: -1- AC_SUBST_TRACE([BUILD_HGFSMOUNTER_TRUE]) +m4trace:configure.ac:1132: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_TRUE$]) +m4trace:configure.ac:1132: -1- AC_SUBST([BUILD_HGFSMOUNTER_FALSE]) +m4trace:configure.ac:1132: -1- AC_SUBST_TRACE([BUILD_HGFSMOUNTER_FALSE]) +m4trace:configure.ac:1132: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_FALSE$]) +m4trace:configure.ac:1132: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_TRUE]) +m4trace:configure.ac:1132: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_FALSE]) +m4trace:configure.ac:1133: -1- AM_CONDITIONAL([LINUX], [test "$os" = "linux"]) +m4trace:configure.ac:1133: -1- AC_SUBST([LINUX_TRUE]) +m4trace:configure.ac:1133: -1- AC_SUBST_TRACE([LINUX_TRUE]) +m4trace:configure.ac:1133: -1- m4_pattern_allow([^LINUX_TRUE$]) +m4trace:configure.ac:1133: -1- AC_SUBST([LINUX_FALSE]) +m4trace:configure.ac:1133: -1- AC_SUBST_TRACE([LINUX_FALSE]) +m4trace:configure.ac:1133: -1- m4_pattern_allow([^LINUX_FALSE$]) +m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([LINUX_TRUE]) +m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([LINUX_FALSE]) +m4trace:configure.ac:1134: -1- AM_CONDITIONAL([SOLARIS], [test "$os" = "solaris"]) +m4trace:configure.ac:1134: -1- AC_SUBST([SOLARIS_TRUE]) +m4trace:configure.ac:1134: -1- AC_SUBST_TRACE([SOLARIS_TRUE]) +m4trace:configure.ac:1134: -1- m4_pattern_allow([^SOLARIS_TRUE$]) +m4trace:configure.ac:1134: -1- AC_SUBST([SOLARIS_FALSE]) +m4trace:configure.ac:1134: -1- AC_SUBST_TRACE([SOLARIS_FALSE]) +m4trace:configure.ac:1134: -1- m4_pattern_allow([^SOLARIS_FALSE$]) +m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([SOLARIS_TRUE]) +m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([SOLARIS_FALSE]) +m4trace:configure.ac:1135: -1- AM_CONDITIONAL([FREEBSD], [test "$os" = "freebsd" -o "$os" = "kfreebsd-gnu"]) +m4trace:configure.ac:1135: -1- AC_SUBST([FREEBSD_TRUE]) +m4trace:configure.ac:1135: -1- AC_SUBST_TRACE([FREEBSD_TRUE]) +m4trace:configure.ac:1135: -1- m4_pattern_allow([^FREEBSD_TRUE$]) +m4trace:configure.ac:1135: -1- AC_SUBST([FREEBSD_FALSE]) +m4trace:configure.ac:1135: -1- AC_SUBST_TRACE([FREEBSD_FALSE]) +m4trace:configure.ac:1135: -1- m4_pattern_allow([^FREEBSD_FALSE$]) +m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([FREEBSD_TRUE]) +m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([FREEBSD_FALSE]) +m4trace:configure.ac:1136: -1- AM_CONDITIONAL([FREEBSD_CUSTOM_SYSDIR], [test \( "$os" = "freebsd" -o "$os" = "kfreebsd-gnu" \) -a -n "$SYSDIR"]) +m4trace:configure.ac:1136: -1- AC_SUBST([FREEBSD_CUSTOM_SYSDIR_TRUE]) +m4trace:configure.ac:1136: -1- AC_SUBST_TRACE([FREEBSD_CUSTOM_SYSDIR_TRUE]) +m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_TRUE$]) +m4trace:configure.ac:1136: -1- AC_SUBST([FREEBSD_CUSTOM_SYSDIR_FALSE]) +m4trace:configure.ac:1136: -1- AC_SUBST_TRACE([FREEBSD_CUSTOM_SYSDIR_FALSE]) +m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_FALSE$]) +m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_TRUE]) +m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_FALSE]) +m4trace:configure.ac:1138: -1- AM_CONDITIONAL([THIRTY_TWO_BIT_USERSPACE], [test "$userSpaceBitness" = "32"]) +m4trace:configure.ac:1138: -1- AC_SUBST([THIRTY_TWO_BIT_USERSPACE_TRUE]) +m4trace:configure.ac:1138: -1- AC_SUBST_TRACE([THIRTY_TWO_BIT_USERSPACE_TRUE]) +m4trace:configure.ac:1138: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_TRUE$]) +m4trace:configure.ac:1138: -1- AC_SUBST([THIRTY_TWO_BIT_USERSPACE_FALSE]) +m4trace:configure.ac:1138: -1- AC_SUBST_TRACE([THIRTY_TWO_BIT_USERSPACE_FALSE]) +m4trace:configure.ac:1138: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_FALSE$]) +m4trace:configure.ac:1138: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_TRUE]) +m4trace:configure.ac:1138: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_FALSE]) +m4trace:configure.ac:1139: -1- AM_CONDITIONAL([HAVE_X11], [test "$have_x" = "yes"]) +m4trace:configure.ac:1139: -1- AC_SUBST([HAVE_X11_TRUE]) +m4trace:configure.ac:1139: -1- AC_SUBST_TRACE([HAVE_X11_TRUE]) +m4trace:configure.ac:1139: -1- m4_pattern_allow([^HAVE_X11_TRUE$]) +m4trace:configure.ac:1139: -1- AC_SUBST([HAVE_X11_FALSE]) +m4trace:configure.ac:1139: -1- AC_SUBST_TRACE([HAVE_X11_FALSE]) +m4trace:configure.ac:1139: -1- m4_pattern_allow([^HAVE_X11_FALSE$]) +m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([HAVE_X11_TRUE]) +m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([HAVE_X11_FALSE]) +m4trace:configure.ac:1140: -1- AM_CONDITIONAL([HAVE_ICU], [test "$with_icu" = "yes"]) +m4trace:configure.ac:1140: -1- AC_SUBST([HAVE_ICU_TRUE]) +m4trace:configure.ac:1140: -1- AC_SUBST_TRACE([HAVE_ICU_TRUE]) +m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_ICU_TRUE$]) +m4trace:configure.ac:1140: -1- AC_SUBST([HAVE_ICU_FALSE]) +m4trace:configure.ac:1140: -1- AC_SUBST_TRACE([HAVE_ICU_FALSE]) +m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_ICU_FALSE$]) +m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_TRUE]) +m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_FALSE]) +m4trace:configure.ac:1141: -1- AM_CONDITIONAL([WITH_KERNEL_MODULES], [test "$with_kernel_modules" = "yes"]) +m4trace:configure.ac:1141: -1- AC_SUBST([WITH_KERNEL_MODULES_TRUE]) +m4trace:configure.ac:1141: -1- AC_SUBST_TRACE([WITH_KERNEL_MODULES_TRUE]) +m4trace:configure.ac:1141: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_TRUE$]) +m4trace:configure.ac:1141: -1- AC_SUBST([WITH_KERNEL_MODULES_FALSE]) +m4trace:configure.ac:1141: -1- AC_SUBST_TRACE([WITH_KERNEL_MODULES_FALSE]) +m4trace:configure.ac:1141: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_FALSE$]) +m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_TRUE]) +m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_FALSE]) +m4trace:configure.ac:1142: -1- AM_CONDITIONAL([HAVE_XSM], [test "$have_xsm" = "yes"]) +m4trace:configure.ac:1142: -1- AC_SUBST([HAVE_XSM_TRUE]) +m4trace:configure.ac:1142: -1- AC_SUBST_TRACE([HAVE_XSM_TRUE]) +m4trace:configure.ac:1142: -1- m4_pattern_allow([^HAVE_XSM_TRUE$]) +m4trace:configure.ac:1142: -1- AC_SUBST([HAVE_XSM_FALSE]) +m4trace:configure.ac:1142: -1- AC_SUBST_TRACE([HAVE_XSM_FALSE]) +m4trace:configure.ac:1142: -1- m4_pattern_allow([^HAVE_XSM_FALSE$]) +m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_TRUE]) +m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_FALSE]) +m4trace:configure.ac:1143: -1- AM_CONDITIONAL([HAVE_XCOMPOSITE], [test "$have_xcomposite" = "yes"]) +m4trace:configure.ac:1143: -1- AC_SUBST([HAVE_XCOMPOSITE_TRUE]) +m4trace:configure.ac:1143: -1- AC_SUBST_TRACE([HAVE_XCOMPOSITE_TRUE]) +m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_TRUE$]) +m4trace:configure.ac:1143: -1- AC_SUBST([HAVE_XCOMPOSITE_FALSE]) +m4trace:configure.ac:1143: -1- AC_SUBST_TRACE([HAVE_XCOMPOSITE_FALSE]) +m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_FALSE$]) +m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_TRUE]) +m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_FALSE]) +m4trace:configure.ac:1144: -1- AM_CONDITIONAL([ENABLE_TESTS], [test "$have_cunit" = "yes"]) +m4trace:configure.ac:1144: -1- AC_SUBST([ENABLE_TESTS_TRUE]) +m4trace:configure.ac:1144: -1- AC_SUBST_TRACE([ENABLE_TESTS_TRUE]) +m4trace:configure.ac:1144: -1- m4_pattern_allow([^ENABLE_TESTS_TRUE$]) +m4trace:configure.ac:1144: -1- AC_SUBST([ENABLE_TESTS_FALSE]) +m4trace:configure.ac:1144: -1- AC_SUBST_TRACE([ENABLE_TESTS_FALSE]) +m4trace:configure.ac:1144: -1- m4_pattern_allow([^ENABLE_TESTS_FALSE$]) +m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_TRUE]) +m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_FALSE]) +m4trace:configure.ac:1145: -1- AM_CONDITIONAL([WITH_ROOT_PRIVILEGES], [test "$with_root_privileges" = "yes"]) +m4trace:configure.ac:1145: -1- AC_SUBST([WITH_ROOT_PRIVILEGES_TRUE]) +m4trace:configure.ac:1145: -1- AC_SUBST_TRACE([WITH_ROOT_PRIVILEGES_TRUE]) +m4trace:configure.ac:1145: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_TRUE$]) +m4trace:configure.ac:1145: -1- AC_SUBST([WITH_ROOT_PRIVILEGES_FALSE]) +m4trace:configure.ac:1145: -1- AC_SUBST_TRACE([WITH_ROOT_PRIVILEGES_FALSE]) +m4trace:configure.ac:1145: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_FALSE$]) +m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_TRUE]) +m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_FALSE]) +m4trace:configure.ac:1146: -1- AM_CONDITIONAL([HAVE_DNET], [test "$have_dnet" = "yes"]) +m4trace:configure.ac:1146: -1- AC_SUBST([HAVE_DNET_TRUE]) +m4trace:configure.ac:1146: -1- AC_SUBST_TRACE([HAVE_DNET_TRUE]) +m4trace:configure.ac:1146: -1- m4_pattern_allow([^HAVE_DNET_TRUE$]) +m4trace:configure.ac:1146: -1- AC_SUBST([HAVE_DNET_FALSE]) +m4trace:configure.ac:1146: -1- AC_SUBST_TRACE([HAVE_DNET_FALSE]) +m4trace:configure.ac:1146: -1- m4_pattern_allow([^HAVE_DNET_FALSE$]) +m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_TRUE]) +m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_FALSE]) +m4trace:configure.ac:1147: -1- AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = "yes"]) +m4trace:configure.ac:1147: -1- AC_SUBST([HAVE_DOXYGEN_TRUE]) +m4trace:configure.ac:1147: -1- AC_SUBST_TRACE([HAVE_DOXYGEN_TRUE]) +m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DOXYGEN_TRUE$]) +m4trace:configure.ac:1147: -1- AC_SUBST([HAVE_DOXYGEN_FALSE]) +m4trace:configure.ac:1147: -1- AC_SUBST_TRACE([HAVE_DOXYGEN_FALSE]) +m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DOXYGEN_FALSE$]) +m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_TRUE]) +m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_FALSE]) +m4trace:configure.ac:1148: -1- AM_CONDITIONAL([HAVE_FUSE], [test "$have_fuse" = "yes"]) +m4trace:configure.ac:1148: -1- AC_SUBST([HAVE_FUSE_TRUE]) +m4trace:configure.ac:1148: -1- AC_SUBST_TRACE([HAVE_FUSE_TRUE]) +m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_FUSE_TRUE$]) +m4trace:configure.ac:1148: -1- AC_SUBST([HAVE_FUSE_FALSE]) +m4trace:configure.ac:1148: -1- AC_SUBST_TRACE([HAVE_FUSE_FALSE]) +m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_FUSE_FALSE$]) +m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_TRUE]) +m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_FALSE]) +m4trace:configure.ac:1149: -1- AM_CONDITIONAL([HAVE_GNU_LD], [test "$with_gnu_ld" = "yes"]) +m4trace:configure.ac:1149: -1- AC_SUBST([HAVE_GNU_LD_TRUE]) +m4trace:configure.ac:1149: -1- AC_SUBST_TRACE([HAVE_GNU_LD_TRUE]) +m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_GNU_LD_TRUE$]) +m4trace:configure.ac:1149: -1- AC_SUBST([HAVE_GNU_LD_FALSE]) +m4trace:configure.ac:1149: -1- AC_SUBST_TRACE([HAVE_GNU_LD_FALSE]) +m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_GNU_LD_FALSE$]) +m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_TRUE]) +m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_FALSE]) +m4trace:configure.ac:1150: -1- AM_CONDITIONAL([HAVE_GTKMM], [test "$have_x" = "yes" -a "$with_gtkmm" = "yes"]) +m4trace:configure.ac:1150: -1- AC_SUBST([HAVE_GTKMM_TRUE]) +m4trace:configure.ac:1150: -1- AC_SUBST_TRACE([HAVE_GTKMM_TRUE]) +m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GTKMM_TRUE$]) +m4trace:configure.ac:1150: -1- AC_SUBST([HAVE_GTKMM_FALSE]) +m4trace:configure.ac:1150: -1- AC_SUBST_TRACE([HAVE_GTKMM_FALSE]) +m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GTKMM_FALSE$]) +m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_TRUE]) +m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_FALSE]) +m4trace:configure.ac:1151: -1- AM_CONDITIONAL([HAVE_PAM], [test "$with_pam" = "yes"]) +m4trace:configure.ac:1151: -1- AC_SUBST([HAVE_PAM_TRUE]) +m4trace:configure.ac:1151: -1- AC_SUBST_TRACE([HAVE_PAM_TRUE]) +m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_PAM_TRUE$]) +m4trace:configure.ac:1151: -1- AC_SUBST([HAVE_PAM_FALSE]) +m4trace:configure.ac:1151: -1- AC_SUBST_TRACE([HAVE_PAM_FALSE]) +m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_PAM_FALSE$]) +m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_TRUE]) +m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_FALSE]) +m4trace:configure.ac:1152: -1- AM_CONDITIONAL([USE_SLASH_PROC], [test "$os" = "linux"]) +m4trace:configure.ac:1152: -1- AC_SUBST([USE_SLASH_PROC_TRUE]) +m4trace:configure.ac:1152: -1- AC_SUBST_TRACE([USE_SLASH_PROC_TRUE]) +m4trace:configure.ac:1152: -1- m4_pattern_allow([^USE_SLASH_PROC_TRUE$]) +m4trace:configure.ac:1152: -1- AC_SUBST([USE_SLASH_PROC_FALSE]) +m4trace:configure.ac:1152: -1- AC_SUBST_TRACE([USE_SLASH_PROC_FALSE]) +m4trace:configure.ac:1152: -1- m4_pattern_allow([^USE_SLASH_PROC_FALSE$]) +m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_TRUE]) +m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_FALSE]) +m4trace:configure.ac:1153: -1- AM_CONDITIONAL([USE_PRINTF_WRAPPERS], [test "$bsdPrintfWrappers" = "yes"]) +m4trace:configure.ac:1153: -1- AC_SUBST([USE_PRINTF_WRAPPERS_TRUE]) +m4trace:configure.ac:1153: -1- AC_SUBST_TRACE([USE_PRINTF_WRAPPERS_TRUE]) +m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_TRUE$]) +m4trace:configure.ac:1153: -1- AC_SUBST([USE_PRINTF_WRAPPERS_FALSE]) +m4trace:configure.ac:1153: -1- AC_SUBST_TRACE([USE_PRINTF_WRAPPERS_FALSE]) +m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_FALSE$]) +m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_TRUE]) +m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_FALSE]) +m4trace:configure.ac:1154: -1- AM_CONDITIONAL([ENABLE_DEPLOYPKG], [test "$enable_deploypkg" = "yes"]) +m4trace:configure.ac:1154: -1- AC_SUBST([ENABLE_DEPLOYPKG_TRUE]) +m4trace:configure.ac:1154: -1- AC_SUBST_TRACE([ENABLE_DEPLOYPKG_TRUE]) +m4trace:configure.ac:1154: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_TRUE$]) +m4trace:configure.ac:1154: -1- AC_SUBST([ENABLE_DEPLOYPKG_FALSE]) +m4trace:configure.ac:1154: -1- AC_SUBST_TRACE([ENABLE_DEPLOYPKG_FALSE]) +m4trace:configure.ac:1154: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_FALSE$]) +m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_TRUE]) +m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_FALSE]) +m4trace:configure.ac:1155: -1- AM_CONDITIONAL([ENABLE_GRABBITMQPROXY], [test "$enable_grabbitmqproxy" = "yes"]) +m4trace:configure.ac:1155: -1- AC_SUBST([ENABLE_GRABBITMQPROXY_TRUE]) +m4trace:configure.ac:1155: -1- AC_SUBST_TRACE([ENABLE_GRABBITMQPROXY_TRUE]) +m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_TRUE$]) +m4trace:configure.ac:1155: -1- AC_SUBST([ENABLE_GRABBITMQPROXY_FALSE]) +m4trace:configure.ac:1155: -1- AC_SUBST_TRACE([ENABLE_GRABBITMQPROXY_FALSE]) +m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_FALSE$]) +m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_TRUE]) +m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_FALSE]) +m4trace:configure.ac:1156: -1- AM_CONDITIONAL([ENABLE_VGAUTH], [test "$enable_vgauth" = "yes"]) +m4trace:configure.ac:1156: -1- AC_SUBST([ENABLE_VGAUTH_TRUE]) +m4trace:configure.ac:1156: -1- AC_SUBST_TRACE([ENABLE_VGAUTH_TRUE]) +m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_VGAUTH_TRUE$]) +m4trace:configure.ac:1156: -1- AC_SUBST([ENABLE_VGAUTH_FALSE]) +m4trace:configure.ac:1156: -1- AC_SUBST_TRACE([ENABLE_VGAUTH_FALSE]) +m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_VGAUTH_FALSE$]) +m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_TRUE]) +m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_FALSE]) +m4trace:configure.ac:1157: -1- AM_CONDITIONAL([HAVE_VSOCK], [test "$os" = "linux"]) +m4trace:configure.ac:1157: -1- AC_SUBST([HAVE_VSOCK_TRUE]) +m4trace:configure.ac:1157: -1- AC_SUBST_TRACE([HAVE_VSOCK_TRUE]) +m4trace:configure.ac:1157: -1- m4_pattern_allow([^HAVE_VSOCK_TRUE$]) +m4trace:configure.ac:1157: -1- AC_SUBST([HAVE_VSOCK_FALSE]) +m4trace:configure.ac:1157: -1- AC_SUBST_TRACE([HAVE_VSOCK_FALSE]) +m4trace:configure.ac:1157: -1- m4_pattern_allow([^HAVE_VSOCK_FALSE$]) +m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_TRUE]) +m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_FALSE]) +m4trace:configure.ac:1160: -1- AC_DEFINE_TRACE_LITERAL([NO_XSM]) +m4trace:configure.ac:1160: -1- m4_pattern_allow([^NO_XSM$]) +m4trace:configure.ac:1164: -1- AC_DEFINE_TRACE_LITERAL([NO_XCOMPOSITE]) +m4trace:configure.ac:1164: -1- m4_pattern_allow([^NO_XCOMPOSITE$]) +m4trace:configure.ac:1176: -1- AC_DEFINE_TRACE_LITERAL([NO_MULTIMON]) +m4trace:configure.ac:1176: -1- m4_pattern_allow([^NO_MULTIMON$]) +m4trace:configure.ac:1176: -1- AH_OUTPUT([NO_MULTIMON], [/* Define to 1 if building without multimon support. */ #undef NO_MULTIMON]) -m4trace:configure.ac:1219: -1- AC_SUBST([HGFS_LIBS]) -m4trace:configure.ac:1219: -1- AC_SUBST_TRACE([HGFS_LIBS]) -m4trace:configure.ac:1219: -1- m4_pattern_allow([^HGFS_LIBS$]) -m4trace:configure.ac:1220: -1- AC_SUBST([TOOLS_VERSION]) -m4trace:configure.ac:1220: -1- AC_SUBST_TRACE([TOOLS_VERSION]) -m4trace:configure.ac:1220: -1- m4_pattern_allow([^TOOLS_VERSION$]) -m4trace:configure.ac:1221: -1- AC_SUBST([TARGET_OS]) -m4trace:configure.ac:1221: -1- AC_SUBST_TRACE([TARGET_OS]) -m4trace:configure.ac:1221: -1- m4_pattern_allow([^TARGET_OS$]) -m4trace:configure.ac:1222: -1- AC_SUBST([KERNEL_RELEASE]) -m4trace:configure.ac:1222: -1- AC_SUBST_TRACE([KERNEL_RELEASE]) -m4trace:configure.ac:1222: -1- m4_pattern_allow([^KERNEL_RELEASE$]) -m4trace:configure.ac:1223: -1- AC_SUBST([LINUXINCLUDE]) -m4trace:configure.ac:1223: -1- AC_SUBST_TRACE([LINUXINCLUDE]) -m4trace:configure.ac:1223: -1- m4_pattern_allow([^LINUXINCLUDE$]) -m4trace:configure.ac:1224: -1- AC_SUBST([MODULES_OS]) -m4trace:configure.ac:1224: -1- AC_SUBST_TRACE([MODULES_OS]) -m4trace:configure.ac:1224: -1- m4_pattern_allow([^MODULES_OS$]) -m4trace:configure.ac:1225: -1- AC_SUBST([MODULES_DIR]) -m4trace:configure.ac:1225: -1- AC_SUBST_TRACE([MODULES_DIR]) -m4trace:configure.ac:1225: -1- m4_pattern_allow([^MODULES_DIR$]) -m4trace:configure.ac:1226: -1- AC_SUBST([MODULES]) -m4trace:configure.ac:1226: -1- AC_SUBST_TRACE([MODULES]) -m4trace:configure.ac:1226: -1- m4_pattern_allow([^MODULES$]) -m4trace:configure.ac:1227: -1- AC_SUBST([COMMON_XLIBS]) -m4trace:configure.ac:1227: -1- AC_SUBST_TRACE([COMMON_XLIBS]) -m4trace:configure.ac:1227: -1- m4_pattern_allow([^COMMON_XLIBS$]) -m4trace:configure.ac:1228: -1- AC_SUBST([XSM_LIBS]) -m4trace:configure.ac:1228: -1- AC_SUBST_TRACE([XSM_LIBS]) -m4trace:configure.ac:1228: -1- m4_pattern_allow([^XSM_LIBS$]) -m4trace:configure.ac:1229: -1- AC_SUBST([XCOMPOSITE_LIBS]) -m4trace:configure.ac:1229: -1- AC_SUBST_TRACE([XCOMPOSITE_LIBS]) -m4trace:configure.ac:1229: -1- m4_pattern_allow([^XCOMPOSITE_LIBS$]) -m4trace:configure.ac:1230: -1- AC_SUBST([PAM_PREFIX]) -m4trace:configure.ac:1230: -1- AC_SUBST_TRACE([PAM_PREFIX]) -m4trace:configure.ac:1230: -1- m4_pattern_allow([^PAM_PREFIX$]) -m4trace:configure.ac:1231: -1- AC_SUBST([PLUGIN_CPPFLAGS]) -m4trace:configure.ac:1231: -1- AC_SUBST_TRACE([PLUGIN_CPPFLAGS]) -m4trace:configure.ac:1231: -1- m4_pattern_allow([^PLUGIN_CPPFLAGS$]) -m4trace:configure.ac:1232: -1- AC_SUBST([PLUGIN_LDFLAGS]) -m4trace:configure.ac:1232: -1- AC_SUBST_TRACE([PLUGIN_LDFLAGS]) -m4trace:configure.ac:1232: -1- m4_pattern_allow([^PLUGIN_LDFLAGS$]) -m4trace:configure.ac:1233: -1- AC_SUBST([VMTOOLS_CPPFLAGS]) -m4trace:configure.ac:1233: -1- AC_SUBST_TRACE([VMTOOLS_CPPFLAGS]) -m4trace:configure.ac:1233: -1- m4_pattern_allow([^VMTOOLS_CPPFLAGS$]) -m4trace:configure.ac:1234: -1- AC_SUBST([VMTOOLS_LIBS]) -m4trace:configure.ac:1234: -1- AC_SUBST_TRACE([VMTOOLS_LIBS]) -m4trace:configure.ac:1234: -1- m4_pattern_allow([^VMTOOLS_LIBS$]) -m4trace:configure.ac:1235: -1- AC_SUBST([RPCGENFLAGS]) -m4trace:configure.ac:1235: -1- AC_SUBST_TRACE([RPCGENFLAGS]) -m4trace:configure.ac:1235: -1- m4_pattern_allow([^RPCGENFLAGS$]) -m4trace:configure.ac:1236: -1- AC_SUBST([XDR_LIBS]) -m4trace:configure.ac:1236: -1- AC_SUBST_TRACE([XDR_LIBS]) -m4trace:configure.ac:1236: -1- m4_pattern_allow([^XDR_LIBS$]) -m4trace:configure.ac:1237: -1- AC_SUBST([TEST_PLUGIN_INSTALLDIR]) -m4trace:configure.ac:1237: -1- AC_SUBST_TRACE([TEST_PLUGIN_INSTALLDIR]) -m4trace:configure.ac:1237: -1- m4_pattern_allow([^TEST_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1238: -1- AC_SUBST([COMMON_PLUGIN_INSTALLDIR]) -m4trace:configure.ac:1238: -1- AC_SUBST_TRACE([COMMON_PLUGIN_INSTALLDIR]) -m4trace:configure.ac:1238: -1- m4_pattern_allow([^COMMON_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1239: -1- AC_SUBST([VMSVC_PLUGIN_INSTALLDIR]) -m4trace:configure.ac:1239: -1- AC_SUBST_TRACE([VMSVC_PLUGIN_INSTALLDIR]) -m4trace:configure.ac:1239: -1- m4_pattern_allow([^VMSVC_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1240: -1- AC_SUBST([VMUSR_PLUGIN_INSTALLDIR]) -m4trace:configure.ac:1240: -1- AC_SUBST_TRACE([VMUSR_PLUGIN_INSTALLDIR]) -m4trace:configure.ac:1240: -1- m4_pattern_allow([^VMUSR_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1245: -1- AC_SUBST([SYSDIR]) -m4trace:configure.ac:1245: -1- AC_SUBST_TRACE([SYSDIR]) -m4trace:configure.ac:1245: -1- m4_pattern_allow([^SYSDIR$]) -m4trace:configure.ac:1247: -1- AC_SUBST([INSTVMSG]) -m4trace:configure.ac:1247: -1- AC_SUBST_TRACE([INSTVMSG]) -m4trace:configure.ac:1247: -1- m4_pattern_allow([^INSTVMSG$]) -m4trace:configure.ac:1248: -1- AC_SUBST([RPCGEN_WRAPPER]) -m4trace:configure.ac:1248: -1- AC_SUBST_TRACE([RPCGEN_WRAPPER]) -m4trace:configure.ac:1248: -1- m4_pattern_allow([^RPCGEN_WRAPPER$]) -m4trace:configure.ac:1252: -1- AC_SUBST([LIB_AUTH_CPPFLAGS]) -m4trace:configure.ac:1252: -1- AC_SUBST_TRACE([LIB_AUTH_CPPFLAGS]) -m4trace:configure.ac:1252: -1- m4_pattern_allow([^LIB_AUTH_CPPFLAGS$]) -m4trace:configure.ac:1253: -1- AC_SUBST([LIB_IMPERSONATE_CPPFLAGS]) -m4trace:configure.ac:1253: -1- AC_SUBST_TRACE([LIB_IMPERSONATE_CPPFLAGS]) -m4trace:configure.ac:1253: -1- m4_pattern_allow([^LIB_IMPERSONATE_CPPFLAGS$]) -m4trace:configure.ac:1254: -1- AC_SUBST([LIB_USER_CPPFLAGS]) -m4trace:configure.ac:1254: -1- AC_SUBST_TRACE([LIB_USER_CPPFLAGS]) -m4trace:configure.ac:1254: -1- m4_pattern_allow([^LIB_USER_CPPFLAGS$]) -m4trace:configure.ac:1255: -1- AC_SUBST([LIBVMTOOLS_LIBADD]) -m4trace:configure.ac:1255: -1- AC_SUBST_TRACE([LIBVMTOOLS_LIBADD]) -m4trace:configure.ac:1255: -1- m4_pattern_allow([^LIBVMTOOLS_LIBADD$]) -m4trace:configure.ac:1259: -1- AC_SUBST([VIX_LIBADD]) -m4trace:configure.ac:1259: -1- AC_SUBST_TRACE([VIX_LIBADD]) -m4trace:configure.ac:1259: -1- m4_pattern_allow([^VIX_LIBADD$]) -m4trace:configure.ac:1260: -1- AC_SUBST([VGAUTH_LIBADD]) -m4trace:configure.ac:1260: -1- AC_SUBST_TRACE([VGAUTH_LIBADD]) -m4trace:configure.ac:1260: -1- m4_pattern_allow([^VGAUTH_LIBADD$]) -m4trace:configure.ac:1265: -1- AC_CONFIG_FILES([ \ +m4trace:configure.ac:1218: -1- AC_SUBST([HGFS_LIBS]) +m4trace:configure.ac:1218: -1- AC_SUBST_TRACE([HGFS_LIBS]) +m4trace:configure.ac:1218: -1- m4_pattern_allow([^HGFS_LIBS$]) +m4trace:configure.ac:1219: -1- AC_SUBST([TOOLS_VERSION]) +m4trace:configure.ac:1219: -1- AC_SUBST_TRACE([TOOLS_VERSION]) +m4trace:configure.ac:1219: -1- m4_pattern_allow([^TOOLS_VERSION$]) +m4trace:configure.ac:1220: -1- AC_SUBST([TARGET_OS]) +m4trace:configure.ac:1220: -1- AC_SUBST_TRACE([TARGET_OS]) +m4trace:configure.ac:1220: -1- m4_pattern_allow([^TARGET_OS$]) +m4trace:configure.ac:1221: -1- AC_SUBST([KERNEL_RELEASE]) +m4trace:configure.ac:1221: -1- AC_SUBST_TRACE([KERNEL_RELEASE]) +m4trace:configure.ac:1221: -1- m4_pattern_allow([^KERNEL_RELEASE$]) +m4trace:configure.ac:1222: -1- AC_SUBST([LINUXINCLUDE]) +m4trace:configure.ac:1222: -1- AC_SUBST_TRACE([LINUXINCLUDE]) +m4trace:configure.ac:1222: -1- m4_pattern_allow([^LINUXINCLUDE$]) +m4trace:configure.ac:1223: -1- AC_SUBST([MODULES_OS]) +m4trace:configure.ac:1223: -1- AC_SUBST_TRACE([MODULES_OS]) +m4trace:configure.ac:1223: -1- m4_pattern_allow([^MODULES_OS$]) +m4trace:configure.ac:1224: -1- AC_SUBST([MODULES_DIR]) +m4trace:configure.ac:1224: -1- AC_SUBST_TRACE([MODULES_DIR]) +m4trace:configure.ac:1224: -1- m4_pattern_allow([^MODULES_DIR$]) +m4trace:configure.ac:1225: -1- AC_SUBST([MODULES]) +m4trace:configure.ac:1225: -1- AC_SUBST_TRACE([MODULES]) +m4trace:configure.ac:1225: -1- m4_pattern_allow([^MODULES$]) +m4trace:configure.ac:1226: -1- AC_SUBST([COMMON_XLIBS]) +m4trace:configure.ac:1226: -1- AC_SUBST_TRACE([COMMON_XLIBS]) +m4trace:configure.ac:1226: -1- m4_pattern_allow([^COMMON_XLIBS$]) +m4trace:configure.ac:1227: -1- AC_SUBST([XSM_LIBS]) +m4trace:configure.ac:1227: -1- AC_SUBST_TRACE([XSM_LIBS]) +m4trace:configure.ac:1227: -1- m4_pattern_allow([^XSM_LIBS$]) +m4trace:configure.ac:1228: -1- AC_SUBST([XCOMPOSITE_LIBS]) +m4trace:configure.ac:1228: -1- AC_SUBST_TRACE([XCOMPOSITE_LIBS]) +m4trace:configure.ac:1228: -1- m4_pattern_allow([^XCOMPOSITE_LIBS$]) +m4trace:configure.ac:1229: -1- AC_SUBST([PAM_PREFIX]) +m4trace:configure.ac:1229: -1- AC_SUBST_TRACE([PAM_PREFIX]) +m4trace:configure.ac:1229: -1- m4_pattern_allow([^PAM_PREFIX$]) +m4trace:configure.ac:1230: -1- AC_SUBST([PLUGIN_CPPFLAGS]) +m4trace:configure.ac:1230: -1- AC_SUBST_TRACE([PLUGIN_CPPFLAGS]) +m4trace:configure.ac:1230: -1- m4_pattern_allow([^PLUGIN_CPPFLAGS$]) +m4trace:configure.ac:1231: -1- AC_SUBST([PLUGIN_LDFLAGS]) +m4trace:configure.ac:1231: -1- AC_SUBST_TRACE([PLUGIN_LDFLAGS]) +m4trace:configure.ac:1231: -1- m4_pattern_allow([^PLUGIN_LDFLAGS$]) +m4trace:configure.ac:1232: -1- AC_SUBST([VMTOOLS_CPPFLAGS]) +m4trace:configure.ac:1232: -1- AC_SUBST_TRACE([VMTOOLS_CPPFLAGS]) +m4trace:configure.ac:1232: -1- m4_pattern_allow([^VMTOOLS_CPPFLAGS$]) +m4trace:configure.ac:1233: -1- AC_SUBST([VMTOOLS_LIBS]) +m4trace:configure.ac:1233: -1- AC_SUBST_TRACE([VMTOOLS_LIBS]) +m4trace:configure.ac:1233: -1- m4_pattern_allow([^VMTOOLS_LIBS$]) +m4trace:configure.ac:1234: -1- AC_SUBST([RPCGENFLAGS]) +m4trace:configure.ac:1234: -1- AC_SUBST_TRACE([RPCGENFLAGS]) +m4trace:configure.ac:1234: -1- m4_pattern_allow([^RPCGENFLAGS$]) +m4trace:configure.ac:1235: -1- AC_SUBST([XDR_LIBS]) +m4trace:configure.ac:1235: -1- AC_SUBST_TRACE([XDR_LIBS]) +m4trace:configure.ac:1235: -1- m4_pattern_allow([^XDR_LIBS$]) +m4trace:configure.ac:1236: -1- AC_SUBST([TEST_PLUGIN_INSTALLDIR]) +m4trace:configure.ac:1236: -1- AC_SUBST_TRACE([TEST_PLUGIN_INSTALLDIR]) +m4trace:configure.ac:1236: -1- m4_pattern_allow([^TEST_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1237: -1- AC_SUBST([COMMON_PLUGIN_INSTALLDIR]) +m4trace:configure.ac:1237: -1- AC_SUBST_TRACE([COMMON_PLUGIN_INSTALLDIR]) +m4trace:configure.ac:1237: -1- m4_pattern_allow([^COMMON_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1238: -1- AC_SUBST([VMSVC_PLUGIN_INSTALLDIR]) +m4trace:configure.ac:1238: -1- AC_SUBST_TRACE([VMSVC_PLUGIN_INSTALLDIR]) +m4trace:configure.ac:1238: -1- m4_pattern_allow([^VMSVC_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1239: -1- AC_SUBST([VMUSR_PLUGIN_INSTALLDIR]) +m4trace:configure.ac:1239: -1- AC_SUBST_TRACE([VMUSR_PLUGIN_INSTALLDIR]) +m4trace:configure.ac:1239: -1- m4_pattern_allow([^VMUSR_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1244: -1- AC_SUBST([SYSDIR]) +m4trace:configure.ac:1244: -1- AC_SUBST_TRACE([SYSDIR]) +m4trace:configure.ac:1244: -1- m4_pattern_allow([^SYSDIR$]) +m4trace:configure.ac:1246: -1- AC_SUBST([INSTVMSG]) +m4trace:configure.ac:1246: -1- AC_SUBST_TRACE([INSTVMSG]) +m4trace:configure.ac:1246: -1- m4_pattern_allow([^INSTVMSG$]) +m4trace:configure.ac:1247: -1- AC_SUBST([RPCGEN_WRAPPER]) +m4trace:configure.ac:1247: -1- AC_SUBST_TRACE([RPCGEN_WRAPPER]) +m4trace:configure.ac:1247: -1- m4_pattern_allow([^RPCGEN_WRAPPER$]) +m4trace:configure.ac:1251: -1- AC_SUBST([LIB_AUTH_CPPFLAGS]) +m4trace:configure.ac:1251: -1- AC_SUBST_TRACE([LIB_AUTH_CPPFLAGS]) +m4trace:configure.ac:1251: -1- m4_pattern_allow([^LIB_AUTH_CPPFLAGS$]) +m4trace:configure.ac:1252: -1- AC_SUBST([LIB_IMPERSONATE_CPPFLAGS]) +m4trace:configure.ac:1252: -1- AC_SUBST_TRACE([LIB_IMPERSONATE_CPPFLAGS]) +m4trace:configure.ac:1252: -1- m4_pattern_allow([^LIB_IMPERSONATE_CPPFLAGS$]) +m4trace:configure.ac:1253: -1- AC_SUBST([LIB_USER_CPPFLAGS]) +m4trace:configure.ac:1253: -1- AC_SUBST_TRACE([LIB_USER_CPPFLAGS]) +m4trace:configure.ac:1253: -1- m4_pattern_allow([^LIB_USER_CPPFLAGS$]) +m4trace:configure.ac:1254: -1- AC_SUBST([LIBVMTOOLS_LIBADD]) +m4trace:configure.ac:1254: -1- AC_SUBST_TRACE([LIBVMTOOLS_LIBADD]) +m4trace:configure.ac:1254: -1- m4_pattern_allow([^LIBVMTOOLS_LIBADD$]) +m4trace:configure.ac:1258: -1- AC_SUBST([VIX_LIBADD]) +m4trace:configure.ac:1258: -1- AC_SUBST_TRACE([VIX_LIBADD]) +m4trace:configure.ac:1258: -1- m4_pattern_allow([^VIX_LIBADD$]) +m4trace:configure.ac:1259: -1- AC_SUBST([VGAUTH_LIBADD]) +m4trace:configure.ac:1259: -1- AC_SUBST_TRACE([VGAUTH_LIBADD]) +m4trace:configure.ac:1259: -1- m4_pattern_allow([^VGAUTH_LIBADD$]) +m4trace:configure.ac:1264: -1- AC_CONFIG_FILES([ \ Makefile \ lib/Makefile \ lib/appUtil/Makefile \ @@ -1322,6 +1322,7 @@ lib/hgfsServer/Makefile \ lib/hgfsServerManagerGuest/Makefile \ lib/hgfsServerPolicyGuest/Makefile \ + lib/hgfsUri/Makefile \ lib/impersonate/Makefile \ lib/lock/Makefile \ lib/message/Makefile \ @@ -1330,7 +1331,6 @@ lib/nicInfo/Makefile \ lib/panic/Makefile \ lib/panicDefault/Makefile \ - lib/printer/Makefile \ lib/procMgr/Makefile \ lib/rpcChannel/Makefile \ lib/rpcIn/Makefile \ @@ -1381,6 +1381,7 @@ xferlogs/Makefile \ modules/Makefile \ vmblock-fuse/Makefile \ + vmhgfs-fuse/Makefile \ vmblockmounter/Makefile \ tests/Makefile \ tests/vmrpcdbg/Makefile \ diff -Nru open-vm-tools-9.10.2-2822639/autom4te.cache/traces.2 open-vm-tools-10.0.0-3000743/autom4te.cache/traces.2 --- open-vm-tools-9.10.2-2822639/autom4te.cache/traces.2 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/autom4te.cache/traces.2 2015-09-10 07:31:38.000000000 +0000 @@ -1925,7 +1925,7 @@ m4trace:configure.ac:350: -1- m4_pattern_allow([^GTHREAD_LIBS$]) m4trace:configure.ac:359: -1- m4_pattern_allow([^have_genmarshal$]) m4trace:configure.ac:371: -1- AC_VMW_CHECK_LIB([fuse], [FUSE], [fuse], [], [], [fuse.h], [fuse_main], [have_fuse=yes], [have_fuse=no; - AC_MSG_WARN([Fuse is missing, vmblock-fuse will be disabled.])]) + AC_MSG_WARN([Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled.])]) m4trace:configure.ac:371: -1- m4_pattern_allow([^ac_vmw_lib_cfg$]) m4trace:configure.ac:371: -1- m4_pattern_allow([^FUSE_CPPFLAGS$]) m4trace:configure.ac:371: -1- m4_pattern_allow([^FUSE_LIBS$]) @@ -2040,165 +2040,165 @@ m4trace:configure.ac:1012: -1- m4_pattern_allow([^HAVE_DOT$]) m4trace:configure.ac:1014: -1- m4_pattern_allow([^MSCGEN$]) m4trace:configure.ac:1022: -1- m4_pattern_allow([^MSCGEN_DIR$]) -m4trace:configure.ac:1133: -1- AM_CONDITIONAL([BUILD_HGFSMOUNTER], [test "$buildHgfsmounter" = "yes"]) -m4trace:configure.ac:1133: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_TRUE$]) -m4trace:configure.ac:1133: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_FALSE$]) -m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_TRUE]) -m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_FALSE]) -m4trace:configure.ac:1134: -1- AM_CONDITIONAL([LINUX], [test "$os" = "linux"]) -m4trace:configure.ac:1134: -1- m4_pattern_allow([^LINUX_TRUE$]) -m4trace:configure.ac:1134: -1- m4_pattern_allow([^LINUX_FALSE$]) -m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([LINUX_TRUE]) -m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([LINUX_FALSE]) -m4trace:configure.ac:1135: -1- AM_CONDITIONAL([SOLARIS], [test "$os" = "solaris"]) -m4trace:configure.ac:1135: -1- m4_pattern_allow([^SOLARIS_TRUE$]) -m4trace:configure.ac:1135: -1- m4_pattern_allow([^SOLARIS_FALSE$]) -m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([SOLARIS_TRUE]) -m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([SOLARIS_FALSE]) -m4trace:configure.ac:1136: -1- AM_CONDITIONAL([FREEBSD], [test "$os" = "freebsd" -o "$os" = "kfreebsd-gnu"]) -m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_TRUE$]) -m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_FALSE$]) -m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_TRUE]) -m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_FALSE]) -m4trace:configure.ac:1137: -1- AM_CONDITIONAL([FREEBSD_CUSTOM_SYSDIR], [test \( "$os" = "freebsd" -o "$os" = "kfreebsd-gnu" \) -a -n "$SYSDIR"]) -m4trace:configure.ac:1137: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_TRUE$]) -m4trace:configure.ac:1137: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_FALSE$]) -m4trace:configure.ac:1137: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_TRUE]) -m4trace:configure.ac:1137: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_FALSE]) -m4trace:configure.ac:1139: -1- AM_CONDITIONAL([THIRTY_TWO_BIT_USERSPACE], [test "$userSpaceBitness" = "32"]) -m4trace:configure.ac:1139: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_TRUE$]) -m4trace:configure.ac:1139: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_FALSE$]) -m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_TRUE]) -m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_FALSE]) -m4trace:configure.ac:1140: -1- AM_CONDITIONAL([HAVE_X11], [test "$have_x" = "yes"]) -m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_X11_TRUE$]) -m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_X11_FALSE$]) -m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_X11_TRUE]) -m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_X11_FALSE]) -m4trace:configure.ac:1141: -1- AM_CONDITIONAL([HAVE_ICU], [test "$with_icu" = "yes"]) -m4trace:configure.ac:1141: -1- m4_pattern_allow([^HAVE_ICU_TRUE$]) -m4trace:configure.ac:1141: -1- m4_pattern_allow([^HAVE_ICU_FALSE$]) -m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_TRUE]) -m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_FALSE]) -m4trace:configure.ac:1142: -1- AM_CONDITIONAL([WITH_KERNEL_MODULES], [test "$with_kernel_modules" = "yes"]) -m4trace:configure.ac:1142: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_TRUE$]) -m4trace:configure.ac:1142: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_FALSE$]) -m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_TRUE]) -m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_FALSE]) -m4trace:configure.ac:1143: -1- AM_CONDITIONAL([HAVE_XSM], [test "$have_xsm" = "yes"]) -m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XSM_TRUE$]) -m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XSM_FALSE$]) -m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_TRUE]) -m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_FALSE]) -m4trace:configure.ac:1144: -1- AM_CONDITIONAL([HAVE_XCOMPOSITE], [test "$have_xcomposite" = "yes"]) -m4trace:configure.ac:1144: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_TRUE$]) -m4trace:configure.ac:1144: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_FALSE$]) -m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_TRUE]) -m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_FALSE]) -m4trace:configure.ac:1145: -1- AM_CONDITIONAL([ENABLE_TESTS], [test "$have_cunit" = "yes"]) -m4trace:configure.ac:1145: -1- m4_pattern_allow([^ENABLE_TESTS_TRUE$]) -m4trace:configure.ac:1145: -1- m4_pattern_allow([^ENABLE_TESTS_FALSE$]) -m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_TRUE]) -m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_FALSE]) -m4trace:configure.ac:1146: -1- AM_CONDITIONAL([WITH_ROOT_PRIVILEGES], [test "$with_root_privileges" = "yes"]) -m4trace:configure.ac:1146: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_TRUE$]) -m4trace:configure.ac:1146: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_FALSE$]) -m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_TRUE]) -m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_FALSE]) -m4trace:configure.ac:1147: -1- AM_CONDITIONAL([HAVE_DNET], [test "$have_dnet" = "yes"]) -m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DNET_TRUE$]) -m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DNET_FALSE$]) -m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_TRUE]) -m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_FALSE]) -m4trace:configure.ac:1148: -1- AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = "yes"]) -m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_DOXYGEN_TRUE$]) -m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_DOXYGEN_FALSE$]) -m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_TRUE]) -m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_FALSE]) -m4trace:configure.ac:1149: -1- AM_CONDITIONAL([HAVE_FUSE], [test "$have_fuse" = "yes"]) -m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_FUSE_TRUE$]) -m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_FUSE_FALSE$]) -m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_TRUE]) -m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_FALSE]) -m4trace:configure.ac:1150: -1- AM_CONDITIONAL([HAVE_GNU_LD], [test "$with_gnu_ld" = "yes"]) -m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GNU_LD_TRUE$]) -m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GNU_LD_FALSE$]) -m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_TRUE]) -m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_FALSE]) -m4trace:configure.ac:1151: -1- AM_CONDITIONAL([HAVE_GTKMM], [test "$have_x" = "yes" -a "$with_gtkmm" = "yes"]) -m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_GTKMM_TRUE$]) -m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_GTKMM_FALSE$]) -m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_TRUE]) -m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_FALSE]) -m4trace:configure.ac:1152: -1- AM_CONDITIONAL([HAVE_PAM], [test "$with_pam" = "yes"]) -m4trace:configure.ac:1152: -1- m4_pattern_allow([^HAVE_PAM_TRUE$]) -m4trace:configure.ac:1152: -1- m4_pattern_allow([^HAVE_PAM_FALSE$]) -m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_TRUE]) -m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_FALSE]) -m4trace:configure.ac:1153: -1- AM_CONDITIONAL([USE_SLASH_PROC], [test "$os" = "linux"]) -m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_SLASH_PROC_TRUE$]) -m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_SLASH_PROC_FALSE$]) -m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_TRUE]) -m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_FALSE]) -m4trace:configure.ac:1154: -1- AM_CONDITIONAL([USE_PRINTF_WRAPPERS], [test "$bsdPrintfWrappers" = "yes"]) -m4trace:configure.ac:1154: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_TRUE$]) -m4trace:configure.ac:1154: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_FALSE$]) -m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_TRUE]) -m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_FALSE]) -m4trace:configure.ac:1155: -1- AM_CONDITIONAL([ENABLE_DEPLOYPKG], [test "$enable_deploypkg" = "yes"]) -m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_TRUE$]) -m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_FALSE$]) -m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_TRUE]) -m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_FALSE]) -m4trace:configure.ac:1156: -1- AM_CONDITIONAL([ENABLE_GRABBITMQPROXY], [test "$enable_grabbitmqproxy" = "yes"]) -m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_TRUE$]) -m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_FALSE$]) -m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_TRUE]) -m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_FALSE]) -m4trace:configure.ac:1157: -1- AM_CONDITIONAL([ENABLE_VGAUTH], [test "$enable_vgauth" = "yes"]) -m4trace:configure.ac:1157: -1- m4_pattern_allow([^ENABLE_VGAUTH_TRUE$]) -m4trace:configure.ac:1157: -1- m4_pattern_allow([^ENABLE_VGAUTH_FALSE$]) -m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_TRUE]) -m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_FALSE]) -m4trace:configure.ac:1158: -1- AM_CONDITIONAL([HAVE_VSOCK], [test "$os" = "linux"]) -m4trace:configure.ac:1158: -1- m4_pattern_allow([^HAVE_VSOCK_TRUE$]) -m4trace:configure.ac:1158: -1- m4_pattern_allow([^HAVE_VSOCK_FALSE$]) -m4trace:configure.ac:1158: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_TRUE]) -m4trace:configure.ac:1158: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_FALSE]) -m4trace:configure.ac:1161: -1- m4_pattern_allow([^NO_XSM$]) -m4trace:configure.ac:1165: -1- m4_pattern_allow([^NO_XCOMPOSITE$]) -m4trace:configure.ac:1177: -1- m4_pattern_allow([^NO_MULTIMON$]) -m4trace:configure.ac:1219: -1- m4_pattern_allow([^HGFS_LIBS$]) -m4trace:configure.ac:1220: -1- m4_pattern_allow([^TOOLS_VERSION$]) -m4trace:configure.ac:1221: -1- m4_pattern_allow([^TARGET_OS$]) -m4trace:configure.ac:1222: -1- m4_pattern_allow([^KERNEL_RELEASE$]) -m4trace:configure.ac:1223: -1- m4_pattern_allow([^LINUXINCLUDE$]) -m4trace:configure.ac:1224: -1- m4_pattern_allow([^MODULES_OS$]) -m4trace:configure.ac:1225: -1- m4_pattern_allow([^MODULES_DIR$]) -m4trace:configure.ac:1226: -1- m4_pattern_allow([^MODULES$]) -m4trace:configure.ac:1227: -1- m4_pattern_allow([^COMMON_XLIBS$]) -m4trace:configure.ac:1228: -1- m4_pattern_allow([^XSM_LIBS$]) -m4trace:configure.ac:1229: -1- m4_pattern_allow([^XCOMPOSITE_LIBS$]) -m4trace:configure.ac:1230: -1- m4_pattern_allow([^PAM_PREFIX$]) -m4trace:configure.ac:1231: -1- m4_pattern_allow([^PLUGIN_CPPFLAGS$]) -m4trace:configure.ac:1232: -1- m4_pattern_allow([^PLUGIN_LDFLAGS$]) -m4trace:configure.ac:1233: -1- m4_pattern_allow([^VMTOOLS_CPPFLAGS$]) -m4trace:configure.ac:1234: -1- m4_pattern_allow([^VMTOOLS_LIBS$]) -m4trace:configure.ac:1235: -1- m4_pattern_allow([^RPCGENFLAGS$]) -m4trace:configure.ac:1236: -1- m4_pattern_allow([^XDR_LIBS$]) -m4trace:configure.ac:1237: -1- m4_pattern_allow([^TEST_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1238: -1- m4_pattern_allow([^COMMON_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1239: -1- m4_pattern_allow([^VMSVC_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1240: -1- m4_pattern_allow([^VMUSR_PLUGIN_INSTALLDIR$]) -m4trace:configure.ac:1245: -1- m4_pattern_allow([^SYSDIR$]) -m4trace:configure.ac:1247: -1- m4_pattern_allow([^INSTVMSG$]) -m4trace:configure.ac:1248: -1- m4_pattern_allow([^RPCGEN_WRAPPER$]) -m4trace:configure.ac:1252: -1- m4_pattern_allow([^LIB_AUTH_CPPFLAGS$]) -m4trace:configure.ac:1253: -1- m4_pattern_allow([^LIB_IMPERSONATE_CPPFLAGS$]) -m4trace:configure.ac:1254: -1- m4_pattern_allow([^LIB_USER_CPPFLAGS$]) -m4trace:configure.ac:1255: -1- m4_pattern_allow([^LIBVMTOOLS_LIBADD$]) -m4trace:configure.ac:1259: -1- m4_pattern_allow([^VIX_LIBADD$]) -m4trace:configure.ac:1260: -1- m4_pattern_allow([^VGAUTH_LIBADD$]) +m4trace:configure.ac:1132: -1- AM_CONDITIONAL([BUILD_HGFSMOUNTER], [test "$buildHgfsmounter" = "yes"]) +m4trace:configure.ac:1132: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_TRUE$]) +m4trace:configure.ac:1132: -1- m4_pattern_allow([^BUILD_HGFSMOUNTER_FALSE$]) +m4trace:configure.ac:1132: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_TRUE]) +m4trace:configure.ac:1132: -1- _AM_SUBST_NOTMAKE([BUILD_HGFSMOUNTER_FALSE]) +m4trace:configure.ac:1133: -1- AM_CONDITIONAL([LINUX], [test "$os" = "linux"]) +m4trace:configure.ac:1133: -1- m4_pattern_allow([^LINUX_TRUE$]) +m4trace:configure.ac:1133: -1- m4_pattern_allow([^LINUX_FALSE$]) +m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([LINUX_TRUE]) +m4trace:configure.ac:1133: -1- _AM_SUBST_NOTMAKE([LINUX_FALSE]) +m4trace:configure.ac:1134: -1- AM_CONDITIONAL([SOLARIS], [test "$os" = "solaris"]) +m4trace:configure.ac:1134: -1- m4_pattern_allow([^SOLARIS_TRUE$]) +m4trace:configure.ac:1134: -1- m4_pattern_allow([^SOLARIS_FALSE$]) +m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([SOLARIS_TRUE]) +m4trace:configure.ac:1134: -1- _AM_SUBST_NOTMAKE([SOLARIS_FALSE]) +m4trace:configure.ac:1135: -1- AM_CONDITIONAL([FREEBSD], [test "$os" = "freebsd" -o "$os" = "kfreebsd-gnu"]) +m4trace:configure.ac:1135: -1- m4_pattern_allow([^FREEBSD_TRUE$]) +m4trace:configure.ac:1135: -1- m4_pattern_allow([^FREEBSD_FALSE$]) +m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([FREEBSD_TRUE]) +m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([FREEBSD_FALSE]) +m4trace:configure.ac:1136: -1- AM_CONDITIONAL([FREEBSD_CUSTOM_SYSDIR], [test \( "$os" = "freebsd" -o "$os" = "kfreebsd-gnu" \) -a -n "$SYSDIR"]) +m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_TRUE$]) +m4trace:configure.ac:1136: -1- m4_pattern_allow([^FREEBSD_CUSTOM_SYSDIR_FALSE$]) +m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_TRUE]) +m4trace:configure.ac:1136: -1- _AM_SUBST_NOTMAKE([FREEBSD_CUSTOM_SYSDIR_FALSE]) +m4trace:configure.ac:1138: -1- AM_CONDITIONAL([THIRTY_TWO_BIT_USERSPACE], [test "$userSpaceBitness" = "32"]) +m4trace:configure.ac:1138: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_TRUE$]) +m4trace:configure.ac:1138: -1- m4_pattern_allow([^THIRTY_TWO_BIT_USERSPACE_FALSE$]) +m4trace:configure.ac:1138: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_TRUE]) +m4trace:configure.ac:1138: -1- _AM_SUBST_NOTMAKE([THIRTY_TWO_BIT_USERSPACE_FALSE]) +m4trace:configure.ac:1139: -1- AM_CONDITIONAL([HAVE_X11], [test "$have_x" = "yes"]) +m4trace:configure.ac:1139: -1- m4_pattern_allow([^HAVE_X11_TRUE$]) +m4trace:configure.ac:1139: -1- m4_pattern_allow([^HAVE_X11_FALSE$]) +m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([HAVE_X11_TRUE]) +m4trace:configure.ac:1139: -1- _AM_SUBST_NOTMAKE([HAVE_X11_FALSE]) +m4trace:configure.ac:1140: -1- AM_CONDITIONAL([HAVE_ICU], [test "$with_icu" = "yes"]) +m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_ICU_TRUE$]) +m4trace:configure.ac:1140: -1- m4_pattern_allow([^HAVE_ICU_FALSE$]) +m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_TRUE]) +m4trace:configure.ac:1140: -1- _AM_SUBST_NOTMAKE([HAVE_ICU_FALSE]) +m4trace:configure.ac:1141: -1- AM_CONDITIONAL([WITH_KERNEL_MODULES], [test "$with_kernel_modules" = "yes"]) +m4trace:configure.ac:1141: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_TRUE$]) +m4trace:configure.ac:1141: -1- m4_pattern_allow([^WITH_KERNEL_MODULES_FALSE$]) +m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_TRUE]) +m4trace:configure.ac:1141: -1- _AM_SUBST_NOTMAKE([WITH_KERNEL_MODULES_FALSE]) +m4trace:configure.ac:1142: -1- AM_CONDITIONAL([HAVE_XSM], [test "$have_xsm" = "yes"]) +m4trace:configure.ac:1142: -1- m4_pattern_allow([^HAVE_XSM_TRUE$]) +m4trace:configure.ac:1142: -1- m4_pattern_allow([^HAVE_XSM_FALSE$]) +m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_TRUE]) +m4trace:configure.ac:1142: -1- _AM_SUBST_NOTMAKE([HAVE_XSM_FALSE]) +m4trace:configure.ac:1143: -1- AM_CONDITIONAL([HAVE_XCOMPOSITE], [test "$have_xcomposite" = "yes"]) +m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_TRUE$]) +m4trace:configure.ac:1143: -1- m4_pattern_allow([^HAVE_XCOMPOSITE_FALSE$]) +m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_TRUE]) +m4trace:configure.ac:1143: -1- _AM_SUBST_NOTMAKE([HAVE_XCOMPOSITE_FALSE]) +m4trace:configure.ac:1144: -1- AM_CONDITIONAL([ENABLE_TESTS], [test "$have_cunit" = "yes"]) +m4trace:configure.ac:1144: -1- m4_pattern_allow([^ENABLE_TESTS_TRUE$]) +m4trace:configure.ac:1144: -1- m4_pattern_allow([^ENABLE_TESTS_FALSE$]) +m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_TRUE]) +m4trace:configure.ac:1144: -1- _AM_SUBST_NOTMAKE([ENABLE_TESTS_FALSE]) +m4trace:configure.ac:1145: -1- AM_CONDITIONAL([WITH_ROOT_PRIVILEGES], [test "$with_root_privileges" = "yes"]) +m4trace:configure.ac:1145: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_TRUE$]) +m4trace:configure.ac:1145: -1- m4_pattern_allow([^WITH_ROOT_PRIVILEGES_FALSE$]) +m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_TRUE]) +m4trace:configure.ac:1145: -1- _AM_SUBST_NOTMAKE([WITH_ROOT_PRIVILEGES_FALSE]) +m4trace:configure.ac:1146: -1- AM_CONDITIONAL([HAVE_DNET], [test "$have_dnet" = "yes"]) +m4trace:configure.ac:1146: -1- m4_pattern_allow([^HAVE_DNET_TRUE$]) +m4trace:configure.ac:1146: -1- m4_pattern_allow([^HAVE_DNET_FALSE$]) +m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_TRUE]) +m4trace:configure.ac:1146: -1- _AM_SUBST_NOTMAKE([HAVE_DNET_FALSE]) +m4trace:configure.ac:1147: -1- AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = "yes"]) +m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DOXYGEN_TRUE$]) +m4trace:configure.ac:1147: -1- m4_pattern_allow([^HAVE_DOXYGEN_FALSE$]) +m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_TRUE]) +m4trace:configure.ac:1147: -1- _AM_SUBST_NOTMAKE([HAVE_DOXYGEN_FALSE]) +m4trace:configure.ac:1148: -1- AM_CONDITIONAL([HAVE_FUSE], [test "$have_fuse" = "yes"]) +m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_FUSE_TRUE$]) +m4trace:configure.ac:1148: -1- m4_pattern_allow([^HAVE_FUSE_FALSE$]) +m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_TRUE]) +m4trace:configure.ac:1148: -1- _AM_SUBST_NOTMAKE([HAVE_FUSE_FALSE]) +m4trace:configure.ac:1149: -1- AM_CONDITIONAL([HAVE_GNU_LD], [test "$with_gnu_ld" = "yes"]) +m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_GNU_LD_TRUE$]) +m4trace:configure.ac:1149: -1- m4_pattern_allow([^HAVE_GNU_LD_FALSE$]) +m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_TRUE]) +m4trace:configure.ac:1149: -1- _AM_SUBST_NOTMAKE([HAVE_GNU_LD_FALSE]) +m4trace:configure.ac:1150: -1- AM_CONDITIONAL([HAVE_GTKMM], [test "$have_x" = "yes" -a "$with_gtkmm" = "yes"]) +m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GTKMM_TRUE$]) +m4trace:configure.ac:1150: -1- m4_pattern_allow([^HAVE_GTKMM_FALSE$]) +m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_TRUE]) +m4trace:configure.ac:1150: -1- _AM_SUBST_NOTMAKE([HAVE_GTKMM_FALSE]) +m4trace:configure.ac:1151: -1- AM_CONDITIONAL([HAVE_PAM], [test "$with_pam" = "yes"]) +m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_PAM_TRUE$]) +m4trace:configure.ac:1151: -1- m4_pattern_allow([^HAVE_PAM_FALSE$]) +m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_TRUE]) +m4trace:configure.ac:1151: -1- _AM_SUBST_NOTMAKE([HAVE_PAM_FALSE]) +m4trace:configure.ac:1152: -1- AM_CONDITIONAL([USE_SLASH_PROC], [test "$os" = "linux"]) +m4trace:configure.ac:1152: -1- m4_pattern_allow([^USE_SLASH_PROC_TRUE$]) +m4trace:configure.ac:1152: -1- m4_pattern_allow([^USE_SLASH_PROC_FALSE$]) +m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_TRUE]) +m4trace:configure.ac:1152: -1- _AM_SUBST_NOTMAKE([USE_SLASH_PROC_FALSE]) +m4trace:configure.ac:1153: -1- AM_CONDITIONAL([USE_PRINTF_WRAPPERS], [test "$bsdPrintfWrappers" = "yes"]) +m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_TRUE$]) +m4trace:configure.ac:1153: -1- m4_pattern_allow([^USE_PRINTF_WRAPPERS_FALSE$]) +m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_TRUE]) +m4trace:configure.ac:1153: -1- _AM_SUBST_NOTMAKE([USE_PRINTF_WRAPPERS_FALSE]) +m4trace:configure.ac:1154: -1- AM_CONDITIONAL([ENABLE_DEPLOYPKG], [test "$enable_deploypkg" = "yes"]) +m4trace:configure.ac:1154: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_TRUE$]) +m4trace:configure.ac:1154: -1- m4_pattern_allow([^ENABLE_DEPLOYPKG_FALSE$]) +m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_TRUE]) +m4trace:configure.ac:1154: -1- _AM_SUBST_NOTMAKE([ENABLE_DEPLOYPKG_FALSE]) +m4trace:configure.ac:1155: -1- AM_CONDITIONAL([ENABLE_GRABBITMQPROXY], [test "$enable_grabbitmqproxy" = "yes"]) +m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_TRUE$]) +m4trace:configure.ac:1155: -1- m4_pattern_allow([^ENABLE_GRABBITMQPROXY_FALSE$]) +m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_TRUE]) +m4trace:configure.ac:1155: -1- _AM_SUBST_NOTMAKE([ENABLE_GRABBITMQPROXY_FALSE]) +m4trace:configure.ac:1156: -1- AM_CONDITIONAL([ENABLE_VGAUTH], [test "$enable_vgauth" = "yes"]) +m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_VGAUTH_TRUE$]) +m4trace:configure.ac:1156: -1- m4_pattern_allow([^ENABLE_VGAUTH_FALSE$]) +m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_TRUE]) +m4trace:configure.ac:1156: -1- _AM_SUBST_NOTMAKE([ENABLE_VGAUTH_FALSE]) +m4trace:configure.ac:1157: -1- AM_CONDITIONAL([HAVE_VSOCK], [test "$os" = "linux"]) +m4trace:configure.ac:1157: -1- m4_pattern_allow([^HAVE_VSOCK_TRUE$]) +m4trace:configure.ac:1157: -1- m4_pattern_allow([^HAVE_VSOCK_FALSE$]) +m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_TRUE]) +m4trace:configure.ac:1157: -1- _AM_SUBST_NOTMAKE([HAVE_VSOCK_FALSE]) +m4trace:configure.ac:1160: -1- m4_pattern_allow([^NO_XSM$]) +m4trace:configure.ac:1164: -1- m4_pattern_allow([^NO_XCOMPOSITE$]) +m4trace:configure.ac:1176: -1- m4_pattern_allow([^NO_MULTIMON$]) +m4trace:configure.ac:1218: -1- m4_pattern_allow([^HGFS_LIBS$]) +m4trace:configure.ac:1219: -1- m4_pattern_allow([^TOOLS_VERSION$]) +m4trace:configure.ac:1220: -1- m4_pattern_allow([^TARGET_OS$]) +m4trace:configure.ac:1221: -1- m4_pattern_allow([^KERNEL_RELEASE$]) +m4trace:configure.ac:1222: -1- m4_pattern_allow([^LINUXINCLUDE$]) +m4trace:configure.ac:1223: -1- m4_pattern_allow([^MODULES_OS$]) +m4trace:configure.ac:1224: -1- m4_pattern_allow([^MODULES_DIR$]) +m4trace:configure.ac:1225: -1- m4_pattern_allow([^MODULES$]) +m4trace:configure.ac:1226: -1- m4_pattern_allow([^COMMON_XLIBS$]) +m4trace:configure.ac:1227: -1- m4_pattern_allow([^XSM_LIBS$]) +m4trace:configure.ac:1228: -1- m4_pattern_allow([^XCOMPOSITE_LIBS$]) +m4trace:configure.ac:1229: -1- m4_pattern_allow([^PAM_PREFIX$]) +m4trace:configure.ac:1230: -1- m4_pattern_allow([^PLUGIN_CPPFLAGS$]) +m4trace:configure.ac:1231: -1- m4_pattern_allow([^PLUGIN_LDFLAGS$]) +m4trace:configure.ac:1232: -1- m4_pattern_allow([^VMTOOLS_CPPFLAGS$]) +m4trace:configure.ac:1233: -1- m4_pattern_allow([^VMTOOLS_LIBS$]) +m4trace:configure.ac:1234: -1- m4_pattern_allow([^RPCGENFLAGS$]) +m4trace:configure.ac:1235: -1- m4_pattern_allow([^XDR_LIBS$]) +m4trace:configure.ac:1236: -1- m4_pattern_allow([^TEST_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1237: -1- m4_pattern_allow([^COMMON_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1238: -1- m4_pattern_allow([^VMSVC_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1239: -1- m4_pattern_allow([^VMUSR_PLUGIN_INSTALLDIR$]) +m4trace:configure.ac:1244: -1- m4_pattern_allow([^SYSDIR$]) +m4trace:configure.ac:1246: -1- m4_pattern_allow([^INSTVMSG$]) +m4trace:configure.ac:1247: -1- m4_pattern_allow([^RPCGEN_WRAPPER$]) +m4trace:configure.ac:1251: -1- m4_pattern_allow([^LIB_AUTH_CPPFLAGS$]) +m4trace:configure.ac:1252: -1- m4_pattern_allow([^LIB_IMPERSONATE_CPPFLAGS$]) +m4trace:configure.ac:1253: -1- m4_pattern_allow([^LIB_USER_CPPFLAGS$]) +m4trace:configure.ac:1254: -1- m4_pattern_allow([^LIBVMTOOLS_LIBADD$]) +m4trace:configure.ac:1258: -1- m4_pattern_allow([^VIX_LIBADD$]) +m4trace:configure.ac:1259: -1- m4_pattern_allow([^VGAUTH_LIBADD$]) m4trace:configure.ac:1365: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:1365: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:1365: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS diff -Nru open-vm-tools-9.10.2-2822639/ChangeLog open-vm-tools-10.0.0-3000743/ChangeLog --- open-vm-tools-9.10.2-2822639/ChangeLog 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/ChangeLog 2015-09-10 07:31:38.000000000 +0000 @@ -1,3 +1,626 @@ +open-vm-tools-10.0.0 build 3000743 + +* Common versioning + +* Quiesced snapshots + +* hgfs-fuse + +* Logging changes + +* AsyncSocket changes + +* Change ASSERT macros to VERIFY + +* Additional locking fixes and optimizations + +* Unicode type and macro cleanup + +* Change glib logging in RpcChannel to use Debug/Warning/Panic. + +* Clean up HGFS server unpack file name V3 arguments + +* Fix nested logging for VmxLogger with vsocket channel. + +* Compile mac-rdpvcbridge from cart-dev + +* Implement VMware Tools for ESXi 6.0 guests. + +* Get rid of ASSERT_ALWAYS_AVAILABLE + +* Get rid of ASSERT_LENGTH. + +* Move ASSERT_OR_IN_PANIC() from public/vm_assert.h to vmkernel. + +* Make lib/location product-agnostic + +* desktopEvents: Leave libICE rug firmly under libSM. + +* Remove SLPv2 + +* Provide a kill-switch for using vsocket in RpcChannel. + +* Use binary search tree to map guest os string to guest os enum. + +* codeset: use icuDir instead of libDir + +* Remove NR_MPNS_PER_PAGE + +* Make FileIO_AtomicUpdate fail gracefully when File_FullPath fails. + +* Merge atomic FetchAndAdd64 with ReadAdd64. + +* Rename Atomic_FetchAdd, part 1. + +* AsyncSocket: Remove UDP socket support. + +* Introduce Id_IsSetUGid for detecting setuid/setgid binaries. + +* Update WS, player version numbers on *-main branch. + +* Integrate all VIX changes from hosted13-pd-rel to vmcore-main. + +* Rename Atomic_FetchAnd*, part 5. + +* Cache Tools conf path. + +* No more Atomic_Fetch. + +* Add configuring of the Windows core dump flags for the tools service + +* Temporary fix for PR 1111448. + +* Add surface logging to basicOps + +* Id_IsSetUGid fails to compile on Android. + +* Add devel backdoor command to run replays inside frobos tests. + +* Save registers earlier during Panic. + +* Prepare the HGFS Windows client to use VMCI transport header version 2 + +* Get Mac OS system version from (Server|System)Version.plist + +* WebMKS plumbing: vmx side + +* Create new V2 of VMCI transport header + +* Minor logging cleanup in vmware-vprobe + +* Notify VMX when Toolsd is going down + +* Remove ovftool temporary fix. + +* Add /proc/interrupts and /proc/irq/* to vm-support + +* Remove HGFS from FreeBSD builds and packaging + +* Split DR6_ONES into DR6_DEFAULT and DR6_ONES + +* Add utilMem to Frobos + +* Support Intel RTM Debug behavior in VT mode. + +* MSG: Skip errno localization on unknown platforms. + +* Replace CPU_MemBarrier with Atomic_MFence + +* Prevent low privileged user from writable access to tools conf data + +* Change shutdown notification RPC failure message to debug. + +* Eliminate some "legacy IPC baggage". + +* Fix tools_obj_linux64 build (license file mismatch) + +* Convert the HGFS uses of ASSERT_DEVEL into ASSERT or remove + +* arm64 support in vm_basic_{types,defs}.h + +* Add an error function hook to PollDefault + +* arm64 support in vm_[basic_]asm.h + +* asyncWebSocket: improve rmks warning message when WebSocket connection fails due to bad SSL cert. + +* Implement MXUser semaphores on Mac OS with lib dispatch semaphores + +* Replace 3-clause BSD license template with 2-clause BSD license + +* vm_basic_{types,asm}.h: cleanup architecture #ifdefs + +* Add a surface flag for 16-byte image alignment in mobs + +* Change config.version from String to Long. + +* Fix HGFS server change notification packet handling. + +* Cleanup "vm_basic_defs.h" + +* vm_atomic: add ARM64 atomic operations. + +* Enable the HGFS VMCI VMX and HGFS server use the V2 header + +* Implement Devel ScreenShot command + +* Fix the HGFS protocol opcode to differentiate headers + +* vmkBoot: refactor serial, arm64 serial & panic. + +* vm_atomic: fix arm64 ReadIfWriteEqual atomics. + +* arm: bug fixes for uint*set implementations. + +* Rework the tools heartbeat code in the VMX. + +* vm_atomic: eliminate non-ASCII chars in comment. + +* Remove the incorrect immediate constraint from 64-bit atomic ops + +* Refactor code under guestinfo/getlib. + +* Remove __builtin_*_address(N) compile checks. + +* boot: misc. vmkernel changes to allow arm64 boot.c compile. + +* debug: move debug to main/x86, arm64 stubs. + +* prda/specialstack: refactor to split out arch deps, arm64 support. + +* Cleanup guestinfo plugin header dependency. + +* Change WSAAddressToString to WSAAddressToStringA + +* Handle EINVAL for preadv and pwritev. + +* Change GET_CURRENT_LOCATION definition. + +* Check if __GLIBC_PREREQ is defined before using it. + +* Add support for IOMMU guest addresses > 16TB. + +* + +* Fix Atomic_Read on ARMv7. + +* Create a trivial view when both the texture and the view are R24G8 class. + +* vm_atomic: fix ARM 32/64-bit Atomic_Read. + +* OvhdMem refactor + pull from vmioplugin branch + +* cpuset/vm_basic_asm: use standard clr/ctz primitives. + +* vm_basic_asm: fix windows build breakage. + +* vSock: Rename "VMCI Sockets". + +* Disable nullDriver by default and add a config switch to enable it. + +* First submit of the VDTI PCI Device. + +* Cleanup/Rationalize coreDump + +* vSock VMX: Introduce a separate sendCb field + +* Don't define g_info if it is available. + +* A virtual USB video device backend. + +* A virtual video device backend. + +* Skip freezing remote mounts. + +* lib/file: Various fixes to FileIOP(read|write)vInternal and FileIO_(Readv|Writev). + +* Use int 31 instruction to trigger an assert in the VMKernel + +* vm_basic_asm: fix uint32set for arm64. + +* Clean up of APIs used by the HGFS server library + +* Clean up the HGFS server shares interface to the HGFS server part II + +* Ignore disk UUIDs from the paths to be frozen. + +* Clean up the HGFS server use of the policy share enumeraton APIs + +* fix HostinfoGetOSShortName to support Debian 7.x + +* remove unnecessary constraints for ABSOLUTELY_NOINLINE define + +* More clean up the HGFS server manager, policy manager APIs + +* Remove MPN32 related macros. + +* lib/uuid: Add CreateRandomEFI, and cleanup + +* Fix buffer overflow in perfMonLinux + +* AsyncSocket: hostname/IP string connection functions should attempt both IPv4 and IPv6 connections. + +* lib/lock: lock tracking tree optimization + +* Fast send on the asynNamedPipe if Write completes synchronously. + +* increase MAX_MPN to 38 bits + +* finish conversion of invalid_mpn64 and max_mpn64 + +* Change Mul64x3264 family of functions to round instead of truncating + +* Add CACHELINE_SIZE to vm_basic_defs.h. + +* Memory is accessed after being freed in function + +* Add some debug noise to RPCs received in guest. + +* Add SMAP support to MMU page walkers and MonTLB + +* lib/file: File_Rotate needs some protection + +* Hgfs VMCI: move packet max size to the correct location + +* Hgfs Server: remove transport only header file from the server. + +* Log errors in RandomBytesWin32. + +* Defer the RunScript cleanup when VIX commands are restricted. + +* Add support in resolution set to log multiple sessions in RDSH. + +* Make Clamped_SAdd32 more robust against compiler options + +* Compare the remote FS type strings the right way. + +* VIX plugin under vmusr should not register for TOOLS_CORE_SIG_IO_FREEZE. + +* Add runtime macros to check type of tools service. + +* vm_atomic: remove unfenced atomic operations. + +* vm_atomic: LOCK-like semantics for arm64 atomics. + +* refcount/vm_basic_asm: multi-architecture memory barriers. + +* Hgfs Server: Fix unpacking of protocol header unused fields + +* Enlarge MAX_IFACES to ensure vmtools could get a valid GOS IP throguh NetUtil_GetPrimaryIP(). + +* Change BPN to be a 64 bit type. + +* lib/lock: MXUser_Control* -> typed functions [trivial?] + +* fix bad error + +* ARM64: Add more basic assembler support + +* Guest Tools: Add memNeeded for Windows and Linux and handle versioning + +* Fix incorrect LRU file accounting for memNeeded on Linux + +* Change the bit representation of BPN to make way for NVM. + +* tools perf mon: collect more stats from /proc/meminfo + +* Remove vmxwifi.sys and macWireless_defs.h + +* tools perf mon: refactor + +* tools data collection: Collect all of the new Linux data + +* Guest stats: fix the time base + +* gos tables: Table must be sorted; reinsert "coreos-64" accordingly + +* guest performance data: no need to have a maximum RPC transfer size + +* guest perf stats: replumb GuestInfo_PerfMon + +* guest perf stats: GuestInfo_PerfMon builds the RPC data itself + +* guest perf data: collect the Linux data + +* guest perf data: return the new protocol + +* guest perf stats: ice the cake (add some polish) + +* guest perf stats: Linux goes to the new format + +* Hgfs Posix Server: fix the writes to not exceed max file size + +* Stick backdoor behavior after vSocket connection failure. + +* Hgfs Posix Server: fix Solaris tools obj builds for log statements + +* Fix memory leak in hgfs server. + +* Implement QuadBlit for DX11Renderer. + +* Add feature-specific RDE Dev Targets - folderRedirection, tsmmr, viewMP + +* MX_Lock should not use HLE on unpatched Haswell systems + +* Hgfs Posix Server: add some useful logging for symlink names + +* lib/file: Don't leak a filename in FileRotateByRenumber. + +* Hgfs Posix Server: add more useful logging to open + +* Hgfs Posix Server: fix open requests failing EAGAIN (EWOULDBLOCK) + +* Sometimes channel can be NULL, this will make vmtools panic. + +* lib: misc/sig support for arm64 (redux). + +* HostType: stop using sysctl + +* authPosix: use getspent when using shadow password, but not PAM + +* Added protocol selection to bora AsyncWebSocket.- Changed VNC Client offer 'vmware-vvc' protocol as an additional protocol. + +* Enable 3D with DX11Renderer and port over the existing PROTOTYPE RenderOps functions. + +* Create the support dir under /tmp instead of CWD. + +* Disable NullDriver backend only for forceQuiece case. + +* Hgfs Server: fix malformed symlink creation requests + +* Hgfs Server: fix check malformed read packets + +* Fix Ubuntu errors in the vm-support script. + +* Expose BDOOR_CMD_VCPU_MMIO_HONORS_PAT to guest. + +* Add optional websocket protocols parameter to AsyncSocket_ListenWebSocketUDS. If NULL then default (legacy) protocols are used. + +* Allow the network script to bring each individual interface up/down. + +* deployPkg plugin: make deployPkg.cpp build as C or C++ + +* GOSTable: Plumb vmkernel6 as a separate bit + +* add deployPkg files to open-vm-tools + +* Introduce mkfsPmem, libpmem for managing pmem resources via the kernel from user-space. + +* Allow to queue MCE requests form the kernel to the VMM. + +* HGFS: Remove R/R + +* Replace PUSHF/POPF with STAC/NOP when setting EFLAGS.AC + +* lib/file: hostd crashes in assertion failure due to file list + +* Tools: Create GuestInfo_GetPrimaryIP as a IPv6 compliant version of NetUtil_GetPrimaryIP + +* Remove memNeeded calculation from the guest tools + +* Move SIZE_xxBITS to common architecture file. + +* GOSTable: Windows 10 as a unique guest + +* Set _FILE_OFFSET_BITS=64 for Solaris + +* Plumbing to expose (whitelisted) vsi-based stats in guest + +* Assorted _FILE_OFFSET_BITS=64 / _LARGEFILE64_SOURCE fixups + +* Serial: [2/16] Serial8250 - refactor into generic and platform parts. + +* lib/log: Improve the level filtering implementation and documentation + +* lib/log: no need to "blip" the lock + +* lib/misc: header clean up + +* Add 16 bits atomics to vm_atomic.h. + +* Add 16 bits atomics for arm64 + +* Clean up some file headers + +* Begin plumbing guest mks stats out to the host. + +* lib/log: improved documentation in log.h + +* Converting MPN to MPN32. + +* Reimplement guestproxycerttool.pl in C. + +* Atomic Boolean support + +* Add grabbitmqProxy plugin to open-vm-tools. + +* Windows 10: an all Windows 10 macro + +* Remove some vacuous FileIO usage + +* Introducing 64-bit MPN type. + +* mks: add shared-secret authentication for Blast websocket connections + +* Windows 10: add macros for all 32 and all 64 bit + +* Add guestproxycerttool (C-implementation) to open-vm-tools and OSPs. + +* cleanup app balloon in vmm, vmx, and parts of vmkernel + +* Honour panic.breakOnPanic on Posix. + +* hashTable: free function work like our other free functions + +* Introduce certificate hash verification in blast native clients. + +* Forward declare sslverifyparam in ssldirect.h + +* asyncWebsocket: move WebSocketHandshakeState into asyncWebSocket.c + +* RecordReplayRemoval: make RR go away from automation tools. + +* tools: improved memNeeded + +* guest stats: Use DynBufs + +* guest tools: a bit of consolidation + +* guest stats: rates in pages per second + +* Guest stats: Dynamically capture stats in Linux + +* guestStats: optimize memory allocation + +* guest stats: Linux deals with overflow + +* guest stats: consistent open file failure messages + +* GuestStat: improve function header + +* GuestStat: more function header cleanup + +* Stop publishing guest stats from VSI/GuestMemInfo structure. + +* Guest Stats: extensible reporting + +* Use new #define _DEFAULT_SOURCE to build open-vm-tools. + +* Publish Windows guest stats via V5 format + +* Guest stats: Only populate Linux legacy values that have been consumed + +* guest stats: Linux publish names as defines + +* Windows stat code cleanup + +* GuestStat: official registed the build in names + +* Adjust lock ranks for IO filters. + +* asyncWebSocket: remove hybi designator and consolidate code + +* asyncWebSocket: simplify protocol lists and framing + +* asyncSocket: simplify the interface for specifying websocket protocols + +* GuestStat: Name data is properly name string + +* lib/misc: Support Util_IsAbsolutePath on Solaris and FreeBSD + +* Hgfs Server: fix unpack of file name args for directory open + +* Minor updates to windows stat code + +* GuestStats: Better data validation and names + +* Debug log messages and minor fixes. + +* Add TLS caching for gettid calls on Linux + +* Add File_DeleteDirectoryContent. + +* Allow vm-support script execution only for root user. + +* GuestStats: rationalize the stat datum bits + +* No more MPN64 type. + +* Gettid TLS: fix coredumping + +* sigPosix scrub: more consistent self-signal behavior and remove unused code + +* Guest Stats: fix alphabetization + +* Publish stats for Windows pagefile size and used subset in KB + +* GuestOps: Set file ownership before setting file permissions. + +* GuestStats: no time units. + +* GuestSDK: remove vmtools.dll/so dependency + +* Use new generic way to collect guest stats and remove unused legacy guest stats. + +* Remove vmioplugin. + +* Use GOnce in pollGtk instead of a static mutex. + +* Update hgfsServer alias code. + +* Inline ASM for rotate left/right instruction + +* Add backdoor command to restrict vmmouse + +* Add Posix File to hgfsURI + +* lib/file: FileSleeper must really sleep + +* Fix unnecessary cast + +* Add LIKELY/UNLIKELY into MXUserRec + +* Fix argument order for InterlockedCompareExchange8 + +* rmks/ssl: change SSL verification for View/Blast RMKS connections to reject mismatched thumbprint always + +* GuestStats: Linux active/inactive anon buffers + +* GuestStats: order the linux stats + +* GuestStats: Clean up include file + +* Hgfs Server: enhance logging for packet request ID + +* Allow RpcVMX_LogV to run without calling malloc. + +* Update the stat IDs list. + +* Don't mount alias target volumes while resolving HGFS file attributes + +* Remove the executable bit from various source files + +* add some improved cert debug noise + +* Basic infrastructure support for guestIntegrity backdoor calls. + +* Implement MXUser semaphores on Mac OS with lib dispatch semaphores + +* Add a backdoor command for mksStats snapshots. + +* add vmhgfs-fuse to open-vm-tools + +* vm_basic_defs/gdb: use non-builtin offsetof for vmk gdb macros. + +* Implement MXUserEvent + +* Remove updateAgent code. + +* Change default sampling rate for guest stats to 20 seconds. + +* Include cstring to avoid 'memset not in scope' error. + +* Remove guestStats that are beyond 60u1 scope. + +* Fixes for use_after_free, double_free and double_close. + +* Use a global lock for protecting gLoggingStopped. + +* change default debugging level and location + +* adjust logging noise for vmtoolsd + +* clean up debug & warning messages in guestInfo plugin + +* clean up logging in vix plugin + +* recategorize powerOps logging messages + +* gather new default Tools logs with vm-support + +* add toolbox-cmd support for log` + +open-vm-tools-9.10.2 build 2822639 * Use new #define _DEFAULT_SOURCE to build OVT. diff -Nru open-vm-tools-9.10.2-2822639/configure open-vm-tools-10.0.0-3000743/configure --- open-vm-tools-9.10.2-2822639/configure 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/configure 2015-09-10 07:31:38.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for open-vm-tools 9.10.2. +# Generated by GNU Autoconf 2.61 for open-vm-tools 10.0.0. # # Report bugs to . # @@ -723,8 +723,8 @@ # Identity of this package. PACKAGE_NAME='open-vm-tools' PACKAGE_TARNAME='open-vm-tools' -PACKAGE_VERSION='9.10.2' -PACKAGE_STRING='open-vm-tools 9.10.2' +PACKAGE_VERSION='10.0.0' +PACKAGE_STRING='open-vm-tools 10.0.0' PACKAGE_BUGREPORT='open-vm-tools-devel@lists.sourceforge.net' ac_unique_file="checkvm/checkvm.c" @@ -1517,7 +1517,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures open-vm-tools 9.10.2 to adapt to many kinds of systems. +\`configure' configures open-vm-tools 10.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1591,7 +1591,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of open-vm-tools 9.10.2:";; + short | recursive ) echo "Configuration of open-vm-tools 10.0.0:";; esac cat <<\_ACEOF @@ -1723,7 +1723,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -open-vm-tools configure 9.10.2 +open-vm-tools configure 10.0.0 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1737,7 +1737,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by open-vm-tools $as_me 9.10.2, which was +It was created by open-vm-tools $as_me 10.0.0, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2744,7 +2744,7 @@ # Define the identity of the package. PACKAGE='open-vm-tools' - VERSION='9.10.2' + VERSION='10.0.0' cat >>confdefs.h <<_ACEOF @@ -20000,8 +20000,8 @@ else true have_fuse=no; - { echo "$as_me:$LINENO: WARNING: Fuse is missing, vmblock-fuse will be disabled." >&5 -echo "$as_me: WARNING: Fuse is missing, vmblock-fuse will be disabled." >&2;} + { echo "$as_me:$LINENO: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&5 +echo "$as_me: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&2;} fi @@ -30816,15 +30816,14 @@ LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrt" - # vmhgfs is not compiled for kernels 3.17 and newer - # Temporary short term limit until the newer kernel component is included - if test "$osVersion" -lt 317000; then - MODULES="$MODULES vmhgfs" - fi # vmxnet is not supported for kernels 3.3.0 and newer if test "$osVersion" -lt 303000; then MODULES="$MODULES vmxnet" fi + # See if we need vmhgfs module. Starting with 4.0.0 we use FUSE + if test "$osVersion" -lt 400000; then + MODULES="$MODULES vmhgfs" + fi # See if we need vmci and vsock modules. Starting with 3.9 they made # their way into mainline kernel. if test "$osVersion" -lt 309000; then @@ -31351,7 +31350,7 @@ ### ### Create the Makefiles ### -ac_config_files="$ac_config_files Makefile lib/Makefile lib/appUtil/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/asyncsocket/Makefile lib/sslDirect/Makefile lib/pollGtk/Makefile lib/poll/Makefile lib/dataMap/Makefile lib/hashMap/Makefile lib/dict/Makefile lib/dynxdr/Makefile lib/err/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/glibUtils/Makefile lib/guestApp/Makefile lib/guestRpc/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsHelper/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/impersonate/Makefile lib/lock/Makefile lib/message/Makefile lib/misc/Makefile lib/netUtil/Makefile lib/nicInfo/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/printer/Makefile lib/procMgr/Makefile lib/rpcChannel/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcVmx/Makefile lib/slashProc/Makefile lib/string/Makefile lib/stubs/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/unicode/Makefile lib/user/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile lib/xdg/Makefile services/Makefile services/vmtoolsd/Makefile services/plugins/Makefile services/plugins/desktopEvents/Makefile services/plugins/dndcp/Makefile services/plugins/grabbitmqProxy/Makefile services/plugins/guestInfo/Makefile services/plugins/hgfsServer/Makefile services/plugins/powerOps/Makefile services/plugins/resolutionSet/Makefile services/plugins/timeSync/Makefile services/plugins/vix/Makefile services/plugins/vmbackup/Makefile services/plugins/deployPkg/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile rpctool/Makefile guestproxycerttool/Makefile vgauth/Makefile vgauth/lib/Makefile vgauth/cli/Makefile vgauth/service/Makefile libguestlib/Makefile libguestlib/vmguestlib.pc libDeployPkg/Makefile libDeployPkg/libDeployPkg.pc libhgfs/Makefile libvmtools/Makefile xferlogs/Makefile modules/Makefile vmblock-fuse/Makefile vmblockmounter/Makefile tests/Makefile tests/vmrpcdbg/Makefile tests/testDebug/Makefile tests/testPlugin/Makefile tests/testVmblock/Makefile docs/Makefile docs/api/Makefile scripts/Makefile scripts/build/rpcgen_wrapper.sh" +ac_config_files="$ac_config_files Makefile lib/Makefile lib/appUtil/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/asyncsocket/Makefile lib/sslDirect/Makefile lib/pollGtk/Makefile lib/poll/Makefile lib/dataMap/Makefile lib/hashMap/Makefile lib/dict/Makefile lib/dynxdr/Makefile lib/err/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/glibUtils/Makefile lib/guestApp/Makefile lib/guestRpc/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsHelper/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/hgfsUri/Makefile lib/impersonate/Makefile lib/lock/Makefile lib/message/Makefile lib/misc/Makefile lib/netUtil/Makefile lib/nicInfo/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/procMgr/Makefile lib/rpcChannel/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcVmx/Makefile lib/slashProc/Makefile lib/string/Makefile lib/stubs/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/unicode/Makefile lib/user/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile lib/xdg/Makefile services/Makefile services/vmtoolsd/Makefile services/plugins/Makefile services/plugins/desktopEvents/Makefile services/plugins/dndcp/Makefile services/plugins/grabbitmqProxy/Makefile services/plugins/guestInfo/Makefile services/plugins/hgfsServer/Makefile services/plugins/powerOps/Makefile services/plugins/resolutionSet/Makefile services/plugins/timeSync/Makefile services/plugins/vix/Makefile services/plugins/vmbackup/Makefile services/plugins/deployPkg/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile rpctool/Makefile guestproxycerttool/Makefile vgauth/Makefile vgauth/lib/Makefile vgauth/cli/Makefile vgauth/service/Makefile libguestlib/Makefile libguestlib/vmguestlib.pc libDeployPkg/Makefile libDeployPkg/libDeployPkg.pc libhgfs/Makefile libvmtools/Makefile xferlogs/Makefile modules/Makefile vmblock-fuse/Makefile vmhgfs-fuse/Makefile vmblockmounter/Makefile tests/Makefile tests/vmrpcdbg/Makefile tests/testDebug/Makefile tests/testPlugin/Makefile tests/testVmblock/Makefile docs/Makefile docs/api/Makefile scripts/Makefile scripts/build/rpcgen_wrapper.sh" ### @@ -31993,7 +31992,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by open-vm-tools $as_me 9.10.2, which was +This file was extended by open-vm-tools $as_me 10.0.0, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -32040,7 +32039,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -open-vm-tools config.status 9.10.2 +open-vm-tools config.status 10.0.0 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -32515,6 +32514,7 @@ "lib/hgfsServer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServer/Makefile" ;; "lib/hgfsServerManagerGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerManagerGuest/Makefile" ;; "lib/hgfsServerPolicyGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerPolicyGuest/Makefile" ;; + "lib/hgfsUri/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsUri/Makefile" ;; "lib/impersonate/Makefile") CONFIG_FILES="$CONFIG_FILES lib/impersonate/Makefile" ;; "lib/lock/Makefile") CONFIG_FILES="$CONFIG_FILES lib/lock/Makefile" ;; "lib/message/Makefile") CONFIG_FILES="$CONFIG_FILES lib/message/Makefile" ;; @@ -32523,7 +32523,6 @@ "lib/nicInfo/Makefile") CONFIG_FILES="$CONFIG_FILES lib/nicInfo/Makefile" ;; "lib/panic/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panic/Makefile" ;; "lib/panicDefault/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panicDefault/Makefile" ;; - "lib/printer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/printer/Makefile" ;; "lib/procMgr/Makefile") CONFIG_FILES="$CONFIG_FILES lib/procMgr/Makefile" ;; "lib/rpcChannel/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcChannel/Makefile" ;; "lib/rpcIn/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcIn/Makefile" ;; @@ -32574,6 +32573,7 @@ "xferlogs/Makefile") CONFIG_FILES="$CONFIG_FILES xferlogs/Makefile" ;; "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; "vmblock-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmblock-fuse/Makefile" ;; + "vmhgfs-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmhgfs-fuse/Makefile" ;; "vmblockmounter/Makefile") CONFIG_FILES="$CONFIG_FILES vmblockmounter/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/vmrpcdbg/Makefile") CONFIG_FILES="$CONFIG_FILES tests/vmrpcdbg/Makefile" ;; diff -Nru open-vm-tools-9.10.2-2822639/configure.ac open-vm-tools-10.0.0-3000743/configure.ac --- open-vm-tools-9.10.2-2822639/configure.ac 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/configure.ac 2015-09-10 07:31:38.000000000 +0000 @@ -39,10 +39,10 @@ ### Initialization ### -TOOLS_VERSION="9.10.2" +TOOLS_VERSION="10.0.0" AC_INIT( [open-vm-tools], - [9.10.2], + [10.0.0], [open-vm-tools-devel@lists.sourceforge.net]) # In order to make this configure script auto-detect situations where @@ -377,7 +377,7 @@ [fuse_main], [have_fuse=yes], [have_fuse=no; - AC_MSG_WARN([Fuse is missing, vmblock-fuse will be disabled.])]) + AC_MSG_WARN([Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled.])]) # # Check for PAM. @@ -1045,15 +1045,14 @@ LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrt" - # vmhgfs is not compiled for kernels 3.17 and newer - # Temporary short term limit until the newer kernel component is included - if test "$osVersion" -lt 317000; then - MODULES="$MODULES vmhgfs" - fi # vmxnet is not supported for kernels 3.3.0 and newer if test "$osVersion" -lt 303000; then MODULES="$MODULES vmxnet" fi + # See if we need vmhgfs module. Starting with 4.0.0 we use FUSE + if test "$osVersion" -lt 400000; then + MODULES="$MODULES vmhgfs" + fi # See if we need vmci and vsock modules. Starting with 3.9 they made # their way into mainline kernel. if test "$osVersion" -lt 309000; then @@ -1288,6 +1287,7 @@ lib/hgfsServer/Makefile \ lib/hgfsServerManagerGuest/Makefile \ lib/hgfsServerPolicyGuest/Makefile \ + lib/hgfsUri/Makefile \ lib/impersonate/Makefile \ lib/lock/Makefile \ lib/message/Makefile \ @@ -1296,7 +1296,6 @@ lib/nicInfo/Makefile \ lib/panic/Makefile \ lib/panicDefault/Makefile \ - lib/printer/Makefile \ lib/procMgr/Makefile \ lib/rpcChannel/Makefile \ lib/rpcIn/Makefile \ @@ -1347,6 +1346,7 @@ xferlogs/Makefile \ modules/Makefile \ vmblock-fuse/Makefile \ + vmhgfs-fuse/Makefile \ vmblockmounter/Makefile \ tests/Makefile \ tests/vmrpcdbg/Makefile \ diff -Nru open-vm-tools-9.10.2-2822639/debian/changelog open-vm-tools-10.0.0-3000743/debian/changelog --- open-vm-tools-9.10.2-2822639/debian/changelog 2015-08-10 21:01:53.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/changelog 2015-11-02 17:47:31.000000000 +0000 @@ -1,20 +1,65 @@ -open-vm-tools (2:9.10.2-2822639-1ubuntu3) wily; urgency=medium +open-vm-tools (2:10.0.0-3000743-3.wily.1) wily; urgency=medium - * Build without xmlsecurity support and xerces for now (universe). + * Backport open-vm-tools from sid to Wily. - -- Matthias Klose Mon, 10 Aug 2015 21:01:08 +0000 + -- Adilson dos Santos Dantas Mon, 02 Nov 2015 15:46:04 -0200 -open-vm-tools (2:9.10.2-2822639-1ubuntu2) wily; urgency=medium +open-vm-tools (2:10.0.0-3000743-3) unstable; urgency=medium - * No-change rebuild against new libicu + * [8b49d5b] fix open-vm-tools-dkms description - -- Iain Lane Wed, 05 Aug 2015 17:41:02 +0100 + -- Bernd Zeimetz Sat, 31 Oct 2015 23:28:22 +0100 -open-vm-tools (2:9.10.2-2822639-1ubuntu1) wily; urgency=medium +open-vm-tools (2:10.0.0-3000743-2) unstable; urgency=medium - * Sync from Debian (LP: #1468114). + * [e42d6de] Fix dkms config file. - -- Ben Howard Mon, 20 Jul 2015 10:37:17 -0600 + -- Bernd Zeimetz Sun, 25 Oct 2015 09:31:05 +0100 + +open-vm-tools (2:10.0.0-3000743-1) unstable; urgency=medium + + * [b0ae431] Merge tag 'upstream/10.0.0-3000743' + Upstream version 10.0.0-3000743 + Closes: #797725 + * [27f0147] Snapshot changelog + * [236554b] Refreshing patches. + * [711f1e2] Merge remote-tracking branch 'origin/master' + * [bfc0ed3] Remove the vmhgfs module and tools. + * [6ab9fc7] Move fuse binaries into open-vm-tools-desktop package. + * [2617cef] Use -std=gnu++11 + * [e5e0c1f] ensure dh_fixperms runs as root + * [4c57986] Remove paths from maintainer scripts. + * [03db1df] Fix dkms destination folder. + * [fb5a5a1] Merge branch 'master' of github.com:bzed/pkg-open-vm-tools + * [ba55c8a] Work around broken cflags from libsigc++. + * [c78bd75] Always use vmhgfs-fuse. + We want to avoid the need to patch the module for every new kernel. + VMware officially supports vmhgfs-fuse for kernels >= 4.0, but + it should just work fine for older kernels. (Closes: #800322) + + -- Bernd Zeimetz Sun, 25 Oct 2015 08:52:49 +0100 + +open-vm-tools (2:9.10.2-2822639-3) unstable; urgency=medium + + * [41f90f1] Make open-vm-tools-dev amd64/i386 instead of all. + + -- Bernd Zeimetz Sun, 16 Aug 2015 17:51:24 +0200 + +open-vm-tools (2:9.10.2-2822639-2) unstable; urgency=medium + + * [6537e76] Update package version in dkms file. + * [c3a1d4a] Add patch to support backing dev info. + Thanks to Peter Vrabel (Closes: #794843) + * [be97f01] Add missing #DEBHELPER# statement. + * [eac5b6a] Updating Standards Version + * [a508cfe] Remove path from command in maintainer script. + * [085d637] Remove executable bit from config files. + * [b084140] Move all dev files into the -dev package. + * [ac965de] Fix building vmghfs for kernel >= 4.1. + Thanks to Achim Schaefer (Closes: #794707) + * [16ca60a] Update gbp config header in debian/gbp.conf. + + -- Bernd Zeimetz Sun, 16 Aug 2015 16:27:27 +0200 open-vm-tools (2:9.10.2-2822639-1) unstable; urgency=medium diff -Nru open-vm-tools-9.10.2-2822639/debian/control open-vm-tools-10.0.0-3000743/debian/control --- open-vm-tools-9.10.2-2822639/debian/control 2015-08-10 21:02:56.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/control 2015-10-31 22:29:08.000000000 +0000 @@ -1,15 +1,14 @@ Source: open-vm-tools Section: admin Priority: extra -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Bernd Zeimetz +Maintainer: Bernd Zeimetz Build-Depends: debhelper (>= 9), autotools-dev, dkms, doxygen, libcunit1-dev, libdumbnet-dev, libfuse-dev, libgtk2.0-dev, libgtkmm-2.4-dev, libicu-dev, libnotify-dev, libpam0g-dev, libprocps-dev, libx11-dev, libxinerama-dev, libxss-dev, libxtst-dev, dh-autoreconf, dh-systemd, - libmspack-dev, libssl-dev, -Standards-Version: 3.9.5 + libmspack-dev, libssl-dev, libxerces-c-dev, libxml-security-c-dev +Standards-Version: 3.9.6 Homepage: http://open-vm-tools.sourceforge.net/ Vcs-Git: https://github.com/bzed/pkg-open-vm-tools.git Vcs-Browser: https://github.com/bzed/pkg-open-vm-tools @@ -30,8 +29,8 @@ Package: open-vm-tools-desktop Architecture: amd64 i386 Depends: ${misc:Depends}, ${shlibs:Depends}, open-vm-tools (= ${binary:Version}) -Breaks: open-vm-tools (<< 2:9.4.0-1280544-8~) -Replaces: open-vm-tools (<< 2:9.4.0-1280544-8~) +Breaks: open-vm-tools (<< 2:10.0.0~) +Replaces: open-vm-tools (<< 2:10.0.0~) Recommends: open-vm-tools-dkms, xauth, xserver-xorg-input-vmmouse, xserver-xorg-video-vmware, fuse @@ -47,8 +46,10 @@ Package: open-vm-tools-dev Section: devel -Architecture: all +Architecture: amd64 i386 Depends: ${misc:Depends} +Breaks: open-vm-tools (<< 2:9.10.2-2822639-2~) +Replaces: open-vm-tools (<< 2:9.10.2-2822639-2~) Description: Open VMware Tools for virtual machines hosted on VMware (development) The Open Virtual Machine Tools (open-vm-tools) project is an open source implementation of VMware Tools. It is a suite of virtualization utilities and @@ -77,15 +78,13 @@ Replaces: open-vm-tools (<< 2:9.4.0-1280544-8~) Recommends: open-vm-tools Suggests: open-vm-tools-desktop -Description: Open VMware Tools for virtual machines hosted on VMware (DKMS) +Description: Open VMware Tools vmxnet kernel module (deprecated) The Open Virtual Machine Tools (open-vm-tools) project is an open source implementation of VMware Tools. It is a suite of virtualization utilities and drivers to improve the functionality, user experience and administration of VMware virtual machines. . - This package provides the source code for the open-vm kernel modules. - The open-vm-tools package is also required in order to make use of these - modules. Kernel source or headers are required to compile these modules. - . - Modules included are legacy vmxnet (newer vmxnet3 is included in the kernel) - and vmhgfs (required to mount Shared Folders) + This package provides the source code for the vmxnet module, which was + superseded by vmxnet3. You should only install this package if you know + that you need the legacy vnxnet module. + Kernel source or headers are required to compile it using DKMS. diff -Nru open-vm-tools-9.10.2-2822639/debian/gbp.conf open-vm-tools-10.0.0-3000743/debian/gbp.conf --- open-vm-tools-9.10.2-2822639/debian/gbp.conf 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/gbp.conf 2015-10-31 22:29:08.000000000 +0000 @@ -1,3 +1,3 @@ -[git-buildpackage] +[buildpackage] sign-tags = True posttag = git push && git push --tags diff -Nru open-vm-tools-9.10.2-2822639/debian/local/open-vm-tools.kmod open-vm-tools-10.0.0-3000743/debian/local/open-vm-tools.kmod --- open-vm-tools-9.10.2-2822639/debian/local/open-vm-tools.kmod 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/local/open-vm-tools.kmod 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -vmhgfs diff -Nru open-vm-tools-9.10.2-2822639/debian/manpages/libguestlib.3 open-vm-tools-10.0.0-3000743/debian/manpages/libguestlib.3 --- open-vm-tools-9.10.2-2822639/debian/manpages/libguestlib.3 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/manpages/libguestlib.3 2015-10-31 22:29:08.000000000 +0000 @@ -9,16 +9,12 @@ .SH SEE ALSO \fIvmware\-checkvm\fR(1) .br -\fIvmware\-hgfsclient\fR(1) -.br \fIvmware\-toolbox\-cmd\fR(1) .br \fIvmware\-xferlogs\fR(1) .br \fIlibvmtools\fR(3) .br -\fIvmware\-hgfsmounter\fR(8) -.br \fIvmware\-user\-suid\-wrapper\fR(1) .SH HOMEPAGE diff -Nru open-vm-tools-9.10.2-2822639/debian/manpages/libvmtools.3 open-vm-tools-10.0.0-3000743/debian/manpages/libvmtools.3 --- open-vm-tools-9.10.2-2822639/debian/manpages/libvmtools.3 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/manpages/libvmtools.3 2015-10-31 22:29:08.000000000 +0000 @@ -9,16 +9,12 @@ .SH SEE ALSO \fIvmware\-checkvm\fR(1) .br -\fIvmware\-hgfsclient\fR(1) -.br \fIvmware\-toolbox\-cmd\fR(1) .br \fIvmware\-xferlogs\fR(1) .br \fIlibguestlib\fR(3) .br -\fIvmware\-hgfsmounter\fR(8) -.br \fIvmware\-user\-suid\-wrapper\fR(1) .SH HOMEPAGE diff -Nru open-vm-tools-9.10.2-2822639/debian/manpages/vmhgfs.9 open-vm-tools-10.0.0-3000743/debian/manpages/vmhgfs.9 --- open-vm-tools-9.10.2-2822639/debian/manpages/vmhgfs.9 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/manpages/vmhgfs.9 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -.TH VMHGFS 9 "2010\-04\-08" "2010.03.20\-243334" "Open VM Tools" - -.SH NAME -vmhgfs \- vmware kernel module - -.SH SYNOPSIS -modprobe vmhgfs - -.SH DESCRIPTION -This is kernel filesystem module. None of the Tools components depend on vmhgfs, nor does it have any dependencies of its own, so it can be loaded at any time in the boot process. -.PP -When mounting, one must use an NFS\-like ":" syntax. The field must be ".host", while the field can be "/", a path to a specific Shared Folder, or a path to a subdirectory within that Shared Folder. Note that mounting may fail if Shared Folders are disabled in the host; don't be alarmed. The vmhgfs filesystem supports a plethora of mount options, run \fIvmware\-hgfsmounter\fR(8) \-h to see them. We typically exclude vmhgfs from the locate database as crawling the Shared Folders is time consuming. To do this, add "vmhgfs" to PRUNEFS within updatedb's configuration file, typically found in /etc/updatedb.conf. -.PP -We also typically mount vmhgfs via: -.PP - mount \-t vmhgfs .host:/ /mnt/hgfs -.PP -Or by adding this line to /etc/fstab: -.PP - .host:/ /mnt/hgfs vmhgfs defaults 0 0 -.PP -The net effect is that all Shared Folders appear and disappear at /mnt/hgfs as they're added or removed. - -.SH OPTIONS -vmhgfs has no options. - -.SH SEE ALSO -\fIvmware\-checkvm\fR(1) -.br -\fIvmware\-hgfsclient\fR(1) -.br -\fIvmware\-toolbox\fR(1) -.br -\fIvmware\-toolbox\-cmd\fR(1) -.br -\fIvmware\-user\fR(1) -.br -\fIvmware\-xferlogs\fR(1) -.br -\fIlibguestlib\fR(3) -.br -\fIlibvmtools\fR(3) -.br -\fIvmware\-guestd\fR(8) -.br -\fIvmware\-hgfsmounter\fR(8) -.br -\fIvmware\-user\-suid\-wrapper\fR(1) -.br -\fIvmblock\fR(9) -.br -\fIvmci\fR(9) -.br -\fIvmmemctl\fR(9) -.br -\fIvmsock\fR(9) -.br -\fIvmsync\fR(9) -.br -\fIvmxnet\fR(9) -.br -\fIvmxnet3\fR(9) - -.SH HOMEPAGE -More information about vmhgfs and the Open VM Tools can be found at <\fIhttp://open\-vm\-tools.sourceforge.net/\fR>. - -.SH AUTHOR -Open VM Tools were written by VMware, Inc. <\fIhttp://www.vmware.com/\fR>. -.PP -This manual page was put together from homepage materials by Daniel Baumann <\fImail@daniel-baumann.ch\fR>, for the Debian project (but may be used by others). diff -Nru open-vm-tools-9.10.2-2822639/debian/manpages/vmware-checkvm.1 open-vm-tools-10.0.0-3000743/debian/manpages/vmware-checkvm.1 --- open-vm-tools-9.10.2-2822639/debian/manpages/vmware-checkvm.1 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/manpages/vmware-checkvm.1 2015-10-31 22:29:08.000000000 +0000 @@ -13,8 +13,6 @@ vmware\-checkvm has no options. .SH SEE ALSO -\fIvmware\-hgfsclient\fR(1) -.br \fIvmware\-toolbox\-cmd\fR(1) .br \fIlibguestlib\fR(3) @@ -23,8 +21,6 @@ .br \fIvmware\-xferlogs\fR(1) .br -\fIvmware\-hgfsmounter\fR(8) -.br \fIvmware\-user\-suid\-wrapper\fR(1) .SH HOMEPAGE diff -Nru open-vm-tools-9.10.2-2822639/debian/manpages/vmware-hgfsclient.1 open-vm-tools-10.0.0-3000743/debian/manpages/vmware-hgfsclient.1 --- open-vm-tools-9.10.2-2822639/debian/manpages/vmware-hgfsclient.1 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/manpages/vmware-hgfsclient.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -.TH VMWARE\-HGFSCLIENT 1 "2010\-04\-08" "2010.03.20\-243334" "Open VM Tools" - -.SH NAME -vmware\-hgfsclient \- hgfs client access - -.SH SYNOPSIS -\fBvmware\-hgfsclient\fR - -.SH DESCRIPTION -This is a simple console application and can be run as any user. vmware\-hgfsclient is a userspace HGFS client implementation. It will probably one day become a full featured HGFS filesystem driver. - -.SH OPTIONS -vmware\-hgfsclient has no options. - -.SH SEE ALSO -\fIvmware\-checkvm\fR(1) -.br -\fIvmware\-toolbox\-cmd\fR(1) -.br -\fIvmware\-xferlogs\fR(1) -.br -\fIlibguestlib\fR(3) -.br -\fIlibvmtools\fR(3) -.br -\fIvmware\-hgfsmounter\fR(8) -.br -\fIvmware\-user\-suid\-wrapper\fR(1) - -.SH HOMEPAGE -More information about vmware\-hgfsclient and the Open VM Tools can be found at <\fIhttp://open\-vm\-tools.sourceforge.net/\fR>. - -.SH AUTHOR -Open VM Tools were written by VMware, Inc. <\fIhttp://www.vmware.com/\fR>. -.PP -This manual page was put together from homepage materials by Daniel Baumann <\fImail@daniel-baumann.ch\fR>, for the Debian project (but may be used by others). diff -Nru open-vm-tools-9.10.2-2822639/debian/manpages/vmware-hgfsmounter.8 open-vm-tools-10.0.0-3000743/debian/manpages/vmware-hgfsmounter.8 --- open-vm-tools-9.10.2-2822639/debian/manpages/vmware-hgfsmounter.8 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/manpages/vmware-hgfsmounter.8 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -.TH VMWARE\-HGFSMOUNTER 8 "2010\-04\-08" "2010.03.20\-243334" "Open VM Tools" - -.SH NAME -vmware\-hgfsmounter \- program for mounting HGFS shares - -.SH SYNOPSIS -\fBmount.vmhgfs\fR \fISHARE\fR \fIDIRECTORY\fR [ \-o \fIOPTIONS\fR ] -.br -\fBvmware\-hgfsmounter\fR \fISHARE\fR \fIDIRECTORY\fR [ \-o \fIOPTIONS\fR ] - -.SH DESCRIPTION -This is a console\-based mount helper application. It mounts the HGFS share, specified by name, to a local directory. Share names must be in host:dir format. - -.SH OPTIONS -.IP "uid=\fIARGUMENT\fR" 4 -mount owner (by uid or username) -.IP "gid=\fIARGUMENT\fR" 4 -mount group (by gid or groupname) -.IP "fmask=\fIARGUMENT\fR" 4 -file umask (in octal) -.IP "dmask=\fIARGUMENT\fR" 4 -directory umask (in octal) -.IP "ro" 4 -mount read\-only -.IP "rw" 4 -mount read\-write (default) -.IP "nosuid" 4 -ignore suid/sgid bits -.IP "suid" 4 -allow suid/sgid bits (default) -.IP "nodev" 4 -prevent device node access -.IP "dev" 4 -allow device node access (default) -.IP "noexec" 4 -prevent program execution -.IP "exec" 4 -allow program execution (default) -.IP "sync" 4 -file writes are synchronous -.IP "async" 4 -file writes are asynchronous (default) -.IP "mand" 4 -allow mandatory locks -.IP "nomand" 4 -prevent mandatory locks (default) -.IP "noatime" 4 -do not update access times -.IP "atime" 4 -update access times (default) -.IP "nodiratime" 4 -do not update directory access times -.IP "adirtime" 4 -update directory access times (default) -.IP "ttl=\fIARGUMENT\fR" 4 -time before file attributes must be revalidated (in seconds). Improves performance but decreases coherency. Defaults to 1 if not set. - -.SH EXAMPLES -This command is intended to be run from within /bin/mount by passing the option '\-t vmhgfs'. For example: -.PP - mount \-t vmhgfs .host:/ /mnt/hgfs/ -.br - mount \-t vmhgfs .host:/foo /mnt/foo -.br - mount \-t vmhgfs .host:/foo/bar /var/lib/bar - -.SH SEE ALSO -\fIvmware\-checkvm\fR(1) -.br -\fIvmware\-hgfsclient\fR(1) -.br -\fIvmware\-toolbox\-cmd\fR(1) -.br -\fIvmware\-xferlogs\fR(1) -.br -\fIlibguestlib\fR(3) -.br -\fIlibvmtools\fR(3) -.br -\fIvmware\-user\-suid\-wrapper\fR(1) - -.SH HOMEPAGE -More information about vmware\-hgfsmounter and the Open VM Tools can be found at <\fIhttp://open\-vm\-tools.sourceforge.net/\fR>. - -.SH AUTHOR -Open VM Tools were written by VMware, Inc. <\fIhttp://www.vmware.com/\fR>. -.PP -This manual page was put together from homepage materials by Daniel Baumann <\fImail@daniel-baumann.ch\fR>, for the Debian project (but may be used by others). diff -Nru open-vm-tools-9.10.2-2822639/debian/manpages/vmware-toolbox-cmd.1 open-vm-tools-10.0.0-3000743/debian/manpages/vmware-toolbox-cmd.1 --- open-vm-tools-9.10.2-2822639/debian/manpages/vmware-toolbox-cmd.1 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/manpages/vmware-toolbox-cmd.1 2015-10-31 22:29:08.000000000 +0000 @@ -15,16 +15,12 @@ .SH SEE ALSO \fIvmware\-checkvm\fR(1) .br -\fIvmware\-hgfsclient\fR(1) -.br \fIvmware\-xferlogs\fR(1) .br \fIlibguestlib\fR(3) .br \fIlibvmtools\fR(3) .br -\fIvmware\-hgfsmounter\fR(8) -.br \fIvmware\-user\-suid\-wrapper\fR(1) .SH HOMEPAGE diff -Nru open-vm-tools-9.10.2-2822639/debian/manpages/vmware-xferlogs.1 open-vm-tools-10.0.0-3000743/debian/manpages/vmware-xferlogs.1 --- open-vm-tools-9.10.2-2822639/debian/manpages/vmware-xferlogs.1 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/manpages/vmware-xferlogs.1 2015-10-31 22:29:08.000000000 +0000 @@ -27,16 +27,12 @@ .SH SEE ALSO \fIvmware\-checkvm\fR(1) .br -\fIvmware\-hgfsclient\fR(1) -.br \fIvmware\-toolbox\-cmd\fR(1) .br \fIlibguestlib\fR(3) .br \fIlibvmtools\fR(3) .br -\fIvmware\-hgfsmounter\fR(8) -.br \fIvmware\-user\-suid\-wrapper\fR(1) .SH HOMEPAGE diff -Nru open-vm-tools-9.10.2-2822639/debian/manpages/vmxnet.9 open-vm-tools-10.0.0-3000743/debian/manpages/vmxnet.9 --- open-vm-tools-9.10.2-2822639/debian/manpages/vmxnet.9 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/manpages/vmxnet.9 2015-10-31 22:29:08.000000000 +0000 @@ -22,8 +22,6 @@ .SH SEE ALSO \fIvmware\-checkvm\fR(1) .br -\fIvmware\-hgfsclient\fR(1) -.br \fIvmware\-toolbox\fR(1) .br \fIvmware\-toolbox\-cmd\fR(1) @@ -38,16 +36,12 @@ .br \fIvmware\-guestd\fR(8) .br -\fIvmware\-hgfsmounter\fR(8) -.br \fIvmware\-user\-suid\-wrapper\fR(1) .br \fIvmblock\fR(9) .br \fIvmci\fR(9) .br -\fIvmhgfs\fR(9) -.br \fIvmmemctl\fR(9) .br \fIvmsock\fR(9) diff -Nru open-vm-tools-9.10.2-2822639/debian/open-vm-tools-desktop.prerm open-vm-tools-10.0.0-3000743/debian/open-vm-tools-desktop.prerm --- open-vm-tools-9.10.2-2822639/debian/open-vm-tools-desktop.prerm 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/open-vm-tools-desktop.prerm 2015-10-31 22:29:08.000000000 +0000 @@ -8,4 +8,5 @@ deb-systemd-invoke stop run-vmblock\\x2dfuse.mount >/dev/null || true fi +#DEBHELPER# diff -Nru open-vm-tools-9.10.2-2822639/debian/open-vm-tools-dkms.dkms open-vm-tools-10.0.0-3000743/debian/open-vm-tools-dkms.dkms --- open-vm-tools-9.10.2-2822639/debian/open-vm-tools-dkms.dkms 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/open-vm-tools-dkms.dkms 2015-10-31 22:29:08.000000000 +0000 @@ -1,19 +1,14 @@ PACKAGE_NAME="open-vm-tools" -PACKAGE_VERSION=9.10.0 +PACKAGE_VERSION=10.0.0 MAKE_CMD_TMPL="make VM_UNAME=\$kernelver \ MODULEBUILDDIR=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build" # The vsock module depends on symbols exported by the vmci module, so it # needs to be built afterwards; the MODULEBUILDDIR variable tells the makefiles # where to store / retrive those symbol files. -MAKE[0]="$MAKE_CMD_TMPL -C vmhgfs; \ - $MAKE_CMD_TMPL -C vmxnet" -CLEAN[0]="$MAKE_CMD_TMPL -C vmhgfs clean; \ - $MAKE_CMD_TMPL -C vmxnet clean" -BUILT_MODULE_NAME[0]="vmhgfs" -BUILT_MODULE_NAME[1]="vmxnet" -BUILT_MODULE_LOCATION[0]="vmhgfs/" -BUILT_MODULE_LOCATION[1]="vmxnet/" +MAKE[0]="$MAKE_CMD_TMPL -C vmxnet" +CLEAN[0]="$MAKE_CMD_TMPL -C vmxnet clean" +BUILT_MODULE_NAME[0]="vmxnet" +BUILT_MODULE_LOCATION[0]="vmxnet/" DEST_MODULE_LOCATION[0]="/updates/dkms" -DEST_MODULE_LOCATION[1]="/updates/dkms" AUTOINSTALL="YES" diff -Nru open-vm-tools-9.10.2-2822639/debian/open-vm-tools-dkms.postinst open-vm-tools-10.0.0-3000743/debian/open-vm-tools-dkms.postinst --- open-vm-tools-9.10.2-2822639/debian/open-vm-tools-dkms.postinst 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/open-vm-tools-dkms.postinst 2015-10-31 22:29:08.000000000 +0000 @@ -6,12 +6,12 @@ case "${1}" in configure) - if [ -x /usr/sbin/update-initramfs ] + if which update-initramfs >/dev/null then update-initramfs -u fi - if [ -x /sbin/udevadm ] + if which udevadm 1>/dev/null then udevadm trigger fi diff -Nru open-vm-tools-9.10.2-2822639/debian/open-vm-tools-dkms.postrm open-vm-tools-10.0.0-3000743/debian/open-vm-tools-dkms.postrm --- open-vm-tools-9.10.2-2822639/debian/open-vm-tools-dkms.postrm 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/open-vm-tools-dkms.postrm 2015-10-31 22:29:08.000000000 +0000 @@ -4,7 +4,7 @@ case "$1" in remove) - if [ -x /usr/sbin/update-initramfs ]; then + if which update-initramfs >/dev/null; then update-initramfs -u fi ;; diff -Nru open-vm-tools-9.10.2-2822639/debian/open-vm-tools.links open-vm-tools-10.0.0-3000743/debian/open-vm-tools.links --- open-vm-tools-9.10.2-2822639/debian/open-vm-tools.links 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/open-vm-tools.links 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -/sbin/mount.vmhgfs /sbin/vmware-hgfsmounter -/usr/share/man/man8/vmware-hgfsmounter.8 /usr/share/man/man8/mount.vmhgfs.8 diff -Nru open-vm-tools-9.10.2-2822639/debian/open-vm-tools.postinst open-vm-tools-10.0.0-3000743/debian/open-vm-tools.postinst --- open-vm-tools-9.10.2-2822639/debian/open-vm-tools.postinst 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/open-vm-tools.postinst 2015-10-31 22:29:08.000000000 +0000 @@ -4,7 +4,7 @@ case "${1}" in configure) - if [ -x /sbin/udevadm ] + if which udevadm 1>/dev/null then udevadm trigger fi diff -Nru open-vm-tools-9.10.2-2822639/debian/patches/debian/0001-kvers.patch open-vm-tools-10.0.0-3000743/debian/patches/debian/0001-kvers.patch --- open-vm-tools-9.10.2-2822639/debian/patches/debian/0001-kvers.patch 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/patches/debian/0001-kvers.patch 2015-10-31 22:29:08.000000000 +0000 @@ -23,17 +23,6 @@ # Header directory for the running kernel ifdef LINUXINCLUDE ---- a/modules/linux/vmhgfs/Makefile -+++ b/modules/linux/vmhgfs/Makefile -@@ -43,7 +43,7 @@ INCLUDE += -I$(SRCROOT)/shared - endif - - --VM_UNAME = $(shell uname -r) -+VM_UNAME = $(KVERS) - - # Header directory for the running kernel - ifdef LINUXINCLUDE --- a/modules/linux/vmsync/Makefile +++ b/modules/linux/vmsync/Makefile @@ -43,7 +43,7 @@ INCLUDE += -I$(SRCROOT)/shared diff -Nru open-vm-tools-9.10.2-2822639/debian/patches/debian/enable_vmhgfs-fuse_by_default open-vm-tools-10.0.0-3000743/debian/patches/debian/enable_vmhgfs-fuse_by_default --- open-vm-tools-9.10.2-2822639/debian/patches/debian/enable_vmhgfs-fuse_by_default 1970-01-01 00:00:00.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/patches/debian/enable_vmhgfs-fuse_by_default 2015-10-31 22:29:08.000000000 +0000 @@ -0,0 +1,16 @@ +--- a/vmhgfs-fuse/config.c ++++ b/vmhgfs-fuse/config.c +@@ -349,11 +349,13 @@ SysCompatCheck(char *prog_name) // IN + release = KERNEL_RELEASE(k[0], k[1], k[2]); + } + ++/* + if (release < KERNEL_RELEASE(4, 0, 0)) { + fprintf(stderr, "%s: incompatible kernel version %02d.%02d.%02d\n", + __func__, k[0], k[1], k[2]); + goto exit; + } ++*/ + + if (!SysCompatIsRegisteredFuse()) { + /* Check if FUSE is installed but not loaded yet. */ diff -Nru open-vm-tools-9.10.2-2822639/debian/patches/debian/max_nic_count open-vm-tools-10.0.0-3000743/debian/patches/debian/max_nic_count --- open-vm-tools-9.10.2-2822639/debian/patches/debian/max_nic_count 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/patches/debian/max_nic_count 2015-10-31 22:29:08.000000000 +0000 @@ -1,9 +1,9 @@ --- a/lib/guestRpc/nicinfo.x +++ b/lib/guestRpc/nicinfo.x -@@ -39,7 +39,7 @@ +@@ -39,7 +39,7 @@ enum NicInfoVersion { */ const NICINFO_MAX_IP_LEN = 64; - const NICINFO_MAX_IPS = 64; + const NICINFO_MAX_IPS = 2048; -const NICINFO_MAX_NICS = 16; +const NICINFO_MAX_NICS = 64; diff -Nru open-vm-tools-9.10.2-2822639/debian/patches/debian/pam-use-common-auth-account open-vm-tools-10.0.0-3000743/debian/patches/debian/pam-use-common-auth-account --- open-vm-tools-9.10.2-2822639/debian/patches/debian/pam-use-common-auth-account 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/patches/debian/pam-use-common-auth-account 2015-10-31 22:29:08.000000000 +0000 @@ -1,10 +1,10 @@ --- a/scripts/linux/pam.d/vmtoolsd +++ b/scripts/linux/pam.d/vmtoolsd -@@ -1,7 +1,2 @@ --#%PAM-1.0 --auth sufficient pam_unix2.so nullok --auth sufficient pam_unix.so shadow nullok --auth required pam_unix_auth.so shadow nullok +@@ -1,7 +1,3 @@ + #%PAM-1.0 +-auth sufficient pam_unix2.so +-auth sufficient pam_unix.so shadow +-auth required pam_unix_auth.so shadow -account sufficient pam_unix2.so -account sufficient pam_unix.so -account required pam_unix_acct.so diff -Nru open-vm-tools-9.10.2-2822639/debian/patches/from_arch/0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch open-vm-tools-10.0.0-3000743/debian/patches/from_arch/0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch --- open-vm-tools-9.10.2-2822639/debian/patches/from_arch/0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/patches/from_arch/0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -From 8df98f3c779fa43d073a42e82bd18cf28c2bd4af Mon Sep 17 00:00:00 2001 -From: Wendell Smith -Date: Sat, 7 Feb 2015 15:42:13 -0500 -Subject: [PATCH 2/3] Fix d_alias to d_u.d_alias for kernel 3.18 - ---- - open-vm-tools/modules/linux/vmhgfs/inode.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules/linux/vmhgfs/inode.c b/modules/linux/vmhgfs/inode.c -index 77b1669..2d289e3 100644 ---- a/modules/linux/vmhgfs/inode.c -+++ b/modules/linux/vmhgfs/inode.c -@@ -1917,7 +1917,7 @@ HgfsPermission(struct inode *inode, - p, - #endif - &inode->i_dentry, -- d_alias) { -+ d_u.d_alias) { - int dcount = hgfs_d_count(dentry); - if (dcount) { - LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount)); -@@ -1970,7 +1970,7 @@ HgfsPermission(struct inode *inode, - /* Find a dentry with valid d_count. Refer bug 587879. */ - list_for_each(pos, &inode->i_dentry) { - int dcount; -- struct dentry *dentry = list_entry(pos, struct dentry, d_alias); -+ struct dentry *dentry = list_entry(pos, struct dentry, d_u.d_alias); - dcount = hgfs_d_count(dentry); - if (dcount) { - LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount)); --- -2.3.4 - diff -Nru open-vm-tools-9.10.2-2822639/debian/patches/from_arch/0003-Fix-f_dentry-msghdr-kernel-3.19.patch open-vm-tools-10.0.0-3000743/debian/patches/from_arch/0003-Fix-f_dentry-msghdr-kernel-3.19.patch --- open-vm-tools-9.10.2-2822639/debian/patches/from_arch/0003-Fix-f_dentry-msghdr-kernel-3.19.patch 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/patches/from_arch/0003-Fix-f_dentry-msghdr-kernel-3.19.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,429 +0,0 @@ -From 61751db8cd4679fc76034a5d1f99df6c64c48de6 Mon Sep 17 00:00:00 2001 -From: lotan -Date: Mon, 30 Mar 2015 08:58:56 +0200 -Subject: [PATCH 3/3] Make vmhgfs work on kernel 3.19. - ---- - open-vm-tools/modules/linux/vmhgfs/dir.c | 35 ++++++------ - open-vm-tools/modules/linux/vmhgfs/file.c | 65 +++++++++++----------- - open-vm-tools/modules/linux/vmhgfs/fsutil.c | 3 +- - .../modules/linux/vmhgfs/shared/compat_dentry.h | 10 ++++ - 4 files changed, 63 insertions(+), 50 deletions(-) - create mode 100644 open-vm-tools/modules/linux/vmhgfs/shared/compat_dentry.h - -diff --git a/modules/linux/vmhgfs/dir.c b/modules/linux/vmhgfs/dir.c -index 809611a..c6a87bd 100644 ---- a/modules/linux/vmhgfs/dir.c -+++ b/modules/linux/vmhgfs/dir.c -@@ -31,6 +31,7 @@ - #include "compat_kernel.h" - #include "compat_slab.h" - #include "compat_mutex.h" -+#include "compat_dentry.h" - - #include "cpName.h" - #include "hgfsEscape.h" -@@ -414,7 +415,7 @@ HgfsPackDirOpenRequest(struct file *file, // IN: File pointer for this open - - /* Build full name to send to server. */ - if (HgfsBuildPath(name, req->bufferSize - (requestSize - 1), -- file->f_dentry) < 0) { -+ DENTRY(file)) < 0) { - LOG(4, (KERN_DEBUG "VMware hgfs: HgfsPackDirOpenRequest: build path failed\n")); - return -EINVAL; - } -@@ -560,8 +561,8 @@ HgfsPrivateDirRelease(struct file *file, // IN: File for the dir getting relea - int result = 0; - - ASSERT(file); -- ASSERT(file->f_dentry); -- ASSERT(file->f_dentry->d_sb); -+ ASSERT(DENTRY(file)); -+ ASSERT(DENTRY(file)->d_sb); - - LOG(6, (KERN_DEBUG "VMware hgfs: HgfsPrivateDirRelease: close fh %u\n", handle)); - -@@ -704,7 +705,7 @@ HgfsDirLlseek(struct file *file, - loff_t offset, - int origin) - { -- struct dentry *dentry = file->f_dentry; -+ struct dentry *dentry = DENTRY(file); - struct inode *inode = dentry->d_inode; - compat_mutex_t *mtx; - -@@ -853,7 +854,7 @@ HgfsReaddirRefreshEntries(struct file *file) // IN: File pointer for this ope - } - - LOG(6, (KERN_DEBUG "VMware hgfs: %s: error: stale handle (%s) return %d)\n", -- __func__, file->f_dentry->d_name.name, result)); -+ __func__, DENTRY(file)->d_name.name, result)); - return result; - } - -@@ -988,9 +989,9 @@ HgfsReaddirNextEntry(struct file *file, // IN: file - char *fileName = NULL; - int result; - -- ASSERT(file->f_dentry->d_inode->i_sb); -+ ASSERT(DENTRY(file)->d_inode->i_sb); - -- si = HGFS_SB_TO_COMMON(file->f_dentry->d_inode->i_sb); -+ si = HGFS_SB_TO_COMMON(DENTRY(file)->d_inode->i_sb); - *entryIgnore = FALSE; - - /* -@@ -1079,18 +1080,18 @@ HgfsReaddirNextEntry(struct file *file, // IN: file - */ - if (!strncmp(entryName, ".", sizeof ".")) { - if (!dotAndDotDotIgnore) { -- *entryIno = file->f_dentry->d_inode->i_ino; -+ *entryIno = DENTRY(file)->d_inode->i_ino; - } else { - *entryIgnore = TRUE; - } - } else if (!strncmp(entryName, "..", sizeof "..")) { - if (!dotAndDotDotIgnore) { -- *entryIno = compat_parent_ino(file->f_dentry); -+ *entryIno = compat_parent_ino(DENTRY(file)); - } else { - *entryIgnore = TRUE; - } - } else { -- *entryIno = HgfsGetFileInode(&entryAttrs, file->f_dentry->d_inode->i_sb); -+ *entryIno = HgfsGetFileInode(&entryAttrs, DENTRY(file)->d_inode->i_sb); - } - - if (*entryIgnore) { -@@ -1170,16 +1171,16 @@ HgfsDoReaddir(struct file *file, // IN: - ASSERT(filldirCtx); - - if (!file || -- !(file->f_dentry) || -- !(file->f_dentry->d_inode)) { -+ !(DENTRY(file)) || -+ !(DENTRY(file)->d_inode)) { - LOG(4, (KERN_DEBUG "VMware hgfs: HgfsReaddir: null input\n")); - return -EFAULT; - } - - LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s, inum %lu, pos %Lu)\n", - __func__, -- file->f_dentry->d_name.name, -- file->f_dentry->d_inode->i_ino, -+ DENTRY(file)->d_name.name, -+ DENTRY(file)->d_inode->i_ino, - *currentPos)); - - /* -@@ -1294,7 +1295,7 @@ HgfsReaddir(struct file *file, // IN: - /* If either dot and dotdot are filled in for us we can exit. */ - if (!dir_emit_dots(file, ctx)) { - LOG(6, (KERN_DEBUG "VMware hgfs: %s: dir_emit_dots(%s, @ %Lu)\n", -- __func__, file->f_dentry->d_name.name, ctx->pos)); -+ __func__, DENTRY(file)->d_name.name, ctx->pos)); - return 0; - } - -@@ -1464,8 +1465,8 @@ HgfsDirRelease(struct inode *inode, // IN: Inode that the file* points to - - ASSERT(inode); - ASSERT(file); -- ASSERT(file->f_dentry); -- ASSERT(file->f_dentry->d_sb); -+ ASSERT(DENTRY(file)); -+ ASSERT(DENTRY(file)->d_sb); - - handle = FILE_GET_FI_P(file)->handle; - -diff --git a/modules/linux/vmhgfs/file.c b/modules/linux/vmhgfs/file.c -index bbde3f4..39502d0 100644 ---- a/modules/linux/vmhgfs/file.c -+++ b/modules/linux/vmhgfs/file.c -@@ -32,6 +32,7 @@ - #include "compat_fs.h" - #include "compat_kernel.h" - #include "compat_slab.h" -+#include "compat_dentry.h" - - /* Must be after compat_fs.h */ - #if defined VMW_USE_AIO -@@ -384,7 +385,7 @@ HgfsPackOpenRequest(struct inode *inode, // IN: Inode of the file to open - /* Build full name to send to server. */ - if (HgfsBuildPath(name, - req->bufferSize - (requestSize - 1), -- file->f_dentry) < 0) { -+ DENTRY(file)) < 0) { - LOG(4, (KERN_DEBUG "VMware hgfs: HgfsPackOpenRequest: build path " - "failed\n")); - return -EINVAL; -@@ -523,8 +524,8 @@ HgfsOpen(struct inode *inode, // IN: Inode of the file to open - ASSERT(inode); - ASSERT(inode->i_sb); - ASSERT(file); -- ASSERT(file->f_dentry); -- ASSERT(file->f_dentry->d_inode); -+ ASSERT(DENTRY(file)); -+ ASSERT(DENTRY(file)->d_inode); - - iinfo = INODE_GET_II_P(inode); - -@@ -605,7 +606,7 @@ HgfsOpen(struct inode *inode, // IN: Inode of the file to open - * This is not the root of our file system so there should always - * be a parent. - */ -- ASSERT(file->f_dentry->d_parent); -+ ASSERT(DENTRY(file)->d_parent); - - /* - * Here we obtain a reference on the parent to make sure it doesn't -@@ -620,10 +621,10 @@ HgfsOpen(struct inode *inode, // IN: Inode of the file to open - * We could do this if we were willing to give up support for - * O_EXCL on 2.4 kernels. - */ -- dparent = dget(file->f_dentry->d_parent); -+ dparent = dget(DENTRY(file)->d_parent); - iparent = dparent->d_inode; - -- HgfsSetUidGid(iparent, file->f_dentry, -+ HgfsSetUidGid(iparent, DENTRY(file), - current_fsuid(), current_fsgid()); - - dput(dparent); -@@ -683,7 +684,7 @@ out: - * forcing a revalidate on one will not force it on any others. - */ - if (result != 0 && iinfo->createdAndUnopened == TRUE) { -- HgfsDentryAgeForce(file->f_dentry); -+ HgfsDentryAgeForce(DENTRY(file)); - } - return result; - } -@@ -772,13 +773,13 @@ HgfsFileRead(struct kiocb *iocb, // IN: I/O control block - - ASSERT(iocb); - ASSERT(iocb->ki_filp); -- ASSERT(iocb->ki_filp->f_dentry); -+ ASSERT(DENTRY(iocb->ki_filp)); - ASSERT(iov); - - pos = HGFS_IOCB_TO_POS(iocb, offset); - iovSegs = HGFS_IOV_TO_SEGS(iov, numSegs); - -- readDentry = iocb->ki_filp->f_dentry; -+ readDentry = DENTRY(iocb->ki_filp); - - LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n", - __func__, readDentry->d_parent->d_name.name, -@@ -882,13 +883,13 @@ HgfsFileWrite(struct kiocb *iocb, // IN: I/O control block - - ASSERT(iocb); - ASSERT(iocb->ki_filp); -- ASSERT(iocb->ki_filp->f_dentry); -+ ASSERT(DENTRY(iocb->ki_filp)); - ASSERT(iov); - - pos = HGFS_IOCB_TO_POS(iocb, offset); - iovSegs = HGFS_IOV_TO_SEGS(iov, numSegs); - -- writeDentry = iocb->ki_filp->f_dentry; -+ writeDentry = DENTRY(iocb->ki_filp); - - LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n", - __func__, writeDentry->d_parent->d_name.name, -@@ -951,7 +952,7 @@ HgfsRead(struct file *file, // IN: File to read from - int result; - - ASSERT(file); -- ASSERT(file->f_dentry); -+ ASSERT(DENTRY(file)); - ASSERT(buf); - ASSERT(offset); - -@@ -959,7 +960,7 @@ HgfsRead(struct file *file, // IN: File to read from - __func__, file->f_dentry->d_parent->d_name.name, - file->f_dentry->d_name.name, count, (long long) *offset)); - -- result = HgfsRevalidate(file->f_dentry); -+ result = HgfsRevalidate(DENTRY(file)); - if (result) { - LOG(4, (KERN_DEBUG "VMware hgfs: HgfsRead: invalid dentry\n")); - goto out; -@@ -1002,8 +1003,8 @@ HgfsWrite(struct file *file, // IN: File to write to - int result; - - ASSERT(file); -- ASSERT(file->f_dentry); -- ASSERT(file->f_dentry->d_inode); -+ ASSERT(DENTRY(file)); -+ ASSERT(DENTRY(file)->d_inode); - ASSERT(buf); - ASSERT(offset); - -@@ -1011,7 +1012,7 @@ HgfsWrite(struct file *file, // IN: File to write to - __func__, file->f_dentry->d_parent->d_name.name, - file->f_dentry->d_name.name, count, (long long) *offset)); - -- result = HgfsRevalidate(file->f_dentry); -+ result = HgfsRevalidate(DENTRY(file)); - if (result) { - LOG(4, (KERN_DEBUG "VMware hgfs: HgfsWrite: invalid dentry\n")); - goto out; -@@ -1051,7 +1052,7 @@ HgfsSeek(struct file *file, // IN: File to seek - loff_t result = -1; - - ASSERT(file); -- ASSERT(file->f_dentry); -+ ASSERT(DENTRY(file)); - - LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %u, %lld, %d)\n", - __func__, -@@ -1059,7 +1060,7 @@ HgfsSeek(struct file *file, // IN: File to seek - file->f_dentry->d_name.name, - FILE_GET_FI_P(file)->handle, offset, origin)); - -- result = (loff_t) HgfsRevalidate(file->f_dentry); -+ result = (loff_t) HgfsRevalidate(DENTRY(file)); - if (result) { - LOG(6, (KERN_DEBUG "VMware hgfs: %s: invalid dentry\n", __func__)); - goto out; -@@ -1143,8 +1144,8 @@ HgfsFlush(struct file *file // IN: file to flush - int ret = 0; - - LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n", -- __func__, file->f_dentry->d_parent->d_name.name, -- file->f_dentry->d_name.name)); -+ __func__, DENTRY(file)->d_parent->d_name.name, -+ DENTRY(file)->d_name.name)); - - if ((file->f_mode & FMODE_WRITE) == 0) { - goto exit; -@@ -1157,7 +1158,7 @@ HgfsFlush(struct file *file // IN: file to flush - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) - ret = vfs_fsync(file, 0); - #else -- ret = HgfsDoFsync(file->f_dentry->d_inode); -+ ret = HgfsDoFsync(DENTRY(file)->d_inode); - #endif - - exit: -@@ -1215,13 +1216,13 @@ HgfsFsync(struct file *file, // IN: File we operate on - - LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %lld, %lld, %d)\n", - __func__, -- file->f_dentry->d_parent->d_name.name, -- file->f_dentry->d_name.name, -+ DENTRY(file)->d_parent->d_name.name, -+ DENTRY(file)->d_name.name, - startRange, endRange, - datasync)); - - /* Flush writes to the server and return any errors */ -- inode = file->f_dentry->d_inode; -+ inode = DENTRY(file)->d_inode; - #if defined VMW_FSYNC_31 - ret = filemap_write_and_wait_range(inode->i_mapping, startRange, endRange); - #else -@@ -1261,14 +1262,14 @@ HgfsMmap(struct file *file, // IN: File we operate on - - ASSERT(file); - ASSERT(vma); -- ASSERT(file->f_dentry); -+ ASSERT(DENTRY(file)); - - LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n", - __func__, - file->f_dentry->d_parent->d_name.name, - file->f_dentry->d_name.name)); - -- result = HgfsRevalidate(file->f_dentry); -+ result = HgfsRevalidate(DENTRY(file)); - if (result) { - LOG(4, (KERN_DEBUG "VMware hgfs: %s: invalid dentry\n", __func__)); - goto out; -@@ -1309,8 +1310,8 @@ HgfsRelease(struct inode *inode, // IN: Inode that this file points to - - ASSERT(inode); - ASSERT(file); -- ASSERT(file->f_dentry); -- ASSERT(file->f_dentry->d_sb); -+ ASSERT(DENTRY(file)); -+ ASSERT(DENTRY(file)->d_sb); - - handle = FILE_GET_FI_P(file)->handle; - LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %u)\n", -@@ -1443,14 +1444,14 @@ HgfsSendfile(struct file *file, // IN: File to read from - ssize_t result; - - ASSERT(file); -- ASSERT(file->f_dentry); -+ ASSERT(DENTRY(file)); - ASSERT(target); - ASSERT(offset); - ASSERT(actor); - - LOG(6, (KERN_DEBUG "VMware hgfs: HgfsSendfile: was called\n")); - -- result = HgfsRevalidate(file->f_dentry); -+ result = HgfsRevalidate(DENTRY(file)); - if (result) { - LOG(4, (KERN_DEBUG "VMware hgfs: HgfsSendfile: invalid dentry\n")); - goto out; -@@ -1497,7 +1498,7 @@ HgfsSpliceRead(struct file *file, // IN: File to read from - ssize_t result; - - ASSERT(file); -- ASSERT(file->f_dentry); -+ ASSERT(DENTRY(file)); - - LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %lu@%Lu)\n", - __func__, -@@ -1505,7 +1506,7 @@ HgfsSpliceRead(struct file *file, // IN: File to read from - file->f_dentry->d_name.name, - (unsigned long) len, (unsigned long long) *offset)); - -- result = HgfsRevalidate(file->f_dentry); -+ result = HgfsRevalidate(DENTRY(file)); - if (result) { - LOG(4, (KERN_DEBUG "VMware hgfs: %s: invalid dentry\n", __func__)); - goto out; -diff --git a/modules/linux/vmhgfs/fsutil.c b/modules/linux/vmhgfs/fsutil.c -index 5023324..a2e794c 100644 ---- a/modules/linux/vmhgfs/fsutil.c -+++ b/modules/linux/vmhgfs/fsutil.c -@@ -36,6 +36,7 @@ - #include "compat_sched.h" - #include "compat_slab.h" - #include "compat_spinlock.h" -+#include "compat_dentry.h" - - #include "vm_assert.h" - #include "cpName.h" -@@ -1924,7 +1925,7 @@ HgfsCreateFileInfo(struct file *file, // IN: File pointer to attach to - - ASSERT(file); - -- inodeInfo = INODE_GET_II_P(file->f_dentry->d_inode); -+ inodeInfo = INODE_GET_II_P(DENTRY(file)->d_inode); - ASSERT(inodeInfo); - - /* Get the mode of the opened file. */ -diff --git a/modules/linux/vmhgfs/shared/compat_dentry.h b/modules/linux/vmhgfs/shared/compat_dentry.h -new file mode 100644 -index 0000000..dd53760 ---- /dev/null -+++ b/modules/linux/vmhgfs/shared/compat_dentry.h -@@ -0,0 +1,10 @@ -+#ifndef __COMPAT_DENTRY_H__ -+# define __COMPAT_DENTRY_H__ -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) -+# define DENTRY(file) (file->f_path.dentry) -+#else -+# define DENTRY(file) (file->f_dentry) -+#endif -+ -+#endif /* __COMPAT_DENTRY_H__ */ --- -2.3.4 - diff -Nru open-vm-tools-9.10.2-2822639/debian/patches/series open-vm-tools-10.0.0-3000743/debian/patches/series --- open-vm-tools-9.10.2-2822639/debian/patches/series 2015-06-24 07:20:31.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/patches/series 2015-10-31 22:29:08.000000000 +0000 @@ -2,5 +2,4 @@ debian/pam-use-common-auth-account debian/max_nic_count from_arch/0001-Fix-vmxnet-module-on-kernels-3.16.patch -from_arch/0003-Fix-f_dentry-msghdr-kernel-3.19.patch -from_arch/0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch +debian/enable_vmhgfs-fuse_by_default diff -Nru open-vm-tools-9.10.2-2822639/debian/rules open-vm-tools-10.0.0-3000743/debian/rules --- open-vm-tools-9.10.2-2822639/debian/rules 2015-08-10 21:01:00.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/debian/rules 2015-10-31 22:29:08.000000000 +0000 @@ -29,9 +29,10 @@ --libdir=\$${prefix}/lib \ --without-kernel-modules \ --with-pic \ - --without-xmlsecurity --without-xerces \ CFLAGS="-fPIC -Wno-deprecated-declarations $(CFLAGS)" \ - CUSTOM_PROCPS_NAME=procps + CUSTOM_PROCPS_NAME=procps \ + CXXFLAGS='-std=gnu++11' + find . -name Makefile -exec sed -i '/.*CPPFLAGS.*/s,-std=c++11,,' '{}' \; override_dh_auto_install: dh_auto_install -- DESTDIR=$(CURDIR)/debian/open-vm-tools @@ -49,13 +50,20 @@ install -D -m 0755 debian/local/vmxnet.hook debian/open-vm-tools-dkms/usr/share/initramfs-tools/hooks/vmxnet install -D -m 0644 debian/local/xautostart.conf debian/open-vm-tools-desktop/etc/vmware-tools/xautostart.conf install -D -m 0644 debian/local/tools.conf debian/open-vm-tools/etc/vmware-tools/tools.conf - install -D -m 0644 debian/local/open-vm-tools.kmod debian/open-vm-tools-dkms/lib/modules-load.d/open-vm-tools.conf install -D -m 0644 debian/local/run-vmblock\\x2dfuse.mount debian/open-vm-tools-desktop/lib/systemd/system/run-vmblock\\x2dfuse.mount # open-vm-tools-dev mkdir -p debian/open-vm-tools-dev/usr/share/doc/open-vm-tools mv debian/open-vm-tools/usr/share/doc/open-vm-tools/api debian/open-vm-tools-dev/usr/share/doc/open-vm-tools + mkdir -p debian/open-vm-tools-dev/usr/lib + mv \ + debian/open-vm-tools/usr/lib/*.a \ + debian/open-vm-tools/usr/lib/*.so \ + debian/open-vm-tools/usr/lib/pkgconfig \ + debian/open-vm-tools-dev/usr/lib + mv debian/open-vm-tools/usr/include debian/open-vm-tools-dev/usr + # open-vm-tools-dkms mkdir -p debian/open-vm-tools-dkms/usr/src @@ -68,15 +76,12 @@ rm -f debian/open-vm-tools/usr/lib/open-vm-tools/plugins/*/*.la rm -rf debian/open-vm-tools/usr/share/open-vm-tools/tests - # moving open-vm-tools files - mkdir -p debian/open-vm-tools/sbin - mv debian/open-vm-tools/usr/sbin/mount.vmhgfs debian/open-vm-tools/sbin/mount.vmhgfs - # moving open-vm-tools-desktop files mkdir -p debian/open-vm-tools-desktop/usr/lib/open-vm-tools/plugins mv debian/open-vm-tools/usr/lib/open-vm-tools/plugins/vmusr debian/open-vm-tools-desktop/usr/lib/open-vm-tools/plugins mkdir -p debian/open-vm-tools-desktop/usr/bin + mv debian/open-vm-tools/usr/bin/*-fuse debian/open-vm-tools-desktop/usr/bin mv debian/open-vm-tools/usr/bin/vmware-user-suid-wrapper debian/open-vm-tools-desktop/usr/bin mkdir -p debian/open-vm-tools-desktop/etc/xdg/autostart @@ -90,7 +95,13 @@ dh_dkms -popen-vm-tools-dkms -V $(VERSION) override_dh_fixperms: - dh_fixperms -Xsbin/mount.vmhgfs -Xvmware-user-suid-wrapper + dh_testroot + find debian/open-vm-tools/etc -type f -print0 | xargs -0 chmod ugo-x + chmod ugo+x debian/open-vm-tools/etc/vmware-tools/scripts/vmware/* + chmod ugo+x debian/open-vm-tools/etc/vmware-tools/vm-support + chmod ugo+x debian/open-vm-tools/etc/vmware-tools/*-vm-default + + dh_fixperms -Xvmware-user-suid-wrapper override_dh_strip: dh_strip --dbg-package=open-vm-tools-dbg diff -Nru open-vm-tools-9.10.2-2822639/guestproxycerttool/cert_key.c open-vm-tools-10.0.0-3000743/guestproxycerttool/cert_key.c --- open-vm-tools-9.10.2-2822639/guestproxycerttool/cert_key.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/guestproxycerttool/cert_key.c 2015-09-10 07:31:38.000000000 +0000 @@ -55,7 +55,7 @@ *---------------------------------------------------------------------- */ -static gchar * +gchar * GetSSLError(gchar **errorStr) // OUT { unsigned long code; @@ -582,6 +582,8 @@ return cert; } + +#ifndef _WIN32 /* *---------------------------------------------------------------------- * @@ -598,7 +600,7 @@ *---------------------------------------------------------------------- */ -static gboolean +gboolean WritePemFile(EVP_PKEY *pkey, // IN const gchar *keyFile, // IN X509 *cert, // IN @@ -648,6 +650,8 @@ return ret; } +#endif + /* *---------------------------------------------------------------------- diff -Nru open-vm-tools-9.10.2-2822639/guestproxycerttool/cert_key.h open-vm-tools-10.0.0-3000743/guestproxycerttool/cert_key.h --- open-vm-tools-9.10.2-2822639/guestproxycerttool/cert_key.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/guestproxycerttool/cert_key.h 2015-09-10 07:31:38.000000000 +0000 @@ -21,6 +21,7 @@ #include #include +#include gchar * CertKey_ComputeCertPemFileHash(const gchar *certPemFile); // IN @@ -35,4 +36,12 @@ void CertKey_InitOpenSSLLib(void); +gboolean +WritePemFile(EVP_PKEY *pkey, // IN + const gchar *keyFile, // IN + X509 *cert, // IN + const gchar *certFile); // IN + +gchar * +GetSSLError(gchar **errorStr); // OUT #endif // #ifndef _CERT_KEY_H_ diff -Nru open-vm-tools-9.10.2-2822639/guestproxycerttool/cert_tool.c open-vm-tools-10.0.0-3000743/guestproxycerttool/cert_tool.c --- open-vm-tools-9.10.2-2822639/guestproxycerttool/cert_tool.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/guestproxycerttool/cert_tool.c 2015-09-10 07:31:38.000000000 +0000 @@ -17,7 +17,7 @@ *********************************************************/ /* - * guestproxycerttool.c -- + * cert_tool.c -- * * Utility to manage the certificates for 'rabbitmqproxy' * plugin in 'VMware Tools'. @@ -27,11 +27,16 @@ #include #include #include +#ifndef _WIN32 #include +#endif #include #include "cert_util.h" #include "cert_key.h" #include "cert_tool_version.h" +#ifdef _WIN32 +#include "common_win.h" +#endif #include "vm_version.h" #include "embed_version.h" @@ -51,6 +56,9 @@ #define RSA_KEY_LENGTH 2048 #define CERT_EXPIRED_IN_DAYS (365 * 10) + +gboolean gIsLogEnabled = FALSE; + /* *---------------------------------------------------------------------- * @@ -73,14 +81,17 @@ fprintf(stderr, "Guest Proxy Certificate Management Tool.\n"); fprintf(stderr, "Usage: %s [OPTION] [ARGUMENTS]\n\n", cmd); fprintf(stderr, "Options\n" - " -h, --help Prints the Usage information.\n\n" - " -g, --generate_key_cert Regenerate the server key/cert, the old\n" - " key/cert will be replaced.\n\n" + " -h, --help Prints the usage information.\n\n" + " -v, --verbose Prints additional log messages.\n\n" + " -f, --force Forces to regenerate the new server key/cert\n" + " when used with -g.\n\n" + " -g, --generate_key_cert Generates the server key/cert if they don't\n" + " exist. Use with -f to force the regeneration.\n\n" " -a, --add_trust_cert \n" " Adds the client cert to the trusted\n" " certificates directory.\n\n" " -r, --remove_trust_cert \n" - " Remove the client cert from the trusted\n" + " Removes the client cert from the trusted\n" " certificates directory.\n\n" " -d, --display_server_cert []\n" " Prints the server's certificate to the\n" @@ -90,6 +101,46 @@ } +static void +InitProxyPaths(const gchar *toolDir) +{ + guestProxyDir = g_build_filename(toolDir, "GuestProxyData", NULL); + guestProxyServerDir = g_build_filename(guestProxyDir, "server", NULL); + guestProxyTrustedDir = g_build_filename(guestProxyDir, "trusted", NULL); + guestProxySslConf = g_build_filename(toolDir, "guestproxy-ssl.conf", NULL); +} + + +#ifndef _WIN32 +/* + *---------------------------------------------------------------------- + * + * CheckRootPriv -- + * + * Check if the effect user id is root. + * + * Results: + * TRUE if it is, otherwise FALSE. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +gboolean +CheckRootPriv(void) +{ + if (geteuid() != 0) { + Error("Please re-run this program as the super user to execute " + "this operation.\n"); + return FALSE; + } + return TRUE; +} +#endif + + /* *---------------------------------------------------------------------- * @@ -102,8 +153,8 @@ * TRUE if successfully find all the paths. Otherwise FALSE. * * Side effects: - * Path global variables are set accordingly and initialized is set - * to true so it is only initialized once. + * Path global variables are set accordingly and guest proxy data + * directories are created on-demand. * *---------------------------------------------------------------------- */ @@ -113,50 +164,45 @@ { gboolean ret = FALSE; - if (requireRootPriv && geteuid() != 0) { - Error("Please re-run this program as the super user to execute " - "this operation.\n"); + if (requireRootPriv && !CheckRootPriv()) { + Error("Current user has insufficient privileges.\n"); goto exit; } - ret = initialized; - if (ret) { - goto exit; + if (!initialized) { + CertKey_InitOpenSSLLib(); + initialized = TRUE; } - CertKey_InitOpenSSLLib(); + if (!g_file_test(guestProxySslConf, G_FILE_TEST_IS_REGULAR)) { + Error("Couldn't find the GuestProxy Config file at '%s'.\n", + guestProxySslConf); + goto exit; + } - guestProxyDir = g_build_filename(CertUtil_GetToolDir(), - "GuestProxyData", NULL); + /* Create guest proxy data directories on-demand */ if (!g_file_test(guestProxyDir, G_FILE_TEST_IS_DIR)) { - Error("Couldn't find the GuestProxy Directory at '%s'.\n", - guestProxyDir); - goto exit; + if (g_mkdir(guestProxyDir, 0755) < 0) { + Error("Couldn't create the directory '%s'.\n", guestProxyDir); + goto exit; + } } - guestProxyServerDir = g_build_filename(guestProxyDir, "server", NULL); if (!g_file_test(guestProxyServerDir, G_FILE_TEST_IS_DIR)) { - Error("Couldn't find the GuestProxy Certificate Directory at '%s'.\n", - guestProxyServerDir); - goto exit; + if (g_mkdir(guestProxyServerDir, 0755) < 0) { + Error("Couldn't create the directory '%s'.\n", guestProxyServerDir); + goto exit; + } } - guestProxyTrustedDir = g_build_filename(guestProxyDir, "trusted", NULL); if (!g_file_test(guestProxyTrustedDir, G_FILE_TEST_IS_DIR)) { - Error("Couldn't find the GuestProxy Certificate Store at '%s'.\n", - guestProxyTrustedDir); - goto exit; - } - - guestProxySslConf = g_build_filename(CertUtil_GetToolDir(), - "guestproxy-ssl.conf", NULL); - if (!g_file_test(guestProxySslConf, G_FILE_TEST_IS_REGULAR)) { - Error("Couldn't find the GuestProxy Config file at '%s'.\n", - guestProxySslConf); - goto exit; + if (g_mkdir(guestProxyTrustedDir, 0700) < 0) { + Error("Couldn't create the directory '%s'.\n", guestProxyTrustedDir); + goto exit; + } } - initialized = ret = TRUE; + ret = TRUE; exit: return ret; @@ -322,7 +368,7 @@ */ static gboolean -CreateKeyCert(void) +CreateKeyCert(gboolean force) { gboolean ret = FALSE; gchar *cert = NULL; @@ -335,6 +381,21 @@ key = g_build_filename(guestProxyServerDir, "key.pem", NULL); cert = g_build_filename(guestProxyServerDir, "cert.pem", NULL); + /* + * If both server key and certificate files already exist and the + * program is not asked to create them by force, print an warning + * message about server key/cert files not regenerating. + */ + if (g_file_test(key, G_FILE_TEST_IS_REGULAR) && + g_file_test(cert, G_FILE_TEST_IS_REGULAR) && !force) { + printf("\nNOTE: both %s and \n %s already exist.\n" + " They are not generated again. To regenerate " + "them by force,\n use the \"%s -g -f\" command.\n\n", + key, cert, g_get_prgname()); + ret = TRUE; + goto exit; + } + printf("Generating the key and certificate files.\n"); if (!CertKey_GenerateKeyCert(RSA_KEY_LENGTH, CERT_EXPIRED_IN_DAYS, @@ -427,6 +488,50 @@ /* + " -e, --erase_proxy_data Erases the trusted and server directories,\n" + " and their contents including server key/cert.\n\n" +*/ + +/* + *---------------------------------------------------------------------- + * + * EraseProxyData -- + * + * Delete the guest proxy data diectory and its contents. + * + * Results: + * TRUE if success, otherwise FALSE. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static gboolean +EraseProxyData(void) +{ + gboolean ret = FALSE; + + if (!CheckRootPriv()) { + goto exit; + } + + if (g_file_test(guestProxyDir, G_FILE_TEST_IS_DIR)) { + if (!CertUtil_RemoveDir(guestProxyDir)) { + Error("Fail to remove the directory '%s'.\n", guestProxyDir); + goto exit; + } + } + + ret = TRUE; + +exit: + return ret; +} + + +/* * Aggregation of command options. */ static struct _options { @@ -436,7 +541,10 @@ gboolean displayCert; gboolean generateCert; gboolean usage; -} options = { NULL, NULL, NULL, FALSE, FALSE, FALSE}; + gboolean verbose; + gboolean force; + gboolean erase; +} options = { NULL, NULL, NULL, FALSE, FALSE, FALSE, FALSE}; static gboolean @@ -457,6 +565,12 @@ static GOptionEntry cmdOptions[] = { { "help", 'h', 0, G_OPTION_ARG_NONE, &options.usage, NULL, NULL }, + { "verbose", 'v', 0, + G_OPTION_ARG_NONE, &options.verbose, NULL, NULL }, + { "erase_proxy_data", 'e', 0, + G_OPTION_ARG_NONE, &options.erase, NULL, NULL }, + { "force", 'f', 0, + G_OPTION_ARG_NONE, &options.force, NULL, NULL }, { "generate_key_cert", 'g', 0, G_OPTION_ARG_NONE, &options.generateCert, NULL, NULL }, { "add_trust_cert", 'a', 0, @@ -520,10 +634,17 @@ exit(0); } - if ((options.generateCert && !CreateKeyCert()) || + if (options.verbose) { + gIsLogEnabled = TRUE; + } + + InitProxyPaths(CertUtil_GetToolDir()); + + if ((options.generateCert && !CreateKeyCert(options.force)) || (options.displayCert && !DisplayServerCert(options.outputCert)) || (options.addCert && !AddTrustCert(options.addCert)) || - (options.deleteCert && !RemoveTrustCert(options.deleteCert))) { + (options.deleteCert && !RemoveTrustCert(options.deleteCert)) || + (options.erase && !EraseProxyData())) { return 1; } else { return 0; diff -Nru open-vm-tools-9.10.2-2822639/guestproxycerttool/cert_util.c open-vm-tools-10.0.0-3000743/guestproxycerttool/cert_util.c --- open-vm-tools-9.10.2-2822639/guestproxycerttool/cert_util.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/guestproxycerttool/cert_util.c 2015-09-10 07:31:38.000000000 +0000 @@ -17,7 +17,7 @@ *********************************************************/ /* - * certUtil.c -- + * cert_util.c -- * * Utilities to manage the certificates. */ @@ -336,6 +336,7 @@ } +#ifndef _WIN32 /* *---------------------------------------------------------------------- * @@ -364,6 +365,7 @@ return path; } +#endif /* @@ -424,4 +426,71 @@ } return ret; +} + + +/* + *---------------------------------------------------------------------- + * + * CertUtil_RemoveDir -- + * + * Remove a directory. This directory can be non-empty. When it is + * non-empty, all of its files and subdirectories are removed too. + * + * Results: + * TRUE if the directory is successfully removed, otherwise FALSE. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +gboolean +CertUtil_RemoveDir(const gchar *dirToRemove) +{ + gboolean ret = FALSE; + GDir *dir = NULL; + const gchar *file; + GError *error = NULL; + gchar *fname = NULL; + + if ((dir = g_dir_open(dirToRemove, 0, &error)) == NULL) { + Error("Failed to open %s: %s.\n", dirToRemove, error->message); + goto exit; + } + + while ((file = g_dir_read_name(dir)) != NULL) { + g_free(fname); + fname = g_build_filename(dirToRemove, file, NULL); + + if (g_file_test(fname, G_FILE_TEST_IS_DIR)) { + if (!CertUtil_RemoveDir(fname)) { + Error("Couldn't remove the directory '%s'.\n", fname); + goto exit; + } + } else if (g_remove(fname) < 0) { + Error("Couldn't remove the file '%s'.\n", fname); + goto exit; + } + } + + g_dir_close(dir); + dir = NULL; + + if (g_rmdir(dirToRemove) < 0) { + Error("Couldn't remove the directory '%s'.\n", dirToRemove); + goto exit; + } + + ret = TRUE; + +exit: + g_free(fname); + g_clear_error(&error); + if (dir) { + g_dir_close(dir); + } + + return ret; } diff -Nru open-vm-tools-9.10.2-2822639/guestproxycerttool/cert_util.h open-vm-tools-10.0.0-3000743/guestproxycerttool/cert_util.h --- open-vm-tools-9.10.2-2822639/guestproxycerttool/cert_util.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/guestproxycerttool/cert_util.h 2015-09-10 07:31:38.000000000 +0000 @@ -39,8 +39,13 @@ *---------------------------------------------------------------------- */ +#ifdef _WIN32 +#define Error(fmt, ...) \ + fprintf(stderr, "%s: " fmt, g_get_prgname(), __VA_ARGS__); +#else #define Error(fmt, args...) \ fprintf(stderr, "%s: " fmt, g_get_prgname(), ##args); +#endif gchar * CertUtil_CreateCertFileName(const gchar *certDir, // IN @@ -58,6 +63,11 @@ CertUtil_CopyFile(const gchar *src, // IN const gchar *dst); // IN +gboolean +CertUtil_RemoveDir(const gchar *dirToRemove); // IN + const gchar *CertUtil_GetToolDir(void); +gboolean CheckRootPriv(void); + #endif // #ifndef _CERT_UTIL_H_ diff -Nru open-vm-tools-9.10.2-2822639/hgfsmounter/hgfsmounter.c open-vm-tools-10.0.0-3000743/hgfsmounter/hgfsmounter.c --- open-vm-tools-9.10.2-2822639/hgfsmounter/hgfsmounter.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/hgfsmounter/hgfsmounter.c 2015-09-10 07:31:38.000000000 +0000 @@ -608,6 +608,67 @@ } #endif + +/* + *----------------------------------------------------------------------------- + * + * ParseServerIno -- + * + * A helper function to process a string containing serverino value. + * + * Results: + * TRUE always success. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static Bool +ParseServerIno(const char *option, // IN: option string along with value + HgfsMountInfo *mountInfo, // OUT: mount data + int *flags) // OUT: mount flags unused +{ + ASSERT(option); + ASSERT(mountInfo); + + mountInfo->flags |= HGFS_MNTINFO_SERVER_INO; + LOG("Setting mount flag server ino in 0x%x\n", mountInfo->flags); + return TRUE; +} + + +/* + *----------------------------------------------------------------------------- + * + * ParseNoServerIno -- + * + * A helper function to process a string containing noserverino value. + * + * Results: + * TRUE always success. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static Bool +ParseNoServerIno(const char *option, // IN: option string along with value + HgfsMountInfo *mountInfo, // OUT: mount data + int *flags) // OUT: mount flags unused +{ + ASSERT(option); + ASSERT(mountInfo); + + mountInfo->flags &= ~HGFS_MNTINFO_SERVER_INO; + LOG("Clearing mount flag server ino in 0x%x\n", mountInfo->flags); + return TRUE; +} + + static MountOptions mountOptions[] = { { "ro", MS_RDONLY, TRUE, "mount read-only", "Setting mount read-only", NULL }, @@ -665,6 +726,12 @@ { "bind", MS_MOVE, TRUE, "move an existig mount point", "Setting mount type to move", NULL }, #endif + { "serverino", 0, TRUE, + "Use server generated inode numbers.\n", + "Setting mount option for using Server inode numbers on", ParseServerIno }, + { "noserverino", 0, FALSE, + "Use client generated inode numbers.\n", + "Setting mount option for using Server inode numbers off", ParseNoServerIno }, { "remount", MS_REMOUNT, TRUE, "remount already mounted filesystem", "Setting mount type to remount", NULL } @@ -1064,6 +1131,7 @@ } mountInfo.magicNumber = HGFS_SUPER_MAGIC; + mountInfo.infoSize = sizeof mountInfo; mountInfo.version = HGFS_PROTOCOL_VERSION; #ifndef sun @@ -1080,6 +1148,10 @@ mountInfo.shareNameDir = shareNameDir; #endif #endif + /* + * Default flags which maybe modified by user passed options. + */ + mountInfo.flags = HGFS_MNTINFO_SERVER_INO; /* * This'll write the rest of the options into HgfsMountInfo and possibly diff -Nru open-vm-tools-9.10.2-2822639/lib/appUtil/appUtil.c open-vm-tools-10.0.0-3000743/lib/appUtil/appUtil.c --- open-vm-tools-9.10.2-2822639/lib/appUtil/appUtil.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/appUtil/appUtil.c 2015-09-10 07:31:38.000000000 +0000 @@ -22,6 +22,8 @@ * Utility functions for guest applications. */ +#include "appUtil.h" + #include #include @@ -38,7 +40,7 @@ * AppUtil_SendGuestCaps -- * * Send a list of guest capabilities to the host. - * + * * Results: * None. * diff -Nru open-vm-tools-9.10.2-2822639/lib/appUtil/appUtilX11.c open-vm-tools-10.0.0-3000743/lib/appUtil/appUtilX11.c --- open-vm-tools-9.10.2-2822639/lib/appUtil/appUtilX11.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/appUtil/appUtilX11.c 2015-09-10 07:31:38.000000000 +0000 @@ -101,7 +101,7 @@ AppUtilCollectNamedIcons(GPtrArray *pixbufs, // IN/OUT const char *iconName) // IN { - char *myIconName; + char *myIconName = NULL; char *baseIconName; /* * Use the GtkIconTheme to track down any available icons for this app. diff -Nru open-vm-tools-9.10.2-2822639/lib/asyncsocket/asyncsocket.c open-vm-tools-10.0.0-3000743/lib/asyncsocket/asyncsocket.c --- open-vm-tools-9.10.2-2822639/lib/asyncsocket/asyncsocket.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/asyncsocket/asyncsocket.c 2015-09-10 07:31:38.000000000 +0000 @@ -96,6 +96,9 @@ #define PORT_STRING_LEN 6 /* "12345\0" or ":12345" */ +#define IN_IPOLL_RECV (1 << 0) +#define IN_IPOLL_SEND (1 << 1) + /* * INET6_ADDRSTRLEN allows for only 45 characters. If we somehow have a * non-recommended V4MAPPED address we can exceed 45 total characters in our @@ -357,6 +360,9 @@ case ASOCKERR_LISTEN: result = MSGID(asyncsocket.listen) "Socket listen error"; break; + case ASOCKERR_CONNECTSSL: + result = MSGID(asyncsocket.connectssl) "Connection error: could not negotiate SSL"; + break; } if (!result) { @@ -669,6 +675,7 @@ AsyncSocketPollParams *pollParams, // IN: optional Bool isWebSock, // IN Bool webSockUseSSL, // IN: + const char *protocols[], // IN: optional int *outError) // OUT: optional { AsyncSocket *asock = AsyncSocketInit(addr->ss_family, pollParams, outError); @@ -676,7 +683,7 @@ if (asock != NULL) { #ifndef VMX86_TOOLS if (isWebSock) { - AsyncSocketInitWebSocket(asock, clientData, webSockUseSSL); + AsyncSocketInitWebSocket(asock, clientData, webSockUseSSL, protocols); } #endif @@ -717,6 +724,7 @@ AsyncSocketPollParams *pollParams, // IN Bool isWebSock, // IN Bool webSockUseSSL, // IN + const char *protocols[], // IN: optional int *outError) // OUT: optional { AsyncSocket *asock = NULL; @@ -730,7 +738,7 @@ if (getaddrinfoError == 0) { asock = AsyncSocketListenImpl(&addr, addrLen, connectFn, clientData, pollParams, isWebSock, webSockUseSSL, - outError); + protocols, outError); if (asock) { ASOCKLG0(asock, @@ -800,13 +808,14 @@ AsyncSocketPollParams *pollParams, // IN Bool isWebSock, // IN Bool webSockUseSSL, // IN + const char *protocols[], // IN: optional int *outError) // OUT: optional { if (addrStr != NULL && *addrStr != '\0' && Str_Strcmp(addrStr, "localhost")) { return AsyncSocketListenerCreateImpl(addrStr, port, AF_UNSPEC, connectFn, clientData, pollParams, FALSE, - FALSE, outError); + FALSE, protocols, outError); } else { Bool localhost = addrStr != NULL && !Str_Strcmp(addrStr, "localhost"); unsigned int tempPort = port; @@ -817,7 +826,7 @@ asock6 = AsyncSocketListenerCreateImpl(addrStr, port, AF_INET6, connectFn, clientData, pollParams, - isWebSock, webSockUseSSL, + isWebSock, webSockUseSSL, protocols, &tempError6); if (localhost && port == 0) { @@ -832,7 +841,7 @@ asock4 = AsyncSocketListenerCreateImpl(addrStr, tempPort, AF_INET, connectFn, clientData, pollParams, isWebSock, webSockUseSSL, - &tempError4); + protocols, &tempError4); if (localhost && port == 0 && tempError4 == ASOCKERR_BINDADDRINUSE) { Log(ASOCKPREFIX "Failed to reuse IPv6 localhost port number for IPv4 " @@ -843,7 +852,8 @@ asock4 = AsyncSocketListenerCreateImpl(addrStr, port, AF_INET, connectFn, clientData, pollParams, isWebSock, - webSockUseSSL, &tempError4); + webSockUseSSL, protocols, + &tempError4); tempPort = AsyncSocket_GetPort(asock4); if (tempPort == MAX_UINT32) { @@ -856,7 +866,8 @@ asock6 = AsyncSocketListenerCreateImpl(addrStr, tempPort, AF_INET6, connectFn, clientData, pollParams, isWebSock, - webSockUseSSL, &tempError6); + webSockUseSSL, protocols, + &tempError6); if (!asock6 && tempError6 == ASOCKERR_BINDADDRINUSE) { Log(ASOCKPREFIX "Failed to reuse IPv4 localhost port number for " @@ -937,12 +948,12 @@ asock6 = AsyncSocketListenerCreateImpl("::1", port, AF_INET6, connectFn, clientData, pollParams, isWebSock, webSockUseSSL, - &tempError6); + NULL, &tempError6); asock4 = AsyncSocketListenerCreateImpl("127.0.0.1", port, AF_INET, connectFn, clientData, pollParams, isWebSock, webSockUseSSL, - &tempError4); + NULL, &tempError4); if (asock6 && asock4) { AsyncSocket *asock; @@ -1022,7 +1033,7 @@ int *outError) // OUT: optional { return AsyncSocketListenerCreate(addrStr, port, connectFn, clientData, - pollParams, FALSE, FALSE, outError); + pollParams, FALSE, FALSE, NULL, outError); } @@ -1035,9 +1046,6 @@ * families and accepts new connections. Fires the connect callback with * new AsyncSocket object for each connection. * - * If port requested is 0, we will let the system assign the first - * available port. - * * Results: * New AsyncSocket in listening state or NULL on error. * @@ -1095,7 +1103,7 @@ asock = AsyncSocketListenImpl((struct sockaddr_storage *)&addr, sizeof addr, connectFn, clientData, pollParams, FALSE, - FALSE, outError); + FALSE, NULL, outError); VMCISock_ReleaseAFValueFd(vsockDev); return asock; @@ -1274,7 +1282,15 @@ { #ifdef _WIN32 OSVERSIONINFOW osvi = {sizeof(OSVERSIONINFOW)}; + + /* + * Starting with msvc-12.0 / SDK v8.1 GetVersionEx is deprecated. + * Bug 1259185 tracks switching to VerifyVersionInfo. + */ + +#pragma warning(suppress : 4996) // 'function': was declared deprecated GetVersionExW(&osvi); + /* Windows version is at least Vista or higher */ return osvi.dwMajorVersion >= 6; #else @@ -2162,14 +2178,14 @@ { int retVal = ASOCKERR_SUCCESS; - if (!asock->recvBuf && !asock->recvCb) { + if (!asock->recvCb) { VMwareStatus pollStatus; /* * Register the Poll callback */ - ASOCKLOG(3, asock, ("installing recv poll callback\n")); + ASOCKLOG(3, asock, ("installing recv periodic poll callback\n")); pollStatus = AsyncSocketPollAdd(asock, TRUE, POLL_FLAG_READ | POLL_FLAG_PERIODIC, @@ -2185,12 +2201,12 @@ if (AsyncSocketHasDataPending(asock) && !asock->inRecvLoop) { ASOCKLOG(0, asock, ("installing recv RTime poll callback\n")); - if (Poll_CB_RTime(asock->vt->recvCallback, - asock, 0, FALSE, NULL) != + if (AsyncSocketPollAdd(asock, FALSE, 0, asock->vt->recvCallback, 0) != VMWARE_STATUS_SUCCESS) { retVal = ASOCKERR_POLL; goto out; } + asock->recvCbTimer = TRUE; } out: @@ -2476,6 +2492,7 @@ if (read && s->fd == -1) { if (!s->listenAsock4 && !s->listenAsock6) { ASSERT(FALSE); + ASOCKLG0(s, ("%s: Failed to find listener socket.\n", __FUNCTION__)); return ASOCKERR_GENERIC; } @@ -2587,26 +2604,37 @@ } #endif - ASOCKWARN(s, ("Failed to return a ready socket.\n")); + ASOCKWARN(s, ("%s: Failed to return a ready socket.\n", + __FUNCTION__)); return ASOCKERR_GENERIC; } case 0: /* * No sockets were ready within the specified time. */ + ASOCKLG0(s, ("%s: Timeout waiting for a ready socket.\n", + __FUNCTION__)); return ASOCKERR_TIMEOUT; - case -1: - if (ASOCK_LASTERROR() == EINTR) { + case -1: { + int sysErr = ASOCK_LASTERROR(); + + if (sysErr == EINTR) { /* * We were somehow interrupted by signal. Let's loop and retry. */ + ASOCKLG0(s, ("%s: Socket interrupted by a signal.\n", + __FUNCTION__)); continue; } - s->genericErrno = ASOCK_LASTERROR(); + s->genericErrno = sysErr; + + ASOCKLG0(s, ("%s: Failed with error %d: %s\n", __FUNCTION__, sysErr, + Err_Errno2String(sysErr))); return ASOCKERR_GENERIC; + } default: NOT_REACHED(); } @@ -2798,7 +2826,8 @@ * already make 0-byte send() to force WSAEWOULDBLOCK. */ - if (AsyncSocketPollAdd(asock, FALSE, 0, asock->vt->sendCallback, 0) + if (AsyncSocketPollAdd(asock, FALSE, 0, asock->vt->sendCallback, + asock->pollParams.iPoll != NULL ? 1 : 0) != VMWARE_STATUS_SUCCESS) { retVal = ASOCKERR_POLL; return retVal; @@ -2992,8 +3021,8 @@ #if defined(_WIN32) DWORD len = ARRAYSIZE(tempAddrString); - if (WSAAddressToString(aiIterator->ai_addr, aiIterator->ai_addrlen, - NULL, tempAddrString, &len)) { + if (WSAAddressToStringA(aiIterator->ai_addr, aiIterator->ai_addrlen, + NULL, tempAddrString, &len)) { *addrString = Util_SafeStrdup(unknownAddr); } else { *addrString = Util_SafeStrdup(tempAddrString); @@ -3279,7 +3308,7 @@ s->sendBufTail = &(s->sendBufList); } s->sendPos = 0; - free(tmp.base64Buf); + free(tmp.encodedBuf); free(head); if (tmp.sendFn) { @@ -3343,9 +3372,9 @@ int left = head->len - s->sendPos; int sizeToSend = head->len; - if (head->base64Buf) { + if (head->encodedBuf) { sent = SSL_Write(s->sslSock, - (uint8 *) head->base64Buf + s->sendPos, left); + (uint8 *) head->encodedBuf + s->sendPos, left); } else { sent = SSL_Write(s->sslSock, (uint8 *) head->buf + s->sendPos, left); @@ -3784,16 +3813,12 @@ * after reading the data. */ - Bool removed; - AsyncSocketLock(s); ASSERT(s->state == AsyncSocketConnected); ASSERT(s->recvCb); /* We are supposed to call someone... */ AsyncSocketAddRef(s); - removed = AsyncSocketPollRemove(s, TRUE, - POLL_FLAG_READ | POLL_FLAG_PERIODIC, - s->vt->recvCallback); - ASSERT(removed || s->pollParams.iPoll); + s->vt->cancelRecvCb(s); + s->recvCb = TRUE; /* We need to know if the callback cancel recv. */ s->inBlockingRecv++; AsyncSocketUnlock(s); /* We may sleep in poll. */ @@ -3816,22 +3841,20 @@ * it above. */ - if (s->state != AsyncSocketClosed) { - VMwareStatus pollStatus; - - ASSERT(s->refCount > 1); /* We should not be last user of socket */ + if (s->state != AsyncSocketClosed && s->recvCb) { + ASSERT(s->refCount > 1); /* We should not be last user of socket. */ ASSERT(s->state == AsyncSocketConnected); - ASSERT(s->recvCb); /* Still interested in callback. */ - pollStatus = AsyncSocketPollAdd(s, TRUE, - POLL_FLAG_READ | POLL_FLAG_PERIODIC, - s->vt->recvCallback); - - if (pollStatus != VMWARE_STATUS_SUCCESS) { - ASOCKWARN(s, ("failed to install recv callback!\n")); - AsyncSocketRelease(s, TRUE); - - retVal = ASOCKERR_POLL; - goto out; + /* + * If AsyncSocketPoll or AsyncSocketFillRecvBuffer fails, do not + * add the recv callback as it may never fire. + */ + s->recvCb = FALSE; /* For re-registering the poll callback. */ + if (retVal == ASOCKERR_SUCCESS || retVal == ASOCKERR_TIMEOUT) { + retVal = s->vt->recv(s, (uint8 *)s->recvBuf + s->recvPos, + s->recvLen - s->recvPos); + } + if (retVal != ASOCKERR_SUCCESS) { + s->recvBuf = NULL; } } /* This may destroy socket s if it is in AsyncSocketClosed state now. */ @@ -3851,7 +3874,6 @@ } } -out: return retVal; } @@ -4066,6 +4088,10 @@ { ASSERT(AsyncSocketIsLocked(asock)); + if (asock->recvCbTimer) { + AsyncSocketPollRemove(asock, FALSE, 0, asock->vt->recvCallback); + asock->recvCbTimer = FALSE; + } if (asock->recvCb) { Bool removed; ASOCKLOG(1, asock, ("Removing poll recv callback while cancelling recv.\n")); @@ -4126,24 +4152,18 @@ ASSERT(!asock->recvBuf || asock->recvCb); + if (asock->recvCbTimer) { + AsyncSocketPollRemove(asock, FALSE, 0, asock->vt->recvCallback); + asock->recvCbTimer = FALSE; + } if (asock->recvCb) { ASOCKLOG(1, asock, ("recvCb is non-NULL, removing recv callback\n")); removed = AsyncSocketPollRemove(asock, TRUE, POLL_FLAG_READ | POLL_FLAG_PERIODIC, asock->vt->recvCallback); - - /* - * Callback might be temporarily removed in AsyncSocket_DoOneMsg. - */ - + /* Callback might be temporarily removed in AsyncSocket_DoOneMsg. */ ASSERT_NOT_TESTED(removed || asock->pollParams.iPoll); - /* - * We may still have the RTime callback, try to remove if it exists - */ - - removed = Poll_CB_RTimeRemove(asock->vt->recvCallback, - asock, FALSE); asock->recvCb = FALSE; asock->recvBuf = NULL; } @@ -4220,9 +4240,9 @@ int pos = asock->sendPos; /* - * Free the Base64 encoded data if it exists. + * Free the encoded data if it exists. */ - free(cur->base64Buf); + free(cur->encodedBuf); asock->sendBufList = asock->sendBufList->next; asock->sendPos = 0; @@ -4529,7 +4549,7 @@ * Allocate and initialize new send buffer entry */ - newBuf = Util_SafeCalloc(1, sizeof(SendBufList)); + newBuf = Util_SafeCalloc(1, sizeof *newBuf); newBuf->buf = buf; newBuf->len = len; newBuf->sendFn = sendFn; @@ -4727,7 +4747,7 @@ static void AsyncSocketAcceptCallback(void *clientData) { - AsyncSocket *asock = (AsyncSocket *) clientData; + AsyncSocket *asock = clientData; int retval; ASSERT(asock); @@ -4769,7 +4789,7 @@ static void AsyncSocketConnectCallback(void *clientData) { - AsyncSocket *asock = (AsyncSocket *) clientData; + AsyncSocket *asock = clientData; int retval; ASSERT(asock); @@ -4807,7 +4827,7 @@ void AsyncSocketRecvCallback(void *clientData) { - AsyncSocket *asock = (AsyncSocket *) clientData; + AsyncSocket *asock = clientData; int error; ASSERT(asock); @@ -4850,7 +4870,7 @@ #ifdef VMX86_TOOLS NOT_IMPLEMENTED(); #else - AsyncSocket *asock = (AsyncSocket *) clientData; + AsyncSocket *asock = clientData; MXUserRecLock *lock; ASSERT(asock); @@ -4859,8 +4879,14 @@ !MXUser_IsCurThreadHoldingRecLock(asock->pollParams.lock)); AsyncSocketLock(asock); + if (asock->recvCbTimer) { + /* IVmdbPoll only has periodic callbacks. */ + AsyncSocketIPollRemove(asock, FALSE, 0, asock->vt->recvCallback); + asock->recvCbTimer = FALSE; + } + asock->inIPollCb |= IN_IPOLL_RECV; lock = asock->pollParams.lock; - if (asock->recvCb) { + if (asock->recvCb && asock->inBlockingRecv == 0) { /* * There is no need to take a reference here -- the fact that this * callback is running means AsyncsocketIPollRemove would not release a @@ -4873,6 +4899,7 @@ } } + asock->inIPollCb &= ~IN_IPOLL_RECV; if (asock->recvCb) { AsyncSocketUnlock(asock); } else { @@ -4911,7 +4938,7 @@ void AsyncSocketSendCallback(void *clientData) { - AsyncSocket *s = (AsyncSocket *) clientData; + AsyncSocket *s = clientData; int retval; ASSERT(s); @@ -4983,13 +5010,14 @@ #ifdef VMX86_TOOLS NOT_IMPLEMENTED(); #else - AsyncSocket *s = (AsyncSocket *) clientData; + AsyncSocket *s = clientData; MXUserRecLock *lock; ASSERT(s); ASSERT(s->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); AsyncSocketLock(s); + s->inIPollCb |= IN_IPOLL_SEND; lock = s->pollParams.lock; if (s->sendCb) { /* @@ -5008,6 +5036,7 @@ AsyncSocketSendCallback(s); } + s->inIPollCb &= ~IN_IPOLL_SEND; AsyncSocketRelease(s, TRUE); if (lock != NULL) { MXUser_DecRefRecLock(lock); @@ -5296,10 +5325,18 @@ ret = poll->UnregisterTimer(poll, callback, asock); } - if (ret) { + if (ret && + !((asock->inIPollCb & IN_IPOLL_RECV) != 0 && + callback == asock->vt->recvCallback) && + !((asock->inIPollCb & IN_IPOLL_SEND) != 0 && + callback == asock->vt->sendCallback)) { MXUserRecLock *lock = asock->pollParams.lock; - /* Release the reference taken when registering the callback. */ + /* + * As the callback has been unregistered and we are not currently in + * the callback being removed, we can safely release the reference taken + * when registering the callback. + */ AsyncSocketRelease(asock, FALSE); if (lock != NULL) { MXUser_DecRefRecLock(lock); @@ -5311,8 +5348,6 @@ } - - /* *----------------------------------------------------------------------------- * @@ -5484,12 +5519,18 @@ Bool AsyncSocket_ConnectSSL(AsyncSocket *asock, // IN - SSLVerifyParam *verifyParam) // IN/OPT + SSLVerifyParam *verifyParam, // IN/OPT + void *sslContext) // IN/OPT { ASSERT(asock); ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); - return SSL_ConnectAndVerify(asock->sslSock, verifyParam); + if (sslContext == NULL) { + sslContext = SSL_DefaultContext(); + } + + return SSL_ConnectAndVerifyWithContext(asock->sslSock, verifyParam, + sslContext); } @@ -5540,7 +5581,7 @@ AsyncSocketSslAcceptCallback(void *clientData) { int sslOpCode; - AsyncSocket *asock = (AsyncSocket *) clientData; + AsyncSocket *asock = clientData; VMwareStatus pollStatus; ASSERT(asock); diff -Nru open-vm-tools-9.10.2-2822639/lib/asyncsocket/asyncSocketInt.h open-vm-tools-10.0.0-3000743/lib/asyncsocket/asyncSocketInt.h --- open-vm-tools-9.10.2-2822639/lib/asyncsocket/asyncSocketInt.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/asyncsocket/asyncSocketInt.h 2015-09-10 07:31:38.000000000 +0000 @@ -108,18 +108,10 @@ #define ASOCK_EWOULDBLOCK EWOULDBLOCK #endif - -typedef struct WebSocketHandshakeState { - char *handshakeBuffer; - int32 numValidBytes; // The number of bytes in the buffer that constitute the header - int32 httpHeaderLength; -} WebSocketHandshakeState; - typedef enum { - WEB_SOCKET_FRAME_TYPE_UNKNOWN = 0, - WEB_SOCKET_FRAME_TYPE_RAW = 1, - WEB_SOCKET_FRAME_TYPE_UTF8 = 2, -} WebSocketFrameType; + WEB_SOCKET_FRAME_OPCODE_BINARY = 0x02, + WEB_SOCKET_FRAME_OPCODE_CLOSE = 0x08, +} WebSocketFrameOpcode; typedef enum { WEB_SOCKET_STATE_CONNECTING = 0, @@ -129,12 +121,12 @@ } WebSocketState; typedef enum { - WEB_SOCKET_HYBI_NEED_FRAME_TYPE = 0, - WEB_SOCKET_HYBI_NEED_FRAME_SIZE = 1, - WEB_SOCKET_HYBI_NEED_EXTENDED_FRAME_SIZE = 2, - WEB_SOCKET_HYBI_NEED_FRAME_MASK = 3, - WEB_SOCKET_HYBI_NEED_FRAME_DATA = 4, -} WebSocketHybiDecodeState; + WEB_SOCKET_NEED_FRAME_TYPE = 0, + WEB_SOCKET_NEED_FRAME_SIZE = 1, + WEB_SOCKET_NEED_EXTENDED_FRAME_SIZE = 2, + WEB_SOCKET_NEED_FRAME_MASK = 3, + WEB_SOCKET_NEED_FRAME_DATA = 4, +} WebSocketDecodeState; /* * Bitmask indicates when masking should be applyed or removed, @@ -145,10 +137,10 @@ * server. */ typedef enum { - WEB_SOCKET_HYBI_MASKING_NONE = 0, - WEB_SOCKET_HYBI_MASKING_RECV = 1, - WEB_SOCKET_HYBI_MASKING_SEND = 1 << 1, -} WebSocketHybiMaskingRequired; + WEB_SOCKET_MASKING_NONE = 0, + WEB_SOCKET_MASKING_RECV = 1, + WEB_SOCKET_MASKING_SEND = 1 << 1, +} WebSocketMaskingRequired; typedef enum { ASYNCSOCKET_TYPE_SOCKET = 0, @@ -164,7 +156,13 @@ int len; AsyncSocketSendFn sendFn; void *clientData; - char *base64Buf; + /* + * If the data needs to be encoded somehow before sending over the + * wire, this will point to an internally-allocated buffer + * containing the encoded version of buf. The len field above will + * hold the length of the encoded data. + */ + char *encodedBuf; } SendBufList; struct AsyncSocket { @@ -196,6 +194,7 @@ int recvPos; int recvLen; Bool recvCb; + Bool recvCbTimer; Bool recvFireOnPartial; SendBufList *sendBufList; @@ -203,11 +202,13 @@ int sendPos; Bool sendCb; Bool sendCbTimer; + Bool sendCbRT; Bool sendBufFull; Bool sendLowLatency; Bool sslConnected; + uint8 inIPollCb; Bool inRecvLoop; uint32 inBlockingRecv; @@ -223,34 +224,35 @@ char *origin; char *host; char *hostname; - char *protocol; char *uri; char *cookie; int version; - WebSocketHybiMaskingRequired maskingRequirements; - WebSocketFrameType currentFrameType; + WebSocketMaskingRequired maskingRequirements; + WebSocketFrameOpcode frameOpcode; WebSocketState state; void *connectClientData; // Saved error reporting values. AsyncSocketErrorFn errorFn; void *errorClientData; char *socketBuffer; // Accumulates incoming data (including framing etc.) - char *decodeBuffer; // Accumulates incoming data after removing framing and base64 decoding - int32 socketBufferWriteOffset; // Offset into socket buffer for raw incoming data. - int32 socketBufferBase64DecodeReadOffset; // Offset into socket buffer for data waiting to be base64 decoded - int32 decodeBufferBase64DecodeWriteOffset; // Offset into decode buffer for base64 decoded data - int32 decodeBufferReadOffset; // Offset into decode buffer for data to be consumed by our caller - size_t hybiFrameBytesRemaining; - Bool hybiMaskPresent; - uint8 hybiMaskBytes[4]; - uint8 hybiMaskOffset; - int streamProtocol; - size_t hybiCurrentFrameSize; - WebSocketHybiDecodeState hybiCurrentDecodeState; + char *decodeBuffer; // Accumulates incoming data after removing framing + int32 socketBufferWriteOffset; + int32 socketBufferReadOffset; + int32 decodeBufferWriteOffset; + int32 decodeBufferReadOffset; + size_t frameBytesRemaining; + size_t frameSize; + Bool maskPresent; + uint8 maskBytes[4]; + uint8 maskOffset; + const char **streamProtocols; // null terminated list of protocols + const char *streamProtocol; // points to one of the above. + WebSocketDecodeState decodeState; Bool useSSL; - Bool permitUnverifiedSSL; + SSLVerifyParam *sslVerifyParam; // Used for certificate verifications char *upgradeNonceBase64; rqContext *randomContext; + uint16 closeStatus; } webSocket; #ifdef _WIN32 @@ -340,7 +342,8 @@ #ifndef VMX86_TOOLS void AsyncSocketInitWebSocket(AsyncSocket *asock, void *clientData, - Bool useSSL); + Bool useSSL, + const char *protocols[]); #endif AsyncSocket *AsyncSocketListenImpl(struct sockaddr_storage *addr, socklen_t addrLen, @@ -349,6 +352,7 @@ AsyncSocketPollParams *pollParams, Bool isWebSock, Bool webSockUseSSL, + const char *protocols[], int *outError); AsyncSocket *AsyncSocketListenerCreate(const char *addrStr, unsigned int port, @@ -357,6 +361,7 @@ AsyncSocketPollParams *pollParams, Bool isWebSock, Bool webSockUseSSL, + const char *protocols[], int *outError); #endif // __ASYNC_SOCKET_INT_H__ diff -Nru open-vm-tools-9.10.2-2822639/lib/auth/authPosix.c open-vm-tools-10.0.0-3000743/lib/auth/authPosix.c --- open-vm-tools-9.10.2-2822639/lib/auth/authPosix.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/auth/authPosix.c 2015-09-10 07:31:38.000000000 +0000 @@ -202,12 +202,12 @@ #endif { int count; - struct pam_response *reply = calloc(num_msg, sizeof(struct pam_response)); + struct pam_response *reply = calloc(num_msg, sizeof *reply); if (!reply) { return PAM_CONV_ERR; } - + for (count = 0; count < num_msg; count++) { switch (msg[count]->msg_style) { case PAM_PROMPT_ECHO_ON: @@ -238,7 +238,7 @@ return PAM_CONV_ERR; } } - + *resp = reply; return PAM_SUCCESS; @@ -376,7 +376,7 @@ * None. * * Results: - * + * * The vmauthToken for the authenticated user, or NULL if * authentication failed. * diff -Nru open-vm-tools-9.10.2-2822639/lib/backdoor/backdoor.c open-vm-tools-10.0.0-3000743/lib/backdoor/backdoor.c --- open-vm-tools-9.10.2-2822639/lib/backdoor/backdoor.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/backdoor/backdoor.c 2015-09-10 07:31:38.000000000 +0000 @@ -49,6 +49,15 @@ #include "backdoor.h" #include "backdoorInt.h" +#ifdef USE_VALGRIND +/* + * When running under valgrind, we need to ensure we have the correct register + * state when poking the backdoor. The VALGRIND_NON_SIMD_CALLx macros are used + * to escape from the valgrind emulated CPU to the physical CPU. + */ +#include "vm_valgrind.h" +#endif + #if defined(BACKDOOR_DEBUG) && defined(USERLEVEL) #if defined(__KERNEL__) || defined(_KERNEL) #else @@ -180,6 +189,14 @@ *----------------------------------------------------------------------------- */ +#ifdef USE_VALGRIND +static void +Backdoor_InOutValgrind(uint16 tid, Backdoor_proto *myBp) +{ + Backdoor_InOut(myBp); +} +#endif + void Backdoor(Backdoor_proto *myBp) // IN/OUT { @@ -191,7 +208,11 @@ BACKDOOR_LOG(("Backdoor: before ")); BACKDOOR_LOG_PROTO_STRUCT(myBp); +#ifdef USE_VALGRIND + VALGRIND_NON_SIMD_CALL1(Backdoor_InOutValgrind, myBp); +#else Backdoor_InOut(myBp); +#endif BACKDOOR_LOG(("Backdoor: after ")); BACKDOOR_LOG_PROTO_STRUCT(myBp); @@ -215,6 +236,14 @@ *----------------------------------------------------------------------------- */ +#ifdef USE_VALGRIND +static void +BackdoorHbOutValgrind(uint16 tid, Backdoor_proto_hb *myBp) +{ + BackdoorHbOut(myBp); +} +#endif + void Backdoor_HbOut(Backdoor_proto_hb *myBp) // IN/OUT { @@ -226,7 +255,11 @@ BACKDOOR_LOG(("Backdoor_HbOut: before ")); BACKDOOR_LOG_HB_PROTO_STRUCT(myBp); +#ifdef USE_VALGRIND + VALGRIND_NON_SIMD_CALL1(BackdoorHbOutValgrind, myBp); +#else BackdoorHbOut(myBp); +#endif BACKDOOR_LOG(("Backdoor_HbOut: after ")); BACKDOOR_LOG_HB_PROTO_STRUCT(myBp); @@ -250,6 +283,14 @@ *----------------------------------------------------------------------------- */ +#ifdef USE_VALGRIND +static void +BackdoorHbInValgrind(uint16 tid, Backdoor_proto_hb *myBp) +{ + BackdoorHbIn(myBp); +} +#endif + void Backdoor_HbIn(Backdoor_proto_hb *myBp) // IN/OUT { @@ -261,7 +302,11 @@ BACKDOOR_LOG(("Backdoor_HbIn: before ")); BACKDOOR_LOG_HB_PROTO_STRUCT(myBp); +#ifdef USE_VALGRIND + VALGRIND_NON_SIMD_CALL1(BackdoorHbInValgrind, myBp); +#else BackdoorHbIn(myBp); +#endif BACKDOOR_LOG(("Backdoor_HbIn: after ")); BACKDOOR_LOG_HB_PROTO_STRUCT(myBp); diff -Nru open-vm-tools-9.10.2-2822639/lib/dict/dictll.c open-vm-tools-10.0.0-3000743/lib/dict/dictll.c --- open-vm-tools-9.10.2-2822639/lib/dict/dictll.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/dict/dictll.c 2015-09-10 07:31:38.000000000 +0000 @@ -243,7 +243,7 @@ *value = NULL; return NULL; } - + /* Find end of this line, beginning of next. */ lineEnd = memchr(buf, '\n', bufSize); if (lineEnd != NULL) { @@ -339,18 +339,18 @@ ASSERT(line); ASSERT(name); ASSERT(value); - + *line = NULL; *name = NULL; *value = NULL; - + switch (StdIO_ReadNextLine(stream, &myLine, 0, &myLineLen)) { case StdIO_Error: return 0; - + case StdIO_EOF: return 1; - + case StdIO_Success: if (DictLL_UnmarshalLine(myLine, myLineLen, line, name, value) == NULL) { @@ -386,7 +386,7 @@ Bool DictLL_MarshalLine(DynBuf *output, // IN/OUT: output buffer - char const *name, // IN: name to marshal + char const *name, // IN/OPT: name to marshal char const *value) // IN: value to marshal { size_t size; diff -Nru open-vm-tools-9.10.2-2822639/lib/dynxdr/xdrutil.c open-vm-tools-10.0.0-3000743/lib/dynxdr/xdrutil.c --- open-vm-tools-9.10.2-2822639/lib/dynxdr/xdrutil.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/dynxdr/xdrutil.c 2015-09-10 07:31:38.000000000 +0000 @@ -102,7 +102,7 @@ ASSERT(dest != NULL); xdrmem_create(&xdrs, (char *) data, dataLen, XDR_DECODE); - ret = (Bool) proc(&xdrs, dest); + ret = (Bool) proc(&xdrs, dest, 0); xdr_destroy(&xdrs); if (!ret) { diff -Nru open-vm-tools-9.10.2-2822639/lib/err/errInt.h open-vm-tools-10.0.0-3000743/lib/err/errInt.h --- open-vm-tools-9.10.2-2822639/lib/err/errInt.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/err/errInt.h 2015-09-10 07:31:38.000000000 +0000 @@ -30,8 +30,8 @@ #include "err.h" - -const char *ErrErrno2String(Err_Number errorNumber, char *buf, size_t bufSize); - +const char *ErrErrno2String(Err_Number errorNumber, + char *buf, + size_t bufSize); #endif // ifndef _ERRINT_H_ diff -Nru open-vm-tools-9.10.2-2822639/lib/file/file.c open-vm-tools-10.0.0-3000743/lib/file/file.c --- open-vm-tools-9.10.2-2822639/lib/file/file.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/file/file.c 2015-09-10 07:31:38.000000000 +0000 @@ -58,6 +58,7 @@ #include "posix.h" #include "file.h" #include "fileIO.h" +#include "util.h" #include "fileInt.h" #include "dynbuf.h" #include "base64.h" @@ -79,15 +80,15 @@ * Check if a file is accessible with the process' real user ID * * XXX - This function invokes access(), which uses the real uid, - * not the effective uid, so it probably does not do what you - * expect. Instead it should use Posix_EuidAccess(), which + * not the effective uid, so it probably does not do what you + * expect. Instead it should use Posix_EuidAccess(), which * uses the effective uid, but it's too risky to fix right now. * See PR 459242. * * Results: * TRUE file is accessible with the process' real uid * FALSE file doesn't exist or an error occured - * + * * Side effects: * None * @@ -95,7 +96,7 @@ */ Bool -File_Exists(ConstUnicode pathName) // IN: May be NULL. +File_Exists(const char *pathName) // IN: May be NULL. { return FileIO_IsSuccess(FileIO_Access(pathName, FILEIO_ACCESS_EXISTS)); } @@ -106,20 +107,20 @@ * * File_UnlinkIfExists -- * - * If the given file exists, unlink it. + * If the given file exists, unlink it. * * Results: - * Return 0 if the unlink is successful or if the file did not exist. + * Return 0 if the unlink is successful or if the file did not exist. * Otherwise return -1. * * Side effects: * May unlink the file. - * + * *---------------------------------------------------------------------- */ int -File_UnlinkIfExists(ConstUnicode pathName) // IN: +File_UnlinkIfExists(const char *pathName) // IN: { int ret = FileDeletion(pathName, TRUE); @@ -151,7 +152,7 @@ */ Bool -File_SupportsMandatoryLock(ConstUnicode pathName) // IN: file to be locked +File_SupportsMandatoryLock(const char *pathName) // IN: file to be locked { /* * For now, "know" that all ESX filesystems support mandatory locks @@ -179,7 +180,7 @@ */ Bool -File_IsDirectory(ConstUnicode pathName) // IN: +File_IsDirectory(const char *pathName) // IN: { FileData fileData; @@ -205,8 +206,8 @@ */ Bool -File_GetFilePermissions(ConstUnicode pathName, // IN: - int *mode) // OUT: file mode +File_GetFilePermissions(const char *pathName, // IN: + int *mode) // OUT: file mode { FileData fileData; @@ -255,7 +256,7 @@ */ int -File_Unlink(ConstUnicode pathName) // IN: +File_Unlink(const char *pathName) // IN: { return (FileDeletion(pathName, TRUE) == 0) ? 0 : -1; } @@ -280,7 +281,7 @@ */ int -File_UnlinkNoFollow(ConstUnicode pathName) // IN: +File_UnlinkNoFollow(const char *pathName) // IN: { return (FileDeletion(pathName, FALSE) == 0) ? 0 : -1; } @@ -303,8 +304,8 @@ */ Bool -File_CreateDirectoryEx(ConstUnicode pathName, // IN: - int mask) // IN: +File_CreateDirectoryEx(const char *pathName, // IN: + int mask) // IN: { int err = FileCreateDirectory(pathName, mask); @@ -329,7 +330,7 @@ */ Bool -File_CreateDirectory(ConstUnicode pathName) // IN: +File_CreateDirectory(const char *pathName) // IN: { return File_CreateDirectoryEx(pathName, 0777); } @@ -338,7 +339,7 @@ /* *---------------------------------------------------------------------- * - * File_EnsureDirectory -- + * File_EnsureDirectoryEx -- * * If the directory doesn't exist, creates it. If the directory * already exists, do nothing and succeed. @@ -353,9 +354,10 @@ */ Bool -File_EnsureDirectory(ConstUnicode pathName) // IN: +File_EnsureDirectoryEx(const char *pathName, // IN: + int mask) // IN: { - int err = FileCreateDirectory(pathName, 0777); + int err = FileCreateDirectory(pathName, mask); return ((err == 0) || (err == EEXIST)); } @@ -364,6 +366,30 @@ /* *---------------------------------------------------------------------- * + * File_EnsureDirectory -- + * + * If the directory doesn't exist, creates it. If the directory + * already exists, do nothing and succeed. + * + * Results: + * See above. + * + * Side effects: + * May create a directory on disk. + * + *---------------------------------------------------------------------- + */ + +Bool +File_EnsureDirectory(const char *pathName) // IN: +{ + return File_EnsureDirectoryEx(pathName, 0777); +} + + +/* + *---------------------------------------------------------------------- + * * File_DeleteEmptyDirectory -- * * Deletes the specified directory if it is empty. @@ -378,7 +404,7 @@ */ Bool -File_DeleteEmptyDirectory(ConstUnicode pathName) // IN: +File_DeleteEmptyDirectory(const char *pathName) // IN: { Bool returnValue = TRUE; @@ -634,8 +660,8 @@ */ Bool -FileLockMachineIDMatch(char *hostMachineID, // IN: - char *otherMachineID) // IN: +FileLockMachineIDMatch(const char *hostMachineID, // IN: + const char *otherMachineID) // IN: { if (strncmp(hostMachineID, "uuid=", 5) == 0) { if (strncmp(otherMachineID, "uuid=", 5) == 0) { @@ -671,7 +697,7 @@ */ Bool -File_IsEmptyDirectory(ConstUnicode pathName) // IN: +File_IsEmptyDirectory(const char *pathName) // IN: { int numFiles; @@ -712,10 +738,10 @@ */ Bool -File_IsOsfsVolumeEmpty(ConstUnicode pathName) // IN: +File_IsOsfsVolumeEmpty(const char *pathName) // IN: { int i, numFiles; - Unicode *fileList = NULL; + char **fileList = NULL; static const char vmfsSystemFilesuffix[] = ".sf"; Bool onlyVmfsSystemFilesFound = TRUE; @@ -731,7 +757,7 @@ } } - Unicode_FreeList(fileList, numFiles); + Util_FreeStringList(fileList, numFiles); return onlyVmfsSystemFilesFound; } @@ -755,7 +781,7 @@ */ Bool -File_IsFile(ConstUnicode pathName) // IN: +File_IsFile(const char *pathName) // IN: { FileData fileData; @@ -794,7 +820,7 @@ size_t actual; FileIOResult fretW; - fretR = FileIO_Read(&src, buf, sizeof(buf), &actual); + fretR = FileIO_Read(&src, buf, sizeof buf, &actual); if (!FileIO_IsSuccess(fretR) && (fretR != FILEIO_READ_ERROR_EOF)) { err = Err_Errno(); @@ -824,228 +850,6 @@ /* - *---------------------------------------------------------------------- - * - * File_CopyFromFdToName -- - * - * Copy the 'src' file to 'dstName'. - * If the 'dstName' file already exists, - * If 'dstDispose' is -1, the user is prompted for proper action. - * If 'dstDispose' is 0, retry until success (dangerous). - * If 'dstDispose' is 1, overwrite the file. - * If 'dstDispose' is 2, return the error. - * - * Results: - * TRUE on success - * FALSE on failure: if the user cancelled the operation, no message is - * appended. Otherwise messages are appended - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -Bool -File_CopyFromFdToName(FileIODescriptor src, // IN: - ConstUnicode dstName, // IN: - int dstDispose) // IN: -{ - Bool success; - Err_Number err; - FileIOResult fret; - FileIODescriptor dst; - - ASSERT(dstName); - - FileIO_Invalidate(&dst); - - fret = File_CreatePrompt(&dst, dstName, 0, dstDispose); - if (!FileIO_IsSuccess(fret)) { - err = Err_Errno(); - - if (fret != FILEIO_CANCELLED) { - Msg_Append(MSGID(File.CopyFromFdToName.create.failure) - "Unable to create a new '%s' file: %s.\n\n", - UTF8(dstName), FileIO_MsgError(fret)); - } - - Err_SetErrno(err); - - return FALSE; - } - - success = File_CopyFromFdToFd(src, dst); - - err = Err_Errno(); - - if (FileIO_Close(&dst) != 0) { - if (success) { // Report close failure when there isn't another error - err = Err_Errno(); - } - - Msg_Append(MSGID(File.CopyFromFdToName.close.failure) - "Unable to close the '%s' file: %s.\n\n", UTF8(dstName), - Msg_ErrString()); - - success = FALSE; - } - - if (!success) { - /* The copy failed: ensure the destination file is removed */ - File_Unlink(dstName); - } - - Err_SetErrno(err); - - return success; -} - - -/* - *---------------------------------------------------------------------- - * - * File_CreatePrompt -- - * - * Create the 'name' file for write access or 'access' access. - * If the 'name' file already exists, - * If 'prompt' is not -1, it is the automatic answer to the question that - * would be asked to the user if it was -1. - * - * Results: - * FILEIO_CANCELLED if the operation was cancelled by the user, otherwise - * as FileIO_Open() - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -FileIOResult -File_CreatePrompt(FileIODescriptor *file, // OUT: - ConstUnicode pathName, // IN: - int access, // IN: - int prompt) // IN: -{ - FileIOResult fret; - FileIOOpenAction action; - - ASSERT(file); - ASSERT(pathName); - - action = FILEIO_OPEN_CREATE_SAFE; - - while ((fret = FileIO_Open(file, pathName, FILEIO_OPEN_ACCESS_WRITE | access, - action)) == FILEIO_OPEN_ERROR_EXIST) { - static Msg_String const buttons[] = { - {BUTTONID(file.create.retry) "Retry"}, - {BUTTONID(file.create.overwrite) "Overwrite"}, - {BUTTONID(cancel) "Cancel"}, - {NULL} - }; - int answer; - Err_Number err = Err_Errno(); - - answer = (prompt != -1) ? prompt : Msg_Question(buttons, 2, - MSGID(File.CreatePrompt.question) - "The file '%s' already exists.\n" - "To overwrite the content of the file, select Overwrite.\n" - "To retry the operation after you have moved the file " - "to another location, select Retry.\n" - "To cancel the operation, select Cancel.\n", - UTF8(pathName)); - - Err_SetErrno(err); - - if (answer == 2) { - fret = FILEIO_CANCELLED; - break; - } - if (answer == 1) { - action = FILEIO_OPEN_CREATE_EMPTY; - } - } - - return fret; -} - - -/* - *---------------------------------------------------------------------- - * - * File_CopyFromNameToName -- - * - * Copy the 'srcName' file to 'dstName'. - * If 'srcName' doesn't exist, an error is reported - * If the 'dstName' file already exists, - * If 'dstDispose' is -1, the user is prompted for proper action. - * If 'dstDispose' is 0, retry until success (dangerous). - * If 'dstDispose' is 1, overwrite the file. - * If 'dstDispose' is 2, return the error. - * - * Results: - * TRUE on success - * FALSE on failure: if the user cancelled the operation, no message is - * appended. Otherwise messages are appended - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -Bool -File_CopyFromNameToName(ConstUnicode srcName, // IN: - ConstUnicode dstName, // IN: - int dstDispose) // IN: -{ - Bool success; - Err_Number err; - FileIOResult fret; - FileIODescriptor src; - - ASSERT(srcName); - ASSERT(dstName); - - FileIO_Invalidate(&src); - - fret = FileIO_Open(&src, srcName, FILEIO_OPEN_ACCESS_READ, FILEIO_OPEN); - if (!FileIO_IsSuccess(fret)) { - err = Err_Errno(); - - Msg_Append(MSGID(File.CopyFromNameToName.open.failure) - "Unable to open the '%s' file for read access: %s.\n\n", - UTF8(srcName), FileIO_MsgError(fret)); - - Err_SetErrno(err); - - return FALSE; - } - - success = File_CopyFromFdToName(src, dstName, dstDispose); - - err = Err_Errno(); - - if (FileIO_Close(&src) != 0) { - if (success) { // Report close failure when there isn't another error - err = Err_Errno(); - } - - Msg_Append(MSGID(File.CopyFromNameToName.close.failure) - "Unable to close the '%s' file: %s.\n\n", UTF8(srcName), - Msg_ErrString()); - - success = FALSE; - } - - Err_SetErrno(err); - - return success; -} - - -/* *----------------------------------------------------------------------------- * * FileCopyTree -- @@ -1065,8 +869,8 @@ */ static Bool -FileCopyTree(ConstUnicode srcName, // IN: - ConstUnicode dstName, // IN: +FileCopyTree(const char *srcName, // IN: + const char *dstName, // IN: Bool overwriteExisting, // IN: Bool followSymlinks) // IN: { @@ -1074,7 +878,7 @@ Bool success = TRUE; int numFiles; int i; - Unicode *fileList = NULL; + char **fileList = NULL; numFiles = File_ListDirectory(srcName, &fileList); @@ -1082,7 +886,7 @@ err = Err_Errno(); Msg_Append(MSGID(File.CopyTree.walk.failure) "Unable to access '%s' when copying files.\n\n", - UTF8(srcName)); + srcName); Err_SetErrno(err); return FALSE; @@ -1092,7 +896,7 @@ for (i = 0; i < numFiles && success; i++) { struct stat sb; - Unicode srcFilename; + char *srcFilename; srcFilename = File_PathJoin(srcName, fileList[i]); @@ -1103,7 +907,7 @@ } if (success) { - Unicode dstFilename = File_PathJoin(dstName, fileList[i]); + char *dstFilename = File_PathJoin(dstName, fileList[i]); switch (sb.st_mode & S_IFMT) { case S_IFDIR: @@ -1117,8 +921,8 @@ err = Err_Errno(); Msg_Append(MSGID(File.CopyTree.symlink.failure) "Unable to symlink '%s' to '%s': %s\n\n", - UTF8(Posix_ReadLink(srcFilename)), - UTF8(dstFilename), + Posix_ReadLink(srcFilename), + dstFilename, Err_Errno2String(err)); Err_SetErrno(err); success = FALSE; @@ -1131,7 +935,7 @@ err = Err_Errno(); Msg_Append(MSGID(File.CopyTree.copy.failure) "Unable to copy '%s' to '%s': %s\n\n", - UTF8(srcFilename), UTF8(dstFilename), + srcFilename, dstFilename, Err_Errno2String(err)); Err_SetErrno(err); success = FALSE; @@ -1140,23 +944,19 @@ break; } - Unicode_Free(dstFilename); + free(dstFilename); } else { err = Err_Errno(); Msg_Append(MSGID(File.CopyTree.stat.failure) "Unable to get information on '%s' when copying files.\n\n", - UTF8(srcFilename)); + srcFilename); Err_SetErrno(err); } - Unicode_Free(srcFilename); - } - - for (i = 0; i < numFiles; i++) { - Unicode_Free(fileList[i]); + free(srcFilename); } - free(fileList); + Util_FreeStringList(fileList, numFiles); return success; } @@ -1181,8 +981,8 @@ */ Bool -File_CopyTree(ConstUnicode srcName, // IN: - ConstUnicode dstName, // IN: +File_CopyTree(const char *srcName, // IN: + const char *dstName, // IN: Bool overwriteExisting, // IN: Bool followSymlinks) // IN: { @@ -1195,7 +995,7 @@ err = Err_Errno(); Msg_Append(MSGID(File.CopyTree.source.notDirectory) "Source path '%s' is not a directory.", - UTF8(srcName)); + srcName); Err_SetErrno(err); return FALSE; } @@ -1204,7 +1004,7 @@ err = Err_Errno(); Msg_Append(MSGID(File.CopyTree.dest.notDirectory) "Destination path '%s' is not a directory.", - UTF8(dstName)); + dstName); Err_SetErrno(err); return FALSE; } @@ -1233,9 +1033,9 @@ */ Bool -File_CopyFromFd(FileIODescriptor src, // IN: - ConstUnicode dstName, // IN: - Bool overwriteExisting) // IN: +File_CopyFromFd(FileIODescriptor src, // IN: + const char *dstName, // IN: + Bool overwriteExisting) // IN: { Bool success; Err_Number err; @@ -1255,7 +1055,7 @@ err = Err_Errno(); Msg_Append(MSGID(File.CopyFromFdToName.create.failure) - "Unable to create a new '%s' file: %s.\n\n", UTF8(dstName), + "Unable to create a new '%s' file: %s.\n\n", dstName, FileIO_MsgError(fret)); Err_SetErrno(err); @@ -1267,13 +1067,13 @@ err = Err_Errno(); - if (FileIO_Close(&dst) != 0) { + if (!FileIO_IsSuccess(FileIO_Close(&dst))) { if (success) { // Report close failure when there isn't another error err = Err_Errno(); } Msg_Append(MSGID(File.CopyFromFdToName.close.failure) - "Unable to close the '%s' file: %s.\n\n", UTF8(dstName), + "Unable to close the '%s' file: %s.\n\n", dstName, Msg_ErrString()); success = FALSE; @@ -1311,8 +1111,8 @@ */ Bool -File_Copy(ConstUnicode srcName, // IN: - ConstUnicode dstName, // IN: +File_Copy(const char *srcName, // IN: + const char *dstName, // IN: Bool overwriteExisting) // IN: { Bool success; @@ -1331,7 +1131,7 @@ Msg_Append(MSGID(File.Copy.open.failure) "Unable to open the '%s' file for read access: %s.\n\n", - UTF8(srcName), FileIO_MsgError(fret)); + srcName, FileIO_MsgError(fret)); Err_SetErrno(err); @@ -1341,14 +1141,14 @@ success = File_CopyFromFd(src, dstName, overwriteExisting); err = Err_Errno(); - - if (FileIO_Close(&src) != 0) { + + if (!FileIO_IsSuccess(FileIO_Close(&src))) { if (success) { // Report close failure when there isn't another error err = Err_Errno(); } Msg_Append(MSGID(File.Copy.close.failure) - "Unable to close the '%s' file: %s.\n\n", UTF8(srcName), + "Unable to close the '%s' file: %s.\n\n", srcName, Msg_ErrString()); success = FALSE; @@ -1373,17 +1173,17 @@ * Results: * TRUE succeeded * FALSE otherwise - * + * * Side effects: * src file is no more, but dst file exists * *---------------------------------------------------------------------- */ -Bool -File_Move(ConstUnicode oldFile, // IN: - ConstUnicode newFile, // IN: - Bool *asRename) // OUT: result occurred due to rename/copy +Bool +File_Move(const char *oldFile, // IN: + const char *newFile, // IN: + Bool *asRename) // OUT/OPT: result occurred due to rename/copy { Bool ret; Bool duringRename; @@ -1441,10 +1241,10 @@ */ Bool -File_MoveTree(ConstUnicode srcName, // IN: - ConstUnicode dstName, // IN: +File_MoveTree(const char *srcName, // IN: + const char *dstName, // IN: Bool overwriteExisting, // IN: - Bool *asMove) // OUT: + Bool *asMove) // OUT/OPT: { Bool ret = FALSE; Bool createdDir = FALSE; @@ -1459,7 +1259,7 @@ if (!File_IsDirectory(srcName)) { Msg_Append(MSGID(File.MoveTree.source.notDirectory) "Source path '%s' is not a directory.", - UTF8(srcName)); + srcName); return FALSE; } @@ -1479,7 +1279,7 @@ if (ENOENT == err) { if (!File_CreateDirectoryHierarchy(dstName, NULL)) { Msg_Append(MSGID(File.MoveTree.dst.couldntCreate) - "Could not create '%s'.\n\n", UTF8(dstName)); + "Could not create '%s'.\n\n", dstName); return FALSE; } @@ -1488,7 +1288,7 @@ } else { Msg_Append(MSGID(File.MoveTree.statFailed) "%d:Failed to stat destination '%s'.\n\n", - err, UTF8(dstName)); + err, dstName); return FALSE; } @@ -1496,7 +1296,7 @@ if (!File_IsDirectory(dstName)) { Msg_Append(MSGID(File.MoveTree.dest.notDirectory) "The destination path '%s' is not a directory.\n\n", - UTF8(dstName)); + dstName); return FALSE; } @@ -1518,7 +1318,7 @@ srcSize = File_GetSizeEx(srcName); freeSpace = File_GetFreeSpace(dstName, TRUE); if (freeSpace < srcSize) { - Unicode spaceStr = Msg_FormatSizeInBytes(srcSize); + char *spaceStr = Msg_FormatSizeInBytes(srcSize); Msg_Append(MSGID(File.MoveTree.dst.insufficientSpace) "There is not enough space in the file system to " "move the directory tree. Free %s and try again.", @@ -1536,14 +1336,14 @@ Msg_Append(MSGID(File.MoveTree.cleanupFailed) "Forced to copy '%s' into '%s' but unable to remove " "source directory.\n\n", - UTF8(srcName), UTF8(dstName)); + srcName, dstName); } } else { ret = FALSE; Msg_Append(MSGID(File.MoveTree.copyFailed) "Could not rename and failed to copy source directory " "'%s'.\n\n", - UTF8(srcName)); + srcName); if (createdDir) { /* * Only clean up if we created the directory. Not attempting to @@ -1563,14 +1363,14 @@ * * File_GetModTimeString -- * - * Returns a human-readable string denoting the last modification + * Returns a human-readable string denoting the last modification * time of a file. * ctime() returns string terminated with newline, which we replace * with a '\0'. * * Results: * Last modification time string on success, NULL on error. - * + * * Side effects: * None. * @@ -1578,7 +1378,7 @@ */ char * -File_GetModTimeString(ConstUnicode pathName) // IN: +File_GetModTimeString(const char *pathName) // IN: { int64 modTime; @@ -1605,7 +1405,7 @@ */ int64 -File_GetSize(ConstUnicode pathName) // IN: +File_GetSize(const char *pathName) // IN: { int64 ret; @@ -1649,7 +1449,7 @@ */ Bool -File_SupportsLargeFiles(ConstUnicode pathName) // IN: +File_SupportsLargeFiles(const char *pathName) // IN: { return File_SupportsFileSize(pathName, CONST64U(0x100000000)); } @@ -1673,11 +1473,11 @@ */ int64 -File_GetSizeEx(ConstUnicode pathName) // IN +File_GetSizeEx(const char *pathName) // IN: { int numFiles; int i; - Unicode *fileList = NULL; + char **fileList = NULL; struct stat sb; int64 totalSize = 0; @@ -1700,14 +1500,14 @@ } for (i = 0; i < numFiles; i++) { - Unicode fileName; + char *fileName; int64 fileSize; fileName = File_PathJoin(pathName, fileList[i]); fileSize = File_GetSizeEx(fileName); - Unicode_Free(fileName); + free(fileName); if (-1 == fileSize) { totalSize = -1; @@ -1717,9 +1517,7 @@ } } - if (numFiles >= 0) { - Unicode_FreeList(fileList, numFiles); - } + Util_FreeStringList(fileList, numFiles); return totalSize; } @@ -1742,7 +1540,7 @@ */ int64 -File_GetSizeByPath(ConstUnicode pathName) // IN: +File_GetSizeByPath(const char *pathName) // IN: { return (pathName == NULL) ? -1 : FileIO_GetSizeByPath(pathName); } @@ -1766,7 +1564,7 @@ * Otherwise *topmostCreated is set to the topmost directory which was * created. *topmostCreated is set even in case of failure. * - * The caller most Unicode_Free the resulting string. + * The caller most free the resulting string. * * Side effects: * Only the obvious. @@ -1775,11 +1573,11 @@ */ Bool -File_CreateDirectoryHierarchyEx(ConstUnicode pathName, // IN: - int mask, // IN - Unicode *topmostCreated) // OUT: +File_CreateDirectoryHierarchyEx(const char *pathName, // IN: + int mask, // IN: + char **topmostCreated) // OUT/OPT: { - Unicode volume; + char *volume; UnicodeIndex index; UnicodeIndex length; @@ -1805,7 +1603,7 @@ index = Unicode_LengthInCodePoints(volume); - Unicode_Free(volume); + free(volume); if (index >= length) { return File_IsDirectory(pathName); @@ -1817,23 +1615,33 @@ while (TRUE) { Bool failed; - Unicode temp; + char *temp; index = FileFirstSlashIndex(pathName, index + 1); - temp = Unicode_Substr(pathName, 0, (index == UNICODE_INDEX_NOT_FOUND) ? -1 : index); + temp = Unicode_Substr(pathName, + 0, + (index == UNICODE_INDEX_NOT_FOUND) ? -1 : index); - if (File_IsDirectory(temp)) { - failed = FALSE; - } else { - failed = !File_CreateDirectoryEx(temp, mask); - if (!failed && topmostCreated != NULL && *topmostCreated == NULL) { - *topmostCreated = temp; - temp = NULL; + /* + * If we check if the directory already exists and then we create it, + * there is a race between these two operations - that might cause this + * operation to fail with no reason. + * This is why we reverse the attempt and the check. + */ + + failed = !File_CreateDirectoryEx(temp, mask); + + if (failed) { + if (File_IsDirectory(temp)) { + failed = FALSE; } + } else if (topmostCreated != NULL && *topmostCreated == NULL) { + *topmostCreated = temp; + temp = NULL; } - Unicode_Free(temp); + free(temp); if (failed) { return FALSE; @@ -1867,7 +1675,7 @@ * Otherwise *topmostCreated is set to the topmost directory which was * created. *topmostCreated is set even in case of failure. * - * The caller most Unicode_Free the resulting string. + * The caller most free the resulting string. * * Side effects: * Only the obvious. @@ -1876,43 +1684,44 @@ */ Bool -File_CreateDirectoryHierarchy(ConstUnicode pathName, // IN: - Unicode *topmostCreated) // OUT: +File_CreateDirectoryHierarchy(const char *pathName, // IN: + char **topmostCreated) // OUT/OPT: { return File_CreateDirectoryHierarchyEx(pathName, 0777, topmostCreated); } - /* *---------------------------------------------------------------------- * - * File_DeleteDirectoryTree -- + * FileDeleteDirectoryTree -- * * Deletes the specified directory tree. If filesystem errors are * encountered along the way, the function will continue to delete what - * it can but will return FALSE. + * it can but will return FALSE. If contentOnly is TRUE it does not + * delete the directory itself. * * Results: * TRUE the entire tree was deleted or didn't exist * FALSE otherwise. - * + * * Side effects: * Deletes the directory tree from disk. * *---------------------------------------------------------------------- */ -Bool -File_DeleteDirectoryTree(ConstUnicode pathName) // IN: directory to delete +static INLINE Bool +FileDeleteDirectoryTree(const char *pathName, // IN: directory to delete + Bool contentOnly) // IN: Content only or not { int i; int numFiles; int err = 0; - Unicode base; + char *base; - Unicode *fileList = NULL; + char **fileList = NULL; Bool sawFileError = FALSE; if (Posix_EuidAccess(pathName, F_OK) != 0) { @@ -1949,7 +1758,7 @@ base = Unicode_Append(pathName, DIRSEPS); for (i = 0; i < numFiles; i++) { - Unicode curPath; + char *curPath; struct stat statbuf; curPath = Unicode_Append(base, fileList[i]); @@ -1958,7 +1767,7 @@ switch (statbuf.st_mode & S_IFMT) { case S_IFDIR: /* Directory, recurse */ - if (!File_DeleteDirectoryTree(curPath)) { + if (!FileDeleteDirectoryTree(curPath, FALSE)) { sawFileError = TRUE; } break; @@ -1992,30 +1801,80 @@ sawFileError = TRUE; } - Unicode_Free(curPath); + free(curPath); } - Unicode_Free(base); - - /* - * Call File_DeleteEmptyDirectory() only if there is no prior error - * while deleting the children. - */ - if (!sawFileError && !File_DeleteEmptyDirectory(pathName)) { - sawFileError = TRUE; - } + free(base); - for (i = 0; i < numFiles; i++) { - Unicode_Free(fileList[i]); + if (!contentOnly) { + /* + * Call File_DeleteEmptyDirectory() only if there is no prior error + * while deleting the children. + */ + if (!sawFileError && !File_DeleteEmptyDirectory(pathName)) { + sawFileError = TRUE; + } } - free(fileList); + Util_FreeStringList(fileList, numFiles); return !sawFileError; } /* + *---------------------------------------------------------------------- + * + * File_DeleteDirectoryContent -- + * + * Deletes the specified directory content. If filesystem errors are + * encountered along the way, the function will continue to delete what + * it can but will return FALSE. + * + * Results: + * TRUE the entire content was deleted or there were no files and the + * directoy was empty + * FALSE otherwise. + * + * Side effects: + * Deletes the directory content from disk. + * + *---------------------------------------------------------------------- + */ + +Bool +File_DeleteDirectoryContent(const char *pathName) // IN: directory to delete +{ + return FileDeleteDirectoryTree(pathName, TRUE); +} + + +/* + *---------------------------------------------------------------------- + * + * File_DeleteDirectoryTree -- + * + * Deletes the specified directory tree. If filesystem errors are + * encountered along the way, the function will continue to delete what + * it can but will return FALSE. + * + * Results: + * TRUE the entire tree was deleted or didn't exist + * FALSE otherwise. + * + * Side effects: + * Deletes the directory tree from disk. + * + *---------------------------------------------------------------------- + */ + +Bool +File_DeleteDirectoryTree(const char *pathName) // IN: directory to delete +{ + return FileDeleteDirectoryTree(pathName, FALSE); +} + +/* *----------------------------------------------------------------------------- * * File_FindFileInSearchPath -- @@ -2037,7 +1896,7 @@ File_FindFileInSearchPath(const char *fileIn, // IN: const char *searchPath, // IN: const char *cwd, // IN: - char **result) // OUT: + char **result) // OUT/OPT: { char *cur; char *tok; @@ -2045,8 +1904,8 @@ Bool full; char *saveptr = NULL; char *sp = NULL; - Unicode dir = NULL; - Unicode file = NULL; + char *dir = NULL; + char *file = NULL; ASSERT(fileIn); ASSERT(cwd); @@ -2141,8 +2000,8 @@ } free(sp); - Unicode_Free(dir); - Unicode_Free(file); + free(dir); + free(file); return found; } @@ -2275,7 +2134,7 @@ msecActualSleepTime = msecMinSleepTime + (uint32) (fpRand * variance); } - usleep(1000 * msecActualSleepTime); + Util_Usleep(1000 * msecActualSleepTime); return msecActualSleepTime; } @@ -2482,12 +2341,10 @@ } } - if (newFilePath != NULL) { - if (result == -1) { - free(tmp); - } else { - *newFilePath = tmp; - } + if (newFilePath == NULL || result == -1) { + free(tmp); + } else { + *newFilePath = tmp; } if (nFound >= n) { @@ -2544,6 +2401,8 @@ size_t baseLen; char *baseName; + ASSERT(fileName); + if ((ext = Str_Strrchr(fileName, '.')) == NULL) { ext = fileName + strlen(fileName); } @@ -2586,8 +2445,8 @@ *----------------------------------------------------------------------------- */ -int -File_GetFSMountInfo(ConstUnicode pathName, +int +File_GetFSMountInfo(const char *pathName, char **fsType, uint32 *version, char **remoteIP, @@ -2598,7 +2457,7 @@ return File_GetVMFSMountInfo(pathName, fsType, version, remoteIP, remoteMountPoint, localMountPoint); -#else +#else return -1; #endif } diff -Nru open-vm-tools-9.10.2-2822639/lib/file/fileInt.h open-vm-tools-10.0.0-3000743/lib/file/fileInt.h --- open-vm-tools-9.10.2-2822639/lib/file/fileInt.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/file/fileInt.h 2015-09-10 07:31:38.000000000 +0000 @@ -119,24 +119,24 @@ uint32 numCodes, DWORD *codes); -int FileAttributesRetry(ConstUnicode pathName, +int FileAttributesRetry(const char *pathName, uint32 msecMaxWaitTime, FileData *fileData); -int FileDeletionRetry(ConstUnicode pathName, +int FileDeletionRetry(const char *pathName, Bool handleLink, uint32 msecMaxWaitTime); -int FileCreateDirectoryRetry(ConstUnicode pathName, +int FileCreateDirectoryRetry(const char *pathName, int mask, uint32 msecMaxWaitTime); -int FileRemoveDirectoryRetry(ConstUnicode pathName, +int FileRemoveDirectoryRetry(const char *pathName, uint32 msecMaxWaitTime); -int FileListDirectoryRetry(ConstUnicode pathName, +int FileListDirectoryRetry(const char *pathName, uint32 msecMaxWaitTime, - Unicode **ids); + char ***ids); #define FileAttributes(a, b) FileAttributesRetry((a), 0, (b)) #define FileDeletion(a, b) FileDeletionRetry((a), (b), 0) @@ -165,16 +165,16 @@ char *FilePosixGetBlockDevice(char const *path); -int FileAttributes(ConstUnicode pathName, +int FileAttributes(const char *pathName, FileData *fileData); -int FileDeletion(ConstUnicode pathName, +int FileDeletion(const char *pathName, Bool handleLink); -int FileCreateDirectory(ConstUnicode pathName, +int FileCreateDirectory(const char *pathName, int mask); -int FileRemoveDirectory(ConstUnicode pathName); +int FileRemoveDirectory(const char *pathName); #define FileListDirectoryRobust(a, b) File_ListDirectory((a), (b)) #define FileAttributesRobust(a, b) FileAttributes((a), (b)) @@ -189,7 +189,7 @@ struct active_lock *next; uint32 age; Bool marked; - Unicode dirName; + char *dirName; } ActiveLock; typedef struct lock_values @@ -198,7 +198,7 @@ char *executionID; char *lockType; char *locationChecksum; - Unicode memberName; + char *memberName; unsigned int lamportNumber; Bool exclusivity; uint32 waitTime; @@ -221,40 +221,40 @@ char *FileLockGetExecutionID(void); -Bool FileLockMachineIDMatch(char *host, - char *second); +Bool FileLockMachineIDMatch(const char *host, + const char *second); -int FileLockMemberValues(ConstUnicode lockDir, - ConstUnicode fileName, +int FileLockMemberValues(const char *lockDir, + const char *fileName, char *buffer, size_t size, LockValues *memberValues); -FileLockToken *FileLockIntrinsic(ConstUnicode filePathName, +FileLockToken *FileLockIntrinsic(const char *filePathName, Bool exclusivity, uint32 msecMaxWaitTime, int *err); int FileUnlockIntrinsic(FileLockToken *tokenPtr); -Bool FileLockIsLocked(ConstUnicode filePath, +Bool FileLockIsLocked(const char *filePath, int *err); Bool FileLockValidExecutionID(const char *executionID); -Bool FileLockValidName(ConstUnicode fileName); +Bool FileLockValidName(const char *fileName); void FileLockAppendMessage(MsgList **msgs, int err); -Bool FileIsWritableDir(ConstUnicode dirName); +Bool FileIsWritableDir(const char *dirName); -UnicodeIndex FileFirstSlashIndex(ConstUnicode pathName, +UnicodeIndex FileFirstSlashIndex(const char *pathName, UnicodeIndex startIndex); FileIOResult FileIOCreateRetry(FileIODescriptor *fd, - ConstUnicode pathName, + const char *pathName, int access, FileIOOpenAction action, int mode, @@ -314,7 +314,7 @@ } #if defined(__APPLE__) -int PosixFileOpener(ConstUnicode pathName, +int PosixFileOpener(const char *pathName, int flags, mode_t mode); #else diff -Nru open-vm-tools-9.10.2-2822639/lib/file/fileIO.c open-vm-tools-10.0.0-3000743/lib/file/fileIO.c --- open-vm-tools-9.10.2-2822639/lib/file/fileIO.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/file/fileIO.c 2015-09-10 07:31:38.000000000 +0000 @@ -111,7 +111,7 @@ * because you don't want to display error messages after a user has * cancelled an operation. */ - result = MSGID(fileio.cancel) "The operation was canceled by the user"; + result = MSGID(fileio.cancel) "The operation was cancelled by the user"; break; case FILEIO_ERROR: @@ -198,8 +198,8 @@ */ void -FileIO_Init(FileIODescriptor *fd, // IN/OUT: - ConstUnicode pathName) // IN: +FileIO_Init(FileIODescriptor *fd, // IN/OUT: + const char *pathName) // IN: { ASSERT(fd); ASSERT(pathName); @@ -231,7 +231,7 @@ ASSERT(fd); if (fd->fileName) { - Unicode_Free(fd->fileName); + free(fd->fileName); fd->fileName = NULL; } } @@ -341,7 +341,7 @@ if (file->lockToken == NULL) { /* Describe the lock not acquired situation in detail */ Warning(LGPFX" %s on '%s' failed: %s\n", - __FUNCTION__, UTF8(file->fileName), + __FUNCTION__, file->fileName, (err == 0) ? "Lock timed out" : strerror(err)); /* Return a serious failure status if the locking code did */ @@ -400,7 +400,7 @@ if (!FileLock_Unlock(file->lockToken, &err, NULL)) { Warning(LGPFX" %s on '%s' failed: %s\n", - __FUNCTION__, UTF8(file->fileName), strerror(err)); + __FUNCTION__, file->fileName, strerror(err)); ret = FILEIO_ERROR; } @@ -446,7 +446,7 @@ * * FileIO_GetSizeByPath -- * - * Get size of a file specified by path. + * Get size of a file specified by path. * * Results: * Size of file or -1. @@ -458,7 +458,7 @@ */ int64 -FileIO_GetSizeByPath(ConstUnicode pathName) // IN: +FileIO_GetSizeByPath(const char *pathName) // IN: { int64 logicalBytes; @@ -485,7 +485,7 @@ *---------------------------------------------------------------------- */ -ConstUnicode +const char * FileIO_Filename(FileIODescriptor *fd) // IN: { ASSERT(fd); @@ -502,8 +502,9 @@ * Closes and unlinks the file associated with a FileIODescriptor. * * Results: - * TRUE: An error occurred. - * FALSE: The file was closed and unlinked. + * FILEIO_SUCCESS: The file was closed and unlinked. The FileIODescriptor + * is no longer valid. + * FILEIO_ERROR: An error occurred. * * Side effects: * File is probably closed and unlinked. @@ -511,11 +512,11 @@ *---------------------------------------------------------------------- */ -Bool +FileIOResult FileIO_CloseAndUnlink(FileIODescriptor *fd) // IN: { - Unicode path; - Bool ret; + char *path; + FileIOResult ret; ASSERT(fd); ASSERT(FileIO_IsValid(fd)); @@ -523,13 +524,13 @@ path = Unicode_Duplicate(fd->fileName); ret = FileIO_Close(fd); - if (!ret) { + if (FileIO_IsSuccess(ret)) { if (File_UnlinkIfExists(path) == -1) { - ret = TRUE; + ret = FILEIO_ERROR; } } - Unicode_Free(path); + free(path); return ret; } @@ -648,7 +649,7 @@ * The caller must free the path when done. * * Results: - * Unicode path if successful, NULL on failure. + * UTF8 path if successful, NULL on failure. * * Side effects: * None. @@ -656,11 +657,11 @@ *----------------------------------------------------------------------------- */ -Unicode -FileIO_AtomicTempPath(ConstUnicode path) // IN: +char * +FileIO_AtomicTempPath(const char *path) // IN: { - Unicode srcPath; - Unicode retPath; + char *srcPath; + char *retPath; srcPath = File_FullPath(path); if (!srcPath) { @@ -668,7 +669,7 @@ return NULL; } retPath = Unicode_Join(srcPath, "~", NULL); - Unicode_Free(srcPath); + free(srcPath); return retPath; } @@ -679,7 +680,7 @@ * * FileIO_AtomicTempFile * - * Create a temp file in the same directory as the argument file. + * Create a temp file in the same directory as the argument file. * On non-Windows attempts to create the temp file with the same * permissions and owner/group as the argument file. * @@ -696,7 +697,7 @@ FileIO_AtomicTempFile(FileIODescriptor *fileFD, // IN: FileIODescriptor *tempFD) // OUT: { - Unicode tempPath = NULL; + char *tempPath = NULL; int permissions; FileIOResult status; #if !defined(_WIN32) @@ -769,7 +770,7 @@ } #endif - Unicode_Free(tempPath); + free(tempPath); return FILEIO_SUCCESS; bail: @@ -787,7 +788,7 @@ ASSERT(ret == 0); #endif } - Unicode_Free(tempPath); + free(tempPath); return status; } @@ -864,20 +865,20 @@ File_GetPathName(newPath, &dirName, &fileName); File_GetPathName(currPath, &dstDirName, &dstFileName); - ASSERT(dirName && *dirName); + ASSERT(dirName); ASSERT(fileName && *fileName); - ASSERT(dstDirName && *dstDirName); + ASSERT(dstDirName); ASSERT(dstFileName && *dstFileName); - ASSERT(!strcmp(dirName, dstDirName)); + ASSERT(File_IsSameFile(dirName, dstDirName)); - args = (FS_SwapFilesArgs *) Util_SafeCalloc(1, sizeof(*args)); - if (Str_Snprintf(args->srcFile, sizeof(args->srcFile), "%s", + args = Util_SafeCalloc(1, sizeof *args); + if (Str_Snprintf(args->srcFile, sizeof args->srcFile, "%s", fileName) < 0) { Log("%s: Path too long \"%s\".\n", __FUNCTION__, fileName); savedErrno = ENAMETOOLONG; goto swapdone; } - if (Str_Snprintf(args->dstFilePath, sizeof(args->dstFilePath), "%s/%s", + if (Str_Snprintf(args->dstFilePath, sizeof args->dstFilePath, "%s/%s", dstDirName, dstFileName) < 0) { Log("%s: Path too long \"%s\".\n", __FUNCTION__, dstFileName); savedErrno = ENAMETOOLONG; @@ -889,6 +890,12 @@ * because the file could be open. */ + if (!*dirName) { + /* need a proper root directory string for Posix_Open() */ + free(dirName); + dirName = Util_SafeStrdup("/"); + } + fd = Posix_Open(dirName, O_RDONLY); if (fd < 0) { Log("%s: Open failed \"%s\" %d.\n", __FUNCTION__, dirName, errno); @@ -1007,8 +1014,8 @@ currFD->win32 = tmpFD.win32; FileIO_Cleanup(&tmpFD); - Unicode_Free(currPath); - Unicode_Free(newPath); + free(currPath); + free(newPath); errno = savedErrno; return ret; diff -Nru open-vm-tools-9.10.2-2822639/lib/file/fileIOPosix.c open-vm-tools-10.0.0-3000743/lib/file/fileIOPosix.c --- open-vm-tools-9.10.2-2822639/lib/file/fileIOPosix.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/file/fileIOPosix.c 2015-09-10 07:31:38.000000000 +0000 @@ -23,9 +23,12 @@ */ -#if !defined(VMX86_TOOLS) && !defined(__APPLE__) && !defined(sun) -#define FILEIO_SUPPORT_ODIRECT -#define _GNU_SOURCE +#if defined(__linux__) +# if !defined(VMX86_TOOLS) && !defined(__ANDROID__) +# define FILEIO_SUPPORT_ODIRECT +# define _GNU_SOURCE +# endif +# include #endif #include @@ -39,28 +42,13 @@ #include #include #include -#if defined(linux) -/* - * These headers are needed to get __USE_LARGEFILE, __USE_LARGEFILE64, - * and SYS__llseek. - */ -# ifdef ANDROID_X86 -# undef _GNU_SOURCE -# endif -# include -# ifndef _GNU_SOURCE -# define _GNU_SOURCE -# endif -# include +#if defined(__linux__) #ifdef __ANDROID__ # include #else # include #endif #endif -#if defined __ANDROID__ -# include -#endif #include #include "su.h" @@ -83,7 +71,7 @@ #include #else #include -#if !defined(sun) +#if !defined(__sun__) #include #include #endif @@ -217,13 +205,18 @@ * are not available in any header file. */ -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) + /* + * We want preadv/pwritev. But due to FOB=64, the symbols are -64. + * TODO: when the baseline bumps to XOPEN=700, link directly to + * the symbols (and anyone building XOPEN<700 gets nothing). + */ extern ssize_t preadv64(int fd, const struct iovec *iov, int iovcnt, - off64_t offset) __attribute__ ((weak)); - + __off64_t offset) __attribute__ ((weak)); + extern ssize_t pwritev64(int fd, const struct iovec *iov, int iovcnt, - off64_t offset) __attribute__ ((weak)); + __off64_t offset) __attribute__ ((weak)); #else #error "Large file support unavailable. Aborting." #endif @@ -480,8 +473,8 @@ */ Bool -FileIO_GetVolumeSectorSize(ConstUnicode pathName, // IN: - uint32 *sectorSize) // OUT: +FileIO_GetVolumeSectorSize(const char *pathName, // IN: + uint32 *sectorSize) // OUT: { ASSERT(sectorSize); @@ -599,7 +592,7 @@ if (msg.msg_controllen == 0) { *recv_fd = -1; } else { - cmsg = CMSG_FIRSTHDR(&msg); + cmsg = CMSG_FIRSTHDR(&msg); if ((cmsg->cmsg_level == SOL_SOCKET) && (cmsg->cmsg_type == SCM_RIGHTS)) { @@ -630,9 +623,9 @@ */ static int -ProxyOpen(ConstUnicode pathName, // IN: - int flags, // IN: - int mode) // IN: +ProxyOpen(const char *pathName, // IN: + int flags, // IN: + int mode) // IN: { int err; pid_t pid; @@ -700,10 +693,10 @@ */ static int -ProxyUse(ConstUnicode pathName, // IN: - Bool *useProxy) // IN: +ProxyUse(const char *pathName, // IN: + Bool *useProxy) // IN: { - Unicode path; + char *path; UnicodeIndex index; struct statfs sfbuf; struct stat statbuf; @@ -729,11 +722,11 @@ if (index == UNICODE_INDEX_NOT_FOUND) { path = Unicode_Duplicate("."); } else { - Unicode temp; + char *temp; temp = Unicode_Substr(pathName, 0, index + 1); path = Unicode_Append(temp, "."); - Unicode_Free(temp); + free(temp); } /* @@ -755,7 +748,7 @@ *useProxy = TRUE; } - Unicode_Free(path); + free(path); return 0; } @@ -784,9 +777,9 @@ */ int -PosixFileOpener(ConstUnicode pathName, // IN: - int flags, // IN: - mode_t mode) // IN: +PosixFileOpener(const char *pathName, // IN: + int flags, // IN: + mode_t mode) // IN: { Bool useProxy; @@ -795,8 +788,8 @@ /* * Open for write and/or O_CREAT. Determine proxy usage. - */ - + */ + err = ProxyUse(pathName, &useProxy); if (err != 0) { errno = err; @@ -839,7 +832,7 @@ FileIOResult FileIOCreateRetry(FileIODescriptor *file, // OUT: - ConstUnicode pathName, // IN: + const char *pathName, // IN: int access, // IN: FileIOOpenAction action, // IN: int mode, // IN: mode_t for creation @@ -924,7 +917,7 @@ #elif !defined(__APPLE__) // Mac hosts need this access flag after opening. access &= ~FILEIO_OPEN_UNBUFFERED; LOG_ONCE((LGPFX" %s reverting to buffered IO on %s.\n", - __FUNCTION__, UTF8(pathName))); + __FUNCTION__, pathName)); #endif } @@ -942,7 +935,7 @@ } #endif -#if defined(linux) +#if defined(__linux__) if (access & FILEIO_OPEN_SYNC) { flags |= O_SYNC; } @@ -1053,7 +1046,7 @@ FileIOResult FileIO_Create(FileIODescriptor *file, // OUT: - ConstUnicode pathName, // IN: + const char *pathName, // IN: int access, // IN: FileIOOpenAction action, // IN: int mode) // IN: mode_t for creation @@ -1083,7 +1076,7 @@ FileIOResult FileIO_Open(FileIODescriptor *file, // OUT: - ConstUnicode pathName, // IN: + const char *pathName, // IN: int access, // IN: FileIOOpenAction action) // IN: { @@ -1113,43 +1106,36 @@ FileIOResult FileIO_OpenRetry(FileIODescriptor *file, // OUT: - ConstUnicode pathName, // IN: + const char *pathName, // IN: int access, // IN: FileIOOpenAction action, // IN: uint32 msecMaxWaitTime) // IN: { #if defined(VMX86_SERVER) FileIOResult res; - int retries = 10; + uint32 msecWaitTime = 0; + uint32 msecMaxLoopTime = 3000; // 3 seconds /* * Workaround the ESX NFS client bug as seen in PR 1341775. - * Since ESX NFS client can sometimes *wrongly* return ESTALE for - * legitimate file open case, we retry a few times in case we hit - * that problem. + * Since ESX NFS client can sometimes *wrongly* return ESTALE for a + * legitimate file open case, we retry for some time in hopes that the + * problem will resolve itself. */ - while (retries-- > 0) { + + while (TRUE) { res = FileIOCreateRetry(file, pathName, access, action, S_IRUSR | S_IWUSR, msecMaxWaitTime); - if (res == FILEIO_ERROR && Err_Errno() == ESTALE) { - /* - * 300 msec * 10 retries, gives us 3 secs of retry. This should - * be good enough as the ESTALE seen in PR 1341775 is due to a - * tiny race where another host is atomically swapping the file, - * and causing the file to be temporarily unlinked, while this host - * tries to open it. It should be very short lived. - */ - if (retries > 0) { - Log(LGPFX "FileIOCreateRetry (%s) failed with ESTALE, retrying, " - "retries left (#%d)\n", UTF8(pathName), retries); - Util_Usleep(300 * 1000); - continue; - } else { - Log(LGPFX "Failing FileIO_OpenRetry (%s) with ESTALE!\n", - UTF8(pathName)); - } + + if (res == FILEIO_ERROR && Err_Errno() == ESTALE && + msecWaitTime < msecMaxLoopTime) { + Log(LGPFX "FileIOCreateRetry (%s) failed with ESTALE, retrying.\n", + pathName); + + msecWaitTime += FileSleeper(100, 300); + } else { + break; } - break; } return res; @@ -1179,25 +1165,6 @@ *---------------------------------------------------------------------- */ -#if defined(linux) && defined(SYS__llseek) -/* - * If the llseek system call exists, use it to provide a version of 64-bit - * lseek() functionality, for FileIO_Seek() to use if appropriate. - */ - -#define VM_HAVE__LLSEEK 1 - -static INLINE int -_llseek(unsigned int fd, - unsigned long offset_high, - unsigned long offset_low, - loff_t * result, - unsigned int whence) -{ - return syscall(SYS__llseek, fd, offset_high, offset_low, result, whence); -} -#endif - uint64 FileIO_Seek(const FileIODescriptor *file, // IN: int64 distance, // IN: @@ -1205,57 +1172,19 @@ { ASSERT(file); +#if defined(__ANDROID__) /* - * The goal is to use the best lseek-type function with support for 64-bit - * file offsets (aka large file support, or LFS). - * - * __USE_LARGEFILE implies that lseek() has LFS - * VM_HAVE__LLSEEK tells us that we have the _llseek() routine available - * __USE_LARGEFILE64 implies that lseek64() is available - * - * All three of these defines only come into play on Linux systems. On any - * other OS, they won't be present, and we go straight for lseek() since - * that's the only known alternative. - */ -#if defined(VM_HAVE__LLSEEK) && !defined(__USE_LARGEFILE) && !defined(__USE_LARGEFILE64) - /* - * This is a Linux system that doesn't have a glibc with any large-file - * support (LFS), but does have the llseek system call. On Linux, this is - * the least desirable option because the API is a bit grotty (e.g. the - * casting of negative offsets into unsigned offset_hi and offset_lo), and - * because doing system calls directly from our code is more likely to - * break than using libc. + * Android doesn't implement _FILE_OFFSET_BITS=64, but always has lseek64. */ - - loff_t res; - - if (_llseek(file->posix, distance >> 32, distance & 0xFFFFFFFF, - &res, FileIO_SeekOrigins[origin]) == -1) { - res = -1; - } - - return res; -#elif defined(__USE_LARGEFILE64) && !defined(__USE_LARGEFILE) + return lseek64(file->posix, distance, FileIO_SeekOrigins[origin]); +#else /* - * This is a Linux system with glibc that has lseek64 available, but not a - * lseek with LFS. - * - * lseek64 is a bit cleaner than _llseek (because glibc provides it, we - * know the API won't break) but still not as portable as plain old lseek. + * Require 64-bit file API support via _FILE_OFFSET_BITS=64 or + * operating system default. */ + ASSERT_ON_COMPILE(sizeof(off_t) == 8); - return lseek64(file->posix, distance, FileIO_SeekOrigins[origin]); -#else - /* - * We're taking this route because either we know lseek() can support - * 64-bit file offsets (__USE_LARGEFILE is set) or because llseek and - * lseek64 are both unavailable. - * - * This means this a Linux/glibc system with transparent LFS support, an - * old Linux system without llseek, or another POSIX system. - */ - - return lseek(file->posix, distance, FileIO_SeekOrigins[origin]); + return lseek(file->posix, distance, FileIO_SeekOrigins[origin]); #endif } @@ -1336,7 +1265,7 @@ * * Results: * FILEIO_SUCCESS on success: '*actual_count' = 'requested' bytes have - * been read. + * been read. * FILEIO_READ_ERROR_EOF if the end of the file was reached: only * '*actual_count' bytes have been read for sure. * FILEIO_ERROR for other errors: only '*actual_count' bytes have been @@ -1429,8 +1358,9 @@ * Close a file * * Results: - * TRUE: an error occured - * FALSE: no error occured + * FILEIO_SUCCESS: The file was closed and unlinked. The FileIODescriptor + * is no longer valid. + * FILEIO_ERROR: An error occurred. * * Side effects: * None @@ -1438,7 +1368,7 @@ *---------------------------------------------------------------------- */ -Bool +FileIOResult FileIO_Close(FileIODescriptor *file) // IN: { int err; @@ -1456,7 +1386,7 @@ errno = err; } - return err != 0; + return (err == 0) ? FILEIO_SUCCESS : FILEIO_ERROR; } @@ -1468,8 +1398,8 @@ * Synchronize the disk state of a file with its memory state * * Results: - * On success: 0 - * On failure: -1 + * On success: FILEIO_SUCCESS + * On failure: FILEIO_ERROR * * Side effects: * None @@ -1477,12 +1407,12 @@ *---------------------------------------------------------------------- */ -int +FileIOResult FileIO_Sync(const FileIODescriptor *file) // IN: { ASSERT(file); - return fsync(file->posix); + return (fsync(file->posix) == -1) ? FILEIO_ERROR : FILEIO_SUCCESS; } @@ -1510,13 +1440,13 @@ */ static Bool -FileIOCoalesce(struct iovec *inVec, // IN: Vector to coalesce from - int inCount, // IN: count for inVec - size_t inTotalSize, // IN: totalSize (bytes) in inVec - Bool isWrite, // IN: coalesce for writing (or reading) - Bool forceCoalesce, // IN: if TRUE always coalesce - int flags, // IN: fileIO open flags - struct iovec *outVec) // OUT: Coalesced (1-entry) iovec +FileIOCoalesce(struct iovec const *inVec, // IN: Vector to coalesce from + int inCount, // IN: count for inVec + size_t inTotalSize, // IN: totalSize (bytes) in inVec + Bool isWrite, // IN: coalesce for writing (or reading) + Bool forceCoalesce, // IN: if TRUE always coalesce + int flags, // IN: fileIO open flags + struct iovec *outVec) // OUT: Coalesced (1-entry) iovec { uint8 *cBuf; @@ -1585,12 +1515,12 @@ */ static void -FileIODecoalesce(struct iovec *coVec, // IN: Coalesced (1-entry) vector - struct iovec *origVec, // IN: Original vector - int origVecCount, // IN: count for origVec - size_t actualSize, // IN: # bytes to transfer back to origVec - Bool isWrite, // IN: decoalesce for writing (or reading) - int flags) // IN: fileIO open flags +FileIODecoalesce(struct iovec *coVec, // IN: Coalesced (1-entry) vector + struct iovec const *origVec, // IN: Original vector + int origVecCount, // IN: count for origVec + size_t actualSize, // IN: # bytes to transfer back to origVec + Bool isWrite, // IN: decoalesce for writing (or reading) + int flags) // IN: fileIO open flags { ASSERT(coVec); ASSERT(origVec); @@ -1635,7 +1565,7 @@ FileIOResult FileIO_Readv(FileIODescriptor *fd, // IN: - struct iovec *v, // IN: + struct iovec const *v, // IN: int numEntries, // IN: size_t totalSize, // IN: size_t *actual) // OUT: @@ -1644,7 +1574,7 @@ FileIOResult fret = FILEIO_ERROR; int nRetries = 0, maxRetries = numEntries; struct iovec coV; - struct iovec *vPtr; + struct iovec const *vPtr; Bool didCoalesce; int numVec; @@ -1748,7 +1678,7 @@ FileIOResult FileIO_Writev(FileIODescriptor *fd, // IN: - struct iovec *v, // IN: + struct iovec const *v, // IN: int numEntries, // IN: size_t totalSize, // IN: size_t *actual) // OUT: @@ -1757,7 +1687,7 @@ FileIOResult fret = FILEIO_ERROR; int nRetries = 0, maxRetries = numEntries; struct iovec coV; - struct iovec *vPtr; + struct iovec const *vPtr; Bool didCoalesce; int numVec; @@ -1821,7 +1751,7 @@ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) ||\ - defined(sun) + defined(__sun__) /* *---------------------------------------------------------------------- @@ -1844,14 +1774,14 @@ */ static FileIOResult -FileIOPreadvCoalesced(FileIODescriptor *fd, // IN: File descriptor - struct iovec *entries, // IN: Vector to read into - int numEntries, // IN: Number of vector entries - uint64 offset, // IN: Offset to start reading - size_t totalSize, // IN: totalSize(bytes) in entries - size_t *actual) // OUT: number of bytes read +FileIOPreadvCoalesced(FileIODescriptor *fd, // IN: File descriptor + struct iovec const *entries, // IN: Vector to read into + int numEntries, // IN: Number of vector entries + uint64 offset, // IN: Offset to start reading + size_t totalSize, // IN: totalSize(bytes) in entries + size_t *actual) // OUT: number of bytes read { - struct iovec *vPtr; + struct iovec const *vPtr; struct iovec coV; int count; uint64 fileOffset; @@ -1932,16 +1862,16 @@ */ static FileIOResult -FileIOPwritevCoalesced(FileIODescriptor *fd, // IN: File descriptor - struct iovec *entries, // IN: Vector to write from - int numEntries, // IN: Number of vector entries - uint64 offset, // IN: Offset to start writing - size_t totalSize, // IN: Total size(bytes) - size_t *actual) // OUT: number of bytes written +FileIOPwritevCoalesced(FileIODescriptor *fd, // IN: File descriptor + struct iovec const *entries, // IN: Vector to write from + int numEntries, // IN: Number of vector entries + uint64 offset, // IN: Offset to start writing + size_t totalSize, // IN: Total size(bytes) + size_t *actual) // OUT: number of bytes written { struct iovec coV; Bool didCoalesce; - struct iovec *vPtr; + struct iovec const *vPtr; int count; uint64 fileOffset; FileIOResult fret; @@ -2009,10 +1939,10 @@ } #endif /* defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || - defined(sun) */ + defined(__sun__) */ -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) /* *---------------------------------------------------------------------- @@ -2045,14 +1975,14 @@ */ static FileIOResult -FileIOPreadvInternal(FileIODescriptor *fd, // IN: File descriptor - struct iovec *entries, // IN: Vector to read into - int numEntries, // IN: Number of vector entries - uint64 offset, // IN: Offset to start reading - size_t totalSize, // IN: totalSize(bytes) in entries - size_t *actual) // OUT: number of bytes read +FileIOPreadvInternal(FileIODescriptor *fd, // IN: File descriptor + struct iovec const *entries, // IN: Vector to read into + int numEntries, // IN: Number of vector entries + uint64 offset, // IN: Offset to start reading + size_t totalSize, // IN: totalSize(bytes) in entries + size_t *actual) // OUT: number of bytes read { - struct iovec *vPtr; + struct iovec const *vPtr; int numVec; size_t partialBytes = 0; size_t bytesRead = 0; @@ -2180,14 +2110,14 @@ */ static FileIOResult -FileIOPwritevInternal(FileIODescriptor *fd, // IN: File descriptor - struct iovec *entries, // IN: Vector to write from - int numEntries, // IN: Number of vector entries - uint64 offset, // IN: Offset to start writing - size_t totalSize, // IN: Total size(bytes)in entries - size_t *actual) // OUT: number of bytes written +FileIOPwritevInternal(FileIODescriptor *fd, // IN: File descriptor + struct iovec const *entries, // IN: Vector to write from + int numEntries, // IN: Number of vector entries + uint64 offset, // IN: Offset to start writing + size_t totalSize, // IN: Total size(bytes)in entries + size_t *actual) // OUT: number of bytes written { - struct iovec *vPtr; + struct iovec const *vPtr; int numVec; size_t partialBytes = 0; size_t bytesWritten = 0; @@ -2266,18 +2196,18 @@ return fret; } -#endif /* defined(__linux__) */ +#endif /* defined(__linux__) && !defined(__ANDROID__) */ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) ||\ - defined(sun) + defined(__sun__) /* *---------------------------------------------------------------------- * * FileIO_Preadv -- * - * Implementation of vector pread.The function checks for the support + * Implementation of vector pread. The function checks for the support * of system call preadv with the version of glibc and calls the * optimized system call. If the system call is not supported, * we fall back to the earlier technique of coalescing the vectors @@ -2293,12 +2223,12 @@ */ FileIOResult -FileIO_Preadv(FileIODescriptor *fd, // IN: File descriptor - struct iovec *entries, // IN: Vector to read into - int numEntries, // IN: Number of vector entries - uint64 offset, // IN: Offset to start reading - size_t totalSize, // IN: totalSize (bytes) in entries - size_t *actual) // OUT: number of bytes read +FileIO_Preadv(FileIODescriptor *fd, // IN: File descriptor + struct iovec const *entries, // IN: Vector to read into + int numEntries, // IN: Number of vector entries + uint64 offset, // IN: Offset to start reading + size_t totalSize, // IN: totalSize (bytes) in entries + size_t *actual) // OUT: number of bytes read { FileIOResult fret; @@ -2307,13 +2237,13 @@ ASSERT(!(fd->flags & FILEIO_ASYNCHRONOUS)); VERIFY(totalSize < 0x80000000); -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) fret = FileIOPreadvInternal(fd, entries, numEntries, offset, totalSize, actual); #else fret = FileIOPreadvCoalesced(fd, entries, numEntries, offset, totalSize, actual); -#endif /* defined(__linux__ ) */ +#endif /* defined(__linux__ ) && !defined(__ANDROID__) */ return fret; } @@ -2323,7 +2253,7 @@ * * FileIO_Pwritev -- * - * Implementation of vector pwrite.The function checks for the support + * Implementation of vector pwrite. The function checks for the support * of system call pwritev with the version of glibc and calls the * optimized system call. If the system call is not supported, * we fall back to the earlier technique of coalescing the vectors and @@ -2339,12 +2269,12 @@ */ FileIOResult -FileIO_Pwritev(FileIODescriptor *fd, // IN: File descriptor - struct iovec *entries, // IN: Vector to write from - int numEntries, // IN: Number of vector entries - uint64 offset, // IN: Offset to start writing - size_t totalSize, // IN: Total size (bytes) in entries - size_t *actual) // OUT: number of bytes written +FileIO_Pwritev(FileIODescriptor *fd, // IN: File descriptor + struct iovec const *entries, // IN: Vector to write from + int numEntries, // IN: Number of vector entries + uint64 offset, // IN: Offset to start writing + size_t totalSize, // IN: Total size (bytes) in entries + size_t *actual) // OUT: number of bytes written { FileIOResult fret; @@ -2353,18 +2283,18 @@ ASSERT(!(fd->flags & FILEIO_ASYNCHRONOUS)); VERIFY(totalSize < 0x80000000); -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) fret = FileIOPwritevInternal(fd, entries, numEntries, offset, totalSize, actual); #else fret = FileIOPwritevCoalesced(fd, entries, numEntries, offset, totalSize, actual); -#endif /* defined(__linux__ ) */ +#endif /* defined(__linux__ ) && !defined(__ANDROID__) */ return fret; } #endif /* defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || - defined(sun) */ + defined(__sun__) */ /* @@ -2492,9 +2422,9 @@ */ FileIOResult -FileIO_GetAllocSizeByPath(ConstUnicode pathName, // IN: - uint64 *logicalBytes, // OUT: - uint64 *allocedBytes) // OUT: +FileIO_GetAllocSizeByPath(const char *pathName, // IN: + uint64 *logicalBytes, // OUT: + uint64 *allocedBytes) // OUT: { struct stat statBuf; @@ -2542,8 +2472,8 @@ */ FileIOResult -FileIO_Access(ConstUnicode pathName, // IN: Path name. May be NULL. - int accessMode) // IN: Access modes to be asserted +FileIO_Access(const char *pathName, // IN: Path name. May be NULL. + int accessMode) // IN: Access modes to be asserted { int mode = 0; @@ -2616,10 +2546,10 @@ FileIO_SupportsFileSize(const FileIODescriptor *fd, // IN: uint64 requestedSize) // IN: { -#if defined(linux) +#if defined(__linux__) /* * Linux makes test on seek(), so we can do simple non-intrusive test. - * Verified to work on 2.2.x, 2.4.x and 2.6.x, with ext2, ext3, smbfs, + * Verified to work on 2.2.x, 2.4.x and 2.6.x, with ext2, ext3, smbfs, * cifs, nfs and ncpfs. Always got some reasonable value. */ Bool supported = FALSE; @@ -2711,8 +2641,8 @@ */ int -FileIO_PrivilegedPosixOpen(ConstUnicode pathName, // IN: - int flags) // IN: +FileIO_PrivilegedPosixOpen(const char *pathName, // IN: + int flags) // IN: { int fd; Bool suDone; @@ -2840,7 +2770,7 @@ unsigned static const int req[] = { 10, 0, 0, 6 }; unsigned int cur[4], i; int num; - size_t len = sizeof(curRel); + size_t len = sizeof curRel; Bool ret = FALSE; val = Atomic_Read(&supported); @@ -2879,7 +2809,7 @@ goto exit; } else if (req[i] < cur[i]) { ret = TRUE; - goto exit; + goto exit; } } if (num == 5 && type == 'd') { @@ -2895,7 +2825,7 @@ ret = num != 4; exit: - if (!ret && filePosixOptions.initialized && + if (!ret && filePosixOptions.initialized && filePosixOptions.aioNumThreads == 1) { ret = TRUE; } @@ -2972,7 +2902,7 @@ #if (defined( __linux__) && !defined(VMX86_SERVER)) { struct statfs statBuf; - Unicode fullPath; + char *fullPath; ret = FALSE; if (!pathName) { @@ -2988,7 +2918,7 @@ statBuf.f_type == EXT4_SUPER_MAGIC) { ret = TRUE; } - Unicode_Free(fullPath); + free(fullPath); } #endif diff -Nru open-vm-tools-9.10.2-2822639/lib/file/fileLockPosix.c open-vm-tools-10.0.0-3000743/lib/file/fileLockPosix.c --- open-vm-tools-9.10.2-2822639/lib/file/fileLockPosix.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/file/fileLockPosix.c 2015-09-10 07:31:38.000000000 +0000 @@ -28,8 +28,8 @@ #include /* Needed before sys/vfs.h with glibc 2.0 --hpreg */ #if !defined(__FreeBSD__) #if defined(__APPLE__) -#include -#include +#include +#include #include #include #else @@ -590,7 +590,7 @@ */ void -FileLockAppendMessage(MsgList **msgs, // IN/OPT: +FileLockAppendMessage(MsgList **msgs, // IN/OUT/OPT: int err) // IN: errno { MsgList_Append(msgs, MSGID(fileLock.posix) @@ -966,8 +966,8 @@ return FALSE; } } - - return *pid >= 0; + + return *pid >= 0; } @@ -1051,14 +1051,14 @@ *--------------------------------------------------------------------------- */ -static Unicode -FileLockNormalizePath(ConstUnicode filePath) // IN: +static char * +FileLockNormalizePath(const char *filePath) // IN: { - Unicode result; - Unicode fullPath; + char *result; + char *fullPath; - Unicode dirName = NULL; - Unicode fileName = NULL; + char *dirName = NULL; + char *fileName = NULL; /* * If the file to be locked is a symbolic link the lock file belongs next @@ -1074,9 +1074,9 @@ result = (fullPath == NULL) ? NULL : Unicode_Join(fullPath, DIRSEPS, fileName, NULL); - Unicode_Free(fullPath); - Unicode_Free(dirName); - Unicode_Free(fileName); + free(fullPath); + free(dirName); + free(fileName); return result; } @@ -1109,14 +1109,14 @@ */ FileLockToken * -FileLock_Lock(ConstUnicode filePath, // IN: +FileLock_Lock(const char *filePath, // IN: const Bool readOnly, // IN: const uint32 msecMaxWaitTime, // IN: int *err, // OUT/OPT: returns errno - MsgList **msgs) // OUT/OPT: add error message + MsgList **msgs) // IN/OUT/OPT: add error message { int res = 0; - Unicode normalizedPath; + char *normalizedPath; FileLockToken *tokenPtr; ASSERT(filePath); @@ -1132,7 +1132,7 @@ tokenPtr = FileLockIntrinsic(normalizedPath, !readOnly, msecMaxWaitTime, &res); - Unicode_Free(normalizedPath); + free(normalizedPath); } if (err != NULL) { @@ -1171,13 +1171,13 @@ */ Bool -FileLock_IsLocked(ConstUnicode filePath, // IN: - int *err, // OUT/OPT: returns errno - MsgList **msgs) // OUT/OPT: add error message +FileLock_IsLocked(const char *filePath, // IN: + int *err, // OUT/OPT: returns errno + MsgList **msgs) // IN/OUT/OPT: add error message { int res = 0; Bool isLocked; - Unicode normalizedPath; + char *normalizedPath; ASSERT(filePath); @@ -1190,7 +1190,7 @@ } else { isLocked = FileLockIsLocked(normalizedPath, &res); - Unicode_Free(normalizedPath); + free(normalizedPath); } if (err != NULL) { @@ -1225,7 +1225,7 @@ Bool FileLock_Unlock(const FileLockToken *lockToken, // IN: int *err, // OUT/OPT: returns errno - MsgList **msgs) // OUT/OPT: add error message + MsgList **msgs) // IN/OUT/OPT: error messages { int res; diff -Nru open-vm-tools-9.10.2-2822639/lib/file/fileLockPrimitive.c open-vm-tools-10.0.0-3000743/lib/file/fileLockPrimitive.c --- open-vm-tools-9.10.2-2822639/lib/file/fileLockPrimitive.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/file/fileLockPrimitive.c 2015-09-10 07:31:38.000000000 +0000 @@ -88,13 +88,13 @@ { uint32 signature; Bool portable; - Unicode pathName; + char *pathName; union { struct { FileIODescriptor lockFd; } mandatory; struct { - Unicode lockFilePath; // &implicitReadToken for implicit read locks + char *lockFilePath; // &implicitReadToken for implicit read locks } portable; } u; }; @@ -175,11 +175,11 @@ */ static int -FileLockRemoveLockingFile(ConstUnicode lockDir, // IN: - ConstUnicode fileName) // IN: +FileLockRemoveLockingFile(const char *lockDir, // IN: + const char *fileName) // IN: { int err; - Unicode path; + char *path; ASSERT(lockDir); ASSERT(fileName); @@ -194,11 +194,11 @@ err = 0; } else { Warning(LGPFX" %s of '%s' failed: %s\n", __FUNCTION__, - UTF8(path), strerror(err)); + path, strerror(err)); } } - Unicode_Free(path); + free(path); return err; } @@ -290,15 +290,15 @@ #define FL_MAX_ARGS 16 int -FileLockMemberValues(ConstUnicode lockDir, // IN: - ConstUnicode fileName, // IN: +FileLockMemberValues(const char *lockDir, // IN: + const char *fileName, // IN: char *buffer, // OUT: size_t requiredSize, // IN: LockValues *memberValues) // OUT: { size_t len; int access; - Unicode path; + char *path; FileData fileData; FileIOResult result; FileIODescriptor desc; @@ -314,7 +314,7 @@ (void *) &memberValues->locationChecksum } }; - + ASSERT(lockDir); ASSERT(fileName); @@ -343,7 +343,7 @@ if (err != ENOENT) { Warning(LGPFX" %s open failure on '%s': %s\n", __FUNCTION__, - UTF8(path), strerror(err)); + path, strerror(err)); } goto bail; @@ -362,7 +362,7 @@ if (err != ENOENT) { Warning(LGPFX" %s file size failure on '%s': %s\n", __FUNCTION__, - UTF8(path), strerror(err)); + path, strerror(err)); } FileIO_Close(&desc); @@ -373,7 +373,7 @@ /* Complain if the lock file is not the proper size */ if (fileData.fileSize != requiredSize) { Warning(LGPFX" %s file '%s': size %"FMT64"u, required size %"FMTSZ"d\n", - __FUNCTION__, UTF8(path), fileData.fileSize, requiredSize); + __FUNCTION__, path, fileData.fileSize, requiredSize); FileIO_Close(&desc); @@ -389,14 +389,14 @@ err = FileMapErrorToErrno(__FUNCTION__, Err_Errno()); Warning(LGPFX" %s read failure on '%s': %s\n", - __FUNCTION__, UTF8(path), strerror(err)); + __FUNCTION__, path, strerror(err)); goto bail; } if (len != requiredSize) { Warning(LGPFX" %s read length issue on '%s': %"FMTSZ"d and %"FMTSZ"d\n", - __FUNCTION__, UTF8(path), len, requiredSize); + __FUNCTION__, path, len, requiredSize); err = EIO; goto bail; @@ -482,21 +482,21 @@ memberValues->lockType = argv[3]; memberValues->memberName = Unicode_Duplicate(fileName); - Unicode_Free(path); + free(path); return 0; corrupt: Warning(LGPFX" %s removing problematic lock file '%s'\n", __FUNCTION__, - UTF8(path)); + path); if (argc) { uint32 i; - Log(LGPFX" %s '%s' contents are:\n", __FUNCTION__, UTF8(fileName)); + Log(LGPFX" %s '%s' contents are:\n", __FUNCTION__, fileName); for (i = 0; i < argc; i++) { - Log(LGPFX" %s %s argv[%u]: '%s'\n", __FUNCTION__, UTF8(fileName), + Log(LGPFX" %s %s argv[%u]: '%s'\n", __FUNCTION__, fileName, i, argv[i]); } } @@ -509,7 +509,7 @@ } bail: - Unicode_Free(path); + free(path); return err; } @@ -533,7 +533,7 @@ */ Bool -FileLockValidName(ConstUnicode fileName) // IN: +FileLockValidName(const char *fileName) // IN: { uint32 i; @@ -576,14 +576,14 @@ */ static int -FileLockActivateList(ConstUnicode dirName, // IN: - LockValues *myValues) // IN: +FileLockActivateList(const char *dirName, // IN: + LockValues *myValues) // IN: { ActiveLock *ptr; ASSERT(dirName); - ASSERT(Unicode_StartsWith(dirName, "D")); + ASSERT(*dirName == 'D'); /* Search the list for a matching entry */ for (ptr = myValues->lockList; ptr != NULL; ptr = ptr->next) { @@ -627,14 +627,14 @@ */ static char * -FileLockLocationChecksum(ConstUnicode path) // IN: +FileLockLocationChecksum(const char *path) // IN: { int c; uint32 hash = 5381; #if defined(_WIN32) char *p; - Unicode value = Unicode_Duplicate(path); + char *value = Unicode_Duplicate(path); /* Don't get fooled by mixed case; "normalize" */ Str_ToLower(value); @@ -649,7 +649,7 @@ } #if defined(_WIN32) - Unicode_Free(value); + free(value); #endif return Str_SafeAsprintf(NULL, "%u", hash); @@ -675,10 +675,10 @@ */ static int -FileLockScanDirectory(ConstUnicode lockDir, // IN: +FileLockScanDirectory(const char *lockDir, // IN: int (*func)( // IN: - ConstUnicode lockDir, - ConstUnicode fileName, + const char *lockDir, + const char *fileName, LockValues *memberValues, LockValues *myValues ), @@ -689,7 +689,7 @@ int err; int numEntries; - Unicode *fileList = NULL; + char **fileList = NULL; char *myExecutionID = NULL; char *locationChecksum = NULL; @@ -699,7 +699,7 @@ if (numEntries == -1) { Log(LGPFX" %s: Could not read the directory '%s': %d\n", - __FUNCTION__, UTF8(lockDir), Err_Errno()); + __FUNCTION__, lockDir, Err_Errno()); return EDOM; // out of my domain } @@ -709,14 +709,14 @@ /* Remove any non-locking files */ if (!FileLockValidName(fileList[i])) { Log(LGPFX" %s discarding %s from %s'; invalid file name.\n", - __FUNCTION__, UTF8(fileList[i]), UTF8(lockDir)); + __FUNCTION__, fileList[i], lockDir); err = FileLockRemoveLockingFile(lockDir, fileList[i]); if (err != 0) { goto bail; } - Unicode_Free(fileList[i]); + free(fileList[i]); fileList[i] = NULL; continue; @@ -729,7 +729,7 @@ * this will cleaned-up. */ - if (Unicode_StartsWith(fileList[i], "D")) { + if (*fileList[i] == 'D') { if (cleanUp) { err = FileLockActivateList(fileList[i], myValues); if (err != 0) { @@ -737,7 +737,7 @@ } } - Unicode_Free(fileList[i]); + free(fileList[i]); fileList[i] = NULL; } } @@ -757,7 +757,7 @@ char buffer[FILELOCK_DATA_SIZE]; if ((fileList[i] == NULL) || - (Unicode_StartsWith(fileList[i], "E"))) { + (*fileList[i] == 'E')) { continue; } @@ -785,7 +785,7 @@ /* Remove any stale locking files */ if (FileLockMachineIDMatch(myValues->machineID, memberValues.machineID)) { - Unicode dispose = NULL; + char *dispose = NULL; if (FileLockValidExecutionID(memberValues.executionID)) { /* If it's mine it better still be where I put it! */ @@ -802,10 +802,10 @@ if (dispose) { Log(LGPFX" %s discarding %s from %s': %s\n", - __FUNCTION__, UTF8(fileList[i]), UTF8(lockDir), dispose); + __FUNCTION__, fileList[i], lockDir, dispose); - Unicode_Free(dispose); - Unicode_Free(memberValues.memberName); + free(dispose); + free(memberValues.memberName); err = FileLockRemoveLockingFile(lockDir, fileList[i]); if (err != 0) { @@ -823,7 +823,7 @@ err = (*func)(lockDir, fileList[i], ptr, myValues); if (ptr == &memberValues) { - Unicode_Free(memberValues.memberName); + free(memberValues.memberName); } if (err != 0) { @@ -833,11 +833,8 @@ bail: - for (i = 0; i < numEntries; i++) { - Unicode_Free(fileList[i]); - } + Util_FreeStringList(fileList, numEntries); - free(fileList); free(locationChecksum); free(myExecutionID); @@ -865,10 +862,10 @@ */ static int -FileLockScanner(ConstUnicode lockDir, // IN: +FileLockScanner(const char *lockDir, // IN: int (*func)( // IN: - ConstUnicode lockDir, - ConstUnicode fileName, + const char *lockDir, + const char *fileName, LockValues *memberValues, LockValues *myValues ), @@ -903,14 +900,14 @@ if (ptr->marked) { if (ptr->age > FILELOCK_PROGRESS_DEARTH) { - Unicode temp; - Unicode path; + char *temp; + char *path; UnicodeIndex index; - ASSERT(Unicode_StartsWith(ptr->dirName, "D")); + ASSERT(*ptr->dirName == 'D'); Log(LGPFX" %s discarding %s data from '%s'.\n", - __FUNCTION__, UTF8(ptr->dirName), UTF8(lockDir)); + __FUNCTION__, ptr->dirName, lockDir); path = Unicode_Join(lockDir, DIRSEPS, ptr->dirName, NULL); @@ -919,15 +916,15 @@ temp = Unicode_Replace(path, index, 1, "M"); FileDeletionRobust(temp, FALSE); - Unicode_Free(temp); + free(temp); temp = Unicode_Replace(path, index, 1, "E"); FileDeletionRobust(temp, FALSE); - Unicode_Free(temp); + free(temp); FileRemoveDirectoryRobust(path); - Unicode_Free(path); + free(path); remove = TRUE; } else { @@ -961,7 +958,7 @@ ptr = myValues->lockList; myValues->lockList = ptr->next; - Unicode_Free(ptr->dirName); + free(ptr->dirName); free(ptr); } @@ -994,7 +991,7 @@ ASSERT(tokenPtr && (tokenPtr->signature == FILELOCK_TOKEN_SIGNATURE)); - LOG(1, ("Requesting unlock on %s\n", UTF8(tokenPtr->pathName))); + LOG(1, ("Requesting unlock on %s\n", tokenPtr->pathName)); if (tokenPtr->portable) { @@ -1005,7 +1002,7 @@ */ if (tokenPtr->u.portable.lockFilePath != &implicitReadToken) { - Unicode lockDir; + char *lockDir; /* The lock directory path */ lockDir = Unicode_Append(tokenPtr->pathName, FILELOCK_SUFFIX); @@ -1021,20 +1018,20 @@ if (err && vmx86_debug) { Log(LGPFX" %s failed for '%s': %s\n", __FUNCTION__, - UTF8(tokenPtr->u.portable.lockFilePath), strerror(err)); + tokenPtr->u.portable.lockFilePath, strerror(err)); } - Unicode_Free(lockDir); - Unicode_Free(tokenPtr->u.portable.lockFilePath); + free(lockDir); + free(tokenPtr->u.portable.lockFilePath); } tokenPtr->u.portable.lockFilePath = NULL; // Just in case... } else { ASSERT(FileIO_IsValid(&tokenPtr->u.mandatory.lockFd)); - if (FileIO_CloseAndUnlink(&tokenPtr->u.mandatory.lockFd)) { + if (!FileIO_IsSuccess(FileIO_CloseAndUnlink(&tokenPtr->u.mandatory.lockFd))) { /* * Should succeed, but there is an unavoidable race: - * close() must preceed unlink(), but another thread could touch + * close() must precede unlink(), but another thread could touch * the file between close() and unlink(). We only worry about other * FileLock-like manipulations; the advisory lock file should not * experience any name collisions. Treat races as success. @@ -1045,18 +1042,18 @@ if (Err_Errno() == EBUSY || Err_Errno() == ENOENT) { LOG(0, ("Tolerating %s on unlink of advisory lock at %s\n", Err_Errno() == EBUSY ? "EBUSY" : "ENOENT", - UTF8(tokenPtr->pathName))); + tokenPtr->pathName)); } else { err = Err_Errno(); if (vmx86_debug) { Log(LGPFX" %s failed for advisory lock '%s': %s\n", __FUNCTION__, - UTF8(tokenPtr->pathName), strerror(err)); + tokenPtr->pathName, strerror(err)); } } } } - Unicode_Free(tokenPtr->pathName); + free(tokenPtr->pathName); tokenPtr->signature = 0; // Just in case... tokenPtr->pathName = NULL; // Just in case... free(tokenPtr); @@ -1084,8 +1081,8 @@ */ static int -FileLockWaitForPossession(ConstUnicode lockDir, // IN: - ConstUnicode fileName, // IN: +FileLockWaitForPossession(const char *lockDir, // IN: + const char *fileName, // IN: LockValues *memberValues, // IN: LockValues *myValues) // IN: { @@ -1101,9 +1098,9 @@ myValues->memberName) < 0))) && ((strcmp(memberValues->lockType, LOCK_EXCLUSIVE) == 0) || (strcmp(myValues->lockType, LOCK_EXCLUSIVE) == 0))) { - Unicode path; + char *path; uint32 loopCount; - Bool thisMachine; + Bool thisMachine; thisMachine = FileLockMachineIDMatch(myValues->machineID, memberValues->machineID); @@ -1129,7 +1126,7 @@ !FileLockValidExecutionID(memberValues->executionID)) { /* Invalid Execution ID; remove the member file */ Warning(LGPFX" %s discarding file '%s'; invalid executionID.\n", - __FUNCTION__, UTF8(path)); + __FUNCTION__, path); err = FileLockRemoveLockingFile(lockDir, fileName); break; @@ -1145,14 +1142,14 @@ (err == EAGAIN)) { if (thisMachine) { Log(LGPFX" %s timeout on '%s' due to a local process '%s'\n", - __FUNCTION__, UTF8(path), memberValues->executionID); + __FUNCTION__, path, memberValues->executionID); } else { Log(LGPFX" %s timeout on '%s' due to another machine '%s'\n", - __FUNCTION__, UTF8(path), memberValues->machineID); + __FUNCTION__, path, memberValues->machineID); } } - Unicode_Free(path); + free(path); } return err; @@ -1177,8 +1174,8 @@ */ static int -FileLockNumberScan(ConstUnicode lockDir, // IN: - ConstUnicode fileName, // IN: +FileLockNumberScan(const char *lockDir, // IN: + const char *fileName, // IN: LockValues *memberValues, // IN: LockValues *myValues) // IN/OUT: { @@ -1211,7 +1208,7 @@ */ static int -FileLockMakeDirectory(ConstUnicode pathName) // IN: +FileLockMakeDirectory(const char *pathName) // IN: { int err; @@ -1259,11 +1256,11 @@ */ static int -FileLockCreateEntryDirectory(ConstUnicode lockDir, // IN: - Unicode *entryDirectory, // OUT: - Unicode *entryFilePath, // OUT: - Unicode *memberFilePath, // OUT: - Unicode *memberName) // OUT: +FileLockCreateEntryDirectory(const char *lockDir, // IN: + char **entryDirectory, // OUT: + char **entryFilePath, // OUT: + char **memberFilePath, // OUT: + char **memberName) // OUT: { int err = 0; uint32 randomNumber = 0; @@ -1278,7 +1275,7 @@ /* Fun at the races */ while (TRUE) { - Unicode temp; + char *temp; FileData fileData; err = FileAttributesRobust(lockDir, &fileData); @@ -1293,7 +1290,7 @@ */ Log(LGPFX" %s: '%s' exists; an old style lock file?\n", - __FUNCTION__, UTF8(lockDir)); + __FUNCTION__, lockDir); err = EBUSY; break; @@ -1303,7 +1300,7 @@ /* Not a directory; attempt to remove the debris */ if (FileDeletionRobust(lockDir, FALSE) != 0) { Warning(LGPFX" %s: '%s' exists and is not a directory.\n", - __FUNCTION__, UTF8(lockDir)); + __FUNCTION__, lockDir); err = ENOTDIR; break; @@ -1318,13 +1315,13 @@ if ((err != 0) && (err != EEXIST)) { Warning(LGPFX" %s creation failure on '%s': %s\n", - __FUNCTION__, UTF8(lockDir), strerror(err)); + __FUNCTION__, lockDir, strerror(err)); break; } } else { Warning(LGPFX" %s stat failure on '%s': %s\n", - __FUNCTION__, UTF8(lockDir), strerror(err)); + __FUNCTION__, lockDir, strerror(err)); break; } @@ -1337,11 +1334,11 @@ temp = Unicode_Format("D%05u%s", randomNumber, FILELOCK_SUFFIX); *entryDirectory = Unicode_Join(lockDir, DIRSEPS, temp, NULL); - Unicode_Free(temp); + free(temp); temp = Unicode_Format("E%05u%s", randomNumber, FILELOCK_SUFFIX); *entryFilePath = Unicode_Join(lockDir, DIRSEPS, temp, NULL); - Unicode_Free(temp); + free(temp); *memberFilePath = Unicode_Join(lockDir, DIRSEPS, *memberName, NULL); @@ -1368,7 +1365,7 @@ if (vmx86_debug) { Log(LGPFX" %s stat failure on '%s': %s\n", - __FUNCTION__, UTF8(*memberFilePath), strerror(err)); + __FUNCTION__, *memberFilePath, strerror(err)); } } @@ -1377,16 +1374,16 @@ if ((err != EEXIST) && // Another process/thread created it... (err != ENOENT)) { // lockDir is gone... Warning(LGPFX" %s creation failure on '%s': %s\n", - __FUNCTION__, UTF8(*entryDirectory), strerror(err)); + __FUNCTION__, *entryDirectory, strerror(err)); break; } } - Unicode_Free(*entryDirectory); - Unicode_Free(*entryFilePath); - Unicode_Free(*memberFilePath); - Unicode_Free(*memberName); + free(*entryDirectory); + free(*entryFilePath); + free(*memberFilePath); + free(*memberName); *entryDirectory = NULL; *entryFilePath = NULL; @@ -1395,10 +1392,10 @@ } if (err != 0) { - Unicode_Free(*entryDirectory); - Unicode_Free(*entryFilePath); - Unicode_Free(*memberFilePath); - Unicode_Free(*memberName); + free(*entryDirectory); + free(*entryFilePath); + free(*memberFilePath); + free(*memberName); *entryDirectory = NULL; *entryFilePath = NULL; @@ -1430,8 +1427,8 @@ static int FileLockCreateMemberFile(FileIODescriptor *desc, // IN: const LockValues *myValues, // IN: - ConstUnicode entryFilePath, // IN: - ConstUnicode memberFilePath) // IN: + const char *entryFilePath, // IN: + const char *memberFilePath) // IN: { int cnt; int pid; @@ -1483,25 +1480,25 @@ err = FileMapErrorToErrno(__FUNCTION__, Err_Errno()); Warning(LGPFX" %s write of '%s' failed: %s\n", __FUNCTION__, - UTF8(entryFilePath), strerror(err)); + entryFilePath, strerror(err)); FileIO_Close(desc); return err; } - if (FileIO_Close(desc)) { + if (!FileIO_IsSuccess(FileIO_Close(desc))) { err = FileMapErrorToErrno(__FUNCTION__, Err_Errno()); Warning(LGPFX" %s close of '%s' failed: %s\n", __FUNCTION__, - UTF8(entryFilePath), strerror(err)); + entryFilePath, strerror(err)); return err; } if (len != sizeof buffer) { Warning(LGPFX" %s write length issue on '%s': %"FMTSZ"d and %"FMTSZ"d\n", - __FUNCTION__, UTF8(entryFilePath), len, sizeof buffer); + __FUNCTION__, entryFilePath, len, sizeof buffer); return EIO; } @@ -1510,16 +1507,16 @@ if (err != 0) { Warning(LGPFX" %s FileRename of '%s' to '%s' failed: %s\n", - __FUNCTION__, UTF8(entryFilePath), UTF8(memberFilePath), + __FUNCTION__, entryFilePath, memberFilePath, strerror(err)); if (vmx86_debug) { Log(LGPFX" %s FileLockFileType() of '%s': %s\n", - __FUNCTION__, UTF8(entryFilePath), + __FUNCTION__, entryFilePath, strerror(FileAttributesRobust(entryFilePath, NULL))); Log(LGPFX" %s FileLockFileType() of '%s': %s\n", - __FUNCTION__, UTF8(memberFilePath), + __FUNCTION__, memberFilePath, strerror(FileAttributesRobust(memberFilePath, NULL))); } @@ -1561,15 +1558,15 @@ */ static FileLockToken * -FileLockIntrinsicMandatory(ConstUnicode pathName, // IN: - ConstUnicode lockFile, // IN: - LockValues *myValues, // IN/OUT: - int *err) // OUT: +FileLockIntrinsicMandatory(const char *pathName, // IN: + const char *lockFile, // IN: + LockValues *myValues, // IN/OUT: + int *err) // OUT: { int access; int loopCount = 0; FileIOResult result; - FileLockToken *tokenPtr = Util_SafeMalloc(sizeof(FileLockToken)); + FileLockToken *tokenPtr = Util_SafeMalloc(sizeof *tokenPtr); tokenPtr->signature = FILELOCK_TOKEN_SIGNATURE; tokenPtr->portable = FALSE; @@ -1597,7 +1594,7 @@ return tokenPtr; } else { *err = FileMapErrorToErrno(__FUNCTION__, Err_Errno()); - Unicode_Free(tokenPtr->pathName); + free(tokenPtr->pathName); ASSERT(!FileIO_IsValid(&tokenPtr->u.mandatory.lockFd)); free(tokenPtr); @@ -1614,8 +1611,8 @@ * Obtain a lock on a file; shared or exclusive access. * * This implementation uses a HIGHLY portable directory-namespace + - * Lamport bakery scheme that works on all filesystems that provide atomicity - * of the directory namespace. (That is, all known filesystems.) + * Lamport bakery scheme that works on all filesystems that provide + * atomicity of the directory namespace (That is, all known filesystems). * The various files involved are hidden within a "pathName.lck/" * subdirectory. * @@ -1637,19 +1634,19 @@ */ static FileLockToken * -FileLockIntrinsicPortable(ConstUnicode pathName, // IN: - ConstUnicode lockDir, // IN: - LockValues *myValues, // IN/OUT: - int *err) // OUT: +FileLockIntrinsicPortable(const char *pathName, // IN: + const char *lockDir, // IN: + LockValues *myValues, // IN/OUT: + int *err) // OUT: { int access; FileIOResult result; FileIODescriptor desc; FileLockToken *tokenPtr; - Unicode entryFilePath = NULL; - Unicode memberFilePath = NULL; - Unicode entryDirectory = NULL; + char *entryFilePath = NULL; + char *memberFilePath = NULL; + char *entryDirectory = NULL; ASSERT(pathName); ASSERT(err); @@ -1678,7 +1675,7 @@ */ Warning(LGPFX" %s implicit %s lock succeeded on '%s'.\n", - __FUNCTION__, LOCK_SHARED, UTF8(pathName)); + __FUNCTION__, LOCK_SHARED, pathName); *err = 0; memberFilePath = &implicitReadToken; @@ -1769,18 +1766,18 @@ bail: - Unicode_Free(entryDirectory); - Unicode_Free(entryFilePath); + free(entryDirectory); + free(entryFilePath); if (*err == 0) { - tokenPtr = Util_SafeMalloc(sizeof(FileLockToken)); + tokenPtr = Util_SafeMalloc(sizeof *tokenPtr); tokenPtr->signature = FILELOCK_TOKEN_SIGNATURE; tokenPtr->portable = TRUE; tokenPtr->pathName = Unicode_Duplicate(pathName); tokenPtr->u.portable.lockFilePath = memberFilePath; } else { - Unicode_Free(memberFilePath); + free(memberFilePath); tokenPtr = NULL; if (*err == EAGAIN) { @@ -1829,12 +1826,12 @@ */ FileLockToken * -FileLockIntrinsic(ConstUnicode pathName, // IN: +FileLockIntrinsic(const char *pathName, // IN: Bool exclusivity, // IN: uint32 msecMaxWaitTime, // IN: int *err) // OUT: { - Unicode lockBase; + char *lockBase; LockValues myValues = { 0 }; FileLockToken *tokenPtr; @@ -1848,7 +1845,7 @@ if (File_SupportsMandatoryLock(pathName)) { LOG(1, ("Requesting %s lock on %s (mandatory, %u).\n", - myValues.lockType, UTF8(pathName), myValues.msecMaxWaitTime)); + myValues.lockType, pathName, myValues.msecMaxWaitTime)); tokenPtr = FileLockIntrinsicMandatory(pathName, lockBase, &myValues, err); } else { @@ -1859,17 +1856,17 @@ myValues.memberName = NULL; LOG(1, ("Requesting %s lock on %s (%s, %s, %u).\n", - myValues.lockType, UTF8(pathName), myValues.machineID, + myValues.lockType, pathName, myValues.machineID, myValues.executionID, myValues.msecMaxWaitTime)); tokenPtr = FileLockIntrinsicPortable(pathName, lockBase, &myValues, err); - Unicode_Free(myValues.memberName); + free(myValues.memberName); free(myValues.locationChecksum); free(myValues.executionID); } - Unicode_Free(lockBase); + free(lockBase); return tokenPtr; } @@ -1897,8 +1894,8 @@ */ static Bool -FileLockIsLockedMandatory(ConstUnicode lockFile, // IN: - int *err) // OUT/OPT: +FileLockIsLockedMandatory(const char *lockFile, // IN: + int *err) // OUT/OPT: { int access; FileIOResult result; @@ -1919,7 +1916,7 @@ if (FileIO_IsSuccess(result)) { Bool ret; - ret = FileIO_Close(&desc); + ret = !FileIO_IsSuccess(FileIO_Close(&desc)); ASSERT(!ret); return FALSE; @@ -1961,13 +1958,13 @@ */ static Bool -FileLockIsLockedPortable(ConstUnicode lockDir, // IN: - int *err) // OUT/OPT: +FileLockIsLockedPortable(const char *lockDir, // IN: + int *err) // OUT/OPT: { uint32 i; int numEntries; Bool isLocked = FALSE; - Unicode *fileList = NULL; + char **fileList = NULL; numEntries = FileListDirectoryRobust(lockDir, &fileList); @@ -1985,17 +1982,13 @@ } for (i = 0; i < numEntries; i++) { - if (Unicode_StartsWith(fileList[i], "M")) { + if (*fileList[i] == 'M') { isLocked = TRUE; break; } } - for (i = 0; i < numEntries; i++) { - Unicode_Free(fileList[i]); - } - - free(fileList); + Util_FreeStringList(fileList, numEntries); return isLocked; } @@ -2019,11 +2012,11 @@ */ Bool -FileLockIsLocked(ConstUnicode pathName, // IN: - int *err) // OUT/OPT: +FileLockIsLocked(const char *pathName, // IN: + int *err) // OUT/OPT: { Bool isLocked; - Unicode lockBase; + char *lockBase; ASSERT(pathName); @@ -2035,7 +2028,7 @@ isLocked = FileLockIsLockedPortable(lockBase, err); } - Unicode_Free(lockBase); + free(lockBase); return isLocked; } @@ -2059,7 +2052,7 @@ *---------------------------------------------------------------------- */ -Unicode +char * FileLock_TokenPathName(const FileLockToken *lockToken) // IN: { ASSERT(lockToken && (lockToken->signature == FILELOCK_TOKEN_SIGNATURE)); diff -Nru open-vm-tools-9.10.2-2822639/lib/file/filePosix.c open-vm-tools-10.0.0-3000743/lib/file/filePosix.c --- open-vm-tools-9.10.2-2822639/lib/file/filePosix.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/file/filePosix.c 2015-09-10 07:31:38.000000000 +0000 @@ -91,31 +91,15 @@ #include "fs_user.h" #endif - -/* - * XXX - * FTS is not available on all posix platforms that we care about. - * We depend on FTS for a simple pre-order file traversal. For the Windows - * implementation we need to write our own traversal code anyway. When that - * happens the prosix version should be updated to use the generic code. - */ - -#if defined(__USE_FILE_OFFSET64) || defined(sun) || defined(__ANDROID__) -# define CAN_USE_FTS 0 -#else -# define CAN_USE_FTS 1 -#endif - -#if CAN_USE_FTS -# include - struct WalkDirContextImpl { - FTS *fts; + int cnt; + int iter; + char **files; }; -#endif /* A string for NFS on ESX file system type */ +#define FS_NFS_PREFIX_LEN 3 #define FS_NFS_ON_ESX "NFS" /* A string for VMFS on ESX file system type */ #define FS_VMFS_ON_ESX "VMFS" @@ -151,7 +135,7 @@ */ int -FileRemoveDirectory(ConstUnicode pathName) // IN: +FileRemoveDirectory(const char *pathName) // IN: { return (Posix_Rmdir(pathName) == -1) ? errno : 0; } @@ -175,16 +159,16 @@ */ int -File_Rename(ConstUnicode oldName, // IN: - ConstUnicode newName) // IN: +File_Rename(const char *oldName, // IN: + const char *newName) // IN: { return (Posix_Rename(oldName, newName) == -1) ? errno : 0; } int -File_RenameRetry(ConstUnicode oldFile, // IN: - ConstUnicode newFile, // IN: +File_RenameRetry(const char *oldFile, // IN: + const char *newFile, // IN: uint32 msecMaxWaitTime) // IN: Unused. { return File_Rename(oldFile, newFile); @@ -209,7 +193,7 @@ */ int -FileDeletion(ConstUnicode pathName, // IN: +FileDeletion(const char *pathName, // IN: const Bool handleLink) // IN: { int err; @@ -221,7 +205,7 @@ } if (handleLink) { - Unicode linkPath = Posix_ReadLink(pathName); + char *linkPath = Posix_ReadLink(pathName); if (linkPath == NULL) { /* If there is no link involved, continue */ @@ -233,7 +217,7 @@ } else { err = (Posix_Unlink(linkPath) == -1) ? errno : 0; - Unicode_Free(linkPath); + free(linkPath); /* Ignore a file that has already disappeared */ if (err != ENOENT) { @@ -267,7 +251,7 @@ */ int -File_UnlinkDelayed(ConstUnicode pathName) // IN: +File_UnlinkDelayed(const char *pathName) // IN: { return (FileDeletion(pathName, TRUE) == 0) ? 0 : -1; } @@ -291,8 +275,8 @@ */ int -FileAttributes(ConstUnicode pathName, // IN: - FileData *fileData) // OUT: +FileAttributes(const char *pathName, // IN: + FileData *fileData) // OUT: { int err; struct stat statbuf; @@ -378,7 +362,7 @@ #if !defined(__FreeBSD__) && !defined(sun) Bool -File_IsRemote(ConstUnicode pathName) // IN: Path name +File_IsRemote(const char *pathName) // IN: Path name { if (HostType_OSIsVMK()) { /* @@ -391,7 +375,7 @@ struct statfs sfbuf; if (Posix_Statfs(pathName, &sfbuf) == -1) { - Log(LGPFX" %s: statfs(%s) failed: %s\n", __func__, UTF8(pathName), + Log(LGPFX" %s: statfs(%s) failed: %s\n", __func__, pathName, Err_Errno2String(errno)); return TRUE; @@ -435,7 +419,7 @@ */ Bool -File_IsSymLink(ConstUnicode pathName) // IN: +File_IsSymLink(const char *pathName) // IN: { struct stat statbuf; @@ -461,16 +445,16 @@ *---------------------------------------------------------------------- */ -Unicode -File_Cwd(ConstUnicode drive) // IN: +char * +File_Cwd(const char *drive) // IN: { size_t size; char *buffer; - Unicode path; + char *path; if ((drive != NULL) && !Unicode_IsEmpty(drive)) { Warning(LGPFX" %s: Drive letter %s on Linux?\n", __FUNCTION__, - UTF8(drive)); + drive); } size = FILE_PATH_GROW_SIZE; @@ -528,14 +512,14 @@ *---------------------------------------------------------------------- */ -static Unicode -FileStripFwdSlashes(ConstUnicode pathName) // IN: +static char * +FileStripFwdSlashes(const char *pathName) // IN: { char *ptr; char *path; char *cptr; char *prev; - Unicode result; + char *result; ASSERT(pathName); @@ -590,11 +574,11 @@ *---------------------------------------------------------------------- */ -Unicode -File_FullPath(ConstUnicode pathName) // IN: +char * +File_FullPath(const char *pathName) // IN: { - Unicode cwd; - Unicode ret; + char *cwd; + char *ret; if ((pathName != NULL) && File_IsFullPath(pathName)) { cwd = NULL; @@ -613,17 +597,17 @@ ret = FileStripFwdSlashes(pathName); } } else { - Unicode path = Unicode_Join(cwd, DIRSEPS, pathName, NULL); + char *path = Unicode_Join(cwd, DIRSEPS, pathName, NULL); ret = Posix_RealPath(path); if (ret == NULL) { ret = FileStripFwdSlashes(path); } - Unicode_Free(path); + free(path); } - Unicode_Free(cwd); + free(cwd); return ret; } @@ -646,7 +630,7 @@ */ Bool -File_IsFullPath(ConstUnicode pathName) // IN: +File_IsFullPath(const char *pathName) // IN: { /* start with a slash? */ return (pathName == NULL) ? FALSE : @@ -673,7 +657,7 @@ */ Bool -File_GetTimes(ConstUnicode pathName, // IN: +File_GetTimes(const char *pathName, // IN: VmTimeType *createTime, // OUT: Windows NT time format VmTimeType *accessTime, // OUT: Windows NT time format VmTimeType *writeTime, // OUT: Windows NT time format @@ -690,7 +674,7 @@ if (Posix_Lstat(pathName, &statBuf) == -1) { Log(LGPFX" %s: error stating file \"%s\": %s\n", __FUNCTION__, - UTF8(pathName), Err_Errno2String(errno)); + pathName, Err_Errno2String(errno)); return FALSE; } @@ -813,7 +797,7 @@ */ Bool -File_SetTimes(ConstUnicode pathName, // IN: +File_SetTimes(const char *pathName, // IN: VmTimeType createTime, // IN: ignored VmTimeType accessTime, // IN: Windows NT time format VmTimeType writeTime, // IN: Windows NT time format @@ -832,7 +816,7 @@ path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT); if (path == NULL) { Log(LGPFX" %s: failed to convert \"%s\" to current encoding\n", - __FUNCTION__, UTF8(pathName)); + __FUNCTION__, pathName); return FALSE; } @@ -841,7 +825,7 @@ if (err != 0) { Log(LGPFX" %s: error stating file \"%s\": %s\n", __FUNCTION__, - UTF8(pathName), Err_Errno2String(err)); + pathName, Err_Errno2String(err)); free(path); return FALSE; @@ -882,7 +866,7 @@ if (err != 0) { Log(LGPFX" %s: utimes error on file \"%s\": %s\n", __FUNCTION__, - UTF8(pathName), Err_Errno2String(err)); + pathName, Err_Errno2String(err)); return FALSE; } @@ -908,15 +892,15 @@ */ Bool -File_SetFilePermissions(ConstUnicode pathName, // IN: - int perms) // IN: permissions +File_SetFilePermissions(const char *pathName, // IN: + int perms) // IN: permissions { ASSERT(pathName); if (Posix_Chmod(pathName, perms) == -1) { /* The error is not critical, just log it. */ Log(LGPFX" %s: failed to change permissions on file \"%s\": %s\n", - __FUNCTION__, UTF8(pathName), Err_Errno2String(errno)); + __FUNCTION__, pathName, Err_Errno2String(errno)); return FALSE; } @@ -953,10 +937,10 @@ */ static Bool -FilePosixGetParent(Unicode *canPath) // IN/OUT: Canonical file path +FilePosixGetParent(char **canPath) // IN/OUT: Canonical file path { - Unicode pathName; - Unicode baseName; + char *pathName; + char *baseName; ASSERT(canPath); ASSERT(File_IsFullPath(*canPath)); @@ -967,22 +951,22 @@ File_GetPathName(*canPath, &pathName, &baseName); - Unicode_Free(*canPath); + free(*canPath); if (Unicode_IsEmpty(pathName)) { /* empty string which denotes "/" */ - Unicode_Free(pathName); + free(pathName); *canPath = Unicode_Duplicate("/"); } else { if (Unicode_IsEmpty(baseName)) { // Directory File_GetPathName(pathName, canPath, NULL); - Unicode_Free(pathName); + free(pathName); } else { // File *canPath = pathName; } } - Unicode_Free(baseName); + free(baseName); return FALSE; } @@ -1003,7 +987,7 @@ */ Bool -File_GetParent(Unicode *canPath) // IN/OUT: Canonical file path +File_GetParent(char **canPath) // IN/OUT: Canonical file path { return FilePosixGetParent(canPath); } @@ -1029,12 +1013,12 @@ */ static Bool -FileGetStats(ConstUnicode pathName, // IN: +FileGetStats(const char *pathName, // IN: Bool doNotAscend, // IN: struct statfs *pstatfsbuf) // OUT: { Bool retval = TRUE; - Unicode dupPath = NULL; + char *dupPath = NULL; while (Posix_Statfs(dupPath ? dupPath : pathName, pstatfsbuf) == -1) { @@ -1051,7 +1035,7 @@ FilePosixGetParent(&dupPath); } - Unicode_Free(dupPath); + free(dupPath); return retval; } @@ -1077,11 +1061,11 @@ */ uint64 -File_GetFreeSpace(ConstUnicode pathName, // IN: File name - Bool doNotAscend) // IN: Do not ascend dir chain +File_GetFreeSpace(const char *pathName, // IN: File name + Bool doNotAscend) // IN: Do not ascend dir chain { uint64 ret; - Unicode fullPath; + char *fullPath; struct statfs statfsbuf; fullPath = File_FullPath(pathName); @@ -1096,7 +1080,7 @@ ret = -1; } - Unicode_Free(fullPath); + free(fullPath); return ret; } @@ -1121,13 +1105,13 @@ */ int -File_GetVMFSAttributes(ConstUnicode pathName, // IN: File/dir to test +File_GetVMFSAttributes(const char *pathName, // IN: File/dir to test FS_PartitionListResult **fsAttrs) // IN/OUT: VMFS Info { int fd; int ret; - Unicode fullPath; - Unicode directory = NULL; + char *fullPath; + char *directory = NULL; fullPath = File_FullPath(pathName); if (fullPath == NULL) { @@ -1142,7 +1126,7 @@ } if (!HostType_OSIsVMK()) { - Log(LGPFX" %s: File %s not on VMFS volume\n", __func__, UTF8(pathName)); + Log(LGPFX" %s: File %s not on VMFS volume\n", __func__, pathName); ret = -1; goto bail; } @@ -1157,7 +1141,7 @@ fd = Posix_Open(directory, O_RDONLY, 0); if (fd == -1) { - Log(LGPFX" %s: could not open %s: %s\n", __func__, UTF8(pathName), + Log(LGPFX" %s: could not open %s: %s\n", __func__, pathName, Err_Errno2String(errno)); ret = -1; free(*fsAttrs); @@ -1176,8 +1160,8 @@ close(fd); bail: - Unicode_Free(fullPath); - Unicode_Free(directory); + free(fullPath); + free(directory); return ret; } @@ -1207,9 +1191,9 @@ */ int -File_GetVMFSFSType(ConstUnicode pathName, // IN: File name to test - int fd, // IN: fd of an already opened file - uint16 *fsTypeNum) // OUT: Filesystem type number +File_GetVMFSFSType(const char *pathName, // IN: File name to test + int fd, // IN: fd of an already opened file + uint16 *fsTypeNum) // OUT: Filesystem type number { int ret, savedErrno; Bool fdArg = (fd >= 0); /* fd or pathname ? */ @@ -1223,7 +1207,7 @@ fd = Posix_Open(pathName, O_RDONLY, 0); if (fd < 0) { savedErrno = errno; - Log(LGPFX" %s : Could not open %s : %s\n", __func__, UTF8(pathName), + Log(LGPFX" %s : Could not open %s : %s\n", __func__, pathName, Err_Errno2String(savedErrno)); goto exit; } @@ -1240,7 +1224,7 @@ if (ret == -1) { Log(LGPFX" %s : Could not get filesystem type for %s (fd %d) : %s\n", - __func__, (!fdArg ? UTF8(pathName) : "__na__"), fd, + __func__, (!fdArg ? pathName : "__na__"), fd, Err_Errno2String(savedErrno)); goto exit; } @@ -1273,8 +1257,8 @@ */ int -File_GetVMFSVersion(ConstUnicode pathName, // IN: File name to test - uint32 *versionNum) // OUT: Version number +File_GetVMFSVersion(const char *pathName, // IN: File name to test + uint32 *versionNum) // OUT: Version number { int ret = -1; FS_PartitionListResult *fsAttrs = NULL; @@ -1319,8 +1303,8 @@ */ int -File_GetVMFSBlockSize(ConstUnicode pathName, // IN: File name to test - uint32 *blockSize) // IN/OUT: VMFS block size +File_GetVMFSBlockSize(const char *pathName, // IN: File name to test + uint32 *blockSize) // IN/OUT: VMFS block size { int ret = -1; FS_PartitionListResult *fsAttrs = NULL; @@ -1367,7 +1351,7 @@ */ int -File_GetVMFSMountInfo(ConstUnicode pathName, // IN: +File_GetVMFSMountInfo(const char *pathName, // IN: char **fsType, // OUT: uint32 *version, // OUT: char **remoteIP, // OUT: @@ -1383,19 +1367,17 @@ return -1; } - // Get file IP and mount point + /* Get file IP and mount point */ ret = File_GetVMFSAttributes(pathName, &fsAttrs); if (ret >= 0 && fsAttrs) { *version = fsAttrs->versionNumber; *fsType = Util_SafeStrdup(fsAttrs->fsType); - if (memcmp(fsAttrs->fsType, FS_NFS_ON_ESX, sizeof(FS_NFS_ON_ESX)) == 0) { - /* - * logicalDevice from NFS3 client contains remote IP and remote - * mount point, separated by space. Split them out. If there is - * no space then this is probably NFS41 client, and we cannot - * obtain its remote mount point details at this time. - */ + /* + * We only compare the first 3 characters 'NFS'xx. + * This will cover both NFSv3 and NFSv4.1. + */ + if (strncmp(fsAttrs->fsType, FS_NFS_ON_ESX, FS_NFS_PREFIX_LEN) == 0) { char *sep = strchr(fsAttrs->logicalDevice, ' '); if (sep) { @@ -1437,7 +1419,7 @@ */ static Bool -FileIsVMFS(ConstUnicode pathName) // IN: +FileIsVMFS(const char *pathName) // IN: { Bool result = FALSE; @@ -1482,7 +1464,7 @@ */ Bool -File_SupportsZeroedThick(ConstUnicode pathName) // IN: +File_SupportsZeroedThick(const char *pathName) // IN: { return FileIsVMFS(pathName); } @@ -1508,7 +1490,7 @@ */ Bool -File_SupportsMultiWriter(ConstUnicode pathName) // IN: +File_SupportsMultiWriter(const char *pathName) // IN: { return FileIsVMFS(pathName); } @@ -1532,10 +1514,10 @@ */ uint64 -File_GetCapacity(ConstUnicode pathName) // IN: Path name +File_GetCapacity(const char *pathName) // IN: Path name { uint64 ret; - Unicode fullPath; + char *fullPath; struct statfs statfsbuf; fullPath = File_FullPath(pathName); @@ -1550,7 +1532,7 @@ ret = -1; } - Unicode_Free(fullPath); + free(fullPath); return ret; } @@ -1567,7 +1549,7 @@ * 'path' can be relative (including empty) or absolute, and any number * of non-existing components at the end of 'path' are simply ignored. * - * XXX: On Posix systems, we choose the underlying device's name as the + * XXX: On POSIX systems, we choose the underlying device's name as the * unique ID. I make no claim that this is 100% unique so if you * need this functionality to be 100% perfect, I suggest you think * about it more deeply than I did. -meccleston @@ -1842,7 +1824,7 @@ /* Find the nearest ancestor of 'canPath' that is a mount point. */ for (;;) { char *x; - Bool bind; + Bool bind = FALSE; char *ptr; ptr = FilePosixLookupMountPoint(canPath, &bind); @@ -1887,7 +1869,7 @@ if (*diff != '\0') { Str_Sprintf(canPath, sizeof canPath, "%s%s", - strlen(ptr) > 1 ? ptr : "", diff); + strlen(ptr) > 1 ? ptr : "", diff); } else { Str_Strcpy(canPath, ptr, sizeof canPath); } @@ -2019,8 +2001,8 @@ */ Bool -File_IsSameFile(ConstUnicode path1, // IN: - ConstUnicode path2) // IN: +File_IsSameFile(const char *path1, // IN: + const char *path2) // IN: { struct stat st1; struct stat st2; @@ -2057,7 +2039,7 @@ return FALSE; } - if (HostType_OSIsPureVMK()) { + if (HostType_OSIsVMK()) { /* * On ESX, post change 1074635 the st_dev field of the stat structure * is valid and differentiates between resident devices or NFS file @@ -2136,8 +2118,8 @@ */ Bool -File_Replace(ConstUnicode oldName, // IN: old file - ConstUnicode newName) // IN: new file +File_Replace(const char *oldName, // IN: old file + const char *newName) // IN: new file { int status = 0; Bool result = FALSE; @@ -2278,25 +2260,25 @@ */ static Bool -FilePosixCreateTestGetMaxOrSupportsFileSize(ConstUnicode dirName,// IN: test dir +FilePosixCreateTestGetMaxOrSupportsFileSize(const char *dirName, // IN: test dir uint64 *fileSize, // IN/OUT: Bool getMaxFileSize) // IN: { Bool retVal; int posixFD; - Unicode temp; - Unicode path; + char *temp; + char *path; FileIODescriptor fd; ASSERT(fileSize); temp = Unicode_Append(dirName, "/.vmBigFileTest"); posixFD = File_MakeSafeTemp(temp, &path); - Unicode_Free(temp); + free(temp); if (posixFD == -1) { Log(LGPFX" %s: Failed to create temporary file in dir: %s\n", __func__, - UTF8(dirName)); + dirName); return FALSE; } @@ -2309,7 +2291,7 @@ FileIO_Close(&fd); File_Unlink(path); - Unicode_Free(path); + free(path); return retVal; } @@ -2336,21 +2318,21 @@ */ static Bool -FileVMKGetMaxFileSize(ConstUnicode pathName, // IN: - uint64 *maxFileSize) // OUT: +FileVMKGetMaxFileSize(const char *pathName, // IN: + uint64 *maxFileSize) // OUT: { int fd; Bool retval = TRUE; - Unicode fullPath; + char *fullPath; - Unicode dirPath = NULL; + char *dirPath = NULL; ASSERT(maxFileSize); fullPath = File_FullPath(pathName); if (fullPath == NULL) { Log(LGPFX" %s: Failed to get the full path for %s\n", __func__, - UTF8(pathName)); + pathName); retval = FALSE; goto bail; } @@ -2369,22 +2351,22 @@ */ fd = Posix_Open(dirPath, O_RDONLY, 0); if (fd == -1) { - Log(LGPFX" %s: could not open %s: %s\n", __func__, UTF8(dirPath), + Log(LGPFX" %s: could not open %s: %s\n", __func__, dirPath, Err_Errno2String(errno)); retval = FALSE; goto bail; } - if(ioctl(fd, IOCTLCMD_VMFS_GET_MAX_FILE_SIZE, maxFileSize) == -1) { + if (ioctl(fd, IOCTLCMD_VMFS_GET_MAX_FILE_SIZE, maxFileSize) == -1) { Log(LGPFX" %s: Could not get max file size for path: %s, error: %s\n", - __func__, UTF8(pathName), Err_Errno2String(errno)); + __func__, pathName, Err_Errno2String(errno)); retval = FALSE; } close(fd); bail: - Unicode_Free(fullPath); - Unicode_Free(dirPath); + free(fullPath); + free(dirPath); return retval; } @@ -2418,9 +2400,9 @@ */ static Bool -FileVMKGetMaxOrSupportsFileSize(ConstUnicode pathName, // IN: - uint64 *fileSize, // IN/OUT: - Bool getMaxFileSize) // IN: +FileVMKGetMaxOrSupportsFileSize(const char *pathName, // IN: + uint64 *fileSize, // IN/OUT: + Bool getMaxFileSize) // IN: { #if defined(VMX86_SERVER) FS_PartitionListResult *fsAttrs = NULL; @@ -2480,8 +2462,8 @@ return *fileSize <= maxFileSize; } } else { - Unicode fullPath; - Unicode parentPath; + char *fullPath; + char *parentPath; Bool supported; Log(LGPFX" %s: Trying create file and seek approach.\n", __func__); @@ -2501,8 +2483,8 @@ getMaxFileSize); free(fsAttrs); - Unicode_Free(fullPath); - Unicode_Free(parentPath); + free(fullPath); + free(parentPath); return supported; } @@ -2541,12 +2523,12 @@ */ Bool -FileGetMaxOrSupportsFileSize(ConstUnicode pathName, // IN: - uint64 *fileSize, // IN/OUT: - Bool getMaxFileSize) // IN: +FileGetMaxOrSupportsFileSize(const char *pathName, // IN: + uint64 *fileSize, // IN/OUT: + Bool getMaxFileSize) // IN: { - Unicode fullPath; - Unicode folderPath; + char *fullPath; + char *folderPath; Bool retval = FALSE; ASSERT(fileSize); @@ -2600,10 +2582,10 @@ retval = FilePosixCreateTestGetMaxOrSupportsFileSize(folderPath, fileSize, getMaxFileSize); - Unicode_Free(folderPath); + free(folderPath); out: - Unicode_Free(fullPath); + free(fullPath); return retval; } @@ -2630,8 +2612,8 @@ */ Bool -File_GetMaxFileSize(ConstUnicode pathName, // IN: - uint64 *maxFileSize) // OUT: +File_GetMaxFileSize(const char *pathName, // IN: + uint64 *maxFileSize) // OUT: { Bool result; @@ -2674,8 +2656,8 @@ */ Bool -File_SupportsFileSize(ConstUnicode pathName, // IN: - uint64 fileSize) // IN: +File_SupportsFileSize(const char *pathName, // IN: + uint64 fileSize) // IN: { /* * All supported filesystems can hold at least 2GB-1 bytes files. @@ -2713,8 +2695,8 @@ */ int -FileCreateDirectory(ConstUnicode pathName, // IN: - int mask) // IN: +FileCreateDirectory(const char *pathName, // IN: + int mask) // IN: { int err; @@ -2741,7 +2723,7 @@ * Side effects: * If ids is provided and the function succeeds, memory is * allocated for both the unicode strings and the array itself - * and must be freed. (See Unicode_FreeList.) + * and must be freed. (See Util_FreeStringList.) * The memory allocated for the array may be larger than necessary. * The caller may trim it with realloc() if it cares. * @@ -2756,7 +2738,7 @@ void *value, // IN: void *clientData) // IN: { - Unicode_Free((void *) key); + free((void *) key); return 0; } @@ -2774,8 +2756,8 @@ } int -File_ListDirectory(ConstUnicode pathName, // IN: - Unicode **ids) // OUT: relative paths +File_ListDirectory(const char *pathName, // IN: + char ***ids) // OUT: relative paths { int err; DIR *dir; @@ -2812,7 +2794,7 @@ /* Don't create the file list if we aren't providing it to the caller. */ if (ids) { - Unicode id; + char *id; if (Unicode_IsBufferValid(entry->d_name, -1, STRING_ENCODING_DEFAULT)) { @@ -2824,7 +2806,7 @@ Warning("%s: file '%s' in directory '%s' cannot be converted to " "UTF8\n", __FUNCTION__, pathName, id); - Unicode_Free(id); + free(id); id = Unicode_Duplicate(UNICODE_SUBSTITUTION_CHAR UNICODE_SUBSTITUTION_CHAR @@ -2843,7 +2825,7 @@ if (HashTable_Insert(hash, id, NULL)) { count++; } else { - Unicode_Free(id); + free(id); } } else { count++; @@ -2874,7 +2856,33 @@ } -#if CAN_USE_FTS +/* + *----------------------------------------------------------------------------- + * + * File_WalkDirectoryEnd -- + * + * End the directory traversal. + * + * Results: + * None + * + * Side effects: + * The context is now invalid. + * + *----------------------------------------------------------------------------- + */ + +void +File_WalkDirectoryEnd(WalkDirContext context) // IN: +{ + if (context != NULL) { + if (context->cnt > 0) { + Util_FreeStringList(context->files, context->cnt); + } + free(context); + } +} + /* *----------------------------------------------------------------------------- @@ -2886,12 +2894,6 @@ * To read each entry, repeatedly pass the returned context to * File_WalkDirectoryNext() until that function returns FALSE. * - * When done, pass the returned context to File_WalkDirectoryEnd(). - * - * A pre-order, logical traversal will be completed; hard links and - * symbolic links that do not cause a cycle are followed in the directory - * traversal. - * * We assume no thread will change the working directory between the calls * to File_WalkDirectoryStart and File_WalkDirectoryEnd. * @@ -2906,26 +2908,21 @@ */ WalkDirContext -File_WalkDirectoryStart(ConstUnicode parentPath) // IN: +File_WalkDirectoryStart(const char *parentPath) // IN: { - WalkDirContextImpl *context; - char * const traversalRoots[] = - { Unicode_GetAllocBytes(parentPath, STRING_ENCODING_DEFAULT), NULL }; + WalkDirContextImpl *context = malloc(sizeof *context); - context = malloc(sizeof *context); - if (!context) { - return NULL; - } - - context->fts = fts_open(traversalRoots, FTS_LOGICAL|FTS_NOSTAT|FTS_NOCHDIR, - NULL); - if (!context->fts) { - free(context); - context = NULL; + if (context != NULL) { + context->files = NULL; + context->iter = 0; + context->cnt = File_ListDirectory(parentPath, &context->files); + + if (context->cnt == -1) { + File_WalkDirectoryEnd(context); + context = NULL; + } } - free(traversalRoots[0]); - return context; } @@ -2941,8 +2938,8 @@ * Results: * TRUE iff the traversal hasn't completed. * - * If TRUE, *path holds an allocated string prefixed by parentPath that - * the caller must free (see Unicode_Free). + * If TRUE, *path holds an allocated string of a directory entry that the + * caller must free (see free). * * If FALSE, errno is 0 iff the walk completed sucessfully. * @@ -2954,112 +2951,22 @@ Bool File_WalkDirectoryNext(WalkDirContext context, // IN: - Unicode *path) // OUT: + char **path) // OUT: { - FTSENT *nextEntry; - ASSERT(context); - ASSERT(context->fts); ASSERT(path); - do { - nextEntry = fts_read(context->fts); - - /* - * We'll skip any entries that cannot be read, are errors, or - * are the second traversal (post-order) of a directory. - */ - - if (nextEntry && - nextEntry->fts_info != FTS_DNR && - nextEntry->fts_info != FTS_ERR && - nextEntry->fts_info != FTS_DP) { - *path = Unicode_AllocWithLength(nextEntry->fts_path, - nextEntry->fts_pathlen, - STRING_ENCODING_DEFAULT); - - return TRUE; - } - } while (nextEntry); + errno = 0; // Any errors showed up at "start time". - return FALSE; -} - - -/* - *----------------------------------------------------------------------------- - * - * File_WalkDirectoryEnd -- - * - * End the directory traversal. - * - * Results: - * None - * - * Side effects: - * The context is now invalid. - * - *----------------------------------------------------------------------------- - */ - -void -File_WalkDirectoryEnd(WalkDirContext context) // IN: -{ - ASSERT(context); - ASSERT(context->fts); - - if (fts_close(context->fts) == -1) { - Log(LGPFX" %s: failed to close fts: %p\n", __FUNCTION__, context->fts); + if (context->iter < context->cnt) { + *path = Util_SafeStrdup(context->files[context->iter++]); + return TRUE; } - free((WalkDirContextImpl *)context); -} - -#else - - -/* - *----------------------------------------------------------------------------- - * - * File_WalkDirectoryStart -- - * File_WalkDirectoryNext -- - * File_WalkDirectoryEnd -- - * - * XXX FTS is not supported on this posix variant. See above. - * - * Results: - * None - * - * Side effects: - * ASSERTs. - * - *----------------------------------------------------------------------------- - */ - -WalkDirContext -File_WalkDirectoryStart(ConstUnicode parentPath) // IN: -{ - NOT_IMPLEMENTED(); -} - - -Bool -File_WalkDirectoryNext(WalkDirContext context, // IN: - Unicode *path) // OUT: -{ - NOT_IMPLEMENTED(); -} - -void -File_WalkDirectoryEnd(WalkDirContext context) // IN: -{ - NOT_IMPLEMENTED(); + return FALSE; } -#endif // CAN_USE_FTS - - /* *---------------------------------------------------------------------- * @@ -3151,7 +3058,7 @@ */ Bool -FileIsWritableDir(ConstUnicode dirName) // IN: +FileIsWritableDir(const char *dirName) // IN: { int err; uid_t euid; @@ -3203,7 +3110,7 @@ */ Bool -File_MakeCfgFileExecutable(ConstUnicode pathName) // IN: +File_MakeCfgFileExecutable(const char *pathName) // IN: { struct stat s; @@ -3242,7 +3149,7 @@ */ int64 -File_GetSizeAlternate(ConstUnicode pathName) // IN: +File_GetSizeAlternate(const char *pathName) // IN: { return File_GetSize(pathName); } @@ -3269,7 +3176,7 @@ */ Bool -File_IsCharDevice(ConstUnicode pathName) // IN: +File_IsCharDevice(const char *pathName) // IN: { FileData fileData; diff -Nru open-vm-tools-9.10.2-2822639/lib/file/fileStandAlone.c open-vm-tools-10.0.0-3000743/lib/file/fileStandAlone.c --- open-vm-tools-9.10.2-2822639/lib/file/fileStandAlone.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/file/fileStandAlone.c 2015-09-10 07:31:38.000000000 +0000 @@ -42,6 +42,7 @@ #include "vmware.h" #include "util.h" #include "str.h" +#include "strutil.h" #include "posix.h" #include "file.h" @@ -66,7 +67,7 @@ */ int64 -File_GetModTime(ConstUnicode pathName) // IN: +File_GetModTime(const char *pathName) // IN: { int64 theTime; struct stat statbuf; @@ -91,7 +92,7 @@ * * Results: * As described. - * + * * Side effects: * None. * @@ -99,7 +100,7 @@ */ UnicodeIndex -FileFirstSlashIndex(ConstUnicode pathName, // IN: +FileFirstSlashIndex(const char *pathName, // IN: UnicodeIndex startIndex) // IN: { UnicodeIndex firstFS; @@ -138,7 +139,7 @@ * * Results: * As described. - * + * * Side effects: * None. * @@ -146,7 +147,7 @@ */ static UnicodeIndex -FileLastSlashIndex(ConstUnicode pathName, // IN: +FileLastSlashIndex(const char *pathName, // IN: UnicodeIndex startIndex) // IN: { UnicodeIndex lastFS; @@ -202,7 +203,7 @@ * * Results: * As described. - * + * * Side effects: * None. * @@ -210,14 +211,14 @@ */ void -File_SplitName(ConstUnicode pathName, // IN: - Unicode *volume, // OUT (OPT): - Unicode *directory, // OUT (OPT): - Unicode *base) // OUT (OPT): -{ - Unicode vol; - Unicode dir; - Unicode bas; +File_SplitName(const char *pathName, // IN: + char **volume, // OUT/OPT: + char **directory, // OUT/OPT: + char **base) // OUT/OPT: +{ + char *vol; + char *dir; + char *bas; UnicodeIndex volEnd; UnicodeIndex length; UnicodeIndex baseBegin; @@ -234,8 +235,8 @@ #if defined(_WIN32) pathLen = Unicode_LengthInCodePoints(pathName); if ((pathLen > 2) && - (Unicode_StartsWith(pathName, "\\\\") || - Unicode_StartsWith(pathName, "//"))) { + (StrUtil_StartsWith(pathName, "\\\\") || + StrUtil_StartsWith(pathName, "//"))) { /* UNC path */ volEnd = FileFirstSlashIndex(pathName, 2); @@ -298,19 +299,19 @@ if (volume) { *volume = vol; } else { - Unicode_Free(vol); + free(vol); } if (directory) { *directory = dir; } else { - Unicode_Free(dir); + free(dir); } if (base) { *base = bas; } else { - Unicode_Free(bas); + free(bas); } } @@ -351,12 +352,12 @@ *--------------------------------------------------------------------------- */ -Unicode -File_PathJoin(ConstUnicode dirName, // IN: - ConstUnicode baseName) // IN: See above. +char * +File_PathJoin(const char *dirName, // IN: + const char *baseName) // IN: See above. { - Unicode result; - Unicode newDir = NULL; + char *result; + char *newDir = NULL; ASSERT(dirName); ASSERT(baseName); @@ -366,7 +367,7 @@ */ #if defined(_WIN32) { - ConstUnicode oldBaseName = baseName; + const char *oldBaseName = baseName; /* * Reject drive letters in baseName. @@ -396,7 +397,7 @@ newDir = File_StripSlashes(dirName); result = Unicode_Join(newDir, DIRSEPS, baseName, NULL); - Unicode_Free(newDir); + free(newDir); return result; } @@ -420,28 +421,28 @@ * A NULL pointer may be passed for one or more OUT parameters, * in which case that parameter is not returned. * - * Results: + * Results: * As described. * - * Side effects: + * Side effects: * The return values must be freed. * *--------------------------------------------------------------------------- */ -void -File_GetPathName(ConstUnicode fullPath, // IN: - Unicode *pathName, // OUT (OPT): - Unicode *baseName) // OUT (OPT): +void +File_GetPathName(const char *fullPath, // IN: + char **pathName, // OUT/OPT: + char **baseName) // OUT/OPT: { - Unicode volume; + char *volume; UnicodeIndex len; UnicodeIndex curLen; File_SplitName(fullPath, &volume, pathName, baseName); if (pathName == NULL) { - Unicode_Free(volume); + free(volume); return; } @@ -450,12 +451,12 @@ */ if (!Unicode_IsEmpty(volume)) { - Unicode temp = Unicode_Append(volume, *pathName); + char *temp = Unicode_Append(volume, *pathName); - Unicode_Free(*pathName); + free(*pathName); *pathName = temp; } - Unicode_Free(volume); + free(volume); /* * Remove any trailing directory separator characters. @@ -471,9 +472,9 @@ } if (curLen < len) { - Unicode temp = Unicode_Substr(*pathName, 0, curLen); + char *temp = Unicode_Substr(*pathName, 0, curLen); - Unicode_Free(*pathName); + free(*pathName); *pathName = temp; } } @@ -495,10 +496,13 @@ *---------------------------------------------------------------------- */ -Unicode -File_StripSlashes(ConstUnicode path) // IN: +char * +File_StripSlashes(const char *path) // IN: { - Unicode result, volume, dir, base; + char *result; + char *volume; + char *dir; + char *base; /* * SplitName handles all drive letter/UNC/whatever cases, all we @@ -526,16 +530,16 @@ i--; } - Unicode_Free(dir); + free(dir); dir = Unicode_AllocWithLength(dir2, i, STRING_ENCODING_UTF8); free(dir2); } result = Unicode_Join(volume, dir, base, NULL); - Unicode_Free(volume); - Unicode_Free(dir); - Unicode_Free(base); + free(volume); + free(dir); + free(base); return result; } @@ -714,28 +718,28 @@ *----------------------------------------------------------------------------- */ -Unicode -File_ReplaceExtension(ConstUnicode pathName, // IN: - ConstUnicode newExtension, // IN: - uint32 numExtensions, // IN: - ...) // IN: -{ - Unicode path; - Unicode base; - Unicode result; +char * +File_ReplaceExtension(const char *pathName, // IN: + const char *newExtension, // IN: + uint32 numExtensions, // IN: + ...) // IN: +{ + char *path; + char *base; + char *result; va_list arguments; UnicodeIndex index; - + ASSERT(pathName); ASSERT(newExtension); - ASSERT(Unicode_StartsWith(newExtension, ".")); + ASSERT(*newExtension == '.'); File_GetPathName(pathName, &path, &base); index = Unicode_FindLast(base, "."); if (index != UNICODE_INDEX_NOT_FOUND) { - Unicode oldBase = base; + char *oldBase = base; if (numExtensions) { uint32 i; @@ -748,9 +752,9 @@ va_start(arguments, numExtensions); for (i = 0; i < numExtensions ; i++) { - Unicode oldExtension = va_arg(arguments, Unicode); + char *oldExtension = va_arg(arguments, char *); - ASSERT(Unicode_StartsWith(oldExtension, ".")); + ASSERT(*oldExtension == '.'); if (Unicode_CompareRange(base, index, -1, oldExtension, 0, -1, FALSE) == 0) { @@ -766,7 +770,7 @@ } if (oldBase != base) { - Unicode_Free(oldBase); + free(oldBase); } } @@ -776,8 +780,8 @@ result = Unicode_Join(path, DIRSEPS, base, newExtension, NULL); } - Unicode_Free(path); - Unicode_Free(base); + free(path); + free(base); return result; } @@ -801,8 +805,8 @@ *----------------------------------------------------------------------------- */ -Unicode -File_RemoveExtension(ConstUnicode pathName) // IN: +char * +File_RemoveExtension(const char *pathName) // IN: { UnicodeIndex index; diff -Nru open-vm-tools-9.10.2-2822639/lib/file/fileTemp.c open-vm-tools-10.0.0-3000743/lib/file/fileTemp.c --- open-vm-tools-9.10.2-2822639/lib/file/fileTemp.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/file/fileTemp.c 2015-09-10 07:31:38.000000000 +0000 @@ -115,17 +115,17 @@ */ int -File_MakeTempEx2(ConstUnicode dir, // IN: +File_MakeTempEx2(const char *dir, // IN: Bool createTempFile, // IN: File_MakeTempCreateNameFunc *createNameFunc, // IN: void *createNameFuncData, // IN: - Unicode *presult) // OUT: + char **presult) // OUT: { uint32 i; int fd = -1; uint32 var = 0; - Unicode path = NULL; + char *path = NULL; if ((dir == NULL) || (createNameFunc == NULL)) { errno = EFAULT; @@ -138,10 +138,10 @@ *presult = NULL; for (i = 0; i < (MAX_INT32 / 2); i++) { - Unicode fileName; + char *fileName; /* construct suffixed pathname to use */ - Unicode_Free(path); + free(path); path = NULL; /* @@ -160,7 +160,7 @@ /* construct base full pathname to use */ path = Unicode_Join(dir, DIRSEPS, fileName, NULL); - Unicode_Free(fileName); + free(fileName); if (createTempFile) { fd = Posix_Open(path, O_CREAT | O_EXCL | O_BINARY | O_RDWR, 0600); @@ -177,7 +177,7 @@ if (errno != EEXIST) { Log(LGPFX" Failed to create temporary %s \"%s\": %s.\n", createTempFile ? "file" : "directory", - UTF8(path), strerror(errno)); + path, strerror(errno)); goto exit; } } @@ -185,13 +185,13 @@ if (fd == -1) { Warning(LGPFX" Failed to create temporary %s \"%s\": " "The name space is full.\n", - createTempFile ? "file" : "directory", UTF8(path)); + createTempFile ? "file" : "directory", path); errno = EAGAIN; } exit: - Unicode_Free(path); + free(path); return fd; } @@ -209,7 +209,7 @@ * 'num' specifies the nth time this function is called. * * 'data' specifies the payload that is specified when File_MakeTempEx2() - * function is called. This points to a Unicode string. + * function is called. This points to a UTF8 string. * * Results: * if successful, a dynamically allocated string with the basename of @@ -221,7 +221,7 @@ *---------------------------------------------------------------------------- */ -static Unicode +static char * FileMakeTempExCreateNameFunc(uint32 num, // IN: void *data) // IN: { @@ -229,7 +229,7 @@ return NULL; } - return Unicode_Format("%s%u", (Unicode) data, num); + return Unicode_Format("%s%u", (char *) data, num); } @@ -258,9 +258,9 @@ */ int -File_MakeTempEx(ConstUnicode dir, // IN: - ConstUnicode fileName, // IN: - Unicode *presult) // OUT: +File_MakeTempEx(const char *dir, // IN: + const char *fileName, // IN: + char **presult) // OUT: { return File_MakeTempEx2(dir, TRUE, FileMakeTempExCreateNameFunc, (void *) fileName, presult); @@ -287,19 +287,19 @@ *---------------------------------------------------------------------- */ -Unicode -File_MakeSafeTempDir(ConstUnicode prefix) // IN: +char * +File_MakeSafeTempDir(const char *prefix) // IN: { - Unicode result = NULL; - Unicode dir = File_GetSafeTmpDir(TRUE); + char *result = NULL; + char *dir = File_GetSafeTmpDir(TRUE); if (dir != NULL) { - ConstUnicode effectivePrefix = (prefix == NULL) ? "safeDir" : prefix; + const char *effectivePrefix = (prefix == NULL) ? "safeDir" : prefix; File_MakeTempEx2(dir, FALSE, FileMakeTempExCreateNameFunc, (void *) effectivePrefix, &result); - Unicode_Free(dir); + free(dir); } return result; @@ -324,12 +324,12 @@ */ int -File_MakeSafeTemp(ConstUnicode tag, // IN (OPT): - Unicode *presult) // OUT: +File_MakeSafeTemp(const char *tag, // IN (OPT): + char **presult) // OUT: { int fd; - Unicode dir = NULL; - Unicode fileName = NULL; + char *dir = NULL; + char *fileName = NULL; ASSERT(presult); @@ -344,8 +344,8 @@ fd = File_MakeTempEx(dir, fileName, presult); - Unicode_Free(dir); - Unicode_Free(fileName); + free(dir); + free(fileName); return fd; } @@ -370,13 +370,14 @@ */ Bool -File_DoesVolumeSupportAcls(ConstUnicode path) // IN: +File_DoesVolumeSupportAcls(const char *path) // IN: { Bool succeeded = FALSE; #if defined(_WIN32) Bool res; - Unicode vol, vol2; + char *vol; + char *vol2; const utf16_t *vol2W; DWORD fsFlags; @@ -402,8 +403,8 @@ succeeded = TRUE; exit: - Unicode_Free(vol); - Unicode_Free(vol2); + free(vol); + free(vol2); #endif return succeeded; diff -Nru open-vm-tools-9.10.2-2822639/lib/file/fileTempPosix.c open-vm-tools-10.0.0-3000743/lib/file/fileTempPosix.c --- open-vm-tools-9.10.2-2822639/lib/file/fileTempPosix.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/file/fileTempPosix.c 2015-09-10 07:31:38.000000000 +0000 @@ -36,10 +36,6 @@ # include #endif -#if defined(sun) -# include -#endif - #include "vmware.h" #include "file.h" #include "fileInt.h" @@ -325,16 +321,16 @@ *----------------------------------------------------------------------------- */ -static Unicode +static char * FileFindExistingSafeTmpDir(uid_t userId, // IN: const char *userName, // IN: const char *baseTmpDir) // IN: { int i; int numFiles; - Unicode pattern; - Unicode tmpDir = NULL; - Unicode *fileList = NULL; + char *pattern; + char *tmpDir = NULL; + char **fileList = NULL; /* * We always use the pattern PRODUCT-USER-xxxx when creating @@ -350,15 +346,14 @@ numFiles = File_ListDirectory(baseTmpDir, &fileList); if (numFiles == -1) { - Unicode_Free(pattern); + free(pattern); return NULL; } for (i = 0; i < numFiles; i++) { if (Unicode_StartsWith(fileList[i], pattern)) { - Unicode path = Unicode_Join(baseTmpDir, DIRSEPS, fileList[i], - NULL); + char *path = Unicode_Join(baseTmpDir, DIRSEPS, fileList[i], NULL); if (File_IsDirectory(path) && FileAcceptableSafeTmpDir(path, userId)) { @@ -366,12 +361,12 @@ break; } - Unicode_Free(path); + free(path); } } - Unicode_FreeList(fileList, numFiles); - Unicode_Free(pattern); + Util_FreeStringList(fileList, numFiles); + free(pattern); return tmpDir; } diff -Nru open-vm-tools-9.10.2-2822639/lib/foundryMsg/foundryMsg.c open-vm-tools-10.0.0-3000743/lib/foundryMsg/foundryMsg.c --- open-vm-tools-9.10.2-2822639/lib/foundryMsg/foundryMsg.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/foundryMsg/foundryMsg.c 2015-09-10 07:31:38.000000000 +0000 @@ -254,31 +254,19 @@ VIX_COMMAND_CATEGORY_PRIVILEGED), VIX_DEFINE_UNUSED_COMMAND, - /* - * vProbes are only available remotely through VIX, so we should - * let them through. If they get added to the VMODL with their own - * permissions, then we will have to revisit. - */ - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_GET_VPROBES_VERSION, - VIX_COMMAND_CATEGORY_ALWAYS_ALLOWED), - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_GET_VPROBES, - VIX_COMMAND_CATEGORY_ALWAYS_ALLOWED), - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_VPROBE_GET_GLOBALS, - VIX_COMMAND_CATEGORY_ALWAYS_ALLOWED), - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_VPROBE_LOAD, - VIX_COMMAND_CATEGORY_ALWAYS_ALLOWED), - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_VPROBE_RESET, - VIX_COMMAND_CATEGORY_ALWAYS_ALLOWED), + VIX_DEFINE_UNUSED_COMMAND, + VIX_DEFINE_UNUSED_COMMAND, + VIX_DEFINE_UNUSED_COMMAND, + VIX_DEFINE_UNUSED_COMMAND, + VIX_DEFINE_UNUSED_COMMAND, VIX_DEFINE_UNUSED_COMMAND, VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_CONNECT_HOST, VIX_COMMAND_CATEGORY_PRIVILEGED), VIX_DEFINE_UNUSED_COMMAND, VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_CREATE_LINKED_CLONE, VIX_COMMAND_CATEGORY_PRIVILEGED), - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_STOP_SNAPSHOT_LOG_RECORDING, - VIX_COMMAND_CATEGORY_PRIVILEGED), - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_STOP_SNAPSHOT_LOG_PLAYBACK, - VIX_COMMAND_CATEGORY_PRIVILEGED), + VIX_DEFINE_UNUSED_COMMAND, + VIX_DEFINE_UNUSED_COMMAND, /* * HOWTO: Adding a new Vix Command. Step 2b. * Take the command you added to vixCommands.h, and add it to this @@ -323,12 +311,9 @@ VIX_COMMAND_CATEGORY_PRIVILEGED), VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_HOT_REMOVE_DEVICE, VIX_COMMAND_CATEGORY_PRIVILEGED), - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_DEBUGGER_ATTACH, - VIX_COMMAND_CATEGORY_PRIVILEGED), - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_DEBUGGER_DETACH, - VIX_COMMAND_CATEGORY_PRIVILEGED), - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_DEBUGGER_SEND_COMMAND, - VIX_COMMAND_CATEGORY_PRIVILEGED), + VIX_DEFINE_UNUSED_COMMAND, + VIX_DEFINE_UNUSED_COMMAND, + VIX_DEFINE_UNUSED_COMMAND, VIX_DEFINE_UNUSED_COMMAND, VIX_DEFINE_UNUSED_COMMAND, VIX_DEFINE_UNUSED_COMMAND, diff -Nru open-vm-tools-9.10.2-2822639/lib/foundryMsg/vixTranslateErrOpenSource.c open-vm-tools-10.0.0-3000743/lib/foundryMsg/vixTranslateErrOpenSource.c --- open-vm-tools-9.10.2-2822639/lib/foundryMsg/vixTranslateErrOpenSource.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/foundryMsg/vixTranslateErrOpenSource.c 2015-09-10 07:31:38.000000000 +0000 @@ -1,4 +1,3 @@ - /********************************************************* * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. * @@ -62,7 +61,7 @@ { VixError err = VIX_E_FAIL; #ifdef _WIN32 - Unicode msg; + char *msg; switch (systemError) { case ERROR_INVALID_PARAMETER: @@ -84,7 +83,7 @@ Log("Foundry operation failed with guest windows registry error: %s (%d), translated to %"FMT64"d\n", msg, systemError, err); - Unicode_Free(msg); + free(msg); #endif return err; @@ -111,7 +110,7 @@ { VixError err = VIX_E_FAIL; #ifdef _WIN32 - Unicode msg; + char *msg; switch (systemError) { case ERROR_ACCESS_DENIED: @@ -179,7 +178,7 @@ Log("Foundry operation failed with system error: %s (%d), translated to %"FMT64"d\n", msg, systemError, err); - Unicode_Free(msg); + free(msg); #else // linux, other *nix err = Vix_TranslateErrno(systemError); diff -Nru open-vm-tools-9.10.2-2822639/lib/glibUtils/fileLogger.c open-vm-tools-10.0.0-3000743/lib/glibUtils/fileLogger.c --- open-vm-tools-9.10.2-2822639/lib/glibUtils/fileLogger.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/glibUtils/fileLogger.c 2015-09-10 07:31:38.000000000 +0000 @@ -99,6 +99,30 @@ /* + * This function is a temporary workaround for a broken glib version + * 2.42.2 that is missing g_get_user_name_utf8 export. After glib + * is fixed this needs to be removed and call to GlibGetUserName + * replaced by g_get_user_name. See bug 1434059 for details. + */ +const char* GlibGetUserName() +{ +#if !defined(_WIN32) + return g_get_user_name(); +#else + wchar_t buffer[256] = { 0 }; + DWORD len = ARRAYSIZE(buffer); + static char* user_name_utf8 = NULL; + if (!user_name_utf8) { + if (GetUserNameW(buffer, &len)) { + user_name_utf8 = g_utf16_to_utf8(buffer, -1, NULL, NULL, NULL); + } + } + return user_name_utf8; +#endif +} + + +/* ******************************************************************************* * FileLoggerGetPath -- */ /** * @@ -135,7 +159,7 @@ size_t i; logpath = g_strdup(data->path); - vars[1] = (char *) g_get_user_name(); + vars[1] = (char *) GlibGetUserName(); vars[3] = g_strdup_printf("%u", (unsigned int) getpid()); g_snprintf(indexStr, sizeof indexStr, "%d", index); diff -Nru open-vm-tools-9.10.2-2822639/lib/guestRpc/nicinfo.x open-vm-tools-10.0.0-3000743/lib/guestRpc/nicinfo.x --- open-vm-tools-9.10.2-2822639/lib/guestRpc/nicinfo.x 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/guestRpc/nicinfo.x 2015-09-10 07:31:38.000000000 +0000 @@ -38,7 +38,7 @@ * The IP limit is large enough to hold an IP address (either v4 or v6). */ const NICINFO_MAX_IP_LEN = 64; -const NICINFO_MAX_IPS = 64; +const NICINFO_MAX_IPS = 2048; const NICINFO_MAX_NICS = 16; /* MAC Addresses are "AA:BB:CC:DD:EE:FF" = 18 bytes. */ diff -Nru open-vm-tools-9.10.2-2822639/lib/hashMap/hashMap.c open-vm-tools-10.0.0-3000743/lib/hashMap/hashMap.c --- open-vm-tools-9.10.2-2822639/lib/hashMap/hashMap.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hashMap/hashMap.c 2015-09-10 07:31:38.000000000 +0000 @@ -538,6 +538,7 @@ return map->count; } + #ifdef VMX86_SERVER /* * ---------------------------------------------------------------------------- @@ -554,6 +555,7 @@ * * ---------------------------------------------------------------------------- */ + uint64 HashMap_Store(struct HashMap *map, // IN void *h, // IN @@ -581,12 +583,9 @@ vec.iov_len = sizeof hashMapOnDisk; numBytes = vec.iov_len; - aioErr = AIOMgr_Queue(*handle, &vec, 1, OP_WRITE, - startByteOffset, numBytes, AIOMGR_INVALID_IO_REQUEST_ID, NULL, NULL ); - if (AIOMgr_IsAsync(aioErr)) { - aioErr = AIOMgr_Sync(*handle); - } - + aioErr = AIOMgr_Queue(*handle, &vec, 1, OP_WRITE, startByteOffset, numBytes, + AIOMGR_INVALID_IO_REQUEST_ID, NULL, NULL); + ASSERT(!AIOMgr_IsAsync(aioErr)); if (!AIOMgr_IsSuccess(aioErr)) { return -1; } @@ -598,11 +597,9 @@ vec.iov_len = map->numEntries * map->entrySize; aioErr = AIOMgr_Queue(*handle, &vec, 1, OP_WRITE, - startByteOffset + numBytes, vec.iov_len, AIOMGR_INVALID_IO_REQUEST_ID, NULL, NULL ); - if (AIOMgr_IsAsync(aioErr)) { - aioErr = AIOMgr_Sync(*handle); - } - + startByteOffset + numBytes, vec.iov_len, + AIOMGR_INVALID_IO_REQUEST_ID, NULL, NULL); + ASSERT(!AIOMgr_IsAsync(aioErr)); if (!AIOMgr_IsSuccess(aioErr)) { return -1; } @@ -648,11 +645,10 @@ vec.iov_len = sizeof hashMapOnDisk; numBytes = vec.iov_len; if (handle) { - aioErr = AIOMgr_Queue(*handle, &vec, 1, OP_READ, - startByteOffset, numBytes, AIOMGR_INVALID_IO_REQUEST_ID, NULL, NULL ); - if (AIOMgr_IsAsync(aioErr)) { - aioErr = AIOMgr_Sync(*handle); - } + aioErr = AIOMgr_Queue(*handle, &vec, 1, OP_READ, startByteOffset, + numBytes, AIOMGR_INVALID_IO_REQUEST_ID, NULL, + NULL); + ASSERT(!AIOMgr_IsAsync(aioErr)); } if (!AIOMgr_IsSuccess(aioErr)) { @@ -686,11 +682,9 @@ vec.iov_len = map->numEntries * map->entrySize; ASSERT(handle); aioErr = AIOMgr_Queue(*handle, &vec, 1, OP_READ, - startByteOffset + numBytes, vec.iov_len, AIOMGR_INVALID_IO_REQUEST_ID, NULL, NULL ); - if (AIOMgr_IsAsync(aioErr)) { - aioErr = AIOMgr_Sync(*handle); - } - + startByteOffset + numBytes, vec.iov_len, + AIOMGR_INVALID_IO_REQUEST_ID, NULL, NULL); + ASSERT(!AIOMgr_IsAsync(aioErr)); if (!AIOMgr_IsSuccess(aioErr)) { free(map->entries); free(map); diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfs/hgfsEscape.c open-vm-tools-10.0.0-3000743/lib/hgfs/hgfsEscape.c --- open-vm-tools-9.10.2-2822639/lib/hgfs/hgfsEscape.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfs/hgfsEscape.c 2015-09-10 07:31:38.000000000 +0000 @@ -47,7 +47,7 @@ # else # include # endif -# define memmove(s1,s2,n) bcopy(s2,s1,n) +# define memmove(s1,s2,n) bcopy(s2,s1,n) #elif defined __APPLE__ && defined KERNEL # include #elif !defined sun @@ -824,14 +824,17 @@ *----------------------------------------------------------------------------- */ -int +uint32 HgfsEscape_Undo(char *bufIn, // IN: Characters to be unescaped uint32 sizeIn) // IN: Number of characters in bufIn { - uint32 componentSize = strlen(bufIn) + 1; + uint32 componentSize; uint32 unprocessedSize = sizeIn + 1; uint32 result = 0; char *currentComponent = bufIn; + + ASSERT(bufIn != NULL); + while (currentComponent != NULL) { HgfsEscapeUndoComponent(currentComponent, &unprocessedSize); componentSize = strlen(currentComponent) + 1; // Unescaped size diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsHelper/hgfsHelperPosix.c open-vm-tools-10.0.0-3000743/lib/hgfsHelper/hgfsHelperPosix.c --- open-vm-tools-9.10.2-2822639/lib/hgfsHelper/hgfsHelperPosix.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsHelper/hgfsHelperPosix.c 2015-09-10 07:31:38.000000000 +0000 @@ -63,7 +63,7 @@ */ Bool -HgfsHlpr_QuerySharesDefaultRootPath(Unicode *hgfsRootPath) +HgfsHlpr_QuerySharesDefaultRootPath(char **hgfsRootPath) { #if defined __FreeBSD__ return FALSE; @@ -73,7 +73,7 @@ *hgfsRootPath = Unicode_AllocWithUTF8(HGFSHLPR_DEFAULT_MOUNT_PATH); Debug("%s: HGFS shares root path name \"%s\"\n", - __FUNCTION__, UTF8(*hgfsRootPath)); + __FUNCTION__, *hgfsRootPath); return TRUE; #endif @@ -98,7 +98,7 @@ */ void -HgfsHlpr_FreeSharesRootPath(Unicode hgfsRootPath) +HgfsHlpr_FreeSharesRootPath(char *hgfsRootPath) { - Unicode_Free(hgfsRootPath); + free(hgfsRootPath); } diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServer.c open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServer.c --- open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServer.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServer.c 2015-09-10 07:31:38.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998,2014-2015 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -47,7 +47,6 @@ #include "hgfsServerParameters.h" #include "hgfsServerOplock.h" #include "hgfsDirNotify.h" -#include "hgfsTransport.h" #include "userlock.h" #include "poll.h" #include "mutexRankLib.h" @@ -200,7 +199,7 @@ static MXUserExclLock *gHgfsAsyncLock; static MXUserCondVar *gHgfsAsyncVar; -static HgfsServerStateLogger *hgfsMgrData = NULL; +static HgfsServerMgrCallbacks *gHgfsMgrData = NULL; /* * Session usage and locking. @@ -237,18 +236,24 @@ DblLnkLst_Links *shares); static uint32 HgfsServerSessionInvalidateInactiveSessions(void *clientData); static void HgfsServerSessionSendComplete(HgfsPacket *packet, void *clientData); +static HgfsSharedFolderHandle HgfsServerRegisterShare(const char *shareName, + const char *sharePath, + Bool addFolder); /* * Callback table passed to transport and any channels. */ -HgfsServerSessionCallbacks hgfsServerSessionCBTable = { - HgfsServerSessionConnect, - HgfsServerSessionDisconnect, - HgfsServerSessionClose, - HgfsServerSessionReceive, - HgfsServerSessionInvalidateObjects, - HgfsServerSessionInvalidateInactiveSessions, - HgfsServerSessionSendComplete, +HgfsServerCallbacks gHgfsServerCBTable = { + { + HgfsServerSessionConnect, + HgfsServerSessionDisconnect, + HgfsServerSessionClose, + HgfsServerSessionReceive, + HgfsServerSessionInvalidateObjects, + HgfsServerSessionInvalidateInactiveSessions, + HgfsServerSessionSendComplete, + }, + HgfsServerRegisterShare, }; /* Lock that protects shared folders list. */ @@ -562,17 +567,7 @@ static uint32 HgfsServerGetNextHandleCounter(void) { - uint32 count = Atomic_ReadInc32(&hgfsHandleCounter); - /* - * Call server manager for logging state updates. - * XXX - This will have to be reworked when the server is - * more concurrent than with the current access. - */ - if (hgfsMgrData != NULL && - hgfsMgrData->logger != NULL) { - hgfsMgrData->logger(hgfsMgrData->loggerData, count + 1); - } - return count; + return Atomic_ReadInc32(&hgfsHandleCounter); } @@ -1628,17 +1623,23 @@ if (node->shareName) { free(node->shareName); + node->shareName = NULL; } - node->shareName = NULL; if (node->utf8Name) { free(node->utf8Name); + node->utf8Name = NULL; } - node->utf8Name = NULL; + node->state = FILENODE_STATE_UNUSED; ASSERT(node->fileCtx == NULL); node->fileCtx = NULL; + if (node->shareInfo.rootDir) { + free((void*)node->shareInfo.rootDir); + node->shareInfo.rootDir = NULL; + } + /* Prepend at the beginning of the list */ DblLnkLst_LinkFirst(&session->nodeFreeList, &node->links); } @@ -3089,6 +3090,46 @@ /* *----------------------------------------------------------------------------- * + * HgfsServerGetRequestHeaderSize -- + * + * Takes the Hgfs request input and finds the size of the header component. + * + * Results: + * Size of the HGFS protocol header used by this request and reply. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static HgfsInternalStatus +HgfsServerGetRequestHeaderSize(HgfsInputParam *input) // IN: parameters +{ + size_t headerSize; + + /* + * If the HGFS request is session enabled we must have the new header. + * Otherwise, starting from HGFS V3 the header is not included in the + * request itself, so we must return the size of the separate HgfsReply + * structure. Prior to V3 (so V1 and V2) there was no separate header + * from the request result structure so a zero size is returned for these + * operations. + */ + if (input->sessionEnabled) { + headerSize = sizeof (HgfsHeader); + } else if (input->op >= HGFS_OP_OPEN_V3) { + headerSize = sizeof (HgfsReply); + } else { + headerSize = 0; + } + return headerSize; +} + + +/* + *----------------------------------------------------------------------------- + * * HgfsServerCompleteRequest -- * * Performs all necessary action which needed for completing HGFS request: @@ -3113,6 +3154,7 @@ void *reply; size_t replySize; size_t replyTotalSize; + size_t replyHeaderSize; uint64 replySessionId; if (HGFS_ERROR_SUCCESS == status) { @@ -3123,18 +3165,20 @@ replySessionId = (NULL != input->session) ? input->session->sessionId : HGFS_INVALID_SESSION_ID; + replyHeaderSize = HgfsServerGetRequestHeaderSize(input); - if (input->sessionEnabled) { - replySize = sizeof (HgfsHeader) + replyPayloadSize; + if (replyHeaderSize != 0) { + replySize = replyHeaderSize + replyPayloadSize; } else { /* - * Starting from HGFS V3 header is not included in the payload size. + * For pre-V3 header is included in the payload size. + * If we want to send just an error result then HgfsReply + * only size is required. + * + * XXX - all callers should be verified that the reply payload + * size for V1 and V2 should be correct (mininum HgfsReply size). */ - if (input->op < HGFS_OP_OPEN_V3) { - replySize = MAX(replyPayloadSize, sizeof (HgfsReply)); - } else { - replySize = sizeof (HgfsReply) + replyPayloadSize; - } + replySize = MAX(replyPayloadSize, sizeof (HgfsReply)); } reply = HSPU_GetReplyPacket(input->packet, @@ -3534,7 +3578,7 @@ /* *----------------------------------------------------------------------------- * - * HgfsServer_RegisterSharedFolder -- + * HgfsServerRegisterShare -- * * This is a callback function which is invoked by hgfsServerManagement * for every shared folder when something changed in shared folders @@ -3559,10 +3603,10 @@ *----------------------------------------------------------------------------- */ -HgfsSharedFolderHandle -HgfsServer_RegisterSharedFolder(const char *shareName, // IN: shared folder name - const char *sharePath, // IN: shared folder path - Bool addFolder) // IN: add or remove folder +static HgfsSharedFolderHandle +HgfsServerRegisterShare(const char *shareName, // IN: shared folder name + const char *sharePath, // IN: shared folder path + Bool addFolder) // IN: add or remove folder { DblLnkLst_Links *link, *nextElem; HgfsSharedFolderHandle result = HGFS_INVALID_FOLDER_HANDLE; @@ -3729,16 +3773,16 @@ */ Bool -HgfsServer_InitState(HgfsServerSessionCallbacks **callbackTable, // IN/OUT: our callbacks +HgfsServer_InitState(HgfsServerCallbacks **callbackTable, // IN/OUT: our callbacks HgfsServerConfig *serverCfgData, // IN: configurable settings - HgfsServerStateLogger *serverMgrData) // IN: mgr callback + HgfsServerMgrCallbacks *serverMgrData) // IN: mgr callback { Bool result = TRUE; ASSERT(callbackTable); /* Save any server manager data for logging state updates.*/ - hgfsMgrData = serverMgrData; + gHgfsMgrData = serverMgrData; if (NULL != serverCfgData) { gHgfsCfgSettings = *serverCfgData; @@ -3780,7 +3824,7 @@ } if (result) { - *callbackTable = &hgfsServerSessionCBTable; + *callbackTable = &gHgfsServerCBTable; if (0 != (gHgfsCfgSettings.flags & HGFS_CONFIG_NOTIFY_ENABLED)) { gHgfsDirNotifyActive = HgfsNotify_Init() == HGFS_STATUS_SUCCESS; @@ -3851,6 +3895,10 @@ } HgfsPlatformDestroy(); + /* + * Reset the server manager callbacks. + */ + gHgfsMgrData = NULL; } @@ -3918,6 +3966,102 @@ /* *----------------------------------------------------------------------------- * + * HgfsServerResEnumInit -- + * + * Initialize an enumeration of all exisitng resources. + * + * Results: + * The enumeration state object. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void * +HgfsServerResEnumInit(void) +{ + void *enumState = NULL; + + if (gHgfsMgrData != NULL && + gHgfsMgrData->enumResources.init != NULL) { + enumState = gHgfsMgrData->enumResources.init(); + } + + return enumState; +} + + +/* + *----------------------------------------------------------------------------- + * + * HgfsServerResEnumGet -- + * + * Enumerates the next resource associated with the enumeration state. + * + * Results: + * TRUE on success and . + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +Bool +HgfsServerResEnumGet(void *enumState, // IN/OUT: enumeration state + char const **enumResName, // OUT: enumerated resource name + size_t *enumResNameLen, // OUT: enumerated resource name len + Bool *enumResDone) // OUT: enumerated resources done +{ + Bool success = FALSE; + + if (gHgfsMgrData != NULL && + gHgfsMgrData->enumResources.get != NULL) { + success = gHgfsMgrData->enumResources.get(enumState, + enumResName, + enumResNameLen, + enumResDone); + } + + return success; +} + + +/* + *----------------------------------------------------------------------------- + * + * HgfsServerResEnumExit -- + * + * Exit the enumeration of all existing resources. + * + * Results: + * TRUE on success, FALSE otherwise. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +Bool +HgfsServerResEnumExit(void *enumState) // IN/OUT: enumeration state +{ + Bool success = FALSE; + + if (gHgfsMgrData != NULL && + gHgfsMgrData->enumResources.exit != NULL) { + success = gHgfsMgrData->enumResources.exit(enumState); + } + + return success; +} + + +/* + *----------------------------------------------------------------------------- + * * HgfsServerEnumerateSharedFolders -- * * Enumerates all exisitng shared folders and registers shared folders with @@ -3939,7 +4083,7 @@ Bool success = FALSE; LOG(8, ("%s: entered\n", __FUNCTION__)); - state = HgfsServerPolicy_GetSharesInit(); + state = HgfsServerResEnumInit(); if (NULL != state) { Bool done; @@ -3947,7 +4091,7 @@ char const *shareName; size_t len; - success = HgfsServerPolicy_GetShares(state, &shareName, &len, &done); + success = HgfsServerResEnumGet(state, &shareName, &len, &done); if (success && !done) { HgfsSharedFolderHandle handle; char const *sharePath; @@ -3959,15 +4103,14 @@ &sharePathLen, &sharePath); if (HGFS_NAME_STATUS_COMPLETE == nameStatus) { LOG(8, ("%s: registering share %s path %s\n", __FUNCTION__, shareName, sharePath)); - handle = HgfsServer_RegisterSharedFolder(shareName, sharePath, - TRUE); + handle = HgfsServerRegisterShare(shareName, sharePath, TRUE); success = handle != HGFS_INVALID_FOLDER_HANDLE; LOG(8, ("%s: registering share %s hnd %#x\n", __FUNCTION__, shareName, handle)); } } } while (!done && success); - HgfsServerPolicy_GetSharesCleanup(state); + HgfsServerResEnumExit(state); } LOG(8, ("%s: exit %d\n", __FUNCTION__, success)); return success; @@ -4470,7 +4613,9 @@ HSPU_PutReplyPacket(packet, transportSession->channelCbTable); HSPU_PutDataPacketBuf(packet, transportSession->channelCbTable); } else { - free(packet->metaPacket); + if (packet->metaPacketIsAllocated) { + free(packet->metaPacket); + } free(packet); } } @@ -5381,12 +5526,12 @@ */ HgfsInternalStatus -HgfsServerSearchVirtualDir(HgfsGetNameFunc *getName, // IN: Name enumerator - HgfsInitFunc *initName, // IN: Init function - HgfsCleanupFunc *cleanupName, // IN: Cleanup function - DirectorySearchType type, // IN: Kind of search - HgfsSessionInfo *session, // IN: Session info - HgfsHandle *handle) // OUT: Search handle +HgfsServerSearchVirtualDir(HgfsServerResEnumGetFunc getName, // IN: Name enumerator + HgfsServerResEnumInitFunc initName, // IN: Init function + HgfsServerResEnumExitFunc cleanupName, // IN: Cleanup function + DirectorySearchType type, // IN: Kind of search + HgfsSessionInfo *session, // IN: Session info + HgfsHandle *handle) // OUT: Search handle { HgfsInternalStatus status = 0; HgfsSearch *search = NULL; @@ -5447,11 +5592,11 @@ */ HgfsInternalStatus -HgfsServerRestartSearchVirtualDir(HgfsGetNameFunc *getName, // IN: Name enumerator - HgfsInitFunc *initName, // IN: Init function - HgfsCleanupFunc *cleanupName, // IN: Cleanup function - HgfsSessionInfo *session, // IN: Session info - HgfsHandle searchHandle) // IN: search to restart +HgfsServerRestartSearchVirtualDir(HgfsServerResEnumGetFunc getName, // IN: Name enumerator + HgfsServerResEnumInitFunc initName, // IN: Init function + HgfsServerResEnumExitFunc cleanupName, // IN: Cleanup function + HgfsSessionInfo *session, // IN: Session info + HgfsHandle searchHandle) // IN: search to restart { HgfsInternalStatus status = 0; HgfsSearch *vdirSearch; @@ -5790,6 +5935,10 @@ void *replyHeader; void *replyData; + /* + * XXX - this should be modified to use the common HgfsServerGetRequestHeaderSize + * so that all requests and replies are handled consistently. + */ if (HGFS_OP_NEW_HEADER == request->op) { headerSize = sizeof(HgfsHeader); } else if (request->op < HGFS_OP_CREATE_SESSION_V4 && @@ -5818,6 +5967,102 @@ /* *----------------------------------------------------------------------------- * + * HgfsServerValidateRead -- + * + * Validate a Read request's arguments. + * + * Note, the readOffset is ignored here but is checked in the platform specific + * read handler. + * + * Results: + * HGFS_ERROR_SUCCESS on success. + * HGFS error code on failure. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static HgfsInternalStatus +HgfsServerValidateRead(HgfsInputParam *input, // IN: Input params + HgfsHandle readHandle, // IN: read Handle + uint32 readSize, // IN: size to read + uint64 readOffset, // IN: offset to read unused + fileDesc *readfd, // OUT: read file descriptor + size_t *readReplySize, // OUT: read reply size + size_t *readDataSize) // OUT: read data size +{ + HgfsInternalStatus status = HGFS_ERROR_SUCCESS; + size_t replyReadHeaderSize; + size_t replyReadResultSize = 0; + size_t replyReadResultDataSize = 0; + size_t replyReadDataSize = 0; + fileDesc readFileDesc = 0; + Bool useMappedBuffer; + + useMappedBuffer = (input->transportSession->channelCbTable->getWriteVa != NULL); + replyReadHeaderSize = HgfsServerGetRequestHeaderSize(input); + switch (input->op) { + case HGFS_OP_READ_FAST_V4: + /* Data is packed into a separate buffer from the read results. */ + replyReadResultSize = sizeof (HgfsReplyReadV3); + replyReadResultDataSize = 0; + replyReadDataSize = readSize; + break; + case HGFS_OP_READ_V3: + /* Data is packed as a part of the read results. */ + replyReadResultSize = sizeof (HgfsReplyReadV3); + replyReadResultDataSize = readSize; + replyReadDataSize = 0; + break; + case HGFS_OP_READ: + /* Data is packed as a part of the read results. */ + replyReadResultSize = sizeof (HgfsReplyRead); + replyReadResultDataSize = readSize; + replyReadDataSize = 0; + break; + default: + status = HGFS_ERROR_PROTOCOL; + LOG(4, ("%s: Unsupported protocol version passed %d -> PROTOCOL_ERROR.\n", + __FUNCTION__, input->op)); + NOT_IMPLEMENTED(); + goto exit; + } + + if (!HSPU_ValidateDataPacketSize(input->packet, replyReadDataSize) || + !HSPU_ValidateReplyPacketSize(input->packet, + replyReadHeaderSize, + replyReadResultSize, + replyReadResultDataSize, + useMappedBuffer)) { + status = HGFS_ERROR_INVALID_PARAMETER; + LOG(4, ("%s: Error: arg validation read size -> %d.\n", + __FUNCTION__, status)); + goto exit; + } + + /* Validate the file handle by retrieving it possibly from the cache. */ + status = HgfsPlatformGetFd(readHandle, input->session, FALSE, &readFileDesc); + if (status != HGFS_ERROR_SUCCESS) { + LOG(4, ("%s: Error: arg validation handle -> %d.\n", + __FUNCTION__, status)); + goto exit; + } + +exit: + *readDataSize = replyReadDataSize; + *readReplySize = replyReadResultSize + replyReadResultDataSize; + *readfd = readFileDesc; + LOG(4, ("%s: arg validation check return (%"FMTSZ"u) %d.\n", + __FUNCTION__, replyReadDataSize, status)); + return status; +} + + +/* + *----------------------------------------------------------------------------- + * * HgfsServerRead -- * * Handle a Read request. @@ -5837,9 +6082,13 @@ { HgfsInternalStatus status; HgfsHandle file; + fileDesc readFd; uint64 offset; uint32 requiredSize; size_t replyPayloadSize = 0; + size_t replyReadSize = 0; + size_t replyReadDataSize = 0; + void *replyRead; HGFS_ASSERT_INPUT(input); @@ -5847,61 +6096,87 @@ &offset, &requiredSize)) { LOG(4, ("%s: Failed to unpack a valid packet -> PROTOCOL_ERROR.\n", __FUNCTION__)); status = HGFS_ERROR_PROTOCOL; - } else { - switch(input->op) { - case HGFS_OP_READ_FAST_V4: - case HGFS_OP_READ_V3: { - HgfsReplyReadV3 *reply; - void *payload; - uint32 inlineDataSize = - (HGFS_OP_READ_FAST_V4 == input->op) ? 0 : requiredSize; - - reply = HgfsAllocInitReply(input->packet, input->request, - sizeof *reply + inlineDataSize, input->session); - if (HGFS_OP_READ_V3 == input->op) { - payload = &reply->payload[0]; - } else { - payload = HSPU_GetDataPacketBuf(input->packet, BUF_WRITEABLE, - input->transportSession->channelCbTable); - } - if (payload) { - status = HgfsPlatformReadFile(file, input->session, offset, - requiredSize, payload, - &reply->actualSize); - if (HGFS_ERROR_SUCCESS == status) { - reply->reserved = 0; - replyPayloadSize = sizeof *reply + - ((inlineDataSize > 0) ? reply->actualSize : 0); - } - } else { - status = HGFS_ERROR_PROTOCOL; - LOG(4, ("%s: V3/V4 Failed to get payload -> PROTOCOL_ERROR.\n", __FUNCTION__)); - } - break; - } - case HGFS_OP_READ: { - HgfsReplyRead *reply; + goto exit; + } - reply = HgfsAllocInitReply(input->packet, input->request, - sizeof *reply + requiredSize, input->session); + /* + * Validate the read arguments with the data and reply buffers to ensure + * there isn't a malformed request or we read more data than the buffer can + * hold. + */ + status = HgfsServerValidateRead(input, + file, + requiredSize, + offset, + &readFd, + &replyReadSize, + &replyReadDataSize); + if (status != HGFS_ERROR_SUCCESS) { + LOG(4, ("%s: Error: validate args %u.\n", __FUNCTION__, status)); + goto exit; + } - status = HgfsPlatformReadFile(file, input->session, offset, requiredSize, - reply->payload, &reply->actualSize); + replyRead = HgfsAllocInitReply(input->packet, + input->request, + replyReadSize, + input->session); + + switch (input->op) { + case HGFS_OP_READ_FAST_V4: + case HGFS_OP_READ_V3: { + HgfsReplyReadV3 *reply = replyRead; + void *payload; + Bool readUseDataBuffer = replyReadDataSize != 0; + + /* + * The read data size holds the size of the data to read which will be read + * into the separate data packet buffer. Zero indicates data is read into the + * same buffer as the reply arguments. + */ + if (readUseDataBuffer) { + payload = HSPU_GetDataPacketBuf(input->packet, BUF_WRITEABLE, + input->transportSession->channelCbTable); + } else { + payload = &reply->payload[0]; + } + if (payload) { + status = HgfsPlatformReadFile(readFd, input->session, offset, + requiredSize, payload, + &reply->actualSize); if (HGFS_ERROR_SUCCESS == status) { - replyPayloadSize = sizeof *reply + reply->actualSize; - } else { - LOG(4, ("%s: V1 Failed to read-> %d.\n", __FUNCTION__, status)); + reply->reserved = 0; + replyPayloadSize = sizeof *reply; + + if (readUseDataBuffer) { + HSPU_SetDataPacketSize(input->packet, reply->actualSize); + } else { + replyPayloadSize += reply->actualSize; + } } - break; + } else { + status = HGFS_ERROR_PROTOCOL; + LOG(4, ("%s: V3/V4 Failed to get payload -> PROTOCOL_ERROR.\n", __FUNCTION__)); } - default: - NOT_IMPLEMENTED(); - status = HGFS_ERROR_PROTOCOL; - LOG(4, ("%s: Unsupported protocol version passed %d -> PROTOCOL_ERROR.\n", - __FUNCTION__, input->op)); + break; } + case HGFS_OP_READ: { + HgfsReplyRead *reply = replyRead; + + status = HgfsPlatformReadFile(readFd, input->session, offset, requiredSize, + reply->payload, &reply->actualSize); + if (HGFS_ERROR_SUCCESS == status) { + replyPayloadSize = sizeof *reply + reply->actualSize; + } else { + LOG(4, ("%s: V1 Failed to read-> %d.\n", __FUNCTION__, status)); + } + break; + } + default: + NOT_REACHED(); + break; } +exit: HgfsServerCompleteRequest(status, replyPayloadSize, input); } @@ -5946,6 +6221,7 @@ if (NULL == dataToWrite) { /* No inline data to write, get it from the transport shared memory. */ + HSPU_SetDataPacketSize(input->packet, numberBytesToWrite); dataToWrite = HSPU_GetDataPacketBuf(input->packet, BUF_READABLE, input->transportSession->channelCbTable); if (NULL == dataToWrite) { @@ -6312,7 +6588,7 @@ HgfsInternalStatus status; size_t replyPayloadSize = 0; const char *dirName; - uint32 dirNameLength; + size_t dirNameLength; uint32 caseFlags = HGFS_FILE_NAME_DEFAULT_CASE; HgfsHandle search; HgfsNameStatus nameStatus; @@ -8043,8 +8319,8 @@ /* Get the config options. */ if (search.utf8ShareNameLen != 0) { nameStatus = HgfsServerPolicy_GetShareOptions(search.utf8ShareName, - search.utf8ShareNameLen, - &configOptions); + search.utf8ShareNameLen, + &configOptions); if (nameStatus != HGFS_NAME_STATUS_COMPLETE) { LOG(4, ("%s: no matching share: %s.\n", __FUNCTION__, search.utf8ShareName)); @@ -8077,8 +8353,8 @@ * else. */ status = HgfsPlatformRestartSearchDir(hgfsSearchHandle, - input->session, - search.type); + input->session, + search.type); } } @@ -8095,6 +8371,9 @@ if (HGFS_ERROR_SUCCESS == status) { replyPayloadSize = replyInfoSize + ((inlineDataSize == 0) ? 0 : replyDirentSize); + if (0 == inlineDataSize) { + HSPU_SetDataPacketSize(input->packet, replyDirentSize); + } } free(search.utf8Dir); @@ -8393,13 +8672,20 @@ sizeNeeded = HgfsPackCalculateNotificationSize(shareName, fileName); - packetHeader = Util_SafeCalloc(1, sizeNeeded); - packet = Util_SafeCalloc(1, sizeof *packet); - packet->state &= ~HGFS_STATE_CLIENT_REQUEST; + /* + * Use a single buffer zero'd out, as the packet and metapacket have the same + * lifespan which is ended at the send complete callback (HgfsServerSessionSendComplete). + */ + packet = Util_SafeCalloc(1, sizeof *packet + sizeNeeded); + packetHeader = (HgfsHeader *)((char *)packet + sizeof *packet); + /* + * The buffer is zero'd out, so no need to set the following explicitly: + * packet->metaPacketIsAllocated = FALSE; + * packet->state &= ~HGFS_STATE_CLIENT_REQUEST; + */ packet->metaPacketSize = sizeNeeded; packet->metaPacketDataSize = packet->metaPacketSize; packet->metaPacket = packetHeader; - packet->dataPacketIsAllocated = TRUE; notifyFlags = 0; if (mask & HGFS_NOTIFY_EVENTS_DROPPED) { notifyFlags |= HGFS_NOTIFY_FLAG_OVERFLOW; @@ -8418,7 +8704,6 @@ /* The transport will call the server send complete callback to release the packets. */ packet = NULL; - packetHeader = NULL; LOG(4, ("%s: Sent notify for: %u index: %"FMT64"u file name %s mask %x\n", __FUNCTION__, sharedFolder, subscriber, fileName, mask)); @@ -8430,9 +8715,6 @@ if (packet) { free(packet); } - if (packetHeader) { - free(packetHeader); - } } diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServerInt.h open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServerInt.h --- open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServerInt.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServerInt.h 2015-09-10 07:31:38.000000000 +0000 @@ -504,6 +504,18 @@ HgfsServerIsSharedFolderOnly(char const *in, // IN: CP filename to check size_t inSize); // IN: Size of name in +void * +HgfsServerResEnumInit(void); + +Bool +HgfsServerResEnumGet(void *enumState, + char const **enumResName, + size_t *enumResNameLen, + Bool *enumResDone); + +Bool +HgfsServerResEnumExit(void *enumState); + HgfsInternalStatus HgfsServerGetDirEntry(HgfsHandle handle, // IN: Handle to search HgfsSessionInfo *session, // IN: Session info @@ -520,19 +532,19 @@ HgfsHandle *handle); // OUT: Search handle HgfsInternalStatus -HgfsServerSearchVirtualDir(HgfsGetNameFunc *getName, // IN: Name enumerator - HgfsInitFunc *initName, // IN: Init function - HgfsCleanupFunc *cleanupName, // IN: Cleanup function - DirectorySearchType type, // IN: Kind of search - HgfsSessionInfo *session, // IN: Session info - HgfsHandle *handle); // OUT: Search handle +HgfsServerSearchVirtualDir(HgfsServerResEnumGetFunc getName, // IN: Name enumerator + HgfsServerResEnumInitFunc initName, // IN: Init function + HgfsServerResEnumExitFunc cleanupName, // IN: Cleanup function + DirectorySearchType type, // IN: Kind of search + HgfsSessionInfo *session, // IN: Session info + HgfsHandle *handle); // OUT: Search handle HgfsInternalStatus -HgfsServerRestartSearchVirtualDir(HgfsGetNameFunc *getName, // IN: Name enumerator - HgfsInitFunc *initName, // IN: Init function - HgfsCleanupFunc *cleanupName, // IN: Cleanup function - HgfsSessionInfo *session, // IN: Session info - HgfsHandle searchHandle); // IN: search to restart +HgfsServerRestartSearchVirtualDir(HgfsServerResEnumGetFunc getName, // IN: Name enumerator + HgfsServerResEnumInitFunc initName, // IN: Init function + HgfsServerResEnumExitFunc cleanupName, // IN: Cleanup function + HgfsSessionInfo *session, // IN: Session info + HgfsHandle searchHandle); // IN: search to restart void * @@ -703,16 +715,16 @@ struct DirectoryEntry ***dents, // OUT: Array of DirectoryEntrys int *numDents); // OUT: Number of DirectoryEntrys HgfsInternalStatus -HgfsPlatformScanvdir(HgfsGetNameFunc enumNamesGet, // IN: Function to get name - HgfsInitFunc enumNamesInit, // IN: Setup function - HgfsCleanupFunc enumNamesExit, // IN: Cleanup function - DirectorySearchType type, // IN: Kind of search - struct DirectoryEntry ***dents, // OUT: Array of DirectoryEntrys - uint32 *numDents); // OUT: total number of directory entrys +HgfsPlatformScanvdir(HgfsServerResEnumGetFunc enumNamesGet, // IN: Function to get name + HgfsServerResEnumInitFunc enumNamesInit, // IN: Setup function + HgfsServerResEnumExitFunc enumNamesExit, // IN: Cleanup function + DirectorySearchType type, // IN: Kind of search + struct DirectoryEntry ***dents, // OUT: Array of DirectoryEntrys + uint32 *numDents); // OUT: total number of directory entrys HgfsInternalStatus HgfsPlatformSearchDir(HgfsNameStatus nameStatus, // IN: name status const char *dirName, // IN: relative directory name - uint32 dirNameLength, // IN: length of dirName + size_t dirNameLength, // IN: length of dirName uint32 caseFlags, // IN: case flags HgfsShareInfo *shareInfo, // IN: sharfed folder information char *baseDir, // IN: name of the shared directory @@ -729,7 +741,7 @@ #endif HgfsInternalStatus -HgfsPlatformReadFile(HgfsHandle file, // IN: Hgfs file handle +HgfsPlatformReadFile(fileDesc readFile, // IN: file descriptor HgfsSessionInfo *session, // IN: session info uint64 offset, // IN: file offset to read from uint32 requiredSize, // IN: length of data to read @@ -824,12 +836,20 @@ size_t *metaPacketSize, // OUT: Size of metaPacket HgfsServerChannelCallbacks *chanCb); // IN: Channel callbacks +Bool +HSPU_ValidateDataPacketSize(HgfsPacket *packet, // IN: Hgfs Packet + size_t dataSize); // IN: data size + void * HSPU_GetDataPacketBuf(HgfsPacket *packet, // IN/OUT: Hgfs Packet MappingType mappingType, // IN: Readable/ Writeable ? HgfsServerChannelCallbacks *chanCb); // IN: Channel callbacks void +HSPU_SetDataPacketSize(HgfsPacket *packet, // IN/OUT: Hgfs Packet + size_t dataSize); // IN: data size + +void HSPU_PutDataPacketBuf(HgfsPacket *packet, // IN/OUT: Hgfs Packet HgfsServerChannelCallbacks *chanCb); // IN: Channel callbacks @@ -837,6 +857,13 @@ HSPU_PutMetaPacket(HgfsPacket *packet, // IN/OUT: Hgfs Packet HgfsServerChannelCallbacks *chanCb); // IN: Channel callbacks +Bool +HSPU_ValidateReplyPacketSize(HgfsPacket *packet, // IN: Hgfs Packet + size_t replyHeaderSize, // IN: reply header size + size_t replyResultSize, // IN: reply result size + size_t replyResultDataSize, // IN: reply result data size + Bool useMappedMetaPacket); // IN: using meta buffer + void * HSPU_GetReplyPacket(HgfsPacket *packet, // IN/OUT: Hgfs Packet HgfsServerChannelCallbacks *chanCb, // IN: Channel callbacks diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServerLinux.c open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServerLinux.c --- open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServerLinux.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServerLinux.c 2015-09-10 07:31:38.000000000 +0000 @@ -43,6 +43,7 @@ #include #include #include +#include // for getrlimit #if defined(__FreeBSD__) # include @@ -376,7 +377,10 @@ uint32 *permissions); static uint64 HgfsGetCreationTime(const struct stat *stats); - +#if !defined(sun) +static HgfsInternalStatus HgfsWriteCheckIORange(off_t offset, + uint32 bytesToWrite); +#endif /* *----------------------------------------------------------------------------- @@ -867,7 +871,7 @@ /* *----------------------------------------------------------------------------- * - * HgfsValidateOpen -- + * HgfsPlatformValidateOpen -- * * Verify that the file with the given local name exists in the * local filesystem by trying to open the file with the requested @@ -894,7 +898,6 @@ { struct stat fileStat; int fd; - int error; int openMode = 0, openFlags = 0; mode_t openPerms; HgfsLockType serverLock; @@ -928,7 +931,7 @@ * a file requires a valid mode, it's highly unlikely that we'll ever * be creating a file without owner permissions. */ - openPerms = ~ALLPERMS; + openPerms = 0; openPerms |= openInfo->mask & HGFS_OPEN_VALID_SPECIAL_PERMS ? openInfo->specialPerms << 9 : 0; openPerms |= openInfo->mask & HGFS_OPEN_VALID_OWNER_PERMS ? @@ -986,6 +989,9 @@ } } if (status != 0) { + LOG(4, ("%s: Error: Unwritable share mode %u flags %u file \"%s\": %d %s\n", + __FUNCTION__, openMode, openFlags, openInfo->utf8Name, + status, strerror(status))); goto exit; } } @@ -1005,6 +1011,8 @@ status = EACCES; } if (status != 0) { + LOG(4, ("%s: Error: Unreadable share flags %u file \"%s\": %d %s\n", + __FUNCTION__, openFlags, openInfo->utf8Name, status, strerror(status))); goto exit; } } @@ -1030,23 +1038,29 @@ * Try to open the file with the requested mode, flags and permissions. */ fd = Posix_Open(openInfo->utf8Name, - openMode | openFlags, - openPerms); + openMode | openFlags, + openPerms); if (fd < 0) { - error = errno; - LOG(4, ("%s: couldn't open file \"%s\": %s\n", __FUNCTION__, - openInfo->utf8Name, strerror(error))); - status = error; + status = errno; + if (status == EAGAIN) { + /* + * We have tried opening with O_NONBLOCK but looks like an incompatible + * lease may be held on the file. Tell the client that this access mode + * is not allowed currently. + */ + status = EACCES; + } + LOG(4, ("%s: Error: open file \"%s\": %d %s\n", __FUNCTION__, + openInfo->utf8Name, status, strerror(status))); goto exit; } /* Stat file to get its volume and file info */ if (fstat(fd, &fileStat) < 0) { - error = errno; - LOG(4, ("%s: couldn't stat local file \"%s\": %s\n", __FUNCTION__, - openInfo->utf8Name, strerror(error))); + status = errno; + LOG(4, ("%s: Error: stat file\"%s\": %d %s\n", __FUNCTION__, + openInfo->utf8Name, status, strerror(status))); close(fd); - status = error; goto exit; } @@ -1087,8 +1101,7 @@ * * Mac OS defines a special file type known as an alias which behaves like a * symlink when viewed through the Finder, but is actually a regular file - * otherwise. Unlike symlinks, aliases cannot be broken; if the target file - * is deleted, so is the alias. + * otherwise. * * If the given filename is (or contains) an alias, this function will * resolve it completely and set targetName to something non-NULL. @@ -1111,109 +1124,214 @@ #ifndef __APPLE__ *targetName = NULL; return 0; -#else - char *myTargetName = NULL; +#else // __APPLE__ HgfsInternalStatus status = HGFS_INTERNAL_STATUS_ERROR; - CFURLRef resolvedRef = NULL; - CFStringRef resolvedString; - FSRef fileRef; - Boolean targetIsFolder; - Boolean wasAliased; - OSStatus osStatus; - - ASSERT_ON_COMPILE(sizeof osStatus == sizeof (int32)); - - /* - * Create and resolve an FSRef of the desired path. We pass FALSE to - * resolveAliasChains because aliases to aliases should behave as - * symlinks to symlinks. If the file is an alias, wasAliased will be set to - * TRUE and fileRef will reference the target file. - */ - osStatus = FSPathMakeRef(fileName, &fileRef, NULL); - if (osStatus != noErr) { - LOG(4, ("%s: could not create file reference: error %d\n", - __FUNCTION__, (int32)osStatus)); - goto exit; - } - /* - * If alias points to an unmounted volume, the volume needs to be explicitly - * mounted on the host. Mount flag kResolveAliasFileNoUI serves the purpose. - * - * XXX: This function returns fnfErr (file not found) if it encounters a - * broken alias. Perhaps we should make that look like a dangling symlink - * instead of returning an error? - * - * XXX: It also returns errors if it encounters a file with a .alias suffix - * that isn't a real alias. That's OK for now because our caller - * (HgfsGetattrFromName) will assume that an error means the file is a - * regular file. - */ - osStatus = FSResolveAliasFileWithMountFlags(&fileRef, FALSE, &targetIsFolder, - &wasAliased, - kResolveAliasFileNoUI); - if (osStatus != noErr) { - LOG(4, ("%s: could not resolve reference: error %d\n", - __FUNCTION__, (int32)osStatus)); - goto exit; - } + Boolean success; + CFURLRef resolvedURL = NULL; + CFStringRef resolvedString = NULL; + CFIndex maxPath; + + *targetName = NULL; + + if (CFURLCreateBookmarkDataFromFile != NULL) { + /* We are running on Mac OS 10.6 or later. */ + + CFURLRef fileURL; + CFBooleanRef isAlias = NULL; + CFDataRef bookmarkData = NULL; + CFURLBookmarkResolutionOptions resolutionOptions; + Boolean isStale; + + fileURL = CFURLCreateFromFileSystemRepresentation(NULL, fileName, + strlen(fileName), + FALSE); + if (!fileURL) { + Log("%s: could not create CFURL for file.\n", + __FUNCTION__); + goto newExit; + } + + success = CFURLCopyResourcePropertyForKey(fileURL, kCFURLIsAliasFileKey, + &isAlias, NULL); + if (!success) { + Log("%s: could not copy IsAlias property key for file.\n", + __FUNCTION__); + goto newExit; + } + if (!CFBooleanGetValue(isAlias)) { + status = 0; + LOG(4, ("%s: file was not an alias\n", __FUNCTION__)); + goto newExit; + } + + LOG(4, ("%s: file was an alias\n", __FUNCTION__)); - if (wasAliased) { - CFIndex maxPath; + bookmarkData = CFURLCreateBookmarkDataFromFile(NULL, fileURL, NULL); + if (!bookmarkData) { + Log("%s: could not retrieve bookmark data for file.\n", + __FUNCTION__); + goto newExit; + } /* - * This is somewhat convoluted. We create a CFURL from the FSRef because - * we want to call CFURLGetFileSystemRepresentation() to get a UTF-8 - * string representing the target of the alias. But to call - * CFStringGetMaximumSizeOfFileSystemRepresentation(), we need a - * CFString, so we make one from the CFURL. Once we've got the max number - * of bytes for a filename on the filesystem, we allocate some memory - * and convert the CFURL to a basic UTF-8 string using a call to - * CFURLGetFileSystemRepresentation(). + * Don't show any UI during alias resolution and don't mount volumes + * containing the alias target. This avoids blocking the current process + * and/or Finder while trying to mount unreachable hosts (bug 1396411). */ - resolvedRef = CFURLCreateFromFSRef(NULL, &fileRef); - if (resolvedRef == NULL) { - LOG(4, ("%s: could not create resolved URL reference from " - "resolved filesystem reference\n", __FUNCTION__)); - goto exit; + resolutionOptions = kCFBookmarkResolutionWithoutUIMask | + kCFBookmarkResolutionWithoutMountingMask; + + resolvedURL = CFURLCreateByResolvingBookmarkData(NULL, bookmarkData, + resolutionOptions, + NULL, NULL, &isStale, + NULL); + if (!resolvedURL) { + Log("%s: could not resolve bookmark data for file.\n", + __FUNCTION__); + goto newExit; + } + +newExit: + if (fileURL) { + CFRelease(fileURL); + } + if (isAlias) { + CFRelease(isAlias); + } + if (bookmarkData) { + CFRelease(bookmarkData); + } + + } else { + /* We are running on Mac OS 10.5 or earlier. */ + +#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060 + /* + * Mac OS 10.5 used a type of alias which appears on disk as a 0-byte + * file but stores its linking data in a resource fork. The APIs for + * interacting with this type of alias are deprecated when targetting + * 10.8+. + */ + FSRef fileRef; + Boolean isAlias; + Boolean targetIsFolder; + OSStatus osStatus; + + ASSERT_ON_COMPILE(sizeof osStatus == sizeof (int32)); + + osStatus = FSPathMakeRef(fileName, &fileRef, NULL); + if (osStatus != noErr) { + Log("%s: could not create file reference: error %d\n", + __FUNCTION__, (int32)osStatus); + goto oldExit; + } + + osStatus = FSIsAliasFile(&fileRef, &isAlias, &targetIsFolder); + if (osStatus != noErr) { + Log("%s: could not detect if file is an old style alias: error %d\n", + __FUNCTION__, (int32)osStatus); + goto oldExit; + } + + if (!isAlias) { + status = 0; + LOG(4, ("%s: file was not an alias\n", __FUNCTION__)); + goto oldExit; } - resolvedString = CFURLGetString(resolvedRef); - if (resolvedString == NULL) { - LOG(4, ("%s: could not create resolved string reference from " - "resolved URL reference\n", __FUNCTION__)); + + LOG(4, ("%s: file was an alias\n", __FUNCTION__)); + + /* + * Create and resolve an FSRef of the desired path. We pass FALSE to + * resolveAliasChains because aliases to aliases should behave as + * symlinks to symlinks. + * + * If alias points to an unmounted volume, the volume needs to be + * explicitly mounted. Mount flag kResolveAliasFileNoUI prevents the user + * from being prompted about mounting. + * + * Caution: Mac OS 10.10.2 will attempt to mount volumes silently, + * unlike the earlier behavior of only resolving within existing mounts. + * The new CFURLCreateByResolvingBookmarkData API must be used to avoid + * mounting the alias target. + * + * XXX: This function returns fnfErr (file not found) if it encounters a + * broken alias. Perhaps we should make that look like a dangling symlink + * instead of returning an error? + */ + osStatus = FSResolveAliasFileWithMountFlags(&fileRef, FALSE, + &targetIsFolder, &isAlias, + kResolveAliasFileNoUI); + if (osStatus != noErr) { + Log("%s: could not resolve reference: error %d\n", + __FUNCTION__, (int32)osStatus); + goto oldExit; + } + + resolvedURL = CFURLCreateFromFSRef(NULL, &fileRef); + if (!resolvedURL) { + Log("%s: could not create resolved URL reference from " + "resolved filesystem reference\n", __FUNCTION__); + goto oldExit; + } + +oldExit: + (void)0; // Need a statement for the label. +#else // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 + // We are running on 10.5 but the build was targetting 10.6+. Eject! + NOT_IMPLEMENTED(); +#endif // __MAC_OS_X_VERSION_MIN_REQUIRED + } + + if (resolvedURL) { + /* + * This is somewhat convoluted. We want to call + * CFURLGetFileSystemRepresentation() to get a UTF-8 string representing + * the target of the alias. But to call + * CFStringGetMaximumSizeOfFileSystemRepresentation(), we need a CFString, + * so we make one from the CFURL. Once we've got the max number of bytes + * for a filename on the filesystem, we allocate some memory and convert + * the CFURL to a basic UTF-8 string using a call to + * CFURLGetFileSystemRepresentation(). + */ + resolvedString = CFURLGetString(resolvedURL); + if (!resolvedString) { + Log("%s: could not create resolved string reference from " + "resolved URL reference\n", __FUNCTION__); goto exit; } + maxPath = CFStringGetMaximumSizeOfFileSystemRepresentation(resolvedString); - myTargetName = malloc(maxPath); - if (myTargetName == NULL) { - LOG(4, ("%s: could not allocate %"FMTSZ"d bytes of memory for " - "target name storage\n", __FUNCTION__, maxPath)); + *targetName = malloc(maxPath); + if (*targetName == NULL) { + Log("%s: could not allocate %"FMTSZ"d bytes of memory for " + "target name storage\n", __FUNCTION__, maxPath); goto exit; } - if (!CFURLGetFileSystemRepresentation(resolvedRef, FALSE, myTargetName, - maxPath)) { - LOG(4, ("%s: could not convert and copy resolved URL reference " - "into allocated buffer\n", __FUNCTION__)); + + success = CFURLGetFileSystemRepresentation(resolvedURL, FALSE, + *targetName, maxPath); + if (!success) { + Log("%s: could not convert and copy resolved URL reference " + "into allocated buffer\n", __FUNCTION__); goto exit; } - *targetName = myTargetName; - LOG(4, ("%s: file was an alias\n", __FUNCTION__)); - } else { - *targetName = NULL; - LOG(4, ("%s: file was not an alias\n", __FUNCTION__)); + status = 0; } - status = 0; - exit: +exit: + if (resolvedURL) { + CFRelease(resolvedURL); + } if (status != 0) { - free(myTargetName); + free(*targetName); + *targetName = NULL; } - if (resolvedRef != NULL) { - CFRelease(resolvedRef); - } return status; -#endif + +#endif // __APPLE__ } @@ -1343,7 +1461,7 @@ * to lower case and then compare it to the lower case component. */ while ((dirent = readdir(dir))) { - Unicode dentryNameU; + char *dentryNameU; int cmpResult; dentryName = dirent->d_name; @@ -1364,7 +1482,7 @@ dentryNameU = Unicode_Alloc(dentryName, STRING_ENCODING_DEFAULT); cmpResult = Unicode_CompareIgnoreCase(currentComponent, dentryNameU); - Unicode_Free(dentryNameU); + free(dentryNameU); if (cmpResult == 0) { /* @@ -1465,7 +1583,7 @@ * * Results: * Returns 0 if successful and resolved path for fileName is returned in - * convertedFileName with its length in convertedFileNameLength. + * convertedFileName and its length (without nul) in convertedFileNameLength. * Otherwise returns non-zero errno with convertedFileName and * convertedFileNameLength set to NULL and 0 respectively. * @@ -1485,35 +1603,35 @@ size_t *convertedFileNameLength) // OUT { char *currentComponent; - char *curDir; char *nextComponent; - int error = ENOENT; + char *curDir; size_t curDirSize; char *convertedComponent = NULL; size_t convertedComponentSize = 0; + int error = 0; ASSERT(sharePath); ASSERT(fileName); ASSERT(convertedFileName); ASSERT(fileNameLength >= sharePathLength); + curDirSize = sharePathLength + 1; + curDir = malloc(curDirSize); + if (!curDir) { + error = errno; + LOG(4, ("%s: failed to allocate for curDir\n", __FUNCTION__)); + goto exit; + } + Str_Strcpy(curDir, sharePath, curDirSize); + currentComponent = fileName + sharePathLength; /* Check there is something beyond the share name. */ if (*currentComponent == '\0') { /* * The fileName is the same as sharePath. Nothing else to do. - * Dup the string and return. + * Return the duplicated sharePath string and return. */ - *convertedFileName = strdup(fileName); - if (!*convertedFileName) { - error = errno; - *convertedFileName = NULL; - *convertedFileNameLength = 0; - LOG(4, ("%s: strdup on fileName failed.\n", __FUNCTION__)); - } else { - *convertedFileNameLength = strlen(fileName); - } - return 0; + goto exit; } /* Skip a component separator if not in the share path. */ @@ -1521,15 +1639,6 @@ currentComponent += 1; } - curDirSize = sharePathLength + 1; - curDir = malloc(curDirSize); - if (!curDir) { - error = errno; - LOG(4, ("%s: failed to allocate for curDir\n", __FUNCTION__)); - goto exit; - } - Str_Strcpy(curDir, sharePath, curDirSize); - while (TRUE) { /* Get the next component. */ nextComponent = strchr(currentComponent, DIRSEPC); @@ -1553,21 +1662,15 @@ if (error) { if (error == ENOENT) { - int ret; /* + * We could not find the current component so no need to convert it. + * So it most likely a new path is to be created or an ENOENT genuine error. * Copy out the components starting from currentComponent. We do this * after replacing DIRSEPC, so all the components following * currentComponent gets copied. */ - ret = HgfsConstructConvertedPath(&curDir, &curDirSize, currentComponent, - strlen(currentComponent) + 1); - if (ret) { - error = ret; - } - } - - if (error != ENOENT) { - free(curDir); + error = HgfsConstructConvertedPath(&curDir, &curDirSize, currentComponent, + strlen(currentComponent) + 1); } break; } @@ -1576,13 +1679,12 @@ error = HgfsConstructConvertedPath(&curDir, &curDirSize, convertedComponent, convertedComponentSize); if (error) { - free(curDir); - free(convertedComponent); break; } /* Free the converted component. */ free(convertedComponent); + convertedComponent = NULL; /* If there is no component after the current one then we are done. */ if (nextComponent == NULL) { @@ -1598,17 +1700,20 @@ currentComponent = nextComponent + 1; } - /* If the conversion was successful, return the result. */ - if (error == 0 || error == ENOENT) { - *convertedFileName = curDir; - *convertedFileNameLength = curDirSize; - } - exit: - if (error && error != ENOENT) { + /* + * If the conversion was successful, return the result. + * The length does NOT include the nul terminator. + */ + if (error == 0) { + *convertedFileName = curDir; + *convertedFileNameLength = curDirSize - 1; + } else { *convertedFileName = NULL; *convertedFileNameLength = 0; + free(curDir); } + free(convertedComponent); return error; } @@ -1677,17 +1782,15 @@ convertedFileNameLength); /* - * Success or non-ENOENT error code. HgfsCaseInsensitiveLookup can - * return ENOENT, and its ok to continue if it is ENOENT. + * Map the success or an error code. */ switch (error) { /* - * Both ENOENT and 0 mean that HgfsCaseInsensitiveLookup + * 0 means that HgfsCaseInsensitiveLookup completed * successfully built the converted name thus we return - * HGFS_NAME_STATUS_COMPLETE in these two cases. + * HGFS_NAME_STATUS_COMPLETE in this case. */ case 0: - case ENOENT: nameStatus = HGFS_NAME_STATUS_COMPLETE; break; case ENOTDIR: @@ -2221,6 +2324,7 @@ *targetName = myTargetName; myTargetName = NULL; #endif + LOG(4, ("%s: symlink target \"%s\"\n", __FUNCTION__, *targetName)); } HgfsStatToFileAttr(&stats, &creationTime, attr); @@ -2401,6 +2505,7 @@ HgfsFileAttrInfo *attr) // OUT: FileAttrInfo to copy into { attr->size = stats->st_size; + attr->allocationSize = stats->st_blocks * 512; attr->creationTime = *creationTime; #ifdef __FreeBSD__ @@ -2468,6 +2573,7 @@ attr->volumeId = stats->st_dev; attr->mask = HGFS_ATTR_VALID_TYPE | HGFS_ATTR_VALID_SIZE | + HGFS_ATTR_VALID_ALLOCATION_SIZE | HGFS_ATTR_VALID_CREATE_TIME | HGFS_ATTR_VALID_ACCESS_TIME | HGFS_ATTR_VALID_WRITE_TIME | @@ -2513,7 +2619,7 @@ ASSERT(attr); ASSERT(newPermissions); - *newPermissions = ~ALLPERMS; + *newPermissions = 0; if (attr->mask & HGFS_ATTR_VALID_SPECIAL_PERMS) { *newPermissions |= attr->specialPerms << 9; permsChanged = TRUE; @@ -2776,11 +2882,26 @@ * if all operations succeeded. */ + idChanged = HgfsSetattrOwnership(attr, &newUid, &newGid); + if (idChanged) { + LOG(4, ("%s: set uid %"FMTUID" and gid %"FMTUID"\n", __FUNCTION__, + newUid, newGid)); + if (fchown(fd, newUid, newGid) < 0) { + error = errno; + LOG(4, ("%s: error chowning file %u: %s\n", __FUNCTION__, + fd, strerror(error))); + status = error; + } + } + /* * Set permissions based on what we got in the packet. If we didn't get * a particular bit, use the existing permissions. In that case we don't * toggle permsChanged since it should not influence our decision of * whether to actually call chmod or not. + * + * NOTE: Setting ownership clears SUID and SGID bits, therefore set the + * file permissions after setting ownership. */ permsChanged = HgfsSetattrMode(&statBuf, attr, &newPermissions); if (permsChanged) { @@ -2794,18 +2915,6 @@ } } - idChanged = HgfsSetattrOwnership(attr, &newUid, &newGid); - if (idChanged) { - LOG(4, ("%s: set uid %"FMTUID" and gid %"FMTUID"\n", __FUNCTION__, - newUid, newGid)); - if (fchown(fd, newUid, newGid) < 0) { - error = errno; - LOG(4, ("%s: error chowning file %u: %s\n", __FUNCTION__, - fd, strerror(error))); - status = error; - } - } - if (attr->mask & HGFS_ATTR_VALID_SIZE) { /* * XXX: Truncating the file will trigger an oplock break. The client @@ -2981,11 +3090,28 @@ * if all operations succeeded. */ + idChanged = HgfsSetattrOwnership(attr, &newUid, &newGid); + /* + * Chown changes the uid and gid together. If one of them should + * not be changed, we pass in -1. + */ + if (idChanged) { + if (Posix_Lchown(localName, newUid, newGid) < 0) { + error = errno; + LOG(4, ("%s: error chowning file \"%s\": %s\n", __FUNCTION__, + localName, strerror(error))); + status = error; + } + } + /* * Set permissions based on what we got in the packet. If we didn't get * a particular bit, use the existing permissions. In that case we don't * toggle permsChanged since it should not influence our decision of * whether to actually call chmod or not. + * + * NOTE: Setting ownership clears SUID and SGID bits, therefore set the + * file permissions after setting ownership. */ permsChanged = HgfsSetattrMode(&statBuf, attr, &newPermissions); if (permsChanged) { @@ -2999,20 +3125,6 @@ } } - idChanged = HgfsSetattrOwnership(attr, &newUid, &newGid); - /* - * Chown changes the uid and gid together. If one of them should - * not be changed, we pass in -1. - */ - if (idChanged) { - if (Posix_Lchown(localName, newUid, newGid) < 0) { - error = errno; - LOG(4, ("%s: error chowning file \"%s\": %s\n", __FUNCTION__, - localName, strerror(error))); - status = error; - } - } - if (attr->mask & HGFS_ATTR_VALID_SIZE) { if (Posix_Truncate(localName, attr->size) < 0) { error = errno; @@ -3107,9 +3219,9 @@ */ LOG(4,("%s: opened search on base\n", __FUNCTION__)); - status = HgfsServerSearchVirtualDir(HgfsServerPolicy_GetShares, - HgfsServerPolicy_GetSharesInit, - HgfsServerPolicy_GetSharesCleanup, + status = HgfsServerSearchVirtualDir(HgfsServerResEnumGet, + HgfsServerResEnumInit, + HgfsServerResEnumExit, DIRECTORY_SEARCH_TYPE_BASE, session, &handle); @@ -3820,12 +3932,12 @@ */ HgfsInternalStatus -HgfsPlatformScanvdir(HgfsGetNameFunc enumNamesGet, // IN: Function to get name - HgfsInitFunc enumNamesInit, // IN: Setup function - HgfsCleanupFunc enumNamesExit, // IN: Cleanup function - DirectorySearchType type, // IN: Kind of search - unused - struct DirectoryEntry ***dents, // OUT: Array of DirectoryEntrys - uint32 *numDents) // OUT: total number of directory entrys +HgfsPlatformScanvdir(HgfsServerResEnumGetFunc enumNamesGet, // IN: Function to get name + HgfsServerResEnumInitFunc enumNamesInit, // IN: Setup function + HgfsServerResEnumExitFunc enumNamesExit, // IN: Cleanup function + DirectorySearchType type, // IN: Kind of search - unused + struct DirectoryEntry ***dents, // OUT: Array of DirectoryEntrys + uint32 *numDents) // OUT: total number of directory entrys { HgfsInternalStatus status = HGFS_ERROR_SUCCESS; uint32 totalDents = 0; // Number of allocated dents @@ -4028,16 +4140,16 @@ */ HgfsInternalStatus -HgfsPlatformReadFile(HgfsHandle file, // IN: Hgfs file handle +HgfsPlatformReadFile(fileDesc file, // IN: file descriptor HgfsSessionInfo *session, // IN: session info uint64 offset, // IN: file offset to read from uint32 requiredSize, // IN: length of data to read void* payload, // OUT: buffer for the read data uint32 *actualSize) // OUT: actual length read { - int fd; int error; - HgfsInternalStatus status; + HgfsInternalStatus status = 0; + HgfsHandle handle; Bool sequentialOpen; ASSERT(session); @@ -4046,15 +4158,12 @@ LOG(4, ("%s: read fh %u, offset %"FMT64"u, count %u\n", __FUNCTION__, file, offset, requiredSize)); - /* Get the file descriptor from the cache */ - status = HgfsPlatformGetFd(file, session, FALSE, &fd); - - if (status != 0) { - LOG(4, ("%s: Could not get file descriptor\n", __FUNCTION__)); - return status; + if (!HgfsFileDesc2Handle(file, session, &handle)) { + LOG(4, ("%s: Could not get file handle\n", __FUNCTION__)); + return EBADF; } - if (!HgfsHandleIsSequentialOpen(file, session, &sequentialOpen)) { + if (!HgfsHandleIsSequentialOpen(handle, session, &sequentialOpen)) { LOG(4, ("%s: Could not get sequenial open status\n", __FUNCTION__)); return EBADF; } @@ -4062,9 +4171,9 @@ #if defined(__linux__) || defined(__APPLE__) /* Read from the file. */ if (sequentialOpen) { - error = read(fd, payload, requiredSize); + error = read(file, payload, requiredSize); } else { - error = pread(fd, payload, requiredSize, offset); + error = pread(file, payload, requiredSize, offset); } #else /* @@ -4081,18 +4190,18 @@ { uint64 res; # if !defined(VM_X86_64) - error = _llseek(fd, offset >> 32, offset & 0xFFFFFFFF, &res, 0); + error = _llseek(file, offset >> 32, offset & 0xFFFFFFFF, &res, 0); # else - error = llseek(fd, offset >> 32, offset & 0xFFFFFFFF, &res, 0); + error = llseek(file, offset >> 32, offset & 0xFFFFFFFF, &res, 0); # endif } # else - error = lseek(fd, offset, 0); + error = lseek(file, offset, 0); # endif } if (error >= 0) { - error = read(fd, payload, requiredSize); + error = read(file, payload, requiredSize); } else { LOG(4, ("%s: could not seek to %"FMT64"u: %s\n", __FUNCTION__, offset, strerror(status))); @@ -4162,6 +4271,15 @@ return EBADF; } +#if !defined(sun) + if (!sequentialOpen) { + status = HgfsWriteCheckIORange(offset, requiredSize); + if (status != 0) { + return status; + } + } +#endif + #if defined(__linux__) /* Write to the file. */ if (sequentialOpen) { @@ -4253,7 +4371,7 @@ HgfsInternalStatus HgfsPlatformSearchDir(HgfsNameStatus nameStatus, // IN: name status const char *dirName, // IN: relative directory name - uint32 dirNameLength, // IN: length of dirName + size_t dirNameLength, // IN: length of dirName uint32 caseFlags, // IN: case flags HgfsShareInfo *shareInfo, // IN: sharfed folder information char *baseDir, // IN: name of the shared directory @@ -4321,9 +4439,9 @@ */ LOG(4, ("%s: opened search on base\n", __FUNCTION__)); - status = HgfsServerSearchVirtualDir(HgfsServerPolicy_GetShares, - HgfsServerPolicy_GetSharesInit, - HgfsServerPolicy_GetSharesCleanup, + status = HgfsServerSearchVirtualDir(HgfsServerResEnumGet, + HgfsServerResEnumInit, + HgfsServerResEnumExit, DIRECTORY_SEARCH_TYPE_BASE, session, handle); @@ -4371,9 +4489,9 @@ switch (searchType) { case DIRECTORY_SEARCH_TYPE_BASE: /* Entries are shares */ - status = HgfsServerRestartSearchVirtualDir(HgfsServerPolicy_GetShares, - HgfsServerPolicy_GetSharesInit, - HgfsServerPolicy_GetSharesCleanup, + status = HgfsServerRestartSearchVirtualDir(HgfsServerResEnumGet, + HgfsServerResEnumInit, + HgfsServerResEnumExit, session, handle); break; @@ -4690,7 +4808,7 @@ * a directory requires a valid mode, it's highly unlikely that we'll ever * be creating a directory without owner permissions. */ - permissions = ~ALLPERMS; + permissions = 0; permissions |= info->mask & HGFS_CREATE_DIR_VALID_SPECIAL_PERMS ? info->specialPerms << 9 : 0; permissions |= info->mask & HGFS_CREATE_DIR_VALID_OWNER_PERMS ? @@ -4745,6 +4863,8 @@ HgfsInternalStatus status = 0; int error; + LOG(4, ("%s: %s -> %s\n", __FUNCTION__, localSymlinkName, localTargetName)); + /* XXX: Should make use of targetNameP->flags? */ error = Posix_Symlink(localTargetName, localSymlinkName); if (error) { @@ -5155,3 +5275,64 @@ return 0; } #endif // __APPLE__ + + +#if !defined(sun) +/* + *----------------------------------------------------------------------------- + * + * HgfsWriteCheckIORange -- + * + * Verifies that the write arguments do not exceed the maxiuum file size. + * + * Results: + * 0 on success, otherwise an appropriate error. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static HgfsInternalStatus +HgfsWriteCheckIORange(off_t offset, // IN: + uint32 bytesToWrite) // IN: +{ + HgfsInternalStatus status = 0; + struct rlimit fileSize; + + if (getrlimit(RLIMIT_FSIZE, &fileSize) < 0) { + status = errno; + LOG(4, ("%s: Could not get file size limit\n", __FUNCTION__)); + goto exit; + } + + LOG(6, ("%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n", + __FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max)); + + /* + * Check the offset is within the file size range. + */ + if (fileSize.rlim_cur < offset) { + status = EFBIG; + LOG(4, ("%s: Write offset exceeds max file size limit - 0x%"FMT64"x\n", + __FUNCTION__, offset)); + goto exit; + } + + /* + * Check the data to write does not exceed the max file size. + */ + if (fileSize.rlim_cur - offset < bytesToWrite) { + status = EFBIG; + LOG(4, ("%s: Write data 0x%x bytes @ 0x%"FMT64"x size exceeds max file size\n", + __FUNCTION__, bytesToWrite, offset)); + goto exit; + } + +exit: + LOG(6, ("%s: Write data 0x%x bytes @ 0x%"FMT64"x returns %d\n", + __FUNCTION__, bytesToWrite, offset, status)); + return status; +} +#endif diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServerPacketUtil.c open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServerPacketUtil.c --- open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServerPacketUtil.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServerPacketUtil.c 2015-09-10 07:31:38.000000000 +0000 @@ -38,6 +38,7 @@ HgfsVmxIov *iov, uint32 iovCount, uint32 startIndex, + size_t dataSize, size_t bufSize, void **buf, Bool *isAllocated, @@ -74,6 +75,65 @@ uint32 *mappedCount); + +/* + *----------------------------------------------------------------------------- + * + * HSPU_ValidateReplyPacketSize -- + * + * Validate a reply buffer size in an hgfs packet with the reply data + * size for the request. + * + * Results: + * TRUE if the reply buffer size is large enough for the request reply + * results. FALSE if not. + * + * Side effects: + * None. + *----------------------------------------------------------------------------- + */ + +Bool +HSPU_ValidateReplyPacketSize(HgfsPacket *packet, // IN: Hgfs Packet + size_t replyHeaderSize, // IN: reply header size + size_t replyResultSize, // IN: reply result size + size_t replyResultDataSize, // IN: reply result data size + Bool useMappedMetaPacket) // IN: using meta buffer +{ + size_t bytesRemaining; + Bool replySizeIsOkay = FALSE; + + if (packet->replyPacket != NULL) { + /* Pre-allocated reply buffer (as used by the backdoor). */ + bytesRemaining = packet->replyPacketSize; + } else if (useMappedMetaPacket) { + /* No reply buffer (as used by the VMCI) reuse the metapacket buffer. */ + bytesRemaining = packet->metaPacketSize; + } else { + /* No reply buffer but we will allocate the size required. */ + replySizeIsOkay = TRUE; + goto exit; + } + + if (bytesRemaining >= replyHeaderSize) { + bytesRemaining -= replyHeaderSize; + } else { + goto exit; + } + if (bytesRemaining >= replyResultSize) { + bytesRemaining -= replyResultSize; + } else { + goto exit; + } + if (bytesRemaining >= replyResultDataSize) { + replySizeIsOkay = TRUE; + } + +exit: + return replySizeIsOkay; +} + + /* *----------------------------------------------------------------------------- * @@ -117,7 +177,6 @@ * is always mapped and copied no matter how much data it really contains. */ LOG(10, ("%s Using meta packet for reply packet\n", __FUNCTION__)); - ASSERT(replyDataSize <= packet->metaPacketDataSize); ASSERT(BUF_READWRITEABLE == packet->metaMappingType); ASSERT(replyDataSize <= packet->metaPacketSize); @@ -222,6 +281,7 @@ packet->iovCount, 0, packet->metaPacketDataSize, + packet->metaPacketSize, &packet->metaPacket, &packet->metaPacketIsAllocated, &packet->metaPacketMappedIov); @@ -231,6 +291,31 @@ /* *----------------------------------------------------------------------------- * + * HSPU_ValidateDataPacketSize -- + * + * Validate a data packet buffer size in an hgfs packet with the required data + * size for the request. + * + * Results: + * TRUE if the data buffer size is valid for the request. + * FALSE if not. + * + * Side effects: + * None. + *----------------------------------------------------------------------------- + */ + +Bool +HSPU_ValidateDataPacketSize(HgfsPacket *packet, // IN: Hgfs Packet + size_t dataSize) // IN: data size +{ + return (dataSize <= packet->dataPacketSize); +} + + +/* + *----------------------------------------------------------------------------- + * * HSPU_GetDataPacketBuf -- * * Get a data packet given an hgfs packet. @@ -263,6 +348,7 @@ packet->iov, packet->iovCount, packet->dataPacketIovIndex, + packet->dataPacketDataSize, packet->dataPacketSize, &packet->dataPacket, &packet->dataPacketIsAllocated, @@ -292,6 +378,7 @@ HgfsVmxIov *iov, // IN: iov array uint32 iovCount, // IN: iov array size uint32 startIndex, // IN: Start index of iov + size_t dataSize, // IN: Size of data in tghe buffer size_t bufSize, // IN: Size of buffer void **buf, // OUT: Contigous buffer Bool *isAllocated, // OUT: Buffer allocated @@ -348,9 +435,9 @@ *buf = Util_SafeMalloc(bufSize); *isAllocated = TRUE; - if (mappingType == BUF_READABLE || - mappingType == BUF_READWRITEABLE) { - HSPUCopyIovecToBuf(iov, iovMapped, startIndex, *buf, bufSize); + if ((mappingType == BUF_READABLE || mappingType == BUF_READWRITEABLE) && + (0 != dataSize)) { + HSPUCopyIovecToBuf(iov, iovMapped, startIndex, *buf, dataSize); } releaseMappings = TRUE; @@ -405,6 +492,31 @@ /* *----------------------------------------------------------------------------- * + * HSPU_SetDataPacketSize -- + * + * Set the size of the valid data in the data packet buffer. + * + * Results: + * void. + * + * Side effects: + * None. + *----------------------------------------------------------------------------- + */ + +void +HSPU_SetDataPacketSize(HgfsPacket *packet, // IN/OUT: Hgfs Packet + size_t dataSize) // IN: data size +{ + ASSERT(NULL != packet); + ASSERT(dataSize <= packet->dataPacketSize); + packet->dataPacketDataSize = dataSize; +} + + +/* + *----------------------------------------------------------------------------- + * * HSPU_PutDataPacketBuf -- * * Free data packet buffer if allocated. @@ -432,7 +544,7 @@ packet->iov, packet->iovCount, packet->dataPacketIovIndex, - packet->dataPacketSize, + packet->dataPacketDataSize, &packet->dataPacket, &packet->dataPacketIsAllocated, &packet->dataPacketMappedIov); diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServerParameters.c open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServerParameters.c --- open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServerParameters.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServerParameters.c 2015-09-10 07:31:38.000000000 +0000 @@ -402,7 +402,7 @@ ASSERT(NULL != packet); request = packet; - LOG(4, ("%s: Received a request with opcode %d.\n", __FUNCTION__, (int) request->op)); + LOG(4, ("%s: Received a request with opcode %d.\n", __FUNCTION__, request->op)); /* * Error out if less than HgfsRequest size. @@ -466,6 +466,8 @@ } exit: + LOG(4, ("%s: unpacked request(op %d, id %u) -> %u.\n", __FUNCTION__, + request->op, *requestId, unpackStatus)); return unpackStatus; } @@ -893,6 +895,7 @@ { reply->file = openInfo->file; reply->reserved = 0; + reply->flags = 0; if (openInfo->mask & HGFS_OPEN_VALID_SERVER_LOCK) { reply->acquiredLock = openInfo->acquiredLock; } else { @@ -2477,7 +2480,7 @@ uint32 utf8TargetNameLen, // IN: file name length HgfsReplyGetattrV3 *reply) // OUT: payload { - LOG(4, ("%s: attr type: %u\n", __FUNCTION__, reply->attr.type)); + LOG(4, ("%s: attr type: %u\n", __FUNCTION__, attr->type)); HgfsPackAttrV2(attr, &reply->attr); reply->reserved = 0; @@ -4845,10 +4848,16 @@ srcNameLength, srcFile, srcCaseFlags)) { - HgfsFileNameV3 *targetName = (HgfsFileNameV3 *)(*srcFileName + 1 + - *srcNameLength); + const HgfsFileNameV3 *targetName; + + if (*srcUseHandle) { + targetName = &requestV3->targetName; + } else { + targetName = (const HgfsFileNameV3 *)(*srcFileName + 1 + + *srcNameLength); + } prefixSize = ((char *)targetName - (char *)requestV3) + - offsetof(HgfsFileNameV3, name); + offsetof(HgfsFileNameV3, name); return HgfsUnpackFileNameV3(targetName, payloadSize - prefixSize, @@ -5017,7 +5026,7 @@ HgfsUnpackSearchOpenPayload(const HgfsRequestSearchOpen *request, // IN: payload size_t payloadSize, // IN: payload size const char **dirName, // OUT: directory name - uint32 *dirNameLength) // OUT: name length + size_t *dirNameLength) // OUT: name length { LOG(4, ("%s: HGFS_OP_SEARCH_OPEN\n", __FUNCTION__)); if (payloadSize >= sizeof *request) { @@ -5054,20 +5063,30 @@ HgfsUnpackSearchOpenPayloadV3(const HgfsRequestSearchOpenV3 *requestV3, // IN: payload size_t payloadSize, // IN: payload size const char **dirName, // OUT: directory name - uint32 *dirNameLength, // OUT: name length + size_t *dirNameLength, // OUT: name length uint32 *caseFlags) // OUT: case flags { + Bool result = FALSE; LOG(4, ("%s: HGFS_OP_SEARCH_OPEN_V3\n", __FUNCTION__)); if (payloadSize >= sizeof *requestV3) { - if (sizeof *requestV3 + requestV3->dirName.length - 1 <= payloadSize) { - *dirName = requestV3->dirName.name; - *dirNameLength = requestV3->dirName.length; - *caseFlags = requestV3->dirName.flags; - return TRUE; + uint32 prefixSize = offsetof(HgfsRequestSearchOpenV3, dirName.name); + Bool useDirHandle; + HgfsHandle dirHandle; + + result = HgfsUnpackFileNameV3(&requestV3->dirName, + payloadSize - prefixSize, + &useDirHandle, + dirName, + dirNameLength, + &dirHandle, + caseFlags); + if (useDirHandle) { + LOG(4, ("%s: client is trying to a handle %u\n", __FUNCTION__, dirHandle)); + result = FALSE; } } - LOG(4, ("%s: HGFS packet too small\n", __FUNCTION__)); - return FALSE; + LOG(4, ("%s: returns %d\n", __FUNCTION__, result)); + return result; } @@ -5093,7 +5112,7 @@ size_t packetSize, // IN: request packet size HgfsOp op, // IN: request type const char **dirName, // OUT: directory name - uint32 *dirNameLength, // OUT: name length + size_t *dirNameLength, // OUT: name length uint32 *caseFlags) // OUT: case flags { ASSERT(packet); @@ -5898,7 +5917,7 @@ } if (!result) { - LOG(4, ("%s: Error unpacking packet\n", __FUNCTION__)); + LOG(4, ("%s: Error unpacking HGFS_OP_OPLOCK_BREAK_V4 packet\n", __FUNCTION__)); } return result; } @@ -5921,7 +5940,7 @@ *----------------------------------------------------------------------------- */ -static size_t +static int HgfsBuildCPName(char const *shareName, // IN: utf8 share name char *fileName, // IN: utf8 file path char **cpName) // OUT: full name in cp format @@ -5929,18 +5948,22 @@ size_t shareNameLen = strlen(shareName) + 1; size_t fileNameLen = strlen(fileName) + 1; char *fullName = Util_SafeMalloc(shareNameLen + fileNameLen); - size_t result; + int cpNameResult; *cpName = Util_SafeMalloc(shareNameLen + fileNameLen); Str_Strcpy(fullName, shareName, shareNameLen); fullName[shareNameLen - 1] = DIRSEPC; Str_Strcpy(fullName + shareNameLen, fileName, fileNameLen); - result = CPName_ConvertTo(fullName, shareNameLen + fileNameLen, *cpName); - ASSERT(result > 0); // Unescaped name can't be longer then escaped thus it must fit. + // Unescaped name can't be longer then escaped thus it must fit. + cpNameResult = CPName_ConvertTo(fullName, shareNameLen + fileNameLen, *cpName); free(fullName); + if (cpNameResult < 0) { + free(*cpName); + *cpName = NULL; + } - return result; + return cpNameResult; } @@ -6002,34 +6025,45 @@ size_t bufferSize, // IN: available space HgfsNotifyEventV4 *reply) // OUT: notificaiton buffer { - size_t totalLength; + size_t totalLength = 0; if (sizeof *reply > bufferSize) { - return 0; + /* Not enough space for the event, drop the event. */ + goto exit; } reply->nextOffset = 0; reply->mask = mask; if (NULL != fileName) { - char *fullPath; + char *cpFullName; size_t remainingSize; - size_t nameSize; size_t hgfsNameSize; + int cpFullNameSize; - nameSize = HgfsBuildCPName(shareName, fileName, &fullPath); - remainingSize = bufferSize - offsetof(HgfsNotifyEventV4, fileName); - if (HgfsPackHgfsName(fullPath, nameSize, remainingSize, &hgfsNameSize, - &reply->fileName)) { - remainingSize -= hgfsNameSize; - totalLength = bufferSize - remainingSize; - } else { - totalLength = 0; + cpFullNameSize = HgfsBuildCPName(shareName, fileName, &cpFullName); + if (cpFullNameSize < 0) { + /* Could not build the crossplatform name, drop the event. */ + goto exit; } - free(fullPath); + remainingSize = bufferSize - offsetof(HgfsNotifyEventV4, fileName); + if (!HgfsPackHgfsName(cpFullName, + cpFullNameSize, + remainingSize, + &hgfsNameSize, + &reply->fileName)) { + /* Name would not fit, drop the event. */ + free(cpFullName); + goto exit; + } + remainingSize -= hgfsNameSize; + totalLength = bufferSize - remainingSize; + free(cpFullName); } else { reply->fileName.length = 0; totalLength = sizeof *reply; } + +exit: return totalLength; } diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServerParameters.h open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServerParameters.h --- open-vm-tools-9.10.2-2822639/lib/hgfsServer/hgfsServerParameters.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsServer/hgfsServerParameters.h 2015-09-10 07:31:38.000000000 +0000 @@ -246,7 +246,7 @@ size_t packetSize, // IN: request packet size HgfsOp op, // IN: request type const char **dirName, // OUT: directory name - uint32 *dirNameLength, // OUT: name length + size_t *dirNameLength, // OUT: name length uint32 *caseFlags); // OUT: case flags Bool HgfsPackCloseReply(HgfsPacket *packet, // IN/OUT: Hgfs Packet diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsServerManagerGuest/hgfsChannelGuest.c open-vm-tools-10.0.0-3000743/lib/hgfsServerManagerGuest/hgfsChannelGuest.c --- open-vm-tools-9.10.2-2822639/lib/hgfsServerManagerGuest/hgfsChannelGuest.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsServerManagerGuest/hgfsChannelGuest.c 2015-09-10 07:31:38.000000000 +0000 @@ -78,7 +78,7 @@ * also removed and the HGFS server exit is called and this object is torn down. */ typedef struct HgfsChannelServerData { - HgfsServerSessionCallbacks *serverCBTable; /* HGFS server entry points. */ + HgfsServerCallbacks *serverCBTable; /* HGFS server entry points. */ Atomic_uint32 refCount; /* Server data reference count. */ } HgfsChannelServerData; @@ -197,7 +197,8 @@ */ static Bool -HgfsChannelInitServer(HgfsChannelServerData *serverInfo) // IN/OUT: ref count +HgfsChannelInitServer(HgfsServerMgrCallbacks *mgrCb, // IN: server manager callbacks + HgfsChannelServerData *serverInfo) // IN/OUT: ref count { Bool result; @@ -206,7 +207,7 @@ Debug("%s: Initialize Hgfs server.\n", __FUNCTION__); /* If we have a new connection initialize the server session with default settings. */ - result = HgfsServer_InitState(&serverInfo->serverCBTable, &gHgfsGuestCfgSettings, NULL); + result = HgfsServer_InitState(&serverInfo->serverCBTable, &gHgfsGuestCfgSettings, mgrCb); if (!result) { Debug("%s: Could not init Hgfs server.\n", __FUNCTION__); } @@ -343,6 +344,7 @@ static Bool HgfsChannelInitChannel(HgfsChannelData *channel, // IN/OUT: channel object + HgfsServerMgrCallbacks *mgrCb, // IN: server manager callbacks HgfsChannelServerData *serverInfo) // IN/OUT: server info { Bool result = TRUE; @@ -360,7 +362,7 @@ channel->serverInfo = serverInfo; if (0 == serverInfoCount) { /* The HGFS server has not been initialized, do it now. */ - result = HgfsChannelInitServer(channel->serverInfo); + result = HgfsChannelInitServer(mgrCb, channel->serverInfo); if (!result) { Debug("%s: Could not init Hgfs server.\n", __FUNCTION__); goto exit; @@ -431,7 +433,7 @@ Bool success = FALSE; struct HgfsGuestConn *connData = NULL; - if (channel->ops->init(channel->serverInfo->serverCBTable, + if (channel->ops->init(&channel->serverInfo->serverCBTable->session, rpc, rpcCallback, &connData)) { @@ -579,7 +581,8 @@ */ Bool -HgfsChannelGuest_Init(HgfsServerMgrData *mgrData) // IN/OUT: connection manager object +HgfsChannelGuest_Init(HgfsServerMgrData *mgrData, // IN/OUT: server manager data + HgfsServerMgrCallbacks *mgrCb) // IN: server manager callbacks { Bool success = FALSE; HgfsChannelData *channel = &gHgfsChannels[0]; // Shared channel (internal RPC) @@ -616,7 +619,7 @@ if (0 == channelRefCount) { /* Initialize channels objects. */ - if (!HgfsChannelInitChannel(channel, &gHgfsChannelServerInfo)) { + if (!HgfsChannelInitChannel(channel, mgrCb, &gHgfsChannelServerInfo)) { Debug("%s: Could not init channel.\n", __FUNCTION__); goto exit; } diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsServerManagerGuest/hgfsChannelGuestInt.h open-vm-tools-10.0.0-3000743/lib/hgfsServerManagerGuest/hgfsChannelGuestInt.h --- open-vm-tools-9.10.2-2822639/lib/hgfsServerManagerGuest/hgfsChannelGuestInt.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsServerManagerGuest/hgfsChannelGuestInt.h 2015-09-10 07:31:38.000000000 +0000 @@ -51,7 +51,7 @@ extern HgfsGuestChannelCBTable gGuestBackdoorOps; /* For use by HgfsServerManager. */ -Bool HgfsChannelGuest_Init(HgfsServerMgrData *data); +Bool HgfsChannelGuest_Init(HgfsServerMgrData *data, HgfsServerMgrCallbacks *cb); void HgfsChannelGuest_Exit(HgfsServerMgrData *data); Bool HgfsChannelGuest_Receive(HgfsServerMgrData *data, char const *packetIn, diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c open-vm-tools-10.0.0-3000743/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c --- open-vm-tools-9.10.2-2822639/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c 2015-09-10 07:31:38.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006,2014-2015 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -25,6 +25,7 @@ * */ +#include #include "hgfsServerPolicy.h" #include "hgfsChannelGuestInt.h" #include "hgfsServerManager.h" @@ -32,7 +33,15 @@ #include "vm_assert.h" #include "hgfs.h" - +/* + * Local for now and will be used in conjuncutntion with the manager data passed + * on registration. + */ +static HgfsServerMgrCallbacks gHgfsServerManagerGuestData = { + { + NULL, // Filled by the policy manager + } +}; /* *---------------------------------------------------------------------------- @@ -89,18 +98,20 @@ ASSERT(data); ASSERT(data->appName); - - /* * Passing NULL here is safe because the shares maintained by the guest * policy server never change, invalidating the need for an invalidate * function. + * XXX - retrieve the enum of shares routines and will need to pass this + * down through the channel guest into the HGFS server directly. */ - if (!HgfsServerPolicy_Init(NULL, NULL)) { + if (!HgfsServerPolicy_Init(NULL, + NULL, + &gHgfsServerManagerGuestData.enumResources)) { return FALSE; } - if (!HgfsChannelGuest_Init(data)) { + if (!HgfsChannelGuest_Init(data, &gHgfsServerManagerGuestData)) { HgfsServerPolicy_Cleanup(); return FALSE; } @@ -160,4 +171,5 @@ HgfsChannelGuest_Exit(data); HgfsServerPolicy_Cleanup(); + memset(&gHgfsServerManagerGuestData, 0, sizeof gHgfsServerManagerGuestData); } diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c open-vm-tools-10.0.0-3000743/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c --- open-vm-tools-9.10.2-2822639/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c 2015-09-10 07:31:38.000000000 +0000 @@ -48,6 +48,16 @@ static HgfsServerPolicyState myState; +static void * +HgfsServerPolicyEnumSharesInit(void); +static Bool +HgfsServerPolicyEnumSharesGet(void *data, + char const **name, + size_t *len, + Bool *done); +static Bool +HgfsServerPolicyEnumSharesExit(void *data); + /* *----------------------------------------------------------------------------- @@ -125,16 +135,18 @@ */ Bool -HgfsServerPolicy_Init(HgfsInvalidateObjectsFunc *invalidateObjects, // Unused - HgfsRegisterSharedFolderFunc *registerFolder) // Unused +HgfsServerPolicy_Init(HgfsInvalidateObjectsFunc invalidateObjects, // Unused + HgfsRegisterSharedFolderFunc registerFolder, // Unused + HgfsServerResEnumCallbacks *enumResources) // OUT enum callbacks { HgfsSharedFolder *rootShare; /* - * We do not recognize this callback, so make sure our caller doesn't pass + * Currently these callbacks are not used, so make sure our caller doesn't pass * it in. */ - ASSERT(!invalidateObjects); + ASSERT(invalidateObjects == NULL); + ASSERT(registerFolder == NULL); DblLnkLst_Init(&myState.shares); @@ -165,6 +177,13 @@ /* Add the root node to the end of the list */ DblLnkLst_LinkLast(&myState.shares, &rootShare->links); + /* + * Fill the share enumeration callback table. + */ + enumResources->init = HgfsServerPolicyEnumSharesInit; + enumResources->get = HgfsServerPolicyEnumSharesGet; + enumResources->exit = HgfsServerPolicyEnumSharesExit; + return TRUE; } @@ -280,7 +299,7 @@ } -/* State used by HgfsServerPolicy_GetShares and friends */ +/* State used by HgfsServerPolicyEnumSharesGet and friends */ typedef struct State { DblLnkLst_Links *next; } GetSharesState; @@ -289,9 +308,9 @@ /* *----------------------------------------------------------------------------- * - * HgfsServerPolicy_GetSharesInit -- + * HgfsServerPolicyEnumSharesInit -- * - * Setup state for HgfsServerPolicy_GetShares + * Setup state for HgfsServerPolicyEnumSharesGet * * Results: * Pointer to state on success. @@ -303,14 +322,14 @@ *----------------------------------------------------------------------------- */ -void * -HgfsServerPolicy_GetSharesInit(void) +static void * +HgfsServerPolicyEnumSharesInit(void) { GetSharesState *that; that = malloc(sizeof *that); if (!that) { - LOG(4, ("HgfsServerPolicy_GetSharesInit: couldn't allocate state\n")); + LOG(4, ("HgfsServerPolicyEnumSharesInit: couldn't allocate state\n")); return NULL; } @@ -322,14 +341,14 @@ /* *----------------------------------------------------------------------------- * - * HgfsServerPolicy_GetShares -- + * HgfsServerPolicyEnumSharesGet -- * * Enumerate share names one at a time. * * When finished, sets "done" to TRUE. * * Should be called with the results obtained by calling - * HgfsServerPolicy_GetSharesInit. + * HgfsServerPolicyEnumSharesInit. * * Results: * TRUE on success. @@ -341,11 +360,11 @@ *----------------------------------------------------------------------------- */ -Bool -HgfsServerPolicy_GetShares(void *data, // IN: Callback data - char const **name, // OUT: Share name - size_t *len, // OUT: Name length - Bool *done) // OUT: Completion status +static Bool +HgfsServerPolicyEnumSharesGet(void *data, // IN: Callback data + char const **name, // OUT: Share name + size_t *len, // OUT: Name length + Bool *done) // OUT: Completion status { GetSharesState *that; HgfsSharedFolder *share; @@ -367,7 +386,7 @@ that->next = share->links.next; *name = share->name; *len = share->nameLen; - LOG(4, ("HgfsServerPolicy_GetShares: Share name is \"%s\"\n", + LOG(4, ("HgfsServerPolicyEnumSharesGet: Share name is \"%s\"\n", *name)); *done = FALSE; return TRUE; @@ -377,9 +396,9 @@ /* *----------------------------------------------------------------------------- * - * HgfsServerPolicy_GetSharesCleanup -- + * HgfsServerPolicyEnumSharesExit -- * - * Cleanup state from HgfsServerPolicy_GetShares + * Cleanup state from HgfsServerPolicyEnumSharesGet * * Results: * TRUE on success. @@ -391,8 +410,8 @@ *----------------------------------------------------------------------------- */ -Bool -HgfsServerPolicy_GetSharesCleanup(void *data) // IN: Callback data +static Bool +HgfsServerPolicyEnumSharesExit(void *data) // IN: Callback data { GetSharesState *that; diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsUri/hgfsUriPosix.c open-vm-tools-10.0.0-3000743/lib/hgfsUri/hgfsUriPosix.c --- open-vm-tools-9.10.2-2822639/lib/hgfsUri/hgfsUriPosix.c 1970-01-01 00:00:00.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsUri/hgfsUriPosix.c 2015-09-10 07:31:38.000000000 +0000 @@ -0,0 +1,110 @@ +/********************************************************* + * Copyright (C) 2015 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * hgfsPosix.c -- + * + * Provides a library for guest applications to convert local pathames to + * x-vmware-share:// style URIs + */ + +#if !defined __linux__ && !defined __APPLE__ && !defined __FreeBSD__ +# error This file should not be compiled +#endif + +#include "vmware.h" +#include "debug.h" +#include "str.h" +#include + +#include "hgfsUri.h" +#include "hgfsHelper.h" + +#include "util.h" +#include "unicode.h" +#include "hgfsEscape.h" + +#include "ghIntegrationCommon.h" // For GHI_HGFS_SHARE_URL_UTF8 + + +/* + *----------------------------------------------------------------------------- + * + * HgfsUri_ConvertFromPathToHgfsUri -- + * + * Test the UTF8 pathname to see if it's on an HGFS Share. If it is + * construct a UTF8 URI in the form of x-vmware-share://share_name/item.txt. + * If not, convert to a regular UTF8 URI string. + * + * Results: + * Filename as UTF8 URI string if success, NULL if failed. + * + * Side effects: + * Memory may be allocated for the returned string. + * + *----------------------------------------------------------------------------- + */ + +char * +HgfsUri_ConvertFromPathToHgfsUri(const char *pathName, // IN: path to convert + Bool hgfsOnly) // IN +{ + char *shareUri = NULL; + Bool isHgfsName = FALSE; + char *sharesDefaultRootPath = NULL; + + /* We can only operate on full paths. */ + if (pathName[0] != DIRSEPC) { + return shareUri; + } + + /* Retrieve the servername & share name in use. */ + if (!HgfsHlpr_QuerySharesDefaultRootPath(&sharesDefaultRootPath)) { + Debug("%s: Unable to query shares default root path\n", __FUNCTION__); + goto exit; + } + + if (Unicode_StartsWith(pathName, sharesDefaultRootPath)) { + char *relativeSharePath = NULL; + char *escapedSharePath = NULL; + UnicodeIndex relativePathStart = strlen(sharesDefaultRootPath); + if ( strlen(pathName) > relativePathStart + && pathName[relativePathStart] == DIRSEPC) { + relativePathStart++; + } + relativeSharePath = Unicode_RemoveRange(pathName, 0, relativePathStart); + HgfsEscape_Undo(relativeSharePath, strlen(relativeSharePath) + 1); + escapedSharePath = g_uri_escape_string(relativeSharePath, "/", FALSE); + shareUri = Unicode_Append(GHI_HGFS_SHARE_URL_UTF8, escapedSharePath); + g_free(escapedSharePath); + free(relativeSharePath); + isHgfsName = TRUE; + } + +exit: + if (!isHgfsName && !hgfsOnly) { + /* Only convert non-hgfs file name if hgfsOnly is not set. */ + char *escapedPath = g_uri_escape_string(pathName, "/", FALSE); + shareUri = Str_Asprintf(NULL, + "file://%s", + escapedPath); + g_free(escapedPath); + } + HgfsHlpr_FreeSharesRootPath(sharesDefaultRootPath); + return shareUri; +} diff -Nru open-vm-tools-9.10.2-2822639/lib/hgfsUri/Makefile.am open-vm-tools-10.0.0-3000743/lib/hgfsUri/Makefile.am --- open-vm-tools-9.10.2-2822639/lib/hgfsUri/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/hgfsUri/Makefile.am 2015-09-10 07:31:38.000000000 +0000 @@ -0,0 +1,26 @@ +################################################################################ +### Copyright 2015 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### This program is distributed in the hope that it will be useful, +### but WITHOUT ANY WARRANTY; without even the implied warranty of +### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +### GNU General Public License for more details. +### +### You should have received a copy of the GNU General Public License +### along with this program; if not, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +noinst_LTLIBRARIES = libHgfsUri.la + +libHgfsUri_la_SOURCES = +libHgfsUri_la_SOURCES += hgfsUriPosix.c + +AM_CFLAGS = +AM_CFLAGS += -DVMTOOLS_USE_GLIB +AM_CFLAGS += @GLIB2_CPPFLAGS@ + diff -Nru open-vm-tools-9.10.2-2822639/lib/include/appUtil.h open-vm-tools-10.0.0-3000743/lib/include/appUtil.h --- open-vm-tools-9.10.2-2822639/lib/include/appUtil.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/appUtil.h 2015-09-10 07:31:38.000000000 +0000 @@ -26,6 +26,10 @@ #define _APP_UTIL_H_ +#ifdef _WIN32 +#include +#endif + #ifdef __cplusplus extern "C" { #endif // __cplusplus @@ -85,6 +89,7 @@ void AppUtil_BuildGlobalApplicationList(void); +wchar_t* AppUtil_SanitizeCommandLine(const wchar_t *commandLineUtf16); char *AppUtil_ActionURIForCommandLine(const WCHAR *commandLineUtf16); Bool AppUtil_CommandLineForShellCommandURI(const char *shellCommandURI, char **executablePath, @@ -112,6 +117,8 @@ TCHAR *iconFile, int *iconIndex); +PISECURITY_DESCRIPTOR AppUtil_AllocateLowIntegritySD(void); + LPSTR AppUtil_ToLowerUtf8(LPCSTR s); LPWSTR AppUtil_ToLowerUtf16(LPCWSTR s); diff -Nru open-vm-tools-9.10.2-2822639/lib/include/asyncsocket.h open-vm-tools-10.0.0-3000743/lib/include/asyncsocket.h --- open-vm-tools-9.10.2-2822639/lib/include/asyncsocket.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/asyncsocket.h 2015-09-10 07:31:38.000000000 +0000 @@ -65,6 +65,27 @@ #define ASOCKERR_BIND 10 #define ASOCKERR_BINDADDRINUSE 11 #define ASOCKERR_LISTEN 12 +#define ASOCKERR_CONNECTSSL 13 + + +/* + * Websocket close status codes -- + * + * enum has numbers in names because RFC6455 refers to the numbers frequently. + */ +enum { + WEB_SOCKET_CLOSE_STATUS_1000_NORMAL = 1000, + WEB_SOCKET_CLOSE_STATUS_1001_GOING_AWAY = 1001, + WEB_SOCKET_CLOSE_STATUS_1002_PROTOCOL_ERROR = 1002, + WEB_SOCKET_CLOSE_STATUS_1003_INVALID_DATA = 1003, + WEB_SOCKET_CLOSE_STATUS_1005_EMPTY = 1005, + WEB_SOCKET_CLOSE_STATUS_1006_ABNORMAL = 1006, + WEB_SOCKET_CLOSE_STATUS_1007_INCONSISTENT_DATA = 1007, + WEB_SOCKET_CLOSE_STATUS_1008_POLICY_VIOLATION = 1008, + WEB_SOCKET_CLOSE_STATUS_1009_MESSAGE_TOO_BIG = 1009, + WEB_SOCKET_CLOSE_STATUS_1010_UNSUPPORTED_EXTENSIONS = 1010, + WEB_SOCKET_CLOSE_STATUS_1015_TLS_HANDSHAKE_ERROR = 1015, +}; /* * Flags passed into AsyncSocket_Connect*(). @@ -209,6 +230,7 @@ AsyncSocket *AsyncSocket_ListenWebSocket(const char *addrStr, unsigned int port, Bool useSSL, + const char *protocols[], AsyncSocketConnectFn connectFn, void *clientData, AsyncSocketPollParams *pollParams, @@ -216,6 +238,7 @@ #ifndef _WIN32 AsyncSocket *AsyncSocket_ListenWebSocketUDS(const char *pipeName, Bool useSSL, + const char *protocols[], AsyncSocketConnectFn connectFn, void *clientData, AsyncSocketPollParams *pollParams, @@ -257,14 +280,16 @@ #endif #ifndef VMX86_TOOLS -AsyncSocket *AsyncSocket_ConnectWebSocket(const char *url, - Bool permitUnverifiedSSL, - const char *cookies, - AsyncSocketConnectFn connectFn, - void *clientData, - AsyncSocketConnectFlags flags, - AsyncSocketPollParams *pollParams, - int *error); +AsyncSocket * +AsyncSocket_ConnectWebSocket(const char *url, + struct _SSLVerifyParam *sslVerifyParam, + const char *cookies, + const char *protocols[], + AsyncSocketConnectFn connectFn, + void *clientData, + AsyncSocketConnectFlags flags, + AsyncSocketPollParams *pollParams, + int *error); #endif #ifndef USE_SSL_DIRECT @@ -272,7 +297,8 @@ * Initiate SSL connection on existing asock, with optional cert verification */ Bool AsyncSocket_ConnectSSL(AsyncSocket *asock, - struct _SSLVerifyParam *verifyParam); + struct _SSLVerifyParam *verifyParam, + void *sslContext); Bool AsyncSocket_AcceptSSL(AsyncSocket *asock); #endif @@ -405,10 +431,21 @@ #endif /* + * Retrieve the close status, if received, for a websocket connection + */ +uint16 AsyncSocket_GetWebSocketCloseStatus(const AsyncSocket *asock); + +/* * Set low-latency mode for sends: */ void AsyncSocket_SetSendLowLatencyMode(AsyncSocket *asock, Bool enable); +/* + * Get negotiated websocket protocol + */ +const char *AsyncSocket_GetWebSocketProtocol(AsyncSocket *asock); + +const char * stristr(const char *s, const char *find); /* * Some logging macros for convenience diff -Nru open-vm-tools-9.10.2-2822639/lib/include/auth.h open-vm-tools-10.0.0-3000743/lib/include/auth.h --- open-vm-tools-9.10.2-2822639/lib/include/auth.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/auth.h 2015-09-10 07:31:38.000000000 +0000 @@ -66,7 +66,7 @@ #endif -AuthToken Auth_AuthenticateUser(ConstUnicode user, ConstUnicode pass); +AuthToken Auth_AuthenticateUser(const char *user, const char *pass); void Auth_CloseToken(AuthToken token); diff -Nru open-vm-tools-9.10.2-2822639/lib/include/backdoor_def.h open-vm-tools-10.0.0-3000743/lib/include/backdoor_def.h --- open-vm-tools-9.10.2-2822639/lib/include/backdoor_def.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/backdoor_def.h 2015-09-10 07:31:38.000000000 +0000 @@ -118,7 +118,7 @@ //#define BDOOR_CMD_DEVEL_FAKEHARDWARE 44 /* Not in use. */ #define BDOOR_CMD_GETHZ 45 #define BDOOR_CMD_GETTIMEFULL 46 -#define BDOOR_CMD_STATELOGGER 47 /* Disabled by default. */ +//#define BDOOR_CMD_STATELOGGER 47 /* Not in use. */ #define BDOOR_CMD_CHECKFORCEBIOSSETUP 48 /* CPL 0 only. */ #define BDOOR_CMD_LAZYTIMEREMULATION 49 /* CPL 0 only. */ #define BDOOR_CMD_BIOSBBS 50 /* CPL 0 only. */ @@ -145,13 +145,14 @@ # define BDOOR_CMD_FAS_GET_TABLE_SKIP 5 # define BDOOR_CMD_FAS_GET_SLEEP_ENABLES 6 # define BDOOR_CMD_FAS_GET_HARD_RESET_ENABLE 7 -#define BDOOR_CMD_SENDPSHAREHINTS 66 +#define BDOOR_CMD_SENDPSHAREHINTS 66 /* Not in use. Deprecated. */ #define BDOOR_CMD_ENABLE_USB_MOUSE 67 #define BDOOR_CMD_GET_VCPU_INFO 68 # define BDOOR_CMD_VCPU_SLC64 0 # define BDOOR_CMD_VCPU_SYNC_VTSCS 1 # define BDOOR_CMD_VCPU_HV_REPLAY_OK 2 # define BDOOR_CMD_VCPU_LEGACY_X2APIC_OK 3 +# define BDOOR_CMD_VCPU_MMIO_HONORS_PAT 4 # define BDOOR_CMD_VCPU_RESERVED 31 #define BDOOR_CMD_EFI_SERIALCON_CONFIG 69 /* CPL 0 only. */ #define BDOOR_CMD_BUG328986 70 /* CPL 0 only. */ @@ -172,33 +173,30 @@ #define BDOOR_CMD_GET_PCI_BAR 79 /* CPL 0 only */ #define BDOOR_CMD_SHOULD_GENERATE_SYSTEMID 80 /* CPL 0 only */ #define BDOOR_CMD_READ_DEBUG_FILE 81 /* Devel only. */ -#define BDOOR_CMD_MAX 82 +#define BDOOR_CMD_SCREENSHOT 82 /* Devel only. */ +#define BDOOR_CMD_INJECT_KEY 83 /* Devel only. */ +#define BDOOR_CMD_INJECT_MOUSE 84 /* Devel only. */ +#define BDOOR_CMD_MKS_GUEST_STATS 85 /* CPL 0 only. */ +# define BDOOR_CMD_MKSGS_RESET 0 +# define BDOOR_CMD_MKSGS_ADD_PPN 1 +# define BDOOR_CMD_MKSGS_REMOVE_PPN 2 +#define BDOOR_CMD_ABSPOINTER_RESTRICT 86 +#define BDOOR_CMD_GUESTINTEGRITY 87 +# define BDOOR_CMD_GI_SETUP 0 +# define BDOOR_CMD_GI_REMOVE 1 +#define BDOOR_CMD_MKSSTATS_SNAPSHOT 88 /* Devel only. */ +# define BDOOR_CMD_MKSSTATS_START 0 +# define BDOOR_CMD_MKSSTATS_STOP 1 +#define BDOOR_CMD_MAX 89 -/* +/* * IMPORTANT NOTE: When modifying the behavior of an existing backdoor command, * you must adhere to the semantics expected by the oldest Tools who use that - * command. Specifically, do not alter the way in which the command modifies + * command. Specifically, do not alter the way in which the command modifies * the registers. Otherwise backwards compatibility will suffer. */ -/* Processing mode for guest pshare hints (SENDPSHAREHINTS cmd) */ -#define BDOOR_PSHARE_HINTS_ASYNC 0 -#define BDOOR_PSHARE_HINTS_SYNC 1 - -#define BDOOR_PSHARE_HINTS_TYPE(ecx) (((ecx) >> 16) & 0x1) - -/* Version of backdoor pshare hints protocol */ -#define BDOOR_PSHARE_HINTS_VERSION 1 -#define BDOOR_PSHARE_HINTS_VER(ecx) (((ecx) >> 17) & 0x7f) - -/* Task applied to backdoor pshare hints */ -#define BDOOR_PSHARE_HINTS_CMD_SHARE 0 -#define BDOOR_PSHARE_HINTS_CMD_DROP 1 -#define BDOOR_PSHARE_HINTS_CMD_MAX 2 - -#define BDOOR_PSHARE_HINTS_CMD(ecx) (((ecx) >> 24) & 0xff) - /* Nesting control operations */ #define NESTING_CONTROL_RESTRICT_BACKDOOR 0 diff -Nru open-vm-tools-9.10.2-2822639/lib/include/base64.h open-vm-tools-10.0.0-3000743/lib/include/base64.h --- open-vm-tools-9.10.2-2822639/lib/include/base64.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/base64.h 2015-09-10 07:31:38.000000000 +0000 @@ -38,9 +38,8 @@ Bool Base64_ValidEncoding(char const *src, size_t srcLength); size_t Base64_EncodedLength(uint8 const *src, size_t srcLength); size_t Base64_DecodedLength(char const *src, size_t srcLength); -Bool Base64_EasyEncode(const uint8 *src, size_t srcLength, - char **target); -Bool Base64_EasyDecode(const char *src, - uint8 **target, size_t *targSize); +Bool Base64_EasyEncode(const uint8 *src, size_t srcLength, char **target); +Bool Base64_EasyDecode(const char *src, uint8 **target, size_t *targSize); +Bool Base64_DecodeFixed(const char *src, char *outBuf, size_t outBufSize); #endif diff -Nru open-vm-tools-9.10.2-2822639/lib/include/bsdfmt.h open-vm-tools-10.0.0-3000743/lib/include/bsdfmt.h --- open-vm-tools-9.10.2-2822639/lib/include/bsdfmt.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/bsdfmt.h 2015-09-10 07:31:38.000000000 +0000 @@ -1,5 +1,5 @@ /* ********************************************************** - * Copyright 2008 VMware, Inc. All rights reserved. + * Copyright 2008-2014 VMware, Inc. All rights reserved. * **********************************************************/ /* diff -Nru open-vm-tools-9.10.2-2822639/lib/include/buildNumber.h open-vm-tools-10.0.0-3000743/lib/include/buildNumber.h --- open-vm-tools-9.10.2-2822639/lib/include/buildNumber.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/buildNumber.h 2015-09-10 07:31:38.000000000 +0000 @@ -1,12 +1,12 @@ #define BUILD_NUMBER \ - "build-2822639" + "build-3000743" #define BUILD_NUMBER_NUMERIC \ - 2822639 + 3000743 #define BUILD_NUMBER_NUMERIC_STRING \ - "2822639" + "3000743" #define PRODUCT_BUILD_NUMBER \ - "product-build-48224" + "product-build-50046" #define PRODUCT_BUILD_NUMBER_NUMERIC \ - 48224 + 50046 #define PRODUCT_BUILD_NUMBER_NUMERIC_STRING \ - "48224" + "50046" diff -Nru open-vm-tools-9.10.2-2822639/lib/include/clamped.h open-vm-tools-10.0.0-3000743/lib/include/clamped.h --- open-vm-tools-9.10.2-2822639/lib/include/clamped.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/clamped.h 2015-09-10 07:31:38.000000000 +0000 @@ -46,55 +46,11 @@ /* - *---------------------------------------------------------------------- - * - * Clamped_SAdd32 -- - * - * Signed 32-bit addition. - * - * Add two integers, clamping the result to MAX_INT32 or - * MIN_INT32 if it would have overflowed. - * - * Results: - * On success, returns TRUE. - * If the result would have overflowed and we clamped it, returns FALSE. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static INLINE Bool -Clamped_SAdd32(int32 *out, // OUT - int32 a, // IN - int32 b) // IN -{ - int32 result; - - result = a + b; - - if (UNLIKELY(b > 0 && result < a)) { - *out = MAX_INT32; - return FALSE; - } - - if (UNLIKELY(b < 0 && result > a)) { - *out = MIN_INT32; - return FALSE; - } - - *out = result; - return TRUE; -} - - -/* *----------------------------------------------------------------------------- * * Clamped_U64To32 -- * - * Convert Unsigned 64-bit to 32-bit, clamping instead of truncating. + * Convert unsigned 64-bit to 32-bit, clamping instead of truncating. * * Results: * On success, returns TRUE. If the result would have overflowed @@ -155,6 +111,35 @@ } +/* + *---------------------------------------------------------------------- + * + * Clamped_SAdd32 -- + * + * Signed 32-bit addition. + * + * Add two integers, clamping the result to MAX_INT32 or + * MIN_INT32 if it would have overflowed. + * + * Results: + * On success, returns TRUE. + * If the result would have overflowed and we clamped it, returns FALSE. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static INLINE Bool +Clamped_SAdd32(int32 *out, // OUT + int32 a, // IN + int32 b) // IN +{ + return Clamped_S64To32(out, (int64)a + b); +} + + /* *----------------------------------------------------------------------------- * diff -Nru open-vm-tools-9.10.2-2822639/lib/include/codeset.h open-vm-tools-10.0.0-3000743/lib/include/codeset.h --- open-vm-tools-9.10.2-2822639/lib/include/codeset.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/codeset.h 2015-09-10 07:31:38.000000000 +0000 @@ -313,31 +313,31 @@ CodeSet_Utf16leToUtf8(const char *bufIn, // IN size_t sizeIn, // IN char **bufOut, // OUT - size_t *sizeOut); // OUT + size_t *sizeOut); // OUT/OPT Bool CodeSet_Utf8ToUtf16le(const char *bufIn, // IN size_t sizeIn, // IN char **bufOut, // OUT - size_t *sizeOut); // OUT + size_t *sizeOut); // OUT/OPT Bool CodeSet_CurrentToUtf16le(const char *bufIn, // IN size_t sizeIn, // IN char **bufOut, // OUT - size_t *sizeOut); // OUT + size_t *sizeOut); // OUT/OPT Bool CodeSet_Utf16leToCurrent(const char *bufIn, // IN size_t sizeIn, // IN char **bufOut, // OUT - size_t *sizeOut); // OUT + size_t *sizeOut); // OUT/OPT Bool CodeSet_Utf16beToCurrent(const char *bufIn, // IN size_t sizeIn, // IN char **bufOut, // OUT - size_t *sizeOut); // OUT + size_t *sizeOut); // OUT/OPT Bool CodeSetOld_Utf8Normalize(const char *bufIn, // IN @@ -349,39 +349,39 @@ CodeSet_Utf8FormDToUtf8FormC(const char *bufIn, // IN size_t sizeIn, // IN char **bufOut, // OUT - size_t *sizeOut); // OUT + size_t *sizeOut); // OUT/OPT Bool CodeSet_Utf8FormCToUtf8FormD(const char *bufIn, // IN size_t sizeIn, // IN char **bufOut, // OUT - size_t *sizeOut); // OUT + size_t *sizeOut); // OUT/OPT const char * CodeSet_GetCurrentCodeSet(void); Bool -CodeSet_IsEncodingSupported(const char *name); +CodeSet_IsEncodingSupported(const char *name); // IN: Bool CodeSet_Validate(const char *buf, // IN: the string size_t size, // IN: length of string const char *code); // IN: encoding -Bool CodeSet_UTF8ToUTF32(const char *utf8, - char **utf32); +Bool CodeSet_UTF8ToUTF32(const char *utf8, // IN: + char **utf32); // OUT: -Bool CodeSet_UTF32ToUTF8(const char *utf32, - char **utf8); +Bool CodeSet_UTF32ToUTF8(const char *utf32, // IN: + char **utf8); // OUT: -int CodeSet_LengthInCodePoints(const char *utf8); +int CodeSet_LengthInCodePoints(const char *utf8); // IN: -int CodeSet_CodePointOffsetToByteOffset(const char *utf8, - int codePointOffset); +int CodeSet_CodePointOffsetToByteOffset(const char *utf8, // IN: + int codePointOffset); // IN: -int CodeSet_GetUtf8(const char *string, - const char *end, - uint32 *uchar); +int CodeSet_GetUtf8(const char *string, // IN: + const char *end, // IN: + uint32 *uchar); // OUT/OPT: /* diff -Nru open-vm-tools-9.10.2-2822639/lib/include/conf.h open-vm-tools-10.0.0-3000743/lib/include/conf.h --- open-vm-tools-9.10.2-2822639/lib/include/conf.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/conf.h 2015-09-10 07:31:38.000000000 +0000 @@ -50,7 +50,7 @@ #define CONFNAME_SUSPENDSCRIPT "suspend-script" #define CONFNAME_LOG "log" #define CONFNAME_LOGFILE "log.file" -#define CONFNAME_LOGLEVEL "log.level" +#define CONFNAME_LOGLEVEL "log.level" #define CONFNAME_DISABLETOOLSVERSION "disable-tools-version" #define CONFNAME_DISABLEPMTIMERWARNING "disable-pmtimerwarning" @@ -87,6 +87,21 @@ */ #define CONFNAME_GUESTINFO_POLLINTERVAL "poll-interval" +/** + * Define a custom GuestStats poll interval (in seconds). + * + * @note Illegal values result in a @c g_warning and fallback to the default + * stats interval. + * + * @param int User-defined poll interval for stats. Set to 0 to disable polling. + */ +#define CONFNAME_GUESTINFO_STATSINTERVAL "stats-interval" + +/** + * Indicates whether stat results should be written to the log. + */ +#define CONFNAME_GUESTINFO_ENABLESTATLOGGING "enable-stat-logging" + /* * END GuestInfo goodies. ****************************************************************************** @@ -104,11 +119,6 @@ #define CONFGROUPNAME_UNITY "unity" /** - * Lets users enable debug info from Unity. - */ -#define CONFNAME_UNITY_ENABLEDEBUG "debug" - -/** * Lets users override system decisions about whether unity should be available. */ #define CONFNAME_UNITY_FORCEENABLE "forceEnable" @@ -140,6 +150,6 @@ #define CONF_VMWARE_TOOLS_REGKEY "Software\\VMware, Inc.\\VMware Tools" /* Wait 5 seconds between polls to see if the conf file has changed */ -#define CONF_POLL_TIME 500 +#define CONF_POLL_TIME 5 #endif /* __CONF_H__ */ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/dbllnklst.h open-vm-tools-10.0.0-3000743/lib/include/dbllnklst.h --- open-vm-tools-9.10.2-2822639/lib/include/dbllnklst.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/dbllnklst.h 2015-09-10 07:31:38.000000000 +0000 @@ -115,7 +115,7 @@ */ static INLINE void -DblLnkLst_Init(DblLnkLst_Links *l) // IN +DblLnkLst_Init(DblLnkLst_Links *l) // OUT { l->prev = l->next = l; } @@ -141,8 +141,8 @@ */ static INLINE void -DblLnkLst_Link(DblLnkLst_Links *l1, // IN - DblLnkLst_Links *l2) // IN +DblLnkLst_Link(DblLnkLst_Links *l1, // IN/OUT + DblLnkLst_Links *l2) // IN/OUT { DblLnkLst_Links *tmp; @@ -175,8 +175,8 @@ */ static INLINE void -DblLnkLst_Unlink(DblLnkLst_Links *l1, // IN - DblLnkLst_Links *l2) // IN +DblLnkLst_Unlink(DblLnkLst_Links *l1, // IN/OUT + DblLnkLst_Links *l2) // IN/OUT { DblLnkLst_Links *tmp; @@ -203,7 +203,7 @@ */ static INLINE void -DblLnkLst_Unlink1(DblLnkLst_Links *l) // IN +DblLnkLst_Unlink1(DblLnkLst_Links *l) // IN/OUT { DblLnkLst_Unlink(l, l->next); } @@ -253,8 +253,8 @@ */ static INLINE void -DblLnkLst_LinkFirst(DblLnkLst_Links *head, // IN - DblLnkLst_Links *l) // IN +DblLnkLst_LinkFirst(DblLnkLst_Links *head, // IN/OUT + DblLnkLst_Links *l) // IN/OUT { DblLnkLst_Link(head->next, l); } @@ -277,8 +277,8 @@ */ static INLINE void -DblLnkLst_LinkLast(DblLnkLst_Links *head, // IN - DblLnkLst_Links *l) // IN +DblLnkLst_LinkLast(DblLnkLst_Links *head, // IN/OUT + DblLnkLst_Links *l) // IN/OUT { DblLnkLst_Link(head, l); } diff -Nru open-vm-tools-9.10.2-2822639/lib/include/dictll.h open-vm-tools-10.0.0-3000743/lib/include/dictll.h --- open-vm-tools-9.10.2-2822639/lib/include/dictll.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/dictll.h 2015-09-10 07:31:38.000000000 +0000 @@ -49,7 +49,7 @@ Bool DictLL_MarshalLine(DynBuf *output, // IN/OUT - char const *name, // IN + char const *name, // IN/OPT char const *value); // IN diff -Nru open-vm-tools-9.10.2-2822639/lib/include/dynbuf.h open-vm-tools-10.0.0-3000743/lib/include/dynbuf.h --- open-vm-tools-9.10.2-2822639/lib/include/dynbuf.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/dynbuf.h 2015-09-10 07:31:38.000000000 +0000 @@ -31,14 +31,14 @@ typedef struct DynBuf { - char *data; - size_t size; - size_t allocated; + char *data; + size_t size; + size_t allocated; } DynBuf; void -DynBuf_Init(DynBuf *b); // IN +DynBuf_Init(DynBuf *b); // OUT void DynBuf_Destroy(DynBuf *b); // IN @@ -52,26 +52,26 @@ void *data); // IN void * -DynBuf_Detach(DynBuf *b); // IN +DynBuf_Detach(DynBuf *b); // IN/OUT Bool -DynBuf_Enlarge(DynBuf *b, // IN +DynBuf_Enlarge(DynBuf *b, // IN/OUT size_t min_size); // IN Bool -DynBuf_Append(DynBuf *b, // IN +DynBuf_Append(DynBuf *b, // IN/OUT void const *data, // IN size_t size); // IN Bool -DynBuf_Trim(DynBuf *b); // IN +DynBuf_Trim(DynBuf *b); // IN/OUT Bool DynBuf_Copy(DynBuf *src, // IN DynBuf *dest); // OUT void -DynBuf_SafeInternalAppend(DynBuf *b, // IN +DynBuf_SafeInternalAppend(DynBuf *b, // IN/OUT void const *data, // IN size_t size, // IN char const *file, // IN @@ -160,7 +160,7 @@ #else static INLINE void #endif -DynBuf_SetSize(DynBuf *b, // IN +DynBuf_SetSize(DynBuf *b, // IN/OUT: size_t size) // IN { ASSERT(b); @@ -223,7 +223,7 @@ #else static INLINE Bool #endif -DynBuf_AppendString(DynBuf *buf, // IN +DynBuf_AppendString(DynBuf *buf, // IN/OUT const char *string) // IN { /* diff -Nru open-vm-tools-9.10.2-2822639/lib/include/escape.h open-vm-tools-10.0.0-3000743/lib/include/escape.h --- open-vm-tools-9.10.2-2822639/lib/include/escape.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/escape.h 2015-09-10 07:31:38.000000000 +0000 @@ -47,6 +47,13 @@ size_t sizeIn, // IN size_t *sizeOut); // OUT/OPT +Bool +Escape_UndoFixed(char escByte, // IN + void const *bufIn, // IN + size_t sizeIn, // IN + void *bufOut, // IN/OUT + size_t bufOutSize); // IN + const char * Escape_Strchr(char escByte, // IN const char *bufIn, // IN diff -Nru open-vm-tools-9.10.2-2822639/lib/include/file_extensions.h open-vm-tools-10.0.0-3000743/lib/include/file_extensions.h --- open-vm-tools-9.10.2-2822639/lib/include/file_extensions.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/file_extensions.h 2015-09-10 07:31:38.000000000 +0000 @@ -74,6 +74,14 @@ #define VRM_HOTFIX_FILE_EXTENSION "vmhf" // ACE hotfix response /* + * VM Download. + */ + +#define RVM_DOWNLOAD_FILE_EXTENSION "vmdownload" // Downloaded file +#define RVM_STATE_FILE_EXTENSION "vmstate" // Download metadata +#define DOWNLOAD_BUNDLE_FILE_EXTENSION "vmdownload" // VM download bundle directory + +/* * Other file types. */ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/file.h open-vm-tools-10.0.0-3000743/lib/include/file.h --- open-vm-tools-9.10.2-2822639/lib/include/file.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/file.h 2015-09-10 07:31:38.000000000 +0000 @@ -60,7 +60,7 @@ */ typedef struct WalkDirContextImpl WalkDirContextImpl; -typedef const WalkDirContextImpl *WalkDirContext; +typedef WalkDirContextImpl *WalkDirContext; /* * When File_MakeTempEx2 is called, it creates a temporary file or a directory @@ -81,8 +81,8 @@ * */ -typedef Unicode File_MakeTempCreateNameFunc(uint32 num, - void *data); +typedef char *File_MakeTempCreateNameFunc(uint32 num, + void *data); #if defined(__APPLE__) typedef enum { @@ -115,17 +115,17 @@ #elif defined VMX86_SERVER struct FS_PartitionListResult; -int File_GetVMFSAttributes(ConstUnicode pathName, +int File_GetVMFSAttributes(const char *pathName, struct FS_PartitionListResult **fsAttrs); -int File_GetVMFSFSType(ConstUnicode pathName, +int File_GetVMFSFSType(const char *pathName, int fd, uint16 *fsTypeNum); -int File_GetVMFSVersion(ConstUnicode pathName, +int File_GetVMFSVersion(const char *pathName, uint32 *versionNum); -int File_GetVMFSBlockSize(ConstUnicode pathName, +int File_GetVMFSBlockSize(const char *pathName, uint32 *blockSize); -int File_GetVMFSMountInfo(ConstUnicode pathName, +int File_GetVMFSMountInfo(const char *pathName, char **fsType, uint32 *version, char **remoteIP, @@ -133,141 +133,144 @@ char **localMountPoint); #endif -Bool File_SupportsZeroedThick(ConstUnicode pathName); +Bool File_SupportsZeroedThick(const char *pathName); -Bool File_SupportsMultiWriter(ConstUnicode pathName); +Bool File_SupportsMultiWriter(const char *pathName); -Bool File_SupportsMandatoryLock(ConstUnicode pathName); +Bool File_SupportsMandatoryLock(const char *pathName); -Bool File_Exists(ConstUnicode pathName); +Bool File_Exists(const char *pathName); -int File_Unlink(ConstUnicode pathName); +int File_Unlink(const char *pathName); -int File_UnlinkIfExists(ConstUnicode pathName); +int File_UnlinkIfExists(const char *pathName); -int File_UnlinkDelayed(ConstUnicode pathName); +int File_UnlinkDelayed(const char *pathName); -int File_UnlinkNoFollow(ConstUnicode pathName); +int File_UnlinkNoFollow(const char *pathName); -void File_SplitName(ConstUnicode pathName, - Unicode *volume, - Unicode *dir, - Unicode *base); +void File_SplitName(const char *pathName, + char **volume, + char **dir, + char **base); -void File_GetPathName(ConstUnicode fullPath, - Unicode *pathName, - Unicode *base); +void File_GetPathName(const char *fullPath, + char **pathName, + char **base); -Unicode File_StripSlashes(ConstUnicode path); +char *File_StripSlashes(const char *path); -Unicode File_PathJoin(ConstUnicode dirName, - ConstUnicode baseName); +char *File_PathJoin(const char *dirName, + const char *baseName); -Bool File_CreateDirectory(ConstUnicode pathName); +Bool File_CreateDirectory(const char *pathName); -Bool File_CreateDirectoryEx(ConstUnicode pathName, int mask); +Bool File_CreateDirectoryEx(const char *pathName, + int mask); -Bool File_EnsureDirectory(ConstUnicode pathName); +Bool File_EnsureDirectory(const char *pathName); -Bool File_DeleteEmptyDirectory(ConstUnicode pathName); +Bool File_DeleteEmptyDirectory(const char *pathName); -Bool File_CreateDirectoryHierarchy(ConstUnicode pathName, - Unicode *topmostCreated); +Bool File_CreateDirectoryHierarchy(const char *pathName, + char **topmostCreated); -Bool File_CreateDirectoryHierarchyEx(ConstUnicode pathName, +Bool File_CreateDirectoryHierarchyEx(const char *pathName, int mask, - Unicode *topmostCreated); + char **topmostCreated); -Bool File_DeleteDirectoryTree(ConstUnicode pathName); +Bool File_DeleteDirectoryContent(const char *pathName); -int File_ListDirectory(ConstUnicode pathName, - Unicode **ids); +Bool File_DeleteDirectoryTree(const char *pathName); -Bool File_IsOsfsVolumeEmpty(ConstUnicode pathName); +int File_ListDirectory(const char *pathName, + char ***ids); + +Bool File_IsOsfsVolumeEmpty(const char *pathName); /* * Simple file-system walk. */ -WalkDirContext File_WalkDirectoryStart(ConstUnicode parentPath); +WalkDirContext File_WalkDirectoryStart(const char *parentPath); Bool File_WalkDirectoryNext(WalkDirContext context, - Unicode *path); + char **path); void File_WalkDirectoryEnd(WalkDirContext context); -Bool File_IsDirectory(ConstUnicode pathName); +Bool File_IsDirectory(const char *pathName); -Bool File_IsFile(ConstUnicode pathName); +Bool File_IsFile(const char *pathName); -Bool File_IsSymLink(ConstUnicode pathName); +Bool File_IsSymLink(const char *pathName); -Bool File_IsCharDevice(ConstUnicode pathName); +Bool File_IsCharDevice(const char *pathName); -Bool File_GetParent(Unicode *canPath); +Bool File_GetParent(char **canPath); -Bool File_IsRemote(ConstUnicode pathName); +Bool File_IsRemote(const char *pathName); -Bool File_IsEmptyDirectory(ConstUnicode pathName); +Bool File_IsEmptyDirectory(const char *pathName); -Unicode File_Cwd(ConstUnicode drive); // XXX belongs to `process' module +char *File_Cwd(const char *drive); // XXX belongs to `process' module -Unicode File_FullPath(ConstUnicode pathName); +char *File_FullPath(const char *pathName); -Bool File_IsFullPath(ConstUnicode pathName); +Bool File_IsFullPath(const char *pathName); -uint64 File_GetFreeSpace(ConstUnicode pathName, +uint64 File_GetFreeSpace(const char *pathName, Bool doNotAscend); -uint64 File_GetCapacity(ConstUnicode pathName); +uint64 File_GetCapacity(const char *pathName); -int File_MakeTempEx(ConstUnicode dir, - ConstUnicode pathName, - Unicode *presult); +int File_MakeTempEx(const char *dir, + const char *pathName, + char **presult); -int File_MakeTempEx2(ConstUnicode dir, +int File_MakeTempEx2(const char *dir, Bool createTempFile, File_MakeTempCreateNameFunc *createNameFunc, void *createFuncData, - Unicode *presult); + char **presult); -Unicode File_MakeSafeTempDir(ConstUnicode prefix); +char *File_MakeSafeTempDir(const char *prefix); -int64 File_GetModTime(ConstUnicode pathName); +int64 File_GetModTime(const char *pathName); -char *File_GetModTimeString(ConstUnicode pathName); +char *File_GetModTimeString(const char *pathName); char *File_GetUniqueFileSystemID(const char *pathName); #ifdef _WIN32 -Unicode File_GetVolumeGUID(ConstUnicode pathName); +char *File_GetVolumeGUID(const char *pathName); #endif -Bool File_GetTimes(ConstUnicode pathName, +Bool File_GetTimes(const char *pathName, VmTimeType *createTime, VmTimeType *accessTime, VmTimeType *writeTime, VmTimeType *attrChangeTime); -Bool File_SetTimes(ConstUnicode pathName, +Bool File_SetTimes(const char *pathName, VmTimeType createTime, VmTimeType accessTime, VmTimeType writeTime, VmTimeType attrChangeTime); -Bool File_GetFilePermissions(ConstUnicode pathName, +Bool File_GetFilePermissions(const char *pathName, int *mode); -Bool File_SetFilePermissions(ConstUnicode pathName, +Bool File_SetFilePermissions(const char *pathName, int mode); -Bool File_SupportsFileSize(ConstUnicode pathName, +Bool File_SupportsFileSize(const char *pathName, uint64 fileSize); -Bool File_GetMaxFileSize(ConstUnicode pathName, +Bool File_GetMaxFileSize(const char *pathName, uint64 *maxFileSize); -Bool File_SupportsLargeFiles(ConstUnicode pathName); +Bool File_SupportsLargeFiles(const char *pathName); char *File_MapPathPrefix(const char *oldPath, const char **oldPrefixes, @@ -277,49 +280,36 @@ Bool File_CopyFromFdToFd(FileIODescriptor src, FileIODescriptor dst); -FileIOResult File_CreatePrompt(FileIODescriptor *file, - ConstUnicode pathName, - int access, - int prompt); - Bool File_CopyFromFd(FileIODescriptor src, - ConstUnicode dstName, + const char *dstName, Bool overwriteExisting); -Bool File_Copy(ConstUnicode srcName, - ConstUnicode dstName, +Bool File_Copy(const char *srcName, + const char *dstName, Bool overwriteExisting); -Bool File_CopyFromFdToName(FileIODescriptor src, - ConstUnicode dstName, - int dstDispose); - -Bool File_CopyFromNameToName(ConstUnicode srcName, - ConstUnicode dstName, - int dstDispose); - -Bool File_MoveTree(ConstUnicode srcName, - ConstUnicode dstName, +Bool File_MoveTree(const char *srcName, + const char *dstName, Bool overwriteExisting, Bool *asMove); -Bool File_CopyTree(ConstUnicode srcName, - ConstUnicode dstName, +Bool File_CopyTree(const char *srcName, + const char *dstName, Bool overwriteExisting, Bool followSymlinks); -Bool File_Replace(ConstUnicode oldFile, - ConstUnicode newFile); +Bool File_Replace(const char *oldFile, + const char *newFile); -int File_Rename(ConstUnicode oldFile, - ConstUnicode newFile); +int File_Rename(const char *oldFile, + const char *newFile); -int File_RenameRetry(ConstUnicode oldFile, - ConstUnicode newFile, +int File_RenameRetry(const char *oldFile, + const char *newFile, uint32 msecMaxWaitTime); -Bool File_Move(ConstUnicode oldFile, - ConstUnicode newFile, +Bool File_Move(const char *oldFile, + const char *newFile, Bool *asRename); void File_Rotate(const char *pathName, @@ -327,7 +317,7 @@ Bool noRename, char **newFileName); -int File_GetFSMountInfo(ConstUnicode pathName, +int File_GetFSMountInfo(const char *pathName, char **fsType, uint32 *version, char **remoteIP, @@ -335,19 +325,19 @@ char **localMountPoint); /* Get size only for regular file. */ -int64 File_GetSize(ConstUnicode pathName); +int64 File_GetSize(const char *pathName); /* Get size for file or directory. */ -int64 File_GetSizeEx(ConstUnicode pathName); +int64 File_GetSizeEx(const char *pathName); -int64 File_GetSizeByPath(ConstUnicode pathName); +int64 File_GetSizeByPath(const char *pathName); -int64 File_GetSizeAlternate(ConstUnicode pathName); +int64 File_GetSizeAlternate(const char *pathName); /* file change notification module */ typedef void (*CbFunction)(void *clientData); -typedef void (*NotifyCallback)(ConstUnicode pathName, +typedef void (*NotifyCallback)(const char *pathName, int err, void *data); @@ -365,24 +355,24 @@ void File_PollImpersonateOnCheck(Bool check); -Bool File_PollAddFile(ConstUnicode pathName, +Bool File_PollAddFile(const char *pathName, uint32 pollPeriod, NotifyCallback callback, void *data, Bool fPeriodic); -Bool File_PollAddDirFile(ConstUnicode pathName, +Bool File_PollAddDirFile(const char *pathName, uint32 pollPeriod, NotifyCallback callback, void *data, Bool fPeriodic); -Bool File_PollRemoveFile(ConstUnicode pathName, +Bool File_PollRemoveFile(const char *pathName, uint32 pollPeriod, NotifyCallback callback); -Bool File_IsSameFile(ConstUnicode path1, - ConstUnicode path2); +Bool File_IsSameFile(const char *path1, + const char *path2); char *File_PrependToPath(const char *searchPath, const char *elem); @@ -392,23 +382,23 @@ const char *cwd, char **result); -Unicode File_ReplaceExtension(ConstUnicode pathName, - ConstUnicode newExtension, - uint32 numExtensions, - ...); +char *File_ReplaceExtension(const char *pathName, + const char *newExtension, + uint32 numExtensions, + ...); -Unicode File_RemoveExtension(ConstUnicode pathName); +char *File_RemoveExtension(const char *pathName); -Bool File_MakeCfgFileExecutable(ConstUnicode pathName); +Bool File_MakeCfgFileExecutable(const char *pathName); char *File_ExpandAndCheckDir(const char *dirName); char *File_GetSafeTmpDir(Bool useConf); -int File_MakeSafeTemp(ConstUnicode tag, - Unicode *presult); +int File_MakeSafeTemp(const char *tag, + char **presult); -Bool File_DoesVolumeSupportAcls(ConstUnicode pathName); +Bool File_DoesVolumeSupportAcls(const char *pathName); #ifdef __cplusplus } // extern "C" { diff -Nru open-vm-tools-9.10.2-2822639/lib/include/fileIO.h open-vm-tools-10.0.0-3000743/lib/include/fileIO.h --- open-vm-tools-9.10.2-2822639/lib/include/fileIO.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/fileIO.h 2015-09-10 07:31:38.000000000 +0000 @@ -36,6 +36,10 @@ #ifndef _FILEIO_H_ #define _FILEIO_H_ +#ifdef __cplusplus +extern "C"{ +#endif + #define INCLUDE_ALLOW_USERLEVEL #define INCLUDE_ALLOW_VMCORE #include "includeCheck.h" @@ -61,7 +65,7 @@ typedef struct FileIODescriptor { HANDLE win32; uint32 flags; - Unicode fileName; + char *fileName; struct FileLockToken *lockToken; } FileIODescriptor; @@ -70,7 +74,7 @@ typedef struct FileIODescriptor { int posix; int flags; - Unicode fileName; + char *fileName; struct FileLockToken *lockToken; } FileIODescriptor; @@ -148,10 +152,6 @@ */ #define FILEIO_OPEN_MULTIWRITER_LOCK (1 << 14) /* - * Flag the file to be cached by the vBlob caching layer - */ -#define FILEIO_OPEN_USE_AIO_CACHE (1 << 15) -/* * Valid only for MacOS. It eventually results into O_EXLOCK flag passed to open * system call. * @@ -296,18 +296,18 @@ Bool FileIO_IsValid(const FileIODescriptor *fd); FileIOResult FileIO_Create(FileIODescriptor *file, - ConstUnicode pathName, + const char *pathName, int access, FileIOOpenAction action, int mode); FileIOResult FileIO_Open(FileIODescriptor *file, - ConstUnicode pathName, + const char *pathName, int access, FileIOOpenAction action); FileIOResult FileIO_OpenRetry(FileIODescriptor *file, - ConstUnicode pathName, + const char *pathName, int access, FileIOOpenAction action, uint32 msecMaxWaitTime); @@ -326,7 +326,7 @@ size_t requested, size_t *actual); -Unicode FileIO_AtomicTempPath(ConstUnicode path); +char *FileIO_AtomicTempPath(const char *path); FileIOResult FileIO_AtomicTempFile(FileIODescriptor *fileFD, FileIODescriptor *tempFD); @@ -337,31 +337,31 @@ #if !defined(VMX86_TOOLS) || !defined(__FreeBSD__) FileIOResult FileIO_Readv(FileIODescriptor *fd, - struct iovec *v, + struct iovec const *v, int count, size_t totalSize, size_t *bytesRead); FileIOResult FileIO_Writev(FileIODescriptor *fd, - struct iovec *v, + struct iovec const *v, int count, size_t totalSize, size_t *bytesWritten); #endif -FileIOResult FileIO_Preadv(FileIODescriptor *fd, // IN: File descriptor - struct iovec *entries, // IN: Vector to read into - int numEntries, // IN: Number of vector entries - uint64 offset, // IN: Offset to start reading - size_t totalSize, // IN: totalSize (bytes) in entries - size_t *actual); // OUT: number of bytes read - -FileIOResult FileIO_Pwritev(FileIODescriptor *fd, // IN: File descriptor - struct iovec *entries, // IN: Vector to write from - int numEntries, // IN: Number of vector entries - uint64 offset, // IN: Offset to start writing - size_t totalSize, // IN: Total size (bytes) in entries - size_t *actual); // OUT: number of bytes written +FileIOResult FileIO_Preadv(FileIODescriptor *fd, // IN: File descriptor + struct iovec const *entries, // IN: Vector to read into + int numEntries, // IN: Number of vector entries + uint64 offset, // IN: Offset to start reading + size_t totalSize, // IN: totalSize (bytes) in entries + size_t *actual); // OUT: number of bytes read + +FileIOResult FileIO_Pwritev(FileIODescriptor *fd, // IN: File descriptor + struct iovec const *entries, // IN: Vector to write from + int numEntries, // IN: Number of vector entries + uint64 offset, // IN: Offset to start writing + size_t totalSize, // IN: Total size (bytes) in entries + size_t *actual); // OUT: number of bytes written FileIOResult FileIO_Pread(FileIODescriptor *fd, // IN: File descriptor void *buf, // IN: Buffer to read into @@ -373,30 +373,32 @@ size_t len, // IN: Length of the buffer uint64 offset); // IN: Offset to start writing -FileIOResult FileIO_Access(ConstUnicode pathName, +FileIOResult FileIO_Access(const char *pathName, int accessMode); Bool FileIO_Truncate(FileIODescriptor *file, uint64 newSize); -int FileIO_Sync(const FileIODescriptor *file); +FileIOResult FileIO_Sync(const FileIODescriptor *file); FileIOResult FileIO_GetAllocSize(const FileIODescriptor *fd, uint64 *logicalBytes, uint64 *allocedBytes); + int64 FileIO_GetSize(const FileIODescriptor *fd); -Bool FileIO_SetAllocSize(const FileIODescriptor *fd, uint64 size); +Bool FileIO_SetAllocSize(const FileIODescriptor *fd, + uint64 size); -FileIOResult FileIO_GetAllocSizeByPath(ConstUnicode pathName, +FileIOResult FileIO_GetAllocSizeByPath(const char *pathName, uint64 *logicalBytes, uint64 *allocedBytes); -int64 FileIO_GetSizeByPath(ConstUnicode pathName); +int64 FileIO_GetSizeByPath(const char *pathName); -Bool FileIO_Close(FileIODescriptor *file); +FileIOResult FileIO_Close(FileIODescriptor *file); -Bool FileIO_CloseAndUnlink(FileIODescriptor *file); +FileIOResult FileIO_CloseAndUnlink(FileIODescriptor *file); uint32 FileIO_GetFlags(FileIODescriptor *file); @@ -415,7 +417,7 @@ /* Only users not using FileIO_Open should use these two */ void FileIO_Init(FileIODescriptor *fd, - ConstUnicode pathName); + const char *pathName); void FileIO_Cleanup(FileIODescriptor *fd); @@ -431,18 +433,18 @@ FileIODescriptor FileIO_CreateFDPosix(int posix, int flags); -int FileIO_PrivilegedPosixOpen(ConstUnicode pathName, +int FileIO_PrivilegedPosixOpen(const char *pathName, int flags); #endif FILE *FileIO_DescriptorToStream(FileIODescriptor *fd, Bool textMode); -ConstUnicode FileIO_Filename(FileIODescriptor *fd); +const char *FileIO_Filename(FileIODescriptor *fd); /* *------------------------------------------------------------------------- - * + * * FileIO_IsSuccess -- * * Returns TRUE if the error code is success. @@ -472,6 +474,11 @@ Bool FileIO_IsSuccess(FileIOResult res); #endif -Bool FileIO_SupportsPrealloc(const char *pathName, Bool fsCheck); +Bool FileIO_SupportsPrealloc(const char *pathName, + Bool fsCheck); + +#ifdef __cplusplus +} // extern "C" { +#endif #endif // _FILEIO_H_ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/fileLock.h open-vm-tools-10.0.0-3000743/lib/include/fileLock.h --- open-vm-tools-9.10.2-2822639/lib/include/fileLock.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/fileLock.h 2015-09-10 07:31:38.000000000 +0000 @@ -50,9 +50,9 @@ // File locking functions typedef struct FileLockToken FileLockToken; -Unicode FileLock_TokenPathName(const FileLockToken *fileLockToken); +char *FileLock_TokenPathName(const FileLockToken *fileLockToken); -FileLockToken *FileLock_Lock(ConstUnicode filePath, +FileLockToken *FileLock_Lock(const char *filePath, const Bool readOnly, const uint32 msecMaxWaitTime, int *err, @@ -62,15 +62,15 @@ int *err, MsgList **msgs); -Bool FileLock_IsLocked(ConstUnicode filePath, +Bool FileLock_IsLocked(const char *filePath, int *err, MsgList **msgs); -Bool FileLock_Remove(ConstUnicode filePath, +Bool FileLock_Remove(const char *filePath, int *err, MsgList **msgs); -Bool FileLock_CleanupVM(ConstUnicode cfgfilePath, +Bool FileLock_CleanupVM(const char *cfgfilePath, int *err, MsgList **msgs); diff -Nru open-vm-tools-9.10.2-2822639/lib/include/ghIntegrationCommon.h open-vm-tools-10.0.0-3000743/lib/include/ghIntegrationCommon.h --- open-vm-tools-9.10.2-2822639/lib/include/ghIntegrationCommon.h 1970-01-01 00:00:00.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/ghIntegrationCommon.h 2015-09-10 07:31:38.000000000 +0000 @@ -0,0 +1,34 @@ +/********************************************************* + * Copyright (C) 2008-2014 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * ghIntegrationCommon.h -- + * + * Common data structures and definitions used by Guest/Host Integration. + */ + +#ifndef _GHINTEGRATIONCOMMON_H_ +#define _GHINTEGRATIONCOMMON_H_ + +/* + * Common data structures and definitions used by Guest/Host Integration. + */ +#define GHI_HGFS_SHARE_URL_UTF8 "x-vmware-share://" +#define GHI_HGFS_SHARE_URL _T(GHI_HGFS_SHARE_URL_UTF8) + +#endif // ifndef _GHINTEGRATIONCOMMON_H_ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/guestInfo.h open-vm-tools-10.0.0-3000743/lib/include/guestInfo.h --- open-vm-tools-9.10.2-2822639/lib/include/guestInfo.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/guestInfo.h 2015-09-10 07:31:38.000000000 +0000 @@ -44,7 +44,6 @@ #include "vm_basic_types.h" #include "dbllnklst.h" -#include "guestStats.h" #ifndef N_PLAT_NLM #include "guestrpc/nicinfo.h" #endif // #ifndef N_PLAT_NLM @@ -54,6 +53,7 @@ #define MAX_NICS 16 #define MAX_IPS 8 // Max number of IP addresses for a single NIC +#define INFO_IPADDRESS_V2_MAX_IPS 64 #define MAC_ADDR_SIZE 19 #define IP_ADDR_SIZE 16 #define PARTITION_NAME_SIZE MAX_VALUE_LEN @@ -72,6 +72,7 @@ INFO_UPTIME, INFO_MEMORY, INFO_IPADDRESS_V2, + INFO_IPADDRESS_V3, INFO_MAX } GuestInfoType; diff -Nru open-vm-tools-9.10.2-2822639/lib/include/guest_os.h open-vm-tools-10.0.0-3000743/lib/include/guest_os.h --- open-vm-tools-9.10.2-2822639/lib/include/guest_os.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/guest_os.h 2015-09-10 07:31:38.000000000 +0000 @@ -116,7 +116,9 @@ #define ALLWINTENCLIENT64 BS(WINTEN_64) #define ALLWINTENCLIENT ALLWINTENCLIENT32, ALLWINTENCLIENT64 -#define ALLWINTEN ALLWINTENSERVER, ALLWINTENCLIENT +#define ALLWINTEN32 ALLWINTENCLIENT32 +#define ALLWINTEN64 ALLWINTENCLIENT64, ALLWINTENSERVER +#define ALLWINTEN ALLWINTENCLIENT, ALLWINTENSERVER #define ALLHYPER_V BS(HYPER_V) @@ -144,6 +146,10 @@ #define ALLWIN64 ALLWINNT64 #define ALLWIN ALLWIN32, ALLWIN64 +#define ALLOTHER BS(OTHER), BS(OTHER_64) + +#define ALLPHOTON BS(PHOTON_64) + #define ALLSOLARIS BS(SOLARIS_6_AND_7), BS(SOLARIS8), \ BS(SOLARIS9), BS(SOLARIS10), \ BS(SOLARIS10_64) @@ -154,9 +160,9 @@ #define ALL26XLINUX64 BS(OTHER26XLINUX_64), BS(DEBIAN45_64), \ BS(RHEL_64) #define ALL3XLINUX32 BS(OTHER3XLINUX) -#define ALL3XLINUX64 BS(OTHER3XLINUX_64) +#define ALL3XLINUX64 BS(OTHER3XLINUX_64), BS(PHOTON_64) -#define ALLVMKERNEL BS(VMKERNEL), BS(VMKERNEL5) +#define ALLVMKERNEL BS(VMKERNEL), BS(VMKERNEL5), BS(VMKERNEL6) #define ALLLINUX32 BS(OTHER24XLINUX), ALL26XLINUX32, ALL3XLINUX32, \ BS(OTHERLINUX), BS(VMKERNEL) @@ -183,6 +189,7 @@ /* vmkernel (ESX) */ #define STR_OS_ESX_4 "VMware ESX 4" #define STR_OS_ESX_5 "VMware ESX 5" +#define STR_OS_ESX_6 "VMware ESX 6" /* Linux */ #define STR_OS_ANNVIX "Annvix" @@ -226,6 +233,8 @@ #define STR_OS_OTHER_3X "other3xlinux" #define STR_OS_OTHER_3X_FULL "Other Linux 3.x kernel" #define STR_OS_OTHER_FULL "Other Linux" +#define STR_OS_PHOTON "vmware-photon" +#define STR_OS_PHOTON_FULL "VMware Photon" #define STR_OS_PLD "PLD" #define STR_OS_RED_HAT "redhat" #define STR_OS_RED_HAT_EN "rhel" @@ -442,13 +451,13 @@ #define STR_OS_WIN_TEN_GENERIC_FULL "Windows 10" -/* Windows Server Threshold */ +/* Windows Server 2016 */ #define STR_OS_WIN_TENSERVER_X64 "windows9srv-64" /* THIS SPACE FOR RENT (Windows 10 official server variant names) */ -#define STR_OS_WIN_TENSERVER_GENERIC_FULL "Windows Server Threshold" +#define STR_OS_WIN_TENSERVER_GENERIC_FULL "Windows Server 2016" /* Microsoft Hyper-V */ #define STR_OS_HYPER_V "winHyperV" diff -Nru open-vm-tools-9.10.2-2822639/lib/include/guest_os_tables.h open-vm-tools-10.0.0-3000743/lib/include/guest_os_tables.h --- open-vm-tools-9.10.2-2822639/lib/include/guest_os_tables.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/guest_os_tables.h 2015-09-10 07:31:38.000000000 +0000 @@ -24,75 +24,77 @@ #define INCLUDE_ALLOW_VMCORE #include "includeCheck.h" -#define GUEST_OS_TYPE_GEN \ - GOT(GUEST_OS_ANY) \ - GOT(GUEST_OS_DOS) \ - GOT(GUEST_OS_WIN31) \ - GOT(GUEST_OS_WIN95) \ - GOT(GUEST_OS_WIN98) \ - GOT(GUEST_OS_WINME) \ - GOT(GUEST_OS_WINNT) \ - GOT(GUEST_OS_WIN2000) \ - GOT(GUEST_OS_WINXP) \ - GOT(GUEST_OS_WINXPPRO_64) \ - GOT(GUEST_OS_WINNET) \ - GOT(GUEST_OS_WINNET_64) \ - GOT(GUEST_OS_LONGHORN) \ - GOT(GUEST_OS_LONGHORN_64) \ - GOT(GUEST_OS_WINVISTA) \ - GOT(GUEST_OS_WINVISTA_64) \ - GOT(GUEST_OS_WINSEVEN) /* Windows 7 */ \ - GOT(GUEST_OS_WINSEVEN_64) /* Windows 7 */ \ - GOT(GUEST_OS_WIN2008R2_64) /* Server 2008 R2 */ \ - GOT(GUEST_OS_WINEIGHT) /* Windows 8 */ \ - GOT(GUEST_OS_WINEIGHT_64) /* Windows 8 x64 */ \ - GOT(GUEST_OS_WINEIGHTSERVER_64) /* Windows 8 Server X64 */ \ - GOT(GUEST_OS_WINTEN) /* Windows 10 */ \ - GOT(GUEST_OS_WINTEN_64) /* Windows 10 x64 */ \ - GOT(GUEST_OS_WINTENSERVER_64) /* Windows 10 Server X64 */\ - GOT(GUEST_OS_HYPER_V) /* Microsoft Hyper-V */ \ - GOT(GUEST_OS_OS2) \ - GOT(GUEST_OS_ECOMSTATION) /* OS/2 variant; 1.x */ \ - GOT(GUEST_OS_ECOMSTATION2) /* OS/2 variant; 2.x */ \ - GOT(GUEST_OS_OTHER24XLINUX) \ - GOT(GUEST_OS_OTHER24XLINUX_64) \ - GOT(GUEST_OS_OTHER26XLINUX) \ - GOT(GUEST_OS_OTHER26XLINUX_64) \ - GOT(GUEST_OS_OTHER3XLINUX) \ - GOT(GUEST_OS_OTHER3XLINUX_64) \ - GOT(GUEST_OS_OTHERLINUX) \ - GOT(GUEST_OS_OTHERLINUX_64) \ - GOT(GUEST_OS_OTHER) \ - GOT(GUEST_OS_OTHER_64) \ - GOT(GUEST_OS_UBUNTU) \ - GOT(GUEST_OS_DEBIAN45) \ - GOT(GUEST_OS_DEBIAN45_64) \ - GOT(GUEST_OS_RHEL) \ - GOT(GUEST_OS_RHEL_64) \ - GOT(GUEST_OS_FREEBSD) \ - GOT(GUEST_OS_FREEBSD_64) \ - GOT(GUEST_OS_SOLARIS_6_AND_7) \ - GOT(GUEST_OS_SOLARIS8) \ - GOT(GUEST_OS_SOLARIS9) \ - GOT(GUEST_OS_SOLARIS10) \ - GOT(GUEST_OS_SOLARIS10_64) \ - GOT(GUEST_OS_SOLARIS11_64) \ - GOT(GUEST_OS_DARWIN9) /* Mac OS 10.5 */ \ - GOT(GUEST_OS_DARWIN9_64) \ - GOT(GUEST_OS_DARWIN10) /* Mac OS 10.6 */ \ - GOT(GUEST_OS_DARWIN10_64) \ - GOT(GUEST_OS_DARWIN11) /* Mac OS 10.7 */ \ - GOT(GUEST_OS_DARWIN11_64) \ - GOT(GUEST_OS_DARWIN12_64) /* Mac OS 10.8 */ \ - GOT(GUEST_OS_DARWIN13_64) /* Mac OS 10.9 */ \ - GOT(GUEST_OS_DARWIN14_64) /* Mac OS 10.10 */ \ - GOT(GUEST_OS_OPENSERVER_5_AND_6) \ - GOT(GUEST_OS_UNIXWARE7) \ - GOT(GUEST_OS_NETWARE4) \ - GOT(GUEST_OS_NETWARE5) \ - GOT(GUEST_OS_NETWARE6) \ - GOT(GUEST_OS_VMKERNEL) /* ESX 4.x */ \ - GOT(GUEST_OS_VMKERNEL5) /* ESX 5.x and later */ \ +#define GUEST_OS_TYPE_GEN \ + GOT(GUEST_OS_ANY) \ + GOT(GUEST_OS_DOS) \ + GOT(GUEST_OS_WIN31) \ + GOT(GUEST_OS_WIN95) \ + GOT(GUEST_OS_WIN98) \ + GOT(GUEST_OS_WINME) \ + GOT(GUEST_OS_WINNT) \ + GOT(GUEST_OS_WIN2000) \ + GOT(GUEST_OS_WINXP) \ + GOT(GUEST_OS_WINXPPRO_64) \ + GOT(GUEST_OS_WINNET) \ + GOT(GUEST_OS_WINNET_64) \ + GOT(GUEST_OS_LONGHORN) \ + GOT(GUEST_OS_LONGHORN_64) \ + GOT(GUEST_OS_WINVISTA) \ + GOT(GUEST_OS_WINVISTA_64) \ + GOT(GUEST_OS_WINSEVEN) /* Windows 7 */ \ + GOT(GUEST_OS_WINSEVEN_64) /* Windows 7 */ \ + GOT(GUEST_OS_WIN2008R2_64) /* Server 2008 R2 */ \ + GOT(GUEST_OS_WINEIGHT) /* Windows 8 */ \ + GOT(GUEST_OS_WINEIGHT_64) /* Windows 8 x64 */ \ + GOT(GUEST_OS_WINEIGHTSERVER_64) /* Windows 8 Server X64 */ \ + GOT(GUEST_OS_WINTEN) /* Windows 10 */ \ + GOT(GUEST_OS_WINTEN_64) /* Windows 10 x64 */ \ + GOT(GUEST_OS_WINTENSERVER_64) /* Windows 10 Server X64 */ \ + GOT(GUEST_OS_HYPER_V) /* Microsoft Hyper-V */ \ + GOT(GUEST_OS_OS2) \ + GOT(GUEST_OS_ECOMSTATION) /* OS/2 variant; 1.x */ \ + GOT(GUEST_OS_ECOMSTATION2) /* OS/2 variant; 2.x */ \ + GOT(GUEST_OS_OTHER24XLINUX) \ + GOT(GUEST_OS_OTHER24XLINUX_64) \ + GOT(GUEST_OS_OTHER26XLINUX) \ + GOT(GUEST_OS_OTHER26XLINUX_64) \ + GOT(GUEST_OS_OTHER3XLINUX) \ + GOT(GUEST_OS_OTHER3XLINUX_64) \ + GOT(GUEST_OS_OTHERLINUX) \ + GOT(GUEST_OS_OTHERLINUX_64) \ + GOT(GUEST_OS_OTHER) \ + GOT(GUEST_OS_OTHER_64) \ + GOT(GUEST_OS_UBUNTU) \ + GOT(GUEST_OS_DEBIAN45) \ + GOT(GUEST_OS_DEBIAN45_64) \ + GOT(GUEST_OS_RHEL) \ + GOT(GUEST_OS_RHEL_64) \ + GOT(GUEST_OS_FREEBSD) \ + GOT(GUEST_OS_FREEBSD_64) \ + GOT(GUEST_OS_SOLARIS_6_AND_7) \ + GOT(GUEST_OS_SOLARIS8) \ + GOT(GUEST_OS_SOLARIS9) \ + GOT(GUEST_OS_SOLARIS10) \ + GOT(GUEST_OS_SOLARIS10_64) \ + GOT(GUEST_OS_SOLARIS11_64) \ + GOT(GUEST_OS_DARWIN9) /* Mac OS 10.5 */ \ + GOT(GUEST_OS_DARWIN9_64) \ + GOT(GUEST_OS_DARWIN10) /* Mac OS 10.6 */ \ + GOT(GUEST_OS_DARWIN10_64) \ + GOT(GUEST_OS_DARWIN11) /* Mac OS 10.7 */ \ + GOT(GUEST_OS_DARWIN11_64) \ + GOT(GUEST_OS_DARWIN12_64) /* Mac OS 10.8 */ \ + GOT(GUEST_OS_DARWIN13_64) /* Mac OS 10.9 */ \ + GOT(GUEST_OS_DARWIN14_64) /* Mac OS 10.10 */ \ + GOT(GUEST_OS_OPENSERVER_5_AND_6) \ + GOT(GUEST_OS_UNIXWARE7) \ + GOT(GUEST_OS_NETWARE4) \ + GOT(GUEST_OS_NETWARE5) \ + GOT(GUEST_OS_NETWARE6) \ + GOT(GUEST_OS_VMKERNEL) /* ESX 4.x */ \ + GOT(GUEST_OS_VMKERNEL5) /* ESX 5.x */ \ + GOT(GUEST_OS_VMKERNEL6) /* ESX 6.x and later */ \ + GOT(GUEST_OS_PHOTON_64) /* VMware Photon IA 64-bit */ \ /* This list must be sorted alphabetically (non-case-sensitive) by gos name. */ @@ -200,7 +202,8 @@ GOSL("unixware7", GUEST_OS_UNIXWARE7) \ GOSL("vmkernel", GUEST_OS_VMKERNEL) \ GOSL("vmkernel5", GUEST_OS_VMKERNEL5) \ - GOSL("vmkernel6", GUEST_OS_VMKERNEL5) \ + GOSL("vmkernel6", GUEST_OS_VMKERNEL6) \ + GOSL(STR_OS_PHOTON "-64", GUEST_OS_PHOTON_64) \ GOSL("whistler", GUEST_OS_WINXP) /* old */ \ GOSL("win2000", GUEST_OS_WIN2000) /* old */ \ GOSL(STR_OS_WIN_2000_ADV_SERV, GUEST_OS_WIN2000) \ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/guestStats.h open-vm-tools-10.0.0-3000743/lib/include/guestStats.h --- open-vm-tools-9.10.2-2822639/lib/include/guestStats.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/guestStats.h 2015-09-10 07:31:38.000000000 +0000 @@ -30,44 +30,255 @@ #define INCLUDE_ALLOW_VMKERNEL #include "includeCheck.h" +#include "vm_assert.h" #include "vm_basic_types.h" +/* + * Version 1: Legacy data + * Version 2: Dead + * Version 3: Dead + * Version 4: Dead + * Version 5: Legacy structure followed by one or more GuestStat + * structures and data. + */ + +#define GUESTMEMINFO_V1 1 +#define GUESTMEMINFO_V2 2 +#define GUESTMEMINFO_V3 3 +#define GUESTMEMINFO_V4 4 +#define GUESTMEMINFO_V5 5 + +/* + * Flags for legacy GuestMemInfo + * + * This is deprecated. All new values are returned via a GuestStat list. + */ + +#define MEMINFO_MEMTOTAL (1 << 0) +#define MEMINFO_DEPRECATED1 (1 << 1) +#define MEMINFO_DEPRECATED2 (1 << 2) +#define MEMINFO_DEPRECATED3 (1 << 3) +#define MEMINFO_DEPRECATED4 (1 << 4) +#define MEMINFO_DEPRECATED5 (1 << 5) +#define MEMINFO_DEPRECATED6 (1 << 6) +#define MEMINFO_DEPRECATED7 (1 << 7) +#define MEMINFO_DEPRECATED8 (1 << 8) +#define MEMINFO_DEPRECATED9 (1 << 9) +#define MEMINFO_HUGEPAGESTOTAL (1 << 10) +#define MEMINFO_DEPRECATED10 (1 << 11) +#define MEMINFO_DEPRECATED11 (1 << 12) + +/* + * Legacy GuestMemInfo structure. + * + * It should stay the same to ensure binary compatibility. + */ + typedef #include "vmware_pack_begin.h" struct GuestMemInfo { - uint32 version; ///< MemInfo structure version. - uint32 flags; ///< Indicates which stats are valid. - uint64 memTotal; ///< Total physical memory in Kb. - uint64 memFree; ///< Physical memory available in Kb. - uint64 memBuff; ///< Physical memory used as buffer cache in Kb. - uint64 memCache; ///< Physical memory used as cache in Kb. - uint64 memActive; ///< Physical memory actively in use in Kb (working set) - uint64 memInactive; ///< Physical memory inactive in Kb (cold pages) - uint64 swapInRate; ///< Memory swapped out in Kb / sec. - uint64 swapOutRate; ///< Memory swapped out in Kb / sec. - uint64 ioInRate; ///< Amount of I/O in Kb / sec. - uint64 ioOutRate; ///< Amount of I/O out in Kb / sec. - uint64 hugePagesTotal; ///< Total number of huge pages. - uint64 hugePagesFree; ///< Available number of huge pages. - uint64 memPinned; ///< Unreclaimable physical memory in 4K page size. + uint32 version; ///< MemInfo structure version. + uint32 flags; ///< Indicates which stats are valid. + uint64 memTotal; ///< Total physical memory in Kb. + uint64 deprecated1[9]; ///< No longer used. + uint64 hugePagesTotal; ///< Total number of huge pages. + uint64 deprecated2[2]; ///< No longer used. } #include "vmware_pack_end.h" GuestMemInfo; -/* Flags for GuestMemInfo. */ -#define MEMINFO_MEMTOTAL (1 << 0) -#define MEMINFO_MEMFREE (1 << 1) -#define MEMINFO_MEMBUFF (1 << 2) -#define MEMINFO_MEMCACHE (1 << 3) -#define MEMINFO_MEMACTIVE (1 << 4) -#define MEMINFO_MEMINACTIVE (1 << 5) -#define MEMINFO_SWAPINRATE (1 << 6) -#define MEMINFO_SWAPOUTRATE (1 << 7) -#define MEMINFO_IOINRATE (1 << 8) -#define MEMINFO_IOOUTRATE (1 << 9) -#define MEMINFO_HUGEPAGESTOTAL (1 << 10) -#define MEMINFO_HUGEPAGESFREE (1 << 11) -#define MEMINFO_MEMPINNED (1 << 12) +/* + * A stat begins with a header. The header has a mask which says what data + * follows. Each datum has a size field which says how much data follows so it + * can be used or ignored. The order of the data that follows is that of the + * bits, lowest order bit to highest. + */ -#endif // _GUEST_STATS_H_ +typedef enum { + GUEST_DATUM_PRAGMA = 0x0001, // escape hatch (future expansion) + GUEST_DATUM_NAMESPACE = 0x0002, // UTF8 string + GUEST_DATUM_ID = 0x0004, // uint8 - uint64 + GUEST_DATUM_VALUE_TYPE_ENUM = 0x0008, // uint8 - uint32 + GUEST_DATUM_VALUE_TYPE_STRING = 0x0010, // UTF8 string + GUEST_DATUM_VALUE_UNIT_ENUM = 0x0020, // uint8 - uint32 + GUEST_DATUM_VALUE_UNIT_STRING = 0x0040, // UTF8 string + GUEST_DATUM_VALUE = 0x0080, // value data +} GuestDatum; + +typedef +#include "vmware_pack_begin.h" +struct GuestStatHeader { + GuestDatum datumFlags; // Indicates how many and which data follow +} +#include "vmware_pack_end.h" +GuestStatHeader; + +typedef +#include "vmware_pack_begin.h" +struct GuestDatumHeader { + uint16 dataSize; // dataSize - May be zero + char data[0]; // data - if dataSize is not zero. +} +#include "vmware_pack_end.h" +GuestDatumHeader; +/* + * Units datum enum. + * Note: The entirety (all bits) of the units must always be understood by a client. + * + * First we define some modifiers, then the enum itself + * + * bits 0-5 define base types (information, time, etc.) + * bits 6-10 are modifiers, four of which are reserved (in the future, we could + * define two of them as custom modifiers, for things like changing the radix from 2^10 + * to 10^3 for storage, or for denoting rates are in 100ns units). + */ +#define GuestUnitsModifier_Rate 0x0040 +#define GuestUnitsModifier_Reserved0 0x0080 +#define GuestUnitsModifier_Reserved1 0x0100 +#define GuestUnitsModifier_Reserved2 0x0200 +#define GuestUnitsModifier_Reserved3 0x0400 + +/* + * bits 11-15 are scale modifiers: + * This includes common scales: (P)ositive powers, (N)egative powers, + * and (C)ustom scales (bits, pages, etc.), which are always type specific. + */ +#define GuestUnitsScale_P0 0x0000 +#define GuestUnitsScale_P1 0x0800 +#define GuestUnitsScale_P2 0x1000 +#define GuestUnitsScale_P3 0x1800 +#define GuestUnitsScale_P4 0x2000 +#define GuestUnitsScale_P5 0x2800 +#define GuestUnitsScale_P6 0x3000 +#define GuestUnitsScale_Reserved0 0x3800 + +#define GuestUnitsScale_N1 0x4000 +#define GuestUnitsScale_N2 0x4800 +#define GuestUnitsScale_N3 0x5000 +#define GuestUnitsScale_N4 0x5800 +#define GuestUnitsScale_N5 0x6000 +#define GuestUnitsScale_N6 0x6800 +#define GuestUnitsScale_Reserved1 0x7000 +#define GuestUnitsScale_Reserved2 0x7800 + +#define GuestUnitsScale_C0 0x8000 +#define GuestUnitsScale_C1 0x8800 +#define GuestUnitsScale_C2 0x9000 +#define GuestUnitsScale_C3 0x9800 +// 0xA000-0xF800 are reserved. + +typedef enum { + GuestUnitsInvalid = 0, // Must never be sent + GuestUnitsNone = 1, // A valid value, but not any of the below units. + GuestUnitsNumber = 2, // default radix is 1000 + GuestUnitsInformation = 3, // default radix is 1024 + GuestUnitsDuration = 4, // default radix is 1000 + GuestUnitsCycles = 5, // default radix is 1000 + + GuestUnitsBytes = GuestUnitsInformation | GuestUnitsScale_P0, + GuestUnitsKiB = GuestUnitsInformation | GuestUnitsScale_P1, + GuestUnitsMiB = GuestUnitsInformation | GuestUnitsScale_P2, + GuestUnitsPages = GuestUnitsInformation | GuestUnitsScale_C0, + GuestUnitsHugePages = GuestUnitsInformation | GuestUnitsScale_C1, + GuestUnitsBytesPerSecond = GuestUnitsBytes | GuestUnitsModifier_Rate, + GuestUnitsKiBPerSecond = GuestUnitsKiB | GuestUnitsModifier_Rate, + GuestUnitsMiBPerSecond = GuestUnitsMiB | GuestUnitsModifier_Rate, + GuestUnitsPagesPerSecond = GuestUnitsPages | GuestUnitsModifier_Rate, + GuestUnitsHugePagesPerSecond = GuestUnitsHugePages | GuestUnitsModifier_Rate, + + GuestUnitsAttoSeconds = GuestUnitsDuration | GuestUnitsScale_N6, + GuestUnitsFemtoSeconds = GuestUnitsDuration | GuestUnitsScale_N5, + GuestUnitsPicoSeconds = GuestUnitsDuration | GuestUnitsScale_N4, + GuestUnitsNanoSeconds = GuestUnitsDuration | GuestUnitsScale_N3, + GuestUnitsMicroSeconds = GuestUnitsDuration | GuestUnitsScale_N2, + GuestUnitsMilliSeconds = GuestUnitsDuration | GuestUnitsScale_N1, + GuestUnitsSeconds = GuestUnitsDuration | GuestUnitsScale_P0, + + GuestUnitsHz = GuestUnitsCycles | GuestUnitsScale_P0 | GuestUnitsModifier_Rate, + GuestUnitsKiloHz = GuestUnitsCycles | GuestUnitsScale_P1 | GuestUnitsModifier_Rate, + GuestUnitsMegaHz = GuestUnitsCycles | GuestUnitsScale_P2 | GuestUnitsModifier_Rate, + GuestUnitsGigaHz = GuestUnitsCycles | GuestUnitsScale_P3 | GuestUnitsModifier_Rate, + GuestUnitsTeraHz = GuestUnitsCycles | GuestUnitsScale_P4 | GuestUnitsModifier_Rate, + + GuestUnitsPercent = GuestUnitsNumber | GuestUnitsScale_C0, // integers: must be 0...100; FP: 0.0...1.0 + GuestUnitsNumberPerSecond = GuestUnitsNumber | GuestUnitsModifier_Rate, +} GuestValueUnits; + +/* + * Data type datum enum. + * Note: The entirety (all bits) of the type must always be understood by a client. + * + * Bits 0-5 are for types. + * Bits 6-15 are reserved. In the future, one bit will denote arrays. + */ + +#define GuestTypeModifier_Reserved0 0x0040 // More Reserved1-9 not shown. + +typedef enum { + GuestTypeInvalid, // Must never be sent + GuestTypeNil, // A stat that has no value + GuestTypeInt8, // Little endian + GuestTypeUint8, // Little endian + GuestTypeInt16, // Little endian + GuestTypeUint16, // Little endian + GuestTypeInt32, // Little endian + GuestTypeUint32, // Little endian + GuestTypeInt64, // Little endian + GuestTypeUint64, // Little endian + GuestTypeFloat, // IEEE 754 + GuestTypeDouble, // IEEE 754 + GuestTypeString, // NUL terminated UTF8 + GuestTypeBinary, // Binary blob +} GuestValueType; + +/* + * Defines the namespace used for guest tools buildin query. + */ +#define GUEST_TOOLS_NAMESPACE "_tools/v1" + +/* + * Defined stat IDs for guest tools builtin query. + * See vmx/vigorapi/GuestStats.java for documentation + * + * NOTE: These IDs are relative to GUEST_TOOLS_NAMESPACE + * NOTE: DO NOT re-order or remove the IDs. IDs can only be added to the end, + * unless you make the totally backward-compatibility breaking change + * of bumping the namespace version. + */ +#define GUEST_STAT_TOOLS_IDS \ + DEFINE_GUEST_STAT(GuestStatID_Invalid, 0, "__INVALID__") \ + DEFINE_GUEST_STAT(GuestStatID_None, 1, "__NONE__") \ + DEFINE_GUEST_STAT(GuestStatID_ContextSwapRate, 2, "guest.contextSwapRate") \ + DEFINE_GUEST_STAT(GuestStatID_MemActiveFileCache, 3, "guest.mem.activeFileCache") \ + DEFINE_GUEST_STAT(GuestStatID_MemFree, 4, "guest.mem.free") \ + DEFINE_GUEST_STAT(GuestStatID_MemNeeded, 5, "guest.mem.needed") \ + DEFINE_GUEST_STAT(GuestStatID_MemPhysUsable, 6, "guest.mem.physUsable") \ + DEFINE_GUEST_STAT(GuestStatID_PageInRate, 7, "guest.page.inRate") \ + DEFINE_GUEST_STAT(GuestStatID_PageOutRate, 8, "guest.page.outRate") \ + DEFINE_GUEST_STAT(GuestStatID_SwapSpaceRemaining, 9, "guest.swap.spaceRemaining") \ + DEFINE_GUEST_STAT(GuestStatID_PhysicalPageSize, 10, "guest.page.size") \ + DEFINE_GUEST_STAT(GuestStatID_HugePageSize, 11, "guest.hugePage.size") \ + DEFINE_GUEST_STAT(GuestStatID_Linux_HugePagesTotal, 12, "guest.hugePage.total") \ + DEFINE_GUEST_STAT(GuestStatID_Max, 13, "__MAX__") + +/* + * Define stats enumeration + */ +#undef DEFINE_GUEST_STAT +#define DEFINE_GUEST_STAT(x,y,z) x, +typedef enum GuestStatToolsID { + GUEST_STAT_TOOLS_IDS +} GuestStatToolsID; + +/* + * Enforce ordering and compactness of the enumeration + */ +#undef DEFINE_GUEST_STAT +#define DEFINE_GUEST_STAT(x,y,z) ASSERT_ON_COMPILE(x==y); + +MY_ASSERTS(GUEST_STAT_IDS_ARE_WELL_ORDERED, GUEST_STAT_TOOLS_IDS) + +#undef DEFINE_GUEST_STAT + +#endif // _GUEST_STATS_H_ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/hashTable.h open-vm-tools-10.0.0-3000743/lib/include/hashTable.h --- open-vm-tools-9.10.2-2822639/lib/include/hashTable.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/hashTable.h 2015-09-10 07:31:38.000000000 +0000 @@ -58,77 +58,77 @@ #define HASH_FLAG_COPYKEY 0x10 // copy string key HashTable * -HashTable_Alloc(uint32 numEntries, - int keyType, - HashTableFreeEntryFn fn); +HashTable_Alloc(uint32 numEntries, // IN: + int keyType, // IN: + HashTableFreeEntryFn fn); // IN/OPT: HashTable * -HashTable_AllocOnce(Atomic_Ptr *var, - uint32 numEntries, - int keyType, - HashTableFreeEntryFn fn); +HashTable_AllocOnce(Atomic_Ptr *var, // IN/OUT: + uint32 numEntries, // IN: + int keyType, // IN: + HashTableFreeEntryFn fn); // IN/OPT: void -HashTable_Free(HashTable *hashTable); +HashTable_Free(HashTable *hashTable); // IN/OUT: void -HashTable_FreeUnsafe(HashTable *hashTable); +HashTable_FreeUnsafe(HashTable *hashTable); // IN/OUT: Bool -HashTable_Insert(HashTable *hashTable, - const void *keyStr, - void *clientData); +HashTable_Insert(HashTable *hashTable, // IN/OUT: + const void *keyStr, // IN: + void *clientData); // IN/OPT: Bool -HashTable_Lookup(HashTable *hashTable, - const void *keyStr, - void **clientData); +HashTable_Lookup(HashTable *hashTable, // IN: + const void *keyStr, // IN: + void **clientData); // OUT/OPT: void * -HashTable_LookupOrInsert(HashTable *hashTable, - const void *keyStr, - void *clientData); +HashTable_LookupOrInsert(HashTable *hashTable, // IN/OUT: + const void *keyStr, // IN: + void *clientData); // IN/OPT: Bool -HashTable_ReplaceOrInsert(HashTable *hashTable, - const void *keyStr, - void *clientData); +HashTable_ReplaceOrInsert(HashTable *hashTable, // IN/OUT: + const void *keyStr, // IN: + void *clientData); // IN/OPT Bool -HashTable_ReplaceIfEqual(HashTable *hashTable, - const void *keyStr, - void *oldClientData, - void *newClientData); +HashTable_ReplaceIfEqual(HashTable *hashTable, // IN/OUT: + const void *keyStr, // IN: + void *oldClientData, // IN/OPT + void *newClientData); // IN/OPT Bool -HashTable_Delete(HashTable *hashTable, - const void *keyStr); +HashTable_Delete(HashTable *hashTable, // IN/OUT: + const void *keyStr); // IN: Bool -HashTable_LookupAndDelete(HashTable *hashTable, - const void *keyStr, - void **clientData); +HashTable_LookupAndDelete(HashTable *hashTable, // IN/OUT: + const void *keyStr, // IN: + void **clientData); // OUT: void -HashTable_Clear(HashTable *ht); +HashTable_Clear(HashTable *ht); // IN/OUT: void -HashTable_ToArray(const HashTable *ht, - void ***clientDatas, - size_t *size); +HashTable_ToArray(const HashTable *ht, // IN: + void ***clientDatas, // OUT: + size_t *size); // OUT: void -HashTable_KeyArray(const HashTable *ht, - const void ***keys, - size_t *size); +HashTable_KeyArray(const HashTable *ht, // IN: + const void ***keys, // OUT: + size_t *size); // OUT: size_t -HashTable_GetNumElements(const HashTable *ht); +HashTable_GetNumElements(const HashTable *ht); // IN: int -HashTable_ForEach(const HashTable *ht, - HashTableForEachCallback cb, - void *clientData); +HashTable_ForEach(const HashTable *ht, // IN: + HashTableForEachCallback cb, // IN: + void *clientData); // IN: /* * Specialize hash table that uses the callers data structure as its diff -Nru open-vm-tools-9.10.2-2822639/lib/include/hgfsDevLinux.h open-vm-tools-10.0.0-3000743/lib/include/hgfsDevLinux.h --- open-vm-tools-9.10.2-2822639/lib/include/hgfsDevLinux.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/hgfsDevLinux.h 2015-09-10 07:31:38.000000000 +0000 @@ -32,7 +32,7 @@ /* * hgfsDev.h -- - * + * * Header for code shared between the hgfs linux kernel module driver * and the pserver. */ @@ -44,12 +44,21 @@ #include "hgfs.h" #define HGFS_NAME "vmhgfs" // Name of FS (e.g. "mount -t vmhgfs") +#define HGFS_FUSENAME "vmhgfs-fuse" // Name of FS (e.g. "-o subtype=vmhgfs-fuse") +#define HGFS_FUSETYPE "fuse." HGFS_FUSENAME // Type of FS (e.g. "fuse.vmhgfs-fuse") +#define HGFS_MOUNT_POINT "/mnt/hgfs" // Type of FS (e.g. vmhgfs-fuse ) #define HGFS_DEVICE_NAME "dev" // Name of our device under /proc/fs/HGFS_NAME/ #define HGFS_SUPER_MAGIC 0xbacbacbc // Superblock magic number #define HGFS_PROTOCOL_VERSION 1 // Incremented when something changes #define HGFS_DEFAULT_TTL 1 // Default TTL for dentries -/* +/* + * The mount info flags. + * These specify flags from options parsed on the mount command line. + */ +#define HGFS_MNTINFO_SERVER_INO (1 << 0) /* Use server inode numbers? */ + +/* * Mount information, passed from pserver process to kernel * at mount time. * @@ -57,10 +66,13 @@ * loses its pserver, the struct will be used by /sbin/mount.vmhgfs solely. * As is, it is also used by the Solaris pserver. */ -typedef struct HgfsMountInfo { +typedef +struct HgfsMountInfo { uint32 magicNumber; // hgfs magic number + uint32 infoSize; // HgfsMountInfo object size uint32 version; // protocol version uint32 fd; // file descriptor of client file + uint32 flags; // hgfs specific mount flags #ifndef sun uid_t uid; // desired owner of files Bool uidSet; // is the owner actually set? @@ -77,6 +89,12 @@ const char *shareNameDir; // desired share name for mounting #endif #endif -} HgfsMountInfo; +} +#if __GNUC__ +__attribute__((__packed__)) +#else +# error Compiler packing... +#endif +HgfsMountInfo; #endif //ifndef _HGFS_DEV_H_ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/hgfsEscape.h open-vm-tools-10.0.0-3000743/lib/include/hgfsEscape.h --- open-vm-tools-9.10.2-2822639/lib/include/hgfsEscape.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/hgfsEscape.h 2015-09-10 07:31:38.000000000 +0000 @@ -41,14 +41,14 @@ #ifndef __HGFS_ESCAPE_H__ #define __HGFS_ESCAPE_H__ -int HgfsEscape_GetSize(char const *bufIn, // IN - uint32 sizeIn); // IN -int HgfsEscape_Do(char const *bufIn, // IN - uint32 sizeIn, // IN - uint32 sizeBufOut, // IN - char *bufOut); // OUT +int HgfsEscape_GetSize(char const *bufIn, + uint32 sizeIn); +int HgfsEscape_Do(char const *bufIn, + uint32 sizeIn, + uint32 sizeBufOut, + char *bufOut); -int HgfsEscape_Undo(char *bufIn, // IN - uint32 sizeIn); // IN +uint32 HgfsEscape_Undo(char *bufIn, + uint32 sizeIn); #endif // __HGFS_ESCAPE_H__ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/hgfsHelper.h open-vm-tools-10.0.0-3000743/lib/include/hgfsHelper.h --- open-vm-tools-9.10.2-2822639/lib/include/hgfsHelper.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/hgfsHelper.h 2015-09-10 07:31:38.000000000 +0000 @@ -29,10 +29,10 @@ #include "vm_basic_types.h" #include "unicode.h" -Bool HgfsHlpr_QuerySharesDefaultRootPath(Unicode *hgfsRootPath); -void HgfsHlpr_FreeSharesRootPath(Unicode hgfsRootPath); +Bool HgfsHlpr_QuerySharesDefaultRootPath(char **hgfsRootPath); +void HgfsHlpr_FreeSharesRootPath(char *hgfsRootPath); #if defined(_WIN32) -Bool HgfsHlpr_ReadRegistryDefaultRootPath(Unicode *hgfsRootPath); +Bool HgfsHlpr_ReadRegistryDefaultRootPath(char **hgfsRootPath); #endif // _WIN32 #endif diff -Nru open-vm-tools-9.10.2-2822639/lib/include/hgfsProto.h open-vm-tools-10.0.0-3000743/lib/include/hgfsProto.h --- open-vm-tools-9.10.2-2822639/lib/include/hgfsProto.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/hgfsProto.h 2015-09-10 07:31:38.000000000 +0000 @@ -137,8 +137,8 @@ HGFS_OP_DELETE_V4, /* Delete a file or a directory */ HGFS_OP_LINKMOVE_V4, /* Rename/move/create hard link. */ HGFS_OP_FSCTL_V4, /* Sending FS control requests. */ - HGFS_OP_ACCESS_CHECK_V4, /* Flush all cached data to the disk. */ - HGFS_OP_FSYNC_V4, /* Access check. */ + HGFS_OP_ACCESS_CHECK_V4, /* Access check. */ + HGFS_OP_FSYNC_V4, /* Flush all cached data to the disk. */ HGFS_OP_QUERY_VOLUME_INFO_V4, /* Query volume information. */ HGFS_OP_OPLOCK_ACQUIRE_V4, /* Acquire OPLOCK. */ HGFS_OP_OPLOCK_BREAK_V4, /* Break or downgrade OPLOCK. */ @@ -787,12 +787,25 @@ /* Version 3 of HgfsReplyOpen */ + +/* + * The HGFS open V3 can acquire locks and reserve disk space when requested. + * However, current versions of the server don't implement the locking or allocation of + * disk space on a create. These results flags indicate to the client if the server + * implements handling those fields and so the clients can respond accordingly. + */ +typedef uint32 HgfsReplyOpenFlags; + +#define HGFS_OPEN_REPLY_ALLOC_DISK_SPACE (1 << 0) +#define HGFS_OPEN_REPLY_LOCKED_FILE (1 << 1) + typedef #include "vmware_pack_begin.h" struct HgfsReplyOpenV3 { HgfsHandle file; /* Opaque file ID used by the server */ HgfsLockType acquiredLock; /* The type of lock acquired by the server */ - uint64 reserved; /* Reserved for future use */ + HgfsReplyOpenFlags flags; /* Opened file flags */ + uint32 reserved; /* Reserved for future use */ } #include "vmware_pack_end.h" HgfsReplyOpenV3; diff -Nru open-vm-tools-9.10.2-2822639/lib/include/hgfsServer.h open-vm-tools-10.0.0-3000743/lib/include/hgfsServer.h --- open-vm-tools-9.10.2-2822639/lib/include/hgfsServer.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/hgfsServer.h 2015-09-10 07:31:38.000000000 +0000 @@ -22,19 +22,6 @@ #include "hgfs.h" /* for HGFS_PACKET_MAX */ #include "dbllnklst.h" -/* - * Function used for sending updates of server state to the manager. - * Passed by the caller at session connect time. - */ -typedef void -HgfsServerStateLoggerFunc(void *data, // IN - uint64 cookie); // IN - -typedef struct HgfsServerStateLogger { - HgfsServerStateLoggerFunc *logger; // logger callback - void *loggerData; // logger callback private data -} HgfsServerStateLogger; - typedef struct HgfsVmxIov { void *va; /* Virtual addr */ uint64 pa; /* Physical address passed by the guest */ @@ -135,6 +122,50 @@ uint32 maxCachedOpenNodes; }HgfsServerConfig; +/* + * Function used to notify HGFS server that a shared folder has been created or updated. + * It allows HGFS server to maintain up-to-date list of shared folders and its + * properties. + */ +typedef uint32 HgfsSharedFolderHandle; +#define HGFS_INVALID_FOLDER_HANDLE ((HgfsSharedFolderHandle)~((HgfsSharedFolderHandle)0)) + +typedef HgfsSharedFolderHandle (*HgfsRegisterSharedFolderFunc)(const char *shareName, + const char *sharePath, + Bool addFolder); +/* + * Callback functions to enumerate the share resources. + * Filled in by the HGFS server policy and passed in to the HGFS server + * so that it can call out to them to enumerate the shares. + */ +typedef void * (*HgfsServerResEnumInitFunc)(void); +typedef Bool (*HgfsServerResEnumGetFunc)(void *data, + char const **name, + size_t *len, + Bool *done); +typedef Bool (*HgfsServerResEnumExitFunc)(void *); + +typedef struct HgfsServerResEnumCallbacks { + HgfsServerResEnumInitFunc init; + HgfsServerResEnumGetFunc get; + HgfsServerResEnumExitFunc exit; +} HgfsServerResEnumCallbacks; + + +/* + * Server Manager callback functions to enumerate the share resources and state logging. + * Passed to the HGFS server on initialization. + */ +typedef struct HgfsServerMgrCallbacks { + HgfsServerResEnumCallbacks enumResources; +} HgfsServerMgrCallbacks; + +/* + * Function used for invalidating nodes and searches that fall outside of a + * share when the list of shares changes. + */ +typedef void (*HgfsInvalidateObjectsFunc)(DblLnkLst_Links *shares); + typedef Bool (*HgfsChannelSendFunc)(void *opaqueSession, HgfsPacket *packet, HgfsSendFlags flags); @@ -158,58 +189,20 @@ void (*sendComplete)(HgfsPacket *, void *); } HgfsServerSessionCallbacks; -Bool HgfsServer_InitState(HgfsServerSessionCallbacks **, +typedef struct HgfsServerCallbacks { + HgfsServerSessionCallbacks session; + HgfsRegisterSharedFolderFunc registerShare; +} HgfsServerCallbacks; + +Bool HgfsServer_InitState(HgfsServerCallbacks **, HgfsServerConfig *, - HgfsServerStateLogger *); + HgfsServerMgrCallbacks *); void HgfsServer_ExitState(void); uint32 HgfsServer_GetHandleCounter(void); void HgfsServer_SetHandleCounter(uint32 newHandleCounter); -/* - * Function pointers used for getting names in HgfsServerGetDents - * - * Functions of this type are expected to return a NUL terminated - * string and the length of that string. - */ -typedef Bool -HgfsGetNameFunc(void *data, // IN - char const **name, // OUT - size_t *len, // OUT - Bool *done); // OUT - -/* - * Associated setup and cleanup function types, which should be called - * before and after (respectively) HgfsGetNameFunc. - */ -typedef void * -HgfsInitFunc(void); - -typedef Bool -HgfsCleanupFunc(void *); // IN - -/* - * Function used for invalidating nodes and searches that fall outside of a - * share when the list of shares changes. - */ -typedef void -HgfsInvalidateObjectsFunc(DblLnkLst_Links *shares); // IN - -/* - * Function used to notify HGFS server that a shared folder has been created or updated. - * It allows HGFS server to maintain up-to-date list of shared folders and its - * properties. - */ -typedef uint32 HgfsSharedFolderHandle; -#define HGFS_INVALID_FOLDER_HANDLE ((HgfsSharedFolderHandle)~((HgfsSharedFolderHandle)0)) -typedef HgfsSharedFolderHandle -HgfsRegisterSharedFolderFunc(const char *shareName, - const char *sharePath, - Bool addFolder); -HgfsSharedFolderHandle HgfsServer_RegisterSharedFolder(const char *shareName, - const char *sharePath, - Bool addFolder); void HgfsServer_Quiesce(Bool freeze); #endif // _HGFS_SERVER_H_ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/hgfsServerPolicy.h open-vm-tools-10.0.0-3000743/lib/include/hgfsServerPolicy.h --- open-vm-tools-9.10.2-2822639/lib/include/hgfsServerPolicy.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/hgfsServerPolicy.h 2015-09-10 07:31:38.000000000 +0000 @@ -31,12 +31,6 @@ */ #define HGFS_SERVER_POLICY_ROOT_SHARE_NAME "root" -Bool -HgfsServerPolicy_Init(HgfsInvalidateObjectsFunc *invalidateObjects, HgfsRegisterSharedFolderFunc *registerFolder); - -Bool -HgfsServerPolicy_Cleanup(void); - typedef uint32 HgfsShareOptions; @@ -46,17 +40,17 @@ */ typedef struct HgfsSharedFolder { DblLnkLst_Links links; - char *name; /* Name of share */ - char *path; /* - * Path of share in server's filesystem. Should - * not include final path separator. - */ - char *shareTags; /* Tags associated with this share (comma delimited). */ - size_t shareTagsLen; /* Length of shareTag string */ - size_t nameLen; /* Length of name string */ - size_t pathLen; /* Length of path string */ - Bool readAccess; /* Read permission for this share */ - Bool writeAccess; /* Write permission for this share */ + const char *name; /* Name of share */ + const char *path; /* + * Path of share in server's filesystem. Should + * not include final path separator. + */ + const char *shareTags;/* Tags associated with this share (comma delimited). */ + size_t shareTagsLen; /* Length of shareTag string */ + size_t nameLen; /* Length of name string */ + size_t pathLen; /* Length of path string */ + Bool readAccess; /* Read permission for this share */ + Bool writeAccess; /* Write permission for this share */ HgfsShareOptions configOptions; /* User-config options. */ HgfsSharedFolderHandle handle; /* Handle assigned by HGFS server * when the folder was registered with it. @@ -78,10 +72,13 @@ char **shareNames; } HgfsServerPolicy_ShareList; -/* Defined in hgfsServerInt.h */ -HgfsGetNameFunc HgfsServerPolicy_GetShares; -HgfsInitFunc HgfsServerPolicy_GetSharesInit; -HgfsCleanupFunc HgfsServerPolicy_GetSharesCleanup; +Bool +HgfsServerPolicy_Init(HgfsInvalidateObjectsFunc invalidateObjects, + HgfsRegisterSharedFolderFunc registerFolder, + HgfsServerResEnumCallbacks *enumResources); + +Bool +HgfsServerPolicy_Cleanup(void); HgfsNameStatus HgfsServerPolicy_GetSharePath(char const *nameIn, // IN: diff -Nru open-vm-tools-9.10.2-2822639/lib/include/hgfsTransport.h open-vm-tools-10.0.0-3000743/lib/include/hgfsTransport.h --- open-vm-tools-9.10.2-2822639/lib/include/hgfsTransport.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/hgfsTransport.h 2015-09-10 07:31:38.000000000 +0000 @@ -45,6 +45,13 @@ * VMCI specific data structures, macros * ************************************************/ +/* + * Limit payload to 16M. + * This limit ensures that list of shared pages fits into VMCI datagram. + * Client may impose a lower limit in create session request. + */ +#define HGFS_VMCI_PACKET_MAX (0x1000000) + #define HGFS_VMCI_VERSION_1 0x1 #define HGFS_VMCI_VERSION_2 0x2 diff -Nru open-vm-tools-9.10.2-2822639/lib/include/hgfsUri.h open-vm-tools-10.0.0-3000743/lib/include/hgfsUri.h --- open-vm-tools-9.10.2-2822639/lib/include/hgfsUri.h 1970-01-01 00:00:00.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/hgfsUri.h 2015-09-10 07:31:38.000000000 +0000 @@ -0,0 +1,39 @@ +/********************************************************* + * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * hgfsUri.h + * + * Provides a library for guest applications to convert local pathames to + * x-vmware-share:// style URIs + */ + +#ifndef _HGFS_URI_H_ +#define _HGFS_URI_H_ + +#include "vm_basic_types.h" +#include "unicode.h" + +#if defined(_WIN32) +char *HgfsUri_ConvertFromUtf16ToHgfsUri(wchar_t *pathNameUtf16, Bool hgfsOnly); +#endif // _WIN32 +#if defined __linux__ || defined __APPLE__ +char *HgfsUri_ConvertFromPathToHgfsUri(const char *pathName, Bool hgfsOnly); +#endif // POSIX + +#endif diff -Nru open-vm-tools-9.10.2-2822639/lib/include/hostinfo.h open-vm-tools-10.0.0-3000743/lib/include/hostinfo.h --- open-vm-tools-9.10.2-2822639/lib/include/hostinfo.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/hostinfo.h 2015-09-10 07:31:38.000000000 +0000 @@ -43,8 +43,8 @@ HostinfoProcessQuery Hostinfo_QueryProcessExistence(int pid); -Unicode Hostinfo_NameGet(void); /* don't free result */ -Unicode Hostinfo_HostName(void); /* free result */ +char *Hostinfo_NameGet(void); /* don't free result */ +char *Hostinfo_HostName(void); /* free result */ void Hostinfo_MachineID(uint32 *hostNameHash, uint64 *hostHardwareID); @@ -128,10 +128,10 @@ #define HGMP_PRIVILEGE 0 #define HGMP_NO_PRIVILEGE 1 -Unicode Hostinfo_GetModulePath(uint32 priv); +char *Hostinfo_GetModulePath(uint32 priv); char *Hostinfo_GetLibraryPath(void *addr); -Unicode Hostinfo_GetUser(void); +char *Hostinfo_GetUser(void); void Hostinfo_LogMemUsage(void); diff -Nru open-vm-tools-9.10.2-2822639/lib/include/hostType.h open-vm-tools-10.0.0-3000743/lib/include/hostType.h --- open-vm-tools-9.10.2-2822639/lib/include/hostType.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/hostType.h 2015-09-10 07:31:38.000000000 +0000 @@ -34,8 +34,11 @@ #include "vm_basic_types.h" Bool HostType_OSIsVMK(void); -Bool HostType_OSIsPureVMK(void); -Bool HostType_OSIsVMK64(void); Bool HostType_OSIsSimulator(void); +/* Old name. TODO: remove */ +static INLINE Bool +HostType_OSIsPureVMK(void) +{ return HostType_OSIsVMK(); } + #endif /* ifndef _HOSTTYPE_H_ */ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/iovector.h open-vm-tools-10.0.0-3000743/lib/include/iovector.h --- open-vm-tools-9.10.2-2822639/lib/include/iovector.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/iovector.h 2015-09-10 07:31:38.000000000 +0000 @@ -38,8 +38,8 @@ #ifndef HAS_IOVEC struct iovec { - void *iov_base; /* Starting address. */ - size_t iov_len; /* Length in bytes. */ + void *iov_base; /* Starting address. */ + size_t iov_len; /* Length in bytes. */ }; #endif // HAS_IOVEC @@ -84,14 +84,14 @@ uint8* buffer, Bool read); -void IOV_WriteIovToBuf(struct iovec* entries, +void IOV_WriteIovToBuf(struct iovec const *entries, int numEntries, - uint8* bufOut, + uint8 *bufOut, size_t bufSize); -void IOV_WriteBufToIov(const uint8* bufIn, +void IOV_WriteBufToIov(const uint8 *bufIn, size_t bufSize, - struct iovec* entries, + struct iovec const *entries, int numEntries); size_t diff -Nru open-vm-tools-9.10.2-2822639/lib/include/log.h open-vm-tools-10.0.0-3000743/lib/include/log.h --- open-vm-tools-9.10.2-2822639/lib/include/log.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/log.h 2015-09-10 07:31:38.000000000 +0000 @@ -30,31 +30,48 @@ /* * The bora/lib Log Facility log level model. - * This the same as the vmacore/hostd Log Facility. + * + * Each log entry has a level associated with it. The Log Facility filters + * entries as they arrive by their level; only levels equal to or below + * (smaller values) the filter level will be accepted by the Log Facility for + * processing. + * + * By default, the Log Facility will output any entry which is submitted at + * level VMW_LOG_WARNING and below to the "standard error". This may be + * controlled via Log_SetStderrLevel (see function header) or configuration + * parameter (see comments in log.c). + * + * The VMW_LOG_AUDIT level is used to log something that requires an audit + * at a later date. It is *ALWAYS* logged and *NEVER* outputs to the "standard + * error". * * The VMW_LOG_BASE is chosen to ensure that on all platforms commonly * used system logger values will be invalid and the errant usage caught. + * + * Level Level value Comments + *--------------------------------------------------------------------------- */ #define VMW_LOG_BASE 100 -#define VMW_LOG_PANIC (VMW_LOG_BASE + 0) // highest priority -#define VMW_LOG_ERROR (VMW_LOG_BASE + 5) -#define VMW_LOG_WARNING (VMW_LOG_BASE + 10) // <= goes to stderr by default -#define VMW_LOG_AUDIT (VMW_LOG_BASE + 15) // *ALWAYS* output to the log -#define VMW_LOG_INFO (VMW_LOG_BASE + 20) // <= goes to log by default -#define VMW_LOG_VERBOSE (VMW_LOG_BASE + 25) -#define VMW_LOG_TRIVIA (VMW_LOG_BASE + 30) -#define VMW_LOG_DEBUG_00 (VMW_LOG_BASE + 35) // noisiest level of debugging +#define VMW_LOG_AUDIT (VMW_LOG_BASE + 0) // ALWAYS LOGGED; NO STDERR +#define VMW_LOG_PANIC (VMW_LOG_BASE + 5) // Quietest level +#define VMW_LOG_ERROR (VMW_LOG_BASE + 10) +#define VMW_LOG_WARNING (VMW_LOG_BASE + 15) +#define VMW_LOG_NOTICE (VMW_LOG_BASE + 20) +#define VMW_LOG_INFO (VMW_LOG_BASE + 25) +#define VMW_LOG_VERBOSE (VMW_LOG_BASE + 30) +#define VMW_LOG_TRIVIA (VMW_LOG_BASE + 35) +#define VMW_LOG_DEBUG_00 (VMW_LOG_BASE + 40) // least noisy debug level #define VMW_LOG_DEBUG_01 (VMW_LOG_DEBUG_00 + 1) #define VMW_LOG_DEBUG_02 (VMW_LOG_DEBUG_00 + 2) -#define VMW_LOG_DEBUG_03 (VMW_LOG_DEBUG_00 + 3) -#define VMW_LOG_DEBUG_04 (VMW_LOG_DEBUG_00 + 4) -#define VMW_LOG_DEBUG_05 (VMW_LOG_DEBUG_00 + 5) -#define VMW_LOG_DEBUG_06 (VMW_LOG_DEBUG_00 + 6) +#define VMW_LOG_DEBUG_03 (VMW_LOG_DEBUG_00 + 3) // debug levels grow +#define VMW_LOG_DEBUG_04 (VMW_LOG_DEBUG_00 + 4) // increasingly noisy +#define VMW_LOG_DEBUG_05 (VMW_LOG_DEBUG_00 + 5) // as the debug number +#define VMW_LOG_DEBUG_06 (VMW_LOG_DEBUG_00 + 6) // increases #define VMW_LOG_DEBUG_07 (VMW_LOG_DEBUG_00 + 7) #define VMW_LOG_DEBUG_08 (VMW_LOG_DEBUG_00 + 8) #define VMW_LOG_DEBUG_09 (VMW_LOG_DEBUG_00 + 9) -#define VMW_LOG_DEBUG_10 (VMW_LOG_DEBUG_00 + 10) // lowest priority; least noisy +#define VMW_LOG_DEBUG_10 (VMW_LOG_DEBUG_00 + 10) // Noisiest level void LogV(uint32 routing, const char *fmt, @@ -68,10 +85,8 @@ /* * Handy wrapper functions. * - * Log -> VMW_LOG_INFO + * Log -> VMW_LOG_INFO * Warning -> VMW_LOG_WARNING - * - * TODO: even Log and Warning become wrapper functions around LogV. */ static INLINE void PRINTF_DECL(1, 2) @@ -111,6 +126,18 @@ static INLINE void PRINTF_DECL(1, 2) +Log_Notice(const char *fmt, + ...) +{ + va_list ap; + + va_start(ap, fmt); + LogV(VMW_LOG_NOTICE, fmt, ap); + va_end(ap); +} + + +static INLINE void PRINTF_DECL(1, 2) Log_Verbose(const char *fmt, ...) { @@ -163,7 +190,8 @@ typedef void (LogCustomMsgFunc)(int level, const char *msg); -LogOutput *Log_NewCustomOutput(LogCustomMsgFunc *msgFunc, +LogOutput *Log_NewCustomOutput(const char *instanceName, + LogCustomMsgFunc *msgFunc, int minLogLevel); Bool Log_FreeOutput(LogOutput *toOutput); @@ -185,7 +213,7 @@ * the product should have the dependency, not an underlying library. * * In complex cases, where an "InitWith" is not sufficient and Log_AddOutput - * must be used directly, the client should call Log_SetProductState, passing + * must be used directly, the client should call Log_SetProductInfo, passing * the appropriate parameters, so the log file header information will be * correct. */ @@ -195,19 +223,27 @@ const char *buildNumber, const char *compilationOption); +static INLINE void +Log_SetProductInfoSimple(void) +{ + Log_SetProductInfo(ProductState_GetName(), + ProductState_GetVersion(), + ProductState_GetBuildNumberString(), + ProductState_GetCompilationOption()); +} + + LogOutput *Log_InitWithCustomInt(struct CfgInterface *cfgIf, LogCustomMsgFunc *msgFunc, int minLogLevel); + static INLINE LogOutput * Log_InitWithCustom(struct CfgInterface *cfgIf, LogCustomMsgFunc *msgFunc, int minLogLevel) { - Log_SetProductInfo(ProductState_GetName(), - ProductState_GetVersion(), - ProductState_GetBuildNumberString(), - ProductState_GetCompilationOption()); + Log_SetProductInfoSimple(); return Log_InitWithCustomInt(cfgIf, msgFunc, minLogLevel); } @@ -223,10 +259,7 @@ struct CfgInterface *cfgIf, Bool boundNumFiles) { - Log_SetProductInfo(ProductState_GetName(), - ProductState_GetVersion(), - ProductState_GetBuildNumberString(), - ProductState_GetCompilationOption()); + Log_SetProductInfoSimple(); return Log_InitWithFileInt(appPrefix, dict, cfgIf, boundNumFiles); } @@ -239,10 +272,7 @@ Log_InitWithFileSimple(const char *fileName, const char *appPrefix) { - Log_SetProductInfo(ProductState_GetName(), - ProductState_GetVersion(), - ProductState_GetBuildNumberString(), - ProductState_GetCompilationOption()); + Log_SetProductInfoSimple(); return Log_InitWithFileSimpleInt(appPrefix, Log_CfgInterface(), fileName); } @@ -256,10 +286,7 @@ struct Dictionary *dict, struct CfgInterface *cfgIf) { - Log_SetProductInfo(ProductState_GetName(), - ProductState_GetVersion(), - ProductState_GetBuildNumberString(), - ProductState_GetCompilationOption()); + Log_SetProductInfoSimple(); return Log_InitWithSyslogInt(appPrefix, dict, cfgIf); } @@ -272,17 +299,31 @@ Log_InitWithSyslogSimple(const char *syslogID, const char *appPrefix) { - Log_SetProductInfo(ProductState_GetName(), - ProductState_GetVersion(), - ProductState_GetBuildNumberString(), - ProductState_GetCompilationOption()); + Log_SetProductInfoSimple(); return Log_InitWithSyslogSimpleInt(appPrefix, Log_CfgInterface(), syslogID); } +LogOutput *Log_InitWithStdioSimpleInt(const char *appPrefix, + struct CfgInterface *cfgIf, + const char *minLevel, + Bool withLinePrefix); + +static INLINE LogOutput * +Log_InitWithStdioSimple(const char *appPrefix, + const char *minLevel, + Bool withLinePrefix) +{ + Log_SetProductInfoSimple(); + + return Log_InitWithStdioSimpleInt(appPrefix, Log_CfgInterface(), minLevel, + withLinePrefix); +} + void Log_Exit(void); Bool Log_Outputting(void); +Bool Log_IsLevelOutputting(int level); const char *Log_GetFileName(void); const char *Log_GetOutputFileName(LogOutput *output); diff -Nru open-vm-tools-9.10.2-2822639/lib/include/loglevel_user.h open-vm-tools-10.0.0-3000743/lib/include/loglevel_user.h --- open-vm-tools-9.10.2-2822639/lib/include/loglevel_user.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/loglevel_user.h 2015-09-10 07:31:38.000000000 +0000 @@ -79,9 +79,8 @@ LOGLEVEL_VAR(vusbhid), \ LOGLEVEL_VAR(vusbtablet), \ LOGLEVEL_VAR(vusbaudio), \ + LOGLEVEL_VAR(vusbvideo),\ LOGLEVEL_VAR(hidQueue), \ - LOGLEVEL_VAR(pci_1394), \ - LOGLEVEL_VAR(1394), \ LOGLEVEL_VAR(pci_vlance), \ LOGLEVEL_VAR(pci_svga), \ LOGLEVEL_VAR(pci_e1000), \ @@ -100,8 +99,9 @@ LOGLEVEL_VAR(vcpuNUMA), \ LOGLEVEL_VAR(heci), \ LOGLEVEL_VAR(pciplugin), \ - LOGLEVEL_VAR(vmiopluginlib), \ LOGLEVEL_VAR(vsock), \ + LOGLEVEL_VAR(vrdma), \ + LOGLEVEL_VAR(nvdimm), \ \ /* user/disk */ \ LOGLEVEL_VAR(aioMgr), \ @@ -143,7 +143,11 @@ LOGLEVEL_VAR(mksGLContextMux), \ LOGLEVEL_VAR(mksGLDraw), \ LOGLEVEL_VAR(mksGLQuery), \ + LOGLEVEL_VAR(mksGLTextureView), \ LOGLEVEL_VAR(mksWinBSOD), \ + LOGLEVEL_VAR(mksDX11Renderer), \ + LOGLEVEL_VAR(mksDX11ResourceView), \ + LOGLEVEL_VAR(mksDX11ShimOps), \ LOGLEVEL_VAR(vdpPlugin), \ \ /* user/sound */ \ @@ -152,6 +156,9 @@ LOGLEVEL_VAR(pci_hdaudio), \ LOGLEVEL_VAR(hdaudio_alsa), \ \ + /* user video */ \ + LOGLEVEL_VAR(AVCapture), \ + \ /* user/disklib */ \ LOGLEVEL_VAR(disklib), \ LOGLEVEL_VAR(dmg), \ @@ -170,6 +177,7 @@ LOGLEVEL_VAR(macbw), \ LOGLEVEL_VAR(macfi), \ LOGLEVEL_VAR(vmkcfg), \ + LOGLEVEL_VAR(policy), \ LOGLEVEL_VAR(poll), \ LOGLEVEL_VAR(barrier), \ LOGLEVEL_VAR(mstat), \ @@ -231,8 +239,7 @@ LOGLEVEL_VAR(automation), \ LOGLEVEL_VAR(oemDevice), \ LOGLEVEL_VAR(cptOps), \ - LOGLEVEL_VAR(VProbeExec), \ - LOGLEVEL_VAR(VP), \ + LOGLEVEL_VAR(vprobe), \ LOGLEVEL_VAR(VProbeClient), \ LOGLEVEL_VAR(device), \ LOGLEVEL_VAR(devicePowerOn), \ @@ -266,13 +273,8 @@ LOGLEVEL_VAR(serviceImpl), /* lib/serviceImpl */ \ LOGLEVEL_VAR(serviceUser), /* lib/serviceUser */ \ LOGLEVEL_VAR(ssl), \ - LOGLEVEL_VAR(vmrc), \ LOGLEVEL_VAR(namespaceDb), \ LOGLEVEL_VAR(namespaceMgr), \ - LOGLEVEL_VAR(blobMgr), \ - LOGLEVEL_VAR(vblobbe), \ - LOGLEVEL_VAR(blobFileBE), \ - LOGLEVEL_VAR(blobPythonBE), \ LOGLEVEL_VAR(grainTrack), \ LOGLEVEL_VAR(shim3D), \ LOGLEVEL_VAR(crc32), \ @@ -283,11 +285,14 @@ LOGLEVEL_VAR(vmname), /* lib/vmname */ \ LOGLEVEL_VAR(gpumgmt), \ LOGLEVEL_VAR(unityMsg), /* mks/remote/vdpUnityVmdb */ \ + LOGLEVEL_VAR(sharedFolderMgr), /* mks/remote/vdpFolderSharedMgrVmdb */ \ LOGLEVEL_VAR(crtbora), /* apps/crtbora */ \ LOGLEVEL_VAR(mirror), \ LOGLEVEL_VAR(filtlib), \ LOGLEVEL_VAR(epd), \ + LOGLEVEL_VAR(ddecomd), \ LOGLEVEL_VAR(hostctl), \ + LOGLEVEL_VAR(pmemobj), \ /* end of list */ LOGLEVEL_EXTENSION_DECLARE(LOGLEVEL_USER); diff -Nru open-vm-tools-9.10.2-2822639/lib/include/message.h open-vm-tools-10.0.0-3000743/lib/include/message.h --- open-vm-tools-9.10.2-2822639/lib/include/message.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/message.h 2015-09-10 07:31:38.000000000 +0000 @@ -47,23 +47,32 @@ #include "vm_basic_types.h" -typedef struct Message_Channel Message_Channel; - -Message_Channel * -Message_Open(uint32 proto); // IN - -Bool -Message_Send(Message_Channel *chan, // IN/OUT - const unsigned char *buf, // IN - size_t bufSize); // IN - -Bool -Message_Receive(Message_Channel *chan, // IN/OUT - unsigned char **buf, // OUT - size_t *bufSize); // OUT - -Bool -Message_Close(Message_Channel *chan); // IN/OUT +/* The channel object */ +typedef struct Message_Channel { + /* Identifier */ + uint16 id; + + /* Reception buffer */ + /* Data */ + unsigned char *in; + /* Allocated size */ + size_t inAlloc; + Bool inPreallocated; + + /* The cookie */ + uint32 cookieHigh; + uint32 cookieLow; +} Message_Channel; + +Bool Message_OpenAllocated(uint32 proto, Message_Channel *chan, + char *receiveBuffer, size_t receiveBufferSize); +Message_Channel* Message_Open(uint32 proto); +Bool Message_Send(Message_Channel *chan, const unsigned char *buf, + size_t bufSize); +Bool Message_Receive(Message_Channel *chan, unsigned char **buf, + size_t *bufSize); +Bool Message_CloseAllocated(Message_Channel *chan); +Bool Message_Close(Message_Channel *chan); #ifdef __cplusplus } diff -Nru open-vm-tools-9.10.2-2822639/lib/include/msg.h open-vm-tools-10.0.0-3000743/lib/include/msg.h --- open-vm-tools-9.10.2-2822639/lib/include/msg.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/msg.h 2015-09-10 07:31:38.000000000 +0000 @@ -114,7 +114,7 @@ VMX86_EXTERN_DATA Msg_String const Msg_OKCancelButtons[]; VMX86_EXTERN_DATA Msg_String const Msg_RetryAbortButtons[]; -extern Msg_String const Msg_Severities[]; +VMX86_EXTERN_DATA Msg_String const Msg_Severities[]; /* diff -Nru open-vm-tools-9.10.2-2822639/lib/include/msgid_defs.h open-vm-tools-10.0.0-3000743/lib/include/msgid_defs.h --- open-vm-tools-9.10.2-2822639/lib/include/msgid_defs.h 1970-01-01 00:00:00.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/msgid_defs.h 2015-09-10 07:31:38.000000000 +0000 @@ -0,0 +1,60 @@ +/********************************************************* + * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * msgid_defs.h -- + * + * Message ID magic definitions + */ + +#ifndef _MSGID_DEFS_H_ +#define _MSGID_DEFS_H_ + +#define INCLUDE_ALLOW_USERLEVEL +#define INCLUDE_ALLOW_VMCORE +#define INCLUDE_ALLOW_VMKERNEL +#include "includeCheck.h" + + +/* + * Message ID macros + * + * Use as in + * Msg_Append(MSGID(file.openFailed) "Failed to open file %s: %s.\n" + * fileName, Msg_ErrString()) + * Msg_Append(MSGID(mks.powerOnFailed) "Power on failed.\n") + * or + * Msg_Hint(TRUE, HINT_OK, + * MSGID(mks.noDGA) "No full screen mode.\n"). + * + * Don't make MSG_MAGIC_LEN (sizeof MSG_MAGIC - 1), since + * that may cause the string to be in the object file, even + * when it's not used at run time. And we are trying + * to avoid littering the output with the magic string. + * + * -- edward + */ + +#define MSG_MAGIC "@&!*@*@" +#define MSG_MAGIC_LEN 7 +#define MSGID(id) MSG_MAGIC "(msg." #id ")" +#define MSG_BUTTON_ID "(button." +#define MSG_BUTTON_ID_LEN 8 +#define BUTTONID(id) MSG_MAGIC MSG_BUTTON_ID #id ")" + +#endif // ifndef _MSGID_DEFS_H_ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/msgidDefs.h open-vm-tools-10.0.0-3000743/lib/include/msgidDefs.h --- open-vm-tools-9.10.2-2822639/lib/include/msgidDefs.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/msgidDefs.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -/********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation version 2.1 and no later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *********************************************************/ - -/* - * msgidDefs.h -- - * - * Message ID magic definitions - */ - -#ifndef _MSGID_DEFS_H_ -#define _MSGID_DEFS_H_ - -#define INCLUDE_ALLOW_USERLEVEL -#define INCLUDE_ALLOW_VMCORE -#define INCLUDE_ALLOW_VMKERNEL -#include "includeCheck.h" - - -/* - * Message ID macros - * - * Use as in - * Msg_Append(MSGID(file.openFailed) "Failed to open file %s: %s.\n" - * fileName, Msg_ErrString()) - * Msg_Append(MSGID(mks.powerOnFailed) "Power on failed.\n") - * or - * Msg_Hint(TRUE, HINT_OK, - * MSGID(mks.noDGA) "No full screen mode.\n"). - * - * Don't make MSG_MAGIC_LEN (sizeof MSG_MAGIC - 1), since - * that may cause the string to be in the object file, even - * when it's not used at run time. And we are trying - * to avoid littering the output with the magic string. - * - * -- edward - */ - -#define MSG_MAGIC "@&!*@*@" -#define MSG_MAGIC_LEN 7 -#define MSGID(id) MSG_MAGIC "(msg." #id ")" -#define MSG_BUTTON_ID "(button." -#define MSG_BUTTON_ID_LEN 8 -#define BUTTONID(id) MSG_MAGIC MSG_BUTTON_ID #id ")" - -#endif // ifndef _MSGID_DEFS_H_ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/msgid.h open-vm-tools-10.0.0-3000743/lib/include/msgid.h --- open-vm-tools-9.10.2-2822639/lib/include/msgid.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/msgid.h 2015-09-10 07:31:38.000000000 +0000 @@ -29,7 +29,7 @@ #define INCLUDE_ALLOW_VMCORE #define INCLUDE_ALLOW_VMKERNEL #include "includeCheck.h" -#include "msgidDefs.h" +#include "msgid_defs.h" #include "vm_basic_defs.h" diff -Nru open-vm-tools-9.10.2-2822639/lib/include/mutexRankLib.h open-vm-tools-10.0.0-3000743/lib/include/mutexRankLib.h --- open-vm-tools-9.10.2-2822639/lib/include/mutexRankLib.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/mutexRankLib.h 2015-09-10 07:31:38.000000000 +0000 @@ -36,15 +36,6 @@ */ /* - * workerLib default completion lock - * - * Used for workerLib callers who don't provide their own lock. Held - * around arbitrary completion callbacks so it probably makes sense to - * be of a low rank. - */ -#define RANK_workerLibCmplLock RANK_libLockBase - -/* * hostDeviceInfo HAL lock * * Must be < vmhs locks since this is held around the RANK_vmhsHDILock @@ -76,6 +67,38 @@ #define RANK_vigorOfflineLock (RANK_libLockBase + 0x4410) /* + * filtlib (must be > vigor and < disklib and workercmlp, PR 1340298) + */ +#define RANK_filtLibPollLock (RANK_vigorOfflineLock + 1) + +/* + * filtib lock which protects a disk's allocation bitmap state. + * Must be > filtLibPollLock, as it could be acquire with the poll lock held. + * And as evidenced by PR1437159, it must also be lower than workerLibCmplLock. + */ +#define RANK_filtLibAllocBitmapLock (RANK_filtLibPollLock + 1) + +/* + * workerLib default completion lock + * + * Used for workerLib callers who don't provide their own lock. Held + * around arbitrary completion callbacks so it makes sense to be of + * a low rank. + * + * Must be > RANK_vigorOfflineLock because we may queue work in Vigor + * offline. + * + * Must be < RANK_nfcLibLock, because NFC uses AIO Generic to perform + * async writes to the virtual disk. + * + * Must be > RANK_filtLibPollLock so that filtlib timers can wait + * for queued work. + * + * Must be > RANK_filtLibAllocBitmapLock due to PR1437159. + */ +#define RANK_workerLibCmplLock (RANK_filtLibAllocBitmapLock + 1) + +/* * NFC lib lock */ #define RANK_nfcLibLock (RANK_libLockBase + 0x4505) @@ -101,6 +124,14 @@ #define RANK_vvolLibLock (RANK_libLockBase + 0x5090) /* + * Persistent-memory logical and hardware management locks + */ +/* The nvdimm layer is the hardware layer */ +#define RANK_nvdHandleLock (RANK_libLockBase + 0x5300) +/* The pmem layer is the logical layer */ +#define RANK_pmemHandleLock (RANK_libLockBase + 0x5310) + +/* * VMDB range: * (RANK_libLockBase + 0x5500, RANK_libLockBase + 0x5600) */ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/netutil.h open-vm-tools-10.0.0-3000743/lib/include/netutil.h --- open-vm-tools-9.10.2-2822639/lib/include/netutil.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/netutil.h 2015-09-10 07:31:38.000000000 +0000 @@ -117,10 +117,10 @@ * returned by said APIs. */ EXTERN NetUtilIfTableEntry netUtilIfTable[]; -# endif // ifdef DUMMY_NETUTIL int NetUtil_GetIfIndex(const char *ifName); char *NetUtil_GetIfName(int ifIndex); +# endif // ifdef DUMMY_NETUTIL #endif // if defined(linux) size_t NetUtil_GetHardwareAddress(int ifIndex, // IN diff -Nru open-vm-tools-9.10.2-2822639/lib/include/poll.h open-vm-tools-10.0.0-3000743/lib/include/poll.h --- open-vm-tools-9.10.2-2822639/lib/include/poll.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/poll.h 2015-09-10 07:31:38.000000000 +0000 @@ -317,7 +317,7 @@ #ifdef _WIN32 -void Poll_SetWindowMessageRecipient(HANDLE hWnd, UINT msg, Bool alwaysThunk); +void Poll_SetWindowMessageRecipient(HWND hWnd, UINT msg, Bool alwaysThunk); Bool Poll_FireWndCallback(void *lparam); #endif diff -Nru open-vm-tools-9.10.2-2822639/lib/include/posix.h open-vm-tools-10.0.0-3000743/lib/include/posix.h --- open-vm-tools-9.10.2-2822639/lib/include/posix.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/posix.h 2015-09-10 07:31:38.000000000 +0000 @@ -37,15 +37,25 @@ #include "codeset.h" /* - * Force all users of these wrappers to use the LFS (large file) interface - * versions of the functions wrapper therein. If we don't do this the - * wrappers may be built with the LFS versions and the callers might not - * leading to a (potentially undetected) mismatch. + * Require the _FILE_OFFSET_BITS=64 interface, where all Posix file + * structures and functions are transparently 64-bit. + * + * Some OSes (FreeBSD, OS X) natively use 64-bit file offsets and + * will never be a problem. Other OSes (Linux, Solaris) default + * to 32-bit offsets in 32-bit mode. Android ... does its own thing. + * Windows only offers the Posix APIs as 32-bit. + * + * There are two ways of getting 64-bit offsets, defined by the LFS standard: + * _LARGEFILE64_SOURCE, which defines xxx64 types and functions + * _FILE_OFFSET_BITS=64, which replaces all types and functions + * The _LARGEFILE64_SOURCE strategy was transitional (late 90s) and is now + * deprecated. All modern code should use _FILE_OFFSET_BITS=64. + * + * Instead of checking for the exact details, check for what matters + * for the purposes of this file: types (e.g. off_t) must be 64-bit. */ - -#if defined(linux) && !defined(__ANDROID__) && \ - (!defined(_LARGEFILE64_SOURCE) || _FILE_OFFSET_BITS != 64) -#error LFS support is not enabled! +#if !defined(_WIN32) && !defined(__ANDROID__) +MY_ASSERTS(_file_offset_bits64, ASSERT_ON_COMPILE(sizeof(off_t) == 8);) #endif struct stat; @@ -65,28 +75,28 @@ #endif -int Posix_Creat(ConstUnicode pathName, mode_t mode); -int Posix_Open(ConstUnicode pathName, int flags, ...); -FILE *Posix_Fopen(ConstUnicode pathName, const char *mode); -FILE *Posix_Popen(ConstUnicode pathName, const char *mode); -int Posix_Rename(ConstUnicode fromPathName, ConstUnicode toPathName); -int Posix_Rmdir(ConstUnicode pathName); -int Posix_Unlink(ConstUnicode pathName); -FILE *Posix_Freopen(ConstUnicode pathName, const char *mode, FILE *stream); -int Posix_Access(ConstUnicode pathName, int mode); -int Posix_EuidAccess(ConstUnicode pathName, int mode); -int Posix_Stat(ConstUnicode pathName, struct stat *statbuf); -int Posix_Chmod(ConstUnicode pathName, mode_t mode); -void Posix_Perror(ConstUnicode str); -int Posix_Printf(ConstUnicode format, ...); -int Posix_Fprintf(FILE *stream, ConstUnicode format, ...); - -int Posix_Mkdir(ConstUnicode pathName, mode_t mode); -int Posix_Chdir(ConstUnicode pathName); -Unicode Posix_Getenv(ConstUnicode name); -long Posix_Pathconf(ConstUnicode pathName, int name); -int Posix_Lstat(ConstUnicode pathName, struct stat *statbuf); -Unicode Posix_MkTemp(ConstUnicode pathName); +int Posix_Creat(const char *pathName, mode_t mode); +int Posix_Open(const char *pathName, int flags, ...); +FILE *Posix_Fopen(const char *pathName, const char *mode); +FILE *Posix_Popen(const char *pathName, const char *mode); +int Posix_Rename(const char *fromPathName, const char *toPathName); +int Posix_Rmdir(const char *pathName); +int Posix_Unlink(const char *pathName); +FILE *Posix_Freopen(const char *pathName, const char *mode, FILE *stream); +int Posix_Access(const char *pathName, int mode); +int Posix_EuidAccess(const char *pathName, int mode); +int Posix_Stat(const char *pathName, struct stat *statbuf); +int Posix_Chmod(const char *pathName, mode_t mode); +void Posix_Perror(const char *str); +int Posix_Printf(const char *format, ...); +int Posix_Fprintf(FILE *stream, const char *format, ...); + +int Posix_Mkdir(const char *pathName, mode_t mode); +int Posix_Chdir(const char *pathName); +char *Posix_Getenv(const char *name); +long Posix_Pathconf(const char *pathName, int name); +int Posix_Lstat(const char *pathName, struct stat *statbuf); +char *Posix_MkTemp(const char *pathName); #if !defined(_WIN32) /* @@ -101,28 +111,28 @@ #define Posix_FreeAddrInfo freeaddrinfo #define Posix_GetNameInfo getnameinfo -void *Posix_Dlopen(ConstUnicode pathName, int flags); +void *Posix_Dlopen(const char *pathName, int flags); -int Posix_Utime(ConstUnicode pathName, const struct utimbuf *times); +int Posix_Utime(const char *pathName, const struct utimbuf *times); -int Posix_Mknod(ConstUnicode pathName, mode_t mode, dev_t dev); -int Posix_Chown(ConstUnicode pathName, uid_t owner, gid_t group); -int Posix_Lchown(ConstUnicode pathName, uid_t owner, gid_t group); -int Posix_Link(ConstUnicode pathName1, ConstUnicode pathName2); -int Posix_Symlink(ConstUnicode pathName1, ConstUnicode pathName2); -int Posix_Mkfifo(ConstUnicode pathName, mode_t mode); -int Posix_Truncate(ConstUnicode pathName, off_t length); -int Posix_Utimes(ConstUnicode pathName, const struct timeval *time); -int Posix_Execl(ConstUnicode pathName, ConstUnicode arg0, ...); -int Posix_Execlp(ConstUnicode fileName, ConstUnicode arg0, ...); -int Posix_Execv(ConstUnicode pathName, Unicode const argVal[]); -int Posix_Execve(ConstUnicode pathName, Unicode const argVal[], - Unicode const envPtr[]); -int Posix_Execvp(ConstUnicode fileName, Unicode const argVal[]); -DIR *Posix_OpenDir(ConstUnicode pathName); -int Posix_System(ConstUnicode command); -int Posix_Putenv(Unicode name); -void Posix_Unsetenv(ConstUnicode name); +int Posix_Mknod(const char *pathName, mode_t mode, dev_t dev); +int Posix_Chown(const char *pathName, uid_t owner, gid_t group); +int Posix_Lchown(const char *pathName, uid_t owner, gid_t group); +int Posix_Link(const char *pathName1, const char *pathName2); +int Posix_Symlink(const char *pathName1, const char *pathName2); +int Posix_Mkfifo(const char *pathName, mode_t mode); +int Posix_Truncate(const char *pathName, off_t length); +int Posix_Utimes(const char *pathName, const struct timeval *time); +int Posix_Execl(const char *pathName, const char *arg0, ...); +int Posix_Execlp(const char *fileName, const char *arg0, ...); +int Posix_Execv(const char *pathName, char *const argVal[]); +int Posix_Execve(const char *pathName, char *const argVal[], + char *const envPtr[]); +int Posix_Execvp(const char *fileName, char *const argVal[]); +DIR *Posix_OpenDir(const char *pathName); +int Posix_System(const char *command); +int Posix_Putenv(char *name); +void Posix_Unsetenv(const char *name); /* * These functions return dynamically allocated stings that have to be @@ -130,35 +140,35 @@ * are different than their POSIX "base" functions. */ -Unicode Posix_RealPath(ConstUnicode pathName); -Unicode Posix_ReadLink(ConstUnicode pathName); +char *Posix_RealPath(const char *pathName); +char *Posix_ReadLink(const char *pathName); -struct passwd *Posix_Getpwnam(ConstUnicode name); +struct passwd *Posix_Getpwnam(const char *name); struct passwd *Posix_Getpwuid(uid_t uid); -int Posix_Setenv(ConstUnicode name, ConstUnicode value, int overWrite); +int Posix_Setenv(const char *name, const char *value, int overWrite); -int Posix_Getpwnam_r(ConstUnicode name, struct passwd *pw, +int Posix_Getpwnam_r(const char *name, struct passwd *pw, char *buf, size_t size, struct passwd **ppw); int Posix_Getpwuid_r(uid_t uid, struct passwd *pw, char *buf, size_t size, struct passwd **ppw); struct passwd *Posix_Getpwent(void); -struct group *Posix_Getgrnam(ConstUnicode name); -int Posix_Getgrnam_r(ConstUnicode name, struct group *gr, +struct group *Posix_Getgrnam(const char *name); +int Posix_Getgrnam_r(const char *name, struct group *gr, char *buf, size_t size, struct group **pgr); #if !defined(sun) -int Posix_Statfs(ConstUnicode pathName, struct statfs *statfsbuf); +int Posix_Statfs(const char *pathName, struct statfs *statfsbuf); -int Posix_GetGroupList(ConstUnicode user, gid_t group, gid_t *groups, +int Posix_GetGroupList(const char *user, gid_t group, gid_t *groups, int *ngroups); #if !defined(__APPLE__) && !defined(__FreeBSD__) -int Posix_Mount(ConstUnicode source, ConstUnicode target, +int Posix_Mount(const char *source, const char *target, const char *filesystemtype, unsigned long mountflags, const void *data); -int Posix_Umount(ConstUnicode target); -FILE *Posix_Setmntent(ConstUnicode pathName, const char *mode); +int Posix_Umount(const char *target); +FILE *Posix_Setmntent(const char *pathName, const char *mode); struct mntent *Posix_Getmntent(FILE *fp); struct mntent *Posix_Getmntent_r(FILE *fp, struct mntent *m, char *buf, int size); @@ -179,7 +189,7 @@ * Wrapper for gethostbyname(). Caller should release memory * allocated for the hostent structure returned by calling * Posix_FreeHostent(). - * + * * Results: * NULL Error * !NULL Pointer to hostent structure @@ -191,7 +201,7 @@ */ static INLINE struct hostent* -Posix_GetHostByName(ConstUnicode name) // IN +Posix_GetHostByName(const char *name) // IN { struct hostent *newhostent; int error; @@ -206,7 +216,7 @@ if ((gethostbyname_r(name, &he, buffer, sizeof buffer, #if !defined(sun) && !defined(SOLARIS) && !defined(SOL10) - &phe, + &phe, #endif &error) == 0) && phe) { @@ -227,7 +237,7 @@ for (p = phe->h_addr_list; *p; p++) { naddrs++; } - newhostent->h_addr_list = (char **)Util_SafeMalloc(naddrs * + newhostent->h_addr_list = (char **)Util_SafeMalloc(naddrs * sizeof(*(phe->h_addr_list))); for (i = 0; i < naddrs - 1; i++) { newhostent->h_addr_list[i] = (char *)Util_SafeMalloc(phe->h_length); @@ -235,7 +245,7 @@ } newhostent->h_addr_list[naddrs - 1] = NULL; return newhostent; - } + } /* There has been an error */ return NULL; } @@ -266,9 +276,9 @@ char **p; if (he) { - Unicode_Free(he->h_name); + free(he->h_name); if (he->h_aliases) { - Unicode_FreeList(he->h_aliases, -1); + Util_FreeStringList(he->h_aliases, -1); } p = he->h_addr_list; while (*p) { @@ -307,11 +317,11 @@ */ static INLINE int -Posix_GetHostName(Unicode name, // OUT +Posix_GetHostName(char *name, // OUT int namelen) // IN { char *nameMBCS = (char *)Util_SafeMalloc(namelen); - Unicode nameUTF8; + char *nameUTF8; int retval; ASSERT(name); @@ -325,11 +335,11 @@ retval = -1; WSASetLastError(WSAEFAULT); } - Unicode_Free(nameUTF8); + free(nameUTF8); } free(nameMBCS); - + return retval; } @@ -342,7 +352,7 @@ * Wrapper for gethostbyname(). Caller should release memory * allocated for the hostent structure returned by calling * Posix_FreeHostent(). - * + * * Results: * NULL Error * !NULL Pointer to hostent structure @@ -354,7 +364,7 @@ */ static INLINE struct hostent* -Posix_GetHostByName(ConstUnicode name) // IN +Posix_GetHostByName(const char *name) // IN { struct hostent *newhostent; char *nameMBCS; @@ -416,9 +426,9 @@ Posix_FreeHostent(struct hostent *he) { if (he) { - Unicode_Free(he->h_name); + free(he->h_name); if (he->h_aliases) { - Unicode_FreeList(he->h_aliases, -1); + Util_FreeStringList(he->h_aliases, -1); } free(he); } @@ -457,8 +467,8 @@ */ static INLINE int -Posix_GetAddrInfo(ConstUnicode nodename, // IN - ConstUnicode servname, // IN +Posix_GetAddrInfo(const char *nodename, // IN + const char *servname, // IN const struct addrinfo *hints, // IN struct addrinfo **res) // OUT { @@ -621,13 +631,13 @@ */ static INLINE int -Posix_GetNameInfo(const struct sockaddr *sa, // IN - socklen_t salen, // IN - Unicode host, // OUT - DWORD hostlen, // IN - Unicode serv, // OUT - DWORD servlen, // IN - int flags) // IN +Posix_GetNameInfo(const struct sockaddr *sa, // IN + socklen_t salen, // IN + char *host, // OUT + DWORD hostlen, // IN + char *serv, // OUT + DWORD servlen, // IN + int flags) // IN { HMODULE hWs2_32; int retval; @@ -635,8 +645,8 @@ char *servMBCS = NULL; utf16_t *hostW = NULL; utf16_t *servW = NULL; - Unicode hostUTF8 = NULL; - Unicode servUTF8 = NULL; + char *hostUTF8 = NULL; + char *servUTF8 = NULL; GetNameInfoWFnType GetNameInfoWFn; hWs2_32 = LoadLibraryW(L"ws2_32"); @@ -683,7 +693,7 @@ } } } - + goto exit; } } diff -Nru open-vm-tools-9.10.2-2822639/lib/include/printer.h open-vm-tools-10.0.0-3000743/lib/include/printer.h --- open-vm-tools-9.10.2-2822639/lib/include/printer.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/printer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -/********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation version 2.1 and no later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *********************************************************/ - -/* - * printer.h -- - * - * Assorted printer related functionality. - */ - -#ifndef _VM_PRINTER_H_ -#define _VM_PRINTER_H_ - -#define INCLUDE_ALLOW_USERLEVEL -#include "includeCheck.h" - -#include "vm_basic_types.h" - -char *Printer_GetDefault(void); -Bool Printer_SetDefault(char const *printerName); // IN -Bool Printer_AddConnection(char *printerName, // IN: Name of printer to add - int *sysError); // OUT: System error code (errno) -Bool Printer_Init(void); -Bool Printer_Cleanup(void); - -#endif diff -Nru open-vm-tools-9.10.2-2822639/lib/include/productState.h open-vm-tools-10.0.0-3000743/lib/include/productState.h --- open-vm-tools-9.10.2-2822639/lib/include/productState.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/productState.h 2015-09-10 07:31:38.000000000 +0000 @@ -44,13 +44,17 @@ PRODUCT_CVP = 1 << 5, PRODUCT_FUSION = 1 << 6, PRODUCT_VIEW = 1 << 7, + PRODUCT_VMRC = 1 << 8, + PRODUCT_GANTRY = 1 << 9, /* etc */ } Product; typedef uint64 ProductMask; #define PRODUCTMASK_HOSTED (PRODUCT_WORKSTATION |\ PRODUCT_PLAYER |\ PRODUCT_CVP |\ - PRODUCT_FUSION) + PRODUCT_FUSION |\ + PRODUCT_VMRC |\ + PRODUCT_GANTRY) typedef uint64 ProductCaps; /* @@ -85,6 +89,7 @@ Product ProductState_GetProduct(void); Bool ProductState_IsProduct(ProductMask product); +Bool ProductState_AllowUnlicensedVMX(void); const char *ProductState_GetName(void); const char *ProductState_GetVersion(void); unsigned int ProductState_GetBuildNumber(void); diff -Nru open-vm-tools-9.10.2-2822639/lib/include/rpcout.h open-vm-tools-10.0.0-3000743/lib/include/rpcout.h --- open-vm-tools-9.10.2-2822639/lib/include/rpcout.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/rpcout.h 2015-09-10 07:31:38.000000000 +0000 @@ -63,15 +63,25 @@ Bool RpcOut_sendOne(char **reply, size_t *repLen, char const *reqFmt, ...); /* - * A new version of the above function that works with UTF-8 strings - * and other data that would be corrupted by Win32's FormatMessage - * function (which is used by RpcOut_sendOne()). + * A version of the RpcOut_sendOne function that works with UTF-8 + * strings and other data that would be corrupted by Win32's + * FormatMessage function (which is used by RpcOut_sendOne()). */ Bool RpcOut_SendOneRaw(void *request, size_t reqLen, char **reply, size_t *repLen); +/* + * A variant of the RpcOut_SendOneRaw in which the caller supplies the + * receive buffer so as to avoid the need to call malloc internally. + * Useful in situations where calling malloc is not allowed. + */ + +Bool RpcOut_SendOneRawPreallocated(void *request, size_t reqLen, char *reply, + size_t repLen); + /* - * As the above but must be run by admin/root to make the privileged RPC call successfully. + * As the above but must be run by admin/root to make the privileged + * RPC call successfully. */ Bool RpcOut_SendOneRawPriv(void *request, size_t reqLen, char **reply, size_t *repLen); diff -Nru open-vm-tools-9.10.2-2822639/lib/include/sha1.h open-vm-tools-10.0.0-3000743/lib/include/sha1.h --- open-vm-tools-9.10.2-2822639/lib/include/sha1.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/sha1.h 2015-09-10 07:31:38.000000000 +0000 @@ -67,6 +67,22 @@ #else +#ifndef VMKERNEL + +/* + * Prevent linkage conflicts with the SHA1 APIs brought in from + * OpenSSL. (Pro tip: If you're doing anything security-related, you + * _must_ be using lib/crypto hash routines to preserve FIPS + * compatibility.) + */ + +#define SHA1Init VMW_SHA1Init +#define SHA1Update VMW_SHA1Update +#define SHA1Final VMW_SHA1Final +#define SHA1RawBufferHash VMW_SHA1RawBufferHash + +#endif /* !VMKERNEL */ + /* SHA-1 in C By Steve Reid @@ -94,20 +110,16 @@ unsigned char buffer[64]; } SHA1_CTX; -#define SHA1HANDSOFF /* Copies data before messing with it. */ - void SHA1Init(SHA1_CTX* context); -#ifdef SHA1HANDSOFF void SHA1Update(SHA1_CTX* context, const unsigned char *data, size_t len); -#else -void SHA1Update(SHA1_CTX* context, - unsigned char *data, - size_t len); -#endif void SHA1Final(unsigned char digest[SHA1_HASH_LEN], SHA1_CTX* context); +void SHA1RawBufferHash(const void *data, + uint32 size, + uint32 result[5]); + #endif // defined __APPLE__ && defined USERLEVEL #endif // ifndef _SHA1_H_ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/sigPosixRegs.h open-vm-tools-10.0.0-3000743/lib/include/sigPosixRegs.h --- open-vm-tools-9.10.2-2822639/lib/include/sigPosixRegs.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/sigPosixRegs.h 2015-09-10 07:31:38.000000000 +0000 @@ -270,6 +270,10 @@ #define SC_SP(uc) ((unsigned long) (uc)->uc_mcontext.arm_sp) #define SC_LR(uc) ((unsigned long) (uc)->uc_mcontext.arm_lr) #define SC_PC(uc) ((unsigned long) (uc)->uc_mcontext.arm_pc) +#elif defined(__aarch64__) +#define SC_X(uc,n) ((unsigned long) (uc)->uc_mcontext.regs[n]) +#define SC_SP(uc) ((unsigned long) (uc)->uc_mcontext.sp) +#define SC_PC(uc) ((unsigned long) (uc)->uc_mcontext.pc) #else #define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_EAX]) #define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_EBX]) diff -Nru open-vm-tools-9.10.2-2822639/lib/include/sslDirect.h open-vm-tools-10.0.0-3000743/lib/include/sslDirect.h --- open-vm-tools-9.10.2-2822639/lib/include/sslDirect.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/sslDirect.h 2015-09-10 07:31:38.000000000 +0000 @@ -29,7 +29,7 @@ #define INCLUDE_ALLOW_USERLEVEL #include "includeCheck.h" - +typedef struct _SSLVerifyParam SSLVerifyParam; typedef struct SSLSockStruct *SSLSock; typedef char* (SSLLibFn)(const char*, const char*); diff -Nru open-vm-tools-9.10.2-2822639/lib/include/str.h open-vm-tools-10.0.0-3000743/lib/include/str.h --- open-vm-tools-9.10.2-2822639/lib/include/str.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/str.h 2015-09-10 07:31:38.000000000 +0000 @@ -89,30 +89,53 @@ */ #ifdef HAS_BSD_PRINTF -int Str_Sprintf_C_Locale(char *buf, size_t max, - const char *fmt, ...) PRINTF_DECL(3, 4); +int Str_Sprintf_C_Locale(char *buf, // OUT: + size_t max, // IN: + const char *fmt, // IN: + ...) PRINTF_DECL(3, 4); // IN: #endif -int Str_Sprintf(char *buf, size_t max, - const char *fmt, ...) PRINTF_DECL(3, 4); -int Str_Snprintf(char *buf, size_t len, - const char *fmt, ...) PRINTF_DECL(3, 4); -int Str_Vsnprintf(char *buf, size_t len, - const char *fmt, va_list args); -size_t Str_Strlen(const char *src, size_t maxLen); -char *Str_Strnstr(const char *src, const char *sub, size_t n); -char *Str_Strcpy(char *dst, const char *src, size_t maxLen); -char *Str_Strcat(char *dst, const char *src, size_t maxLen); -char *Str_Strncat(char *buf, size_t bufSize, const char *src, size_t n); - -char *Str_Asprintf(size_t *length, - const char *format, ...) PRINTF_DECL(2, 3); -char *Str_Vasprintf(size_t *length, const char *format, - va_list arguments); -char *Str_SafeAsprintf(size_t *length, - const char *format, ...) PRINTF_DECL(2, 3); -char *Str_SafeVasprintf(size_t *length, const char *format, - va_list arguments); +int Str_Sprintf(char *buf, // OUT: + size_t max, // IN: + const char *fmt, // IN: + ...) PRINTF_DECL(3, 4); // IN: +int Str_Snprintf(char *buf, // OUT: + size_t len, // IN: + const char *fmt, // IN: + ...) PRINTF_DECL(3, 4); // IN: +int Str_Vsnprintf(char *buf, // OUT: + size_t len, // IN: + const char *fmt, // IN: + va_list args); // IN: + +size_t Str_Strlen(const char *src, // IN: + size_t maxLen); // IN: +char *Str_Strnstr(const char *src, // IN: + const char *sub, // IN: + size_t n); // IN: +char *Str_Strcpy(char *dst, // OUT: + const char *src, // IN: + size_t maxLen); // IN: +char *Str_Strcat(char *dst, // IN/OUT: + const char *src, // IN: + size_t maxLen); // IN: +char *Str_Strncat(char *buf, // IN/OUT: + size_t bufSize, // IN: + const char *src, // IN: + size_t n); // IN: + +char *Str_Asprintf(size_t *length, // OUT/OPT: + const char *format, // IN: + ...) PRINTF_DECL(2, 3); // IN: +char *Str_Vasprintf(size_t *length, // OUT/OPT: + const char *format, // IN: + va_list arguments); // IN: +char *Str_SafeAsprintf(size_t *length, // OUT/OPT: + const char *format, // IN: + ...) PRINTF_DECL(2, 3); // IN: +char *Str_SafeVasprintf(size_t *length, // OUT/OPT: + const char *format, // IN: + va_list arguments); // IN: #if defined(_WIN32) || defined(__linux__) // { @@ -129,30 +152,48 @@ * strings of "wchar_t" units, regardless of platform. */ -int Str_Swprintf(wchar_t *buf, size_t max, - const wchar_t *fmt, ...); -int Str_Snwprintf(wchar_t *buf, size_t len, - const wchar_t *fmt, ...); -int Str_Vsnwprintf(wchar_t *buf, size_t len, - const wchar_t *fmt, va_list args); -wchar_t *Str_Wcscpy(wchar_t *dst, const wchar_t *src, size_t maxLen); -wchar_t *Str_Wcscat(wchar_t *dst, const wchar_t *src, size_t maxLen); -wchar_t *Str_Wcsncat(wchar_t *buf, size_t bufSize, const wchar_t *src, - size_t n); - -wchar_t *Str_Aswprintf(size_t *length, - const wchar_t *format, ...); -wchar_t *Str_Vaswprintf(size_t *length, const wchar_t *format, - va_list arguments); -wchar_t *Str_SafeAswprintf(size_t *length, - const wchar_t *format, ...); -wchar_t *Str_SafeVaswprintf(size_t *length, const wchar_t *format, - va_list arguments); - -unsigned char *Str_Mbscpy(char *buf, const char *src, - size_t maxSize); -unsigned char *Str_Mbscat(char *buf, const char *src, - size_t maxSize); +int Str_Swprintf(wchar_t *buf, // OUT: + size_t max, // IN: + const wchar_t *fmt, // IN: + ...); +int Str_Snwprintf(wchar_t *buf, // OUT: + size_t len, // IN: + const wchar_t *fmt, // IN: + ...); +int Str_Vsnwprintf(wchar_t *buf, // OUT: + size_t len, // IN: + const wchar_t *fmt, // IN: + va_list args); +wchar_t *Str_Wcscpy(wchar_t *dst, // OUT: + const wchar_t *src, // IN: + size_t maxLen); // IN: +wchar_t *Str_Wcscat(wchar_t *dst, // IN/OUT: + const wchar_t *src, // IN: + size_t maxLen); // IN: +wchar_t *Str_Wcsncat(wchar_t *buf, // IN/OUT: + size_t bufSize, // IN: + const wchar_t *src, // IN: + size_t n); // IN: + +wchar_t *Str_Aswprintf(size_t *length, // OUT/OPT: + const wchar_t *format, // IN: + ...); // IN: +wchar_t *Str_Vaswprintf(size_t *length, // OUT/OPT: + const wchar_t *format, // IN: + va_list arguments); // IN: +wchar_t *Str_SafeAswprintf(size_t *length, // OUT/OPT: + const wchar_t *format, // IN: + ...); // IN: +wchar_t *Str_SafeVaswprintf(size_t *length, // OUT/OPT: + const wchar_t *format, // IN: + va_list arguments); // IN: + +unsigned char *Str_Mbscpy(char *buf, // OUT: + const char *src, // IN: + size_t maxSize); // IN: +unsigned char *Str_Mbscat(char *buf, // IN/OUT: + const char *src, // IN: + size_t maxSize); // IN: /* * These are handly for Windows programmers. They are like diff -Nru open-vm-tools-9.10.2-2822639/lib/include/system.h open-vm-tools-10.0.0-3000743/lib/include/system.h --- open-vm-tools-9.10.2-2822639/lib/include/system.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/system.h 2015-09-10 07:31:38.000000000 +0000 @@ -36,7 +36,7 @@ uint64 System_GetTimeMonotonic(void); uint64 System_Uptime(void); -Unicode System_GetTimeAsString(void); +char *System_GetTimeAsString(void); void System_Shutdown(Bool reboot); Bool System_GetNodeName(size_t outBufSize, char *outBuf); diff -Nru open-vm-tools-9.10.2-2822639/lib/include/unicodeBase.h open-vm-tools-10.0.0-3000743/lib/include/unicodeBase.h --- open-vm-tools-9.10.2-2822639/lib/include/unicodeBase.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/unicodeBase.h 2015-09-10 07:31:38.000000000 +0000 @@ -55,7 +55,7 @@ * * with: * - * ConstUnicode copyright = U_UNESCAPE("Copyright \\u00A9 COMPANY_NAME"); + * const char *copyright = U_UNESCAPE("Copyright \\u00A9 COMPANY_NAME"); */ #define U_UNESCAPE(x) Unicode_GetStatic(x, TRUE) @@ -79,7 +79,7 @@ * allocated. */ -Unicode Unicode_AllocWithLength(const void *buffer, +char *Unicode_AllocWithLength(const void *buffer, ssize_t lengthInBytes, StringEncoding encoding); @@ -100,7 +100,7 @@ * Results: * An allocated Unicode string containing the decoded characters * in buffer, or NULL if input is NULL. Caller must pass to - * Unicode_Free to free. + * free to free. * * Side effects: * None @@ -108,7 +108,7 @@ *----------------------------------------------------------------------------- */ -static INLINE Unicode +static INLINE char * Unicode_Alloc(const void *buffer, // IN StringEncoding encoding) // IN { @@ -128,7 +128,7 @@ * Results: * An allocated Unicode string containing the characters in * utf8String, or NULL if utf8String is NULL. Caller must pass to - * Unicode_Free to free. + * free to free. * * Side effects: * None @@ -136,7 +136,7 @@ *----------------------------------------------------------------------------- */ -static INLINE Unicode +static INLINE char * Unicode_AllocWithUTF8(const char *utf8String) // IN { return Unicode_AllocWithLength(utf8String, -1, STRING_ENCODING_UTF8); @@ -156,7 +156,7 @@ * Results: * An allocated Unicode string containing the characters in * utf16String, or NULL if utf16String is NULL. Caller must pass to - * Unicode_Free to free. + * free to free. * * Side effects: * None @@ -164,21 +164,19 @@ *----------------------------------------------------------------------------- */ -static INLINE Unicode +static INLINE char * Unicode_AllocWithUTF16(const utf16_t *utf16String) // IN { return Unicode_AllocWithLength(utf16String, -1, STRING_ENCODING_UTF16); } -Unicode Unicode_Duplicate(ConstUnicode str); -void Unicode_Free(void *str); +char *Unicode_Duplicate(const char *str); - -Unicode *Unicode_AllocList(char **srcList, ssize_t length, +char **Unicode_AllocList(char **srcList, ssize_t length, StringEncoding encoding); -char **Unicode_GetAllocList(Unicode const srcList[], ssize_t length, +char **Unicode_GetAllocList(char *const srcList[], ssize_t length, StringEncoding encoding); /* @@ -192,7 +190,7 @@ * * Results: * An allocated list (vector) of Unicode strings. - * The result must be freed with Unicode_FreeList. + * The result must be freed with Util_FreeStringList. * * Side effects: * None @@ -200,7 +198,7 @@ *----------------------------------------------------------------------------- */ -static INLINE Unicode * +static INLINE char ** Unicode_AllocListWithUTF16(utf16_t **utf16list, // IN: ssize_t length) // IN: { @@ -208,27 +206,6 @@ STRING_ENCODING_UTF16); } -void Unicode_FreeList(Unicode *list, ssize_t length); - - -/* - * Accessor for the NUL-terminated UTF-8 representation of this - * Unicode string. - * - * Memory is managed inside this string, so callers do not need to - * free. - */ -const char *Unicode_GetUTF8(ConstUnicode str); - -/* - * Convenience wrapper with a short name for this often-used function. - */ -static INLINE const char * -UTF8(ConstUnicode str) -{ - return Unicode_GetUTF8(str); -} - /* * Compute the number of bytes in a string. */ @@ -255,7 +232,7 @@ * Tests if the buffer's unicode contents can be converted to the * specified encoding. */ -Bool Unicode_CanGetBytesWithEncoding(ConstUnicode ustr, +Bool Unicode_CanGetBytesWithEncoding(const char *ustr, StringEncoding encoding); /* @@ -270,7 +247,7 @@ * Returns the length in number of native code units (UTF-8 bytes or * UTF-16 words) of the string. */ -UnicodeIndex Unicode_LengthInCodeUnits(ConstUnicode str); +UnicodeIndex Unicode_LengthInCodeUnits(const char *str); /* *----------------------------------------------------------------------------- @@ -289,14 +266,10 @@ */ static INLINE Bool -Unicode_IsEmpty(ConstUnicode str) // IN: +Unicode_IsEmpty(const char *str) // IN: { -#ifdef SUPPORT_UNICODE_OPAQUE - NOT_IMPLEMENTED(); -#else ASSERT(str != NULL); return str[0] == '\0'; -#endif } @@ -305,7 +278,7 @@ * to encode the Unicode string in the specified encoding, including * NUL termination. */ -size_t Unicode_BytesRequired(ConstUnicode str, +size_t Unicode_BytesRequired(const char *str, StringEncoding encoding); /* @@ -317,15 +290,15 @@ * the NUL termination, upon return. */ Bool Unicode_CopyBytes(void *destBuffer, - ConstUnicode srcBuffer, + const char *srcBuffer, size_t maxLengthInBytes, size_t *retLength, StringEncoding encoding); -void *Unicode_GetAllocBytes(ConstUnicode str, +void *Unicode_GetAllocBytes(const char *str, StringEncoding encoding); -void *Unicode_GetAllocBytesWithLength(ConstUnicode str, +void *Unicode_GetAllocBytesWithLength(const char *str, StringEncoding encoding, ssize_t lengthInBytes); @@ -354,7 +327,7 @@ */ static INLINE utf16_t * -Unicode_GetAllocUTF16(ConstUnicode str) // IN: +Unicode_GetAllocUTF16(const char *str) // IN: { /* Cast for compatibility with C++ compilers. */ return (utf16_t *) Unicode_GetAllocBytes(str, STRING_ENCODING_UTF16); @@ -364,21 +337,11 @@ /* * Helper function for Unicode string literal macros. */ -ConstUnicode Unicode_GetStatic(const char *asciiBytes, - Bool unescape); +const char *Unicode_GetStatic(const char *asciiBytes, + Bool unescape); /* * Helper macros for Win32 Unicode string transition. - * - * Eventually, when the Unicode type becomes opaque - * (SUPPORT_UNICODE_OPAQUE), we can store UTF-16 directly inside - * it, which is a huge optimization for Win32 programmers. - * - * At that point, UNICODE_GET_UTF16/UNICODE_RELEASE_UTF16 can become - * constant-time operations. - * - * Until then, Win32 programmers need to alloc and free the UTF-16 - * representation of the Unicode string. */ #if defined(_WIN32) #define UNICODE_GET_UTF16(s) Unicode_GetAllocUTF16(s) diff -Nru open-vm-tools-9.10.2-2822639/lib/include/unicodeICU.h open-vm-tools-10.0.0-3000743/lib/include/unicodeICU.h --- open-vm-tools-9.10.2-2822639/lib/include/unicodeICU.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/unicodeICU.h 2015-09-10 07:31:38.000000000 +0000 @@ -60,8 +60,8 @@ * the user's language and culture, collectively called the "locale". */ -int Unicode_CompareWithLocale(ConstUnicode str1, - ConstUnicode str2, +int Unicode_CompareWithLocale(const char *str1, + const char *str2, const char *locale, UnicodeCompareOption compareOption); @@ -73,11 +73,11 @@ * Changing the case of a string can change its length, so don't * assume the string is the same length after calling these functions. */ -Unicode Unicode_ToLower(ConstUnicode str, const char *locale); -Unicode Unicode_ToUpper(ConstUnicode str, const char *locale); +char *Unicode_ToLower(const char *str, const char *locale); +char *Unicode_ToUpper(const char *str, const char *locale); #ifdef HAVE_ICU_38 -Unicode Unicode_ToTitle(ConstUnicode str, const char *locale); +char *Unicode_ToTitle(const char *str, const char *locale); #endif typedef enum { @@ -89,7 +89,7 @@ * Normalizes Unicode characters composed of multiple parts into a * standard form. */ -Unicode Unicode_Normalize(ConstUnicode str, +char *Unicode_Normalize(const char *str, UnicodeNormalizationForm form); #ifdef __cplusplus diff -Nru open-vm-tools-9.10.2-2822639/lib/include/unicodeOperations.h open-vm-tools-10.0.0-3000743/lib/include/unicodeOperations.h --- open-vm-tools-9.10.2-2822639/lib/include/unicodeOperations.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/unicodeOperations.h 2015-09-10 07:31:38.000000000 +0000 @@ -60,44 +60,44 @@ * of string". */ -int Unicode_CompareRange(ConstUnicode str1, +int Unicode_CompareRange(const char *str1, UnicodeIndex str1Start, UnicodeIndex str1Length, - ConstUnicode str2, + const char *str2, UnicodeIndex str2Start, UnicodeIndex str2Length, Bool ignoreCase); -UnicodeIndex Unicode_FindSubstrInRange(ConstUnicode str, +UnicodeIndex Unicode_FindSubstrInRange(const char *str, UnicodeIndex strStart, UnicodeIndex strLength, - ConstUnicode strToFind, + const char *strToFind, UnicodeIndex strToFindStart, UnicodeIndex strToFindLength); -UnicodeIndex Unicode_FindLastSubstrInRange(ConstUnicode str, +UnicodeIndex Unicode_FindLastSubstrInRange(const char *str, UnicodeIndex strStart, UnicodeIndex strLength, - ConstUnicode strToFind, + const char *strToFind, UnicodeIndex strToFindStart, UnicodeIndex strToFindLength); -Unicode Unicode_Substr(ConstUnicode str, - UnicodeIndex start, - UnicodeIndex length); - -Unicode Unicode_ReplaceRange(ConstUnicode destination, - UnicodeIndex destinationStart, - UnicodeIndex destinationLength, - ConstUnicode source, - UnicodeIndex sourceStart, - UnicodeIndex sourceLength); +char *Unicode_Substr(const char *str, + UnicodeIndex start, + UnicodeIndex length); + +char *Unicode_ReplaceRange(const char *destination, + UnicodeIndex destinationStart, + UnicodeIndex destinationLength, + const char *source, + UnicodeIndex sourceStart, + UnicodeIndex sourceLength); -Unicode Unicode_Join(ConstUnicode first, - ...); +char *Unicode_Join(const char *first, + ...); -Unicode Unicode_Format(const char *fmt, ...); +char *Unicode_Format(const char *fmt, ...); -UnicodeIndex Unicode_LengthInCodePoints(ConstUnicode str); +UnicodeIndex Unicode_LengthInCodePoints(const char *str); /* * Simple in-line functions that may be used below. @@ -124,16 +124,12 @@ */ static INLINE Bool -Unicode_IsIndexAtCodePointBoundary(ConstUnicode str, // IN: +Unicode_IsIndexAtCodePointBoundary(const char *str, // IN: UnicodeIndex index) // IN: { ASSERT(index >= 0 && index <= Unicode_LengthInCodeUnits(str)); -#ifdef SUPPORT_UNICODE_OPAQUE - NOT_IMPLEMENTED(); -#else return (str[index] & 0xc0) != 0x80; -#endif } @@ -151,7 +147,7 @@ * followed by 'source'. * * Results: - * The newly-allocated string. Caller must free with Unicode_Free. + * The newly-allocated string. Caller must free with free. * * Side effects: * None @@ -159,9 +155,9 @@ *----------------------------------------------------------------------------- */ -static INLINE Unicode -Unicode_Append(ConstUnicode destination, // IN - ConstUnicode source) // IN +static INLINE char * +Unicode_Append(const char *destination, // IN + const char *source) // IN { return Unicode_ReplaceRange(destination, -1, @@ -181,7 +177,7 @@ * followed by the specified range of 'source'. * * Results: - * The newly-allocated string. Caller must free with Unicode_Free. + * The newly-allocated string. Caller must free with free. * * Side effects: * None @@ -189,9 +185,9 @@ *----------------------------------------------------------------------------- */ -static INLINE Unicode -Unicode_AppendRange(ConstUnicode dest, // IN: - ConstUnicode src, // IN: +static INLINE char * +Unicode_AppendRange(const char *dest, // IN: + const char *src, // IN: UnicodeIndex srcStart, // IN: UnicodeIndex srcLength) // IN: { @@ -226,8 +222,8 @@ */ static INLINE int -Unicode_Compare(ConstUnicode str1, // IN - ConstUnicode str2) // IN +Unicode_Compare(const char *str1, // IN + const char *str2) // IN { return Unicode_CompareRange(str1, 0, @@ -261,8 +257,8 @@ */ static INLINE int -Unicode_CompareIgnoreCase(ConstUnicode str1, // IN - ConstUnicode str2) // IN +Unicode_CompareIgnoreCase(const char *str1, // IN + const char *str2) // IN { return Unicode_CompareRange(str1, 0, @@ -293,8 +289,8 @@ */ static INLINE Bool -UnicodeEndsWith(ConstUnicode str, // IN: - ConstUnicode suffix, // IN: +UnicodeEndsWith(const char *str, // IN: + const char *suffix, // IN: Bool ignoreCase) // IN: { UnicodeIndex strLength = Unicode_LengthInCodePoints(str); @@ -316,16 +312,16 @@ static INLINE Bool -Unicode_EndsWith(ConstUnicode str, // IN - ConstUnicode suffix) // IN +Unicode_EndsWith(const char *str, // IN + const char *suffix) // IN { return UnicodeEndsWith(str, suffix, FALSE); } static INLINE Bool -Unicode_EndsWithIgnoreCase(ConstUnicode str, // IN - ConstUnicode suffix) // IN +Unicode_EndsWithIgnoreCase(const char *str, // IN + const char *suffix) // IN { return UnicodeEndsWith(str, suffix, TRUE); } @@ -351,8 +347,8 @@ */ static INLINE UnicodeIndex -Unicode_Find(ConstUnicode str, // IN - ConstUnicode strToFind) // IN +Unicode_Find(const char *str, // IN + const char *strToFind) // IN { return Unicode_FindSubstrInRange(str, 0, @@ -384,8 +380,8 @@ */ static INLINE UnicodeIndex -Unicode_FindFromIndex(ConstUnicode str, // IN - ConstUnicode strToFind, // IN +Unicode_FindFromIndex(const char *str, // IN + const char *strToFind, // IN UnicodeIndex fromIndex) // IN { return Unicode_FindSubstrInRange(str, @@ -418,8 +414,8 @@ */ static INLINE UnicodeIndex -Unicode_FindInRange(ConstUnicode str, // IN - ConstUnicode strToFind, // IN +Unicode_FindInRange(const char *str, // IN + const char *strToFind, // IN UnicodeIndex start, // IN UnicodeIndex length) // IN { @@ -452,8 +448,8 @@ */ static INLINE UnicodeIndex -Unicode_FindLast(ConstUnicode str, // IN - ConstUnicode strToFind) // IN +Unicode_FindLast(const char *str, // IN + const char *strToFind) // IN { return Unicode_FindLastSubstrInRange(str, 0, @@ -485,8 +481,8 @@ */ static INLINE UnicodeIndex -Unicode_FindLastFromIndex(ConstUnicode str, // IN - ConstUnicode strToFind, // IN +Unicode_FindLastFromIndex(const char *str, // IN + const char *strToFind, // IN UnicodeIndex fromIndex) // IN { return Unicode_FindLastSubstrInRange(str, @@ -519,8 +515,8 @@ */ static INLINE UnicodeIndex -Unicode_FindLastInRange(ConstUnicode str, // IN - ConstUnicode strToFind, // IN +Unicode_FindLastInRange(const char *str, // IN + const char *strToFind, // IN UnicodeIndex start, // IN UnicodeIndex length) // IN { @@ -542,7 +538,7 @@ * string 'source' inserted at the index 'destinationStart'. * * Results: - * The newly-allocated string. Caller must free with Unicode_Free. + * The newly-allocated string. Caller must free with free. * * Side effects: * None @@ -550,10 +546,10 @@ *----------------------------------------------------------------------------- */ -static INLINE Unicode -Unicode_Insert(ConstUnicode destination, // IN +static INLINE char * +Unicode_Insert(const char *destination, // IN UnicodeIndex destinationStart, // IN - ConstUnicode source) // IN + const char *source) // IN { return Unicode_ReplaceRange(destination, destinationStart, @@ -574,7 +570,7 @@ * 'destinationStart'. * * Results: - * The newly-allocated string. Caller must free with Unicode_Free. + * The newly-allocated string. Caller must free with free. * * Side effects: * None @@ -582,10 +578,10 @@ *----------------------------------------------------------------------------- */ -static INLINE Unicode -Unicode_InsertRange(ConstUnicode destination, +static INLINE char * +Unicode_InsertRange(const char *destination, UnicodeIndex destinationStart, - ConstUnicode source, + const char *source, UnicodeIndex sourceStart, UnicodeIndex sourceLength) { @@ -615,8 +611,8 @@ */ static INLINE Bool -Unicode_IsEqual(ConstUnicode str1, // IN - ConstUnicode str2) // IN +Unicode_IsEqual(const char *str1, // IN + const char *str2) // IN { return Unicode_CompareRange(str1, 0, @@ -638,7 +634,7 @@ * removed. * * Results: - * The newly-allocated string. Caller must free with Unicode_Free. + * The newly-allocated string. Caller must free with free. * * Side effects: * None @@ -646,8 +642,8 @@ *----------------------------------------------------------------------------- */ -static INLINE Unicode -Unicode_RemoveRange(ConstUnicode destination, +static INLINE char * +Unicode_RemoveRange(const char *destination, UnicodeIndex start, UnicodeIndex length) { @@ -666,7 +662,7 @@ * with 'source'. * * Results: - * The newly-allocated string. Caller must free with Unicode_Free. + * The newly-allocated string. Caller must free with free. * * Side effects: * None @@ -674,11 +670,11 @@ *----------------------------------------------------------------------------- */ -static INLINE Unicode -Unicode_Replace(ConstUnicode destination, +static INLINE char * +Unicode_Replace(const char *destination, UnicodeIndex destinationStart, UnicodeIndex destinationLength, - ConstUnicode source) + const char *source) { return Unicode_ReplaceRange(destination, destinationStart, @@ -708,9 +704,9 @@ */ static INLINE Bool -UnicodeStartsWith(ConstUnicode str, // IN: - ConstUnicode prefix, // IN: - Bool ignoreCase) // IN: +UnicodeStartsWith(const char *str, // IN: + const char *prefix, // IN: + Bool ignoreCase) // IN: { UnicodeIndex strLength = Unicode_LengthInCodePoints(str); UnicodeIndex prefixLength = Unicode_LengthInCodePoints(prefix); @@ -730,16 +726,16 @@ static INLINE Bool -Unicode_StartsWith(ConstUnicode str, // IN - ConstUnicode prefix) // IN +Unicode_StartsWith(const char *str, // IN + const char *prefix) // IN { return UnicodeStartsWith(str, prefix, FALSE); } static INLINE Bool -Unicode_StartsWithIgnoreCase(ConstUnicode str, // IN - ConstUnicode prefix) // IN +Unicode_StartsWithIgnoreCase(const char *str, // IN + const char *prefix) // IN { return UnicodeStartsWith(str, prefix, TRUE); } @@ -755,7 +751,7 @@ * * Results: * The newly-allocated truncated copy of 'str'. Caller must free - * with Unicode_Free. + * with free. * * Side effects: * None @@ -763,8 +759,8 @@ *----------------------------------------------------------------------------- */ -static INLINE Unicode -Unicode_Truncate(ConstUnicode str, // IN +static INLINE char * +Unicode_Truncate(const char *str, // IN UnicodeIndex length) // IN { return Unicode_Substr(str, 0, length); diff -Nru open-vm-tools-9.10.2-2822639/lib/include/unicodeTransforms.h open-vm-tools-10.0.0-3000743/lib/include/unicodeTransforms.h --- open-vm-tools-9.10.2-2822639/lib/include/unicodeTransforms.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/unicodeTransforms.h 2015-09-10 07:31:38.000000000 +0000 @@ -44,14 +44,14 @@ * Standardizes the case of the string by doing a locale-agnostic * uppercase operation, then a locale-agnostic lowercase operation. */ -Unicode Unicode_FoldCase(ConstUnicode str); +char *Unicode_FoldCase(const char *str); /* * Trims whitespace from either side of the string. */ -Unicode Unicode_Trim(ConstUnicode str); -Unicode Unicode_TrimLeft(ConstUnicode str); -Unicode Unicode_TrimRight(ConstUnicode str); +char *Unicode_Trim(const char *str); +char *Unicode_TrimLeft(const char *str); +char *Unicode_TrimRight(const char *str); #ifdef __cplusplus } diff -Nru open-vm-tools-9.10.2-2822639/lib/include/unicodeTypes.h open-vm-tools-10.0.0-3000743/lib/include/unicodeTypes.h --- open-vm-tools-9.10.2-2822639/lib/include/unicodeTypes.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/unicodeTypes.h 2015-09-10 07:31:38.000000000 +0000 @@ -39,31 +39,6 @@ #include "vm_basic_types.h" #include "vm_assert.h" -#if defined(SUPPORT_UNICODE_OPAQUE) - -/* - * To assist with finding code that hasn't been internationalized, we - * support building with an opaque Unicode type. This catches users - * passing a char * of unknown encoding to Unicode functions, and - * assigning a Unicode to a char *. - */ - -typedef struct UnicodeImpl UnicodeImpl; -typedef UnicodeImpl * Unicode; -typedef const UnicodeImpl * ConstUnicode; - -#else - -/* - * As a transitionary development tactic to prevent code churn while the - * Unicode libraries are being developed, we'll start with a simple - * implementation of Unicode as UTF-8 char *. - */ -typedef char * Unicode; -typedef const char * ConstUnicode; - -#endif - typedef ssize_t UnicodeIndex; /* diff -Nru open-vm-tools-9.10.2-2822639/lib/include/userlock.h open-vm-tools-10.0.0-3000743/lib/include/userlock.h --- open-vm-tools-9.10.2-2822639/lib/include/userlock.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/userlock.h 2015-09-10 07:31:38.000000000 +0000 @@ -38,6 +38,7 @@ typedef struct MXUserRankLock MXUserRankLock; typedef struct MXUserCondVar MXUserCondVar; typedef struct MXUserSemaphore MXUserSemaphore; +typedef struct MXUserEvent MXUserEvent; typedef struct MXUserBarrier MXUserBarrier; /* @@ -47,9 +48,6 @@ MXUserExclLock *MXUser_CreateExclLock(const char *name, MX_Rank rank); -MXUserExclLock *MXUser_CreateExclLockSilent(const char *name, - MX_Rank rank); - void MXUser_AcquireExclLock(MXUserExclLock *lock); Bool MXUser_TryAcquireExclLock(MXUserExclLock *lock); void MXUser_ReleaseExclLock(MXUserExclLock *lock); @@ -60,10 +58,6 @@ const char *name, MX_Rank rank); -Bool MXUser_ControlExclLock(MXUserExclLock *lock, - uint32 command, - ...); - MXUserCondVar *MXUser_CreateCondVarExclLock(MXUserExclLock *lock); void MXUser_WaitCondVarExclLock(MXUserExclLock *lock, @@ -73,6 +67,20 @@ MXUserCondVar *condVar, uint32 msecWait); +Bool MXUser_EnableStatsExclLock(MXUserExclLock *lock, + Bool trackAcquisitionTime, + Bool trackHeldTime); + +Bool MXUser_DisableStatsExclLock(MXUserExclLock *lock); + +Bool MXUser_SetContentionRatioFloorExclLock(MXUserExclLock *lock, + double ratio); + +Bool MXUser_SetContentionCountFloorExclLock(MXUserExclLock *lock, + uint64 count); + +Bool MXUser_SetContentionDurationFloorExclLock(MXUserExclLock *lock, + uint64 count); /* * Recursive lock. @@ -81,9 +89,6 @@ MXUserRecLock *MXUser_CreateRecLock(const char *name, MX_Rank rank); -MXUserRecLock *MXUser_CreateRecLockSilent(const char *name, - MX_Rank rank); - void MXUser_AcquireRecLock(MXUserRecLock *lock); Bool MXUser_TryAcquireRecLock(MXUserRecLock *lock); void MXUser_ReleaseRecLock(MXUserRecLock *lock); @@ -94,10 +99,6 @@ const char *name, MX_Rank rank); -Bool MXUser_ControlRecLock(MXUserRecLock *lock, - uint32 command, - ...); - void MXUser_DumpRecLock(MXUserRecLock *lock); MXUserCondVar *MXUser_CreateCondVarRecLock(MXUserRecLock *lock); @@ -113,6 +114,22 @@ void MXUser_DecRefRecLock(MXUserRecLock *lock); +Bool MXUser_EnableStatsRecLock(MXUserRecLock *lock, + Bool trackAcquisitionTime, + Bool trackHeldTime); + +Bool MXUser_DisableStatsRecLock(MXUserRecLock *lock); + +Bool MXUser_SetContentionRatioFloorRecLock(MXUserRecLock *lock, + double ratio); + +Bool MXUser_SetContentionCountFloorRecLock(MXUserRecLock *lock, + uint64 count); + +Bool MXUser_SetContentionDurationFloorRecLock(MXUserRecLock *lock, + uint64 count); + + /* * Read-write lock */ @@ -136,9 +153,22 @@ const char *name, MX_Rank rank); -Bool MXUser_ControlRWLock(MXUserRWLock *lock, - uint32 command, - ...); +/* + * Stateful auto-reset event + */ + +MXUserEvent *MXUser_CreateEvent(const char *name, + MX_Rank rank); + +void MXUser_SignalEvent(MXUserEvent *event); +void MXUser_WaitEvent(MXUserEvent *event); +Bool MXUser_TryWaitEvent(MXUserEvent *event); +MXSemaHandle MXUser_GetHandleForEvent(MXUserEvent *event); +void MXUser_DestroyEvent(MXUserEvent *event); + +MXUserEvent *MXUser_CreateSingletonEvent(Atomic_Ptr *eventStorage, + const char *name, + MX_Rank rank); /* * Computational barrier @@ -163,9 +193,6 @@ MXUserSemaphore *MXUser_CreateSemaphore(const char *name, MX_Rank rank); -MXUserSemaphore *MXUser_CreateSemaphoreSolent(const char *name, - MX_Rank rank); - void MXUser_DestroySemaphore(MXUserSemaphore *sema); void MXUser_UpSemaphore(MXUserSemaphore *sema); void MXUser_DownSemaphore(MXUserSemaphore *sema); @@ -203,25 +230,13 @@ void MXUser_BroadcastCondVar(MXUserCondVar *condVar); void MXUser_DestroyCondVar(MXUserCondVar *condVar); -/* - * MXUser_Control[Excl, Rec, RW] commands - */ +void MXUser_LockingTreeCollection(Bool enabled); +Bool MXUser_IsLockingTreeAvailable(void); +void MXUser_DumpLockTree(const char *fileName, + const char *timeStamp); -#define MXUSER_CONTROL_ACQUISITION_HISTO 0 // minValue, decades -#define MXUSER_CONTROL_HELD_HISTO 1 // minValue, decades -#define MXUSER_CONTROL_ENABLE_STATS 2 // no arguments +void MXUser_EmptyLockTree(void); -#define MXUSER_DEFAULT_HISTO_MIN_VALUE_NS 1000 // 1 usec -#define MXUSER_DEFAULT_HISTO_DECADES 7 // 1 usec to 10 seconds - -struct MX_MutexRec; - -#if defined(VMX86_VMX) -MXUserRecLock *MXUser_InitFromMXRec(const char *name, - struct MX_MutexRec *mutex, - MX_Rank rank, - Bool isBelowBull); -#endif #if defined(VMX86_DEBUG) && !defined(DISABLE_MXUSER_DEBUG) #define MXUSER_DEBUG // debugging "everywhere" when requested @@ -231,7 +246,6 @@ void MXUser_TryAcquireFailureControl(Bool (*func)(const char *lockName)); Bool MXUser_IsCurThreadHoldingLocks(void); #endif - void MXUser_StatisticsControl(double contentionRatioFloor, uint64 minAccessCountFloor, uint64 contentionDurationFloor); @@ -247,8 +261,11 @@ void MXUser_SetInPanic(void); Bool MXUser_InPanic(void); +struct MX_MutexRec; + MXUserRecLock *MXUser_BindMXMutexRec(struct MX_MutexRec *mutex, MX_Rank rank); + struct MX_MutexRec *MXUser_GetRecLockVmm(MXUserRecLock *lock); MX_Rank MXUser_GetRecLockRank(MXUserRecLock *lock); #endif // _USERLOCK_H_ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/util.h open-vm-tools-10.0.0-3000743/lib/include/util.h --- open-vm-tools-9.10.2-2822639/lib/include/util.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/util.h 2015-09-10 07:31:38.000000000 +0000 @@ -42,6 +42,7 @@ #include /* for definition of HANDLE */ #endif #else + #include #include #include "errno.h" #endif @@ -55,14 +56,19 @@ */ #if defined(_WIN32) typedef DWORD Util_ThreadID; +#elif defined(__linux__) || defined(__ANDROID__) + typedef pid_t Util_ThreadID; +#elif defined(__APPLE__) +# include + typedef mach_port_t Util_ThreadID; +#elif defined(__sun__) +# include + typedef thread_t Util_ThreadID; +#elif defined(__FreeBSD__) +# include + typedef pthread_t Util_ThreadID; #else - #include - #if defined(__APPLE__) || defined(__FreeBSD__) - #include - typedef pthread_t Util_ThreadID; - #else // Linux et al - typedef pid_t Util_ThreadID; - #endif +# error "Need typedef for Util_ThreadID" #endif uint32 CRC_Compute(const uint8 *buf, int len); @@ -70,7 +76,7 @@ uint32 Util_Checksum(const uint8 *buf, int len); uint32 Util_Checksumv(void *iov, int numEntries); uint32 Util_HashString(const char *str); -Unicode Util_ExpandString(ConstUnicode fileName); +char *Util_ExpandString(const char *fileName); void Util_ExitThread(int); NORETURN void Util_ExitProcessAbruptly(int); int Util_HasAdminPriv(void); @@ -145,14 +151,15 @@ * This enum defines how Util_GetOpt should handle non-option arguments: * * UTIL_NONOPT_PERMUTE: Permute argv so that all non-options are at the end. - * UTIL_NONOPT_STOP: Stop when first non-option argument is seen. + * UTIL_NONOPT_STOP: Stop when first non-option argument is seen. (This is + * the standard POSIX behavior.) * UTIL_NONOPT_ALL: Return each non-option argument as if it were * an option with character code 1. */ typedef enum { UTIL_NONOPT_PERMUTE, UTIL_NONOPT_STOP, UTIL_NONOPT_ALL } Util_NonOptMode; struct option; int Util_GetOpt(int argc, char * const *argv, const struct option *opts, - Util_NonOptMode mode); + Util_NonOptMode mode, Bool manualErrorHandling); #if defined(VMX86_STATS) @@ -167,7 +174,7 @@ #define UTIL_FASTRAND_SEED_MAX (0x7fffffff) Bool Util_Throttle(uint32 count); uint32 Util_FastRand(uint32 seed); - +uint64 Util_CheckSum64(uint32 *data, unsigned numWords); // Not thread safe! void Util_OverrideHomeDir(const char *path); @@ -480,7 +487,7 @@ */ static INLINE void -Util_ZeroString(char *str) // IN/OUT +Util_ZeroString(char *str) // IN/OUT/OPT { if (str != NULL) { Util_Zero(str, strlen(str)); @@ -507,7 +514,7 @@ */ static INLINE void -Util_ZeroFree(void *buf, // OUT +Util_ZeroFree(void *buf, // OUT/OPT size_t bufSize) // IN { if (buf != NULL) { @@ -535,7 +542,7 @@ */ static INLINE void -Util_ZeroFreeString(char *str) // IN +Util_ZeroFreeString(char *str) // IN/OUT/OPT { if (str != NULL) { Util_ZeroString(str); @@ -563,7 +570,7 @@ */ static INLINE void -Util_ZeroFreeStringW(wchar_t *str) // IN +Util_ZeroFreeStringW(wchar_t *str) // IN/OUT/OPT { if (str != NULL) { Util_Zero(str, wcslen(str) * sizeof *str); @@ -597,7 +604,7 @@ */ static INLINE void -Util_FreeList(void **list, // IN/OUT: the list to free +Util_FreeList(void **list, // IN/OUT/OPT: the list to free ssize_t length) // IN: the length { if (list == NULL) { @@ -624,37 +631,13 @@ } static INLINE void -Util_FreeStringList(char **list, // IN/OUT: the list to free +Util_FreeStringList(char **list, // IN/OUT/OPT: the list to free ssize_t length) // IN: the length { Util_FreeList((void **) list, length); } #endif -#ifndef _WIN32 -/* - *----------------------------------------------------------------------------- - * - * Util_IsFileDescriptorOpen -- - * - * Check if given file descriptor is open. - * - * Results: - * TRUE if fd is open. - * - * Side effects: - * Clobbers errno. - * - *----------------------------------------------------------------------------- - */ - -static INLINE Bool -Util_IsFileDescriptorOpen(int fd) // IN -{ - return (lseek(fd, 0L, SEEK_CUR) == -1) ? errno != EBADF : TRUE; -} -#endif /* !_WIN32 */ - /* *----------------------------------------------------------------------------- @@ -675,7 +658,9 @@ */ static INLINE void * -Util_Memcpy32(void *dst, const void *src, size_t nbytes) +Util_Memcpy32(void *dst, + const void *src, + size_t nbytes) { ASSERT((nbytes % 4) == 0); #if defined __GNUC__ && (defined(__i386__) || defined(__x86_64__)) diff -Nru open-vm-tools-9.10.2-2822639/lib/include/util_shared.h open-vm-tools-10.0.0-3000743/lib/include/util_shared.h --- open-vm-tools-9.10.2-2822639/lib/include/util_shared.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/util_shared.h 2015-09-10 07:31:38.000000000 +0000 @@ -94,6 +94,38 @@ } +/* + *---------------------------------------------------------------------- + * Util_Checksum64 -- + * 64-bit implementation of Fletcher's checksum. Fast and simple. + * Guarantees a non-zero checksum (so 0 can mean "uninitialized"). + * One known weakness is that the 32-bit value of 0 is + * indistinguishable from ~0. The magic number 92680 was computed + * to be the most iterations before sum2 could overflow 64 bits. + *---------------------------------------------------------------------- + */ +uint64 +Util_CheckSum64(uint32 *data, unsigned numWords) +{ + uint64 sum1 = 0xffffffff, sum2 = 0xffffffff; + + while (numWords > 0) { + unsigned tlen = numWords > 92680 ? 92680 : numWords; + numWords -= tlen; + do { + sum1 += *data++; + sum2 += sum1; + } while (--tlen > 0); + sum1 = (sum1 & 0xffffffff) + (sum1 >> 32); + sum2 = (sum2 & 0xffffffff) + (sum2 >> 32); + } + /* Second reduction step to reduce sums to 32 bits */ + sum1 = (sum1 & 0xffffffff) + (sum1 >> 32); + sum2 = (sum2 & 0xffffffff) + (sum2 >> 32); + return (sum2 << 32) | sum1; +} + + #if defined(USERLEVEL) || defined(VMX86_DEBUG) static uint32 crcTable[256]; diff -Nru open-vm-tools-9.10.2-2822639/lib/include/uuid.h open-vm-tools-10.0.0-3000743/lib/include/uuid.h --- open-vm-tools-9.10.2-2822639/lib/include/uuid.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/uuid.h 2015-09-10 07:31:38.000000000 +0000 @@ -25,6 +25,10 @@ #ifndef _UUID_H_ #define _UUID_H_ +#ifdef __cplusplus +extern "C"{ +#endif + #define INCLUDE_ALLOW_USERLEVEL #define INCLUDE_ALLOW_VMCORE #include "includeCheck.h" @@ -41,9 +45,7 @@ UUID_UNKNOWN } UUIDStyle; -Bool UUID_ConvertToBin(uint8 dest_id[UUID_SIZE], const char *text); -char *UUID_ConvertToText(const uint8 id[UUID_SIZE]); - +/* Scheme control */ #define UUID_CREATE_WS4 0 /* the "original", WS4 and earlier scheme */ #define UUID_CREATE_WS5 1 /* the WS5 scheme */ #define UUID_CREATE_WS6 2 /* the WS6 scheme - "native" path */ @@ -53,11 +55,93 @@ #define UUID_CREATE_WS65 4 /* the WS65 scheme - UTF-8 path */ #define UUID_CREATE_CURRENT 4 /* the current scheme - always the latest */ -char *UUID_Create(const char *configFileFullPath, int schemeControl); +/* + * An RFC 4122-compliant UUID. + * + * See RFC 4122 section 4.1.2 (Layout and Byte Order). All multi-byte types are + * stored in big-endian (most significant byte first) order. + * + * The UUID packed text string + * 00112233-4455-6677-8899-AABBCCDDEEFF + * represents + * timeLow = 0x00112233 + * timeMid = 0x4455 + * timeHiAndVersion = 0x6677 + * clockSeqHiAndReserved = 0x88 + * clockSeqLow = 0x99 + * node[0] = 0xAA + * node[1] = 0xBB + * node[2] = 0xCC + * node[3] = 0xDD + * node[4] = 0xEE + * node[5] = 0xFF + * and the structure is stored as the sequence of bytes + * 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF + */ + +typedef +#include "vmware_pack_begin.h" +struct { + uint32 timeLow; + uint16 timeMid; + uint16 timeHiAndVersion; + uint8 clockSeqHiAndReserved; + uint8 clockSeqLow; + uint8 node[6]; +} +#include "vmware_pack_end.h" +UUIDRFC4122; + + +/* + * An EFI/UEFI/Microsoft-compliant GUID. + * + * See MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c::StrToGuid(), + * BaseTools/Source/C/Common/ParseInf.c::StringToGuid(), + * http://en.wikipedia.org/wiki/GUID . All multi-byte types are stored in CPU + * (a.k.a. native) byte order. + * + * The GUID packed text string + * 00112233-4455-6677-8899-AABBCCDDEEFF + * represents + * data1 = 0x00112233 + * data2 = 0x4455 + * data3 = 0x6677 + * data4[0] = 0x88 + * data4[1] = 0x99 + * data4[2] = 0xAA + * data4[3] = 0xBB + * data4[4] = 0xCC + * data4[5] = 0xDD + * data4[6] = 0xEE + * data4[7] = 0xFF + * and the structure is stored as the sequence of bytes + * big-endian CPU: 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF + * little-endian CPU: 33 22 11 00 55 44 77 66 88 99 AA BB CC DD EE FF + */ + +typedef +#include "vmware_pack_begin.h" +struct { + uint32 data1; + uint16 data2; + uint16 data3; + uint8 data4[8]; +} +#include "vmware_pack_end.h" +EFIGUID; + + +Bool UUID_ConvertToBin(uint8 dest_id[UUID_SIZE], const char *text); +char *UUID_ConvertToText(const uint8 id[UUID_SIZE]); + +char *UUID_Create(const char *configFileFullPath, int schemeControl); char *UUID_CreateRandom(void); -char *UUID_CreateRandomRFC4122V4(void); +void UUID_CreateRandomRFC4122V4(UUIDRFC4122 *id); +void UUID_CreateRandomEFI(EFIGUID *id); char *UUID_CreateRandomVpxStyle(uint8 vpxdId, UUIDStyle); + Bool UUID_IsUUIDGeneratedByThatVpxd(const uint8 *id, int vpxdInstanceId); char *UUID_PackText(const char *text, char *pack, int packLen); char *UUID_ProperHostUUID(void); @@ -65,4 +149,9 @@ UUIDStyle UUID_GetStyle(const uint8 *id); /* like UUID_GetHostUUID, except gets actual host UUID */ char *UUID_GetRealHostUUID(void); + +#ifdef __cplusplus +} // extern "C" { +#endif + #endif diff -Nru open-vm-tools-9.10.2-2822639/lib/include/vixCommands.h open-vm-tools-10.0.0-3000743/lib/include/vixCommands.h --- open-vm-tools-9.10.2-2822639/lib/include/vixCommands.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/vixCommands.h 2015-09-10 07:31:38.000000000 +0000 @@ -1122,24 +1122,13 @@ */ typedef #include "vmware_pack_begin.h" -struct VixMsgVMSnapshotLoggingRequest { +struct VixMsgVMSnapshotPauseRequest { VixCommandRequestHeader header; int32 options; } #include "vmware_pack_end.h" -VixMsgVMSnapshotLoggingRequest; - -typedef -#include "vmware_pack_begin.h" -struct VixMsgRecordReplayEvent { - VixMsgEventHeader eventHeader; - - int32 newRecordState; - int32 reason; -} -#include "vmware_pack_end.h" -VixMsgRecordReplayEvent; +VixMsgVMSnapshotPauseRequest; typedef #include "vmware_pack_begin.h" @@ -1455,46 +1444,6 @@ } #include "vmware_pack_end.h" VixMsgConnectDeviceRequest; -/* - * ********************************************************** - * Get the list of VProbes exported by a given VM. The request is - * parameterless, and so generic. - */ -typedef -#include "vmware_pack_begin.h" -struct VixMsgGetVProbesResponse { - VixCommandResponseHeader header; - int32 numEntries; -} -#include "vmware_pack_end.h" -VixMsgGetVProbesResponse; - -/* - * ********************************************************** - * Load a vprobe script into a given VM. The request is a string - * to be loaded. The response is a collection of warning and error - * strings; zero errors indicates success. - */ -typedef -#include "vmware_pack_begin.h" -struct VixMsgVProbeLoadRequest { - VixCommandRequestHeader header; - char string[1]; /* variable length */ -} -#include "vmware_pack_end.h" -VixMsgVProbeLoadRequest; - -typedef -#include "vmware_pack_begin.h" -struct VixMsgVProbeLoadResponse { - VixCommandResponseHeader header; - uint32 numWarnings; - uint32 numErrors; - uint32 instanceID; - char warningsAndErrors[1]; /* variable length */ -} -#include "vmware_pack_end.h" -VixMsgVProbeLoadResponse; /* * ********************************************************** @@ -2265,19 +2214,19 @@ VIX_COMMAND_MOUNT_HGFS_FOLDERS = 101, VIX_COMMAND_HOT_EXTEND_DISK = 102, - VIX_COMMAND_GET_VPROBES_VERSION = 104, - VIX_COMMAND_GET_VPROBES = 105, - VIX_COMMAND_VPROBE_GET_GLOBALS = 106, - VIX_COMMAND_VPROBE_LOAD = 107, - VIX_COMMAND_VPROBE_RESET = 108, + /* DEPRECATED VIX_COMMAND_GET_VPROBES_VERSION = 104, */ + /* DEPRECATED VIX_COMMAND_GET_VPROBES = 105, */ + /* DEPRECATED VIX_COMMAND_VPROBE_GET_GLOBALS = 106, */ + /* DEPRECATED VIX_COMMAND_VPROBE_LOAD = 107, */ + /* DEPRECATED VIX_COMMAND_VPROBE_RESET = 108, */ /* DEPRECATED VIX_COMMAND_LIST_USB_DEVICES = 109, */ VIX_COMMAND_CONNECT_HOST = 110, VIX_COMMAND_CREATE_LINKED_CLONE = 112, - VIX_COMMAND_STOP_SNAPSHOT_LOG_RECORDING = 113, - VIX_COMMAND_STOP_SNAPSHOT_LOG_PLAYBACK = 114, + /* DEPRECATED VIX_COMMAND_STOP_SNAPSHOT_LOG_RECORDING = 113, */ + /* DEPRECATED VIX_COMMAND_STOP_SNAPSHOT_LOG_PLAYBACK = 114, */ VIX_COMMAND_SAMPLE_COMMAND = 115, @@ -2316,16 +2265,16 @@ VIX_COMMAND_HOT_ADD_DEVICE = 138, VIX_COMMAND_HOT_REMOVE_DEVICE = 139, - VIX_COMMAND_DEBUGGER_ATTACH = 140, - VIX_COMMAND_DEBUGGER_DETACH = 141, - VIX_COMMAND_DEBUGGER_SEND_COMMAND = 142, + /* DEPRECATED VIX_COMMAND_DEBUGGER_ATTACH = 140, */ + /* DEPRECATED VIX_COMMAND_DEBUGGER_DETACH = 141, */ + /* DEPRECATED VIX_COMMAND_DEBUGGER_SEND_COMMAND = 142, */ /* DEPRECATED VIX_COMMAND_GET_RECORD_STATE = 143, */ /* DEPRECATED VIX_COMMAND_SET_RECORD_STATE = 144, */ - /* DEPRECATEDVIX_COMMAND_REMOVE_RECORD_STATE = 145, */ - /* VIX_COMMAND_GET_REPLAY_STATE = 146, */ - /* VIX_COMMAND_SET_REPLAY_STATE = 147, */ - /* VIX_COMMAND_REMOVE_REPLAY_STATE = 148, */ + /* DEPRECATED VIX_COMMAND_REMOVE_RECORD_STATE = 145, */ + /* DEPRECATED VIX_COMMAND_GET_REPLAY_STATE = 146, */ + /* DEPRECATED VIX_COMMAND_SET_REPLAY_STATE = 147, */ + /* DEPRECATED VIX_COMMAND_REMOVE_REPLAY_STATE = 148, */ /* DEPRECATED VIX_COMMAND_CANCEL_USER_PROGRESS_MESSAGE = 150, */ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/vix.h open-vm-tools-10.0.0-3000743/lib/include/vix.h --- open-vm-tools-9.10.2-2822639/lib/include/vix.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/vix.h 2015-09-10 07:31:38.000000000 +0000 @@ -220,7 +220,7 @@ VIX_E_SNAPSHOT_MAXSNAPSHOTS = 13019, VIX_E_SNAPSHOT_MIN_FREE_SPACE = 13020, VIX_E_SNAPSHOT_HIERARCHY_TOODEEP = 13021, - VIX_E_SNAPSHOT_RRSUSPEND = 13022, + // DEPRECRATED VIX_E_SNAPSHOT_RRSUSPEND = 13022, VIX_E_SNAPSHOT_NOT_REVERTABLE = 13024, /* Host Errors */ @@ -318,7 +318,7 @@ VIX_E_TOOLS_INSTALL_INIT_FAILED = 21005, VIX_E_TOOLS_INSTALL_AUTO_NOT_SUPPORTED = 21006, VIX_E_TOOLS_INSTALL_GUEST_NOT_READY = 21007, - VIX_E_TOOLS_INSTALL_SIG_CHECK_FAILED = 21008, + /* VIX_E_TOOLS_INSTALL_SIG_CHECK_FAILED = 21008, Removed in version 1.15.0 */ VIX_E_TOOLS_INSTALL_ERROR = 21009, VIX_E_TOOLS_INSTALL_ALREADY_UP_TO_DATE = 21010, VIX_E_TOOLS_INSTALL_IN_PROGRESS = 21011, @@ -817,39 +817,6 @@ //#define VIX_ADMINISTRATOR_USER_NAME "__VMware_Vix_Guest_User_Admin__" //#define VIX_CONSOLE_USER_NAME "__VMware_Vix_Guest_Console_User__" - -/* - * Following functions were removed in version 1.11. - * - VixHandle VixVM_BeginRecording(VixHandle vmHandle, - const char *displayName, - const char *description, - int options, - VixHandle propertyList, - VixEventProc *callbackProc, - void *clientData); - - VixHandle VixVM_EndRecording(VixHandle vmHandle, - int options, - VixHandle propertyList, - VixEventProc *callbackProc, - void *clientData); - - VixHandle VixVM_BeginReplay(VixHandle vmHandle, - VixHandle snapshotHandle, - int options, - VixHandle propertyList, - VixEventProc *callbackProc, - void *clientData); - - VixHandle VixVM_EndReplay(VixHandle vmHandle, - int options, - VixHandle propertyList, - VixEventProc *callbackProc, - void *clientData); - - */ - /* * Guest operations */ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/vm_assert.h open-vm-tools-10.0.0-3000743/lib/include/vm_assert.h --- open-vm-tools-9.10.2-2822639/lib/include/vm_assert.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/vm_assert.h 2015-09-10 07:31:38.000000000 +0000 @@ -103,10 +103,8 @@ #if !defined VMM || defined MONITOR_APP // { -#if defined VMKPANIC - +#if defined (VMKPANIC) #include "vmk_assert.h" - #else /* !VMKPANIC */ #define _ASSERT_PANIC(name) \ Panic(_##name##Fmt "\n", __FILE__, __LINE__) @@ -335,12 +333,19 @@ * generate a warning. */ +#if defined(_Static_assert) || defined(__cplusplus) || \ + !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) #define ASSERT_ON_COMPILE(e) \ do { \ enum { AssertOnCompileMisused = ((e) ? 1 : -1) }; \ UNUSED_TYPE(typedef char AssertOnCompileFailed[AssertOnCompileMisused]); \ } while (0) - +#else +#define ASSERT_ON_COMPILE(e) \ + do { \ + _Static_assert(e, #e); \ + } while (0); +#endif /* * To put an ASSERT_ON_COMPILE() outside a function, wrap it diff -Nru open-vm-tools-9.10.2-2822639/lib/include/vm_atomic.h open-vm-tools-10.0.0-3000743/lib/include/vm_atomic.h --- open-vm-tools-9.10.2-2822639/lib/include/vm_atomic.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/vm_atomic.h 2015-09-10 07:31:38.000000000 +0000 @@ -22,16 +22,10 @@ * Atomic power * * Note: Only partially tested on ARM processors: Works for View Open - * Client, which shouldn't have threads. + * Client, which shouldn't have threads, and ARMv8 processors. * * In ARM, GCC intrinsics (__sync*) compile but might not - * work, while MS intrinsics (_Interlocked*) do not compile, - * and ARM has no equivalent to the "lock" instruction prior to - * ARMv6; the current ARM target is ARMv5. According to glibc - * documentation, ARMv5 cannot have atomic code in user space. - * Instead a Linux system call to kernel code referenced in - * entry-armv.S is used to achieve atomic functions. See bug - * 478054 for details. + * work, while MS intrinsics (_Interlocked*) do not compile. */ #ifndef _ATOMIC_H_ @@ -49,9 +43,198 @@ #include "includeCheck.h" #include "vm_basic_types.h" +#include "vm_assert.h" +/* + * In the Atomic_* definitions below, memory ordering and atomicity are somewhat + * conflated in an inconsistent manner. First, we have Atomic_{Read,Write}, + * which only guarantees single copy atomicity, i.e. that the read/write occurs + * in an atomic fashion, but have no implication on memory ordering. The second + * class of Atomics are all the non-unfenced operations excluding + * Atomic_{Read,Write}*, which both imply atomicity and act as a memory barrier, + * implying sequentially consistent ordering of the atomic operation with all + * loads/stores prior to and after it. + * + * Since on x86, the second class of operations are associated with LOCK + * semantics, assumptions have been made about the ordering these operations + * imply on surrounding code (see for example the vmkernel's RefCount + * implementation). As a result, on arm64 we have to provide these same + * guarantees. We do this by making use of DMB barriers both before and after + * the atomic ldrx/strx sequences. A barrier before and after is required to + * avoid having part of the atomic operation reordered with surrounding code, + * e.g. a store-load reordering of the strx with a following load outside the + * Atomic_ op. For the first class of operations, Atomic_{Read,Write}, we do not + * implement a barrier. + * + * This implementation of Atomic operations is suboptimal on arm64, since + * both atomicity and memory ordering are fused together. Ideally the Atomic + * operations would only imply atomicity, and an explicit memory barrier in the + * surrounding code used to enforce ordering where necessary. This would eschew + * the need for the DMBs. A middle ground can be implemented where we use the + * arm64 load-acquire/store-release exclusive instructions to implement Atomics. + * This would imply sequential consistency of the Atomic operations (but not + * with any of the surrounding non-atomic operations) without the need for a + * DMB. Using these without a DMB today can still result in problematic + * reordering by the processor with surrounding non-atomic operations, e.g. a + * store-load reordering with a stlxr. Future optimization for arm64 should + * consider the wider change required at the call sites to minimize DMBs. + * + * For further details on x86 and ARM memory ordering see + * https://wiki.eng.vmware.com/ARM/MemoryOrdering. + */ + +#ifdef VM_ARM_64 +#include "vm_basic_asm_arm64.h" + +#define ARM_64_ATOMIC_16_OPV_PRIVATE(atm,modval,op) ({ \ + uint32 _failed; \ + uint16 _sample; \ + __asm__ __volatile__ ( \ + "1: ldxrh %w0, [%2] \n\t" \ + #op " %w0, %w0, %w3 \n\t" \ + " stxrh %w1, %w0, [%2] \n\t" \ + " cbnz %w1, 1b \n\t" \ + : "=&r" (_sample), \ + "=&r" (_failed) \ + : "r" (atm), \ + "r" (modval) \ + : "memory"); \ +}) + +#define ARM_64_ATOMIC_16_OPO_PRIVATE(atm,modval,op) ({ \ + uint32 _failed; \ + uint16 _newval; \ + uint16 _oldval; \ + __asm__ __volatile__ ( \ + "1: ldxrh %w0, [%3] \n\t" \ + #op " %w1, %w0, %w4 \n\t" \ + " stxrh %w2, %w1, [%3] \n\t" \ + " cbnz %w2, 1b \n\t" \ + : "=&r" (_oldval), \ + "=&r" (_newval), \ + "=&r" (_failed) \ + : "r" (atm), \ + "r" (modval) \ + : "memory"); \ + _oldval; \ +}) + +#define ARM_64_ATOMIC_32_OPV_PRIVATE(atm,modval,op) ({ \ + uint32 _failed; \ + uint32 _sample; \ + __asm__ __volatile__ ( \ + "1: ldxr %w0, [%2] \n\t" \ + #op " %w0, %w0, %w3 \n\t" \ + " stxr %w1, %w0, [%2] \n\t" \ + " cbnz %w1, 1b \n\t" \ + : "=&r" (_sample), \ + "=&r" (_failed) \ + : "r" (atm), \ + "r" (modval) \ + : "memory"); \ +}) + +#define ARM_64_ATOMIC_32_OPO_PRIVATE(atm,modval,op) ({ \ + uint32 _failed; \ + uint32 _newval; \ + uint32 _oldval; \ + __asm__ __volatile__ ( \ + "1: ldxr %w0, [%3] \n\t" \ + #op " %w1, %w0, %w4 \n\t" \ + " stxr %w2, %w1, [%3] \n\t" \ + " cbnz %w2, 1b \n\t" \ + : "=&r" (_oldval), \ + "=&r" (_newval), \ + "=&r" (_failed) \ + : "r" (atm), \ + "r" (modval) \ + : "memory"); \ + _oldval; \ +}) + +#define ARM_64_ATOMIC_64_OPV_PRIVATE(atm,modval,op) ({ \ + uint32 _failed; \ + uint64 _sample; \ + __asm__ __volatile__ ( \ + "1: ldxr %x0, [%2] \n\t" \ + #op " %x0, %x0, %x3 \n\t" \ + " stxr %w1, %x0, [%2] \n\t" \ + " cbnz %w1, 1b \n\t" \ + : "=&r" (_sample), \ + "=&r" (_failed) \ + : "r" (atm), \ + "r" (modval) \ + : "memory"); \ +}) + +#define ARM_64_ATOMIC_64_OPO_PRIVATE(atm,modval,op) ({ \ + uint32 _failed; \ + uint64 _newval; \ + uint64 _oldval; \ + __asm__ __volatile__ ( \ + "1: ldxr %x0, [%3] \n\t" \ + #op " %x1, %x0, %x4 \n\t" \ + " stxr %w2, %x1, [%3] \n\t" \ + " cbnz %w2, 1b \n\t" \ + : "=&r" (_oldval), \ + "=&r" (_newval), \ + "=&r" (_failed) \ + : "r" (atm), \ + "r" (modval) \ + : "memory"); \ + _oldval; \ +}) + +#define ARM_64_ATOMIC_16_OPV_PRIVATE_FENCED(atm,modval,op) ({ \ + DMB(); \ + ARM_64_ATOMIC_16_OPV_PRIVATE(atm,modval,op); \ + DMB(); \ +}) + +#define ARM_64_ATOMIC_16_OPO_PRIVATE_FENCED(atm,modval,op) ({ \ + uint16 _oldval_fenced; \ + DMB(); \ + _oldval_fenced = ARM_64_ATOMIC_16_OPO_PRIVATE(atm,modval,op); \ + DMB(); \ + _oldval_fenced; \ +}) + +#define ARM_64_ATOMIC_32_OPV_PRIVATE_FENCED(atm,modval,op) ({ \ + DMB(); \ + ARM_64_ATOMIC_32_OPV_PRIVATE(atm,modval,op); \ + DMB(); \ +}) + +#define ARM_64_ATOMIC_32_OPO_PRIVATE_FENCED(atm,modval,op) ({ \ + uint32 _oldval_fenced; \ + DMB(); \ + _oldval_fenced = ARM_64_ATOMIC_32_OPO_PRIVATE(atm,modval,op); \ + DMB(); \ + _oldval_fenced; \ +}) + +#define ARM_64_ATOMIC_64_OPV_PRIVATE_FENCED(atm,modval,op) ({ \ + DMB(); \ + ARM_64_ATOMIC_64_OPV_PRIVATE(atm,modval,op); \ + DMB(); \ +}) + +#define ARM_64_ATOMIC_64_OPO_PRIVATE_FENCED(atm,modval,op) ({ \ + uint64 _oldval_fenced; \ + DMB(); \ + _oldval_fenced = ARM_64_ATOMIC_64_OPO_PRIVATE(atm,modval,op); \ + DMB(); \ + _oldval_fenced; \ +}) + +#endif /* VM_ARM_64 */ + + +/* Basic atomic types: 16, 32 and 64 bits */ +typedef struct Atomic_uint16 { + volatile uint16 value; +} Atomic_uint16 ALIGNED(2); -/* Basic atomic types: 32 and 64 bits */ typedef struct Atomic_uint32 { volatile uint32 value; } Atomic_uint32 ALIGNED(4); @@ -63,13 +246,13 @@ /* * Prototypes for msft atomics. These are defined & inlined by the * compiler so no function definition is needed. The prototypes are - * needed for c++. Since amd64 compiler doesn't support inline asm we + * needed for C++. Since amd64 compiler doesn't support inline asm we * have to use these. Unfortunately, we still have to use some inline asm * for the 32 bit code since the and/or/xor implementations didn't show up - * untill xp or 2k3. + * until XP or 2k3. * * The declarations for the intrinsic functions were taken from ntddk.h - * in the DDK. The declarations must match otherwise the 64-bit c++ + * in the DDK. The declarations must match otherwise the 64-bit C++ * compiler will complain about second linkage of the intrinsic functions. * We define the intrinsic using the basic types corresponding to the * Windows typedefs. This avoids having to include windows header files @@ -89,6 +272,12 @@ #pragma intrinsic(_InterlockedExchangeAdd, _InterlockedDecrement) #pragma intrinsic(_InterlockedIncrement, _ReadWriteBarrier) +# if _MSC_VER >= 1600 +char _InterlockedExchange8(char volatile *, char); +char _InterlockedCompareExchange8(char volatile *, char, char); +#pragma intrinsic(_InterlockedCompareExchange8, _InterlockedCompareExchange8) +#endif + #if defined(VM_X86_64) long _InterlockedAnd(long volatile*, long); __int64 _InterlockedAnd64(__int64 volatile*, __int64); @@ -146,14 +335,14 @@ /* Convert a volatile uint32 to Atomic_uint32. */ static INLINE Atomic_uint32 * -Atomic_VolatileToAtomic(volatile uint32 *var) +Atomic_VolatileToAtomic(volatile uint32 *var) // IN: { return (Atomic_uint32 *)var; } /* Convert a volatile uint64 to Atomic_uint64. */ static INLINE Atomic_uint64 * -Atomic_VolatileToAtomic64(volatile uint64 *var) +Atomic_VolatileToAtomic64(volatile uint64 *var) // IN: { return (Atomic_uint64 *)var; } @@ -212,7 +401,12 @@ * dynamically enable the errata work-around. With vSphere 2017, * this will no longer be required as the oldest version of ESX that * VC 2017 will support is ESX 2014 (which won't run on Rev F). + * + * Modules may explicitly define MAY_NEED_AMD_REVF_WORKAROUND as 0 prior to + * inclusion of vm_atomic.h when they are safe on AMD Rev F with the elided + * lfence. */ +#if !defined(MAY_NEED_AMD_REVF_WORKAROUND) #if (!defined(VMX86_SERVER) || \ (!defined(VMX86_VMX) && !defined(VMKERNEL) && \ !defined(VMM) && !defined(VMCORE))) @@ -220,6 +414,7 @@ #else #define MAY_NEED_AMD_REVF_WORKAROUND 0 #endif +#endif #if MAY_NEED_AMD_REVF_WORKAROUND #if defined(VMATOMIC_IMPORT_DLLDATA) @@ -247,7 +442,7 @@ } static INLINE void -Atomic_SetFence(Bool fenceAfterLock) +Atomic_SetFence(Bool fenceAfterLock) // IN: { (void)fenceAfterLock; /* Work around unused parameter. */ #if MAY_NEED_AMD_REVF_WORKAROUND @@ -317,6 +512,204 @@ * - walken */ +#if defined(_MSC_VER) && _MSC_VER < 1600 && defined(__x86_64__) +Bool VMWInterlockedExchangeBool(Bool volatile *ptr, + Bool val); + +Bool VMWInterlockedCompareExchangeBool(Bool volatile *ptr, + Bool newVal, + Bool oldVal); +#endif + +typedef struct Atomic_Bool { + volatile Bool value; +} Atomic_Bool; + +/* The ARM team can come along and add the code real soon now */ +extern Bool AtomicUndefinedOnARM(void); + +/* + *----------------------------------------------------------------------------- + * + * Atomic_ReadBool -- + * + * Read the value of the specified object atomically. + * + * Results: + * The value of the atomic variable. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static INLINE Bool +Atomic_ReadBool(Atomic_Bool const *var) // IN: +{ + Bool val; + +#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) + val = AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + __asm__ __volatile__( + "movb %1, %0" + : "=q" (val) + : "m" (var->value) + ); +#elif defined(_MSC_VER) + val = var->value; +#else +#error No compiler defined for Atomic_ReadBool +#endif + + return val; +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_ReadWriteBool -- + * + * Read followed by write. + * + * Results: + * The value of the atomic variable before the write. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static INLINE Bool +Atomic_ReadWriteBool(Atomic_Bool *var, // IN/OUT: + Bool val) // IN: +{ +#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) + return AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + __asm__ __volatile__( + "xchgb %0, %1" + : "=q" (val), + "+m" (var->value) + : "0" (val) + ); + AtomicEpilogue(); + return val; +#elif defined(_MSC_VER) && _MSC_VER >= 1600 + return _InterlockedExchange8(&var->value, val); +#elif defined(_MSC_VER) && defined(__i386__) +#pragma warning(push) +#pragma warning(disable : 4035) // disable no-return warning + { + __asm movzx eax, val + __asm mov ebx, var + __asm xchg [ebx]Atomic_Bool.value, al + } +#pragma warning(pop) +#elif defined(_MSC_VER) && defined(__x86_64__) + return VMWInterlockedExchangeBool(&var->value, val); +#else +#error No compiler defined for Atomic_ReadBool +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_WriteBool -- + * + * Write the specified value to the specified object atomically. + * + * Results: + * None. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +Atomic_WriteBool(Atomic_Bool *var, // IN/OUT: + Bool val) // IN: +{ +#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) + AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + __asm__ __volatile__( + "movb %1, %0" + : "=m" (var->value) + : "qn" (val) + ); +#elif defined(_MSC_VER) + var->value = val; +#else +#error No compiler defined for Atomic_WriteBool +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_ReadIfEqualWriteBool -- + * + * Compare exchange: Read variable, if equal to oldVal, write newVal. + * + * Results: + * The value of the atomic variable before the write. + * + * Side effects: + * The variable may be modified. + * + *----------------------------------------------------------------------------- + */ + +static INLINE Bool +Atomic_ReadIfEqualWriteBool(Atomic_Bool *var, // IN/OUT: + Bool oldVal, // IN: + Bool newVal) // IN: +{ +#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) + return AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + Bool val; + + __asm__ __volatile__( + "lock; cmpxchgb %2, %1" + : "=a" (val), + "+m" (var->value) + : "q" (newVal), + "0" (oldVal) + : "cc" + ); + AtomicEpilogue(); + return val; +#elif defined(_MSC_VER) && _MSC_VER >= 1600 + return _InterlockedCompareExchange8(&var->value, newVal, oldVal); +#elif defined(_MSC_VER) && defined(__i386__) +#pragma warning(push) +#pragma warning(disable : 4035) // disable no-return warning + { + __asm mov al, oldVal + __asm mov ebx, var + __asm mov cl, newVal + __asm lock cmpxchg [ebx]Atomic_Bool.value, cl + __asm movzx eax, al + // eax is the return value, this is documented to work - edward + } +#pragma warning(pop) +#elif defined(_MSC_VER) && defined(__x86_64__) + return VMWInterlockedCompareExchangeBool(&var->value, newVal, oldVal); +#else +#error No compiler defined for Atomic_ReadIfEqualWriteBool +#endif +} + /* *----------------------------------------------------------------------------- @@ -350,11 +743,17 @@ * instructions. */ -#if defined(VM_ARM_V7) +#if defined(VM_ARM_32) __asm__ __volatile__( "ldr %0, [%1]" : "=r" (value) - : "r" (var->value) + : "r" (&var->value) + ); +#elif defined(VM_ARM_64) + __asm__ __volatile__ ( + "ldr %w0, [%1]" + : "=r" (value) + : "r" (&var->value) ); #else __asm__ __volatile__( @@ -397,7 +796,7 @@ */ static INLINE uint32 -Atomic_ReadWrite(Atomic_uint32 *var, // IN +Atomic_ReadWrite(Atomic_uint32 *var, // IN/OUT uint32 val) // IN { #if defined(__GNUC__) @@ -420,7 +819,23 @@ dmb(); return retVal; -#else // __VM_ARM_V7 (assume x86*) +#elif defined(VM_ARM_64) + register uint32 retVal; + register uint32 failed; + + __asm__ __volatile__( + " dmb sy \n\t" + "1: ldxr %w0, [%2] \n\t" + " stxr %w1, %w3, [%2] \n\t" + " cbnz %w1, 1b \n\t" + " dmb sy \n\t" + : "=&r" (retVal), "=&r" (failed) + : "r" (&var->value), "r" (val) + : "memory" + ); + + return retVal; +#else /* VM_X86_ANY */ /* Checked against the Intel manual and GCC --walken */ __asm__ __volatile__( "xchgl %0, %1" @@ -430,7 +845,7 @@ ); AtomicEpilogue(); return val; -#endif // VM_ARM_V7 +#endif /* VM_X86_ANY */ #elif defined _MSC_VER #if _MSC_VER >= 1310 return _InterlockedExchange((long *)&var->value, (long)val); @@ -469,7 +884,7 @@ */ static INLINE void -Atomic_Write(Atomic_uint32 *var, // IN +Atomic_Write(Atomic_uint32 *var, // OUT uint32 val) // IN { #if defined(VMM) @@ -477,7 +892,7 @@ #endif #if defined(__GNUC__) -#if defined(VM_ARM_V7) +#if defined(VM_ARM_ANY) /* * A3.4.1 ARM DDI 0406C: * @@ -495,9 +910,9 @@ * If two STREX instructions are executed without an intervening LDREX the * second STREX returns a status value of 1. This means that: * - * — ARM recommends that, in a given thread of execution, every STREX has a + * - ARM recommends that, in a given thread of execution, every STREX has a * preceding LDREX associated with it - * — it is not necessary for every LDREX to have a subsequent STREX. + * - it is not necessary for every LDREX to have a subsequent STREX. */ Atomic_ReadWrite(var, val); @@ -546,7 +961,7 @@ */ static INLINE uint32 -Atomic_ReadIfEqualWrite(Atomic_uint32 *var, // IN +Atomic_ReadIfEqualWrite(Atomic_uint32 *var, // IN/OUT uint32 oldVal, // IN uint32 newVal) // IN { @@ -572,7 +987,25 @@ dmb(); return retVal; -#else // VM_ARM_V7 (assume x86*) +#elif defined(VM_ARM_64) + register uint32 retVal; + register uint32 failed; + + __asm__ __volatile__ ( + " dmb sy \n\t" + "1: ldxr %w0, [%2] \n\t" + " cmp %w0, %w3 \n\t" + " b.ne 2f \n\t" + " stxr %w1, %w4, [%2] \n\t" + " cbnz %w1, 1b \n\t" + "2: clrex \n\t" + " dmb sy \n\t" + : "=&r" (retVal), "=&r" (failed) + : "r" (&var->value), "r" (oldVal), "r" (newVal) + : "cc", "memory"); + + return retVal; +#else /* VM_X86_ANY */ uint32 val; /* Checked against the Intel manual and GCC --walken */ @@ -586,7 +1019,7 @@ ); AtomicEpilogue(); return val; -#endif // VM_ARM_V7 +#endif /* VM_X86_ANY */ #elif defined _MSC_VER #if _MSC_VER >= 1310 return _InterlockedCompareExchange((long *)&var->value, @@ -611,7 +1044,7 @@ #define Atomic_ReadIfEqualWrite32 Atomic_ReadIfEqualWrite -#if defined(__x86_64__) || defined(VM_ARM_V7) +#if defined(VM_64BIT) || defined(VM_ARM_V7) /* *----------------------------------------------------------------------------- * @@ -629,7 +1062,7 @@ */ static INLINE uint64 -Atomic_ReadIfEqualWrite64(Atomic_uint64 *var, // IN +Atomic_ReadIfEqualWrite64(Atomic_uint64 *var, // IN/OUT uint64 oldVal, // IN uint64 newVal) // IN { @@ -640,6 +1073,24 @@ dmb(); + /* + * Under Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn) + * There will be a warning: + * "value size does not match register size specified by the constraint + * and modifier [-Wasm-operand-widths]" + * on the lines: + * : [var] "r" (&var->value), [oldVal] "r" (oldVal), [newVal] "r" (newVal) + * ^ + * : [var] "r" (&var->value), [oldVal] "r" (oldVal), [newVal] "r" (newVal) + * ^ + * + * Furthermore, using a 32-bits register to store a + * 64-bits value of an variable looks risky. + */ +#if defined(__APPLE__) && __clang__ == 1 && __clang_major__ >= 5 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wasm-operand-widths" +#endif __asm__ __volatile__( "1: ldrexd %[retVal], %H[retVal], [%[var]] \n\t" "mov %[res], #0 \n\t" @@ -652,11 +1103,31 @@ : [var] "r" (&var->value), [oldVal] "r" (oldVal), [newVal] "r" (newVal) : "cc" ); - +#if defined(__APPLE__) && __clang__ == 1 && __clang_major__ >= 5 +#pragma clang diagnostic pop +#endif // defined(__APPLE__) && __clang__ == 1 && __clang_major__ >= 5 dmb(); return retVal; -#else // VM_ARM_V7 (assume x86*) +#elif defined(VM_ARM_64) + register uint64 retVal; + register uint32 failed; + + __asm__ __volatile__ ( + " dmb sy \n\t" + "1: ldxr %x0, [%2] \n\t" + " cmp %x0, %x3 \n\t" + " b.ne 2f \n\t" + " stxr %w1, %x4, [%2] \n\t" + " cbnz %w1, 1b \n\t" + "2: clrex \n\t" + " dmb sy \n\t" + : "=&r" (retVal), "=&r" (failed) + : "r" (&var->value), "r" (oldVal), "r" (newVal) + : "cc", "memory"); + + return retVal; +#else /* VM_X86_64 */ uint64 val; /* Checked against the AMD manual and GCC --hpreg */ @@ -699,7 +1170,7 @@ */ static INLINE void -Atomic_And(Atomic_uint32 *var, // IN +Atomic_And(Atomic_uint32 *var, // IN/OUT uint32 val) // IN { #if defined(__GNUC__) @@ -721,7 +1192,9 @@ ); dmb(); -#else /* VM_ARM_V7 */ +#elif defined(VM_ARM_64) + ARM_64_ATOMIC_32_OPV_PRIVATE_FENCED(var, val, and); +#else /* VM_X86_ANY */ /* Checked against the Intel manual and GCC --walken */ __asm__ __volatile__( "lock; andl %1, %0" @@ -730,7 +1203,7 @@ : "cc" ); AtomicEpilogue(); -#endif // VM_ARM_V7 +#endif /* VM_X86_ANY */ #elif defined _MSC_VER #if defined(__x86_64__) _InterlockedAnd((long *)&var->value, (long)val); @@ -763,7 +1236,7 @@ */ static INLINE void -Atomic_Or(Atomic_uint32 *var, // IN +Atomic_Or(Atomic_uint32 *var, // IN/OUT uint32 val) // IN { #if defined(__GNUC__) @@ -785,7 +1258,9 @@ ); dmb(); -#else // VM_ARM_V7 +#elif defined(VM_ARM_64) + ARM_64_ATOMIC_32_OPV_PRIVATE_FENCED(var, val, orr); +#else /* VM_X86_ANY */ /* Checked against the Intel manual and GCC --walken */ __asm__ __volatile__( "lock; orl %1, %0" @@ -794,7 +1269,7 @@ : "cc" ); AtomicEpilogue(); -#endif // VM_ARM_V7 +#endif /* VM_X86_ANY */ #elif defined _MSC_VER #if defined(__x86_64__) _InterlockedOr((long *)&var->value, (long)val); @@ -827,7 +1302,7 @@ */ static INLINE void -Atomic_Xor(Atomic_uint32 *var, // IN +Atomic_Xor(Atomic_uint32 *var, // IN/OUT uint32 val) // IN { #if defined(__GNUC__) @@ -849,7 +1324,9 @@ ); dmb(); -#else // VM_ARM_V7 +#elif defined(VM_ARM_64) + ARM_64_ATOMIC_32_OPV_PRIVATE_FENCED(var, val, eor); +#else /* VM_X86_ANY */ /* Checked against the Intel manual and GCC --walken */ __asm__ __volatile__( "lock; xorl %1, %0" @@ -858,7 +1335,7 @@ : "cc" ); AtomicEpilogue(); -#endif // VM_ARM_V7 +#endif /* VM_X86_ANY */ #elif defined _MSC_VER #if defined(__x86_64__) _InterlockedXor((long *)&var->value, (long)val); @@ -874,7 +1351,7 @@ #define Atomic_Xor32 Atomic_Xor -#if defined(__x86_64__) +#if defined(VM_64BIT) /* *----------------------------------------------------------------------------- * @@ -892,10 +1369,13 @@ */ static INLINE void -Atomic_Xor64(Atomic_uint64 *var, // IN +Atomic_Xor64(Atomic_uint64 *var, // IN/OUT uint64 val) // IN { #if defined(__GNUC__) +#if defined(VM_ARM_64) + ARM_64_ATOMIC_64_OPV_PRIVATE_FENCED(var, val, eor); +#else /* VM_X86_64 */ /* Checked against the AMD manual and GCC --hpreg */ __asm__ __volatile__( "lock; xorq %1, %0" @@ -904,6 +1384,7 @@ : "cc" ); AtomicEpilogue(); +#endif #elif defined _MSC_VER _InterlockedXor64((__int64 *)&var->value, (__int64)val); #else @@ -930,7 +1411,7 @@ */ static INLINE void -Atomic_Add(Atomic_uint32 *var, // IN +Atomic_Add(Atomic_uint32 *var, // IN/OUT uint32 val) // IN { #if defined(__GNUC__) @@ -952,7 +1433,9 @@ ); dmb(); -#else // VM_ARM_V7 +#elif defined(VM_ARM_64) + ARM_64_ATOMIC_32_OPV_PRIVATE_FENCED(var, val, add); +#else /* VM_X86_ANY */ /* Checked against the Intel manual and GCC --walken */ __asm__ __volatile__( "lock; addl %1, %0" @@ -961,7 +1444,7 @@ : "cc" ); AtomicEpilogue(); -#endif // VM_ARM_V7 +#endif /* VM_X86_ANY */ #elif defined _MSC_VER #if _MSC_VER >= 1310 _InterlockedExchangeAdd((long *)&var->value, (long)val); @@ -994,7 +1477,7 @@ */ static INLINE void -Atomic_Sub(Atomic_uint32 *var, // IN +Atomic_Sub(Atomic_uint32 *var, // IN/OUT uint32 val) // IN { #if defined(__GNUC__) @@ -1016,7 +1499,9 @@ ); dmb(); -#else // VM_ARM_V7 +#elif defined(VM_ARM_64) + ARM_64_ATOMIC_32_OPV_PRIVATE_FENCED(var, val, sub); +#else /* VM_X86_ANY */ /* Checked against the Intel manual and GCC --walken */ __asm__ __volatile__( "lock; subl %1, %0" @@ -1025,7 +1510,7 @@ : "cc" ); AtomicEpilogue(); -#endif // VM_ARM_V7 +#endif /* VM_X86_ANY */ #elif defined _MSC_VER #if _MSC_VER >= 1310 _InterlockedExchangeAdd((long *)&var->value, (long)-val); @@ -1058,12 +1543,12 @@ */ static INLINE void -Atomic_Inc(Atomic_uint32 *var) // IN +Atomic_Inc(Atomic_uint32 *var) // IN/OUT { #ifdef __GNUC__ -#if defined(VM_ARM_V7) +#if defined(VM_ARM_ANY) Atomic_Add(var, 1); -#else // VM_ARM_V7 +#else /* VM_X86_ANY */ /* Checked against the Intel manual and GCC --walken */ __asm__ __volatile__( "lock; incl %0" @@ -1072,7 +1557,7 @@ : "cc" ); AtomicEpilogue(); -#endif // VM_ARM_V7 +#endif /* VM_X86_ANY */ #elif defined _MSC_VER #if _MSC_VER >= 1310 _InterlockedIncrement((long *)&var->value); @@ -1104,12 +1589,12 @@ */ static INLINE void -Atomic_Dec(Atomic_uint32 *var) // IN +Atomic_Dec(Atomic_uint32 *var) // IN/OUT { #ifdef __GNUC__ -#if defined(VM_ARM_V7) +#if defined(VM_ARM_ANY) Atomic_Sub(var, 1); -#else // VM_ARM_V7 +#else /* VM_X86_ANY */ /* Checked against the Intel manual and GCC --walken */ __asm__ __volatile__( "lock; decl %0" @@ -1118,7 +1603,7 @@ : "cc" ); AtomicEpilogue(); -#endif // VM_ARM_V7 +#endif /* VM_X86_ANY */ #elif defined _MSC_VER #if _MSC_VER >= 1310 _InterlockedDecrement((long *)&var->value); @@ -1156,7 +1641,7 @@ */ static INLINE uint32 -Atomic_ReadOr32(Atomic_uint32 *var, // IN +Atomic_ReadOr32(Atomic_uint32 *var, // IN/OUT uint32 val) // IN { uint32 res; @@ -1186,7 +1671,7 @@ */ static INLINE uint32 -Atomic_ReadAnd32(Atomic_uint32 *var, // IN +Atomic_ReadAnd32(Atomic_uint32 *var, // IN/OUT uint32 val) // IN { uint32 res; @@ -1199,7 +1684,7 @@ } -#if defined(__x86_64__) +#if defined(VM_64BIT) /* *----------------------------------------------------------------------------- * @@ -1217,7 +1702,7 @@ */ static INLINE uint64 -Atomic_ReadOr64(Atomic_uint64 *var, // IN +Atomic_ReadOr64(Atomic_uint64 *var, // IN/OUT uint64 val) // IN { uint64 res; @@ -1247,7 +1732,7 @@ */ static INLINE uint64 -Atomic_ReadAnd64(Atomic_uint64 *var, // IN +Atomic_ReadAnd64(Atomic_uint64 *var, // IN/OUT uint64 val) // IN { uint64 res; @@ -1258,13 +1743,13 @@ return res; } -#endif // __x86_64__ +#endif /* defined(VM_64BIT) */ /* *----------------------------------------------------------------------------- * - * Atomic_ReadAdd32Unfenced -- + * Atomic_ReadAdd32 -- * * Atomic read (returned), add a value, write. * @@ -1272,9 +1757,6 @@ * x86 or x86-64, you might want to consider doing something similar to * Atomic_ReadOr32(). * - * The "Unfenced" version of Atomic_ReadAdd32 never executes - * "lfence" after the interlocked operation. - * * Results: * The value of the variable before the operation. * @@ -1285,8 +1767,8 @@ */ static INLINE uint32 -Atomic_ReadAdd32Unfenced(Atomic_uint32 *var, // IN - uint32 val) // IN +Atomic_ReadAdd32(Atomic_uint32 *var, // IN/OUT + uint32 val) // IN { #if defined(__GNUC__) #ifdef VM_ARM_V7 @@ -1310,7 +1792,9 @@ dmb(); return retVal; -#else // VM_ARM_V7 +#elif defined(VM_ARM_64) + return ARM_64_ATOMIC_32_OPO_PRIVATE_FENCED(var, val, add); +#else /* VM_X86_ANY */ /* Checked against the Intel manual and GCC --walken */ __asm__ __volatile__( "lock; xaddl %0, %1" @@ -1319,8 +1803,9 @@ : "0" (val) : "cc" ); + AtomicEpilogue(); return val; -#endif // VM_ARM_V7 +#endif /* VM_X86_ANY */ #elif defined _MSC_VER #if _MSC_VER >= 1310 return _InterlockedExchangeAdd((long *)&var->value, (long)val); @@ -1335,44 +1820,7 @@ #pragma warning(pop) #endif #else -#error No compiler defined for Atomic_ReadAdd32Unfenced -#endif -} - - -/* - *----------------------------------------------------------------------------- - * - * Atomic_ReadAdd32 -- - * - * Atomic read (returned), add a value, write. - * - * If you have to implement ReadAdd32() on an architecture other than - * x86 or x86-64, you might want to consider doing something similar to - * Atomic_ReadOr32(). - * - * Unlike "Unfenced" version, this one may execute the "lfence" after - * interlocked operation. - * - * Results: - * The value of the variable before the operation. - * - * Side effects: - * None - * - *----------------------------------------------------------------------------- - */ - -static INLINE uint32 -Atomic_ReadAdd32(Atomic_uint32 *var, // IN - uint32 val) // IN -{ -#if defined(__GNUC__) && !defined(VM_ARM_V7) - val = Atomic_ReadAdd32Unfenced(var, val); - AtomicEpilogue(); - return val; -#else - return Atomic_ReadAdd32Unfenced(var, val); +#error No compiler defined for Atomic_ReadAdd32 #endif } @@ -1394,7 +1842,7 @@ */ static INLINE uint32 -Atomic_ReadInc32(Atomic_uint32 *var) // IN +Atomic_ReadInc32(Atomic_uint32 *var) // IN/OUT { return Atomic_ReadAdd32(var, 1); } @@ -1417,13 +1865,14 @@ */ static INLINE uint32 -Atomic_ReadDec32(Atomic_uint32 *var) // IN +Atomic_ReadDec32(Atomic_uint32 *var) // IN/OUT { return Atomic_ReadAdd32(var, (uint32)-1); } #if defined VMKERNEL || defined VMM +#if !defined(VM_ARM_64) /* *----------------------------------------------------------------------------- * @@ -1440,7 +1889,7 @@ *----------------------------------------------------------------------------- */ static INLINE uint8 -CMPXCHG1B(volatile uint8 *ptr, // IN +CMPXCHG1B(volatile uint8 *ptr, // IN/OUT uint8 oldVal, // IN uint8 newVal) // IN { @@ -1453,6 +1902,7 @@ : "cc"); return val; } +#endif /* !defined(VM_ARM_64) */ #endif @@ -1498,10 +1948,9 @@ uint64 const *newVal) // IN { #if defined(__GNUC__) -#if defined(VM_ARM_V7) +#if defined(VM_ARM_ANY) return (Atomic_ReadIfEqualWrite64(var, *oldVal, *newVal) == *oldVal); - -#else // VM_ARM_V7 +#else /* VM_X86_ANY */ Bool equal; /* Checked against the Intel manual and GCC --walken */ @@ -1657,13 +2106,13 @@ static INLINE Bool Atomic_CMPXCHG32(Atomic_uint32 *var, // IN/OUT - uint32 oldVal, // IN - uint32 newVal) // IN + uint32 oldVal, // IN + uint32 newVal) // IN { #if defined(__GNUC__) -#ifdef VM_ARM_V7 +#if defined(VM_ARM_ANY) return (Atomic_ReadIfEqualWrite(var, oldVal, newVal) == oldVal); -#else // VM_ARM_V7 +#else /* VM_X86_ANY */ Bool equal; uint32 dummy; @@ -1679,7 +2128,7 @@ ); AtomicEpilogue(); return equal; -#endif // VM_ARM_V7 +#endif /* VM_X86_ANY */ #else // defined(__GNUC__) return (Atomic_ReadIfEqualWrite(var, oldVal, newVal) == oldVal); #endif // !defined(__GNUC__) @@ -1771,7 +2220,16 @@ ); return value; -#endif +#elif defined(__GNUC__) && defined(VM_ARM_64) + uint64 value; + + __asm__ __volatile__( + "ldr %0, [%1]" + : "=r" (value) + : "r" (&var->value)); + + return value; +#endif /* defined(__GNUC__) && defined(VM_ARM_64) */ } @@ -1795,9 +2253,10 @@ * *---------------------------------------------------------------------- */ -#if defined(__x86_64__) + +#if defined(VM_64BIT) static INLINE uint64 -Atomic_ReadUnaligned64(Atomic_uint64 const *var) +Atomic_ReadUnaligned64(Atomic_uint64 const *var) // IN: { return Atomic_ReadIfEqualWrite64((Atomic_uint64*)var, 0, 0); } @@ -1824,7 +2283,9 @@ Atomic_ReadAdd64(Atomic_uint64 *var, // IN/OUT uint64 val) // IN { -#if defined(__x86_64__) +#if defined(VM_ARM_64) + return ARM_64_ATOMIC_64_OPO_PRIVATE_FENCED(var, val, add); +#elif defined(__x86_64__) #if defined(__GNUC__) __asm__ __volatile__( @@ -1943,12 +2404,15 @@ */ static INLINE void -Atomic_Add64(Atomic_uint64 *var, // IN +Atomic_Add64(Atomic_uint64 *var, // IN/OUT uint64 val) // IN { -#if !defined(__x86_64__) +#if !defined(VM_64BIT) Atomic_ReadAdd64(var, val); /* Return value is unused. */ #elif defined(__GNUC__) +#if defined(VM_ARM_64) + ARM_64_ATOMIC_64_OPV_PRIVATE_FENCED(var, val, add); +#else /* defined(VM_X86_64) */ /* Checked against the AMD manual and GCC --hpreg */ __asm__ __volatile__( "lock; addq %1, %0" @@ -1957,6 +2421,7 @@ : "cc" ); AtomicEpilogue(); +#endif #elif defined _MSC_VER _InterlockedExchangeAdd64((__int64 *)&var->value, (__int64)val); #else @@ -1982,12 +2447,15 @@ */ static INLINE void -Atomic_Sub64(Atomic_uint64 *var, // IN +Atomic_Sub64(Atomic_uint64 *var, // IN/OUT uint64 val) // IN { #if !defined(__x86_64__) Atomic_ReadSub64(var, val); /* Return value is unused. */ #elif defined(__GNUC__) +#if defined(VM_ARM_64) + ARM_64_ATOMIC_64_OPV_PRIVATE_FENCED(var, val, sub); +#else /* VM_X86_64 */ /* Checked against the AMD manual and GCC --hpreg */ __asm__ __volatile__( "lock; subq %1, %0" @@ -1996,6 +2464,7 @@ : "cc" ); AtomicEpilogue(); +#endif #elif defined _MSC_VER _InterlockedExchangeAdd64((__int64 *)&var->value, (__int64)-val); #else @@ -2021,7 +2490,7 @@ */ static INLINE void -Atomic_Inc64(Atomic_uint64 *var) // IN +Atomic_Inc64(Atomic_uint64 *var) // IN/OUT { #if !defined(__x86_64__) Atomic_ReadInc64(var); /* Return value is unused. */ @@ -2059,7 +2528,7 @@ */ static INLINE void -Atomic_Dec64(Atomic_uint64 *var) // IN +Atomic_Dec64(Atomic_uint64 *var) // IN/OUT { #if !defined(__x86_64__) Atomic_ReadDec64(var); /* Return value is unused. */ @@ -2097,7 +2566,7 @@ */ static INLINE uint64 -Atomic_ReadWrite64(Atomic_uint64 *var, // IN +Atomic_ReadWrite64(Atomic_uint64 *var, // IN/OUT uint64 val) // IN { #if defined(__x86_64__) @@ -2145,7 +2614,7 @@ */ static INLINE void -Atomic_Write64(Atomic_uint64 *var, // IN +Atomic_Write64(Atomic_uint64 *var, // OUT uint64 val) // IN { #if defined(__x86_64__) @@ -2202,7 +2671,7 @@ */ static INLINE void -Atomic_Or64(Atomic_uint64 *var, // IN +Atomic_Or64(Atomic_uint64 *var, // IN/OUT uint64 val) // IN { #if defined(__x86_64__) @@ -2248,7 +2717,7 @@ */ static INLINE void -Atomic_And64(Atomic_uint64 *var, // IN +Atomic_And64(Atomic_uint64 *var, // IN/OUT uint64 val) // IN { #if defined(__x86_64__) @@ -2282,9 +2751,7 @@ * * Atomic_SetBit64 -- * - * Atomic read, set bit N, and write. - * Be careful: if bit is in a register (not in an immediate), then it - * can specify a bit offset above 63 or even a negative offset. + * Atomically set the bit 'bit' in var. Bit must be between 0 and 63. * * Results: * None @@ -2294,12 +2761,14 @@ * *----------------------------------------------------------------------------- */ + static INLINE void Atomic_SetBit64(Atomic_uint64 *var, // IN/OUT uint64 bit) // IN { #if defined(__x86_64__) #if defined(__GNUC__) + ASSERT(bit <= 63); __asm__ __volatile__( "lock; bts %1, %0" : "+m" (var->value) @@ -2310,6 +2779,7 @@ #elif defined _MSC_VER uint64 oldVal; uint64 newVal; + ASSERT(bit <= 63); do { oldVal = var->value; newVal = oldVal | (CONST64U(1) << bit); @@ -2320,6 +2790,7 @@ #else // __x86_64__ uint64 oldVal; uint64 newVal; + ASSERT(bit <= 63); do { oldVal = var->value; newVal = oldVal | (CONST64U(1) << bit); @@ -2333,9 +2804,7 @@ * * Atomic_ClearBit64 -- * - * Atomic read, clear bit N, and write. - * Be careful: if bit is in a register (not in an immediate), then it - * can specify a bit offset above 63 or even a negative offset. + * Atomically clear the bit 'bit' in var. Bit must be between 0 and 63. * * Results: * None @@ -2345,12 +2814,14 @@ * *----------------------------------------------------------------------------- */ + static INLINE void Atomic_ClearBit64(Atomic_uint64 *var, // IN/OUT uint64 bit) // IN { #if defined(__x86_64__) #if defined(__GNUC__) + ASSERT(bit <= 63); __asm__ __volatile__( "lock; btr %1, %0" : "+m" (var->value) @@ -2361,6 +2832,7 @@ #elif defined _MSC_VER uint64 oldVal; uint64 newVal; + ASSERT(bit <= 63); do { oldVal = var->value; newVal = oldVal & ~(CONST64U(1) << bit); @@ -2371,6 +2843,7 @@ #else // __x86_64__ uint64 oldVal; uint64 newVal; + ASSERT(bit <= 63); do { oldVal = var->value; newVal = oldVal & ~(CONST64U(1) << bit); @@ -2384,9 +2857,7 @@ * * Atomic_TestBit64 -- * - * Read a bit. - * Be careful: if bit is in a register (not in an immediate), then it - * can specify a bit offset above 63 or even a negative offset. + * Read the bit 'bit' in var. Bit must be between 0 and 63. * * Results: * TRUE if the tested bit was set; else FALSE. @@ -2396,6 +2867,7 @@ * *----------------------------------------------------------------------------- */ + static INLINE Bool Atomic_TestBit64(Atomic_uint64 *var, // IN uint64 bit) // IN @@ -2403,6 +2875,7 @@ #if defined(__x86_64__) #if defined(__GNUC__) Bool out = FALSE; + ASSERT(bit <= 63); __asm__ __volatile__( "bt %2, %1; setc %0" : "=rm"(out) @@ -2412,57 +2885,818 @@ ); return out; #elif defined _MSC_VER + ASSERT(bit <= 63); return (var->value & (CONST64U(1) << bit)) != 0; #else #error No compiler defined for Atomic_TestBit64 #endif #else // __x86_64__ + ASSERT(bit <= 63); return (var->value & (CONST64U(1) << bit)) != 0; #endif } + +#if defined(__GNUC__) /* - * Template code for the Atomic_ type and its operators. + *----------------------------------------------------------------------------- * - * The cast argument is an intermediate type cast to make some - * compilers stop complaining about casting uint32 <-> void *, - * even though we only do it in the 32-bit case so they are always - * the same size. So for val of type uint32, instead of - * (void *)val, we have (void *)(uintptr_t)val. - * The specific problem case is the Windows ddk compiler - * (as used by the SVGA driver). -- edward + * Atomic_Read16 -- * - * NOTE: See the comment in vm_assert.h for why we need UNUSED_TYPE in - * AtomicAssertOnCompile(), and why we need to be very careful doing so. + * Read and return. + * + * Results: + * The value of the atomic variable. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- */ -#define MAKE_ATOMIC_TYPE(name, size, in, out, cast) \ - typedef Atomic_uint ## size Atomic_ ## name; \ - \ - \ - static INLINE void \ - AtomicAssertOnCompile ## name(void) \ - { \ - enum { AssertOnCompileMisused = 8 * sizeof (in) == size \ - && 8 * sizeof (out) == size \ - && 8 * sizeof (cast) == size \ - ? 1 : -1 }; \ - UNUSED_TYPE(typedef char AssertOnCompileFailed[AssertOnCompileMisused]);\ - } \ - \ - \ - static INLINE out \ - Atomic_Read ## name(Atomic_ ## name const *var) \ - { \ - return (out)(cast)Atomic_Read ## size(var); \ - } \ - \ - \ - static INLINE void \ - Atomic_Write ## name(Atomic_ ## name *var, \ - in val) \ - { \ - Atomic_Write ## size(var, (uint ## size)(cast)val); \ +static INLINE uint16 +Atomic_Read16(Atomic_uint16 const *var) // IN +{ + uint16 value; + +#ifdef VMM + ASSERT((uintptr_t)var % 2 == 0); +#endif + +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + + __asm__ __volatile__( + "movw %1, %0" + : "=r" (value) + : "m" (var->value) + ); +#elif defined(VM_ARM_V7) + NOT_TESTED(); + + __asm__ __volatile__( + "ldrh %0, [%1]" + : "=r" (value) + : "r" (&var->value) + ); +#elif defined(VM_ARM_64) + __asm__ __volatile__ ( + "ldrh %w0, [%1]" + : "=r" (value) + : "r" (&var->value) + ); + +#else +#error No 16-bits atomics. +#endif +#endif + + return value; +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_ReadWrite16 -- + * + * Read followed by write + * + * Results: + * The value of the atomic variable before the write. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static INLINE uint16 +Atomic_ReadWrite16(Atomic_uint16 *var, // IN/OUT: + uint16 val) // IN: +{ +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + __asm__ __volatile__( + "xchgw %0, %1" + : "=r" (val), + "+m" (var->value) + : "0" (val) + ); + AtomicEpilogue(); + return val; +#elif defined(VM_ARM_V7) + register volatile uint16 retVal; + register volatile uint16 res; + + NOT_TESTED(); + + dmb(); + + __asm__ __volatile__( + "1: ldrexh %[retVal], [%[var]] \n\t" + "strexh %[res], %[val], [%[var]] \n\t" + "teq %[res], #0 \n\t" + "bne 1b" + : [retVal] "=&r" (retVal), [res] "=&r" (res) + : [var] "r" (&var->value), [val] "r" (val) + : "cc" + ); + + dmb(); + + return retVal; +#elif defined(VM_ARM_64) + register uint16 retVal; + register uint16 failed; + + __asm__ __volatile__( + " dmb sy \n\t" + "1: ldxrh %w0, [%2] \n\t" + " stxrh %w1, %w3, [%2] \n\t" + " cbnz %w1, 1b \n\t" + " dmb sy \n\t" + : "=&r" (retVal), "=&r" (failed) + : "r" (&var->value), "r" (val) + : "memory" + ); + + return retVal; +#else +#error No 16-bits atomics. +#endif +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_Write16 -- + * + * Write + * + * Results: + * None. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +Atomic_Write16(Atomic_uint16 *var, // OUT: + uint16 val) // IN: +{ +#ifdef VMM + ASSERT((uintptr_t)var % 2 == 0); +#endif + +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + + __asm__ __volatile__( + "movw %1, %0" + : "=m" (var->value) + : "r" (val) + ); +#elif defined(VM_ARM_ANY) + Atomic_ReadWrite16(var, val); +#else +#error No 16-bits atomics. +#endif +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_ReadIfEqualWrite16 -- + * + * Compare exchange: Read variable, if equal to oldVal, write newVal + * + * Results: + * The value of the atomic variable before the write. + * + * Side effects: + * The variable may be modified. + * + *----------------------------------------------------------------------------- + */ + +static INLINE uint16 +Atomic_ReadIfEqualWrite16(Atomic_uint16 *var, // IN/OUT + uint16 oldVal, // IN + uint16 newVal) // IN +{ +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + uint16 val; + + __asm__ __volatile__( + "lock; cmpxchgw %2, %1" + : "=a" (val), + "+m" (var->value) + : "r" (newVal), + "0" (oldVal) + : "cc" + ); + AtomicEpilogue(); + return val; +#elif defined(VM_ARM_V7) + register uint16 retVal; + register uint16 res; + + NOT_TESTED(); + + dmb(); + + __asm__ __volatile__( + "1: ldrexh %[retVal], [%[var]] \n\t" + "mov %[res], #0 \n\t" + "teq %[retVal], %[oldVal] \n\t" + "strexheq %[res], %[newVal], [%[var]] \n\t" + "teq %[res], #0 \n\t" + "bne 1b" + : [retVal] "=&r" (retVal), [res] "=&r" (res) + : [var] "r" (&var->value), [oldVal] "r" (oldVal), [newVal] "r" (newVal) + : "cc" + ); + + dmb(); + + return retVal; +#elif defined(VM_ARM_64) + register uint16 retVal; + register uint16 failed; + + __asm__ __volatile__ ( + " dmb sy \n\t" + "1: ldxrh %w0, [%2] \n\t" + " cmp %w0, %w3 \n\t" + " b.ne 2f \n\t" + " stxrh %w1, %w4, [%2] \n\t" + " cbnz %w1, 1b \n\t" + "2: clrex \n\t" + " dmb sy \n\t" + : "=&r" (retVal), "=&r" (failed) + : "r" (&var->value), "r" (oldVal), "r" (newVal) + : "cc", "memory"); + + return retVal; +#else +#error No 16-bits atomics. +#endif +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_And16 -- + * + * Atomic read, bitwise AND with a 16-bit value, write. + * + * Results: + * None + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +Atomic_And16(Atomic_uint16 *var, // IN/OUT + uint16 val) // IN +{ +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + __asm__ __volatile__( + "lock; andw %1, %0" + : "+m" (var->value) + : "re" (val) + : "cc" + ); + AtomicEpilogue(); +#elif defined(VM_ARM_V7) + register volatile uint16 res; + register volatile uint16 tmp; + + NOT_TESTED(); + + dmb(); + + __asm__ __volatile__( + "1: ldrexh %[tmp], [%[var]] \n\t" + "and %[tmp], %[tmp], %[val] \n\t" + "strexh %[res], %[tmp], [%[var]] \n\t" + "teq %[res], #0 \n\t" + "bne 1b" + : [res] "=&r" (res), [tmp] "=&r" (tmp) + : [var] "r" (&var->value), [val] "r" (val) + : "cc" + ); + + dmb(); +#elif defined(VM_ARM_64) + ARM_64_ATOMIC_16_OPV_PRIVATE_FENCED(var, val, and); +#else +#error No 16-bits atomics. +#endif +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_Or16 -- + * + * Atomic read, bitwise OR with a 16-bit value, write. + * + * Results: + * None + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +Atomic_Or16(Atomic_uint16 *var, // IN/OUT + uint16 val) // IN +{ +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + __asm__ __volatile__( + "lock; orw %1, %0" + : "+m" (var->value) + : "re" (val) + : "cc" + ); + AtomicEpilogue(); +#elif defined(VM_ARM_V7) + register volatile uint16 res; + register volatile uint16 tmp; + + NOT_TESTED(); + + dmb(); + + __asm__ __volatile__( + "1: ldrexh %[tmp], [%[var]] \n\t" + "orr %[tmp], %[tmp], %[val] \n\t" + "strexh %[res], %[tmp], [%[var]] \n\t" + "teq %[res], #0 \n\t" + "bne 1b" + : [res] "=&r" (res), [tmp] "=&r" (tmp) + : [var] "r" (&var->value), [val] "r" (val) + : "cc" + ); + + dmb(); +#elif defined(VM_ARM_64) + ARM_64_ATOMIC_16_OPV_PRIVATE_FENCED(var, val, orr); +#else +#error No 16-bits atomics. +#endif +#endif +} + +/* + *----------------------------------------------------------------------------- + * + * Atomic_Xor16 -- + * + * Atomic read, bitwise XOR with a value, write. + * + * Results: + * None + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +Atomic_Xor16(Atomic_uint16 *var, // IN/OUT + uint16 val) // IN +{ +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + __asm__ __volatile__( + "lock; xorw %1, %0" + : "+m" (var->value) + : "re" (val) + : "cc" + ); + AtomicEpilogue(); +#elif defined(VM_ARM_V7) + register volatile uint16 res; + register volatile uint16 tmp; + + NOT_TESTED(); + + dmb(); + + __asm__ __volatile__( + "1: ldrexh %[tmp], [%[var]] \n\t" + "eor %[tmp], %[tmp], %[val] \n\t" + "strexh %[res], %[tmp], [%[var]] \n\t" + "teq %[res], #0 \n\t" + "bne 1b" + : [res] "=&r" (res), [tmp] "=&r" (tmp) + : [var] "r" (&var->value), [val] "r" (val) + : "cc" + ); + + dmb(); +#elif defined(VM_ARM_64) + ARM_64_ATOMIC_16_OPV_PRIVATE_FENCED(var, val, eor); +#else +#error No 16-bits atomics. +#endif +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_Add16 -- + * + * Atomic read, add a value, write. + * + * Results: + * None + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +Atomic_Add16(Atomic_uint16 *var, // IN/OUT + uint16 val) // IN +{ +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + __asm__ __volatile__( + "lock; addw %1, %0" + : "+m" (var->value) + : "re" (val) + : "cc" + ); + AtomicEpilogue(); +#elif defined(VM_ARM_V7) + register volatile uint16 res; + register volatile uint16 tmp; + + NOT_TESTED(); + + dmb(); + + __asm__ __volatile__( + "1: ldrexh %[tmp], [%[var]] \n\t" + "add %[tmp], %[tmp], %[val] \n\t" + "strexh %[res], %[tmp], [%[var]] \n\t" + "teq %[res], #0 \n\t" + "bne 1b" + : [res] "=&r" (res), [tmp] "=&r" (tmp) + : [var] "r" (&var->value), [val] "r" (val) + : "cc" + ); + + dmb(); +#elif defined(VM_ARM_64) + ARM_64_ATOMIC_16_OPV_PRIVATE_FENCED(var, val, add); +#else +#error No 16-bits atomics. +#endif +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_Sub16 -- + * + * Atomic read, subtract a value, write. + * + * Results: + * None + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +Atomic_Sub16(Atomic_uint16 *var, // IN/OUT + uint16 val) // IN +{ +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + __asm__ __volatile__( + "lock; subw %1, %0" + : "+m" (var->value) + : "re" (val) + : "cc" + ); + AtomicEpilogue(); +#elif defined(VM_ARM_V7) + register volatile uint16 res; + register volatile uint16 tmp; + + NOT_TESTED(); + + dmb(); + + __asm__ __volatile__( + "1: ldrexh %[tmp], [%[var]] \n\t" + "sub %[tmp], %[tmp], %[val] \n\t" + "strexh %[res], %[tmp], [%[var]] \n\t" + "teq %[res], #0 \n\t" + "bne 1b" + : [res] "=&r" (res), [tmp] "=&r" (tmp) + : [var] "r" (&var->value), [val] "r" (val) + : "cc" + ); + + dmb(); +#elif defined(VM_ARM_64) + ARM_64_ATOMIC_16_OPV_PRIVATE_FENCED(var, val, sub); +#else +#error No 16-bits atomics. +#endif +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_Inc16 -- + * + * Atomic read, increment, write. + * + * Results: + * None + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +Atomic_Inc16(Atomic_uint16 *var) // IN/OUT +{ +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + __asm__ __volatile__( + "lock; incw %0" + : "+m" (var->value) + : + : "cc" + ); + AtomicEpilogue(); +#elif defined(VM_ARM_ANY) + Atomic_Add16(var, 1); +#else +#error No 16-bits atomics. +#endif +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_Dec16 -- + * + * Atomic read, decrement, write. + * + * Results: + * None + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +Atomic_Dec16(Atomic_uint16 *var) // IN/OUT +{ +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + __asm__ __volatile__( + "lock; decw %0" + : "+m" (var->value) + : + : "cc" + ); + AtomicEpilogue(); +#elif defined(VM_ARM_ANY) + Atomic_Sub16(var, 1); +#else +#error No 16-bits atomics. +#endif +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * Atomic_ReadOr16 -- + * + * Atomic read (returned), bitwise OR with a value, write. + * + * Results: + * The value of the variable before the operation. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static INLINE uint16 +Atomic_ReadOr16(Atomic_uint16 *var, // IN/OUT + uint16 val) // IN +{ + uint16 res; + + do { + res = var->value; + } while (res != Atomic_ReadIfEqualWrite16(var, res, res | val)); + + return res; +} + + +/* + *---------------------------------------------------------------------- + * + * Atomic_ReadAdd16 -- + * + * Atomically adds a 16-bit integer to another + * + * Results: + * Returns the old value just prior to the addition + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +static INLINE uint16 +Atomic_ReadAdd16(Atomic_uint16 *var, // IN/OUT + uint16 val) // IN: +{ +#if defined(__GNUC__) +#if (defined(__x86_64__) || defined(__i386__)) + __asm__ __volatile__( + "lock; xaddw %0, %1" + : "=r" (val), + "+m" (var->value) + : "0" (val) + : "cc" + ); + AtomicEpilogue(); + return val; +#elif defined(VM_ARM_V7) + register volatile uint16 res; + register volatile uint16 retVal; + register volatile uint16 tmp; + + NOT_TESTED(); + + dmb(); + + __asm__ __volatile__( + "1: ldrexh %[retVal], [%[var]] \n\t" + "add %[tmp], %[val], %[retVal] \n\t" + "strexh %[res], %[tmp], [%[var]] \n\t" + "teq %[res], #0 \n\t" + "bne 1b" + : [tmp] "=&r" (tmp), [res] "=&r" (res), [retVal] "=&r" (retVal) + : [var] "r" (&var->value), [val] "r" (val) + : "cc" + ); + + dmb(); + + return retVal; +#elif defined(VM_ARM_64) + return ARM_64_ATOMIC_16_OPO_PRIVATE_FENCED(var, val, add); +#else +#error No 16-bits atomics. +#endif +#endif +} + + +/* + *---------------------------------------------------------------------- + * + * Atomic_ReadInc16 -- + * + * Atomically increments a 64-bit integer + * + * Results: + * Returns the old value just prior to incrementing + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +static INLINE uint16 +Atomic_ReadInc16(Atomic_uint16 *var) // IN/OUT +{ + return Atomic_ReadAdd16(var, 1); +} + +/* + + *---------------------------------------------------------------------- + * + * Atomic_ReadDec16 -- + * + * Atomically decrements a 64-bit integer + * + * Results: + * Returns the old value just prior to decrementing + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +static INLINE uint16 +Atomic_ReadDec16(Atomic_uint16 *var) // IN/OUT +{ + return Atomic_ReadAdd16(var, -1); +} +#endif + +/* + * Template code for the Atomic_ type and its operators. + * + * The cast argument is an intermediate type cast to make some + * compilers stop complaining about casting uint32 <-> void *, + * even though we only do it in the 32-bit case so they are always + * the same size. So for val of type uint32, instead of + * (void *)val, we have (void *)(uintptr_t)val. + * The specific problem case is the Windows ddk compiler + * (as used by the SVGA driver). -- edward + * + * NOTE: See the comment in vm_assert.h for why we need UNUSED_TYPE in + * AtomicAssertOnCompile(), and why we need to be very careful doing so. + */ + +#define MAKE_ATOMIC_TYPE(name, size, in, out, cast) \ + typedef Atomic_uint ## size Atomic_ ## name; \ + \ + \ + static INLINE void \ + AtomicAssertOnCompile ## name(void) \ + { \ + enum { AssertOnCompileMisused = 8 * sizeof (in) == size \ + && 8 * sizeof (out) == size \ + && 8 * sizeof (cast) == size \ + ? 1 : -1 }; \ + UNUSED_TYPE(typedef char AssertOnCompileFailed[AssertOnCompileMisused]);\ + } \ + \ + \ + static INLINE out \ + Atomic_Read ## name(Atomic_ ## name const *var) \ + { \ + return (out)(cast)Atomic_Read ## size(var); \ + } \ + \ + \ + static INLINE void \ + Atomic_Write ## name(Atomic_ ## name *var, \ + in val) \ + { \ + Atomic_Write ## size(var, (uint ## size)(cast)val); \ } \ \ \ @@ -2607,7 +3841,7 @@ * Atomic_ReadIncInt -- * Atomic_ReadDecInt -- */ -#if defined(__x86_64__) +#if defined(VM_64BIT) MAKE_ATOMIC_TYPE(Ptr, 64, void const *, void *, uintptr_t) #else MAKE_ATOMIC_TYPE(Ptr, 32, void const *, void *, uintptr_t) @@ -2657,6 +3891,6 @@ #ifdef ATOMIC_COMPILER_BARRIER #undef ATOMIC_COMPILER_BARRIER -#endif +#endif /* ATOMIC_COMPILER_BARRIER */ #endif // ifndef _ATOMIC_H_ diff -Nru open-vm-tools-9.10.2-2822639/lib/include/vm_basic_asm.h open-vm-tools-10.0.0-3000743/lib/include/vm_basic_asm.h --- open-vm-tools-9.10.2-2822639/lib/include/vm_basic_asm.h 2015-06-16 21:49:24.000000000 +0000 +++ open-vm-tools-10.0.0-3000743/lib/include/vm_basic_asm.h 2015-09-10 07:31:38.000000000 +0000 @@ -34,8 +34,6 @@ * vm_basic_asm.h * * Basic asm macros - * - * ARM not implemented. */ #ifndef _VM_BASIC_ASM_H_ @@ -54,229 +52,20 @@ #include "vm_basic_types.h" #if defined VM_X86_64 +#include "vm_basic_asm_x86_common.h" #include "vm_basic_asm_x86_64.h" -#elif defined __i386__ +#elif defined VM_X86_32 +#include "vm_basic_asm_x86_common.h" #include "vm_basic_asm_x86.h" +#elif defined VM_ARM_64 +#include "arm64_basic_defs.h" +#include "vm_basic_asm_arm64.h" #else #define MUL64_NO_ASM 1 #include "mul64.h" #endif /* - * x86-64 windows doesn't support inline asm so we have to use these - * intrinsic functions defined in the compiler. Not all of these are well - * documented. There is an array in the compiler dll (c1.dll) which has - * an array of the names of all the intrinsics minus the leading - * underscore. Searching around in the ntddk.h file can also be helpful. - * - * The declarations for the intrinsic functions were taken from the DDK. - * Our declarations must match the ddk's otherwise the 64-bit c++ compiler - * will complain about second linkage of the intrinsic functions. - * We define the intrinsic using the basic types corresponding to the - * Windows typedefs. This avoids having to include windows header files - * to get to the windows types. - */ -#ifdef _MSC_VER -#ifdef __cplusplus -extern "C" { -#endif -/* - * It seems x86 & x86-64 windows still implements these intrinsic - * functions. The documentation for the x86-64 suggest the - * __inbyte/__outbyte intrinsics even though the _in/_out work fine and - * __inbyte/__outbyte aren't supported on x86. - */ -int _inp(unsigned short); -unsigned short _inpw(unsigned short); -unsigned long _inpd(unsigned short); - -int _outp(unsigned short, int); -unsigned short _outpw(unsigned short, unsigned short); -unsigned long _outpd(uint16, unsigned long); -#pragma intrinsic(_inp, _inpw, _inpd, _outp, _outpw, _outpw, _outpd) - -/* - * Prevents compiler from re-ordering reads, writes and reads&writes. - * These functions do not add any instructions thus only affect - * the compiler ordering. - * - * See: - * `Lockless Programming Considerations for Xbox 360 and Microsoft Windows' - * http://msdn.microsoft.com/en-us/library/bb310595(VS.85).aspx - */ -void _ReadBarrier(void); -void _WriteBarrier(void); -void _ReadWriteBarrier(void); -#pragma intrinsic(_ReadBarrier, _WriteBarrier, _ReadWriteBarrier) - -void _mm_mfence(void); -void _mm_lfence(void); -#pragma intrinsic(_mm_mfence, _mm_lfence) - -unsigned int __getcallerseflags(void); -#pragma intrinsic(__getcallerseflags) - -#ifdef VM_X86_64 -/* - * intrinsic functions only supported by x86-64 windows as of 2k3sp1 - */ -unsigned __int64 __rdtsc(void); -void __stosw(unsigned short *, unsigned short, size_t); -void __stosd(unsigned long *, unsigned long, size_t); -void _mm_pause(void); -#pragma intrinsic(__rdtsc, __stosw, __stosd, _mm_pause) - -unsigned char _BitScanForward64(unsigned long *, unsigned __int64); -unsigned char _BitScanReverse64(unsigned long *, unsigned __int64); -#pragma intrinsic(_BitScanForward64, _BitScanReverse64) -#endif /* VM_X86_64 */ - -unsigned char _BitScanForward(unsigned long *, unsigned long); -unsigned char _BitScanReverse(unsigned long *, unsigned long); -#pragma intrinsic(_BitScanForward, _BitScanReverse) - -unsigned char _bittest(const long *, long); -unsigned char _bittestandset(long *, long); -unsigned char _bittestandreset(long *, long); -unsigned char _bittestandcomplement(long *, long); -#pragma intrinsic(_bittest, _bittestandset, _bittestandreset, _bittestandcomplement) -#ifdef VM_X86_64 -unsigned char _bittestandset64(__int64 *, __int64); -unsigned char _bittestandreset64(__int64 *, __int64); -#pragma intrinsic(_bittestandset64, _bittestandreset64) -#endif /* VM_X86_64 */ -#ifdef __cplusplus -} -#endif -#endif /* _MSC_VER */ - - -#ifdef __GNUC__ // { -#if defined(__i386__) || defined(__x86_64__) // Only on x86* - -/* - * Checked against the Intel manual and GCC --hpreg - * - * volatile because reading from port can modify the state of the underlying - * hardware. - * - * Note: The undocumented %z construct doesn't work (internal compiler error) - * with gcc-2.95.1 - */ - -#define __GCC_IN(s, type, name) \ -static INLINE type \ -name(uint16 port) \ -{ \ - type val; \ - \ - __asm__ __volatile__( \ - "in" #s " %w1, %0" \ - : "=a" (val) \ - : "Nd" (port) \ - ); \ - \ - return val; \ -} - -__GCC_IN(b, uint8, INB) -__GCC_IN(w, uint16, INW) -__GCC_IN(l, uint32, IN32) - - -/* - * Checked against the Intel manual and GCC --hpreg - * - * Note: The undocumented %z construct doesn't work (internal compiler error) - * with gcc-2.95.1 - */ - -#define __GCC_OUT(s, s2, port, val) do { \ - __asm__( \ - "out" #s " %" #s2 "1, %w0" \ - : \ - : "Nd" (port), "a" (val) \ - ); \ -} while (0) - -#define OUTB(port, val) __GCC_OUT(b, b, port, val) -#define OUTW(port, val) __GCC_OUT(w, w, port, val) -#define OUT32(port, val) __GCC_OUT(l, , port, val) - -#define GET_CURRENT_EIP(_eip) \ - __asm__ __volatile("call 0\n\tpopl %0" : "=r" (_eip): ); - -static INLINE unsigned int -GetCallerEFlags(void) -{ - unsigned long flags; - asm volatile("pushf; pop %0" : "=r"(flags)); - return flags; -} - -#endif // x86* - -#elif defined(_MSC_VER) // } { -static INLINE uint8 -INB(uint16 port) -{ - return (uint8)_inp(port); -} -static INLINE void -OUTB(uint16 port, uint8 value) -{ - _outp(port, value); -} -static INLINE uint16 -INW(uint16 port) -{ - return _inpw(port); -} -static INLINE void -OUTW(uint16 port, uint16 value) -{ - _outpw(port, value); -} -static INLINE uint32 -IN32(uint16 port) -{ - return _inpd(port); -} -static INLINE void -OUT32(uint16 port, uint32 value) -{ - _outpd(port, value); -} - -#ifndef VM_X86_64 -#ifdef NEAR -#undef NEAR -#endif - -#define GET_CURRENT_EIP(_eip) do { \ - __asm call NEAR PTR $+5 \ - __asm pop eax \ - __asm mov _eip, eax \ -} while (0) -#endif // VM_X86_64 - -static INLINE unsigned int -GetCallerEFlags(void) -{ - return __getcallerseflags(); -} - -#else // } { -#error -#endif // } - -/* Sequence recommended by Intel for the Pentium 4. */ -#define INTEL_MICROCODE_VERSION() ( \ - __SET_MSR(MSR_BIOS_SIGN_ID, 0), \ - __GET_EAX_FROM_CPUID(1), \ - __GET_MSR(MSR_BIOS_SIGN_ID)) - -/* * Locate most and least significant bit set functions. Use our own name * space to avoid namespace collisions. The new names follow a pattern, *