]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
2008.06.03-96374 refresh - see ChangeLog for details. 2008.06.03-96374
authorAdar Dembo <adar@vmware.com>
Tue, 3 Jun 2008 08:39:53 +0000 (01:39 -0700)
committerAdar Dembo <adar@vmware.com>
Tue, 3 Jun 2008 08:39:53 +0000 (01:39 -0700)
173 files changed:
open-vm-tools/ChangeLog
open-vm-tools/FILES
open-vm-tools/Makefile.am
open-vm-tools/Makefile.in
open-vm-tools/NEWS
open-vm-tools/checkvm/Makefile.am
open-vm-tools/checkvm/Makefile.in
open-vm-tools/configure
open-vm-tools/configure.ac
open-vm-tools/guestd/Makefile.am
open-vm-tools/guestd/Makefile.in
open-vm-tools/guestd/debugStdio.c
open-vm-tools/hgfsclient/Makefile.am
open-vm-tools/hgfsclient/Makefile.in
open-vm-tools/hgfsmounter/Makefile.am
open-vm-tools/hgfsmounter/Makefile.in
open-vm-tools/lib/Makefile.in
open-vm-tools/lib/SLPv2Parser/Makefile.in
open-vm-tools/lib/auth/Makefile.in
open-vm-tools/lib/auth/authPosix.c
open-vm-tools/lib/backdoor/Makefile.in
open-vm-tools/lib/backdoor/shared/Makefile.in
open-vm-tools/lib/conf/Makefile.in
open-vm-tools/lib/deployPkg/Makefile.in
open-vm-tools/lib/dict/Makefile.in
open-vm-tools/lib/dnd/Makefile.in
open-vm-tools/lib/dnd/dndCommon.c
open-vm-tools/lib/dnd/dndLinux.c
open-vm-tools/lib/err/Makefile.in
open-vm-tools/lib/eventManager/Makefile.in
open-vm-tools/lib/file/Makefile.in
open-vm-tools/lib/file/file.c
open-vm-tools/lib/file/fileIO.c
open-vm-tools/lib/file/fileIOPosix.c
open-vm-tools/lib/file/fileLockPrimitive.c
open-vm-tools/lib/file/filePosix.c
open-vm-tools/lib/foundryMsg/Makefile.in
open-vm-tools/lib/foundryMsg/foundryMsg.c
open-vm-tools/lib/foundryMsg/foundryThreads.c
open-vm-tools/lib/ghIntegrationStub/Makefile.in
open-vm-tools/lib/guestApp/Makefile.in
open-vm-tools/lib/guestInfo/Makefile.in
open-vm-tools/lib/hgfs/Makefile.in
open-vm-tools/lib/hgfsBd/Makefile.in
open-vm-tools/lib/hgfsServer/Makefile.in
open-vm-tools/lib/hgfsServer/hgfsServer.c
open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
open-vm-tools/lib/hgfsServerManagerGuest/Makefile.in
open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.in
open-vm-tools/lib/impersonate/Makefile.in
open-vm-tools/lib/impersonate/impersonate.c
open-vm-tools/lib/include/buildNumber.h
open-vm-tools/lib/include/dbllnklst.h
open-vm-tools/lib/include/dnd.h
open-vm-tools/lib/include/file.h
open-vm-tools/lib/include/fileIO.h
open-vm-tools/lib/include/fileInt.h
open-vm-tools/lib/include/foundryThreads.h
open-vm-tools/lib/include/hashTable.h
open-vm-tools/lib/include/hgfsProto.h
open-vm-tools/lib/include/loglevel_user.h
open-vm-tools/lib/include/msg.h
open-vm-tools/lib/include/posix.h
open-vm-tools/lib/include/productState.h
open-vm-tools/lib/include/unicodeBase.h
open-vm-tools/lib/include/unicodeTypes.h
open-vm-tools/lib/include/util.h
open-vm-tools/lib/include/vix.h
open-vm-tools/lib/include/vixCommands.h
open-vm-tools/lib/include/vixOpenSource.h
open-vm-tools/lib/include/vm_app.h
open-vm-tools/lib/include/vm_product.h
open-vm-tools/lib/include/vm_tools_version.h
open-vm-tools/lib/include/vm_version.h
open-vm-tools/lib/include/x86cpuid.h
open-vm-tools/lib/message/Makefile.in
open-vm-tools/lib/message/shared/Makefile.in
open-vm-tools/lib/misc/Makefile.in
open-vm-tools/lib/misc/codesetOld.c
open-vm-tools/lib/misc/dbllnklst.c
open-vm-tools/lib/misc/dynbuf.c
open-vm-tools/lib/misc/hashTable.c
open-vm-tools/lib/misc/posixDlopen.c
open-vm-tools/lib/misc/posixInt.h [new file with mode: 0644]
open-vm-tools/lib/misc/posixPosix.c
open-vm-tools/lib/misc/posixWin32.c
open-vm-tools/lib/misc/shared/Makefile.in
open-vm-tools/lib/misc/timeutil.c
open-vm-tools/lib/misc/util_misc.c
open-vm-tools/lib/misc/vmstdio.c
open-vm-tools/lib/netUtil/Makefile.in
open-vm-tools/lib/panic/Makefile.in
open-vm-tools/lib/panicDefault/Makefile.in
open-vm-tools/lib/printer/Makefile.in
open-vm-tools/lib/procMgr/Makefile.in
open-vm-tools/lib/rpcIn/Makefile.in
open-vm-tools/lib/rpcOut/Makefile.in
open-vm-tools/lib/rpcOut/rpcout.c
open-vm-tools/lib/rpcOut/shared/Makefile.in
open-vm-tools/lib/rpcVmx/Makefile.in
open-vm-tools/lib/socketMgr/Makefile.in
open-vm-tools/lib/strUtil/Makefile.in
open-vm-tools/lib/string/Makefile.in
open-vm-tools/lib/string/shared/Makefile.in
open-vm-tools/lib/string/str.c
open-vm-tools/lib/sync/Makefile.in
open-vm-tools/lib/sync/shared/Makefile.in
open-vm-tools/lib/syncDriver/Makefile.in
open-vm-tools/lib/system/Makefile.in
open-vm-tools/lib/toolsLogger/Makefile.in
open-vm-tools/lib/unicode/Makefile.in
open-vm-tools/lib/unicode/unicodeCommon.c
open-vm-tools/lib/unicode/unicodeSimpleBase.c
open-vm-tools/lib/unicode/unicodeSimpleTypes.c
open-vm-tools/lib/unityStub/Makefile.in
open-vm-tools/lib/user/Makefile.in
open-vm-tools/lib/vixTools/Makefile.in
open-vm-tools/lib/vixTools/vixTools.c
open-vm-tools/lib/vmBackupLib/Makefile.in
open-vm-tools/lib/vmCheck/Makefile.in
open-vm-tools/lib/vmSignal/Makefile.in
open-vm-tools/lib/wiper/Makefile.in
open-vm-tools/libguestlib/Makefile.in
open-vm-tools/modules/Makefile.am
open-vm-tools/modules/Makefile.in
open-vm-tools/modules/freebsd/vmblock/dbllnklst.c
open-vm-tools/modules/freebsd/vmblock/dbllnklst.h
open-vm-tools/modules/freebsd/vmhgfs/dbllnklst.c
open-vm-tools/modules/freebsd/vmhgfs/dbllnklst.h
open-vm-tools/modules/freebsd/vmhgfs/hgfsProto.h
open-vm-tools/modules/freebsd/vmhgfs/rpcout.c
open-vm-tools/modules/freebsd/vmhgfs/x86cpuid.h
open-vm-tools/modules/linux/vmblock/linux/dbllnklst.c
open-vm-tools/modules/linux/vmblock/linux/dbllnklst.h
open-vm-tools/modules/linux/vmhgfs/bdhandler.c
open-vm-tools/modules/linux/vmhgfs/dbllnklst.h
open-vm-tools/modules/linux/vmhgfs/dir.c
open-vm-tools/modules/linux/vmhgfs/file.c
open-vm-tools/modules/linux/vmhgfs/filesystem.c
open-vm-tools/modules/linux/vmhgfs/fsutil.c
open-vm-tools/modules/linux/vmhgfs/hgfsProto.h
open-vm-tools/modules/linux/vmhgfs/inode.c
open-vm-tools/modules/linux/vmhgfs/module.h
open-vm-tools/modules/linux/vmhgfs/page.c
open-vm-tools/modules/linux/vmhgfs/rpcout.c
open-vm-tools/modules/linux/vmhgfs/super.c
open-vm-tools/modules/linux/vmhgfs/x86cpuid.h
open-vm-tools/scripts/Makefile.am [new file with mode: 0644]
open-vm-tools/scripts/Makefile.in [new file with mode: 0644]
open-vm-tools/scripts/common/vmware-toolbox.desktop [new file with mode: 0644]
open-vm-tools/scripts/common/vmware-user.desktop [new file with mode: 0644]
open-vm-tools/scripts/linux/pam.d/vmware-guestd [new file with mode: 0644]
open-vm-tools/scripts/linux/pam.d/vmware-guestd-x64 [new file with mode: 0644]
open-vm-tools/toolbox/Makefile.am
open-vm-tools/toolbox/Makefile.in
open-vm-tools/toolbox/debugStdio.c
open-vm-tools/vmware-user-suid-wrapper/COPYING [new file with mode: 0644]
open-vm-tools/vmware-user-suid-wrapper/Makefile.am [new file with mode: 0644]
open-vm-tools/vmware-user-suid-wrapper/Makefile.in [new file with mode: 0644]
open-vm-tools/vmware-user-suid-wrapper/locationsdb.c [new file with mode: 0644]
open-vm-tools/vmware-user-suid-wrapper/main.c [new file with mode: 0644]
open-vm-tools/vmware-user-suid-wrapper/wrapper-freebsd.c [new file with mode: 0644]
open-vm-tools/vmware-user-suid-wrapper/wrapper-linux.c [new file with mode: 0644]
open-vm-tools/vmware-user-suid-wrapper/wrapper-solaris.c [new file with mode: 0644]
open-vm-tools/vmware-user-suid-wrapper/wrapper.h [new file with mode: 0644]
open-vm-tools/vmware-user-suid-wrapper/wrapper_version.h [new file with mode: 0644]
open-vm-tools/vmware-user/Makefile.am
open-vm-tools/vmware-user/Makefile.in
open-vm-tools/vmware-user/debugStdio.c
open-vm-tools/vmware-user/vmware-user.c
open-vm-tools/xferlogs/Makefile.am
open-vm-tools/xferlogs/Makefile.in
open-vm-tools/xferlogs/xferlogs.c

index 63d9bd39574a5eee8982f986643dcf84c0c5daf7..72be8c2c22119ddc51be354c93b6abb7cf2a3d90 100755 (executable)
@@ -1,3 +1,112 @@
+2008-06-03  Adar Dembo  <adar@vmware.com>
+       * Resync with internal trunk (2008.05.28).
+
+       * configure.ac, Makefile.am, */Makefile.am: Added rudimentary
+       `make install` support. Fixes Sourceforge bug 1839981.
+       
+       * configure.ac, Makefile.am, vmware-user-suid-wrapper/*: Added
+       vmware-user-suid-wrapper to help autostart vmware-user. Added some
+       informational tags to AC_DEFINE macros.
+       
+       * */debugStdio.c: Fixed a format string vulnerability
+       in Debug. Allocate fd on the stack in DebugToFile.
+
+       * lib/auth/authPosix.c, lib/dnd/dndCommon.c, lib/dnd/dndLinux.c
+       lib/impersonate/impersonate.c: Add inclusion of vmware.h and refactor
+       some include statements.
+
+       * lib/file/file.c, lib/include/file.h: Added File_UnlinkNoFollow
+       function.
+
+       * lib/file/fileIO.c, lib/file/fileLockPrimitive.c,
+       lib/include/fileIO.h: Added error case for ENAMETOOLONG to FileIO_Lock.
+       Constified 'buf' in FileIO_Pwrite.
+
+       * lib/file/fileIOPosix.c: Removed coalescing and decoalescing code.
+       Consolidated some Unicode calls.
+
+       * lib/file/filePosix.c: Reworked some error handling logic.
+
+       * lib/foundryMsg/foundryMsg.c: Refactored buffer encoding and decoding
+       logic into a single pair of functions.
+
+       * lib/foundryMsg/foundryThreads.c, lib/include/foundryThreads.h
+       lib/include/util.h, lib/misc/util_misc.c: Changed generic thread type
+       from uintptr_t to Util_ThreadID.
+
+       * lib/hgfsServer/*, lib/hgfs/hgfsProto.h, modules/linux/vmhgfs/*:
+       Additional HGFSv3 fixes and refactoring.
+
+       * lib/include/dbllnklst.h, lib/misc/dbllnklst.c: Constified argument to
+       DblLnkLst_IsLinked.
+
+       * lib/include/dnd.h: Added support for DnD of RTF.
+
+       * lib/include/fileInt.h: Removed prototype of FileLockFileSize.
+
+       * lib/include/hashTable.h, lib/misc/hashTable.c: Cosmetic changes.
+       Added HashTable_ReplaceIfEqual.
+
+       * lib/include/loglevel_user.h: Added hpet loglevel.
+
+       * lib/include/msg.h: Removed prototype of MsgSetPostStderrBlock.
+
+       * lib/include/posix.h: Removed certain includeCheck allowances.
+
+       * lib/include/productState.h: Added VDM client product.
+
+       * lib/include/unicode*, lib/unicode/*: Ongoing i18n work.
+       
+       * lib/include/vixCommands.h: Added command to set snapshot information.
+
+       * lib/include/vix.h: Added more errors and a new flag.
+
+       * lib/include/vixOpenSource.h: Reworked asserts and added VIX_ASSERT.
+
+       * lib/include/vm_app.h: Added Tools tray app.
+
+       * lib/include/vm_product.h: Reworked VMRC product definitions and added
+       VDM client product definitions.
+
+       * lib/include/vm_tools_version.h: Added WS65 Tools version.
+
+       * lib/include/vm_version.h: Bumped Tools version. Added logic for VMRC
+       product.
+
+       * lib/include/x86cpuid.h: Modified a flag and trimmed an unneeded macro.
+
+       * lib/misc/codesetOld.c: Implement UTF-16 codest conversion to UTF-8
+       for CURRENT_IS_UTF8.
+
+       * lib/misc/dynbuf.c: Modified dynbuf growing behavior.
+
+       * lib/misc/posixDlopen.c, lib/misc/posixInt.h, lib/misc/posixPosix.h:
+       Refactored codeset conversion code into PosixConvertToCurrent.
+
+       * lib/misc/posixWin32.c: Added some path checks.
+
+       * lib/misc/timeutil.c: Win32-wrappified TimeUtil_GetTimeFormat.
+
+       * lib/misc/vmstdio.c: Reduce virtual memory usage and add '\r' as a line
+       ending in StdIO_ReadNextLine.
+
+       * lib/rpcout/rpcout.c: Added comments.
+
+       * lib/str/str.c: Cosmetic changes.
+
+       * lib/vixTools/vixTools.c: Added unlink(2) logic to avoid deleting
+       symlink targets. Cosmetic changes.
+
+       * modules/*/*/*: Reflect changes from elsewhere in the source tree.
+
+       * modules/linux/vmhgfs/super.c: Fix vmhgfs to properly report the
+       available space on the host (Sourceforge bug 1924246).
+
+       * vmware-user/vmware-user.c: Add advisory locking code to help maintain
+       only one vmware-user instance per X session.
+
+       * xferlogs/xferlogs.c: Fix a formatted string vulnerability.
+       
 2008-05-12  Elliot Lee  <elliot@vmware.com>
 
        * Resync with internal trunk (2008.05.08).
index d31602693e356f6c7b76d9fc5c65dca50dae055e..9202f4dff8b9d3e5179262df4500e739b520fa50 100644 (file)
-open-vm-tools-2008.05.15-93241:
-total 1680
--rwxr-xr-x  1 mts mts     33 May 16 18:19 AUTHORS
--rwxr-xr-x  1 mts mts  26425 May 16 18:19 COPYING
--rwxr-xr-x  1 mts mts  40633 May 16 18:19 ChangeLog
--r--r--r--  1 mts mts   9416 May 16 18:20 INSTALL
--rwxr-xr-x  1 mts mts   1361 May 16 18:19 Makefile.am
--rw-r--r--  1 mts mts  21050 May 16 18:20 Makefile.in
--rwxr-xr-x  1 mts mts   2007 May 16 18:19 NEWS
--rwxr-xr-x  1 mts mts   6311 May 16 18:19 README
--rw-r--r--  1 mts mts 262309 May 16 18:20 aclocal.m4
-drwxr-xr-x  2 mts mts   4096 May 16 18:20 autom4te.cache
-drwxr-xr-x  2 mts mts   4096 May 16 18:20 checkvm
--r-xr-xr-x  1 mts mts  43668 Apr 28  2007 config.guess
--r-xr-xr-x  1 mts mts  32151 Apr 28  2007 config.sub
--rwxr-xr-x  1 mts mts 910539 May 16 18:20 configure
--rwxr-xr-x  1 mts mts  24017 May 16 18:20 configure.ac
--r-xr-xr-x  1 mts mts  17574 May 16 18:20 depcomp
-drwxr-xr-x  2 mts mts   4096 May 16 18:20 guestd
-drwxr-xr-x  2 mts mts   4096 May 16 18:20 hgfsclient
-drwxr-xr-x  2 mts mts   4096 May 16 18:20 hgfsmounter
--r-xr-xr-x  1 mts mts  13184 May 16 18:20 install-sh
-drwxr-xr-x 48 mts mts   4096 May 16 18:20 lib
-drwxr-xr-x  2 mts mts   4096 May 16 18:20 libguestlib
--r--r--r--  1 mts mts 198422 Apr 28  2007 ltmain.sh
--r-xr-xr-x  1 mts mts  11135 May 16 18:20 missing
-drwxr-xr-x  4 mts mts   4096 May 16 18:20 modules
-drwxr-xr-x  6 mts mts   4096 May 16 18:20 scripts
-drwxr-xr-x  2 mts mts   4096 May 16 18:20 toolbox
-drwxr-xr-x  2 mts mts   4096 May 16 18:20 vmware-user
-drwxr-xr-x  2 mts mts   4096 May 16 18:20 xferlogs
-
-open-vm-tools-2008.05.15-93241/autom4te.cache:
-total 2304
--rw-r--r-- 1 mts mts 912727 May 16 18:20 output.0
--rw-r--r-- 1 mts mts 912157 May 16 18:20 output.1
--rw-r--r-- 1 mts mts  10783 May 16 18:20 requests
--rw-r--r-- 1 mts mts 439992 May 16 18:20 traces.0
--rw-r--r-- 1 mts mts  59787 May 16 18:20 traces.1
-
-open-vm-tools-2008.05.15-93241/checkvm:
+open-vm-tools-2008.06.03-96374:
+total 1692
+-rwxr-xr-x  1 mts mts     33 Jun  3 01:05 AUTHORS
+-rwxr-xr-x  1 mts mts  26425 Jun  3 01:05 COPYING
+-rwxr-xr-x  1 mts mts  44357 Jun  3 01:05 ChangeLog
+-r--r--r--  1 mts mts   9416 Jun  3 01:06 INSTALL
+-rwxr-xr-x  1 mts mts   1411 Jun  3 01:05 Makefile.am
+-rw-r--r--  1 mts mts  21213 Jun  3 01:06 Makefile.in
+-rwxr-xr-x  1 mts mts   2913 Jun  3 01:05 NEWS
+-rwxr-xr-x  1 mts mts   6311 Jun  3 01:05 README
+-rw-r--r--  1 mts mts 262309 Jun  3 01:06 aclocal.m4
+drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 autom4te.cache
+drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 checkvm
+-r-xr-xr-x  1 mts mts  43668 Nov 28  2007 config.guess
+-r-xr-xr-x  1 mts mts  32151 Nov 28  2007 config.sub
+-rwxr-xr-x  1 mts mts 912414 Jun  3 01:06 configure
+-rwxr-xr-x  1 mts mts  24770 Jun  3 01:06 configure.ac
+-r-xr-xr-x  1 mts mts  17574 Jun  3 01:06 depcomp
+drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 guestd
+drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 hgfsclient
+drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 hgfsmounter
+-r-xr-xr-x  1 mts mts  13184 Jun  3 01:06 install-sh
+drwxr-xr-x 48 mts mts   4096 Jun  3 01:06 lib
+drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 libguestlib
+-r--r--r--  1 mts mts 198422 Nov 28  2007 ltmain.sh
+-r-xr-xr-x  1 mts mts  11135 Jun  3 01:06 missing
+drwxr-xr-x  4 mts mts   4096 Jun  3 01:06 modules
+drwxr-xr-x  6 mts mts   4096 Jun  3 01:06 scripts
+drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 toolbox
+drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 vmware-user
+drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 vmware-user-suid-wrapper
+drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 xferlogs
+
+open-vm-tools-2008.06.03-96374/autom4te.cache:
+total 2316
+-rw-r--r-- 1 mts mts 914607 Jun  3 01:06 output.0
+-rw-r--r-- 1 mts mts 914037 Jun  3 01:06 output.1
+-rw-r--r-- 1 mts mts  10783 Jun  3 01:06 requests
+-rw-r--r-- 1 mts mts 440846 Jun  3 01:06 traces.0
+-rw-r--r-- 1 mts mts  62025 Jun  3 01:06 traces.1
+
+open-vm-tools-2008.06.03-96374/checkvm:
 total 60
--r--r--r-- 1 mts mts 26425 May 16 18:20 COPYING
--r--r--r-- 1 mts mts   959 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 14578 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  7107 May 16 18:20 checkvm.c
--r--r--r-- 1 mts mts  1544 May 16 18:20 checkvm_version.h
-
-open-vm-tools-2008.05.15-93241/guestd:
-total 328
--r--r--r-- 1 mts mts 26425 May 16 18:20 COPYING
--r--r--r-- 1 mts mts  3416 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 18275 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  6258 May 16 18:20 debugStdio.c
--r--r--r-- 1 mts mts 37366 May 16 18:20 foreignVMToolsDaemon.c
--r--r--r-- 1 mts mts  6210 May 16 18:20 foreignVMToolsDaemon.h
--r--r--r-- 1 mts mts 36992 May 16 18:20 foreignVMToolsNetworking.c
--r--r--r-- 1 mts mts 54676 May 16 18:20 foundryToolsDaemon.c
--r--r--r-- 1 mts mts  1766 May 16 18:20 foundryToolsDaemon.h
--r--r--r-- 1 mts mts  1521 May 16 18:20 guestd_version.h
--r--r--r-- 1 mts mts 40324 May 16 18:20 main.c
--r--r--r-- 1 mts mts  4731 May 16 18:20 stub.c
--r--r--r-- 1 mts mts 54521 May 16 18:20 toolsDaemon.c
--r--r--r-- 1 mts mts  4049 May 16 18:20 toolsDaemon.h
-
-open-vm-tools-2008.05.15-93241/hgfsclient:
-total 76
--r--r--r-- 1 mts mts 26425 May 16 18:20 COPYING
--r--r--r-- 1 mts mts  2140 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 16016 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 16756 May 16 18:20 hgfsclient.c
--r--r--r-- 1 mts mts  1576 May 16 18:20 hgfsclient_version.h
--r--r--r-- 1 mts mts  2398 May 16 18:20 stub.c
-
-open-vm-tools-2008.05.15-93241/hgfsmounter:
-total 88
--r--r--r-- 1 mts mts 26425 May 16 18:20 COPYING
--r--r--r-- 1 mts mts  1122 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 14880 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 29755 May 16 18:20 hgfsmounter.c
--r--r--r-- 1 mts mts  1578 May 16 18:20 hgfsmounter_version.h
--r--r--r-- 1 mts mts  2113 May 16 18:20 stub.c
-
-open-vm-tools-2008.05.15-93241/lib:
-total 232
--r--r--r-- 1 mts mts 26425 May 16 18:20 COPYING
--r--r--r-- 1 mts mts  1793 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 16381 May 16 18:20 Makefile.in
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 SLPv2Parser
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 auth
-drwxr-xr-x 3 mts mts  4096 May 16 18:20 backdoor
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 conf
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 deployPkg
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 dict
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 dnd
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 err
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 eventManager
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 file
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 foundryMsg
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 ghIntegrationStub
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 guestApp
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 guestInfo
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 hgfs
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 hgfsBd
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 hgfsServer
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 hgfsServerManagerGuest
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 hgfsServerPolicyGuest
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 impersonate
-drwxr-xr-x 3 mts mts  4096 May 16 18:20 include
-drwxr-xr-x 3 mts mts  4096 May 16 18:20 message
-drwxr-xr-x 3 mts mts  4096 May 16 18:20 misc
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 netUtil
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 panic
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 panicDefault
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 printer
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 procMgr
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 rpcIn
-drwxr-xr-x 3 mts mts  4096 May 16 18:20 rpcOut
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 rpcVmx
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 socketMgr
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 strUtil
-drwxr-xr-x 3 mts mts  4096 May 16 18:20 string
-drwxr-xr-x 3 mts mts  4096 May 16 18:20 sync
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 syncDriver
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 system
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 toolsLogger
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 unicode
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 unityStub
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 user
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 vixTools
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 vmBackupLib
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 vmCheck
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 vmSignal
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 wiper
-
-open-vm-tools-2008.05.15-93241/lib/SLPv2Parser:
+-r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts   977 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15851 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  7107 Jun  3 01:06 checkvm.c
+-r--r--r-- 1 mts mts  1544 Jun  3 01:06 checkvm_version.h
+
+open-vm-tools-2008.06.03-96374/guestd:
+total 336
+-r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  4202 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 21074 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  6142 Jun  3 01:06 debugStdio.c
+-r--r--r-- 1 mts mts 37366 Jun  3 01:06 foreignVMToolsDaemon.c
+-r--r--r-- 1 mts mts  6210 Jun  3 01:06 foreignVMToolsDaemon.h
+-r--r--r-- 1 mts mts 36992 Jun  3 01:06 foreignVMToolsNetworking.c
+-r--r--r-- 1 mts mts 54676 Jun  3 01:06 foundryToolsDaemon.c
+-r--r--r-- 1 mts mts  1766 Jun  3 01:06 foundryToolsDaemon.h
+-r--r--r-- 1 mts mts  1521 Jun  3 01:06 guestd_version.h
+-r--r--r-- 1 mts mts 40324 Jun  3 01:06 main.c
+-r--r--r-- 1 mts mts  4731 Jun  3 01:06 stub.c
+-r--r--r-- 1 mts mts 54521 Jun  3 01:06 toolsDaemon.c
+-r--r--r-- 1 mts mts  4049 Jun  3 01:06 toolsDaemon.h
+
+open-vm-tools-2008.06.03-96374/hgfsclient:
+total 80
+-r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  2312 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 17299 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 16756 Jun  3 01:06 hgfsclient.c
+-r--r--r-- 1 mts mts  1576 Jun  3 01:06 hgfsclient_version.h
+-r--r--r-- 1 mts mts  2398 Jun  3 01:06 stub.c
+
+open-vm-tools-2008.06.03-96374/hgfsmounter:
+total 92
+-r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  1444 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 16733 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 29755 Jun  3 01:06 hgfsmounter.c
+-r--r--r-- 1 mts mts  1578 Jun  3 01:06 hgfsmounter_version.h
+-r--r--r-- 1 mts mts  2113 Jun  3 01:06 stub.c
+
+open-vm-tools-2008.06.03-96374/lib:
+total 236
+-r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  1793 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 16459 Jun  3 01:06 Makefile.in
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 SLPv2Parser
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 auth
+drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 backdoor
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 conf
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 deployPkg
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 dict
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 dnd
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 err
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 eventManager
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 file
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 foundryMsg
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 ghIntegrationStub
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 guestApp
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 guestInfo
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 hgfs
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 hgfsBd
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 hgfsServer
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 hgfsServerManagerGuest
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 hgfsServerPolicyGuest
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 impersonate
+drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 include
+drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 message
+drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 misc
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 netUtil
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 panic
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 panicDefault
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 printer
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 procMgr
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 rpcIn
+drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 rpcOut
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 rpcVmx
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 socketMgr
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 strUtil
+drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 string
+drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 sync
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 syncDriver
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 system
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 toolsLogger
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 unicode
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 unityStub
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 user
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 vixTools
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 vmBackupLib
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 vmCheck
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 vmSignal
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 wiper
+
+open-vm-tools-2008.06.03-96374/lib/SLPv2Parser:
 total 68
--r--r--r-- 1 mts mts  1083 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 14976 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  7514 May 16 18:20 SLPv2Match.c
--r--r--r-- 1 mts mts 18294 May 16 18:20 SLPv2MsgAssembler.c
--r--r--r-- 1 mts mts 16818 May 16 18:20 SLPv2MsgParser.c
+-r--r--r-- 1 mts mts  1083 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15054 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  7514 Jun  3 01:06 SLPv2Match.c
+-r--r--r-- 1 mts mts 18294 Jun  3 01:06 SLPv2MsgAssembler.c
+-r--r--r-- 1 mts mts 16818 Jun  3 01:06 SLPv2MsgParser.c
 
-open-vm-tools-2008.05.15-93241/lib/auth:
+open-vm-tools-2008.06.03-96374/lib/auth:
 total 32
--r--r--r-- 1 mts mts  1001 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14603 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  8638 May 16 18:20 authPosix.c
+-r--r--r-- 1 mts mts  1001 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14681 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  8634 Jun  3 01:06 authPosix.c
 
-open-vm-tools-2008.05.15-93241/lib/backdoor:
+open-vm-tools-2008.06.03-96374/lib/backdoor:
 total 52
--r--r--r-- 1 mts mts  1135 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 19302 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  6407 May 16 18:20 backdoor.c
--r--r--r-- 1 mts mts  6198 May 16 18:20 backdoorGcc32.c
--r--r--r-- 1 mts mts  5574 May 16 18:20 backdoorGcc64.c
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 shared
-
-open-vm-tools-2008.05.15-93241/lib/backdoor/shared:
+-r--r--r-- 1 mts mts  1135 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 19380 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  6407 Jun  3 01:06 backdoor.c
+-r--r--r-- 1 mts mts  6198 Jun  3 01:06 backdoorGcc32.c
+-r--r--r-- 1 mts mts  5574 Jun  3 01:06 backdoorGcc64.c
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
+
+open-vm-tools-2008.06.03-96374/lib/backdoor/shared:
 total 24
--r--r--r-- 1 mts mts  1122 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 18179 May 16 18:20 Makefile.in
+-r--r--r-- 1 mts mts  1122 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 18257 Jun  3 01:06 Makefile.in
 
-open-vm-tools-2008.05.15-93241/lib/conf:
+open-vm-tools-2008.06.03-96374/lib/conf:
 total 28
--r--r--r-- 1 mts mts   963 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14556 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  5057 May 16 18:20 conf.c
+-r--r--r-- 1 mts mts   963 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14634 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  5057 Jun  3 01:06 conf.c
 
-open-vm-tools-2008.05.15-93241/lib/deployPkg:
+open-vm-tools-2008.06.03-96374/lib/deployPkg:
 total 40
--r--r--r-- 1 mts mts  1070 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14925 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  8242 May 16 18:20 deployPkg.c
--r--r--r-- 1 mts mts  3246 May 16 18:20 deployPkgLog.c
--r--r--r-- 1 mts mts  3605 May 16 18:20 runDeployPkgPosix.c
+-r--r--r-- 1 mts mts  1070 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15003 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  8242 Jun  3 01:06 deployPkg.c
+-r--r--r-- 1 mts mts  3246 Jun  3 01:06 deployPkgLog.c
+-r--r--r-- 1 mts mts  3605 Jun  3 01:06 runDeployPkgPosix.c
 
-open-vm-tools-2008.05.15-93241/lib/dict:
+open-vm-tools-2008.06.03-96374/lib/dict:
 total 36
--r--r--r-- 1 mts mts   965 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14562 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 15769 May 16 18:20 dictll.c
+-r--r--r-- 1 mts mts   965 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14640 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 15769 Jun  3 01:06 dictll.c
 
-open-vm-tools-2008.05.15-93241/lib/dnd:
+open-vm-tools-2008.06.03-96374/lib/dnd:
 total 64
--r--r--r-- 1 mts mts   996 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14652 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 27742 May 16 18:20 dndCommon.c
--r--r--r-- 1 mts mts 15024 May 16 18:20 dndLinux.c
+-r--r--r-- 1 mts mts   996 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14730 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 27762 Jun  3 01:06 dndCommon.c
+-r--r--r-- 1 mts mts 15044 Jun  3 01:06 dndLinux.c
 
-open-vm-tools-2008.05.15-93241/lib/err:
+open-vm-tools-2008.06.03-96374/lib/err:
 total 36
--r--r--r-- 1 mts mts   990 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14634 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  6614 May 16 18:20 err.c
--r--r--r-- 1 mts mts  1172 May 16 18:20 errInt.h
--r--r--r-- 1 mts mts  3158 May 16 18:20 errPosix.c
+-r--r--r-- 1 mts mts   990 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14712 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  6614 Jun  3 01:06 err.c
+-r--r--r-- 1 mts mts  1172 Jun  3 01:06 errInt.h
+-r--r--r-- 1 mts mts  3158 Jun  3 01:06 errPosix.c
 
-open-vm-tools-2008.05.15-93241/lib/eventManager:
+open-vm-tools-2008.06.03-96374/lib/eventManager:
 total 28
--r--r--r-- 1 mts mts   995 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14748 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  7083 May 16 18:20 eventManager.c
+-r--r--r-- 1 mts mts   995 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14826 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  7083 Jun  3 01:06 eventManager.c
 
-open-vm-tools-2008.05.15-93241/lib/file:
+open-vm-tools-2008.06.03-96374/lib/file:
 total 288
--r--r--r-- 1 mts mts  1173 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 15155 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 49675 May 16 18:20 file.c
--r--r--r-- 1 mts mts 13064 May 16 18:20 fileIO.c
--r--r--r-- 1 mts mts 54842 May 16 18:20 fileIOPosix.c
--r--r--r-- 1 mts mts 26974 May 16 18:20 fileLockPosix.c
--r--r--r-- 1 mts mts 42447 May 16 18:20 fileLockPrimitive.c
--r--r--r-- 1 mts mts 61431 May 16 18:20 filePosix.c
-
-open-vm-tools-2008.05.15-93241/lib/foundryMsg:
+-r--r--r-- 1 mts mts  1173 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15233 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 50263 Jun  3 01:06 file.c
+-r--r--r-- 1 mts mts 13498 Jun  3 01:06 fileIO.c
+-r--r--r-- 1 mts mts 49754 Jun  3 01:06 fileIOPosix.c
+-r--r--r-- 1 mts mts 26974 Jun  3 01:06 fileLockPosix.c
+-r--r--r-- 1 mts mts 42079 Jun  3 01:06 fileLockPrimitive.c
+-r--r--r-- 1 mts mts 62176 Jun  3 01:06 filePosix.c
+
+open-vm-tools-2008.06.03-96374/lib/foundryMsg:
 total 108
--r--r--r-- 1 mts mts  1141 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 15135 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 24798 May 16 18:20 foundryMsg.c
--r--r--r-- 1 mts mts 42795 May 16 18:20 foundryPropertyListCommon.c
--r--r--r-- 1 mts mts  6874 May 16 18:20 foundryThreads.c
--r--r--r-- 1 mts mts  7449 May 16 18:20 vixTranslateErrOpenSource.c
-
-open-vm-tools-2008.05.15-93241/lib/ghIntegrationStub:
+-r--r--r-- 1 mts mts  1141 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15213 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 26222 Jun  3 01:06 foundryMsg.c
+-r--r--r-- 1 mts mts 42795 Jun  3 01:06 foundryPropertyListCommon.c
+-r--r--r-- 1 mts mts  6845 Jun  3 01:06 foundryThreads.c
+-r--r--r-- 1 mts mts  7449 Jun  3 01:06 vixTranslateErrOpenSource.c
+
+open-vm-tools-2008.06.03-96374/lib/ghIntegrationStub:
 total 24
--r--r--r-- 1 mts mts  1048 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14900 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  1228 May 16 18:20 ghIntegrationStub.c
+-r--r--r-- 1 mts mts  1048 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14978 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  1228 Jun  3 01:06 ghIntegrationStub.c
 
-open-vm-tools-2008.05.15-93241/lib/guestApp:
+open-vm-tools-2008.06.03-96374/lib/guestApp:
 total 72
--r--r--r-- 1 mts mts  1020 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14769 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 42611 May 16 18:20 guestApp.c
--r--r--r-- 1 mts mts  5720 May 16 18:20 guestAppPosix.c
+-r--r--r-- 1 mts mts  1020 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14847 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 42611 Jun  3 01:06 guestApp.c
+-r--r--r-- 1 mts mts  5720 Jun  3 01:06 guestAppPosix.c
 
-open-vm-tools-2008.05.15-93241/lib/guestInfo:
+open-vm-tools-2008.06.03-96374/lib/guestInfo:
 total 104
--r--r--r-- 1 mts mts  1144 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 15009 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  6509 May 16 18:20 guestInfoPerfMonLinux.c
--r--r--r-- 1 mts mts 25707 May 16 18:20 guestInfoPosix.c
--r--r--r-- 1 mts mts 47930 May 16 18:20 guestInfoServer.c
+-r--r--r-- 1 mts mts  1144 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15087 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  6509 Jun  3 01:06 guestInfoPerfMonLinux.c
+-r--r--r-- 1 mts mts 25707 Jun  3 01:06 guestInfoPosix.c
+-r--r--r-- 1 mts mts 47930 Jun  3 01:06 guestInfoServer.c
 
-open-vm-tools-2008.05.15-93241/lib/hgfs:
+open-vm-tools-2008.06.03-96374/lib/hgfs:
 total 88
--r--r--r-- 1 mts mts  1175 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 15240 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 12069 May 16 18:20 cpName.c
--r--r--r-- 1 mts mts  5787 May 16 18:20 cpNameLinux.c
--r--r--r-- 1 mts mts  2666 May 16 18:20 cpNameLite.c
--r--r--r-- 1 mts mts  9115 May 16 18:20 cpNameUtil.c
--r--r--r-- 1 mts mts  1477 May 16 18:20 cpNameUtilInt.h
--r--r--r-- 1 mts mts  5613 May 16 18:20 cpNameUtilLinux.c
--r--r--r-- 1 mts mts  6846 May 16 18:20 hgfsUtil.c
--r--r--r-- 1 mts mts  8847 May 16 18:20 staticEscape.c
-
-open-vm-tools-2008.05.15-93241/lib/hgfsBd:
+-r--r--r-- 1 mts mts  1175 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15318 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 12069 Jun  3 01:06 cpName.c
+-r--r--r-- 1 mts mts  5787 Jun  3 01:06 cpNameLinux.c
+-r--r--r-- 1 mts mts  2666 Jun  3 01:06 cpNameLite.c
+-r--r--r-- 1 mts mts  9115 Jun  3 01:06 cpNameUtil.c
+-r--r--r-- 1 mts mts  1477 Jun  3 01:06 cpNameUtilInt.h
+-r--r--r-- 1 mts mts  5613 Jun  3 01:06 cpNameUtilLinux.c
+-r--r--r-- 1 mts mts  6846 Jun  3 01:06 hgfsUtil.c
+-r--r--r-- 1 mts mts  8847 Jun  3 01:06 staticEscape.c
+
+open-vm-tools-2008.06.03-96374/lib/hgfsBd:
 total 32
--r--r--r-- 1 mts mts   971 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14604 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  8713 May 16 18:20 hgfsBd.c
-
-open-vm-tools-2008.05.15-93241/lib/hgfsServer:
-total 324
--r--r--r-- 1 mts mts   1072 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts  14865 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 158068 May 16 18:20 hgfsServer.c
--r--r--r-- 1 mts mts 142052 May 16 18:20 hgfsServerLinux.c
-
-open-vm-tools-2008.05.15-93241/lib/hgfsServerManagerGuest:
+-r--r--r-- 1 mts mts   971 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14682 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  8713 Jun  3 01:06 hgfsBd.c
+
+open-vm-tools-2008.06.03-96374/lib/hgfsServer:
+total 328
+-r--r--r-- 1 mts mts   1072 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts  14943 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 159325 Jun  3 01:06 hgfsServer.c
+-r--r--r-- 1 mts mts 144942 Jun  3 01:06 hgfsServerLinux.c
+
+open-vm-tools-2008.06.03-96374/lib/hgfsServerManagerGuest:
 total 28
--r--r--r-- 1 mts mts  1035 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14996 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  6635 May 16 18:20 hgfsServerManagerGuest.c
+-r--r--r-- 1 mts mts  1035 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15074 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  6635 Jun  3 01:06 hgfsServerManagerGuest.c
 
-open-vm-tools-2008.05.15-93241/lib/hgfsServerPolicyGuest:
+open-vm-tools-2008.06.03-96374/lib/hgfsServerPolicyGuest:
 total 36
--r--r--r-- 1 mts mts  1031 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14972 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 13984 May 16 18:20 hgfsServerPolicyGuest.c
+-r--r--r-- 1 mts mts  1031 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15050 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 13984 Jun  3 01:06 hgfsServerPolicyGuest.c
 
-open-vm-tools-2008.05.15-93241/lib/impersonate:
-total 40
--r--r--r-- 1 mts mts  1078 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14892 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  8188 May 16 18:20 impersonate.c
--r--r--r-- 1 mts mts 11956 May 16 18:20 impersonatePosix.c
-
-open-vm-tools-2008.05.15-93241/lib/include:
-total 1236
--r--r--r-- 1 mts mts  1935 May 16 18:20 SLPv2.h
--r--r--r-- 1 mts mts 12728 May 16 18:20 SLPv2Private.h
--r--r--r-- 1 mts mts  2232 May 16 18:20 auth.h
--r--r--r-- 1 mts mts  1361 May 16 18:20 backdoor.h
--r--r--r-- 1 mts mts  1056 May 16 18:20 backdoorInt.h
--r--r--r-- 1 mts mts  5907 May 16 18:20 backdoor_def.h
--r--r--r-- 1 mts mts  3567 May 16 18:20 backdoor_types.h
--r--r--r-- 1 mts mts  1698 May 16 18:20 base64.h
--r--r--r-- 1 mts mts  1918 May 16 18:20 bsd_output.h
--r--r--r-- 1 mts mts  3312 May 16 18:20 bsd_output_int.h
--r--r--r-- 1 mts mts  5975 May 16 18:20 bsdfmt.h
--r--r--r-- 1 mts mts   272 May 16 18:20 buildNumber.h
--r--r--r-- 1 mts mts 10265 May 16 18:20 circList.h
--r--r--r-- 1 mts mts 16338 May 16 18:20 codeset.h
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 compat
--r--r--r-- 1 mts mts  3889 May 16 18:20 conf.h
--r--r--r-- 1 mts mts  4810 May 16 18:20 config.h
--r--r--r-- 1 mts mts  4198 May 16 18:20 cpName.h
--r--r--r-- 1 mts mts  1822 May 16 18:20 cpNameInt.h
--r--r--r-- 1 mts mts  1734 May 16 18:20 cpNameLite.h
--r--r--r-- 1 mts mts  2621 May 16 18:20 cpNameUtil.h
--r--r--r-- 1 mts mts  3088 May 16 18:20 cpuid_info.h
--r--r--r-- 1 mts mts  3428 May 16 18:20 cryptoError.h
--r--r--r-- 1 mts mts  2374 May 16 18:20 dbllnklst.h
--r--r--r-- 1 mts mts  1304 May 16 18:20 debug.h
--r--r--r-- 1 mts mts  1114 May 16 18:20 deployPkg.h
--r--r--r-- 1 mts mts  1125 May 16 18:20 deployPkgLog.h
--r--r--r-- 1 mts mts  1793 May 16 18:20 dictll.h
--r--r--r-- 1 mts mts  7310 May 16 18:20 dnd.h
--r--r--r-- 1 mts mts  1819 May 16 18:20 dndInt.h
--r--r--r-- 1 mts mts  8051 May 16 18:20 dynarray.h
--r--r--r-- 1 mts mts  2632 May 16 18:20 dynbuf.h
--r--r--r-- 1 mts mts  1709 May 16 18:20 embed_version.h
--r--r--r-- 1 mts mts  2893 May 16 18:20 err.h
--r--r--r-- 1 mts mts  3856 May 16 18:20 escBitvector.h
--r--r--r-- 1 mts mts  1922 May 16 18:20 escape.h
--r--r--r-- 1 mts mts  1539 May 16 18:20 eventManager.h
--r--r--r-- 1 mts mts  8744 May 16 18:20 file.h
--r--r--r-- 1 mts mts 12660 May 16 18:20 fileIO.h
--r--r--r-- 1 mts mts  6186 May 16 18:20 fileInt.h
--r--r--r-- 1 mts mts  2408 May 16 18:20 fileLock.h
--r--r--r-- 1 mts mts  3460 May 16 18:20 file_extensions.h
--r--r--r-- 1 mts mts  2194 May 16 18:20 foundryThreads.h
--r--r--r-- 1 mts mts  2271 May 16 18:20 ghIntegration.h
--r--r--r-- 1 mts mts  5244 May 16 18:20 guestApp.h
--r--r--r-- 1 mts mts  7509 May 16 18:20 guestInfo.h
--r--r--r-- 1 mts mts  2009 May 16 18:20 guestInfoInt.h
--r--r--r-- 1 mts mts  1415 May 16 18:20 guestInfoServer.h
--r--r--r-- 1 mts mts  2949 May 16 18:20 guestStats.h
--r--r--r-- 1 mts mts  3030 May 16 18:20 guest_msg_def.h
--r--r--r-- 1 mts mts 14575 May 16 18:20 guest_os.h
--r--r--r-- 1 mts mts  2983 May 16 18:20 hashTable.h
--r--r--r-- 1 mts mts  7032 May 16 18:20 hgfs.h
--r--r--r-- 1 mts mts  1474 May 16 18:20 hgfsBd.h
--r--r--r-- 1 mts mts  2559 May 16 18:20 hgfsDevLinux.h
--r--r--r-- 1 mts mts 39712 May 16 18:20 hgfsProto.h
--r--r--r-- 1 mts mts  2072 May 16 18:20 hgfsServer.h
--r--r--r-- 1 mts mts 26099 May 16 18:20 hgfsServerInt.h
--r--r--r-- 1 mts mts  2212 May 16 18:20 hgfsServerManager.h
--r--r--r-- 1 mts mts  3248 May 16 18:20 hgfsServerPolicy.h
--r--r--r-- 1 mts mts  3761 May 16 18:20 hgfsUtil.h
--r--r--r-- 1 mts mts  1284 May 16 18:20 hgfsVirtualDir.h
--r--r--r-- 1 mts mts  1279 May 16 18:20 hostType.h
--r--r--r-- 1 mts mts  3463 May 16 18:20 hostinfo.h
--r--r--r-- 1 mts mts  1661 May 16 18:20 impersonate.h
--r--r--r-- 1 mts mts  2031 May 16 18:20 impersonateInt.h
--r--r--r-- 1 mts mts  4286 May 16 18:20 includeCheck.h
--r--r--r-- 1 mts mts  4636 May 16 18:20 iovector.h
--r--r--r-- 1 mts mts  1300 May 16 18:20 localconfig.h
--r--r--r-- 1 mts mts  3878 May 16 18:20 log.h
--r--r--r-- 1 mts mts  3916 May 16 18:20 loglevel_defs.h
--r--r--r-- 1 mts mts  5701 May 16 18:20 loglevel_user.h
--r--r--r-- 1 mts mts  3553 May 16 18:20 message.h
--r--r--r-- 1 mts mts  1268 May 16 18:20 miscSolaris.h
--r--r--r-- 1 mts mts  7510 May 16 18:20 mntinfo.h
--r--r--r-- 1 mts mts  8728 May 16 18:20 msg.h
--r--r--r-- 1 mts mts  5195 May 16 18:20 msgfmt.h
--r--r--r-- 1 mts mts  1751 May 16 18:20 netutil.h
--r--r--r-- 1 mts mts  2584 May 16 18:20 panic.h
--r--r--r-- 1 mts mts  7550 May 16 18:20 posix.h
--r--r--r-- 1 mts mts  2023 May 16 18:20 preference.h
--r--r--r-- 1 mts mts  1393 May 16 18:20 printer.h
--r--r--r-- 1 mts mts  4812 May 16 18:20 procMgr.h
--r--r--r-- 1 mts mts  3166 May 16 18:20 productState.h
--r--r--r-- 1 mts mts  1344 May 16 18:20 random.h
--r--r--r-- 1 mts mts  1162 May 16 18:20 removable_device.h
--r--r--r-- 1 mts mts  2333 May 16 18:20 rpcin.h
--r--r--r-- 1 mts mts  1987 May 16 18:20 rpcout.h
--r--r--r-- 1 mts mts  2708 May 16 18:20 rpcvmx.h
--r--r--r-- 1 mts mts  2148 May 16 18:20 runDeployPkgInt.h
--r--r--r-- 1 mts mts  4882 May 16 18:20 safetime.h
--r--r--r-- 1 mts mts  3484 May 16 18:20 socketMgr.h
--r--r--r-- 1 mts mts  2505 May 16 18:20 staticEscape.h
--r--r--r-- 1 mts mts  2373 May 16 18:20 stats_file.h
--r--r--r-- 1 mts mts  3432 May 16 18:20 stats_user_defs.h
--r--r--r-- 1 mts mts 10763 May 16 18:20 stats_user_setup.h
--r--r--r-- 1 mts mts  7072 May 16 18:20 str.h
--r--r--r-- 1 mts mts  2142 May 16 18:20 strutil.h
--r--r--r-- 1 mts mts  3423 May 16 18:20 su.h
--r--r--r-- 1 mts mts  2061 May 16 18:20 syncDriver.h
--r--r--r-- 1 mts mts  1564 May 16 18:20 syncDriverIoc.h
--r--r--r-- 1 mts mts  2250 May 16 18:20 syncEvent.h
--r--r--r-- 1 mts mts  1938 May 16 18:20 syncMutex.h
--r--r--r-- 1 mts mts  3372 May 16 18:20 syncWaitQ.h
--r--r--r-- 1 mts mts  3152 May 16 18:20 system.h
--r--r--r-- 1 mts mts  3240 May 16 18:20 timeutil.h
--r--r--r-- 1 mts mts  1751 May 16 18:20 toolsDeployPkg.h
--r--r--r-- 1 mts mts  2390 May 16 18:20 toolsLogger.h
--r--r--r-- 1 mts mts  1528 May 16 18:20 toolsLoggerInt.h
--r--r--r-- 1 mts mts  1578 May 16 18:20 unicode.h
--r--r--r-- 1 mts mts 10631 May 16 18:20 unicodeBase.h
--r--r--r-- 1 mts mts  2976 May 16 18:20 unicodeICU.h
--r--r--r-- 1 mts mts  1911 May 16 18:20 unicodeInt.h
--r--r--r-- 1 mts mts 21686 May 16 18:20 unicodeOperations.h
--r--r--r-- 1 mts mts  1853 May 16 18:20 unicodeTransforms.h
--r--r--r-- 1 mts mts  5796 May 16 18:20 unicodeTypes.h
--r--r--r-- 1 mts mts  2465 May 16 18:20 unity.h
--r--r--r-- 1 mts mts 16430 May 16 18:20 util.h
--r--r--r-- 1 mts mts  2994 May 16 18:20 util_shared.h
--r--r--r-- 1 mts mts  1999 May 16 18:20 uuid.h
--r--r--r-- 1 mts mts 38679 May 16 18:20 vix.h
--r--r--r-- 1 mts mts 61555 May 16 18:20 vixCommands.h
--r--r--r-- 1 mts mts 14575 May 16 18:20 vixOpenSource.h
--r--r--r-- 1 mts mts  4132 May 16 18:20 vixTools.h
--r--r--r-- 1 mts mts  6676 May 16 18:20 vmBackup.h
--r--r--r-- 1 mts mts 14163 May 16 18:20 vmGuestLib.h
--r--r--r-- 1 mts mts  1092 May 16 18:20 vmSessionId.h
--r--r--r-- 1 mts mts  4092 May 16 18:20 vm_app.h
--r--r--r-- 1 mts mts  9976 May 16 18:20 vm_assert.h
--r--r--r-- 1 mts mts 54313 May 16 18:20 vm_atomic.h
--r--r--r-- 1 mts mts 17721 May 16 18:20 vm_basic_asm.h
--r--r--r-- 1 mts mts 16137 May 16 18:20 vm_basic_asm_x86.h
--r--r--r-- 1 mts mts  8968 May 16 18:20 vm_basic_asm_x86_64.h
--r--r--r-- 1 mts mts 12632 May 16 18:20 vm_basic_defs.h
--r--r--r-- 1 mts mts 21770 May 16 18:20 vm_basic_types.h
--r--r--r-- 1 mts mts  2430 May 16 18:20 vm_ctype.h
--r--r--r-- 1 mts mts  2118 May 16 18:20 vm_legal.h
--r--r--r-- 1 mts mts 17935 May 16 18:20 vm_product.h
--r--r--r-- 1 mts mts 29860 May 16 18:20 vm_tools_version.h
--r--r--r-- 1 mts mts 15875 May 16 18:20 vm_version.h
--r--r--r-- 1 mts mts  3582 May 16 18:20 vmbackup_def.h
--r--r--r-- 1 mts mts  4356 May 16 18:20 vmblock.h
--r--r--r-- 1 mts mts  1275 May 16 18:20 vmcheck.h
--r--r--r-- 1 mts mts  1270 May 16 18:20 vmsignal.h
--r--r--r-- 1 mts mts  1336 May 16 18:20 vmstdio.h
--r--r--r-- 1 mts mts  1913 May 16 18:20 vmware.h
--r--r--r-- 1 mts mts  1340 May 16 18:20 vmware_pack_begin.h
--r--r--r-- 1 mts mts  1360 May 16 18:20 vmware_pack_end.h
--r--r--r-- 1 mts mts  1980 May 16 18:20 vmware_pack_init.h
--r--r--r-- 1 mts mts  7863 May 16 18:20 win32util.h
--r--r--r-- 1 mts mts  2751 May 16 18:20 wiper.h
--r--r--r-- 1 mts mts 38027 May 16 18:20 x86cpuid.h
-
-open-vm-tools-2008.05.15-93241/lib/include/compat:
+open-vm-tools-2008.06.03-96374/lib/impersonate:
+total 44
+-r--r--r-- 1 mts mts  1078 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14970 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  8208 Jun  3 01:06 impersonate.c
+-r--r--r-- 1 mts mts 11956 Jun  3 01:06 impersonatePosix.c
+
+open-vm-tools-2008.06.03-96374/lib/include:
+total 1248
+-r--r--r-- 1 mts mts  1935 Jun  3 01:06 SLPv2.h
+-r--r--r-- 1 mts mts 12728 Jun  3 01:06 SLPv2Private.h
+-r--r--r-- 1 mts mts  2232 Jun  3 01:06 auth.h
+-r--r--r-- 1 mts mts  1361 Jun  3 01:06 backdoor.h
+-r--r--r-- 1 mts mts  1056 Jun  3 01:06 backdoorInt.h
+-r--r--r-- 1 mts mts  5907 Jun  3 01:06 backdoor_def.h
+-r--r--r-- 1 mts mts  3567 Jun  3 01:06 backdoor_types.h
+-r--r--r-- 1 mts mts  1698 Jun  3 01:06 base64.h
+-r--r--r-- 1 mts mts  1918 Jun  3 01:06 bsd_output.h
+-r--r--r-- 1 mts mts  3312 Jun  3 01:06 bsd_output_int.h
+-r--r--r-- 1 mts mts  5975 Jun  3 01:06 bsdfmt.h
+-r--r--r-- 1 mts mts   272 Jun  3 01:06 buildNumber.h
+-r--r--r-- 1 mts mts 10265 Jun  3 01:06 circList.h
+-r--r--r-- 1 mts mts 16338 Jun  3 01:06 codeset.h
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 compat
+-r--r--r-- 1 mts mts  3889 Jun  3 01:06 conf.h
+-r--r--r-- 1 mts mts  4810 Jun  3 01:06 config.h
+-r--r--r-- 1 mts mts  4198 Jun  3 01:06 cpName.h
+-r--r--r-- 1 mts mts  1822 Jun  3 01:06 cpNameInt.h
+-r--r--r-- 1 mts mts  1734 Jun  3 01:06 cpNameLite.h
+-r--r--r-- 1 mts mts  2621 Jun  3 01:06 cpNameUtil.h
+-r--r--r-- 1 mts mts  3088 Jun  3 01:06 cpuid_info.h
+-r--r--r-- 1 mts mts  3428 Jun  3 01:06 cryptoError.h
+-r--r--r-- 1 mts mts  2380 Jun  3 01:06 dbllnklst.h
+-r--r--r-- 1 mts mts  1304 Jun  3 01:06 debug.h
+-r--r--r-- 1 mts mts  1114 Jun  3 01:06 deployPkg.h
+-r--r--r-- 1 mts mts  1125 Jun  3 01:06 deployPkgLog.h
+-r--r--r-- 1 mts mts  1793 Jun  3 01:06 dictll.h
+-r--r--r-- 1 mts mts  7570 Jun  3 01:06 dnd.h
+-r--r--r-- 1 mts mts  1819 Jun  3 01:06 dndInt.h
+-r--r--r-- 1 mts mts  8051 Jun  3 01:06 dynarray.h
+-r--r--r-- 1 mts mts  2632 Jun  3 01:06 dynbuf.h
+-r--r--r-- 1 mts mts  1709 Jun  3 01:06 embed_version.h
+-r--r--r-- 1 mts mts  2893 Jun  3 01:06 err.h
+-r--r--r-- 1 mts mts  3856 Jun  3 01:06 escBitvector.h
+-r--r--r-- 1 mts mts  1922 Jun  3 01:06 escape.h
+-r--r--r-- 1 mts mts  1539 Jun  3 01:06 eventManager.h
+-r--r--r-- 1 mts mts  8800 Jun  3 01:06 file.h
+-r--r--r-- 1 mts mts 12660 Jun  3 01:06 fileIO.h
+-r--r--r-- 1 mts mts  6081 Jun  3 01:06 fileInt.h
+-r--r--r-- 1 mts mts  2408 Jun  3 01:06 fileLock.h
+-r--r--r-- 1 mts mts  3460 Jun  3 01:06 file_extensions.h
+-r--r--r-- 1 mts mts  2194 Jun  3 01:06 foundryThreads.h
+-r--r--r-- 1 mts mts  2271 Jun  3 01:06 ghIntegration.h
+-r--r--r-- 1 mts mts  5244 Jun  3 01:06 guestApp.h
+-r--r--r-- 1 mts mts  7509 Jun  3 01:06 guestInfo.h
+-r--r--r-- 1 mts mts  2009 Jun  3 01:06 guestInfoInt.h
+-r--r--r-- 1 mts mts  1415 Jun  3 01:06 guestInfoServer.h
+-r--r--r-- 1 mts mts  2949 Jun  3 01:06 guestStats.h
+-r--r--r-- 1 mts mts  3030 Jun  3 01:06 guest_msg_def.h
+-r--r--r-- 1 mts mts 14575 Jun  3 01:06 guest_os.h
+-r--r--r-- 1 mts mts  3237 Jun  3 01:06 hashTable.h
+-r--r--r-- 1 mts mts  7032 Jun  3 01:06 hgfs.h
+-r--r--r-- 1 mts mts  1474 Jun  3 01:06 hgfsBd.h
+-r--r--r-- 1 mts mts  2559 Jun  3 01:06 hgfsDevLinux.h
+-r--r--r-- 1 mts mts 39322 Jun  3 01:06 hgfsProto.h
+-r--r--r-- 1 mts mts  2072 Jun  3 01:06 hgfsServer.h
+-r--r--r-- 1 mts mts 26099 Jun  3 01:06 hgfsServerInt.h
+-r--r--r-- 1 mts mts  2212 Jun  3 01:06 hgfsServerManager.h
+-r--r--r-- 1 mts mts  3248 Jun  3 01:06 hgfsServerPolicy.h
+-r--r--r-- 1 mts mts  3761 Jun  3 01:06 hgfsUtil.h
+-r--r--r-- 1 mts mts  1284 Jun  3 01:06 hgfsVirtualDir.h
+-r--r--r-- 1 mts mts  1279 Jun  3 01:06 hostType.h
+-r--r--r-- 1 mts mts  3463 Jun  3 01:06 hostinfo.h
+-r--r--r-- 1 mts mts  1661 Jun  3 01:06 impersonate.h
+-r--r--r-- 1 mts mts  2031 Jun  3 01:06 impersonateInt.h
+-r--r--r-- 1 mts mts  4286 Jun  3 01:06 includeCheck.h
+-r--r--r-- 1 mts mts  4636 Jun  3 01:06 iovector.h
+-r--r--r-- 1 mts mts  1300 Jun  3 01:06 localconfig.h
+-r--r--r-- 1 mts mts  3878 Jun  3 01:06 log.h
+-r--r--r-- 1 mts mts  3916 Jun  3 01:06 loglevel_defs.h
+-r--r--r-- 1 mts mts  5726 Jun  3 01:06 loglevel_user.h
+-r--r--r-- 1 mts mts  3553 Jun  3 01:06 message.h
+-r--r--r-- 1 mts mts  1268 Jun  3 01:06 miscSolaris.h
+-r--r--r-- 1 mts mts  7510 Jun  3 01:06 mntinfo.h
+-r--r--r-- 1 mts mts  8653 Jun  3 01:06 msg.h
+-r--r--r-- 1 mts mts  5195 Jun  3 01:06 msgfmt.h
+-r--r--r-- 1 mts mts  1751 Jun  3 01:06 netutil.h
+-r--r--r-- 1 mts mts  2584 Jun  3 01:06 panic.h
+-r--r--r-- 1 mts mts  7488 Jun  3 01:06 posix.h
+-r--r--r-- 1 mts mts  2023 Jun  3 01:06 preference.h
+-r--r--r-- 1 mts mts  1393 Jun  3 01:06 printer.h
+-r--r--r-- 1 mts mts  4812 Jun  3 01:06 procMgr.h
+-r--r--r-- 1 mts mts  3198 Jun  3 01:06 productState.h
+-r--r--r-- 1 mts mts  1344 Jun  3 01:06 random.h
+-r--r--r-- 1 mts mts  1162 Jun  3 01:06 removable_device.h
+-r--r--r-- 1 mts mts  2333 Jun  3 01:06 rpcin.h
+-r--r--r-- 1 mts mts  1987 Jun  3 01:06 rpcout.h
+-r--r--r-- 1 mts mts  2708 Jun  3 01:06 rpcvmx.h
+-r--r--r-- 1 mts mts  2148 Jun  3 01:06 runDeployPkgInt.h
+-r--r--r-- 1 mts mts  4882 Jun  3 01:06 safetime.h
+-r--r--r-- 1 mts mts  3484 Jun  3 01:06 socketMgr.h
+-r--r--r-- 1 mts mts  2505 Jun  3 01:06 staticEscape.h
+-r--r--r-- 1 mts mts  2373 Jun  3 01:06 stats_file.h
+-r--r--r-- 1 mts mts  3432 Jun  3 01:06 stats_user_defs.h
+-r--r--r-- 1 mts mts 10763 Jun  3 01:06 stats_user_setup.h
+-r--r--r-- 1 mts mts  7072 Jun  3 01:06 str.h
+-r--r--r-- 1 mts mts  2142 Jun  3 01:06 strutil.h
+-r--r--r-- 1 mts mts  3423 Jun  3 01:06 su.h
+-r--r--r-- 1 mts mts  2061 Jun  3 01:06 syncDriver.h
+-r--r--r-- 1 mts mts  1564 Jun  3 01:06 syncDriverIoc.h
+-r--r--r-- 1 mts mts  2250 Jun  3 01:06 syncEvent.h
+-r--r--r-- 1 mts mts  1938 Jun  3 01:06 syncMutex.h
+-r--r--r-- 1 mts mts  3372 Jun  3 01:06 syncWaitQ.h
+-r--r--r-- 1 mts mts  3152 Jun  3 01:06 system.h
+-r--r--r-- 1 mts mts  3240 Jun  3 01:06 timeutil.h
+-r--r--r-- 1 mts mts  1751 Jun  3 01:06 toolsDeployPkg.h
+-r--r--r-- 1 mts mts  2390 Jun  3 01:06 toolsLogger.h
+-r--r--r-- 1 mts mts  1528 Jun  3 01:06 toolsLoggerInt.h
+-r--r--r-- 1 mts mts  1578 Jun  3 01:06 unicode.h
+-r--r--r-- 1 mts mts 10792 Jun  3 01:06 unicodeBase.h
+-r--r--r-- 1 mts mts  2976 Jun  3 01:06 unicodeICU.h
+-r--r--r-- 1 mts mts  1911 Jun  3 01:06 unicodeInt.h
+-r--r--r-- 1 mts mts 21686 Jun  3 01:06 unicodeOperations.h
+-r--r--r-- 1 mts mts  1853 Jun  3 01:06 unicodeTransforms.h
+-r--r--r-- 1 mts mts 15446 Jun  3 01:06 unicodeTypes.h
+-r--r--r-- 1 mts mts  2465 Jun  3 01:06 unity.h
+-r--r--r-- 1 mts mts 16705 Jun  3 01:06 util.h
+-r--r--r-- 1 mts mts  2994 Jun  3 01:06 util_shared.h
+-r--r--r-- 1 mts mts  1999 Jun  3 01:06 uuid.h
+-r--r--r-- 1 mts mts 39071 Jun  3 01:06 vix.h
+-r--r--r-- 1 mts mts 62376 Jun  3 01:06 vixCommands.h
+-r--r--r-- 1 mts mts 15266 Jun  3 01:06 vixOpenSource.h
+-r--r--r-- 1 mts mts  4132 Jun  3 01:06 vixTools.h
+-r--r--r-- 1 mts mts  6676 Jun  3 01:06 vmBackup.h
+-r--r--r-- 1 mts mts 14163 Jun  3 01:06 vmGuestLib.h
+-r--r--r-- 1 mts mts  1092 Jun  3 01:06 vmSessionId.h
+-r--r--r-- 1 mts mts  4139 Jun  3 01:06 vm_app.h
+-r--r--r-- 1 mts mts  9976 Jun  3 01:06 vm_assert.h
+-r--r--r-- 1 mts mts 54313 Jun  3 01:06 vm_atomic.h
+-r--r--r-- 1 mts mts 17721 Jun  3 01:06 vm_basic_asm.h
+-r--r--r-- 1 mts mts 16137 Jun  3 01:06 vm_basic_asm_x86.h
+-r--r--r-- 1 mts mts  8968 Jun  3 01:06 vm_basic_asm_x86_64.h
+-r--r--r-- 1 mts mts 12632 Jun  3 01:06 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21770 Jun  3 01:06 vm_basic_types.h
+-r--r--r-- 1 mts mts  2430 Jun  3 01:06 vm_ctype.h
+-r--r--r-- 1 mts mts  2118 Jun  3 01:06 vm_legal.h
+-r--r--r-- 1 mts mts 19398 Jun  3 01:06 vm_product.h
+-r--r--r-- 1 mts mts 30135 Jun  3 01:06 vm_tools_version.h
+-r--r--r-- 1 mts mts 16339 Jun  3 01:06 vm_version.h
+-r--r--r-- 1 mts mts  3582 Jun  3 01:06 vmbackup_def.h
+-r--r--r-- 1 mts mts  4356 Jun  3 01:06 vmblock.h
+-r--r--r-- 1 mts mts  1275 Jun  3 01:06 vmcheck.h
+-r--r--r-- 1 mts mts  1270 Jun  3 01:06 vmsignal.h
+-r--r--r-- 1 mts mts  1336 Jun  3 01:06 vmstdio.h
+-r--r--r-- 1 mts mts  1913 Jun  3 01:06 vmware.h
+-r--r--r-- 1 mts mts  1340 Jun  3 01:06 vmware_pack_begin.h
+-r--r--r-- 1 mts mts  1360 Jun  3 01:06 vmware_pack_end.h
+-r--r--r-- 1 mts mts  1980 Jun  3 01:06 vmware_pack_init.h
+-r--r--r-- 1 mts mts  7863 Jun  3 01:06 win32util.h
+-r--r--r-- 1 mts mts  2751 Jun  3 01:06 wiper.h
+-r--r--r-- 1 mts mts 37971 Jun  3 01:06 x86cpuid.h
+
+open-vm-tools-2008.06.03-96374/lib/include/compat:
 total 4
--r--r--r-- 1 mts mts 1906 May 16 18:20 compat_stdarg.h
+-r--r--r-- 1 mts mts 1906 Jun  3 01:06 compat_stdarg.h
 
-open-vm-tools-2008.05.15-93241/lib/message:
+open-vm-tools-2008.06.03-96374/lib/message:
 total 68
--r--r--r-- 1 mts mts  1084 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 18865 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  8278 May 16 18:20 message.c
--r--r--r-- 1 mts mts 17289 May 16 18:20 messageBackdoor.c
--r--r--r-- 1 mts mts  4751 May 16 18:20 messageStub.c
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 shared
-
-open-vm-tools-2008.05.15-93241/lib/message/shared:
+-r--r--r-- 1 mts mts  1084 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 18943 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  8278 Jun  3 01:06 message.c
+-r--r--r-- 1 mts mts 17289 Jun  3 01:06 messageBackdoor.c
+-r--r--r-- 1 mts mts  4751 Jun  3 01:06 messageStub.c
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
+
+open-vm-tools-2008.06.03-96374/lib/message/shared:
 total 24
--r--r--r-- 1 mts mts  1071 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 17797 May 16 18:20 Makefile.in
-
-open-vm-tools-2008.05.15-93241/lib/misc:
-total 436
--r--r--r-- 1 mts mts  1692 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 21068 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  2146 May 16 18:20 atomic.c
--r--r--r-- 1 mts mts 15371 May 16 18:20 base64.c
--r--r--r-- 1 mts mts 35741 May 16 18:20 codeset.c
--r--r--r-- 1 mts mts 55190 May 16 18:20 codesetOld.c
--r--r--r-- 1 mts mts  6339 May 16 18:20 codesetOld.h
--r--r--r-- 1 mts mts  8241 May 16 18:20 dbllnklst.c
--r--r--r-- 1 mts mts  6500 May 16 18:20 dynarray.c
--r--r--r-- 1 mts mts  9633 May 16 18:20 dynbuf.c
--r--r--r-- 1 mts mts 14569 May 16 18:20 escape.c
--r--r--r-- 1 mts mts 19809 May 16 18:20 hashTable.c
--r--r--r-- 1 mts mts  5943 May 16 18:20 hostinfo_misc.c
--r--r--r-- 1 mts mts  6141 May 16 18:20 hostname.c
--r--r--r-- 1 mts mts 22612 May 16 18:20 idLinux.c
--r--r--r-- 1 mts mts 24760 May 16 18:20 iovector.c
--r--r--r-- 1 mts mts 14910 May 16 18:20 machineID.c
--r--r--r-- 1 mts mts  2017 May 16 18:20 miscSolaris.c
--r--r--r-- 1 mts mts  1701 May 16 18:20 posixDlopen.c
--r--r--r-- 1 mts mts 48102 May 16 18:20 posixPosix.c
--r--r--r-- 1 mts mts 14322 May 16 18:20 posixWin32.c
--r--r--r-- 1 mts mts  5943 May 16 18:20 random.c
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 shared
--r--r--r-- 1 mts mts 25871 May 16 18:20 timeutil.c
--r--r--r-- 1 mts mts 12001 May 16 18:20 util_misc.c
--r--r--r-- 1 mts mts  6627 May 16 18:20 vmstdio.c
-
-open-vm-tools-2008.05.15-93241/lib/misc/shared:
+-r--r--r-- 1 mts mts  1071 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 17875 Jun  3 01:06 Makefile.in
+
+open-vm-tools-2008.06.03-96374/lib/misc:
+total 456
+-r--r--r-- 1 mts mts  1692 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 21146 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  2146 Jun  3 01:06 atomic.c
+-r--r--r-- 1 mts mts 15371 Jun  3 01:06 base64.c
+-r--r--r-- 1 mts mts 35741 Jun  3 01:06 codeset.c
+-r--r--r-- 1 mts mts 55532 Jun  3 01:06 codesetOld.c
+-r--r--r-- 1 mts mts  6339 Jun  3 01:06 codesetOld.h
+-r--r--r-- 1 mts mts  8247 Jun  3 01:06 dbllnklst.c
+-r--r--r-- 1 mts mts  6500 Jun  3 01:06 dynarray.c
+-r--r--r-- 1 mts mts  9876 Jun  3 01:06 dynbuf.c
+-r--r--r-- 1 mts mts 14569 Jun  3 01:06 escape.c
+-r--r--r-- 1 mts mts 21257 Jun  3 01:06 hashTable.c
+-r--r--r-- 1 mts mts  5943 Jun  3 01:06 hostinfo_misc.c
+-r--r--r-- 1 mts mts  6141 Jun  3 01:06 hostname.c
+-r--r--r-- 1 mts mts 22612 Jun  3 01:06 idLinux.c
+-r--r--r-- 1 mts mts 24760 Jun  3 01:06 iovector.c
+-r--r--r-- 1 mts mts 14910 Jun  3 01:06 machineID.c
+-r--r--r-- 1 mts mts  2017 Jun  3 01:06 miscSolaris.c
+-r--r--r-- 1 mts mts  1710 Jun  3 01:06 posixDlopen.c
+-r--r--r-- 1 mts mts  5776 Jun  3 01:06 posixInt.h
+-r--r--r-- 1 mts mts 49669 Jun  3 01:06 posixPosix.c
+-r--r--r-- 1 mts mts 14794 Jun  3 01:06 posixWin32.c
+-r--r--r-- 1 mts mts  5943 Jun  3 01:06 random.c
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
+-r--r--r-- 1 mts mts 25948 Jun  3 01:06 timeutil.c
+-r--r--r-- 1 mts mts 11943 Jun  3 01:06 util_misc.c
+-r--r--r-- 1 mts mts  7584 Jun  3 01:06 vmstdio.c
+
+open-vm-tools-2008.06.03-96374/lib/misc/shared:
 total 40
--r--r--r-- 1 mts mts  1674 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 33764 May 16 18:20 Makefile.in
+-r--r--r-- 1 mts mts  1674 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 33842 Jun  3 01:06 Makefile.in
 
-open-vm-tools-2008.05.15-93241/lib/netUtil:
+open-vm-tools-2008.06.03-96374/lib/netUtil:
 total 28
--r--r--r-- 1 mts mts   980 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14643 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  7417 May 16 18:20 netUtilLinux.c
+-r--r--r-- 1 mts mts   980 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14721 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  7417 Jun  3 01:06 netUtilLinux.c
 
-open-vm-tools-2008.05.15-93241/lib/panic:
+open-vm-tools-2008.06.03-96374/lib/panic:
 total 36
--r--r--r-- 1 mts mts   967 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14580 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 12986 May 16 18:20 panic.c
+-r--r--r-- 1 mts mts   967 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14658 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 12986 Jun  3 01:06 panic.c
 
-open-vm-tools-2008.05.15-93241/lib/panicDefault:
+open-vm-tools-2008.06.03-96374/lib/panicDefault:
 total 24
--r--r--r-- 1 mts mts   988 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14727 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  1488 May 16 18:20 panic.c
+-r--r--r-- 1 mts mts   988 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14805 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  1488 Jun  3 01:06 panic.c
 
-open-vm-tools-2008.05.15-93241/lib/printer:
+open-vm-tools-2008.06.03-96374/lib/printer:
 total 32
--r--r--r-- 1 mts mts   975 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14628 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  9721 May 16 18:20 printer.c
+-r--r--r-- 1 mts mts   975 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14706 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  9721 Jun  3 01:06 printer.c
 
-open-vm-tools-2008.05.15-93241/lib/procMgr:
+open-vm-tools-2008.06.03-96374/lib/procMgr:
 total 56
--r--r--r-- 1 mts mts  1017 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14679 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 36619 May 16 18:20 procMgrPosix.c
+-r--r--r-- 1 mts mts  1017 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14757 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 36619 Jun  3 01:06 procMgrPosix.c
 
-open-vm-tools-2008.05.15-93241/lib/rpcIn:
+open-vm-tools-2008.06.03-96374/lib/rpcIn:
 total 40
--r--r--r-- 1 mts mts   967 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14580 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 17356 May 16 18:20 rpcin.c
+-r--r--r-- 1 mts mts   967 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14658 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 17356 Jun  3 01:06 rpcin.c
 
-open-vm-tools-2008.05.15-93241/lib/rpcOut:
+open-vm-tools-2008.06.03-96374/lib/rpcOut:
 total 40
--r--r--r-- 1 mts mts  1000 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 18604 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 11694 May 16 18:20 rpcout.c
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 shared
+-r--r--r-- 1 mts mts  1000 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 18682 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 11999 Jun  3 01:06 rpcout.c
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
 
-open-vm-tools-2008.05.15-93241/lib/rpcOut/shared:
+open-vm-tools-2008.06.03-96374/lib/rpcOut/shared:
 total 20
--r--r--r-- 1 mts mts   979 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 15626 May 16 18:20 Makefile.in
+-r--r--r-- 1 mts mts   979 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15704 Jun  3 01:06 Makefile.in
 
-open-vm-tools-2008.05.15-93241/lib/rpcVmx:
+open-vm-tools-2008.06.03-96374/lib/rpcVmx:
 total 28
--r--r--r-- 1 mts mts   971 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14604 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  7278 May 16 18:20 rpcvmx.c
+-r--r--r-- 1 mts mts   971 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14682 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  7278 Jun  3 01:06 rpcvmx.c
 
-open-vm-tools-2008.05.15-93241/lib/socketMgr:
+open-vm-tools-2008.06.03-96374/lib/socketMgr:
 total 64
--r--r--r-- 1 mts mts   983 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14676 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 41905 May 16 18:20 socketMgr.c
+-r--r--r-- 1 mts mts   983 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14754 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 41905 Jun  3 01:06 socketMgr.c
 
-open-vm-tools-2008.05.15-93241/lib/strUtil:
+open-vm-tools-2008.06.03-96374/lib/strUtil:
 total 40
--r--r--r-- 1 mts mts   975 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 14628 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 16861 May 16 18:20 strutil.c
+-r--r--r-- 1 mts mts   975 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14706 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 16861 Jun  3 01:06 strutil.c
 
-open-vm-tools-2008.05.15-93241/lib/string:
+open-vm-tools-2008.06.03-96374/lib/string:
 total 212
--r--r--r-- 1 mts mts  1190 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 19112 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  8168 May 16 18:20 bsd_output_shared.c
--r--r--r-- 1 mts mts 50068 May 16 18:20 bsd_vsnprintf.c
--r--r--r-- 1 mts mts 51480 May 16 18:20 bsd_vsnwprintf.c
--r--r--r-- 1 mts mts 19245 May 16 18:20 convertutf.c
--r--r--r-- 1 mts mts  6119 May 16 18:20 convertutf.h
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 shared
--r--r--r-- 1 mts mts 32823 May 16 18:20 str.c
-
-open-vm-tools-2008.05.15-93241/lib/string/shared:
+-r--r--r-- 1 mts mts  1190 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 19190 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  8168 Jun  3 01:06 bsd_output_shared.c
+-r--r--r-- 1 mts mts 50068 Jun  3 01:06 bsd_vsnprintf.c
+-r--r--r-- 1 mts mts 51480 Jun  3 01:06 bsd_vsnwprintf.c
+-r--r--r-- 1 mts mts 19245 Jun  3 01:06 convertutf.c
+-r--r--r-- 1 mts mts  6119 Jun  3 01:06 convertutf.h
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
+-r--r--r-- 1 mts mts 32929 Jun  3 01:06 str.c
+
+open-vm-tools-2008.06.03-96374/lib/string/shared:
 total 24
--r--r--r-- 1 mts mts  1185 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 19913 May 16 18:20 Makefile.in
+-r--r--r-- 1 mts mts  1185 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 19991 Jun  3 01:06 Makefile.in
 
-open-vm-tools-2008.05.15-93241/lib/sync:
+open-vm-tools-2008.06.03-96374/lib/sync:
 total 60
--r--r--r-- 1 mts mts  1035 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 18691 May 16 18:20 Makefile.in
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 shared
--r--r--r-- 1 mts mts  6533 May 16 18:20 syncMutex.c
--r--r--r-- 1 mts mts 21469 May 16 18:20 syncWaitQPosix.c
+-r--r--r-- 1 mts mts  1035 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 18769 Jun  3 01:06 Makefile.in
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
+-r--r--r-- 1 mts mts  6533 Jun  3 01:06 syncMutex.c
+-r--r--r-- 1 mts mts 21469 Jun  3 01:06 syncWaitQPosix.c
 
-open-vm-tools-2008.05.15-93241/lib/sync/shared:
+open-vm-tools-2008.06.03-96374/lib/sync/shared:
 total 24
--r--r--r-- 1 mts mts  1018 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 16728 May 16 18:20 Makefile.in
+-r--r--r-- 1 mts mts  1018 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 16806 Jun  3 01:06 Makefile.in
 
-open-vm-tools-2008.05.15-93241/lib/syncDriver:
+open-vm-tools-2008.06.03-96374/lib/syncDriver:
 total 32
--r--r--r-- 1 mts mts   992 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14715 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  8740 May 16 18:20 syncDriverPosix.c
+-r--r--r-- 1 mts mts   992 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14793 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  8740 Jun  3 01:06 syncDriverPosix.c
 
-open-vm-tools-2008.05.15-93241/lib/system:
+open-vm-tools-2008.06.03-96374/lib/system:
 total 32
--r--r--r-- 1 mts mts   953 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14619 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  9382 May 16 18:20 systemLinux.c
+-r--r--r-- 1 mts mts   953 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14697 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  9382 Jun  3 01:06 systemLinux.c
 
-open-vm-tools-2008.05.15-93241/lib/toolsLogger:
+open-vm-tools-2008.06.03-96374/lib/toolsLogger:
 total 36
--r--r--r-- 1 mts mts   986 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14709 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 15172 May 16 18:20 logger.c
+-r--r--r-- 1 mts mts   986 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14787 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 15172 Jun  3 01:06 logger.c
 
-open-vm-tools-2008.05.15-93241/lib/unicode:
+open-vm-tools-2008.06.03-96374/lib/unicode:
 total 232
--r--r--r-- 1 mts mts  1315 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 15902 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 11673 May 16 18:20 unicodeCommon.c
--r--r--r-- 1 mts mts 13870 May 16 18:20 unicodeICU.c
--r--r--r-- 1 mts mts 23227 May 16 18:20 unicodeSimpleBase.c
--r--r--r-- 1 mts mts 34559 May 16 18:20 unicodeSimpleCaseFolding.c
--r--r--r-- 1 mts mts 15794 May 16 18:20 unicodeSimpleOperations.c
--r--r--r-- 1 mts mts 18115 May 16 18:20 unicodeSimpleTransforms.c
--r--r--r-- 1 mts mts 74267 May 16 18:20 unicodeSimpleTypes.c
--r--r--r-- 1 mts mts  5087 May 16 18:20 unicodeStatic.c
-
-open-vm-tools-2008.05.15-93241/lib/unityStub:
+-r--r--r-- 1 mts mts  1315 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15980 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 11904 Jun  3 01:06 unicodeCommon.c
+-r--r--r-- 1 mts mts 13870 Jun  3 01:06 unicodeICU.c
+-r--r--r-- 1 mts mts 23894 Jun  3 01:06 unicodeSimpleBase.c
+-r--r--r-- 1 mts mts 34559 Jun  3 01:06 unicodeSimpleCaseFolding.c
+-r--r--r-- 1 mts mts 15794 Jun  3 01:06 unicodeSimpleOperations.c
+-r--r--r-- 1 mts mts 18115 Jun  3 01:06 unicodeSimpleTransforms.c
+-r--r--r-- 1 mts mts 77418 Jun  3 01:06 unicodeSimpleTypes.c
+-r--r--r-- 1 mts mts  5087 Jun  3 01:06 unicodeStatic.c
+
+open-vm-tools-2008.06.03-96374/lib/unityStub:
 total 24
--r--r--r-- 1 mts mts  1016 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 14708 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  1637 May 16 18:20 unityStub.c
+-r--r--r-- 1 mts mts  1016 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14786 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  1637 Jun  3 01:06 unityStub.c
 
-open-vm-tools-2008.05.15-93241/lib/user:
+open-vm-tools-2008.06.03-96374/lib/user:
 total 132
--r--r--r-- 1 mts mts  1098 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 14915 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  9683 May 16 18:20 hostinfo.c
--r--r--r-- 1 mts mts 38636 May 16 18:20 hostinfoPosix.c
--r--r--r-- 1 mts mts 39710 May 16 18:20 util.c
--r--r--r-- 1 mts mts 18792 May 16 18:20 utilPosix.c
-
-open-vm-tools-2008.05.15-93241/lib/vixTools:
+-r--r--r-- 1 mts mts  1098 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14993 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  9683 Jun  3 01:06 hostinfo.c
+-r--r--r-- 1 mts mts 38636 Jun  3 01:06 hostinfoPosix.c
+-r--r--r-- 1 mts mts 39710 Jun  3 01:06 util.c
+-r--r--r-- 1 mts mts 18792 Jun  3 01:06 utilPosix.c
+
+open-vm-tools-2008.06.03-96374/lib/vixTools:
 total 136
--r--r--r-- 1 mts mts    979 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts  14652 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 111884 May 16 18:20 vixTools.c
+-r--r--r-- 1 mts mts    979 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts  14730 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 112594 Jun  3 01:06 vixTools.c
 
-open-vm-tools-2008.05.15-93241/lib/vmBackupLib:
+open-vm-tools-2008.06.03-96374/lib/vmBackupLib:
 total 72
--r--r--r-- 1 mts mts  1076 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14952 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 12762 May 16 18:20 scriptOps.c
--r--r--r-- 1 mts mts 20320 May 16 18:20 stateMachine.c
--r--r--r-- 1 mts mts  9036 May 16 18:20 syncDriverOps.c
--r--r--r-- 1 mts mts  1264 May 16 18:20 vmBackupInt.h
-
-open-vm-tools-2008.05.15-93241/lib/vmCheck:
+-r--r--r-- 1 mts mts  1076 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15030 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 12762 Jun  3 01:06 scriptOps.c
+-r--r--r-- 1 mts mts 20320 Jun  3 01:06 stateMachine.c
+-r--r--r-- 1 mts mts  9036 Jun  3 01:06 syncDriverOps.c
+-r--r--r-- 1 mts mts  1264 Jun  3 01:06 vmBackupInt.h
+
+open-vm-tools-2008.06.03-96374/lib/vmCheck:
 total 28
--r--r--r-- 1 mts mts   975 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14628 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  5337 May 16 18:20 vmcheck.c
+-r--r--r-- 1 mts mts   975 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14706 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  5337 Jun  3 01:06 vmcheck.c
 
-open-vm-tools-2008.05.15-93241/lib/vmSignal:
+open-vm-tools-2008.06.03-96374/lib/vmSignal:
 total 24
--r--r--r-- 1 mts mts   979 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 14652 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  3080 May 16 18:20 vmsignal.c
+-r--r--r-- 1 mts mts   979 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14730 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  3080 Jun  3 01:06 vmsignal.c
 
-open-vm-tools-2008.05.15-93241/lib/wiper:
+open-vm-tools-2008.06.03-96374/lib/wiper:
 total 44
--r--r--r-- 1 mts mts   972 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 14595 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 24462 May 16 18:20 wiperPosix.c
+-r--r--r-- 1 mts mts   972 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 14673 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 24462 Jun  3 01:06 wiperPosix.c
 
-open-vm-tools-2008.05.15-93241/libguestlib:
+open-vm-tools-2008.06.03-96374/libguestlib:
 total 100
--r--r--r-- 1 mts mts 26425 May 16 18:20 COPYING
--r--r--r-- 1 mts mts  1757 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 17165 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  1413 May 16 18:20 stubs.c
--r--r--r-- 1 mts mts 26218 May 16 18:20 vmGuestLib.c
--r--r--r-- 1 mts mts  4228 May 16 18:20 vmGuestLibInt.h
--r--r--r-- 1 mts mts  2436 May 16 18:20 vmGuestLibPanic.c
--r--r--r-- 1 mts mts  1547 May 16 18:20 vmguestlib_version.h
-
-open-vm-tools-2008.05.15-93241/modules:
+-r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  1757 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 17243 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  1413 Jun  3 01:06 stubs.c
+-r--r--r-- 1 mts mts 26218 Jun  3 01:06 vmGuestLib.c
+-r--r--r-- 1 mts mts  4228 Jun  3 01:06 vmGuestLibInt.h
+-r--r--r-- 1 mts mts  2436 Jun  3 01:06 vmGuestLibPanic.c
+-r--r--r-- 1 mts mts  1547 Jun  3 01:06 vmguestlib_version.h
+
+open-vm-tools-2008.06.03-96374/modules:
 total 24
--rwxr-xr-x 1 mts mts  351 May 16 18:19 Makefile.am
--rw-r--r-- 1 mts mts 9825 May 16 18:20 Makefile.in
-drwxr-xr-x 6 mts mts 4096 May 16 18:19 freebsd
-drwxr-xr-x 7 mts mts 4096 May 16 18:19 linux
+-rwxr-xr-x 1 mts mts  1160 Jun  3 01:05 Makefile.am
+-rw-r--r-- 1 mts mts 10993 Jun  3 01:06 Makefile.in
+drwxr-xr-x 6 mts mts  4096 Jun  3 01:06 freebsd
+drwxr-xr-x 7 mts mts  4096 Jun  3 01:06 linux
 
-open-vm-tools-2008.05.15-93241/modules/freebsd:
+open-vm-tools-2008.06.03-96374/modules/freebsd:
 total 16
-drwxr-xr-x 2 mts mts 4096 May 16 18:19 vmblock
-drwxr-xr-x 2 mts mts 4096 May 16 18:19 vmhgfs
-drwxr-xr-x 2 mts mts 4096 May 16 18:19 vmmemctl
-drwxr-xr-x 2 mts mts 4096 May 16 18:19 vmxnet
+drwxr-xr-x 2 mts mts 4096 Jun  3 01:05 vmblock
+drwxr-xr-x 2 mts mts 4096 Jun  3 01:05 vmhgfs
+drwxr-xr-x 2 mts mts 4096 Jun  3 01:06 vmmemctl
+drwxr-xr-x 2 mts mts 4096 Jun  3 01:06 vmxnet
 
-open-vm-tools-2008.05.15-93241/modules/freebsd/vmblock:
+open-vm-tools-2008.06.03-96374/modules/freebsd/vmblock:
 total 220
--r--r--r-- 1 mts mts  1430 May 16 18:19 COPYING.BSD
--r--r--r-- 1 mts mts  2151 May 16 18:19 Makefile
--r--r--r-- 1 mts mts 17267 May 16 18:19 block.c
--r--r--r-- 1 mts mts  2375 May 16 18:19 block.h
--r--r--r-- 1 mts mts  9048 May 16 18:19 dbllnklst.c
--r--r--r-- 1 mts mts  3181 May 16 18:19 dbllnklst.h
--r--r--r-- 1 mts mts     0 May 16 18:19 includeCheck.h
--r--r--r-- 1 mts mts  5980 May 16 18:19 os.h
--r--r--r-- 1 mts mts  2141 May 16 18:19 stubs.c
--r--r--r-- 1 mts mts  1888 May 16 18:19 stubs.h
--r--r--r-- 1 mts mts 19458 May 16 18:19 subr.c
--r--r--r-- 1 mts mts 13036 May 16 18:19 vfsops.c
--r--r--r-- 1 mts mts 10783 May 16 18:19 vm_assert.h
--r--r--r-- 1 mts mts 13439 May 16 18:19 vm_basic_defs.h
--r--r--r-- 1 mts mts 22577 May 16 18:19 vm_basic_types.h
--r--r--r-- 1 mts mts  5163 May 16 18:19 vmblock.h
--r--r--r-- 1 mts mts  5872 May 16 18:19 vmblock_k.h
--r--r--r-- 1 mts mts  2720 May 16 18:19 vmware.h
--r--r--r-- 1 mts mts 45731 May 16 18:19 vnops.c
-
-open-vm-tools-2008.05.15-93241/modules/freebsd/vmhgfs:
+-r--r--r-- 1 mts mts  1430 Jun  3 01:05 COPYING.BSD
+-r--r--r-- 1 mts mts  2151 Jun  3 01:05 Makefile
+-r--r--r-- 1 mts mts 17267 Jun  3 01:05 block.c
+-r--r--r-- 1 mts mts  2375 Jun  3 01:05 block.h
+-r--r--r-- 1 mts mts  9054 Jun  3 01:05 dbllnklst.c
+-r--r--r-- 1 mts mts  3187 Jun  3 01:05 dbllnklst.h
+-r--r--r-- 1 mts mts     0 Jun  3 01:05 includeCheck.h
+-r--r--r-- 1 mts mts  5980 Jun  3 01:05 os.h
+-r--r--r-- 1 mts mts  2141 Jun  3 01:05 stubs.c
+-r--r--r-- 1 mts mts  1888 Jun  3 01:05 stubs.h
+-r--r--r-- 1 mts mts 19458 Jun  3 01:05 subr.c
+-r--r--r-- 1 mts mts 13036 Jun  3 01:05 vfsops.c
+-r--r--r-- 1 mts mts 10783 Jun  3 01:05 vm_assert.h
+-r--r--r-- 1 mts mts 13439 Jun  3 01:05 vm_basic_defs.h
+-r--r--r-- 1 mts mts 22577 Jun  3 01:05 vm_basic_types.h
+-r--r--r-- 1 mts mts  5163 Jun  3 01:05 vmblock.h
+-r--r--r-- 1 mts mts  5872 Jun  3 01:05 vmblock_k.h
+-r--r--r-- 1 mts mts  2720 Jun  3 01:05 vmware.h
+-r--r--r-- 1 mts mts 45731 Jun  3 01:05 vnops.c
+
+open-vm-tools-2008.06.03-96374/modules/freebsd/vmhgfs:
 total 764
--r--r--r-- 1 mts mts 17987 May 16 18:19 COPYING
--r--r--r-- 1 mts mts  2652 May 16 18:19 Makefile
--r--r--r-- 1 mts mts  6383 May 16 18:19 backdoor.c
--r--r--r-- 1 mts mts  1337 May 16 18:19 backdoor.h
--r--r--r-- 1 mts mts  6174 May 16 18:19 backdoorGcc32.c
--r--r--r-- 1 mts mts  5550 May 16 18:19 backdoorGcc64.c
--r--r--r-- 1 mts mts  1032 May 16 18:19 backdoorInt.h
--r--r--r-- 1 mts mts  5883 May 16 18:19 backdoor_def.h
--r--r--r-- 1 mts mts  3543 May 16 18:19 backdoor_types.h
--r--r--r-- 1 mts mts 12045 May 16 18:19 cpName.c
--r--r--r-- 1 mts mts  4174 May 16 18:19 cpName.h
--r--r--r-- 1 mts mts  1798 May 16 18:19 cpNameInt.h
--r--r--r-- 1 mts mts  5763 May 16 18:19 cpNameLinux.c
--r--r--r-- 1 mts mts  2642 May 16 18:19 cpNameLite.c
--r--r--r-- 1 mts mts  1710 May 16 18:19 cpNameLite.h
--r--r--r-- 1 mts mts  8217 May 16 18:19 dbllnklst.c
--r--r--r-- 1 mts mts  2350 May 16 18:19 dbllnklst.h
--r--r--r-- 1 mts mts  4769 May 16 18:19 debug.c
--r--r--r-- 1 mts mts  3358 May 16 18:19 debug.h
--r--r--r-- 1 mts mts  3832 May 16 18:19 escBitvector.h
--r--r--r-- 1 mts mts 25043 May 16 18:19 fsutil.c
--r--r--r-- 1 mts mts  3506 May 16 18:19 fsutil.h
--r--r--r-- 1 mts mts  3006 May 16 18:19 guest_msg_def.h
--r--r--r-- 1 mts mts  7008 May 16 18:19 hgfs.h
--r--r--r-- 1 mts mts  8689 May 16 18:19 hgfsBd.c
--r--r--r-- 1 mts mts  1450 May 16 18:19 hgfsBd.h
--r--r--r-- 1 mts mts 39688 May 16 18:19 hgfsProto.h
--r--r--r-- 1 mts mts  6822 May 16 18:19 hgfsUtil.c
--r--r--r-- 1 mts mts  3737 May 16 18:19 hgfsUtil.h
--r--r--r-- 1 mts mts  5685 May 16 18:19 hgfs_kernel.h
--r--r--r-- 1 mts mts  4262 May 16 18:19 includeCheck.h
--r--r--r-- 1 mts mts  4774 May 16 18:19 kernelStubs.h
--r--r--r-- 1 mts mts  6043 May 16 18:19 kernelStubsBSD.c
--r--r--r-- 1 mts mts  8254 May 16 18:19 message.c
--r--r--r-- 1 mts mts  3529 May 16 18:19 message.h
--r--r--r-- 1 mts mts 17265 May 16 18:19 messageBackdoor.c
--r--r--r-- 1 mts mts 16112 May 16 18:19 os.c
--r--r--r-- 1 mts mts  4229 May 16 18:19 os.h
--r--r--r-- 1 mts mts 22550 May 16 18:19 request.c
--r--r--r-- 1 mts mts  3184 May 16 18:19 request.h
--r--r--r-- 1 mts mts  6298 May 16 18:19 requestInt.h
--r--r--r-- 1 mts mts 11670 May 16 18:19 rpcout.c
--r--r--r-- 1 mts mts  1963 May 16 18:19 rpcout.h
--r--r--r-- 1 mts mts  6515 May 16 18:19 sha1.c
--r--r--r-- 1 mts mts  2207 May 16 18:19 sha1.h
--r--r--r-- 1 mts mts 46819 May 16 18:19 state.c
--r--r--r-- 1 mts mts  6710 May 16 18:19 state.h
--r--r--r-- 1 mts mts  8823 May 16 18:19 staticEscape.c
--r--r--r-- 1 mts mts  2481 May 16 18:19 staticEscape.h
--r--r--r-- 1 mts mts  9540 May 16 18:19 vfsops.c
--r--r--r-- 1 mts mts  9952 May 16 18:19 vm_assert.h
--r--r--r-- 1 mts mts 17697 May 16 18:19 vm_basic_asm.h
--r--r--r-- 1 mts mts 16113 May 16 18:19 vm_basic_asm_x86.h
--r--r--r-- 1 mts mts  8944 May 16 18:19 vm_basic_asm_x86_64.h
--r--r--r-- 1 mts mts 12608 May 16 18:19 vm_basic_defs.h
--r--r--r-- 1 mts mts 21746 May 16 18:19 vm_basic_types.h
--r--r--r-- 1 mts mts  1889 May 16 18:19 vmware.h
--r--r--r-- 1 mts mts  1316 May 16 18:19 vmware_pack_begin.h
--r--r--r-- 1 mts mts  1336 May 16 18:19 vmware_pack_end.h
--r--r--r-- 1 mts mts  1956 May 16 18:19 vmware_pack_init.h
--r--r--r-- 1 mts mts 23185 May 16 18:19 vnops.c
--r--r--r-- 1 mts mts 77726 May 16 18:19 vnopscommon.c
--r--r--r-- 1 mts mts  3216 May 16 18:19 vnopscommon.h
--r--r--r-- 1 mts mts  6265 May 16 18:19 worker.c
--r--r--r-- 1 mts mts 38003 May 16 18:19 x86cpuid.h
-
-open-vm-tools-2008.05.15-93241/modules/freebsd/vmmemctl:
+-r--r--r-- 1 mts mts 17987 Jun  3 01:05 COPYING
+-r--r--r-- 1 mts mts  2652 Jun  3 01:06 Makefile
+-r--r--r-- 1 mts mts  6383 Jun  3 01:06 backdoor.c
+-r--r--r-- 1 mts mts  1337 Jun  3 01:06 backdoor.h
+-r--r--r-- 1 mts mts  6174 Jun  3 01:06 backdoorGcc32.c
+-r--r--r-- 1 mts mts  5550 Jun  3 01:06 backdoorGcc64.c
+-r--r--r-- 1 mts mts  1032 Jun  3 01:06 backdoorInt.h
+-r--r--r-- 1 mts mts  5883 Jun  3 01:06 backdoor_def.h
+-r--r--r-- 1 mts mts  3543 Jun  3 01:06 backdoor_types.h
+-r--r--r-- 1 mts mts 12045 Jun  3 01:06 cpName.c
+-r--r--r-- 1 mts mts  4174 Jun  3 01:06 cpName.h
+-r--r--r-- 1 mts mts  1798 Jun  3 01:06 cpNameInt.h
+-r--r--r-- 1 mts mts  5763 Jun  3 01:06 cpNameLinux.c
+-r--r--r-- 1 mts mts  2642 Jun  3 01:06 cpNameLite.c
+-r--r--r-- 1 mts mts  1710 Jun  3 01:06 cpNameLite.h
+-r--r--r-- 1 mts mts  8223 Jun  3 01:06 dbllnklst.c
+-r--r--r-- 1 mts mts  2356 Jun  3 01:06 dbllnklst.h
+-r--r--r-- 1 mts mts  4769 Jun  3 01:06 debug.c
+-r--r--r-- 1 mts mts  3358 Jun  3 01:06 debug.h
+-r--r--r-- 1 mts mts  3832 Jun  3 01:06 escBitvector.h
+-r--r--r-- 1 mts mts 25043 Jun  3 01:06 fsutil.c
+-r--r--r-- 1 mts mts  3506 Jun  3 01:06 fsutil.h
+-r--r--r-- 1 mts mts  3006 Jun  3 01:06 guest_msg_def.h
+-r--r--r-- 1 mts mts  7008 Jun  3 01:06 hgfs.h
+-r--r--r-- 1 mts mts  8689 Jun  3 01:06 hgfsBd.c
+-r--r--r-- 1 mts mts  1450 Jun  3 01:06 hgfsBd.h
+-r--r--r-- 1 mts mts 39298 Jun  3 01:06 hgfsProto.h
+-r--r--r-- 1 mts mts  6822 Jun  3 01:06 hgfsUtil.c
+-r--r--r-- 1 mts mts  3737 Jun  3 01:06 hgfsUtil.h
+-r--r--r-- 1 mts mts  5685 Jun  3 01:06 hgfs_kernel.h
+-r--r--r-- 1 mts mts  4262 Jun  3 01:06 includeCheck.h
+-r--r--r-- 1 mts mts  4774 Jun  3 01:06 kernelStubs.h
+-r--r--r-- 1 mts mts  6043 Jun  3 01:06 kernelStubsBSD.c
+-r--r--r-- 1 mts mts  8254 Jun  3 01:06 message.c
+-r--r--r-- 1 mts mts  3529 Jun  3 01:06 message.h
+-r--r--r-- 1 mts mts 17265 Jun  3 01:06 messageBackdoor.c
+-r--r--r-- 1 mts mts 16112 Jun  3 01:05 os.c
+-r--r--r-- 1 mts mts  4229 Jun  3 01:06 os.h
+-r--r--r-- 1 mts mts 22550 Jun  3 01:05 request.c
+-r--r--r-- 1 mts mts  3184 Jun  3 01:06 request.h
+-r--r--r-- 1 mts mts  6298 Jun  3 01:06 requestInt.h
+-r--r--r-- 1 mts mts 11975 Jun  3 01:06 rpcout.c
+-r--r--r-- 1 mts mts  1963 Jun  3 01:06 rpcout.h
+-r--r--r-- 1 mts mts  6515 Jun  3 01:06 sha1.c
+-r--r--r-- 1 mts mts  2207 Jun  3 01:06 sha1.h
+-r--r--r-- 1 mts mts 46819 Jun  3 01:06 state.c
+-r--r--r-- 1 mts mts  6710 Jun  3 01:06 state.h
+-r--r--r-- 1 mts mts  8823 Jun  3 01:06 staticEscape.c
+-r--r--r-- 1 mts mts  2481 Jun  3 01:06 staticEscape.h
+-r--r--r-- 1 mts mts  9540 Jun  3 01:05 vfsops.c
+-r--r--r-- 1 mts mts  9952 Jun  3 01:06 vm_assert.h
+-r--r--r-- 1 mts mts 17697 Jun  3 01:06 vm_basic_asm.h
+-r--r--r-- 1 mts mts 16113 Jun  3 01:06 vm_basic_asm_x86.h
+-r--r--r-- 1 mts mts  8944 Jun  3 01:06 vm_basic_asm_x86_64.h
+-r--r--r-- 1 mts mts 12608 Jun  3 01:06 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21746 Jun  3 01:06 vm_basic_types.h
+-r--r--r-- 1 mts mts  1889 Jun  3 01:06 vmware.h
+-r--r--r-- 1 mts mts  1316 Jun  3 01:06 vmware_pack_begin.h
+-r--r--r-- 1 mts mts  1336 Jun  3 01:06 vmware_pack_end.h
+-r--r--r-- 1 mts mts  1956 Jun  3 01:06 vmware_pack_init.h
+-r--r--r-- 1 mts mts 23185 Jun  3 01:05 vnops.c
+-r--r--r-- 1 mts mts 77726 Jun  3 01:06 vnopscommon.c
+-r--r--r-- 1 mts mts  3216 Jun  3 01:06 vnopscommon.h
+-r--r--r-- 1 mts mts  6265 Jun  3 01:06 worker.c
+-r--r--r-- 1 mts mts 37947 Jun  3 01:06 x86cpuid.h
+
+open-vm-tools-2008.06.03-96374/modules/freebsd/vmmemctl:
 total 184
--r--r--r-- 1 mts mts 17987 May 16 18:19 COPYING
--r--r--r-- 1 mts mts  1259 May 16 18:19 Makefile
--r--r--r-- 1 mts mts   430 May 16 18:19 README
--r--r--r-- 1 mts mts  1337 May 16 18:19 backdoor.h
--r--r--r-- 1 mts mts  6174 May 16 18:19 backdoorGcc32.c
--r--r--r-- 1 mts mts  5550 May 16 18:19 backdoorGcc64.c
--r--r--r-- 1 mts mts  1032 May 16 18:19 backdoorInt.h
--r--r--r-- 1 mts mts  1338 May 16 18:19 backdoor_balloon.h
--r--r--r-- 1 mts mts  3543 May 16 18:19 backdoor_types.h
--r--r--r-- 1 mts mts  2622 May 16 18:19 balloon_def.h
--r--r--r-- 1 mts mts  4262 May 16 18:19 includeCheck.h
--r--r--r-- 1 mts mts 10240 May 16 18:19 os.c
--r--r--r-- 1 mts mts  2441 May 16 18:19 os.h
--r--r--r-- 1 mts mts  9952 May 16 18:19 vm_assert.h
--r--r--r-- 1 mts mts 12608 May 16 18:19 vm_basic_defs.h
--r--r--r-- 1 mts mts 21746 May 16 18:19 vm_basic_types.h
--r--r--r-- 1 mts mts 37545 May 16 18:19 vmballoon.c
--r--r--r-- 1 mts mts  2048 May 16 18:19 vmballoon.h
-
-open-vm-tools-2008.05.15-93241/modules/freebsd/vmxnet:
+-r--r--r-- 1 mts mts 17987 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  1259 Jun  3 01:06 Makefile
+-r--r--r-- 1 mts mts   430 Jun  3 01:06 README
+-r--r--r-- 1 mts mts  1337 Jun  3 01:06 backdoor.h
+-r--r--r-- 1 mts mts  6174 Jun  3 01:06 backdoorGcc32.c
+-r--r--r-- 1 mts mts  5550 Jun  3 01:06 backdoorGcc64.c
+-r--r--r-- 1 mts mts  1032 Jun  3 01:06 backdoorInt.h
+-r--r--r-- 1 mts mts  1338 Jun  3 01:06 backdoor_balloon.h
+-r--r--r-- 1 mts mts  3543 Jun  3 01:06 backdoor_types.h
+-r--r--r-- 1 mts mts  2622 Jun  3 01:06 balloon_def.h
+-r--r--r-- 1 mts mts  4262 Jun  3 01:06 includeCheck.h
+-r--r--r-- 1 mts mts 10240 Jun  3 01:06 os.c
+-r--r--r-- 1 mts mts  2441 Jun  3 01:06 os.h
+-r--r--r-- 1 mts mts  9952 Jun  3 01:06 vm_assert.h
+-r--r--r-- 1 mts mts 12608 Jun  3 01:06 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21746 Jun  3 01:06 vm_basic_types.h
+-r--r--r-- 1 mts mts 37545 Jun  3 01:06 vmballoon.c
+-r--r--r-- 1 mts mts  2048 Jun  3 01:06 vmballoon.h
+
+open-vm-tools-2008.06.03-96374/modules/freebsd/vmxnet:
 total 136
--r--r--r-- 1 mts mts 17987 May 16 18:19 COPYING
--r--r--r-- 1 mts mts  1222 May 16 18:19 Makefile
--r--r--r-- 1 mts mts 35544 May 16 18:19 if_vxn.c
--r--r--r-- 1 mts mts     0 May 16 18:19 includeCheck.h
--r--r--r-- 1 mts mts  2426 May 16 18:19 net.h
--r--r--r-- 1 mts mts  6515 May 16 18:19 net_compat.h
--r--r--r-- 1 mts mts  2240 May 16 18:19 net_sg.h
--r--r--r-- 1 mts mts 21746 May 16 18:19 vm_basic_types.h
--r--r--r-- 1 mts mts  7197 May 16 18:19 vm_device_version.h
--r--r--r-- 1 mts mts  3180 May 16 18:19 vmnet_def.h
--r--r--r-- 1 mts mts 14595 May 16 18:19 vmxnet2_def.h
--r--r--r-- 1 mts mts  6793 May 16 18:19 vmxnet_def.h
-
-open-vm-tools-2008.05.15-93241/modules/linux:
+-r--r--r-- 1 mts mts 17987 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  1222 Jun  3 01:06 Makefile
+-r--r--r-- 1 mts mts 35544 Jun  3 01:06 if_vxn.c
+-r--r--r-- 1 mts mts     0 Jun  3 01:06 includeCheck.h
+-r--r--r-- 1 mts mts  2426 Jun  3 01:06 net.h
+-r--r--r-- 1 mts mts  6515 Jun  3 01:06 net_compat.h
+-r--r--r-- 1 mts mts  2240 Jun  3 01:06 net_sg.h
+-r--r--r-- 1 mts mts 21746 Jun  3 01:06 vm_basic_types.h
+-r--r--r-- 1 mts mts  7197 Jun  3 01:06 vm_device_version.h
+-r--r--r-- 1 mts mts  3180 Jun  3 01:06 vmnet_def.h
+-r--r--r-- 1 mts mts 14595 Jun  3 01:06 vmxnet2_def.h
+-r--r--r-- 1 mts mts  6793 Jun  3 01:06 vmxnet_def.h
+
+open-vm-tools-2008.06.03-96374/modules/linux:
 total 20
-drwxr-xr-x 5 mts mts 4096 May 16 18:19 vmblock
-drwxr-xr-x 3 mts mts 4096 May 16 18:19 vmhgfs
-drwxr-xr-x 3 mts mts 4096 May 16 18:19 vmmemctl
-drwxr-xr-x 3 mts mts 4096 May 16 18:19 vmsync
-drwxr-xr-x 3 mts mts 4096 May 16 18:19 vmxnet
+drwxr-xr-x 5 mts mts 4096 Jun  3 01:05 vmblock
+drwxr-xr-x 3 mts mts 4096 Jun  3 01:05 vmhgfs
+drwxr-xr-x 3 mts mts 4096 Jun  3 01:06 vmmemctl
+drwxr-xr-x 3 mts mts 4096 Jun  3 01:06 vmsync
+drwxr-xr-x 3 mts mts 4096 Jun  3 01:06 vmxnet
 
-open-vm-tools-2008.05.15-93241/modules/linux/vmblock:
+open-vm-tools-2008.06.03-96374/modules/linux/vmblock:
 total 52
--r--r--r-- 1 mts mts 17987 May 16 18:19 COPYING
--r--r--r-- 1 mts mts  3761 May 16 18:19 Makefile
--r--r--r-- 1 mts mts  2009 May 16 18:19 Makefile.kernel
--r--r--r-- 1 mts mts  4136 May 16 18:19 Makefile.normal
--r--r--r-- 1 mts mts   481 May 16 18:19 README
-drwxr-xr-x 2 mts mts  4096 May 16 18:19 autoconf
-drwxr-xr-x 2 mts mts  4096 May 16 18:19 include
-drwxr-xr-x 2 mts mts  4096 May 16 18:19 linux
-
-open-vm-tools-2008.05.15-93241/modules/linux/vmblock/autoconf:
+-r--r--r-- 1 mts mts 17987 Jun  3 01:05 COPYING
+-r--r--r-- 1 mts mts  3761 Jun  3 01:05 Makefile
+-r--r--r-- 1 mts mts  2009 Jun  3 01:05 Makefile.kernel
+-r--r--r-- 1 mts mts  4136 Jun  3 01:05 Makefile.normal
+-r--r--r-- 1 mts mts   481 Jun  3 01:05 README
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:05 autoconf
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:05 include
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:05 linux
+
+open-vm-tools-2008.06.03-96374/modules/linux/vmblock/autoconf:
 total 36
--r--r--r-- 1 mts mts 1670 May 16 18:19 cachecreate.c
--r--r--r-- 1 mts mts 1718 May 16 18:19 cachector.c
--r--r--r-- 1 mts mts 1261 May 16 18:19 epoll.c
--r--r--r-- 1 mts mts 1710 May 16 18:19 filldir1.c
--r--r--r-- 1 mts mts 1204 May 16 18:19 geninclude.c
--r--r--r-- 1 mts mts 1596 May 16 18:19 getsb1.c
--r--r--r-- 1 mts mts 1139 May 16 18:19 setnice.c
--r--r--r-- 1 mts mts 1259 May 16 18:19 skas1.c
--r--r--r-- 1 mts mts 1463 May 16 18:19 statfs1.c
-
-open-vm-tools-2008.05.15-93241/modules/linux/vmblock/include:
+-r--r--r-- 1 mts mts 1670 Jun  3 01:05 cachecreate.c
+-r--r--r-- 1 mts mts 1718 Jun  3 01:05 cachector.c
+-r--r--r-- 1 mts mts 1261 Jun  3 01:05 epoll.c
+-r--r--r-- 1 mts mts 1710 Jun  3 01:05 filldir1.c
+-r--r--r-- 1 mts mts 1204 Jun  3 01:05 geninclude.c
+-r--r--r-- 1 mts mts 1596 Jun  3 01:05 getsb1.c
+-r--r--r-- 1 mts mts 1139 Jun  3 01:05 setnice.c
+-r--r--r-- 1 mts mts 1259 Jun  3 01:05 skas1.c
+-r--r--r-- 1 mts mts 1463 Jun  3 01:05 statfs1.c
+
+open-vm-tools-2008.06.03-96374/modules/linux/vmblock/include:
 total 172
--r--r--r-- 1 mts mts  6088 May 16 18:19 compat_completion.h
--r--r--r-- 1 mts mts  1875 May 16 18:19 compat_file.h
--r--r--r-- 1 mts mts  9850 May 16 18:19 compat_fs.h
--r--r--r-- 1 mts mts  1261 May 16 18:19 compat_init.h
--r--r--r-- 1 mts mts  2659 May 16 18:19 compat_kernel.h
--r--r--r-- 1 mts mts  1917 May 16 18:19 compat_list.h
--r--r--r-- 1 mts mts  4231 May 16 18:19 compat_mm.h
--r--r--r-- 1 mts mts  2298 May 16 18:19 compat_module.h
--r--r--r-- 1 mts mts  2118 May 16 18:19 compat_namei.h
--r--r--r-- 1 mts mts  2483 May 16 18:19 compat_page.h
--r--r--r-- 1 mts mts  9843 May 16 18:19 compat_sched.h
--r--r--r-- 1 mts mts  1456 May 16 18:19 compat_semaphore.h
--r--r--r-- 1 mts mts  2764 May 16 18:19 compat_slab.h
--r--r--r-- 1 mts mts  2438 May 16 18:19 compat_spinlock.h
--r--r--r-- 1 mts mts  1222 May 16 18:19 compat_statfs.h
--r--r--r-- 1 mts mts  1907 May 16 18:19 compat_string.h
--r--r--r-- 1 mts mts  3122 May 16 18:19 compat_uaccess.h
--r--r--r-- 1 mts mts  3189 May 16 18:19 compat_version.h
--r--r--r-- 1 mts mts  6854 May 16 18:19 compat_wait.h
--r--r--r-- 1 mts mts  2216 May 16 18:19 driver-config.h
--r--r--r-- 1 mts mts     0 May 16 18:19 includeCheck.h
--r--r--r-- 1 mts mts  9952 May 16 18:19 vm_assert.h
--r--r--r-- 1 mts mts 12608 May 16 18:19 vm_basic_defs.h
--r--r--r-- 1 mts mts 21746 May 16 18:19 vm_basic_types.h
--r--r--r-- 1 mts mts  4332 May 16 18:19 vmblock.h
--r--r--r-- 1 mts mts  1889 May 16 18:19 vmware.h
-
-open-vm-tools-2008.05.15-93241/modules/linux/vmblock/linux:
+-r--r--r-- 1 mts mts  6088 Jun  3 01:05 compat_completion.h
+-r--r--r-- 1 mts mts  1875 Jun  3 01:05 compat_file.h
+-r--r--r-- 1 mts mts  9850 Jun  3 01:05 compat_fs.h
+-r--r--r-- 1 mts mts  1261 Jun  3 01:05 compat_init.h
+-r--r--r-- 1 mts mts  2659 Jun  3 01:05 compat_kernel.h
+-r--r--r-- 1 mts mts  1917 Jun  3 01:05 compat_list.h
+-r--r--r-- 1 mts mts  4231 Jun  3 01:05 compat_mm.h
+-r--r--r-- 1 mts mts  2298 Jun  3 01:05 compat_module.h
+-r--r--r-- 1 mts mts  2118 Jun  3 01:05 compat_namei.h
+-r--r--r-- 1 mts mts  2483 Jun  3 01:05 compat_page.h
+-r--r--r-- 1 mts mts  9843 Jun  3 01:05 compat_sched.h
+-r--r--r-- 1 mts mts  1456 Jun  3 01:05 compat_semaphore.h
+-r--r--r-- 1 mts mts  2764 Jun  3 01:05 compat_slab.h
+-r--r--r-- 1 mts mts  2438 Jun  3 01:05 compat_spinlock.h
+-r--r--r-- 1 mts mts  1222 Jun  3 01:05 compat_statfs.h
+-r--r--r-- 1 mts mts  1907 Jun  3 01:05 compat_string.h
+-r--r--r-- 1 mts mts  3122 Jun  3 01:05 compat_uaccess.h
+-r--r--r-- 1 mts mts  3189 Jun  3 01:05 compat_version.h
+-r--r--r-- 1 mts mts  6854 Jun  3 01:05 compat_wait.h
+-r--r--r-- 1 mts mts  2216 Jun  3 01:05 driver-config.h
+-r--r--r-- 1 mts mts     0 Jun  3 01:05 includeCheck.h
+-r--r--r-- 1 mts mts  9952 Jun  3 01:05 vm_assert.h
+-r--r--r-- 1 mts mts 12608 Jun  3 01:05 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21746 Jun  3 01:05 vm_basic_types.h
+-r--r--r-- 1 mts mts  4332 Jun  3 01:05 vmblock.h
+-r--r--r-- 1 mts mts  1889 Jun  3 01:05 vmware.h
+
+open-vm-tools-2008.06.03-96374/modules/linux/vmblock/linux:
 total 140
--r--r--r-- 1 mts mts 16436 May 16 18:19 block.c
--r--r--r-- 1 mts mts  1544 May 16 18:19 block.h
--r--r--r-- 1 mts mts  8732 May 16 18:19 control.c
--r--r--r-- 1 mts mts  8217 May 16 18:19 dbllnklst.c
--r--r--r-- 1 mts mts  2350 May 16 18:19 dbllnklst.h
--r--r--r-- 1 mts mts  3749 May 16 18:19 dentry.c
--r--r--r-- 1 mts mts  8089 May 16 18:19 file.c
--r--r--r-- 1 mts mts 20088 May 16 18:19 filesystem.c
--r--r--r-- 1 mts mts  4856 May 16 18:19 filesystem.h
--r--r--r-- 1 mts mts  6794 May 16 18:19 inode.c
--r--r--r-- 1 mts mts  4286 May 16 18:19 module.c
--r--r--r-- 1 mts mts  4292 May 16 18:19 os.h
--r--r--r-- 1 mts mts  1310 May 16 18:19 stubs.c
--r--r--r-- 1 mts mts  1057 May 16 18:19 stubs.h
--r--r--r-- 1 mts mts  5026 May 16 18:19 super.c
--r--r--r-- 1 mts mts  3351 May 16 18:19 vmblockInt.h
--r--r--r-- 1 mts mts  1176 May 16 18:19 vmblock_version.h
-
-open-vm-tools-2008.05.15-93241/modules/linux/vmhgfs:
+-r--r--r-- 1 mts mts 16436 Jun  3 01:05 block.c
+-r--r--r-- 1 mts mts  1544 Jun  3 01:05 block.h
+-r--r--r-- 1 mts mts  8732 Jun  3 01:05 control.c
+-r--r--r-- 1 mts mts  8223 Jun  3 01:05 dbllnklst.c
+-r--r--r-- 1 mts mts  2356 Jun  3 01:05 dbllnklst.h
+-r--r--r-- 1 mts mts  3749 Jun  3 01:05 dentry.c
+-r--r--r-- 1 mts mts  8089 Jun  3 01:05 file.c
+-r--r--r-- 1 mts mts 20088 Jun  3 01:05 filesystem.c
+-r--r--r-- 1 mts mts  4856 Jun  3 01:05 filesystem.h
+-r--r--r-- 1 mts mts  6794 Jun  3 01:05 inode.c
+-r--r--r-- 1 mts mts  4286 Jun  3 01:05 module.c
+-r--r--r-- 1 mts mts  4292 Jun  3 01:05 os.h
+-r--r--r-- 1 mts mts  1310 Jun  3 01:05 stubs.c
+-r--r--r-- 1 mts mts  1057 Jun  3 01:05 stubs.h
+-r--r--r-- 1 mts mts  5026 Jun  3 01:05 super.c
+-r--r--r-- 1 mts mts  3351 Jun  3 01:05 vmblockInt.h
+-r--r--r-- 1 mts mts  1176 Jun  3 01:05 vmblock_version.h
+
+open-vm-tools-2008.06.03-96374/modules/linux/vmhgfs:
 total 920
--r--r--r-- 1 mts mts 17987 May 16 18:19 COPYING
--r--r--r-- 1 mts mts  3760 May 16 18:19 Makefile
--r--r--r-- 1 mts mts  2291 May 16 18:19 Makefile.kernel
--r--r--r-- 1 mts mts  3429 May 16 18:19 Makefile.normal
-drwxr-xr-x 2 mts mts  4096 May 16 18:19 autoconf
--r--r--r-- 1 mts mts  6383 May 16 18:19 backdoor.c
--r--r--r-- 1 mts mts  1337 May 16 18:19 backdoor.h
--r--r--r-- 1 mts mts  6174 May 16 18:19 backdoorGcc32.c
--r--r--r-- 1 mts mts  5550 May 16 18:19 backdoorGcc64.c
--r--r--r-- 1 mts mts  1032 May 16 18:19 backdoorInt.h
--r--r--r-- 1 mts mts  5883 May 16 18:19 backdoor_def.h
--r--r--r-- 1 mts mts  3543 May 16 18:19 backdoor_types.h
--r--r--r-- 1 mts mts  8725 May 16 18:19 bdhandler.c
--r--r--r-- 1 mts mts  1167 May 16 18:19 bdhandler.h
--r--r--r-- 1 mts mts  6088 May 16 18:19 compat_completion.h
--r--r--r-- 1 mts mts  2052 May 16 18:19 compat_dcache.h
--r--r--r-- 1 mts mts  1875 May 16 18:19 compat_file.h
--r--r--r-- 1 mts mts  9850 May 16 18:19 compat_fs.h
--r--r--r-- 1 mts mts  1391 May 16 18:19 compat_highmem.h
--r--r--r-- 1 mts mts  2659 May 16 18:19 compat_kernel.h
--r--r--r-- 1 mts mts  8066 May 16 18:19 compat_kthread.h
--r--r--r-- 1 mts mts  1917 May 16 18:19 compat_list.h
--r--r--r-- 1 mts mts  4231 May 16 18:19 compat_mm.h
--r--r--r-- 1 mts mts  2298 May 16 18:19 compat_module.h
--r--r--r-- 1 mts mts  2118 May 16 18:19 compat_namei.h
--r--r--r-- 1 mts mts  2591 May 16 18:19 compat_page-flags.h
--r--r--r-- 1 mts mts  2483 May 16 18:19 compat_page.h
--r--r--r-- 1 mts mts  9843 May 16 18:19 compat_sched.h
--r--r--r-- 1 mts mts  1456 May 16 18:19 compat_semaphore.h
--r--r--r-- 1 mts mts  2764 May 16 18:19 compat_slab.h
--r--r--r-- 1 mts mts  2438 May 16 18:19 compat_spinlock.h
--r--r--r-- 1 mts mts  1222 May 16 18:19 compat_statfs.h
--r--r--r-- 1 mts mts  1907 May 16 18:19 compat_string.h
--r--r--r-- 1 mts mts  3122 May 16 18:19 compat_uaccess.h
--r--r--r-- 1 mts mts  3189 May 16 18:19 compat_version.h
--r--r--r-- 1 mts mts  6854 May 16 18:19 compat_wait.h
--r--r--r-- 1 mts mts 12045 May 16 18:19 cpName.c
--r--r--r-- 1 mts mts  4174 May 16 18:19 cpName.h
--r--r--r-- 1 mts mts  1798 May 16 18:19 cpNameInt.h
--r--r--r-- 1 mts mts  5763 May 16 18:19 cpNameLinux.c
--r--r--r-- 1 mts mts  2642 May 16 18:19 cpNameLite.c
--r--r--r-- 1 mts mts  1710 May 16 18:19 cpNameLite.h
--r--r--r-- 1 mts mts  2350 May 16 18:19 dbllnklst.h
--r--r--r-- 1 mts mts  3112 May 16 18:19 dentry.c
--r--r--r-- 1 mts mts 27803 May 16 18:19 dir.c
--r--r--r-- 1 mts mts  2216 May 16 18:19 driver-config.h
--r--r--r-- 1 mts mts  3832 May 16 18:19 escBitvector.h
--r--r--r-- 1 mts mts 36805 May 16 18:19 file.c
--r--r--r-- 1 mts mts 20296 May 16 18:19 filesystem.c
--r--r--r-- 1 mts mts  1232 May 16 18:19 filesystem.h
--r--r--r-- 1 mts mts 57268 May 16 18:19 fsutil.c
--r--r--r-- 1 mts mts  3980 May 16 18:19 fsutil.h
--r--r--r-- 1 mts mts  3006 May 16 18:19 guest_msg_def.h
--r--r--r-- 1 mts mts  7008 May 16 18:19 hgfs.h
--r--r--r-- 1 mts mts  8689 May 16 18:19 hgfsBd.c
--r--r--r-- 1 mts mts  1450 May 16 18:19 hgfsBd.h
--r--r--r-- 1 mts mts  2535 May 16 18:19 hgfsDevLinux.h
--r--r--r-- 1 mts mts 39688 May 16 18:19 hgfsProto.h
--r--r--r-- 1 mts mts  6822 May 16 18:19 hgfsUtil.c
--r--r--r-- 1 mts mts  3737 May 16 18:19 hgfsUtil.h
--r--r--r-- 1 mts mts  4262 May 16 18:19 includeCheck.h
--r--r--r-- 1 mts mts 63943 May 16 18:19 inode.c
--r--r--r-- 1 mts mts  1318 May 16 18:19 inode.h
--r--r--r-- 1 mts mts  4774 May 16 18:19 kernelStubs.h
--r--r--r-- 1 mts mts  9629 May 16 18:19 kernelStubsLinux.c
--r--r--r-- 1 mts mts  5268 May 16 18:19 link.c
--r--r--r-- 1 mts mts  8254 May 16 18:19 message.c
--r--r--r-- 1 mts mts  3529 May 16 18:19 message.h
--r--r--r-- 1 mts mts 17265 May 16 18:19 messageBackdoor.c
--r--r--r-- 1 mts mts  2677 May 16 18:19 module.c
--r--r--r-- 1 mts mts  8774 May 16 18:19 module.h
--r--r--r-- 1 mts mts 27061 May 16 18:19 page.c
--r--r--r-- 1 mts mts  7026 May 16 18:19 request.c
--r--r--r-- 1 mts mts  3951 May 16 18:19 request.h
--r--r--r-- 1 mts mts 11670 May 16 18:19 rpcout.c
--r--r--r-- 1 mts mts  1963 May 16 18:19 rpcout.h
--r--r--r-- 1 mts mts  8823 May 16 18:19 staticEscape.c
--r--r--r-- 1 mts mts  2481 May 16 18:19 staticEscape.h
--r--r--r-- 1 mts mts  1985 May 16 18:19 stubs.c
--r--r--r-- 1 mts mts 12791 May 16 18:19 super.c
--r--r--r-- 1 mts mts  9952 May 16 18:19 vm_assert.h
--r--r--r-- 1 mts mts 17697 May 16 18:19 vm_basic_asm.h
--r--r--r-- 1 mts mts 16113 May 16 18:19 vm_basic_asm_x86.h
--r--r--r-- 1 mts mts  8944 May 16 18:19 vm_basic_asm_x86_64.h
--r--r--r-- 1 mts mts 12608 May 16 18:19 vm_basic_defs.h
--r--r--r-- 1 mts mts 21746 May 16 18:19 vm_basic_types.h
--r--r--r-- 1 mts mts  1168 May 16 18:19 vmhgfs_version.h
--r--r--r-- 1 mts mts  1889 May 16 18:19 vmware.h
--r--r--r-- 1 mts mts  1316 May 16 18:19 vmware_pack_begin.h
--r--r--r-- 1 mts mts  1336 May 16 18:19 vmware_pack_end.h
--r--r--r-- 1 mts mts  1956 May 16 18:19 vmware_pack_init.h
--r--r--r-- 1 mts mts 38003 May 16 18:19 x86cpuid.h
-
-open-vm-tools-2008.05.15-93241/modules/linux/vmhgfs/autoconf:
+-r--r--r-- 1 mts mts 17987 Jun  3 01:05 COPYING
+-r--r--r-- 1 mts mts  3760 Jun  3 01:05 Makefile
+-r--r--r-- 1 mts mts  2291 Jun  3 01:05 Makefile.kernel
+-r--r--r-- 1 mts mts  3429 Jun  3 01:05 Makefile.normal
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:05 autoconf
+-r--r--r-- 1 mts mts  6383 Jun  3 01:05 backdoor.c
+-r--r--r-- 1 mts mts  1337 Jun  3 01:05 backdoor.h
+-r--r--r-- 1 mts mts  6174 Jun  3 01:05 backdoorGcc32.c
+-r--r--r-- 1 mts mts  5550 Jun  3 01:05 backdoorGcc64.c
+-r--r--r-- 1 mts mts  1032 Jun  3 01:05 backdoorInt.h
+-r--r--r-- 1 mts mts  5883 Jun  3 01:05 backdoor_def.h
+-r--r--r-- 1 mts mts  3543 Jun  3 01:05 backdoor_types.h
+-r--r--r-- 1 mts mts  9078 Jun  3 01:05 bdhandler.c
+-r--r--r-- 1 mts mts  1167 Jun  3 01:05 bdhandler.h
+-r--r--r-- 1 mts mts  6088 Jun  3 01:05 compat_completion.h
+-r--r--r-- 1 mts mts  2052 Jun  3 01:05 compat_dcache.h
+-r--r--r-- 1 mts mts  1875 Jun  3 01:05 compat_file.h
+-r--r--r-- 1 mts mts  9850 Jun  3 01:05 compat_fs.h
+-r--r--r-- 1 mts mts  1391 Jun  3 01:05 compat_highmem.h
+-r--r--r-- 1 mts mts  2659 Jun  3 01:05 compat_kernel.h
+-r--r--r-- 1 mts mts  8066 Jun  3 01:05 compat_kthread.h
+-r--r--r-- 1 mts mts  1917 Jun  3 01:05 compat_list.h
+-r--r--r-- 1 mts mts  4231 Jun  3 01:05 compat_mm.h
+-r--r--r-- 1 mts mts  2298 Jun  3 01:05 compat_module.h
+-r--r--r-- 1 mts mts  2118 Jun  3 01:05 compat_namei.h
+-r--r--r-- 1 mts mts  2591 Jun  3 01:05 compat_page-flags.h
+-r--r--r-- 1 mts mts  2483 Jun  3 01:05 compat_page.h
+-r--r--r-- 1 mts mts  9843 Jun  3 01:05 compat_sched.h
+-r--r--r-- 1 mts mts  1456 Jun  3 01:05 compat_semaphore.h
+-r--r--r-- 1 mts mts  2764 Jun  3 01:05 compat_slab.h
+-r--r--r-- 1 mts mts  2438 Jun  3 01:05 compat_spinlock.h
+-r--r--r-- 1 mts mts  1222 Jun  3 01:05 compat_statfs.h
+-r--r--r-- 1 mts mts  1907 Jun  3 01:05 compat_string.h
+-r--r--r-- 1 mts mts  3122 Jun  3 01:05 compat_uaccess.h
+-r--r--r-- 1 mts mts  3189 Jun  3 01:05 compat_version.h
+-r--r--r-- 1 mts mts  6854 Jun  3 01:05 compat_wait.h
+-r--r--r-- 1 mts mts 12045 Jun  3 01:05 cpName.c
+-r--r--r-- 1 mts mts  4174 Jun  3 01:05 cpName.h
+-r--r--r-- 1 mts mts  1798 Jun  3 01:05 cpNameInt.h
+-r--r--r-- 1 mts mts  5763 Jun  3 01:05 cpNameLinux.c
+-r--r--r-- 1 mts mts  2642 Jun  3 01:05 cpNameLite.c
+-r--r--r-- 1 mts mts  1710 Jun  3 01:05 cpNameLite.h
+-r--r--r-- 1 mts mts  2356 Jun  3 01:05 dbllnklst.h
+-r--r--r-- 1 mts mts  3112 Jun  3 01:05 dentry.c
+-r--r--r-- 1 mts mts 27691 Jun  3 01:05 dir.c
+-r--r--r-- 1 mts mts  2216 Jun  3 01:05 driver-config.h
+-r--r--r-- 1 mts mts  3832 Jun  3 01:05 escBitvector.h
+-r--r--r-- 1 mts mts 36665 Jun  3 01:05 file.c
+-r--r--r-- 1 mts mts 20469 Jun  3 01:05 filesystem.c
+-r--r--r-- 1 mts mts  1232 Jun  3 01:05 filesystem.h
+-r--r--r-- 1 mts mts 57267 Jun  3 01:05 fsutil.c
+-r--r--r-- 1 mts mts  3980 Jun  3 01:05 fsutil.h
+-r--r--r-- 1 mts mts  3006 Jun  3 01:05 guest_msg_def.h
+-r--r--r-- 1 mts mts  7008 Jun  3 01:05 hgfs.h
+-r--r--r-- 1 mts mts  8689 Jun  3 01:05 hgfsBd.c
+-r--r--r-- 1 mts mts  1450 Jun  3 01:05 hgfsBd.h
+-r--r--r-- 1 mts mts  2535 Jun  3 01:05 hgfsDevLinux.h
+-r--r--r-- 1 mts mts 39298 Jun  3 01:05 hgfsProto.h
+-r--r--r-- 1 mts mts  6822 Jun  3 01:05 hgfsUtil.c
+-r--r--r-- 1 mts mts  3737 Jun  3 01:05 hgfsUtil.h
+-r--r--r-- 1 mts mts  4262 Jun  3 01:05 includeCheck.h
+-r--r--r-- 1 mts mts 64198 Jun  3 01:05 inode.c
+-r--r--r-- 1 mts mts  1318 Jun  3 01:05 inode.h
+-r--r--r-- 1 mts mts  4774 Jun  3 01:05 kernelStubs.h
+-r--r--r-- 1 mts mts  9629 Jun  3 01:05 kernelStubsLinux.c
+-r--r--r-- 1 mts mts  5268 Jun  3 01:05 link.c
+-r--r--r-- 1 mts mts  8254 Jun  3 01:05 message.c
+-r--r--r-- 1 mts mts  3529 Jun  3 01:05 message.h
+-r--r--r-- 1 mts mts 17265 Jun  3 01:05 messageBackdoor.c
+-r--r--r-- 1 mts mts  2677 Jun  3 01:05 module.c
+-r--r--r-- 1 mts mts  8991 Jun  3 01:05 module.h
+-r--r--r-- 1 mts mts 27078 Jun  3 01:05 page.c
+-r--r--r-- 1 mts mts  7026 Jun  3 01:05 request.c
+-r--r--r-- 1 mts mts  3951 Jun  3 01:05 request.h
+-r--r--r-- 1 mts mts 11975 Jun  3 01:05 rpcout.c
+-r--r--r-- 1 mts mts  1963 Jun  3 01:05 rpcout.h
+-r--r--r-- 1 mts mts  8823 Jun  3 01:05 staticEscape.c
+-r--r--r-- 1 mts mts  2481 Jun  3 01:05 staticEscape.h
+-r--r--r-- 1 mts mts  1985 Jun  3 01:05 stubs.c
+-r--r--r-- 1 mts mts 12772 Jun  3 01:05 super.c
+-r--r--r-- 1 mts mts  9952 Jun  3 01:05 vm_assert.h
+-r--r--r-- 1 mts mts 17697 Jun  3 01:05 vm_basic_asm.h
+-r--r--r-- 1 mts mts 16113 Jun  3 01:05 vm_basic_asm_x86.h
+-r--r--r-- 1 mts mts  8944 Jun  3 01:05 vm_basic_asm_x86_64.h
+-r--r--r-- 1 mts mts 12608 Jun  3 01:05 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21746 Jun  3 01:05 vm_basic_types.h
+-r--r--r-- 1 mts mts  1168 Jun  3 01:05 vmhgfs_version.h
+-r--r--r-- 1 mts mts  1889 Jun  3 01:05 vmware.h
+-r--r--r-- 1 mts mts  1316 Jun  3 01:05 vmware_pack_begin.h
+-r--r--r-- 1 mts mts  1336 Jun  3 01:05 vmware_pack_end.h
+-r--r--r-- 1 mts mts  1956 Jun  3 01:05 vmware_pack_init.h
+-r--r--r-- 1 mts mts 37947 Jun  3 01:05 x86cpuid.h
+
+open-vm-tools-2008.06.03-96374/modules/linux/vmhgfs/autoconf:
 total 36
--r--r--r-- 1 mts mts 1670 May 16 18:19 cachecreate.c
--r--r--r-- 1 mts mts 1718 May 16 18:19 cachector.c
--r--r--r-- 1 mts mts 1261 May 16 18:19 epoll.c
--r--r--r-- 1 mts mts 1204 May 16 18:19 geninclude.c
--r--r--r-- 1 mts mts 1596 May 16 18:19 getsb1.c
--r--r--r-- 1 mts mts 1473 May 16 18:19 inode1.c
--r--r--r-- 1 mts mts 1345 May 16 18:19 maxbytes.c
--r--r--r-- 1 mts mts 1139 May 16 18:19 setnice.c
--r--r--r-- 1 mts mts 1463 May 16 18:19 statfs1.c
-
-open-vm-tools-2008.05.15-93241/modules/linux/vmmemctl:
+-r--r--r-- 1 mts mts 1670 Jun  3 01:05 cachecreate.c
+-r--r--r-- 1 mts mts 1718 Jun  3 01:05 cachector.c
+-r--r--r-- 1 mts mts 1261 Jun  3 01:05 epoll.c
+-r--r--r-- 1 mts mts 1204 Jun  3 01:05 geninclude.c
+-r--r--r-- 1 mts mts 1596 Jun  3 01:05 getsb1.c
+-r--r--r-- 1 mts mts 1473 Jun  3 01:05 inode1.c
+-r--r--r-- 1 mts mts 1345 Jun  3 01:05 maxbytes.c
+-r--r--r-- 1 mts mts 1139 Jun  3 01:05 setnice.c
+-r--r--r-- 1 mts mts 1463 Jun  3 01:05 statfs1.c
+
+open-vm-tools-2008.06.03-96374/modules/linux/vmmemctl:
 total 292
--r--r--r-- 1 mts mts 17987 May 16 18:19 COPYING
--r--r--r-- 1 mts mts  3762 May 16 18:19 Makefile
--r--r--r-- 1 mts mts  1696 May 16 18:19 Makefile.kernel
--r--r--r-- 1 mts mts  2868 May 16 18:19 Makefile.normal
--r--r--r-- 1 mts mts   453 May 16 18:19 README
-drwxr-xr-x 2 mts mts  4096 May 16 18:19 autoconf
--r--r--r-- 1 mts mts  1337 May 16 18:19 backdoor.h
--r--r--r-- 1 mts mts  6174 May 16 18:19 backdoorGcc32.c
--r--r--r-- 1 mts mts  5550 May 16 18:19 backdoorGcc64.c
--r--r--r-- 1 mts mts  1032 May 16 18:19 backdoorInt.h
--r--r--r-- 1 mts mts  1338 May 16 18:19 backdoor_balloon.h
--r--r--r-- 1 mts mts  5883 May 16 18:19 backdoor_def.h
--r--r--r-- 1 mts mts  3543 May 16 18:19 backdoor_types.h
--r--r--r-- 1 mts mts  2622 May 16 18:19 balloon_def.h
--r--r--r-- 1 mts mts  6088 May 16 18:19 compat_completion.h
--r--r--r-- 1 mts mts  1875 May 16 18:19 compat_file.h
--r--r--r-- 1 mts mts  2659 May 16 18:19 compat_kernel.h
--r--r--r-- 1 mts mts  8066 May 16 18:19 compat_kthread.h
--r--r--r-- 1 mts mts  1917 May 16 18:19 compat_list.h
--r--r--r-- 1 mts mts  4231 May 16 18:19 compat_mm.h
--r--r--r-- 1 mts mts  2298 May 16 18:19 compat_module.h
--r--r--r-- 1 mts mts  2483 May 16 18:19 compat_page.h
--r--r--r-- 1 mts mts  9843 May 16 18:19 compat_sched.h
--r--r--r-- 1 mts mts  1456 May 16 18:19 compat_semaphore.h
--r--r--r-- 1 mts mts  2438 May 16 18:19 compat_spinlock.h
--r--r--r-- 1 mts mts  3189 May 16 18:19 compat_version.h
--r--r--r-- 1 mts mts  6854 May 16 18:19 compat_wait.h
--r--r--r-- 1 mts mts  2216 May 16 18:19 driver-config.h
--r--r--r-- 1 mts mts  4262 May 16 18:19 includeCheck.h
--r--r--r-- 1 mts mts 13341 May 16 18:19 os.c
--r--r--r-- 1 mts mts  2441 May 16 18:19 os.h
--r--r--r-- 1 mts mts  9952 May 16 18:19 vm_assert.h
--r--r--r-- 1 mts mts 12608 May 16 18:19 vm_basic_defs.h
--r--r--r-- 1 mts mts 21746 May 16 18:19 vm_basic_types.h
--r--r--r-- 1 mts mts 37545 May 16 18:19 vmballoon.c
--r--r--r-- 1 mts mts  2048 May 16 18:19 vmballoon.h
--r--r--r-- 1 mts mts  1193 May 16 18:19 vmmemctl_version.h
-
-open-vm-tools-2008.05.15-93241/modules/linux/vmmemctl/autoconf:
+-r--r--r-- 1 mts mts 17987 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  3762 Jun  3 01:06 Makefile
+-r--r--r-- 1 mts mts  1696 Jun  3 01:06 Makefile.kernel
+-r--r--r-- 1 mts mts  2868 Jun  3 01:06 Makefile.normal
+-r--r--r-- 1 mts mts   453 Jun  3 01:06 README
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 autoconf
+-r--r--r-- 1 mts mts  1337 Jun  3 01:06 backdoor.h
+-r--r--r-- 1 mts mts  6174 Jun  3 01:06 backdoorGcc32.c
+-r--r--r-- 1 mts mts  5550 Jun  3 01:06 backdoorGcc64.c
+-r--r--r-- 1 mts mts  1032 Jun  3 01:06 backdoorInt.h
+-r--r--r-- 1 mts mts  1338 Jun  3 01:06 backdoor_balloon.h
+-r--r--r-- 1 mts mts  5883 Jun  3 01:06 backdoor_def.h
+-r--r--r-- 1 mts mts  3543 Jun  3 01:06 backdoor_types.h
+-r--r--r-- 1 mts mts  2622 Jun  3 01:06 balloon_def.h
+-r--r--r-- 1 mts mts  6088 Jun  3 01:06 compat_completion.h
+-r--r--r-- 1 mts mts  1875 Jun  3 01:06 compat_file.h
+-r--r--r-- 1 mts mts  2659 Jun  3 01:06 compat_kernel.h
+-r--r--r-- 1 mts mts  8066 Jun  3 01:06 compat_kthread.h
+-r--r--r-- 1 mts mts  1917 Jun  3 01:06 compat_list.h
+-r--r--r-- 1 mts mts  4231 Jun  3 01:06 compat_mm.h
+-r--r--r-- 1 mts mts  2298 Jun  3 01:06 compat_module.h
+-r--r--r-- 1 mts mts  2483 Jun  3 01:06 compat_page.h
+-r--r--r-- 1 mts mts  9843 Jun  3 01:06 compat_sched.h
+-r--r--r-- 1 mts mts  1456 Jun  3 01:06 compat_semaphore.h
+-r--r--r-- 1 mts mts  2438 Jun  3 01:06 compat_spinlock.h
+-r--r--r-- 1 mts mts  3189 Jun  3 01:06 compat_version.h
+-r--r--r-- 1 mts mts  6854 Jun  3 01:06 compat_wait.h
+-r--r--r-- 1 mts mts  2216 Jun  3 01:06 driver-config.h
+-r--r--r-- 1 mts mts  4262 Jun  3 01:06 includeCheck.h
+-r--r--r-- 1 mts mts 13341 Jun  3 01:06 os.c
+-r--r--r-- 1 mts mts  2441 Jun  3 01:06 os.h
+-r--r--r-- 1 mts mts  9952 Jun  3 01:06 vm_assert.h
+-r--r--r-- 1 mts mts 12608 Jun  3 01:06 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21746 Jun  3 01:06 vm_basic_types.h
+-r--r--r-- 1 mts mts 37545 Jun  3 01:06 vmballoon.c
+-r--r--r-- 1 mts mts  2048 Jun  3 01:06 vmballoon.h
+-r--r--r-- 1 mts mts  1193 Jun  3 01:06 vmmemctl_version.h
+
+open-vm-tools-2008.06.03-96374/modules/linux/vmmemctl/autoconf:
 total 12
--r--r--r-- 1 mts mts 1261 May 16 18:19 epoll.c
--r--r--r-- 1 mts mts 1204 May 16 18:19 geninclude.c
--r--r--r-- 1 mts mts 1139 May 16 18:19 setnice.c
+-r--r--r-- 1 mts mts 1261 Jun  3 01:06 epoll.c
+-r--r--r-- 1 mts mts 1204 Jun  3 01:06 geninclude.c
+-r--r--r-- 1 mts mts 1139 Jun  3 01:06 setnice.c
 
-open-vm-tools-2008.05.15-93241/modules/linux/vmsync:
+open-vm-tools-2008.06.03-96374/modules/linux/vmsync:
 total 108
--r--r--r-- 1 mts mts 17987 May 16 18:19 COPYING
--r--r--r-- 1 mts mts  3760 May 16 18:19 Makefile
--r--r--r-- 1 mts mts  1473 May 16 18:19 Makefile.kernel
-drwxr-xr-x 2 mts mts  4096 May 16 18:19 autoconf
--r--r--r-- 1 mts mts  9850 May 16 18:19 compat_fs.h
--r--r--r-- 1 mts mts  2298 May 16 18:19 compat_module.h
--r--r--r-- 1 mts mts  2118 May 16 18:19 compat_namei.h
--r--r--r-- 1 mts mts  2764 May 16 18:19 compat_slab.h
--r--r--r-- 1 mts mts  3189 May 16 18:19 compat_version.h
--r--r--r-- 1 mts mts  6345 May 16 18:19 compat_workqueue.h
--r--r--r-- 1 mts mts  2216 May 16 18:19 driver-config.h
--r--r--r-- 1 mts mts  4262 May 16 18:19 includeCheck.h
--r--r--r-- 1 mts mts 18797 May 16 18:19 sync.c
--r--r--r-- 1 mts mts  1540 May 16 18:19 syncDriverIoc.h
--r--r--r-- 1 mts mts  1168 May 16 18:19 vmsync_version.h
-
-open-vm-tools-2008.05.15-93241/modules/linux/vmsync/autoconf:
+-r--r--r-- 1 mts mts 17987 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  3760 Jun  3 01:06 Makefile
+-r--r--r-- 1 mts mts  1473 Jun  3 01:06 Makefile.kernel
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 autoconf
+-r--r--r-- 1 mts mts  9850 Jun  3 01:06 compat_fs.h
+-r--r--r-- 1 mts mts  2298 Jun  3 01:06 compat_module.h
+-r--r--r-- 1 mts mts  2118 Jun  3 01:06 compat_namei.h
+-r--r--r-- 1 mts mts  2764 Jun  3 01:06 compat_slab.h
+-r--r--r-- 1 mts mts  3189 Jun  3 01:06 compat_version.h
+-r--r--r-- 1 mts mts  6345 Jun  3 01:06 compat_workqueue.h
+-r--r--r-- 1 mts mts  2216 Jun  3 01:06 driver-config.h
+-r--r--r-- 1 mts mts  4262 Jun  3 01:06 includeCheck.h
+-r--r--r-- 1 mts mts 18797 Jun  3 01:06 sync.c
+-r--r--r-- 1 mts mts  1540 Jun  3 01:06 syncDriverIoc.h
+-r--r--r-- 1 mts mts  1168 Jun  3 01:06 vmsync_version.h
+
+open-vm-tools-2008.06.03-96374/modules/linux/vmsync/autoconf:
 total 8
--r--r--r-- 1 mts mts 1670 May 16 18:19 cachecreate.c
--r--r--r-- 1 mts mts 1718 May 16 18:19 cachector.c
+-r--r--r-- 1 mts mts 1670 Jun  3 01:06 cachecreate.c
+-r--r--r-- 1 mts mts 1718 Jun  3 01:06 cachector.c
 
-open-vm-tools-2008.05.15-93241/modules/linux/vmxnet:
+open-vm-tools-2008.06.03-96374/modules/linux/vmxnet:
 total 280
--r--r--r-- 1 mts mts 17987 May 16 18:19 COPYING
--r--r--r-- 1 mts mts  3760 May 16 18:19 Makefile
--r--r--r-- 1 mts mts  1279 May 16 18:19 Makefile.kernel
--r--r--r-- 1 mts mts  2665 May 16 18:19 Makefile.normal
--r--r--r-- 1 mts mts   460 May 16 18:19 README
-drwxr-xr-x 2 mts mts  4096 May 16 18:19 autoconf
--r--r--r-- 1 mts mts  1966 May 16 18:19 bpf_meta.h
--r--r--r-- 1 mts mts  1734 May 16 18:19 compat_ethtool.h
--r--r--r-- 1 mts mts  1391 May 16 18:19 compat_highmem.h
--r--r--r-- 1 mts mts  1261 May 16 18:19 compat_init.h
--r--r--r-- 1 mts mts  1700 May 16 18:19 compat_interrupt.h
--r--r--r-- 1 mts mts  2081 May 16 18:19 compat_ioport.h
--r--r--r-- 1 mts mts  2298 May 16 18:19 compat_module.h
--r--r--r-- 1 mts mts  8121 May 16 18:19 compat_netdevice.h
--r--r--r-- 1 mts mts 16725 May 16 18:19 compat_pci.h
--r--r--r-- 1 mts mts  6453 May 16 18:19 compat_skbuff.h
--r--r--r-- 1 mts mts  2764 May 16 18:19 compat_slab.h
--r--r--r-- 1 mts mts  2438 May 16 18:19 compat_spinlock.h
--r--r--r-- 1 mts mts  2795 May 16 18:19 compat_timer.h
--r--r--r-- 1 mts mts  3189 May 16 18:19 compat_version.h
--r--r--r-- 1 mts mts  2216 May 16 18:19 driver-config.h
--r--r--r-- 1 mts mts  4262 May 16 18:19 includeCheck.h
--r--r--r-- 1 mts mts  2426 May 16 18:19 net.h
--r--r--r-- 1 mts mts  2240 May 16 18:19 net_sg.h
--r--r--r-- 1 mts mts 21746 May 16 18:19 vm_basic_types.h
--r--r--r-- 1 mts mts  7197 May 16 18:19 vm_device_version.h
--r--r--r-- 1 mts mts  3180 May 16 18:19 vmnet_def.h
--r--r--r-- 1 mts mts 68841 May 16 18:19 vmxnet.c
--r--r--r-- 1 mts mts 14595 May 16 18:19 vmxnet2_def.h
--r--r--r-- 1 mts mts  3735 May 16 18:19 vmxnetInt.h
--r--r--r-- 1 mts mts  6793 May 16 18:19 vmxnet_def.h
--r--r--r-- 1 mts mts  1168 May 16 18:19 vmxnet_version.h
-
-open-vm-tools-2008.05.15-93241/modules/linux/vmxnet/autoconf:
+-r--r--r-- 1 mts mts 17987 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  3760 Jun  3 01:06 Makefile
+-r--r--r-- 1 mts mts  1279 Jun  3 01:06 Makefile.kernel
+-r--r--r-- 1 mts mts  2665 Jun  3 01:06 Makefile.normal
+-r--r--r-- 1 mts mts   460 Jun  3 01:06 README
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 autoconf
+-r--r--r-- 1 mts mts  1966 Jun  3 01:06 bpf_meta.h
+-r--r--r-- 1 mts mts  1734 Jun  3 01:06 compat_ethtool.h
+-r--r--r-- 1 mts mts  1391 Jun  3 01:06 compat_highmem.h
+-r--r--r-- 1 mts mts  1261 Jun  3 01:06 compat_init.h
+-r--r--r-- 1 mts mts  1700 Jun  3 01:06 compat_interrupt.h
+-r--r--r-- 1 mts mts  2081 Jun  3 01:06 compat_ioport.h
+-r--r--r-- 1 mts mts  2298 Jun  3 01:06 compat_module.h
+-r--r--r-- 1 mts mts  8121 Jun  3 01:06 compat_netdevice.h
+-r--r--r-- 1 mts mts 16725 Jun  3 01:06 compat_pci.h
+-r--r--r-- 1 mts mts  6453 Jun  3 01:06 compat_skbuff.h
+-r--r--r-- 1 mts mts  2764 Jun  3 01:06 compat_slab.h
+-r--r--r-- 1 mts mts  2438 Jun  3 01:06 compat_spinlock.h
+-r--r--r-- 1 mts mts  2795 Jun  3 01:06 compat_timer.h
+-r--r--r-- 1 mts mts  3189 Jun  3 01:06 compat_version.h
+-r--r--r-- 1 mts mts  2216 Jun  3 01:06 driver-config.h
+-r--r--r-- 1 mts mts  4262 Jun  3 01:06 includeCheck.h
+-r--r--r-- 1 mts mts  2426 Jun  3 01:06 net.h
+-r--r--r-- 1 mts mts  2240 Jun  3 01:06 net_sg.h
+-r--r--r-- 1 mts mts 21746 Jun  3 01:06 vm_basic_types.h
+-r--r--r-- 1 mts mts  7197 Jun  3 01:06 vm_device_version.h
+-r--r--r-- 1 mts mts  3180 Jun  3 01:06 vmnet_def.h
+-r--r--r-- 1 mts mts 68841 Jun  3 01:06 vmxnet.c
+-r--r--r-- 1 mts mts 14595 Jun  3 01:06 vmxnet2_def.h
+-r--r--r-- 1 mts mts  3735 Jun  3 01:06 vmxnetInt.h
+-r--r--r-- 1 mts mts  6793 Jun  3 01:06 vmxnet_def.h
+-r--r--r-- 1 mts mts  1168 Jun  3 01:06 vmxnet_version.h
+
+open-vm-tools-2008.06.03-96374/modules/linux/vmxnet/autoconf:
 total 8
--r--r--r-- 1 mts mts 1204 May 16 18:19 geninclude.c
--r--r--r-- 1 mts mts 1400 May 16 18:19 skblin.c
+-r--r--r-- 1 mts mts 1204 Jun  3 01:06 geninclude.c
+-r--r--r-- 1 mts mts 1400 Jun  3 01:06 skblin.c
 
-open-vm-tools-2008.05.15-93241/scripts:
-total 44
--r--r--r-- 1 mts mts 26425 May 16 18:20 COPYING
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 common
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 freebsd
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 linux
-drwxr-xr-x 2 mts mts  4096 May 16 18:20 solaris
-
-open-vm-tools-2008.05.15-93241/scripts/common:
-total 8
--r--r--r-- 1 mts mts 7452 May 16 18:20 vm-support
-
-open-vm-tools-2008.05.15-93241/scripts/freebsd:
+open-vm-tools-2008.06.03-96374/scripts:
+total 60
+-r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts   260 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 10784 Jun  3 01:06 Makefile.in
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 common
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 freebsd
+drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 linux
+drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 solaris
+
+open-vm-tools-2008.06.03-96374/scripts/common:
 total 16
--r--r--r-- 1 mts mts 1354 May 16 18:20 poweroff-vm-default
--r--r--r-- 1 mts mts 1353 May 16 18:20 poweron-vm-default
--r--r--r-- 1 mts mts 1393 May 16 18:20 resume-vm-default
--r--r--r-- 1 mts mts 1750 May 16 18:20 suspend-vm-default
+-r--r--r-- 1 mts mts 7452 Jun  3 01:06 vm-support
+-r--r--r-- 1 mts mts  277 Jun  3 01:06 vmware-toolbox.desktop
+-r--r--r-- 1 mts mts  110 Jun  3 01:06 vmware-user.desktop
 
-open-vm-tools-2008.05.15-93241/scripts/linux:
+open-vm-tools-2008.06.03-96374/scripts/freebsd:
 total 16
--r--r--r-- 1 mts mts 1351 May 16 18:20 poweroff-vm-default
--r--r--r-- 1 mts mts 1351 May 16 18:20 poweron-vm-default
--r--r--r-- 1 mts mts 3042 May 16 18:20 resume-vm-default
--r--r--r-- 1 mts mts 2638 May 16 18:20 suspend-vm-default
+-r--r--r-- 1 mts mts 1354 Jun  3 01:06 poweroff-vm-default
+-r--r--r-- 1 mts mts 1353 Jun  3 01:06 poweron-vm-default
+-r--r--r-- 1 mts mts 1393 Jun  3 01:06 resume-vm-default
+-r--r--r-- 1 mts mts 1750 Jun  3 01:06 suspend-vm-default
+
+open-vm-tools-2008.06.03-96374/scripts/linux:
+total 20
+drwxr-xr-x 2 mts mts 4096 Jun  3 01:06 pam.d
+-r--r--r-- 1 mts mts 1351 Jun  3 01:06 poweroff-vm-default
+-r--r--r-- 1 mts mts 1351 Jun  3 01:06 poweron-vm-default
+-r--r--r-- 1 mts mts 3042 Jun  3 01:06 resume-vm-default
+-r--r--r-- 1 mts mts 2638 Jun  3 01:06 suspend-vm-default
 
-open-vm-tools-2008.05.15-93241/scripts/solaris:
+open-vm-tools-2008.06.03-96374/scripts/linux/pam.d:
+total 8
+-r--r--r-- 1 mts mts 266 Jun  3 01:06 vmware-guestd
+-r--r--r-- 1 mts mts 274 Jun  3 01:06 vmware-guestd-x64
+
+open-vm-tools-2008.06.03-96374/scripts/solaris:
 total 16
--r--r--r-- 1 mts mts 1354 May 16 18:20 poweroff-vm-default
--r--r--r-- 1 mts mts 1353 May 16 18:20 poweron-vm-default
--r--r--r-- 1 mts mts 1553 May 16 18:20 resume-vm-default
--r--r--r-- 1 mts mts 1904 May 16 18:20 suspend-vm-default
+-r--r--r-- 1 mts mts 1354 Jun  3 01:06 poweroff-vm-default
+-r--r--r-- 1 mts mts 1353 Jun  3 01:06 poweron-vm-default
+-r--r--r-- 1 mts mts 1553 Jun  3 01:06 resume-vm-default
+-r--r--r-- 1 mts mts 1904 Jun  3 01:06 suspend-vm-default
 
-open-vm-tools-2008.05.15-93241/toolbox:
+open-vm-tools-2008.06.03-96374/toolbox:
 total 176
--r--r--r-- 1 mts mts 26425 May 16 18:20 COPYING
--r--r--r-- 1 mts mts  2575 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 17010 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  2696 May 16 18:20 bigIcon.xpm
--r--r--r-- 1 mts mts  6258 May 16 18:20 debugStdio.c
--r--r--r-- 1 mts mts   458 May 16 18:20 smallIcon.xpm
--r--r--r-- 1 mts mts  4731 May 16 18:20 stub.c
--r--r--r-- 1 mts mts 29581 May 16 18:20 toolbox-gtk.c
--r--r--r-- 1 mts mts  6323 May 16 18:20 toolboxAbout.c
--r--r--r-- 1 mts mts  7085 May 16 18:20 toolboxDevices.c
--r--r--r-- 1 mts mts  2835 May 16 18:20 toolboxInt.h
--r--r--r-- 1 mts mts  3898 May 16 18:20 toolboxOptions.c
--r--r--r-- 1 mts mts 24460 May 16 18:20 toolboxScripts.c
--r--r--r-- 1 mts mts 14826 May 16 18:20 toolboxShrink.c
--r--r--r-- 1 mts mts  1557 May 16 18:20 toolboxgtk_version.h
-
-open-vm-tools-2008.05.15-93241/vmware-user:
-total 456
--r--r--r-- 1 mts mts 26425 May 16 18:20 COPYING
--r--r--r-- 1 mts mts  3913 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 18747 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts 65610 May 16 18:20 copyPaste.c
--r--r--r-- 1 mts mts  6258 May 16 18:20 debugStdio.c
--r--r--r-- 1 mts mts 83230 May 16 18:20 dnd.c
--r--r--r-- 1 mts mts 37366 May 16 18:20 foreignVMToolsDaemon.c
--r--r--r-- 1 mts mts  6210 May 16 18:20 foreignVMToolsDaemon.h
--r--r--r-- 1 mts mts 36992 May 16 18:20 foreignVMToolsNetworking.c
--r--r--r-- 1 mts mts 54676 May 16 18:20 foundryToolsDaemon.c
--r--r--r-- 1 mts mts  1766 May 16 18:20 foundryToolsDaemon.h
--r--r--r-- 1 mts mts  7478 May 16 18:20 libvmwarectrl.c
--r--r--r-- 1 mts mts  2031 May 16 18:20 libvmwarectrl.h
--r--r--r-- 1 mts mts  6157 May 16 18:20 pointer.c
--r--r--r-- 1 mts mts 16123 May 16 18:20 resolution.c
--r--r--r-- 1 mts mts  4731 May 16 18:20 stub.c
--r--r--r-- 1 mts mts 24375 May 16 18:20 vmware-user.c
--r--r--r-- 1 mts mts  1868 May 16 18:20 vmwarectrl.h
--r--r--r-- 1 mts mts  3636 May 16 18:20 vmwarectrlproto.h
--r--r--r-- 1 mts mts  2896 May 16 18:20 vmwareuserInt.h
--r--r--r-- 1 mts mts  1564 May 16 18:20 vmwareuser_version.h
-
-open-vm-tools-2008.05.15-93241/xferlogs:
-total 64
--r--r--r-- 1 mts mts 26425 May 16 18:20 COPYING
--r--r--r-- 1 mts mts  1491 May 16 18:20 Makefile.am
--rw-r--r-- 1 mts mts 15170 May 16 18:20 Makefile.in
--r--r--r-- 1 mts mts  9303 May 16 18:20 xferlogs.c
--r--r--r-- 1 mts mts  1554 May 16 18:20 xferlogs_version.h
+-r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  3319 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 18956 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  2696 Jun  3 01:06 bigIcon.xpm
+-r--r--r-- 1 mts mts  6142 Jun  3 01:06 debugStdio.c
+-r--r--r-- 1 mts mts   458 Jun  3 01:06 smallIcon.xpm
+-r--r--r-- 1 mts mts  4731 Jun  3 01:06 stub.c
+-r--r--r-- 1 mts mts 29581 Jun  3 01:06 toolbox-gtk.c
+-r--r--r-- 1 mts mts  6323 Jun  3 01:06 toolboxAbout.c
+-r--r--r-- 1 mts mts  7085 Jun  3 01:06 toolboxDevices.c
+-r--r--r-- 1 mts mts  2835 Jun  3 01:06 toolboxInt.h
+-r--r--r-- 1 mts mts  3898 Jun  3 01:06 toolboxOptions.c
+-r--r--r-- 1 mts mts 24460 Jun  3 01:06 toolboxScripts.c
+-r--r--r-- 1 mts mts 14826 Jun  3 01:06 toolboxShrink.c
+-r--r--r-- 1 mts mts  1557 Jun  3 01:06 toolboxgtk_version.h
+
+open-vm-tools-2008.06.03-96374/vmware-user:
+total 468
+-r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  4127 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 20324 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts 65610 Jun  3 01:06 copyPaste.c
+-r--r--r-- 1 mts mts  6142 Jun  3 01:06 debugStdio.c
+-r--r--r-- 1 mts mts 83230 Jun  3 01:06 dnd.c
+-r--r--r-- 1 mts mts 37366 Jun  3 01:06 foreignVMToolsDaemon.c
+-r--r--r-- 1 mts mts  6210 Jun  3 01:06 foreignVMToolsDaemon.h
+-r--r--r-- 1 mts mts 36992 Jun  3 01:06 foreignVMToolsNetworking.c
+-r--r--r-- 1 mts mts 54676 Jun  3 01:06 foundryToolsDaemon.c
+-r--r--r-- 1 mts mts  1766 Jun  3 01:06 foundryToolsDaemon.h
+-r--r--r-- 1 mts mts  7478 Jun  3 01:06 libvmwarectrl.c
+-r--r--r-- 1 mts mts  2031 Jun  3 01:06 libvmwarectrl.h
+-r--r--r-- 1 mts mts  6157 Jun  3 01:06 pointer.c
+-r--r--r-- 1 mts mts 16123 Jun  3 01:06 resolution.c
+-r--r--r-- 1 mts mts  4731 Jun  3 01:06 stub.c
+-r--r--r-- 1 mts mts 30550 Jun  3 01:06 vmware-user.c
+-r--r--r-- 1 mts mts  1868 Jun  3 01:06 vmwarectrl.h
+-r--r--r-- 1 mts mts  3636 Jun  3 01:06 vmwarectrlproto.h
+-r--r--r-- 1 mts mts  2896 Jun  3 01:06 vmwareuserInt.h
+-r--r--r-- 1 mts mts  1564 Jun  3 01:06 vmwareuser_version.h
+
+open-vm-tools-2008.06.03-96374/vmware-user-suid-wrapper:
+total 96
+-r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  1323 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 15320 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  4334 Jun  3 01:06 locationsdb.c
+-r--r--r-- 1 mts mts 12200 Jun  3 01:06 main.c
+-r--r--r-- 1 mts mts  7111 Jun  3 01:06 wrapper-freebsd.c
+-r--r--r-- 1 mts mts  4046 Jun  3 01:06 wrapper-linux.c
+-r--r--r-- 1 mts mts  5993 Jun  3 01:06 wrapper-solaris.c
+-r--r--r-- 1 mts mts  2921 Jun  3 01:06 wrapper.h
+-r--r--r-- 1 mts mts  1549 Jun  3 01:06 wrapper_version.h
+
+open-vm-tools-2008.06.03-96374/xferlogs:
+total 68
+-r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
+-r--r--r-- 1 mts mts  1565 Jun  3 01:06 Makefile.am
+-rw-r--r-- 1 mts mts 16453 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  9301 Jun  3 01:06 xferlogs.c
+-r--r--r-- 1 mts mts  1554 Jun  3 01:06 xferlogs_version.h
index 2d6e5e52298104db634bdf5d8a5edc2299078cb5..4998f39a8e244968e6ebe443ec642dfe9554cfe3 100755 (executable)
@@ -21,6 +21,7 @@
 # These subdirectories require X, and may be disabled using --without-x
 X11_SUBDIRS =
 X11_SUBDIRS += vmware-user
+X11_SUBDIRS += vmware-user-suid-wrapper
 X11_SUBDIRS += toolbox
 
 SUBDIRS =
@@ -36,7 +37,7 @@ endif
 SUBDIRS += checkvm
 SUBDIRS += libguestlib
 SUBDIRS += xferlogs
-
-.PHONY: modules
-modules:
-       $(MAKE) -C modules
+SUBDIRS += scripts
+if !SOLARIS
+SUBDIRS += modules
+endif
index b26283d8ffa5263fd99a0861bd1b03964745b475..5964c56420b4754ee1afcee3e2820948125cfc25 100644 (file)
@@ -53,6 +53,7 @@ build_triplet = @build@
 host_triplet = @host@
 @HAVE_X11_TRUE@am__append_1 = $(X11_SUBDIRS)
 @BUILD_HGFSMOUNTER_TRUE@am__append_2 = hgfsmounter
+@SOLARIS_FALSE@am__append_3 = modules
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
        $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
@@ -79,8 +80,9 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive       \
   distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
-DIST_SUBDIRS = lib guestd vmware-user toolbox hgfsclient hgfsmounter \
-       checkvm libguestlib xferlogs
+DIST_SUBDIRS = lib guestd vmware-user vmware-user-suid-wrapper toolbox \
+       hgfsclient hgfsmounter checkvm libguestlib xferlogs scripts \
+       modules
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -153,6 +155,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -161,6 +164,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -169,6 +173,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
@@ -230,9 +235,9 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 
 # These subdirectories require X, and may be disabled using --without-x
-X11_SUBDIRS = vmware-user toolbox
+X11_SUBDIRS = vmware-user vmware-user-suid-wrapper toolbox
 SUBDIRS = lib guestd $(am__append_1) hgfsclient $(am__append_2) \
-       checkvm libguestlib xferlogs
+       checkvm libguestlib xferlogs scripts $(am__append_3)
 all: all-recursive
 
 .SUFFIXES:
@@ -658,10 +663,6 @@ uninstall-am:
        mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
        uninstall uninstall-am
 
-
-.PHONY: modules
-modules:
-       $(MAKE) -C modules
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 502b718e8a8e296ee3f2bfe2e15fdaba740fd5c5..05835b42d14f2d9e4f22d6e5c21273df0a43cbbf 100755 (executable)
@@ -1,3 +1,22 @@
+open-vm-tools 2008.06.03 changes:
+       * Added the vmware-user-suid-wrapper application, with implementations
+       for Linux, FreeBSD, and Solaris. This app is needed to make correct use
+       of vmware-user with the vmblock kernel module. It should have been in
+       the previous code refresh, but we accidentally overlooked it.
+
+       * Fixed Sourceforge bug 1924246: vmhgfs on Linux properly reports the
+       available space on the host. Thanks to Mikhail Krivtsov for reporting
+       the bug.
+
+       * Fixed Sourceforge bug 1839981: we now have rudimentary `make install`
+       support. On any platform, it should copy files and kernel modules to
+       the location specified at build-time, and on Linux, it will additionally
+       run `depmod -a` to make the kernel modules accessible to modprobe. This
+       change also adds a "--with-pam-prefix" argument to the configure
+       script, which controls the location of guestd's pam files.
+       
+       * Other bug fixes.
+
 open-vm-tools 2008.05.15 changes:
        * guestd no longer starts vmware-user. Packagers will need to use
        the XDG autostart spec, Xsession drop-in scripts, or other appropriate
index 7b3d6b30502d01023bf424e61f2658ed5962f029..f4003a70a0badf0f7de41c7e2aca396094a6824f 100644 (file)
@@ -15,7 +15,7 @@
 ### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ################################################################################
 
-noinst_PROGRAMS = checkvm
+bin_PROGRAMS = vmware-checkvm
 
-checkvm_SOURCES =
-checkvm_SOURCES += checkvm.c
+vmware_checkvm_SOURCES =
+vmware_checkvm_SOURCES += checkvm.c
index 97c50d4d74990903e3bd290bd92a60ec792ebe8d..2c6f280b7e001cc5610b016785fa0888089bc7a5 100644 (file)
@@ -49,7 +49,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = checkvm$(EXEEXT)
+bin_PROGRAMS = vmware-checkvm$(EXEEXT)
 subdir = checkvm
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -58,10 +58,12 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-am_checkvm_OBJECTS = checkvm.$(OBJEXT)
-checkvm_OBJECTS = $(am_checkvm_OBJECTS)
-checkvm_LDADD = $(LDADD)
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_vmware_checkvm_OBJECTS = checkvm.$(OBJEXT)
+vmware_checkvm_OBJECTS = $(am_vmware_checkvm_OBJECTS)
+vmware_checkvm_LDADD = $(LDADD)
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -74,8 +76,8 @@ CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-SOURCES = $(checkvm_SOURCES)
-DIST_SOURCES = $(checkvm_SOURCES)
+SOURCES = $(vmware_checkvm_SOURCES)
+DIST_SOURCES = $(vmware_checkvm_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -140,6 +142,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -148,6 +151,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -156,6 +160,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
@@ -215,7 +220,7 @@ sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-checkvm_SOURCES = checkvm.c
+vmware_checkvm_SOURCES = checkvm.c
 all: all-am
 
 .SUFFIXES:
@@ -249,16 +254,37 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         if test -f $$p \
+            || test -f $$p1 \
+         ; then \
+           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+         else :; fi; \
+       done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(bindir)/$$f"; \
+       done
 
-clean-noinstPROGRAMS:
-       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+clean-binPROGRAMS:
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
-checkvm$(EXEEXT): $(checkvm_OBJECTS) $(checkvm_DEPENDENCIES) 
-       @rm -f checkvm$(EXEEXT)
-       $(LINK) $(checkvm_OBJECTS) $(checkvm_LDADD) $(LIBS)
+vmware-checkvm$(EXEEXT): $(vmware_checkvm_OBJECTS) $(vmware_checkvm_DEPENDENCIES) 
+       @rm -f vmware-checkvm$(EXEEXT)
+       $(LINK) $(vmware_checkvm_OBJECTS) $(vmware_checkvm_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -373,6 +399,9 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
+       for dir in "$(DESTDIR)$(bindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -399,8 +428,7 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
-       mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -rf ./$(DEPDIR)
@@ -422,7 +450,7 @@ install-data-am:
 
 install-dvi: install-dvi-am
 
-install-exec-am:
+install-exec-am: install-binPROGRAMS
 
 install-html: install-html-am
 
@@ -454,22 +482,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-binPROGRAMS
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-noinstPROGRAMS ctags distclean \
-       distclean-compile distclean-generic distclean-libtool \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-dvi \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+       clean-generic clean-libtool ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-binPROGRAMS install-data install-data-am install-dvi \
        install-dvi-am install-exec install-exec-am install-html \
        install-html-am install-info install-info-am install-man \
        install-pdf install-pdf-am install-ps install-ps-am \
        install-strip installcheck installcheck-am installdirs \
        maintainer-clean maintainer-clean-generic mostlyclean \
        mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags uninstall uninstall-am
+       pdf pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-binPROGRAMS
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 13ee46c28b5452f926fc25b42708c7685501d04a..74442222d2f11f9677af2ba2d1008217d83c521b 100755 (executable)
@@ -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 2008.05.15-93241.
+# Generated by GNU Autoconf 2.61 for open-vm-tools 2008.06.03-96374.
 #
 # Report bugs to <open-vm-tools-devel@lists.sourceforge.net>.
 #
@@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='open-vm-tools'
 PACKAGE_TARNAME='open-vm-tools'
-PACKAGE_VERSION='2008.05.15-93241'
-PACKAGE_STRING='open-vm-tools 2008.05.15-93241'
+PACKAGE_VERSION='2008.06.03-96374'
+PACKAGE_STRING='open-vm-tools 2008.06.03-96374'
 PACKAGE_BUGREPORT='open-vm-tools-devel@lists.sourceforge.net'
 
 ac_unique_file="checkvm/checkvm.c"
@@ -885,13 +885,19 @@ LINUX_TRUE
 LINUX_FALSE
 SOLARIS_TRUE
 SOLARIS_FALSE
+FREEBSD_TRUE
+FREEBSD_FALSE
 THIRTY_TWO_BIT_USERSPACE_TRUE
 THIRTY_TWO_BIT_USERSPACE_FALSE
 HAVE_X11_TRUE
 HAVE_X11_FALSE
 NO_ICU_TRUE
 NO_ICU_FALSE
+PAMD_TRUE
+PAMD_FALSE
+TARGET_OS
 MODULES_OS
+MODULES_DIR
 MODULES
 COMMON_XLIBS
 GTK_CPPFLAGS
@@ -902,6 +908,7 @@ PROCPS_CPPFLAGS
 PROCPS_LIBS
 ICU_CPPFLAGS
 ICU_LIBS
+PAM_PREFIX
 LIB_AUTH_CPPFLAGS
 LIB_FILE_CPPFLAGS
 LIB_HGFS_SERVER_CPPFLAGS
@@ -1434,7 +1441,7 @@ if test "$ac_init_help" = "long"; then
   # 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 2008.05.15-93241 to adapt to many kinds of systems.
+\`configure' configures open-vm-tools 2008.06.03-96374 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1508,7 +1515,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of open-vm-tools 2008.05.15-93241:";;
+     short | recursive ) echo "Configuration of open-vm-tools 2008.06.03-96374:";;
    esac
   cat <<\_ACEOF
 
@@ -1532,6 +1539,7 @@ Optional Packages:
                           both]
   --with-tags[=TAGS]      include additional configurations [automatic]
   --with-x                use the X Window System
+  --with-pam-prefix       specify where pam files go. Default is $(sysconfdir)
   --without-procps        compile without libproc (disables support for
                           meminfo)
   --without-dnet          compile without libdnet (disables support for
@@ -1618,7 +1626,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-open-vm-tools configure 2008.05.15-93241
+open-vm-tools configure 2008.06.03-96374
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1632,7 +1640,7 @@ cat >config.log <<_ACEOF
 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 2008.05.15-93241, which was
+It was created by open-vm-tools $as_me 2008.06.03-96374, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2522,7 +2530,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='open-vm-tools'
- VERSION='2008.05.15-93241'
+ VERSION='2008.06.03-96374'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5588,7 +5596,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5591 "configure"' > conftest.$ac_ext
+  echo '#line 5599 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8089,11 +8097,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8092: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8100: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8096: \$? = $ac_status" >&5
+   echo "$as_me:8104: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8357,11 +8365,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8360: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8368: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8364: \$? = $ac_status" >&5
+   echo "$as_me:8372: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8461,11 +8469,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8464: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8472: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8468: \$? = $ac_status" >&5
+   echo "$as_me:8476: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9926,7 +9934,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 9929 "configure"' > conftest.$ac_ext
+    echo '#line 9937 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -10790,7 +10798,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10793 "configure"
+#line 10801 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10890,7 +10898,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10893 "configure"
+#line 10901 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13229,11 +13237,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13232: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13240: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13236: \$? = $ac_status" >&5
+   echo "$as_me:13244: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13333,11 +13341,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13336: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13344: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13340: \$? = $ac_status" >&5
+   echo "$as_me:13348: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13869,7 +13877,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 13872 "configure"' > conftest.$ac_ext
+    echo '#line 13880 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -14927,11 +14935,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14930: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14938: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14934: \$? = $ac_status" >&5
+   echo "$as_me:14942: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -15031,11 +15039,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15034: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15042: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15038: \$? = $ac_status" >&5
+   echo "$as_me:15046: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16476,7 +16484,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 16479 "configure"' > conftest.$ac_ext
+    echo '#line 16487 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -17253,11 +17261,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17256: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17264: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17260: \$? = $ac_status" >&5
+   echo "$as_me:17268: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17521,11 +17529,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17524: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17532: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17528: \$? = $ac_status" >&5
+   echo "$as_me:17536: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17625,11 +17633,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17628: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17636: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17632: \$? = $ac_status" >&5
+   echo "$as_me:17640: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -19090,7 +19098,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 19093 "configure"' > conftest.$ac_ext
+    echo '#line 19101 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -22616,6 +22624,16 @@ echo "$as_me: error: libpthread not found. Please install the libc/libpthread de
 fi
 
 
+# PAM prefix
+
+# Check whether --with-pam-prefix was given.
+if test "${with_pam_prefix+set}" = set; then
+  withval=$with_pam_prefix; PAM_PREFIX="$withval"
+else
+  PAM_PREFIX='$(sysconfdir)'
+fi
+
+
 
 # Check whether --with-procps was given.
 if test "${with_procps+set}" = set; then
@@ -22865,6 +22883,7 @@ fi
 fi
 
 if test "$with_procps" != "yes"; then
+
 cat >>confdefs.h <<\_ACEOF
 #define NO_PROCPS 1
 _ACEOF
@@ -22936,7 +22955,8 @@ test -n "$DNET_CONFIG" || DNET_CONFIG="no"
                GUESTD_LDADD="$GUESTD_LDADD $DNET_LIBS"
                VMWARE_USER_LDADD="$VMWARE_USER_LDADD $DNET_LIBS"
                if test "$DNET_CONFIG" == dumbnet-config; then
-               cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define DNET_IS_DUMBNET 1
 _ACEOF
 
@@ -22949,6 +22969,7 @@ echo "$as_me: error: dnet-config was not found on your PATH. Please configure wi
 fi
 
 if test "$with_dnet" != "yes"; then
+
 cat >>confdefs.h <<\_ACEOF
 #define NO_DNET 1
 _ACEOF
@@ -26518,9 +26539,13 @@ CPPFLAGS="$CPPFLAGS -I$INCLUDE_DIR"
 
 MODULES=""
 MODULES_OS="$os"
+TARGET_OS="$os"
+MODULES_DIR=""
 buildHgfsmounter=no
 
 if test "$os" = "linux"; then
+   MODULES_DIR="/lib/modules/`uname -r`/kernel/"
+
    CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
    CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
    CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
@@ -26540,6 +26565,8 @@ if test "$os" = "linux"; then
 fi
 
 if test "$os" = "freebsd"; then
+   MODULES_DIR="/boot/modules"
+
    if test "$osVersion" -gt 302000; then
       MODULES="$MODULES vmmemctl"
    fi
@@ -26595,6 +26622,14 @@ else
   SOLARIS_FALSE=
 fi
 
+ if test "$os" = "freebsd"; then
+  FREEBSD_TRUE=
+  FREEBSD_FALSE='#'
+else
+  FREEBSD_TRUE='#'
+  FREEBSD_FALSE=
+fi
+
  if test "$userSpaceBitness" = "32"; then
   THIRTY_TWO_BIT_USERSPACE_TRUE=
   THIRTY_TWO_BIT_USERSPACE_FALSE='#'
@@ -26619,6 +26654,14 @@ else
   NO_ICU_FALSE=
 fi
 
+ if test -d /etc/pam.d; then
+  PAMD_TRUE=
+  PAMD_FALSE='#'
+else
+  PAMD_TRUE='#'
+  PAMD_FALSE=
+fi
+
 
 ### Feature-specific flags / actions
 # Combine where possible
@@ -26627,7 +26670,8 @@ fi
 # tests for required components have passed and it's safe to allow multimon.
 # Otherwise, it should be disabled.
 if test "$MULTIMON_ENABLED" = "no"; then
-   cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_MULTIMON 1
 _ACEOF
 
@@ -26672,6 +26716,9 @@ fi
 
 
 
+
+
+
 ### Lib substs
 
 
@@ -26693,7 +26740,7 @@ fi
 ###
 ### Create the Makefiles
 ###
-ac_config_files="$ac_config_files Makefile lib/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/backdoor/shared/Makefile lib/conf/Makefile lib/dict/Makefile lib/dnd/Makefile lib/err/Makefile lib/eventManager/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/ghIntegrationStub/Makefile lib/guestApp/Makefile lib/guestInfo/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/deployPkg/Makefile lib/impersonate/Makefile lib/message/Makefile lib/message/shared/Makefile lib/misc/Makefile lib/misc/shared/Makefile lib/netUtil/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/printer/Makefile lib/procMgr/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcOut/shared/Makefile lib/rpcVmx/Makefile lib/SLPv2Parser/Makefile lib/socketMgr/Makefile lib/strUtil/Makefile lib/string/Makefile lib/string/shared/Makefile lib/sync/Makefile lib/sync/shared/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/toolsLogger/Makefile lib/unicode/Makefile lib/unityStub/Makefile lib/user/Makefile lib/vixTools/Makefile lib/vmBackupLib/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile guestd/Makefile vmware-user/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile libguestlib/Makefile xferlogs/Makefile modules/Makefile"
+ac_config_files="$ac_config_files Makefile lib/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/backdoor/shared/Makefile lib/conf/Makefile lib/dict/Makefile lib/dnd/Makefile lib/err/Makefile lib/eventManager/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/ghIntegrationStub/Makefile lib/guestApp/Makefile lib/guestInfo/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/deployPkg/Makefile lib/impersonate/Makefile lib/message/Makefile lib/message/shared/Makefile lib/misc/Makefile lib/misc/shared/Makefile lib/netUtil/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/printer/Makefile lib/procMgr/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcOut/shared/Makefile lib/rpcVmx/Makefile lib/SLPv2Parser/Makefile lib/socketMgr/Makefile lib/strUtil/Makefile lib/string/Makefile lib/string/shared/Makefile lib/sync/Makefile lib/sync/shared/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/toolsLogger/Makefile lib/unicode/Makefile lib/unityStub/Makefile lib/user/Makefile lib/vixTools/Makefile lib/vmBackupLib/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile guestd/Makefile vmware-user/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile libguestlib/Makefile xferlogs/Makefile modules/Makefile scripts/Makefile"
 
 
 ###
@@ -26874,6 +26921,13 @@ echo "$as_me: error: conditional \"SOLARIS\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${FREEBSD_TRUE}" && test -z "${FREEBSD_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"FREEBSD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"FREEBSD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${THIRTY_TWO_BIT_USERSPACE_TRUE}" && test -z "${THIRTY_TWO_BIT_USERSPACE_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"THIRTY_TWO_BIT_USERSPACE\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -26895,6 +26949,13 @@ echo "$as_me: error: conditional \"NO_ICU\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${PAMD_TRUE}" && test -z "${PAMD_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"PAMD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"PAMD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
@@ -27195,7 +27256,7 @@ exec 6>&1
 # 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 2008.05.15-93241, which was
+This file was extended by open-vm-tools $as_me 2008.06.03-96374, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -27242,7 +27303,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-open-vm-tools config.status 2008.05.15-93241
+open-vm-tools config.status 2008.06.03-96374
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -27403,6 +27464,7 @@ do
     "lib/wiper/Makefile") CONFIG_FILES="$CONFIG_FILES lib/wiper/Makefile" ;;
     "guestd/Makefile") CONFIG_FILES="$CONFIG_FILES guestd/Makefile" ;;
     "vmware-user/Makefile") CONFIG_FILES="$CONFIG_FILES vmware-user/Makefile" ;;
+    "vmware-user-suid-wrapper/Makefile") CONFIG_FILES="$CONFIG_FILES vmware-user-suid-wrapper/Makefile" ;;
     "toolbox/Makefile") CONFIG_FILES="$CONFIG_FILES toolbox/Makefile" ;;
     "hgfsclient/Makefile") CONFIG_FILES="$CONFIG_FILES hgfsclient/Makefile" ;;
     "hgfsmounter/Makefile") CONFIG_FILES="$CONFIG_FILES hgfsmounter/Makefile" ;;
@@ -27410,6 +27472,7 @@ do
     "libguestlib/Makefile") CONFIG_FILES="$CONFIG_FILES libguestlib/Makefile" ;;
     "xferlogs/Makefile") CONFIG_FILES="$CONFIG_FILES xferlogs/Makefile" ;;
     "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;;
+    "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
 
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -27628,13 +27691,19 @@ LINUX_TRUE!$LINUX_TRUE$ac_delim
 LINUX_FALSE!$LINUX_FALSE$ac_delim
 SOLARIS_TRUE!$SOLARIS_TRUE$ac_delim
 SOLARIS_FALSE!$SOLARIS_FALSE$ac_delim
+FREEBSD_TRUE!$FREEBSD_TRUE$ac_delim
+FREEBSD_FALSE!$FREEBSD_FALSE$ac_delim
 THIRTY_TWO_BIT_USERSPACE_TRUE!$THIRTY_TWO_BIT_USERSPACE_TRUE$ac_delim
 THIRTY_TWO_BIT_USERSPACE_FALSE!$THIRTY_TWO_BIT_USERSPACE_FALSE$ac_delim
 HAVE_X11_TRUE!$HAVE_X11_TRUE$ac_delim
 HAVE_X11_FALSE!$HAVE_X11_FALSE$ac_delim
 NO_ICU_TRUE!$NO_ICU_TRUE$ac_delim
 NO_ICU_FALSE!$NO_ICU_FALSE$ac_delim
+PAMD_TRUE!$PAMD_TRUE$ac_delim
+PAMD_FALSE!$PAMD_FALSE$ac_delim
+TARGET_OS!$TARGET_OS$ac_delim
 MODULES_OS!$MODULES_OS$ac_delim
+MODULES_DIR!$MODULES_DIR$ac_delim
 MODULES!$MODULES$ac_delim
 COMMON_XLIBS!$COMMON_XLIBS$ac_delim
 GTK_CPPFLAGS!$GTK_CPPFLAGS$ac_delim
@@ -27645,6 +27714,7 @@ PROCPS_CPPFLAGS!$PROCPS_CPPFLAGS$ac_delim
 PROCPS_LIBS!$PROCPS_LIBS$ac_delim
 ICU_CPPFLAGS!$ICU_CPPFLAGS$ac_delim
 ICU_LIBS!$ICU_LIBS$ac_delim
+PAM_PREFIX!$PAM_PREFIX$ac_delim
 LIB_AUTH_CPPFLAGS!$LIB_AUTH_CPPFLAGS$ac_delim
 LIB_FILE_CPPFLAGS!$LIB_FILE_CPPFLAGS$ac_delim
 LIB_HGFS_SERVER_CPPFLAGS!$LIB_HGFS_SERVER_CPPFLAGS$ac_delim
@@ -27660,7 +27730,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 49; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 56; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index 7abd5ce617a0a7390864b726b943ffef4a646cb2..4b599462bb8eca6dd99009114368973bf9fb764e 100755 (executable)
@@ -34,7 +34,7 @@
 
 AC_INIT(
    [open-vm-tools],
-   [2008.05.15-93241],
+   [2008.06.03-96374],
    [open-vm-tools-devel@lists.sourceforge.net])
 
 # In order to make this configure script auto-detect situations where
@@ -301,6 +301,13 @@ AC_CHECK_LIB(
    [AC_MSG_ERROR(
       [libpthread not found. Please install the libc/libpthread devel package(s).])])
 
+# PAM prefix
+AC_ARG_WITH([pam-prefix],
+           [AS_HELP_STRING([--with-pam-prefix],
+               [specify where pam files go. Default is $(sysconfdir)])],
+           [PAM_PREFIX="$withval"],
+           [PAM_PREFIX='$(sysconfdir)'])
+
 AC_ARG_WITH([procps],
            [AS_HELP_STRING([--without-procps],
               [compile without libproc (disables support for meminfo)])],
@@ -350,7 +357,7 @@ if test "$with_procps" = "yes"; then
 fi
 
 if test "$with_procps" != "yes"; then
-AC_DEFINE([NO_PROCPS], 1)
+AC_DEFINE([NO_PROCPS], 1, [Define to 1 if building without procps.])
 fi
 
 AC_ARG_WITH([dnet],
@@ -375,7 +382,7 @@ if test "$with_dnet" = "yes"; then
                GUESTD_LDADD="$GUESTD_LDADD $DNET_LIBS"
                VMWARE_USER_LDADD="$VMWARE_USER_LDADD $DNET_LIBS"
                if test "$DNET_CONFIG" == dumbnet-config; then
-               AC_DEFINE([DNET_IS_DUMBNET], 1)
+               AC_DEFINE([DNET_IS_DUMBNET], 1, [Define to 1 if substituting Debian's libdumbnet for libdnet.])
                fi
        else
                AC_MSG_ERROR(
@@ -384,7 +391,7 @@ if test "$with_dnet" = "yes"; then
 fi
 
 if test "$with_dnet" != "yes"; then
-AC_DEFINE([NO_DNET], 1)
+AC_DEFINE([NO_DNET], 1, [Define to 1 if building without libdnet.])
 fi
 
 AC_ARG_WITH([icu],
@@ -573,9 +580,13 @@ CPPFLAGS="$CPPFLAGS -I$INCLUDE_DIR"
 
 MODULES=""
 MODULES_OS="$os"
+TARGET_OS="$os"
+MODULES_DIR=""
 buildHgfsmounter=no
 
 if test "$os" = "linux"; then
+   MODULES_DIR="/lib/modules/`uname -r`/kernel/"
+
    CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
    CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
    CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
@@ -595,6 +606,8 @@ if test "$os" = "linux"; then
 fi
 
 if test "$os" = "freebsd"; then
+   MODULES_DIR="/boot/modules"
+
    if test "$osVersion" -gt 302000; then
       MODULES="$MODULES vmmemctl"
    fi
@@ -629,9 +642,11 @@ fi
 AM_CONDITIONAL(BUILD_HGFSMOUNTER, test "$buildHgfsmounter" = "yes")
 AM_CONDITIONAL(LINUX, test "$os" = "linux")
 AM_CONDITIONAL(SOLARIS, test "$os" = "solaris")
+AM_CONDITIONAL(FREEBSD, test "$os" = "freebsd")
 AM_CONDITIONAL(THIRTY_TWO_BIT_USERSPACE, test "$userSpaceBitness" = "32")
 AM_CONDITIONAL(HAVE_X11, test "$have_x" = "yes")
 AM_CONDITIONAL(NO_ICU, test "$with_icu" = "yes")
+AM_CONDITIONAL(PAMD, test -d /etc/pam.d)
 
 ### Feature-specific flags / actions
 # Combine where possible
@@ -640,7 +655,7 @@ AM_CONDITIONAL(NO_ICU, test "$with_icu" = "yes")
 # tests for required components have passed and it's safe to allow multimon.
 # Otherwise, it should be disabled.
 if test "$MULTIMON_ENABLED" = "no"; then
-   AC_DEFINE([NO_MULTIMON], 1)
+   AC_DEFINE([NO_MULTIMON], 1, [Define to 1 if building without multimon support.])
 fi
 
 if test "$os$userSpaceBitness" = "linux64" || test "$HAVE_SYS_SETUID" = "yes"; then
@@ -670,7 +685,9 @@ fi
 
 ### General substs
 
+AC_SUBST([TARGET_OS])
 AC_SUBST([MODULES_OS])
+AC_SUBST([MODULES_DIR])
 AC_SUBST([MODULES])
 AC_SUBST([COMMON_XLIBS])
 AC_SUBST([GTK_CPPFLAGS])
@@ -681,6 +698,7 @@ AC_SUBST([PROCPS_CPPFLAGS])
 AC_SUBST([PROCPS_LIBS])
 AC_SUBST([ICU_CPPFLAGS])
 AC_SUBST([ICU_LIBS])
+AC_SUBST([PAM_PREFIX])
 
 ### Lib substs
 
@@ -759,6 +777,7 @@ AC_CONFIG_FILES([                      \
    lib/wiper/Makefile                  \
    guestd/Makefile                     \
    vmware-user/Makefile                \
+   vmware-user-suid-wrapper/Makefile   \
    toolbox/Makefile                    \
    hgfsclient/Makefile                 \
    hgfsmounter/Makefile                \
@@ -766,6 +785,7 @@ AC_CONFIG_FILES([                      \
    libguestlib/Makefile                \
    xferlogs/Makefile                   \
    modules/Makefile                    \
+   scripts/Makefile                   \
 ])
 
 ###
index 0619bbd7e2baa1f5fabdb69c044dae673b7fb242..b08f7c70f29027ffc39ff7fda82bd1e34581b06d 100644 (file)
 ### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ################################################################################
 
-noinst_PROGRAMS = guestd
+sbin_PROGRAMS = vmware-guestd
+pamdir = $(PAM_PREFIX)/pam.d
 
-guestd_LDADD =
-guestd_LDADD += ../lib/backdoor/libBackdoor.a
-guestd_LDADD += ../lib/conf/libConf.a
-guestd_LDADD += ../lib/dnd/libDnd.a
-guestd_LDADD += ../lib/err/libErr.a
-guestd_LDADD += ../lib/eventManager/libEventManager.a
-guestd_LDADD += ../lib/file/libFile.a
-guestd_LDADD += ../lib/guestApp/libGuestApp.a
-guestd_LDADD += ../lib/guestInfo/libGuestInfo.a
-guestd_LDADD += ../lib/hgfsServer/libHgfsServer.a
-guestd_LDADD += ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.a
-guestd_LDADD += ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.a
-guestd_LDADD += ../lib/deployPkg/libDeployPkg.a
-guestd_LDADD += ../lib/impersonate/libImpersonate.a
-guestd_LDADD += ../lib/netUtil/libNetUtil.a
-guestd_LDADD += ../lib/printer/libPrinter.a
-guestd_LDADD += ../lib/procMgr/libProcMgr.a
-guestd_LDADD += ../lib/rpcIn/libRpcIn.a
-guestd_LDADD += ../lib/rpcOut/libRpcOut.a
-guestd_LDADD += ../lib/rpcVmx/libRpcVmx.a
-guestd_LDADD += ../lib/SLPv2Parser/libSLPv2Parser.a
-guestd_LDADD += ../lib/socketMgr/libSocketMgr.a
-guestd_LDADD += ../lib/strUtil/libStrUtil.a
-guestd_LDADD += ../lib/string/libString.a
-guestd_LDADD += ../lib/sync/libSync.a
-guestd_LDADD += ../lib/syncDriver/libSyncDriver.a
-guestd_LDADD += ../lib/system/libSystem.a
-guestd_LDADD += ../lib/user/libUser.a
-guestd_LDADD += ../lib/vixTools/libVixTools.a
-guestd_LDADD += ../lib/vmBackupLib/libVmBackupLib.a
-guestd_LDADD += ../lib/vmCheck/libVmCheck.a
-guestd_LDADD += ../lib/vmSignal/libVmSignal.a
-guestd_LDADD += ../lib/wiper/libWiper.a
+vmware_guestd_LDADD =
+vmware_guestd_LDADD += ../lib/backdoor/libBackdoor.a
+vmware_guestd_LDADD += ../lib/conf/libConf.a
+vmware_guestd_LDADD += ../lib/dnd/libDnd.a
+vmware_guestd_LDADD += ../lib/err/libErr.a
+vmware_guestd_LDADD += ../lib/eventManager/libEventManager.a
+vmware_guestd_LDADD += ../lib/file/libFile.a
+vmware_guestd_LDADD += ../lib/guestApp/libGuestApp.a
+vmware_guestd_LDADD += ../lib/guestInfo/libGuestInfo.a
+vmware_guestd_LDADD += ../lib/hgfsServer/libHgfsServer.a
+vmware_guestd_LDADD += ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.a
+vmware_guestd_LDADD += ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.a
+vmware_guestd_LDADD += ../lib/deployPkg/libDeployPkg.a
+vmware_guestd_LDADD += ../lib/impersonate/libImpersonate.a
+vmware_guestd_LDADD += ../lib/netUtil/libNetUtil.a
+vmware_guestd_LDADD += ../lib/printer/libPrinter.a
+vmware_guestd_LDADD += ../lib/procMgr/libProcMgr.a
+vmware_guestd_LDADD += ../lib/rpcIn/libRpcIn.a
+vmware_guestd_LDADD += ../lib/rpcOut/libRpcOut.a
+vmware_guestd_LDADD += ../lib/rpcVmx/libRpcVmx.a
+vmware_guestd_LDADD += ../lib/SLPv2Parser/libSLPv2Parser.a
+vmware_guestd_LDADD += ../lib/socketMgr/libSocketMgr.a
+vmware_guestd_LDADD += ../lib/strUtil/libStrUtil.a
+vmware_guestd_LDADD += ../lib/string/libString.a
+vmware_guestd_LDADD += ../lib/sync/libSync.a
+vmware_guestd_LDADD += ../lib/syncDriver/libSyncDriver.a
+vmware_guestd_LDADD += ../lib/system/libSystem.a
+vmware_guestd_LDADD += ../lib/user/libUser.a
+vmware_guestd_LDADD += ../lib/vixTools/libVixTools.a
+vmware_guestd_LDADD += ../lib/vmBackupLib/libVmBackupLib.a
+vmware_guestd_LDADD += ../lib/vmCheck/libVmCheck.a
+vmware_guestd_LDADD += ../lib/vmSignal/libVmSignal.a
+vmware_guestd_LDADD += ../lib/wiper/libWiper.a
 # In the absence of the linker options --start-group and --end-group (which
 # can't be put in LDADD), we need to bring the following libraries out of the
 # alphabetical order so their symbols are properly resolved.
-guestd_LDADD += ../lib/dict/libDict.a
-guestd_LDADD += ../lib/hgfs/libHgfs.a
-guestd_LDADD += ../lib/message/libMessage.a
-guestd_LDADD += ../lib/unicode/libUnicode.a
-guestd_LDADD += ../lib/misc/libMisc.a
-guestd_LDADD += ../lib/foundryMsg/libFoundryMsg.a
-guestd_LDADD += ../lib/auth/libAuth.a
-guestd_LDADD += ../lib/panicDefault/libPanicDefault.a
-guestd_LDADD += ../lib/panic/libPanic.a
+vmware_guestd_LDADD += ../lib/dict/libDict.a
+vmware_guestd_LDADD += ../lib/hgfs/libHgfs.a
+vmware_guestd_LDADD += ../lib/message/libMessage.a
+vmware_guestd_LDADD += ../lib/unicode/libUnicode.a
+vmware_guestd_LDADD += ../lib/misc/libMisc.a
+vmware_guestd_LDADD += ../lib/foundryMsg/libFoundryMsg.a
+vmware_guestd_LDADD += ../lib/auth/libAuth.a
+vmware_guestd_LDADD += ../lib/panicDefault/libPanicDefault.a
+vmware_guestd_LDADD += ../lib/panic/libPanic.a
 if SOLARIS
    HGFS_BD = ../lib/hgfsBd/libHgfsBd.a
 else
    HGFS_BD =
 endif
-guestd_LDADD += $(HGFS_BD)
-guestd_LDADD += @ICU_LIBS@
-guestd_LDADD += @GUESTD_LDADD@
+vmware_guestd_LDADD += $(HGFS_BD)
+vmware_guestd_LDADD += @ICU_LIBS@
+vmware_guestd_LDADD += @GUESTD_LDADD@
 
-guestd_SOURCES =
-guestd_SOURCES += debugStdio.c
-guestd_SOURCES += foreignVMToolsDaemon.c
-guestd_SOURCES += foreignVMToolsNetworking.c
-guestd_SOURCES += foundryToolsDaemon.c
-guestd_SOURCES += main.c
-guestd_SOURCES += stub.c
-guestd_SOURCES += toolsDaemon.c
+vmware_guestd_SOURCES =
+vmware_guestd_SOURCES += debugStdio.c
+vmware_guestd_SOURCES += foreignVMToolsDaemon.c
+vmware_guestd_SOURCES += foreignVMToolsNetworking.c
+vmware_guestd_SOURCES += foundryToolsDaemon.c
+vmware_guestd_SOURCES += main.c
+vmware_guestd_SOURCES += stub.c
+vmware_guestd_SOURCES += toolsDaemon.c
+
+if LINUX
+if PAMD
+if THIRTY_TWO_BIT_USERSPACE
+pam_SCRIPTS = ../scripts/linux/pam.d/vmware-guestd
+else
+pam_SCRIPTS = ../scripts/linux/pam.d/vmware-guestd-x64
+endif !THIRTY_TWO_BIT_USERSPACE
+endif PAMD
+endif LINUX
+
+install-exec-hook:
+       $(INSTALL) -d /etc/vmware-tools
+       echo 'disable-tools-version = "true"' > /etc/vmware-tools/tools.conf
+
+uninstall-hook:
+       $(RM) -rf /etc/vmware-tools
index d4b6ed4b6957fb83f1baf78f5dc8481123886c80..65fbd3b76d7ab5006c8cf49f78a36f670f4da91d 100644 (file)
@@ -31,6 +31,7 @@
 ### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ################################################################################
 
+
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -49,7 +50,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = guestd$(EXEEXT)
+sbin_PROGRAMS = vmware-guestd$(EXEEXT)
 subdir = guestd
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -58,15 +59,17 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-am_guestd_OBJECTS = debugStdio.$(OBJEXT) \
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pamdir)"
+sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(sbin_PROGRAMS)
+am_vmware_guestd_OBJECTS = debugStdio.$(OBJEXT) \
        foreignVMToolsDaemon.$(OBJEXT) \
        foreignVMToolsNetworking.$(OBJEXT) \
        foundryToolsDaemon.$(OBJEXT) main.$(OBJEXT) stub.$(OBJEXT) \
        toolsDaemon.$(OBJEXT)
-guestd_OBJECTS = $(am_guestd_OBJECTS)
+vmware_guestd_OBJECTS = $(am_vmware_guestd_OBJECTS)
 @SOLARIS_TRUE@am__DEPENDENCIES_1 = ../lib/hgfsBd/libHgfsBd.a
-guestd_DEPENDENCIES = ../lib/backdoor/libBackdoor.a \
+vmware_guestd_DEPENDENCIES = ../lib/backdoor/libBackdoor.a \
        ../lib/conf/libConf.a ../lib/dnd/libDnd.a ../lib/err/libErr.a \
        ../lib/eventManager/libEventManager.a ../lib/file/libFile.a \
        ../lib/guestApp/libGuestApp.a ../lib/guestInfo/libGuestInfo.a \
@@ -91,6 +94,8 @@ guestd_DEPENDENCIES = ../lib/backdoor/libBackdoor.a \
        ../lib/foundryMsg/libFoundryMsg.a ../lib/auth/libAuth.a \
        ../lib/panicDefault/libPanicDefault.a ../lib/panic/libPanic.a \
        $(am__DEPENDENCIES_1)
+pamSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(pam_SCRIPTS)
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -103,8 +108,8 @@ CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-SOURCES = $(guestd_SOURCES)
-DIST_SOURCES = $(guestd_SOURCES)
+SOURCES = $(vmware_guestd_SOURCES)
+DIST_SOURCES = $(vmware_guestd_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -169,6 +174,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -177,6 +183,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -185,6 +192,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
@@ -244,11 +252,12 @@ sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+pamdir = $(PAM_PREFIX)/pam.d
 # In the absence of the linker options --start-group and --end-group (which
 # can't be put in LDADD), we need to bring the following libraries out of the
 # alphabetical order so their symbols are properly resolved.
-guestd_LDADD = ../lib/backdoor/libBackdoor.a ../lib/conf/libConf.a \
-       ../lib/dnd/libDnd.a ../lib/err/libErr.a \
+vmware_guestd_LDADD = ../lib/backdoor/libBackdoor.a \
+       ../lib/conf/libConf.a ../lib/dnd/libDnd.a ../lib/err/libErr.a \
        ../lib/eventManager/libEventManager.a ../lib/file/libFile.a \
        ../lib/guestApp/libGuestApp.a ../lib/guestInfo/libGuestInfo.a \
        ../lib/hgfsServer/libHgfsServer.a \
@@ -274,9 +283,11 @@ guestd_LDADD = ../lib/backdoor/libBackdoor.a ../lib/conf/libConf.a \
        $(HGFS_BD) @ICU_LIBS@ @GUESTD_LDADD@
 @SOLARIS_FALSE@HGFS_BD = 
 @SOLARIS_TRUE@HGFS_BD = ../lib/hgfsBd/libHgfsBd.a
-guestd_SOURCES = debugStdio.c foreignVMToolsDaemon.c \
+vmware_guestd_SOURCES = debugStdio.c foreignVMToolsDaemon.c \
        foreignVMToolsNetworking.c foundryToolsDaemon.c main.c stub.c \
        toolsDaemon.c
+@LINUX_TRUE@@PAMD_TRUE@@THIRTY_TWO_BIT_USERSPACE_FALSE@pam_SCRIPTS = ../scripts/linux/pam.d/vmware-guestd-x64
+@LINUX_TRUE@@PAMD_TRUE@@THIRTY_TWO_BIT_USERSPACE_TRUE@pam_SCRIPTS = ../scripts/linux/pam.d/vmware-guestd
 all: all-am
 
 .SUFFIXES:
@@ -310,16 +321,56 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+       @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         if test -f $$p \
+            || test -f $$p1 \
+         ; then \
+           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \
+         else :; fi; \
+       done
+
+uninstall-sbinPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(sbindir)/$$f"; \
+       done
 
-clean-noinstPROGRAMS:
-       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+clean-sbinPROGRAMS:
+       @list='$(sbin_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
-guestd$(EXEEXT): $(guestd_OBJECTS) $(guestd_DEPENDENCIES) 
-       @rm -f guestd$(EXEEXT)
-       $(LINK) $(guestd_OBJECTS) $(guestd_LDADD) $(LIBS)
+vmware-guestd$(EXEEXT): $(vmware_guestd_OBJECTS) $(vmware_guestd_DEPENDENCIES) 
+       @rm -f vmware-guestd$(EXEEXT)
+       $(LINK) $(vmware_guestd_OBJECTS) $(vmware_guestd_LDADD) $(LIBS)
+install-pamSCRIPTS: $(pam_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(pamdir)" || $(MKDIR_P) "$(DESTDIR)$(pamdir)"
+       @list='$(pam_SCRIPTS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f $$d$$p; then \
+           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+           echo " $(pamSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(pamdir)/$$f'"; \
+           $(pamSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(pamdir)/$$f"; \
+         else :; fi; \
+       done
+
+uninstall-pamSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pam_SCRIPTS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+         echo " rm -f '$(DESTDIR)$(pamdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(pamdir)/$$f"; \
+       done
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -438,8 +489,11 @@ distdir: $(DISTFILES)
        done
 check-am: all-am
 check: check-am
-all-am: Makefile $(PROGRAMS)
+all-am: Makefile $(PROGRAMS) $(SCRIPTS)
 installdirs:
+       for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pamdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -466,7 +520,7 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
        mostlyclean-am
 
 distclean: distclean-am
@@ -485,11 +539,13 @@ info: info-am
 
 info-am:
 
-install-data-am:
+install-data-am: install-pamSCRIPTS
 
 install-dvi: install-dvi-am
 
-install-exec-am:
+install-exec-am: install-sbinPROGRAMS
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
 
 install-html: install-html-am
 
@@ -521,23 +577,34 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-pamSCRIPTS uninstall-sbinPROGRAMS
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
 
-.MAKE: install-am install-strip
+.MAKE: install-am install-exec-am install-strip uninstall-am
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-noinstPROGRAMS ctags distclean \
+       clean-libtool clean-sbinPROGRAMS ctags distclean \
        distclean-compile distclean-generic distclean-libtool \
        distclean-tags distdir dvi dvi-am html html-am info info-am \
        install install-am install-data install-data-am install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags uninstall uninstall-am
-
+       install-dvi-am install-exec install-exec-am install-exec-hook \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pamSCRIPTS install-pdf install-pdf-am \
+       install-ps install-ps-am install-sbinPROGRAMS install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am uninstall-hook \
+       uninstall-pamSCRIPTS uninstall-sbinPROGRAMS
+
+
+install-exec-hook:
+       $(INSTALL) -d /etc/vmware-tools
+       echo 'disable-tools-version = "true"' > /etc/vmware-tools/tools.conf
+
+uninstall-hook:
+       $(RM) -rf /etc/vmware-tools
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 70501cd3ad98b9f540d157d0288282cdb1cd66cb..b1774810323960b797a1ebe0ac8fb328be40b2ab 100644 (file)
@@ -163,22 +163,20 @@ void DebugToFile(const char *str) // IN
 {
 #ifndef _CONSOLE
    FileIOResult fr;
-   FileIODescriptor *fd;
+   FileIODescriptor fd;
    size_t bytesWritten;
    Unicode timePrefix;
    const char *timePrefixUtf8;
-   
+
    ASSERT(debugFile[0] != 0);
-   
-   fd = (FileIODescriptor *) malloc(sizeof(FileIODescriptor));
-   ASSERT_NOT_IMPLEMENTED(fd);
-   FileIO_Invalidate(fd);
-   
-   fr = FileIO_Open(fd, debugFile, FILEIO_OPEN_ACCESS_WRITE,
+
+   FileIO_Invalidate(&fd);
+
+   fr = FileIO_Open(&fd, debugFile, FILEIO_OPEN_ACCESS_WRITE,
                     FILEIO_OPEN_CREATE);
    if (fr != FILEIO_SUCCESS) {
-      Warning("---Error opening file '%s'.\n", debugFile);
       debugFile[0] = '\0';
+      Warning("---Error opening file '%s'.\n", debugFile);
       goto done;
    }
 
@@ -195,19 +193,18 @@ void DebugToFile(const char *str) // IN
    timePrefixUtf8 = UTF8(timePrefix);
    ASSERT(timePrefixUtf8);
 
-   FileIO_Seek(fd, 0, FILEIO_SEEK_END);
-   fr = FileIO_Write(fd, timePrefixUtf8, strlen(timePrefixUtf8), &bytesWritten);
-   fr = FileIO_Write(fd, str, strlen(str), &bytesWritten);
+   FileIO_Seek(&fd, 0, FILEIO_SEEK_END);
+   fr = FileIO_Write(&fd, timePrefixUtf8, strlen(timePrefixUtf8), &bytesWritten);
+   fr = FileIO_Write(&fd, str, strlen(str), &bytesWritten);
    Unicode_Free(timePrefix);
    if (fr != FILEIO_SUCCESS) {
       Warning("---Error writing to file '%s'.\n", debugFile);
    }
 
  close:
-   FileIO_Close(fd);
-   
+   FileIO_Close(&fd);
+
  done:
-   free(fd);
    return;
 #endif // _CONSOLE
 }
@@ -255,7 +252,7 @@ Debug(char const *fmt, // IN: Format string
    OutputDebugString(str);
 #endif
 #if !defined(_WIN32) || defined(_CONSOLE)
-   fprintf(stderr, str);
+   fputs(str, stderr);
 #endif
 #endif
    if (debugFile[0] != '\0') {
index 5f3f31f21549424a5a09ec330dc4303a1c4ec3b0..52f3b1c42440324d0f20855cc483ab32f1e4cd0a 100644 (file)
 ### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ################################################################################
 
-noinst_PROGRAMS = hgfsclient
+bin_PROGRAMS = vmware-hgfsclient
 
-hgfsclient_LDADD =
-hgfsclient_LDADD += ../lib/conf/libConf.a
-hgfsclient_LDADD += ../lib/guestApp/libGuestApp.a
-hgfsclient_LDADD += ../lib/hgfs/libHgfs.a
-hgfsclient_LDADD += ../lib/hgfsBd/libHgfsBd.a
-hgfsclient_LDADD += ../lib/rpcOut/libRpcOut.a
-hgfsclient_LDADD += ../lib/strUtil/libStrUtil.a
-hgfsclient_LDADD += ../lib/string/libString.a
-hgfsclient_LDADD += ../lib/toolsLogger/libToolsLogger.a
-hgfsclient_LDADD += ../lib/vmCheck/libVmCheck.a
-hgfsclient_LDADD += ../lib/vmSignal/libVmSignal.a
+vmware_hgfsclient_LDADD =
+vmware_hgfsclient_LDADD += ../lib/conf/libConf.a
+vmware_hgfsclient_LDADD += ../lib/guestApp/libGuestApp.a
+vmware_hgfsclient_LDADD += ../lib/hgfs/libHgfs.a
+vmware_hgfsclient_LDADD += ../lib/hgfsBd/libHgfsBd.a
+vmware_hgfsclient_LDADD += ../lib/rpcOut/libRpcOut.a
+vmware_hgfsclient_LDADD += ../lib/strUtil/libStrUtil.a
+vmware_hgfsclient_LDADD += ../lib/string/libString.a
+vmware_hgfsclient_LDADD += ../lib/toolsLogger/libToolsLogger.a
+vmware_hgfsclient_LDADD += ../lib/vmCheck/libVmCheck.a
+vmware_hgfsclient_LDADD += ../lib/vmSignal/libVmSignal.a
 # In the absence of the linker options --start-group and --end-group (which can't
 # be put in LDADD), we need to bring the following libraries out of the alphebetical
 # order so their symbols are properly resolved.
-hgfsclient_LDADD += ../lib/backdoor/libBackdoor.a
-hgfsclient_LDADD += ../lib/dict/libDict.a
-hgfsclient_LDADD += ../lib/err/libErr.a
-hgfsclient_LDADD += ../lib/file/libFile.a
-hgfsclient_LDADD += ../lib/message/libMessage.a
-hgfsclient_LDADD += ../lib/rpcVmx/libRpcVmx.a
-hgfsclient_LDADD += ../lib/unicode/libUnicode.a
-hgfsclient_LDADD += ../lib/sync/libSync.a
-hgfsclient_LDADD += ../lib/misc/libMisc.a
-hgfsclient_LDADD += @ICU_LIBS@
+vmware_hgfsclient_LDADD += ../lib/backdoor/libBackdoor.a
+vmware_hgfsclient_LDADD += ../lib/dict/libDict.a
+vmware_hgfsclient_LDADD += ../lib/err/libErr.a
+vmware_hgfsclient_LDADD += ../lib/file/libFile.a
+vmware_hgfsclient_LDADD += ../lib/message/libMessage.a
+vmware_hgfsclient_LDADD += ../lib/rpcVmx/libRpcVmx.a
+vmware_hgfsclient_LDADD += ../lib/unicode/libUnicode.a
+vmware_hgfsclient_LDADD += ../lib/sync/libSync.a
+vmware_hgfsclient_LDADD += ../lib/misc/libMisc.a
+vmware_hgfsclient_LDADD += @ICU_LIBS@
 
-hgfsclient_SOURCES =
-hgfsclient_SOURCES += hgfsclient.c
-hgfsclient_SOURCES += stub.c
+vmware_hgfsclient_SOURCES =
+vmware_hgfsclient_SOURCES += hgfsclient.c
+vmware_hgfsclient_SOURCES += stub.c
index 5450ba46af860730a4ef0448ec480cc3d759ec3c..f7f398fcb84b7153fb59db85133256b531c5c326 100644 (file)
@@ -49,7 +49,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = hgfsclient$(EXEEXT)
+bin_PROGRAMS = vmware-hgfsclient$(EXEEXT)
 subdir = hgfsclient
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -58,10 +58,12 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-am_hgfsclient_OBJECTS = hgfsclient.$(OBJEXT) stub.$(OBJEXT)
-hgfsclient_OBJECTS = $(am_hgfsclient_OBJECTS)
-hgfsclient_DEPENDENCIES = ../lib/conf/libConf.a \
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_vmware_hgfsclient_OBJECTS = hgfsclient.$(OBJEXT) stub.$(OBJEXT)
+vmware_hgfsclient_OBJECTS = $(am_vmware_hgfsclient_OBJECTS)
+vmware_hgfsclient_DEPENDENCIES = ../lib/conf/libConf.a \
        ../lib/guestApp/libGuestApp.a ../lib/hgfs/libHgfs.a \
        ../lib/hgfsBd/libHgfsBd.a ../lib/rpcOut/libRpcOut.a \
        ../lib/strUtil/libStrUtil.a ../lib/string/libString.a \
@@ -84,8 +86,8 @@ CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-SOURCES = $(hgfsclient_SOURCES)
-DIST_SOURCES = $(hgfsclient_SOURCES)
+SOURCES = $(vmware_hgfsclient_SOURCES)
+DIST_SOURCES = $(vmware_hgfsclient_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -150,6 +152,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -158,6 +161,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -166,6 +170,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
@@ -228,17 +233,18 @@ top_srcdir = @top_srcdir@
 # In the absence of the linker options --start-group and --end-group (which can't
 # be put in LDADD), we need to bring the following libraries out of the alphebetical
 # order so their symbols are properly resolved.
-hgfsclient_LDADD = ../lib/conf/libConf.a ../lib/guestApp/libGuestApp.a \
-       ../lib/hgfs/libHgfs.a ../lib/hgfsBd/libHgfsBd.a \
-       ../lib/rpcOut/libRpcOut.a ../lib/strUtil/libStrUtil.a \
-       ../lib/string/libString.a ../lib/toolsLogger/libToolsLogger.a \
+vmware_hgfsclient_LDADD = ../lib/conf/libConf.a \
+       ../lib/guestApp/libGuestApp.a ../lib/hgfs/libHgfs.a \
+       ../lib/hgfsBd/libHgfsBd.a ../lib/rpcOut/libRpcOut.a \
+       ../lib/strUtil/libStrUtil.a ../lib/string/libString.a \
+       ../lib/toolsLogger/libToolsLogger.a \
        ../lib/vmCheck/libVmCheck.a ../lib/vmSignal/libVmSignal.a \
        ../lib/backdoor/libBackdoor.a ../lib/dict/libDict.a \
        ../lib/err/libErr.a ../lib/file/libFile.a \
        ../lib/message/libMessage.a ../lib/rpcVmx/libRpcVmx.a \
        ../lib/unicode/libUnicode.a ../lib/sync/libSync.a \
        ../lib/misc/libMisc.a @ICU_LIBS@
-hgfsclient_SOURCES = hgfsclient.c stub.c
+vmware_hgfsclient_SOURCES = hgfsclient.c stub.c
 all: all-am
 
 .SUFFIXES:
@@ -272,16 +278,37 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         if test -f $$p \
+            || test -f $$p1 \
+         ; then \
+           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+         else :; fi; \
+       done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(bindir)/$$f"; \
+       done
 
-clean-noinstPROGRAMS:
-       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+clean-binPROGRAMS:
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
-hgfsclient$(EXEEXT): $(hgfsclient_OBJECTS) $(hgfsclient_DEPENDENCIES) 
-       @rm -f hgfsclient$(EXEEXT)
-       $(LINK) $(hgfsclient_OBJECTS) $(hgfsclient_LDADD) $(LIBS)
+vmware-hgfsclient$(EXEEXT): $(vmware_hgfsclient_OBJECTS) $(vmware_hgfsclient_DEPENDENCIES) 
+       @rm -f vmware-hgfsclient$(EXEEXT)
+       $(LINK) $(vmware_hgfsclient_OBJECTS) $(vmware_hgfsclient_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -397,6 +424,9 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
+       for dir in "$(DESTDIR)$(bindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -423,8 +453,7 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
-       mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -rf ./$(DEPDIR)
@@ -446,7 +475,7 @@ install-data-am:
 
 install-dvi: install-dvi-am
 
-install-exec-am:
+install-exec-am: install-binPROGRAMS
 
 install-html: install-html-am
 
@@ -478,22 +507,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-binPROGRAMS
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-noinstPROGRAMS ctags distclean \
-       distclean-compile distclean-generic distclean-libtool \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-dvi \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+       clean-generic clean-libtool ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-binPROGRAMS install-data install-data-am install-dvi \
        install-dvi-am install-exec install-exec-am install-html \
        install-html-am install-info install-info-am install-man \
        install-pdf install-pdf-am install-ps install-ps-am \
        install-strip installcheck installcheck-am installdirs \
        maintainer-clean maintainer-clean-generic mostlyclean \
        mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags uninstall uninstall-am
+       pdf pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-binPROGRAMS
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index e78c9b3570cf3ca2e5a1f3376ad7f9492e1ceb24..e1e98f8d6e40a9f89013f5904ebb3814c7a3ff06 100644 (file)
 ### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ################################################################################
 
-noinst_PROGRAMS = hgfsmounter
+sbin_PROGRAMS = mount.vmhgfs
 
-hgfsmounter_LDADD =
-hgfsmounter_LDADD += ../lib/string/libString.a
-hgfsmounter_LDADD += ../lib/strUtil/libStrUtil.a
+mount_vmhgfs_LDADD =
+mount_vmhgfs_LDADD += ../lib/string/libString.a
+mount_vmhgfs_LDADD += ../lib/strUtil/libStrUtil.a
 
-hgfsmounter_SOURCES =
-hgfsmounter_SOURCES += hgfsmounter.c
-hgfsmounter_SOURCES += stub.c
+mount_vmhgfs_SOURCES =
+mount_vmhgfs_SOURCES += hgfsmounter.c
+mount_vmhgfs_SOURCES += stub.c
+
+if FREEBSD
+install-exec-hook:
+       $(MV) $(sbindir)/mount.vmhgfs $(sbindir)/mount_vmhgfs
+       chown root $(sbindir)/mount_vmhgfs
+       chmod u+s $(sbindir)/mount_vmhgfs
+uninstall-hook:
+       $(RM) -f $(sbindir)/mount_vmhgfs
+else
+install-exec-hook:
+       chown root $(sbindir)/mount.vmhgfs
+       chmod u+s $(sbindir)/mount.vmhgfs
+endif !FREEBSD
index 6a35a9177b42d9e16554b261c36fc3f8107b97e0..9ac14789caab74438aa05f3824eb8c5b253bd28e 100644 (file)
@@ -49,7 +49,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = hgfsmounter$(EXEEXT)
+sbin_PROGRAMS = mount.vmhgfs$(EXEEXT)
 subdir = hgfsmounter
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -58,10 +58,12 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-am_hgfsmounter_OBJECTS = hgfsmounter.$(OBJEXT) stub.$(OBJEXT)
-hgfsmounter_OBJECTS = $(am_hgfsmounter_OBJECTS)
-hgfsmounter_DEPENDENCIES = ../lib/string/libString.a \
+am__installdirs = "$(DESTDIR)$(sbindir)"
+sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(sbin_PROGRAMS)
+am_mount_vmhgfs_OBJECTS = hgfsmounter.$(OBJEXT) stub.$(OBJEXT)
+mount_vmhgfs_OBJECTS = $(am_mount_vmhgfs_OBJECTS)
+mount_vmhgfs_DEPENDENCIES = ../lib/string/libString.a \
        ../lib/strUtil/libStrUtil.a
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -75,8 +77,8 @@ CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-SOURCES = $(hgfsmounter_SOURCES)
-DIST_SOURCES = $(hgfsmounter_SOURCES)
+SOURCES = $(mount_vmhgfs_SOURCES)
+DIST_SOURCES = $(mount_vmhgfs_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -141,6 +143,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +152,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +161,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
@@ -216,9 +221,9 @@ sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-hgfsmounter_LDADD = ../lib/string/libString.a \
+mount_vmhgfs_LDADD = ../lib/string/libString.a \
        ../lib/strUtil/libStrUtil.a
-hgfsmounter_SOURCES = hgfsmounter.c stub.c
+mount_vmhgfs_SOURCES = hgfsmounter.c stub.c
 all: all-am
 
 .SUFFIXES:
@@ -252,16 +257,37 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+       @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         if test -f $$p \
+            || test -f $$p1 \
+         ; then \
+           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \
+         else :; fi; \
+       done
+
+uninstall-sbinPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(sbindir)/$$f"; \
+       done
 
-clean-noinstPROGRAMS:
-       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+clean-sbinPROGRAMS:
+       @list='$(sbin_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
-hgfsmounter$(EXEEXT): $(hgfsmounter_OBJECTS) $(hgfsmounter_DEPENDENCIES) 
-       @rm -f hgfsmounter$(EXEEXT)
-       $(LINK) $(hgfsmounter_OBJECTS) $(hgfsmounter_LDADD) $(LIBS)
+mount.vmhgfs$(EXEEXT): $(mount_vmhgfs_OBJECTS) $(mount_vmhgfs_DEPENDENCIES) 
+       @rm -f mount.vmhgfs$(EXEEXT)
+       $(LINK) $(mount_vmhgfs_OBJECTS) $(mount_vmhgfs_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -377,6 +403,9 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
+       for dir in "$(DESTDIR)$(sbindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -401,9 +430,10 @@ distclean-generic:
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+@FREEBSD_FALSE@uninstall-hook:
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
        mostlyclean-am
 
 distclean: distclean-am
@@ -426,7 +456,9 @@ install-data-am:
 
 install-dvi: install-dvi-am
 
-install-exec-am:
+install-exec-am: install-sbinPROGRAMS
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
 
 install-html: install-html-am
 
@@ -458,23 +490,37 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-sbinPROGRAMS
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
 
-.MAKE: install-am install-strip
+.MAKE: install-am install-exec-am install-strip uninstall-am
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-noinstPROGRAMS ctags distclean \
+       clean-libtool clean-sbinPROGRAMS ctags distclean \
        distclean-compile distclean-generic distclean-libtool \
        distclean-tags distdir dvi dvi-am html html-am info info-am \
        install install-am install-data install-data-am install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags uninstall uninstall-am
-
+       install-dvi-am install-exec install-exec-am install-exec-hook \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am install-sbinPROGRAMS install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am uninstall-hook \
+       uninstall-sbinPROGRAMS
+
+
+@FREEBSD_TRUE@install-exec-hook:
+@FREEBSD_TRUE@ $(MV) $(sbindir)/mount.vmhgfs $(sbindir)/mount_vmhgfs
+@FREEBSD_TRUE@ chown root $(sbindir)/mount_vmhgfs
+@FREEBSD_TRUE@ chmod u+s $(sbindir)/mount_vmhgfs
+@FREEBSD_TRUE@uninstall-hook:
+@FREEBSD_TRUE@ $(RM) -f $(sbindir)/mount_vmhgfs
+@FREEBSD_FALSE@install-exec-hook:
+@FREEBSD_FALSE@        chown root $(sbindir)/mount.vmhgfs
+@FREEBSD_FALSE@        chmod u+s $(sbindir)/mount.vmhgfs
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 93fed56eef3ce6f3f7fbee6e69bd33cf3ec8e20f..7532d0924da4a4a2e15d15ad271c620f9164302e 100644 (file)
@@ -132,6 +132,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -140,6 +141,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -148,6 +150,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 8ade1f5dccd1c9957cc4b33242af4a386235db00..2dbff28deadc6a4f2a149d52bbb9f99c2a447075 100644 (file)
@@ -142,6 +142,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -150,6 +151,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -158,6 +160,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 8b70aeb171437839b06f5c0717bd061aacdec5f0..e1621adb63fd35dd469cf1024b52ea0ce9cb96c8 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index e747c7c4f66dd2edc18c48906f1604034cb612a0..2361e1458e319b2b75080df645880b030a12549d 100644 (file)
 #include <crypt.h>
 #endif
 
-#include "auth.h"
-
+#include "vmware.h"
 #include "vm_version.h"
-#include "vm_assert.h"
 #include "posix.h"
+#include "auth.h"
 
 #ifdef USE_PAM
 #  include "file.h"
index 03be13be984c4ff1a54a7c29320f666028ec9eaa..f8f3d17686f9464d275604fba53fbb2798fadde9 100644 (file)
@@ -160,6 +160,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -168,6 +169,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -176,6 +178,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 60b2b47373e675bf300b7ba20c28b852f251df78..7c5add9fb8cd3857ebaf926fd38b271aff872db3 100644 (file)
@@ -146,6 +146,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -154,6 +155,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -162,6 +164,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 0aaf6bbc79b348376061cc496188d39ea70d3dc4..b0a2270f1b4ed61f000e754cc89fcd1588b737ac 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 680b4b3db81c8ac36cb9d00a68c0ac314bc142ac..5c1d58e29d5f20b296a1ee1842cd2246b5bcc906 100644 (file)
@@ -142,6 +142,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -150,6 +151,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -158,6 +160,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 21f2f04582a2aab12dc3faf1071b80ce487ccbb1..75f51b525e138776ec0c4f860c18999e3c7fe71b 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index e6ce318944b88cac985845c7697ec4629e337fa9..105eae0d8f6fc45829785dc773a8de39204bfe5c 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index d79910c920890785fd593f41b4be86c62deb143b..b0ef43514b6846f3695accc0d0a5c22ced6b2d46 100644 (file)
@@ -28,6 +28,7 @@
 #include <time.h>
 #include <limits.h>
 
+#include "vmware.h"
 #include "dndInt.h"
 #include "dnd.h"
 #include "file.h"
index fe19be03138365b40f26fcaf810343872ae554e7..e0f8a8cae4ff2a7a35b501126eb0e92c6afafda5 100644 (file)
@@ -29,6 +29,7 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 
+#include "vmware.h"
 #include "dndInt.h"
 #include "dnd.h"
 #include "posix.h"
index d3cbd3b2902eef5db8510f62ca1291889cbaee88..125089e2d595b36f70f2c540ac26d4fd09a70e58 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index f214bdeb855c71c322f03ad7de21c7aecf13cb4a..51bcc95bfaf73803e37ddba22d1b9e32e321999e 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 35d281f67b47629fb905ea0ea3c395a81835acc1..75fb7ca36d7d491d0f179a0e3f58efba3f294a71 100644 (file)
@@ -143,6 +143,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -151,6 +152,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -159,6 +161,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 10764e9a9eda036549534844ef590117f426b2ce..cd9e3b7a9b64b311888323d684f9d9324e463923 100644 (file)
@@ -175,6 +175,32 @@ File_Unlink(ConstUnicode pathName)  // IN:
    return (FileDeletion(pathName, TRUE) == 0) ? 0 : -1;
 }
 
+/*
+ *----------------------------------------------------------------------
+ *
+ * File_UnlinkNoFollow --
+ *
+ *      Unlink the file (do not follow symbolic links).
+ *      On Windows, there are no symbolic links so this is the same as
+ *      File_Unlink
+ *
+ * Results:
+ *      Return 0 if the unlink is successful. Otherwise, returns -1.
+ *
+ * Side effects:
+ *      The file is removed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+File_UnlinkNoFollow(ConstUnicode pathName)  // IN:
+{
+   return (FileDeletion(pathName, FALSE) == 0) ? 0 : -1;
+}
+
+
+
 
 /*
  *----------------------------------------------------------------------
index 78b0d65bec3d37a7e0bf9c350dcdefdd28a56bf8..e171b1c37d8d2c29b82a35af5d931c72ed98240a 100644 (file)
  *
  */
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
 #include "vmware.h"
 #include "util.h"
 #include "fileIO.h"
@@ -268,7 +272,16 @@ FileIO_Lock(FileIODescriptor *file, // IN/OUT:
                  (err == 0) ? "Lock timed out" : strerror(err));
 
          /* Return a serious failure status if the locking code did */
-         ret = (err == 0) ? FILEIO_LOCK_FAILED : FILEIO_ERROR;
+         switch (err) {
+         case 0:             // file is currently locked
+            ret = FILEIO_LOCK_FAILED;
+            break;
+         case ENAMETOOLONG:  // path is too long
+            ret = FILEIO_FILE_NAME_TOO_LONG;
+            break;
+         default:            // some sort of locking error
+            ret = FILEIO_ERROR;
+         }
       }
    }
 #else
@@ -495,7 +508,7 @@ FileIO_Pread(FileIODescriptor *fd,    // IN: File descriptor
 
 FileIOResult
 FileIO_Pwrite(FileIODescriptor *fd,   // IN: File descriptor
-              void *buf,              // IN: Buffer to write from
+              void const *buf,        // IN: Buffer to write from
               size_t len,             // IN: Length of the buffer
               uint64 offset)          // IN: Offset to start writing
 {
@@ -503,7 +516,8 @@ FileIO_Pwrite(FileIODescriptor *fd,   // IN: File descriptor
 
    ASSERT(fd);
 
-   iov.iov_base = buf;
+   /* The cast is safe because FileIO_Pwritev() will not write to '*buf'. */
+   iov.iov_base = (void *)buf;
    iov.iov_len = len;
 
    return FileIO_Pwritev(fd, &iov, 1, offset, len);
index 6807e61673101a8ba574cd2ac1869e09c2f4bc98..8942baeeddd1fcac4cfc13b86c5c267f15d6234d 100644 (file)
@@ -581,15 +581,10 @@ ProxyUse(ConstUnicode pathName,  // IN:
       path = Unicode_Duplicate(U("."));
    } else {
       Unicode temp;
-      Unicode testPath;
 
       temp = Unicode_Substr(pathName, 0, index + 1);
-      testPath = Unicode_Append(temp, U("."));
-
-      path = Unicode_GetAllocBytes(testPath, STRING_ENCODING_DEFAULT);
-
+      path = Unicode_Append(temp, U("."));
       Unicode_Free(temp);
-      Unicode_Free(testPath);
    }
 
    /*
@@ -1256,114 +1251,6 @@ FileIO_Sync(const FileIODescriptor *file) // IN
 #if !defined(VMX86_TOOLS) || (!defined(__FreeBSD__) && !defined(sun))
 
 
-/*
- *-----------------------------------------------------------------------------
- *
- * FileIOCoalesce --
- *
- *      Linux 2.2 does a fairly braindead thing with ioVec's.  It simply issues
- *      reads and writes internal to the kernel in serial
- *      (linux/fs/read_write.c:do_readv_writev()).  We optimize here for the
- *      case of many small chunks.  The cost of the extra copy in this case
- *      is made up for by the decreased number of separate I/Os the kernel
- *      issues internally. Note that linux 2.4 seems to be smarter with respect
- *      to this problem.
- *
- * Results:
- *      Bool - Whether or not coalescing was done.  If it was done,
- *             FileIODecoalesce *MUST* be called.
- *
- * Side effects:
- *      FileIOCoalesce will malloc *outVec if coalescing is performed
- *
- *-----------------------------------------------------------------------------
- */
-
-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
-               struct iovec *outVec)    // OUT: Coalesced (1-entry) iovec
-{
-   uint8 *cBuf;
-
-   ASSERT(inVec);
-   ASSERT(outVec);
-
-   FileIO_OptionalSafeInitialize();
-
-   /* simple case: no need to coalesce */
-   if (inCount == 1) {
-      return FALSE;
-   }
-
-   /*
-    * Only coalesce when the number of entries is above our count threshold
-    * and the average size of an entry is less than our size threshold
-    */
-   if (!forceCoalesce &&
-       (!filePosixOptions.enabled ||
-       inCount <= filePosixOptions.countThreshold ||
-       inTotalSize / inCount >= filePosixOptions.sizeThreshold)) {
-      return FALSE;
-   }
-
-   // XXX: Wouldn't it be nice if we could log from here!
-   //LOG(5, ("FILE: Coalescing %s of %d elements and %d size\n",
-   //        isWrite ? "write" : "read", inCount, inTotalSize));
-   cBuf = Util_SafeMalloc(sizeof(uint8) * inTotalSize);
-
-  if (isWrite) {
-      IOV_WriteIovToBuf(inVec, inCount, cBuf, inTotalSize);
-   }
-
-   outVec->iov_base = cBuf;
-   outVec->iov_len = inTotalSize;
-   return TRUE;
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * FileIODecoalesce --
- *
- *      Inverse of the coalesce optimization.  For writes, its a NOOP, but
- *      for reads, it copies the data back into the original buffer.
- *      It also frees the memory allocated by FileIOCoalesce.
- *
- * Results:
- *      void
- *
- * Side effects:
- *      None
- *
- *-----------------------------------------------------------------------------
- */
-
-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)
-{
-   ASSERT(coVec);
-   ASSERT(origVec);
-
-   ASSERT(actualSize <= coVec->iov_len);
-   ASSERT_NOT_TESTED(actualSize == coVec->iov_len);
-
-   if (!isWrite) {
-      IOV_WriteBufToIov(coVec->iov_base, actualSize, origVec, origVecCount);
-   }
-
-   free(coVec->iov_base);
-}
-
-
 /*
  *----------------------------------------------------------------------
  *
@@ -1397,30 +1284,20 @@ FileIO_Readv(FileIODescriptor *fd,      // IN
    size_t bytesRead = 0, sum = 0;
    FileIOResult fret = FILEIO_ERROR;
    int nRetries = 0, maxRetries = numEntries;
-   struct iovec coV;
-   struct iovec *vPtr;
-   Bool didCoalesce;
-   int numVec;
+   struct iovec *vPtr = v;
+   int numVec = numEntries;
 
    ASSERT(fd);
 
-   didCoalesce = FileIOCoalesce(v, numEntries, totalSize, FALSE, FALSE, &coV);
-
    STAT_INST_INC(fd->stats, NumReadvs);
    STAT_INST_INC_BY(fd->stats, BytesReadv, totalSize);
    STATS_ONLY({
       fd->readvIn++;
       fd->bytesRead += totalSize;
-      if (didCoalesce) {
-         fd->numReadCoalesced++;
-      }
    })
 
    ASSERT_NOT_IMPLEMENTED(totalSize < 0x80000000);
 
-   numVec = didCoalesce ? 1 : numEntries;
-   vPtr = didCoalesce ? &coV : v;
-
    while (nRetries < maxRetries) {
       ssize_t retval;
       ASSERT(numVec > 0);
@@ -1468,10 +1345,6 @@ FileIO_Readv(FileIODescriptor *fd,      // IN
       }
    }
 
-   if (didCoalesce) {
-      FileIODecoalesce(&coV, v, numEntries, bytesRead, FALSE);
-   }
-
    if (actual) {
       *actual = bytesRead;
    }
@@ -1512,30 +1385,20 @@ FileIO_Writev(FileIODescriptor *fd,     // IN
    size_t bytesWritten = 0, sum = 0;
    FileIOResult fret = FILEIO_ERROR;
    int nRetries = 0, maxRetries = numEntries;
-   struct iovec coV;
-   struct iovec *vPtr;
-   Bool didCoalesce;
-   int numVec;
+   struct iovec *vPtr = v;
+   int numVec = numEntries;
 
    ASSERT(fd);
 
-   didCoalesce = FileIOCoalesce(v, numEntries, totalSize, TRUE, FALSE, &coV);
-
    STAT_INST_INC(fd->stats, NumWritevs);
    STAT_INST_INC_BY(fd->stats, BytesWritev, totalSize);
    STATS_ONLY({
       fd->writevIn++;
       fd->bytesWritten += totalSize;
-      if (didCoalesce) {
-         fd->numWriteCoalesced++;
-      }
    })
 
    ASSERT_NOT_IMPLEMENTED(totalSize < 0x80000000);
 
-   numVec = didCoalesce ? 1 : numEntries;
-   vPtr = didCoalesce ? &coV : v;
-
    while (nRetries < maxRetries) {
       ssize_t retval;
       ASSERT(numVec > 0);
@@ -1566,10 +1429,6 @@ FileIO_Writev(FileIODescriptor *fd,     // IN
       }
    }
 
-   if (didCoalesce) {
-      FileIODecoalesce(&coV, v, numEntries, bytesWritten, TRUE);
-   }
-
    if (actual) {
       *actual = bytesWritten;
    }
@@ -1606,33 +1465,21 @@ FileIO_Preadv(FileIODescriptor *fd,    // IN: File descriptor
               size_t totalSize)        // IN: totalSize (bytes) in entries
 {
    size_t sum = 0;
-   struct iovec *vPtr;
-   struct iovec coV;
-   int count;
+   struct iovec *vPtr = entries;
+   int count = numEntries;
    uint64 fileOffset;
    FileIOResult fret;
-   Bool didCoalesce;
 
    ASSERT(fd);
    ASSERT(entries);
    ASSERT(!(fd->flags & FILEIO_ASYNCHRONOUS));
    ASSERT_NOT_IMPLEMENTED(totalSize < 0x80000000);
 
-   didCoalesce = FileIOCoalesce(entries, numEntries, totalSize, FALSE,
-                                TRUE /* force coalescing */,
-                                &coV);
-
-   count = didCoalesce ? 1 : numEntries;
-   vPtr = didCoalesce ? &coV : entries;
-
    STAT_INST_INC(fd->stats, NumPreadvs);
    STAT_INST_INC_BY(fd->stats, BytesPreadv, totalSize);
    STATS_ONLY({
       fd->preadvIn++;
       fd->bytesRead += totalSize;
-      if (didCoalesce) {
-         fd->numReadCoalesced++;
-      }
    })
 
    fileOffset = offset;
@@ -1672,9 +1519,6 @@ FileIO_Preadv(FileIODescriptor *fd,    // IN: File descriptor
    fret = FILEIO_SUCCESS;
 
 exit:
-   if (didCoalesce) {
-      FileIODecoalesce(&coV, entries, numEntries, sum, FALSE);
-   }
 
    return fret;
 }
@@ -1706,10 +1550,8 @@ FileIO_Pwritev(FileIODescriptor *fd,   // IN: File descriptor
                uint64 offset,          // IN: Offset to start writing
                size_t totalSize)       // IN: Total size (bytes) in entries
 {
-   struct iovec coV;
-   Bool didCoalesce;
-   struct iovec *vPtr;
-   int count;
+   struct iovec *vPtr = entries;
+   int count = numEntries;
    size_t sum = 0;
    uint64 fileOffset;
    FileIOResult fret;
@@ -1719,21 +1561,11 @@ FileIO_Pwritev(FileIODescriptor *fd,   // IN: File descriptor
    ASSERT(!(fd->flags & FILEIO_ASYNCHRONOUS));
    ASSERT_NOT_IMPLEMENTED(totalSize < 0x80000000);
 
-   didCoalesce = FileIOCoalesce(entries, numEntries, totalSize, TRUE,
-                                TRUE /* force coalescing */,
-                                &coV);
-
-   count = didCoalesce ? 1 : numEntries;
-   vPtr = didCoalesce ? &coV : entries;
-
    STAT_INST_INC(fd->stats, NumPwritevs);
    STAT_INST_INC_BY(fd->stats, BytesPwritev, totalSize);
    STATS_ONLY({
       fd->pwritevIn++;
       fd->bytesWritten += totalSize;
-      if (didCoalesce) {
-         fd->numWriteCoalesced++;
-      }
    })
 
    fileOffset = offset;
@@ -1777,9 +1609,6 @@ FileIO_Pwritev(FileIODescriptor *fd,   // IN: File descriptor
 
    fret = FILEIO_SUCCESS;
 exit:
-   if (didCoalesce) {
-      FileIODecoalesce(&coV, entries, numEntries, sum, TRUE);
-   }
 
    return fret;
 }
index d3b3dfb8db044672b835a952ad493f39aaec6cb2..e9d74edd4f9f3df2d597e19c788c7b969836f6e6 100644 (file)
@@ -1013,14 +1013,14 @@ MakeDirectory(ConstUnicode pathName)
 {
    int err;
 
-   ASSERT(pathName);
-
 #if !defined(_WIN32)
    mode_t save;
 
    save = umask(0);
 #endif
 
+   ASSERT(pathName);
+
    err = FileCreateDirectory(pathName);
 
 #if !defined(_WIN32)
@@ -1386,18 +1386,6 @@ FileLockIntrinsic(const char *machineID,    // IN:
        myValues.lockType, UTF8(pathName), myValues.machineID,
        myValues.executionID, myValues.msecMaxWaitTime));
 
-   /*
-    * Enforce the maximum path length restriction explicitely. Apparently
-    * the Windows POSIX routine mappings cannot be trusted to return
-    * ENAMETOOLONG when it is appropriate.
-    */
-
-   if ((Unicode_LengthInCodeUnits(pathName) +
-                                  FILELOCK_OVERHEAD) >= FILE_MAXPATH) {
-      *err = ENAMETOOLONG;
-      goto bail;
-   }
-
    /* Construct the locking directory path */
    dirPath = Unicode_Append(pathName, U(FILELOCK_SUFFIX));
 
index 20e9a23ca437687210b8eeb172ead0009f11f50a..5c78a4e051ddfcccb1b901d40b3a927d94ea069d 100644 (file)
@@ -165,6 +165,12 @@ FileDeletion(ConstUnicode pathName,   // IN:
    char *primaryPath = Unicode_GetAllocBytes(pathName,
                                             STRING_ENCODING_DEFAULT);
 
+   if (primaryPath == NULL && pathName != NULL) {
+      Log(LGPFX" %s: failed to convert \"%s\" to current encoding\n",
+         __FUNCTION__, UTF8(pathName));
+      return UNICODE_CONVERSION_ERRNO;
+   }
+
    if (handleLink) {
       struct stat statbuf;
 
@@ -454,9 +460,7 @@ FileStripFwdSlashes(ConstUnicode pathName)  // IN:
    ASSERT(pathName);
 
    path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_UTF8);
-   if (path == NULL) {
-      return NULL;
-   }
+   ASSERT(path != NULL);
 
    ptr = path;
    cptr = path;
@@ -729,6 +733,11 @@ File_SetTimes(ConstUnicode pathName,      // IN:
    }
 
    path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   if (path == NULL) {
+      Log(LGPFX" %s: failed to convert \"%s\" to current encoding\n",
+         __FUNCTION__, UTF8(pathName));
+      return FALSE;
+   }
 
    err = (lstat(path, &statBuf) == -1) ? errno : 0;
 
@@ -1763,39 +1772,42 @@ File_Replace(ConstUnicode oldName,  // IN: old file
              ConstUnicode newName)  // IN: new file
 {
    int status;
-   Bool result;
-   char *newPath;
-   char *oldPath;
+   Bool result = FALSE;
+   char *newPath = NULL;
+   char *oldPath = NULL;
    struct stat st;
 
-   if ((oldName == NULL) || (newName == NULL)) {
-      errno = EFAULT;
-      return FALSE;
-   }
-
    newPath = Unicode_GetAllocBytes(newName, STRING_ENCODING_DEFAULT);
+   if (newPath == NULL && newName != NULL) {
+      status = UNICODE_CONVERSION_ERRNO;
+      Msg_Append(MSGID(filePosix.replaceConversionFailed)
+                 "Failed to convert file path \"%s\" to current encoding\n",
+                 newName);
+      goto bail;
+   }
    oldPath = Unicode_GetAllocBytes(oldName, STRING_ENCODING_DEFAULT);
+   if (oldPath == NULL && oldName != NULL) {
+      status = UNICODE_CONVERSION_ERRNO;
+      Msg_Append(MSGID(filePosix.replaceConversionFailed)
+                 "Failed to convert file path \"%s\" to current encoding\n",
+                 oldName);
+      goto bail;
+   }
 
    if ((stat(oldPath, &st) == 0) && (chmod(newPath, st.st_mode) == -1)) {
       status = errno;
-
       Msg_Append(MSGID(filePosix.replaceChmodFailed)
                  "Failed to duplicate file permissions from "
                  "\"%s\" to \"%s\": %s\n",
-                 oldPath, newPath, Msg_ErrString());
-
-      result = FALSE;
+                 oldName, newName, Msg_ErrString());
       goto bail;
    }
 
    status = (rename(newPath, oldPath) == -1) ? errno : 0;
-
    if (status != 0) {
       Msg_Append(MSGID(filePosix.replaceRenameFailed)
                  "Failed to rename \"%s\" to \"%s\": %s\n",
-                 newPath, oldPath, Msg_ErrString());
-
-      result = FALSE;
+                 newName, oldName, Msg_ErrString());
       goto bail;
    }
 
@@ -1806,7 +1818,6 @@ bail:
    free(oldPath);
 
    errno = status;
-
    return result;
 }
 
index c277cef48accbd4bc693e70bc6c175ba2a0b7200..ba1926f14f7eb5b7a20327ee8817d9ff4a6b56dd 100644 (file)
@@ -143,6 +143,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -151,6 +152,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -159,6 +161,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index edee3e1f9a59fc2989497b357dabfdad4f5e0ecd..4d8558f557e3abbc9e99fbb4ae337e498a476b47 100644 (file)
@@ -39,6 +39,14 @@ static char ObfuscatedToPlainCharMap[256];
 
 static void VixMsgInitializeObfuscationMapping(void);
 
+static char *VixMsgEncodeBuffer(const uint8 *buffer,
+                                size_t bufferLength,
+                                Bool includeEncodingId);
+
+static char *VixMsgDecodeBuffer(const char *str,
+                                Bool nullTerminateResult,
+                                size_t *bufferLength);
+
 
 /*
  *----------------------------------------------------------------------------
@@ -575,17 +583,12 @@ char *
 VixMsg_ObfuscateNamePassword(const char *userName,      // IN
                              const char *password)      // IN
 {
-   char *packedBufferString = NULL;
-   char *base64String = NULL;
+   char *packedBuffer = NULL;
    char *resultString = NULL;
-   size_t resultBufferLength = 0;
-   size_t resultLength = 0;
+   char *destPtr;
+   size_t packedBufferLength = 0;
    size_t nameLength = 0;
    size_t passwordLength = 0;
-   char *srcPtr;
-   char *endSrcPtr;
-   char *destPtr;
-   size_t base64Length;
    
    if (NULL != userName) {
       nameLength = strlen(userName);
@@ -596,14 +599,9 @@ VixMsg_ObfuscateNamePassword(const char *userName,      // IN
    /*
     * Leave space for null terminating characters.
     */
-   resultLength = nameLength + 1 + passwordLength + 1;
-
-   /*
-    * Expand it to make space for base64 encoding, and escaping some characters.
-    */
-   resultBufferLength = resultLength * 3;
-   packedBufferString = Util_SafeMalloc(resultBufferLength + 1);
-   destPtr = packedBufferString;
+   packedBufferLength = nameLength + 1 + passwordLength + 1;
+   packedBuffer = Util_SafeMalloc(packedBufferLength);
+   destPtr = packedBuffer;
    if (NULL != userName) {
       Str_Strcpy(destPtr, userName, nameLength + 1);
       destPtr += nameLength;
@@ -615,39 +613,9 @@ VixMsg_ObfuscateNamePassword(const char *userName,      // IN
    }
    *(destPtr++) = 0;
 
-   base64String = Util_SafeMalloc(resultBufferLength + 1);
-   if (!(Base64_Encode((uint8 const *) packedBufferString,
-                       destPtr - packedBufferString,
-                       base64String, 
-                       resultBufferLength,
-                       &base64Length))) {
-      goto abort;
-   }
+   resultString = VixMsgEncodeBuffer(packedBuffer, packedBufferLength, FALSE);
 
-   /*
-    * Now, escape problematic characters.
-    */
-   VixMsgInitializeObfuscationMapping();
-   resultString = Util_SafeMalloc(resultBufferLength + 1);
-   destPtr = resultString;
-   srcPtr = base64String;
-   endSrcPtr = base64String + base64Length;
-   while ( srcPtr < endSrcPtr )
-   {
-      if (PlainToObfuscatedCharMap[(int) (*srcPtr)]) {
-         *(destPtr++) = '\\';
-         *(destPtr++) = PlainToObfuscatedCharMap[(int) (*srcPtr)];
-      } else {
-         *(destPtr++) = *srcPtr;
-      }
-
-      srcPtr++;
-   }
-   *destPtr = 0;
-
-abort:
-   free(packedBufferString);
-   free(base64String);
+   free(packedBuffer);
 
    return(resultString);
 } // VixMsg_ObfuscateNamePassword
@@ -658,11 +626,11 @@ abort:
  *
  * VixMsg_DeObfuscateNamePassword --
  *
- *       This reverses VixMsg_ObfuscateNamePassword. 
- *       See the notes for that procedure.
+ *      This reverses VixMsg_ObfuscateNamePassword. 
+ *      See the notes for that procedure.
  *
  * Results:
- *      VixError
+ *      Bool. TRUE on success, FALSE otherwise.
  *
  * Side effects:
  *      None.
@@ -676,39 +644,14 @@ VixMsg_DeObfuscateNamePassword(const char *packagedName,   // IN
                                char **passwordResult)      // OUT
 {
    Bool success = FALSE;
-   char *base64String = NULL;
    char *packedString = NULL;
    char *srcPtr;
-   char *destPtr;
-   size_t base64Length;
-   size_t packedStringLength;
 
-   
-   /*
-    * Remove escaped special characters.
-    * Do this in a private copy because we will change the string in place.
-    */
-   VixMsgInitializeObfuscationMapping();
-   base64String = Util_SafeStrdup(packagedName);
-   destPtr = base64String;
-   srcPtr = base64String;
-   while ( *srcPtr ) {
-      if ( '\\' == *srcPtr ) {
-         srcPtr++;
-         *(destPtr++) = ObfuscatedToPlainCharMap[(int) (*srcPtr)];
-      } else {
-         *(destPtr++) = *srcPtr;
-      }
-      srcPtr++;
-   }
-   *destPtr = 0;
-   base64Length = strlen(base64String);
-
-   packedString = Util_SafeMalloc(base64Length + 1);
-   if (!Base64_Decode(base64String, packedString, base64Length, &packedStringLength)) {
+   packedString = VixMsgDecodeBuffer(packagedName, FALSE, NULL);
+   if (NULL == packedString) {
       goto abort;
    }
-   
+
    srcPtr = packedString;
    if (NULL != userNameResult) {
       *userNameResult = Util_SafeStrdup(srcPtr);
@@ -721,7 +664,6 @@ VixMsg_DeObfuscateNamePassword(const char *packagedName,   // IN
    success = TRUE;
 
 abort:
-   free(base64String);
    free(packedString);
 
    return(success);
@@ -749,65 +691,104 @@ abort:
 
 char *
 VixMsg_EncodeString(const char *str)  // IN
+{
+   if (NULL == str) {
+      str = "";
+   }
+
+   return VixMsgEncodeBuffer(str, strlen(str), TRUE);
+} // VixMsg_EncodeString
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * VixMsgEncodeBuffer --
+ *
+ *       This makes a string safe to pass over a backdoor Tclo command as a 
+ *       string. It base64 encodes a string, which removes quote, space,
+ *       backslash, and other characters. This will also allow us to pass
+ *       UTF-8 strings.
+ *
+ * Results:
+ *      VixError
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+char *
+VixMsgEncodeBuffer(const uint8 *buffer,     // IN
+                   size_t bufferLength,     // IN
+                   Bool includeEncodingId)  // IN: Add 'a' (ASCII) at start of output
 {
    char *base64String = NULL;
    char *resultString = NULL;
    size_t resultBufferLength = 0;
-   size_t strLength = 0;
    char *srcPtr;
    char *endSrcPtr;
    char *destPtr;
    size_t base64Length;
    
-   if (NULL == str) {
-      str = "";
-   }
-   strLength = strlen(str);
-
-   resultBufferLength = (strLength + 1) * 3;
-   base64String = Util_SafeMalloc(resultBufferLength + 1);
-   if (!(Base64_Encode((uint8 const *) str,
-                       strLength,
+   base64Length = Base64_EncodedLength((uint8 const *) buffer,
+                                       bufferLength);
+   base64String = Util_SafeMalloc(base64Length);
+   if (!(Base64_Encode((uint8 const *) buffer,
+                       bufferLength,
                        base64String, 
-                       resultBufferLength,
+                       base64Length,
                        &base64Length))) {
       goto abort;
    }
 
    VixMsgInitializeObfuscationMapping();
+
+   /*
+    * Expand it to make space for escaping some characters.
+    */
+   resultBufferLength = base64Length * 2;
+   if (includeEncodingId) {
+      resultBufferLength++;
+   }
+
    resultString = Util_SafeMalloc(resultBufferLength + 1);
    destPtr = resultString;
    srcPtr = base64String;
    endSrcPtr = base64String + base64Length;
 
-   /*
-    * Start with the character-set type. 
-    *   'a' means ASCII.
-    */
-   *(destPtr++) = 'a';
+   if (includeEncodingId) {
+      /*
+       * Start with the character-set type. 
+       *   'a' means ASCII.
+       */
+      *(destPtr++) = 'a';
+   }
 
    /*
     * Now, escape problematic characters.
     */
-   while ( srcPtr < endSrcPtr )
+   while (srcPtr < endSrcPtr)
    {
-      if (PlainToObfuscatedCharMap[(int) (*srcPtr)]) {
+      if (PlainToObfuscatedCharMap[(unsigned int) (*srcPtr)]) {
          *(destPtr++) = '\\';
-         *(destPtr++) = PlainToObfuscatedCharMap[(int) (*srcPtr)];
+         *(destPtr++) = PlainToObfuscatedCharMap[(unsigned int) (*srcPtr)];
       } else {
          *(destPtr++) = *srcPtr;
       }
 
       srcPtr++;
    }
+
+   ASSERT_NOT_IMPLEMENTED((destPtr - resultString) <= resultBufferLength);
    *destPtr = 0;
 
 abort:
    free(base64String);
 
-   return(resultString);
-} // VixMsg_EncodeString
-
+   return resultString;
+} // VixMsgEncodeBuffer
 
 /*
  *-----------------------------------------------------------------------------
@@ -818,7 +799,7 @@ abort:
  *       See the notes for that procedure.
  *
  * Results:
- *      VixError
+ *      A pointer to the decoded string, or NULL on failure.
  *
  * Side effects:
  *      None.
@@ -829,13 +810,6 @@ abort:
 char *
 VixMsg_DecodeString(const char *str)   // IN
 {
-   char *base64String = NULL;
-   char *resultStr = NULL;
-   char *srcPtr;
-   char *destPtr;
-   size_t base64Length;
-   size_t resultStringLength;
-
    /*
     * Check the character set. 
     *   'a' means ASCII.
@@ -843,40 +817,105 @@ VixMsg_DecodeString(const char *str)   // IN
    if ((NULL == str) || ('a' != *str)) {
       return(NULL);
    }
-   str += 1;
 
-   VixMsgInitializeObfuscationMapping();
-   base64String = Util_SafeStrdup(str);
-   destPtr = base64String;
-   srcPtr = base64String;
+   return VixMsgDecodeBuffer(str + 1, TRUE, NULL);
+} // VixMsg_DecodeString
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * VixMsgDecodeBuffer --
+ *
+ *      This reverses VixMsgEncodeBuffer. 
+ *      See the notes for that procedure.
+ *
+ * Results:
+ *      A pointer to the decoded string, or NULL on failure.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+char *
+VixMsgDecodeBuffer(const char *str,           // IN
+                   Bool nullTerminateResult,  // OUT
+                   size_t *bufferLength)      // OUT: Optional
+{
+   char *base64String = NULL;
+   char *resultStr = NULL;
+   char *srcPtr;
+   char *destPtr;
+   size_t resultStrAllocatedLength;
+   size_t resultStrLogicalLength;
+
+   if (NULL != bufferLength) {
+      *bufferLength = 0;
+   }
 
    /*
     * Remove escaped special characters.
     * Do this in a private copy because we will change the string in place.
     */
-   while ( *srcPtr ) {
-      if ( '\\' == *srcPtr ) {
+   VixMsgInitializeObfuscationMapping();
+   base64String = Util_SafeStrdup(str);
+   destPtr = base64String;
+   srcPtr = base64String;
+
+   while (*srcPtr) {
+      if ('\\' == *srcPtr) {
          srcPtr++;
-         *(destPtr++) = ObfuscatedToPlainCharMap[(int) (*srcPtr)];
+         /*
+          * There should never be a null byte as part of an escape character or
+          * an escape character than translates into a null byte.
+          */
+         if ((0 == *srcPtr)
+                || (0 == ObfuscatedToPlainCharMap[(unsigned int) (*srcPtr)])) {
+            goto abort;
+         }
+         *(destPtr++) = ObfuscatedToPlainCharMap[(unsigned int) (*srcPtr)];
       } else {
          *(destPtr++) = *srcPtr;
       }
       srcPtr++;
    }
    *destPtr = 0;
-   base64Length = strlen(base64String);
 
-   resultStr = Util_SafeMalloc(base64Length + 1);
-   if (!Base64_Decode(base64String, resultStr, base64Length, &resultStringLength)) {
+   /*
+    * Add 1 to the Base64_DecodedLength(), since we base64 encoded the string
+    * without the NUL terminator and need to add one.
+    */
+   resultStrAllocatedLength = Base64_DecodedLength(base64String,
+                                                   destPtr - base64String);
+   if (nullTerminateResult) {
+      resultStrAllocatedLength += 1;
+   }
+
+   resultStr = Util_SafeMalloc(resultStrAllocatedLength);
+   if (!Base64_Decode(base64String,
+                      resultStr,
+                      resultStrAllocatedLength,
+                      &resultStrLogicalLength)
+          || (resultStrLogicalLength > resultStrAllocatedLength)) {
       free(resultStr);
       resultStr = NULL;
       goto abort;
    }
-   resultStr[resultStringLength] = 0;
+
+   if (nullTerminateResult) {
+      ASSERT_NOT_IMPLEMENTED(resultStrLogicalLength < resultStrAllocatedLength);
+      resultStr[resultStrLogicalLength] = 0;
+   }
+
+   if (NULL != bufferLength) {
+      *bufferLength = resultStrLogicalLength;
+   }
 
 abort:
    free(base64String);
 
    return(resultStr);
-} // VixMsg_DecodeString
+} // VixMsgDecodeBuffer
 
index 645b081fe6ab9f8b8db961564526a835a4ed3db2..6787620457bce11e0e86640a5d58b9cf4ac762d4 100644 (file)
@@ -84,7 +84,7 @@ FoundryThreads_StartThread(FoundryThreadProc proc,    // IN
                                             FoundryThreadWrapperProc,
                                             threadState,
                                             0,
-                                            (LPDWORD)&(threadState->threadId));
+                                            &(threadState->threadId));
    if (NULL == threadState->threadHandle) {
       err = VIX_E_OUT_OF_MEMORY;
       goto abort;
@@ -146,7 +146,7 @@ FoundryThreads_StopThread(FoundryWorkerThread *threadState)    // IN
 #ifdef _WIN32
       DWORD waitResult;
 
-      ASSERT(threadState->threadId != ((uintptr_t)GetCurrentThreadId()));
+      ASSERT(threadState->threadId != GetCurrentThreadId());
 
       waitResult = WaitForSingleObject(threadState->threadHandle, 30000);
       if (WAIT_OBJECT_0 != waitResult) {
@@ -218,7 +218,7 @@ FoundryThreads_IsCurrentThread(struct FoundryWorkerThread *threadState)     // I
    }
 #ifdef _WIN32
    {
-      uintptr_t id = (uintptr_t)GetCurrentThreadId();
+      Util_ThreadID id = GetCurrentThreadId();
       if (id == threadState->threadId) {
         return TRUE;
       }
index cddb0f6773626fb6d04bee6ac361d524f85894c0..c6794f3439d557edc4610c045fce082b6cbc9eff 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 86ffdb5158669ad75d20c1e8cf4064fd622a2ade..85a7d84af9de4765e37b991695732acef4cd8301 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 2e03e402fd14ebe31f5632fa1da102be21b984b6..5005726b697d1727a8a054e4f86eb89cee267ce7 100644 (file)
@@ -142,6 +142,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -150,6 +151,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -158,6 +160,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 7b8dbeba6480fb1395a754b38ecffcb66ad9ffdc..2737e60030cc85c6ec40155deb508483254f0c3c 100644 (file)
@@ -144,6 +144,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -152,6 +153,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -160,6 +162,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index f9c449fd725aa3883b64a742e1360e35cd83fe15..ee0ba2e806c653ff2c5ad4b199c5366ab52a1f5e 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index ed4bc2b218dd1b2cc85dbaae80243aa5798a53ae..aba25521ef1e078f914c3caaa9094aa0a25dbf78 100644 (file)
@@ -142,6 +142,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -150,6 +151,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -158,6 +160,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 8273789b2ebfe9f7dec6b80b69c2f482822247a1..ccb9181db00dfb03490363dd707399dd98c7c293 100644 (file)
@@ -1997,9 +1997,13 @@ HgfsServerClose(char const *packetIn, // IN: incoming packet
 
    if (header->op == HGFS_OP_CLOSE_V3) {
       HgfsRequestCloseV3 *request;
+      HgfsReplyCloseV3 *reply;
       request = (HgfsRequestCloseV3 *)HGFS_REQ_GET_PAYLOAD_V3(packetIn);
       file = &request->file;
-      replySize = sizeof(HgfsReplyCloseV3) + sizeof(HgfsReply);
+
+      reply = (HgfsReplyCloseV3 *)HGFS_REP_GET_PAYLOAD_V3(packetOut);
+      reply->reserved = 0;
+      replySize = HGFS_REP_PAYLOAD_SIZE_V3(reply);
    } else {
       HgfsRequestClose *request;
       request = (HgfsRequestClose *)packetIn;
@@ -2058,6 +2062,7 @@ HgfsServerSearchClose(char const *packetIn, // IN: incoming packet
                    (HgfsReplySearchCloseV3 *)HGFS_REP_GET_PAYLOAD_V3(packetOut);
 
       search = &request->search;
+      reply->reserved = 0;
       replySize = HGFS_REP_PAYLOAD_SIZE_V3(reply);
    } else {
       HgfsRequestSearchClose *request = (HgfsRequestSearchClose *)packetIn;
@@ -3483,6 +3488,7 @@ HgfsPackOpenReply(HgfsFileOpenInfo *openInfo,   // IN: open info struct
       if (openInfo->mask & HGFS_OPEN_VALID_SERVER_LOCK) {
          reply->acquiredLock = openInfo->acquiredLock;
       }
+      reply->reserved = 0;
       *packetSize = HGFS_REP_PAYLOAD_SIZE_V3(reply);
       break;
    }
@@ -3573,10 +3579,11 @@ HgfsUnpackDeleteRequest(char const *packetIn,        // IN: request packet
        * If we've been asked to reuse a handle, we don't need to look at, let
        * alone test the filename or its length.
        */
-      if (*hints & HGFS_DELETE_HINT_USE_FILE_DESC) {
-         *file = requestV3->file;
+      if (requestV3->fileName.flags & HGFS_FILE_NAME_USE_FILE_DESC) {
+         *file = requestV3->fileName.fid;
          *cpName = NULL;
          *cpNameSize = 0;
+         *hints |= HGFS_DELETE_HINT_USE_FILE_DESC;
       } else {
          extra = packetSize - HGFS_REQ_PAYLOAD_SIZE_V3(requestV3);
 
@@ -3692,7 +3699,9 @@ HgfsPackDeleteReply(char *packetOut,           // IN/OUT: outgoing packet
    ASSERT(packetSize);
 
    if (header->op == HGFS_OP_DELETE_FILE_V3 || header->op == HGFS_OP_DELETE_DIR_V3) {
-      *packetSize = sizeof(HgfsReplyDeleteV3) + sizeof(HgfsReply);
+      HgfsReplyDeleteV3 *reply = (HgfsReplyDeleteV3 *)HGFS_REP_GET_PAYLOAD_V3(packetOut);
+      reply->reserved = 0;
+      *packetSize = HGFS_REP_PAYLOAD_SIZE_V3(reply);
    } else {
       *packetSize = sizeof(HgfsReplyDelete);
    }
@@ -3782,11 +3791,13 @@ HgfsUnpackRenameRequest(char const *packetIn,       // IN: request packet
        * alone test the filename or its length. This applies to the source
        * and the target.
        */
-      if (*hints & HGFS_RENAME_HINT_USE_SRCFILE_DESC) {
-         *srcFile = requestV3->srcFile;
+      if (requestV3->oldName.flags & HGFS_FILE_NAME_USE_FILE_DESC) {
+         *srcFile = requestV3->oldName.fid;
          *cpOldName = NULL;
          *cpOldNameLen = 0;
-        *oldCaseFlags = 0;
+         *oldCaseFlags = HGFS_FILE_NAME_DEFAULT_CASE;
+         *hints |= HGFS_RENAME_HINT_USE_SRCFILE_DESC;
+         newName = &requestV3->newName;
       } else {
 
          /*
@@ -3801,17 +3812,18 @@ HgfsUnpackRenameRequest(char const *packetIn,       // IN: request packet
          /* It is now safe to use the old file name. */
          *cpOldName = requestV3->oldName.name;
          *cpOldNameLen = requestV3->oldName.length;
-        *oldCaseFlags = requestV3->oldName.caseType;
+         *oldCaseFlags = requestV3->oldName.caseType;
+         newName = (HgfsFileNameV3 *)(requestV3->oldName.name + 1 + *cpOldNameLen);
       }
       extra -= *cpOldNameLen;
 
-      if (*hints & HGFS_RENAME_HINT_USE_TARGETFILE_DESC) {
-         *targetFile = requestV3->targetFile;
+      if (newName->flags & HGFS_FILE_NAME_USE_FILE_DESC) {
+         *targetFile = newName->fid;
          *cpNewName = NULL;
          *cpNewNameLen = 0;
-        *newCaseFlags = 0;
+         *newCaseFlags = HGFS_FILE_NAME_DEFAULT_CASE;
+         *hints |= HGFS_RENAME_HINT_USE_TARGETFILE_DESC;
       } else {
-         newName = (HgfsFileNameV3 *)(requestV3->oldName.name + 1 + *cpOldNameLen);
          if (newName->length > extra) {
             /* The input packet is smaller than the request */
             return FALSE;
@@ -3965,7 +3977,9 @@ HgfsPackRenameReply(char *packetOut,           // IN/OUT: outgoing packet
    ASSERT(packetSize);
 
    if (header->op == HGFS_OP_RENAME_V3) {
-      *packetSize = sizeof(HgfsReplyRenameV3) + sizeof(HgfsReply);
+      HgfsReplyRenameV3 *reply = (HgfsReplyRenameV3 *)HGFS_REP_GET_PAYLOAD_V3(packetOut);
+      reply->reserved = 0;
+      *packetSize = HGFS_REP_PAYLOAD_SIZE_V3(reply);
    } else {
       *packetSize = sizeof(HgfsReplyRename);
    }
@@ -4006,7 +4020,7 @@ HgfsUnpackGetattrRequest(char const *packetIn,       // IN: request packet
                          char **cpName,              // OUT: cpName
                          size_t *cpNameSize,         // OUT: cpName size
                          HgfsHandle *file,           // OUT: file handle
-                         uint32 *caseFlags)          // OUT: case-sensitivity flags
+                         uint32 *caseType)           // OUT: case-sensitivity flags
 {
    HgfsRequest *request;
    size_t extra;
@@ -4016,18 +4030,17 @@ HgfsUnpackGetattrRequest(char const *packetIn,       // IN: request packet
    ASSERT(cpName);
    ASSERT(cpNameSize);
    ASSERT(file);
-   ASSERT(caseFlags);
+   ASSERT(caseType);
 
    request = (HgfsRequest *)packetIn;
    attrInfo->requestType = request->op;
-   *caseFlags = HGFS_FILE_NAME_DEFAULT_CASE;
+   *caseType = HGFS_FILE_NAME_DEFAULT_CASE;
 
    switch (request->op) {
    case HGFS_OP_GETATTR_V3: {
       HgfsRequestGetattrV3 *requestV3;
 
       requestV3 = (HgfsRequestGetattrV3 *)HGFS_REQ_GET_PAYLOAD_V3(packetIn);
-      LOG(4, ("HgfsUnpackGetattrRequest: HGFS_OP_GETATTR_V3\n"));
 
       /* Enforced by the dispatch function. */
       ASSERT(packetSize >= HGFS_REQ_PAYLOAD_SIZE_V3(requestV3));
@@ -4037,10 +4050,11 @@ HgfsUnpackGetattrRequest(char const *packetIn,       // IN: request packet
        * alone test the filename or its length.
        */
       *hints = requestV3->hints;
-      if (*hints & HGFS_ATTR_HINT_USE_FILE_DESC) {
-         *file = requestV3->file;
+      if (requestV3->fileName.flags & HGFS_FILE_NAME_USE_FILE_DESC) {
+         *file = requestV3->fileName.fid;
          *cpName = NULL;
          *cpNameSize = 0;
+         *hints |= HGFS_ATTR_HINT_USE_FILE_DESC;
       } else {
          extra = packetSize - HGFS_REQ_PAYLOAD_SIZE_V3(requestV3);
 
@@ -4054,9 +4068,9 @@ HgfsUnpackGetattrRequest(char const *packetIn,       // IN: request packet
          }
          *cpName = requestV3->fileName.name;
          *cpNameSize = requestV3->fileName.length;
-        *caseFlags = requestV3->fileName.caseType;
-         LOG(4, ("HgfsUnpackGetattrRequest: HGFS_OP_GETATTR_V3: %u\n", *caseFlags));
+         *caseType = requestV3->fileName.caseType;
       }
+      LOG(4, ("HgfsUnpackGetattrRequest: HGFS_OP_GETATTR_V3: %u\n", *caseType));
       break;
    }
 
@@ -4067,7 +4081,6 @@ HgfsUnpackGetattrRequest(char const *packetIn,       // IN: request packet
       /* Enforced by the dispatch function. */
       ASSERT(packetSize >= sizeof *requestV2);
 
-
       /*
        * If we've been asked to reuse a handle, we don't need to look at, let
        * alone test the filename or its length.
@@ -4148,7 +4161,7 @@ HgfsUnpackGetattrRequest(char const *packetIn,       // IN: request packet
  *
  * HgfsPackGetattrReply --
  *
- *    Pack hgfs getattr reply to the HgfsReplyGetattr{V2} structure.
+ *    Pack hgfs getattr reply to the HgfsReplyGetattr structure.
  *
  * Results:
  *    TRUE on success.
@@ -4177,6 +4190,7 @@ HgfsPackGetattrReply(HgfsFileAttrInfo *attr,     // IN: attr stucture
                          (HgfsReplyGetattrV3 *)HGFS_REP_GET_PAYLOAD_V3(packetOut);
       reply->attr.mask = attr->mask;
       reply->attr.type = attr->type;
+      LOG(4, ("HgfsPackGetattrReply: attr type: %u\n", reply->attr.type));
 
       /*
        * Is there enough space in the request packet for the utf8 name?
@@ -4199,7 +4213,8 @@ HgfsPackGetattrReply(HgfsFileAttrInfo *attr,     // IN: attr stucture
       }
       reply->symlinkTarget.length = utf8TargetNameLen;
       reply->symlinkTarget.name[utf8TargetNameLen] = '\0';
-      reply->symlinkTarget.caseType = 0;
+      reply->symlinkTarget.flags = 0;
+      reply->symlinkTarget.fid = 0;
       reply->symlinkTarget.caseType = HGFS_FILE_NAME_DEFAULT_CASE;
 
       reply->attr.size = attr->size;
@@ -4216,6 +4231,7 @@ HgfsPackGetattrReply(HgfsFileAttrInfo *attr,     // IN: attr stucture
       reply->attr.userId = attr->userId;
       reply->attr.groupId = attr->groupId;
       reply->attr.hostFileId = attr->hostFileId;
+      reply->reserved = 0;
       *packetSize = HGFS_REP_PAYLOAD_SIZE_V3(reply) + utf8TargetNameLen;
       break;
    }
@@ -4422,8 +4438,10 @@ HgfsPackSearchReadReply(const char *utf8Name,      // IN: file name
 
       *packetSize = HGFS_REP_PAYLOAD_SIZE_V3(reply) + utf8NameLen + sizeof *dirent;
       reply->count = 1;
+      reply->reserved = 0;
       dirent->fileName.length = (uint32)utf8NameLen;
-      dirent->fileName.caseType = 0;
+      dirent->fileName.flags = 0;
+      dirent->fileName.fid = 0;
       dirent->fileName.caseType = HGFS_FILE_NAME_DEFAULT_CASE;
       dirent->nextEntry = 0;
 
@@ -4578,7 +4596,7 @@ HgfsUnpackSetattrRequest(char const *packetIn,       // IN: request packet
                          char **cpName,              // OUT: cpName
                          size_t *cpNameSize,         // OUT: cpName size
                          HgfsHandle *file,           // OUT: server file ID
-                         uint32 *caseFlags)          // OUT: case-sensitivity flags
+                         uint32 *caseType)           // OUT: case-sensitivity flags
 {
    HgfsRequest *request;
    size_t extra;
@@ -4588,7 +4606,7 @@ HgfsUnpackSetattrRequest(char const *packetIn,       // IN: request packet
    ASSERT(cpName);
    ASSERT(cpNameSize);
    ASSERT(file);
-   ASSERT(caseFlags);
+   ASSERT(caseType);
    request = (HgfsRequest *)packetIn;
 
 
@@ -4627,11 +4645,12 @@ HgfsUnpackSetattrRequest(char const *packetIn,       // IN: request packet
           * If we've been asked to reuse a handle, we don't need to look at,
           * let alone test the filename or its length.
           */
-         if (*hints & HGFS_ATTR_HINT_USE_FILE_DESC) {
-            *file = requestV3->file;
+         if (requestV3->fileName.flags & HGFS_FILE_NAME_USE_FILE_DESC) {
+            *file = requestV3->fileName.fid;
             *cpName = NULL;
             *cpNameSize = 0;
-           *caseFlags = 0;
+            *caseType = HGFS_FILE_NAME_DEFAULT_CASE;
+            *hints |= HGFS_ATTR_HINT_USE_FILE_DESC;
          } else {
             extra = packetSize - HGFS_REQ_PAYLOAD_SIZE_V3(requestV3);
 
@@ -4642,9 +4661,9 @@ HgfsUnpackSetattrRequest(char const *packetIn,       // IN: request packet
             /* It is now safe to read the file name. */
             *cpName = requestV3->fileName.name;
             *cpNameSize = requestV3->fileName.length;
-            *caseFlags = requestV3->fileName.caseType;
+            *caseType = requestV3->fileName.caseType;
          }
-         LOG(4, ("HgfsUnpackSetattrRequest: unpacking HGFS_OP_SETATTR_V3, %u\n", *caseFlags));
+         LOG(4, ("HgfsUnpackSetattrRequest: unpacking HGFS_OP_SETATTR_V3, %u\n", *caseType));
          break;
       }
 
@@ -4805,7 +4824,10 @@ HgfsPackSetattrReply(char *packetOut,           // IN/OUT: outgoing packet
    ASSERT(packetSize);
 
    if (header->op == HGFS_OP_SETATTR_V3) {
-      *packetSize = sizeof(HgfsReplySetattrV3) + sizeof(HgfsReply);
+      HgfsReplySetattrV3 *reply =
+                         (HgfsReplySetattrV3 *)HGFS_REP_GET_PAYLOAD_V3(packetOut);
+      reply->reserved = 0;
+      *packetSize = HGFS_REP_PAYLOAD_SIZE_V3(reply);
    } else {
       *packetSize = sizeof(HgfsReplySetattr);
    }
@@ -4885,7 +4907,7 @@ HgfsUnpackCreateDirRequest(char const *packetIn,    // IN: incoming packet
          info->ownerPerms = requestV3->ownerPerms;
          info->groupPerms = requestV3->groupPerms;
          info->otherPerms = requestV3->otherPerms;
-        LOG(4, ("HgfsUnpackCreateDirRequest: HGFS_OP_CREATE_DIR_V3\n"));
+         LOG(4, ("HgfsUnpackCreateDirRequest: HGFS_OP_CREATE_DIR_V3\n"));
          break;
       }
    case HGFS_OP_CREATE_DIR_V2:
@@ -4992,7 +5014,10 @@ HgfsPackCreateDirReply(char *packetOut,           // IN/OUT: outgoing packet
    ASSERT(packetSize);
 
    if (header->op == HGFS_OP_CREATE_DIR_V3) {
-      *packetSize = sizeof(HgfsReplyCreateDirV3) + sizeof(HgfsReply);
+      HgfsReplyCreateDirV3 *reply =
+                           (HgfsReplyCreateDirV3 *)HGFS_REP_GET_PAYLOAD_V3(packetOut);
+      reply->reserved = 0;
+      *packetSize = HGFS_REP_PAYLOAD_SIZE_V3(reply);
    } else {
       *packetSize = sizeof(HgfsReplyCreateDir);
    }
index b9141fab93fe79d5dbcaa2905025185dedb72a1b..ff6169d44fb7d2224a0e600775b45e63506e0933 100644 (file)
@@ -279,6 +279,10 @@ static int HgfsStatFromName(char *fileName,
                             struct stat *stats);
 
 #ifndef __FreeBSD__
+static int HgfsConvertComponentCase(char *currentComponent,
+                                   size_t dirPathSize,
+                                   char *sharePath);
+
 static int HgfsCaseInsensitiveLookup(char *fileName,
                                      char *sharePath);
 
@@ -1332,91 +1336,184 @@ HgfsToLower(char *src,    // IN: Input filename
 /*
  *-----------------------------------------------------------------------------
  *
- * HgfsCaseInsensitiveLookup --
+ * HgfsConvertComponentCase --
  *
- *    Do case insensitivie lookup for fileName. Each component past sharePath is
- *    looked-up case-insensitively. Expensive!
- *
- *    NOTE: fileName needs to be of size PATH_MAX.
+ *    Do a case insensitive search of a directory for the specified entry. If
+ *    a matching entry is found, append it to the specified path.
  *
  * Results:
- *    Returns 0 if successful and resolved path for fileName is over-written.
- *    Otherwise returns non-zero errno without affecting fileName.
+ *    On Success:
+ *    Returns 0 and append a directory separator and the specified entry
+ *    (in its original case) to the output path specified.
+ *    On Failure:
+ *    Non-zero errno return.
  *
  * Side effects:
- *    fileName over-written with resolved path when successful.
+ *    None.
  *
  *-----------------------------------------------------------------------------
  */
 
 static int
-HgfsCaseInsensitiveLookup(char *fileName,   // IN/OUT
-                          char *sharePath)  // IN
+HgfsConvertComponentCase(char *currentComponent, // IN
+                        size_t dirPathSize,     // IN
+                         char *dirPath)          // IN/OUT
 {
-   char *fileSuffix = fileName + strlen(sharePath) + 1;
-   char curDir[PATH_MAX];
-   char convertedFileName[PATH_MAX];
-   char convertedComponent[PATH_MAX];
    struct dirent *dirent;
    DIR *dir = NULL;
-   char *ptr = NULL;
-   int error;
+   char lowerCaseComponent[PATH_MAX] = {0};
+   int ret;
 
-   Str_Strcpy(curDir, sharePath, PATH_MAX);
+   ASSERT(currentComponent);
+   ASSERT(dirPath);
 
-again:
-   /* Open the shared directory. */
-   dir = opendir(curDir);
-   if (!dir) {
-      goto not_found;
+   /* Convert the component to lower case. */
+   ret = HgfsToLower(currentComponent, lowerCaseComponent);
+   if (ret) {
+      goto exit;
    }
 
-   /* Get a component. */
-   ptr = strchr(fileSuffix, DIRSEPC);
-   if (ptr) {
-      *ptr = '\0';
-   }
+  /* Open the specified directory. */
+  dir = opendir(dirPath);
+  if (!dir) {
+     ret = ENOENT;
+     goto exit;
+  }
+
+  /*
+   * Read all of the directory entries. For each one, convert the name
+   * to lower case and then compare it to the lower case component.
+   */
+  while ((dirent = readdir(dir))) {
+     char lowerCaseFileName[PATH_MAX] = {0};
+     ret = HgfsToLower(dirent->d_name, lowerCaseFileName);
+     if (ret) {
+        continue;
+     }
+     if (Str_Strcmp(lowerCaseComponent, lowerCaseFileName) == 0) {
+       /*
+        * The current directory entry is a case insensitive match to
+        * the specified component. Append it to the output path.
+        */
+       Str_Strcat(dirPath, "/", dirPathSize);
+       Str_Strcat(dirPath, dirent->d_name, dirPathSize);
+
+       /* Success. Cleanup and exit. */
+       ret = 0;
+       goto exit;
+     }
+  }
+
+  /* We didn't find a match. Failure. */
+  ret = ENOENT;
 
-   /* Convert the component to a lower case. */
-   error = HgfsToLower(fileSuffix, convertedComponent);
-   if (error) {
-      goto not_found;
-   }
+exit:
+  if (dir) {
+     closedir(dir);
+  }
 
-   /* Compare the lower case component with lower case directory entry. */
-   while ((dirent = readdir(dir))) {
-      error = HgfsToLower(dirent->d_name, convertedFileName);
-      if (error) {
-         continue;
-      }
-      if (!strcmp(convertedComponent, convertedFileName)) {
-         /* Match found. */
-         strcat(curDir, "/");
-         strcat(curDir, dirent->d_name);
-         fileSuffix = ptr + 1;
-         closedir(dir);
-         if (!ptr) {
-            Str_Strcpy(fileName, curDir, PATH_MAX);
-            goto found;
-         }
-         *ptr = DIRSEPC;
-         goto again;
-      }
-   }
+  return ret;
+}
 
-not_found:
-   /* Match not found. */
-   if (ptr) {
-      *ptr = DIRSEPC;
-   }
-   if (dir) {
-      closedir(dir);
-   }
-   return ENOENT;
 
-found:
-   return 0;
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsCaseInsensitiveLookup --
+ *
+ *    Do a case insensitive lookup for fileName. Each component past sharePath is
+ *    looked-up case-insensitively. Expensive!
+ *
+ *    NOTE:
+ *    shareName is always expected to be a prefix of fileName.
+ *    fileName needs to be of size PATH_MAX.
+ *
+ * Results:
+ *    Returns 0 if successful and resolved path for fileName is over-written.
+ *    Otherwise returns non-zero errno without affecting fileName.
+ *
+ * Side effects:
+ *    fileName over-written with resolved path when successful.
+ *
+ *-----------------------------------------------------------------------------
+ */
 
+static int
+HgfsCaseInsensitiveLookup(char *fileName,      // IN/OUT
+                         char *sharePath)     // IN
+{
+  char *currentComponent;
+  char curDir[PATH_MAX] = {0};
+  char *nextComponent = NULL;
+  int error = ENOENT;
+
+  ASSERT(fileName);
+  ASSERT(sharePath);
+
+  currentComponent = fileName + strlen(sharePath);
+  /* Check there is something beyond the share name. */
+  if (*currentComponent == '\0') {
+     /* The fileName is the same as sharePath. Nothing else to do. */
+     return 0;
+  }
+
+  /* Skip a component separator if not in the share path. */
+  if (*currentComponent == DIRSEPC) {
+     currentComponent += 1;
+  }
+
+  Str_Strcpy(curDir, sharePath, sizeof curDir);
+
+  while (TRUE) {
+     /* Get the next component. */
+     nextComponent = strchr(currentComponent, DIRSEPC);
+     if (nextComponent != NULL) {
+       *nextComponent = '\0';
+     }
+
+     /*
+      * Try to match the current component againts one in curDir. If one is
+      * found then append it to curDir.
+      */
+     error = HgfsConvertComponentCase(currentComponent, ARRAYSIZE(curDir),
+                                     curDir);
+     if (error) {
+       /* Restore the path separator if we removed it earlier. */
+       if (nextComponent != NULL) {
+          *nextComponent = DIRSEPC;
+       }
+       break;
+     }
+
+     /* If there is no component after the current one then we are done. */
+     if (nextComponent == NULL) {
+       /* Set success. */
+       error = 0;
+       break;
+     }
+
+     /*
+      * Set the current component pointer to point at the start of the next
+      * component.
+      */
+     currentComponent = nextComponent + 1;
+
+     /*
+      * Restore the directory separator that was removed at the start of
+      * the loop.
+      */
+     *nextComponent = DIRSEPC;
+  }
+
+  /* If the conversion was successful, copy the result out. */
+  if (error == 0) {
+     /* 
+      * XXX: PATH_MAX defeats the purpose of this check. Pass in the
+      *      fileName size.
+      */
+     Str_Strcpy(fileName, curDir, PATH_MAX);
+  }
+  return error;
 }
 #endif
 
@@ -2808,6 +2905,7 @@ HgfsServerRead(char const *packetIn, // IN: incoming packet
       requiredSize = request->requiredSize;
       payload = reply->payload;
       replyActualSize = &reply->actualSize;
+      reply->reserved = 0;
       replySize = HGFS_REP_PAYLOAD_SIZE_V3(reply) - 1;
    } else {
       HgfsRequestRead *request = (HgfsRequestRead *)packetIn;
@@ -2968,6 +3066,7 @@ HgfsServerWrite(char const *packetIn, // IN: incoming packet
       payload = request->payload;
       requiredSize = request->requiredSize;
       actualSize = &reply->actualSize;
+      reply->reserved = 0;
       replySize = HGFS_REP_PAYLOAD_SIZE_V3(reply);
    } else {
       HgfsRequestWrite *request = (HgfsRequestWrite *)packetIn;
@@ -3130,9 +3229,10 @@ HgfsServerSearchOpen(char const *packetIn, // IN: incoming packet
       dirName = requestV3->dirName.name;
       dirNameLength = requestV3->dirName.length;
       replySearch = &replyV3->search;
+      replyV3->reserved = 0;
 
-       replySize = HGFS_REP_PAYLOAD_SIZE_V3(replyV3);
-       LOG(4, ("HgfsServerSearchOpen: HGFS_OP_SEARCH_OPEN_V3\n"));
+      replySize = HGFS_REP_PAYLOAD_SIZE_V3(replyV3);
+      LOG(4, ("HgfsServerSearchOpen: HGFS_OP_SEARCH_OPEN_V3\n"));
    } else {
       HgfsRequestSearchOpen *request;
 
@@ -3499,7 +3599,7 @@ HgfsServerGetattr(char const *packetIn, // IN: incoming packet
       nameStatus = HgfsServerGetAccess(cpName,
                                        cpNameSize,
                                        HGFS_OPEN_MODE_READ_ONLY,
-                                      caseFlags,
+                                       caseFlags,
                                        &localName,
                                        NULL,
                                        &share);
@@ -4007,6 +4107,7 @@ HgfsServerRename(char const *packetIn, // IN: incoming packet
          /* The target exists, and so must fail the rename. */
          LOG(4, ("HgfsServerRename: error: target %s exists\n", localNewName));
          status = EEXIST;
+         goto exit;
       }
    }
 
@@ -4104,6 +4205,7 @@ HgfsServerQueryVolume(char const *packetIn, // IN: incoming packet
 
       freeBytes = &replyV3->freeBytes;
       totalBytes = &replyV3->totalBytes;
+      replyV3->reserved = 0;
 
       /* Enforced by the dispatch function. */
       ASSERT(*packetSize >= HGFS_REQ_PAYLOAD_SIZE_V3(requestV3));
@@ -4298,7 +4400,6 @@ HgfsServerQueryVolume(char const *packetIn, // IN: incoming packet
 
    *freeBytes  = outFreeBytes;
    *totalBytes = outTotalBytes;
-
    return 0;
 }
 
@@ -4344,6 +4445,7 @@ HgfsServerSymlinkCreate(char const *packetIn, // IN: incoming packet
 
    if (header->op == HGFS_OP_CREATE_SYMLINK_V3) {
       HgfsRequestSymlinkCreateV3 *requestV3;
+      HgfsReplySymlinkCreateV3 *replyV3;
       HgfsFileNameV3 *targetNameP;
       requestV3 = (HgfsRequestSymlinkCreateV3 *)HGFS_REQ_GET_PAYLOAD_V3(packetIn);
       LOG(4, ("HgfsServerSymlinkCreate: HGFS_OP_CREATE_SYMLINK_V3\n"));
@@ -4363,7 +4465,10 @@ HgfsServerSymlinkCreate(char const *packetIn, // IN: incoming packet
       targetNameP = (HgfsFileNameV3 *)(symlinkName + 1 + symlinkNameLength);
       targetName = targetNameP->name;
       targetNameLength = targetNameP->length;
-      *packetSize = sizeof(struct HgfsReplySymlinkCreateV3) + sizeof(struct HgfsReply);
+
+      replyV3 = (HgfsReplySymlinkCreateV3 *)HGFS_REP_GET_PAYLOAD_V3(packetOut);
+      replyV3->reserved = 0;
+      *packetSize = HGFS_REP_PAYLOAD_SIZE_V3(replyV3);
    } else {
       HgfsRequestSymlinkCreate *request;
       HgfsFileName *targetNameP;
@@ -4402,7 +4507,7 @@ HgfsServerSymlinkCreate(char const *packetIn, // IN: incoming packet
    nameStatus = HgfsServerGetAccess(symlinkName,
                                     symlinkNameLength,
                                     HGFS_OPEN_MODE_READ_WRITE,
-                                   caseFlags,
+                                    caseFlags,
                                     &localSymlinkName,
                                     NULL,
                                     NULL);
index 4411823b4ec91606c193e8262ae04b72fc4ae609..7a38fa9ebc70742ef9498062bc43e182240da0cc 100644 (file)
@@ -143,6 +143,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -151,6 +152,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -159,6 +161,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index de41ebe86b39cc13228cbae1b7a632cec221ae5c..4ed8a1221fccd08a90968df610ab6cf7c862690a 100644 (file)
@@ -143,6 +143,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -151,6 +152,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -159,6 +161,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 8782b6fa552ecba99528a4d082e470059b043461..18ae634201f73a524f77f2d22534eed3c50c95a0 100644 (file)
@@ -142,6 +142,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -150,6 +151,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -158,6 +160,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index a509cbb2a1da83b769fb0a0ad7239fd3226ee6a3..c154e320fb5cac1e837f5b06ec04bee217b2c320 100644 (file)
@@ -25,8 +25,9 @@
  */
 
 #include <string.h>
-#include "auth.h"
 
+#include "vmware.h"
+#include "auth.h"
 #include "impersonateInt.h"
 
 Bool impersonationEnabled = FALSE;
index 4d0df5f7bcb2bcb3b56318f7a9291aad66d1a558..61f4045605fe1a0db64ea8863f08912b92cfc505 100644 (file)
@@ -1,12 +1,12 @@
 #define BUILD_NUMBER \
-       "build-93241"
+       "build-96374"
 #define BUILD_NUMBER_NUMERIC \
-       93241
+       96374
 #define BUILD_NUMBER_NUMERIC_STRING \
-       "93241"
+       "96374"
 #define PRODUCT_BUILD_NUMBER \
-       "product-build-197"
+       "product-build-214"
 #define PRODUCT_BUILD_NUMBER_NUMERIC \
-       197
+       214
 #define PRODUCT_BUILD_NUMBER_NUMERIC_STRING \
-       "197"
+       "214"
index df68a863c6088a93caa376bf5e22c6d86761347b..601e1e386ac45ad0a287df68c1ab0139e1119dd2 100644 (file)
@@ -58,7 +58,7 @@ void DblLnkLst_Init(DblLnkLst_Links *l);
 void DblLnkLst_Link(DblLnkLst_Links *l1, DblLnkLst_Links *l2);
 void DblLnkLst_Unlink(DblLnkLst_Links *l1, DblLnkLst_Links *l2);
 void DblLnkLst_Unlink1(DblLnkLst_Links *l);
-Bool DblLnkLst_IsLinked(DblLnkLst_Links *l);
+Bool DblLnkLst_IsLinked(DblLnkLst_Links const *l);
 
 /* Functions specific to anchored lists. --hpreg */
 
index 43e9ea6b8344e440623c221163b23b908162a8ff..991a3d21fbf24ebca696c4b2de22cd7239b3b154 100644 (file)
@@ -73,6 +73,7 @@ typedef enum
    CPFORMAT_UNKNOWN = 0,
    CPFORMAT_TEXT,       /* NUL terminated UTF-8. */
    CPFORMAT_FILELIST,
+   CPFORMAT_RTF,
    CPFORMAT_MAX,
 } DND_CPFORMAT;
 
@@ -152,6 +153,10 @@ EXTERN size_t DnD_CPStringToLocalString(ConstUnicode bufIn,
                                         utf16_t **bufOut);
 EXTERN size_t DnD_LocalStringToCPString(utf16_t *bufIn,
                                         char **bufOut);
+EXTERN Bool DnD_SetCPClipboardFromLocalText(CPClipboard *clip,
+                                            utf16_t *bufIn);
+EXTERN Bool DnD_SetCPClipboardFromLocalRtf(CPClipboard *clip,
+                                           char *bufIn);
 EXTERN Bool DnD_FakeMouseEvent(DWORD flag);
 EXTERN Bool DnD_FakeMouseState(DWORD key, Bool isDown);
 EXTERN Bool DnD_FakeEscapeKey(void);
index 9a51b2db2879bbafbededee805892da47a960a61..6c383cf1a354d60980762ccf4ac9799665931e7e 100644 (file)
@@ -83,6 +83,8 @@ EXTERN int File_UnlinkIfExists(ConstUnicode pathName);
 
 EXTERN int File_UnlinkDelayed(ConstUnicode pathName);
 
+EXTERN int File_UnlinkNoFollow(ConstUnicode pathName);
+
 EXTERN void File_SplitName(ConstUnicode pathName,
                            Unicode *volume, 
                            Unicode *dir, 
index 4fd661ff8fac006ef349c3d7307df2a4fd271850..56479bc09b78de6d20098c80a3862c11ba9db400 100644 (file)
@@ -310,7 +310,7 @@ FileIOResult FileIO_Pread(FileIODescriptor *fd,    // IN: File descriptor
                           uint64 offset);          // IN: Offset to start reading
 
 FileIOResult FileIO_Pwrite(FileIODescriptor *fd,   // IN: File descriptor
-                           void *buf,              // IN: Buffer to write from
+                           void const *buf,        // IN: Buffer to write from
                            size_t len,             // IN: Length of the buffer
                            uint64 offset);         // IN: Offset to start writing
 #endif
index 90df84e25dd72c72d885cdfc6ee0ed0b369f9ce2..cca3a57b63ff92258737f615bdba99849e8ae48e 100644 (file)
@@ -161,9 +161,6 @@ EXTERN int FileLockOpenFile(ConstUnicode pathName,
 
 EXTERN int FileLockCloseFile(FILELOCK_FILE_HANDLE handle);
 
-EXTERN int FileLockFileSize(FILELOCK_FILE_HANDLE handle,
-                            uint32 *fileSize);
-
 EXTERN int FileLockReadFile(FILELOCK_FILE_HANDLE handle,
                             void *buf,
                             uint32 requestedBytes,
index 0f1f3679a68f2446d504347064f4ad7b7c469ac0..dafdc0b3eb79843dbd219514b6a8427009b3cff2 100644 (file)
@@ -51,7 +51,7 @@ Bool FoundryThreads_IsCurrentThread(struct FoundryWorkerThread *threadState);
  */
 typedef struct FoundryWorkerThread {
 #if _WIN32
-   uintptr_t               threadId;
+   Util_ThreadID           threadId;
    HANDLE                  threadHandle;
 #else
    pthread_t               threadInfo;
index 8d057bcd5eec7499787f4edf0f463dd2aa6ef886..e0db2baeb5b96cdac68ae32d5f97791e718da4d2 100644 (file)
@@ -43,11 +43,12 @@ typedef int (*HashTableForEachCallback)(const char *key, void *value,
 #define HASH_INT_KEY           2       // uintptr_t or pointer key
 
 /*
- * The atmic bit is ored into the type field.
- * Atomic hash tables only support insert and lookup.
+ * The flag bits are ored into the type field.
+ * Atomic hash tables only support insert, lookup, and replace.
  */
 
-#define HASH_FLAG_MASK         (~7)
+#define HASH_TYPE_MASK         7
+#define HASH_FLAG_MASK         (~HASH_TYPE_MASK)
 #define HASH_FLAG_ATOMIC       0x08    // thread-safe hash table
 #define HASH_FLAG_COPYKEY      0x10    // copy string key
 
@@ -81,6 +82,12 @@ HashTable_ReplaceOrInsert(HashTable  *hashTable,
                           const char *keyStr,
                           void       *clientData);
 
+Bool
+HashTable_ReplaceIfEqual(HashTable  *hashTable,
+                         const char *keyStr,
+                         void       *oldClientData,
+                         void       *newClientData);
+
 Bool
 HashTable_Delete(HashTable  *hashTable,
                  const char *keyStr);
index e1a59c58e97744752d25d4a4001640741971ed69..defbcc3096e304e449147ecf9a2c03c421d25ba0 100644 (file)
@@ -988,9 +988,8 @@ typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestGetattrV3 {
    HgfsAttrHint hints;       /* Flags for file handle valid. */
-   HgfsHandle file;          /* Opaque file ID used by the server. */
-   HgfsFileNameV3 fileName;  /* Filename used when file handle invalid. */
    uint64 reserved;          /* Reserved for future use */
+   HgfsFileNameV3 fileName;  /* Filename used when file handle invalid. */
 }
 #include "vmware_pack_end.h"
 HgfsRequestGetattrV3;
@@ -1082,7 +1081,6 @@ typedef
 struct HgfsRequestSetattrV3 {
    HgfsAttrHint hints;
    HgfsAttrV2 attr;
-   HgfsHandle file;          /* Opaque file ID used by the server. */
    uint64 reserved;          /* Reserved for future use */
    HgfsFileNameV3 fileName;  /* Filename used when file handle invalid. */
 }
@@ -1231,7 +1229,6 @@ typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestDeleteV3 {
    HgfsDeleteHint hints;
-   HgfsHandle file;              /* Opaque file ID used by the server. */
    uint64 reserved;              /* Reserved for future use */
    HgfsFileNameV3 fileName;      /* Name used if the file is HGFS_HANDLE_INVALID */
 }
@@ -1330,8 +1327,6 @@ typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestRenameV3 {
    HgfsRenameHint hints;
-   HgfsHandle srcFile;           /* Opaque file ID to "old name" used by the server. */
-   HgfsHandle targetFile;        /* Opaque file ID to "old name" used by the server. */
    uint64 reserved;              /* Reserved for future use */
    HgfsFileNameV3 oldName;
    HgfsFileNameV3 newName;
index 8b7e38cf7f2c685e2df50e65ff231bf01e9ea387..1ad4ab28c70ee944ae7d16a6edeb4faf54fef190 100644 (file)
@@ -57,6 +57,7 @@
    LOGLEVEL_VAR(chipset), \
    LOGLEVEL_VAR(smc), \
    LOGLEVEL_VAR(ich7m), \
+   LOGLEVEL_VAR(hpet), \
    LOGLEVEL_VAR(extcfgdevice), \
    LOGLEVEL_VAR(flashram), \
    LOGLEVEL_VAR(pci), \
index a6fc3091df918426c03b0474ef867476361fcd09..3feb4e26c919c2d907181f69891a1f8194b8961c 100644 (file)
@@ -245,7 +245,6 @@ EXTERN void Msg_Exit(void);
 
 EXTERN void Msg_SetCallback(MsgCallback *cb);
 EXTERN void Msg_GetCallback(MsgCallback *cb);
-EXTERN void MsgSetPostStderrBlock(Bool block); // XXX don't know -- edward
 
 
 /*
index c4bb8f5175b47065b2ea1df1b12d2f3d5eaa82cb..3b234ca3d4e39b89b6ff3aa5d513f79eb9360f20 100644 (file)
@@ -21,8 +21,6 @@
 
 #define INCLUDE_ALLOW_USERLEVEL
 #define INCLUDE_ALLOW_VMCORE
-#define INCLUDE_ALLOW_VMKERNEL
-#define INCLUDE_ALLOW_VMNIXMOD
 #include "includeCheck.h"
 
 #include <stdio.h>
index 60173434f3c72314b62fd5e564b5c4113446a8f9..d353815a2f5442cf7081308cf159f84b95801ad5 100644 (file)
@@ -41,6 +41,7 @@ typedef enum {
    PRODUCT_ESX = 1 << 2,
    PRODUCT_PLAYER = 1 << 3,
    PRODUCT_TOOLS = 1 << 4,
+   PRODUCT_VDM_CLIENT = 1 << 5,
    /* etc */
 } Product;
 typedef uint64 ProductMask;
index 1feda6cb80478d404e9d483cf0240678041012bf..237ba44ede9faaa5ea6b58a48a8f03dac2a515b9 100644 (file)
@@ -40,6 +40,7 @@ extern "C" {
 #include "util.h"
 #include "unicodeTypes.h"
 
+
 /*
  * Static Unicode string literal macros.
  *
@@ -56,6 +57,7 @@ extern "C" {
  *
  *   ConstUnicode extension = U(".vmdk");
  */
+
 #define U(x) Unicode_GetStatic(x, FALSE)
 
 /*
@@ -70,9 +72,20 @@ extern "C" {
  *
  *   ConstUnicode copyright = U_UNESCAPE("Copyright \\u00A9 COMPANY_NAME");
  */
+
 #define U_UNESCAPE(x) Unicode_GetStatic(x, TRUE)
 
 
+/*
+ * In contexts where an errno makes sense, use this
+ * to report conversion failure.
+ */
+
+#ifndef _WIN32
+#define UNICODE_CONVERSION_ERRNO EINVAL 
+#endif
+
+
 /*
  * Allocates a Unicode string given a buffer of the specified length
  * (not necessarily NUL-terminated) in the specified encoding.
index 214c5000f6660e32c555a66afd272202c8263e6d..71f3bc55452ede36e47d2bfbd85a3a07c9076a94 100644 (file)
 #define INCLUDE_ALLOW_VMNIXMOD
 #include "includeCheck.h"
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "vm_basic_types.h"
+#include "vm_assert.h"
 
 #if defined(SUPPORT_UNICODE_OPAQUE)
 
@@ -155,6 +161,282 @@ typedef enum {
    STRING_ENCODING_WINDOWS_1257,
    STRING_ENCODING_WINDOWS_1258,
 
+   STRING_ENCODING_ISO_6937_2_ADD,
+   STRING_ENCODING_JIS_X0201,
+   STRING_ENCODING_JIS_ENCODING,
+   STRING_ENCODING_EXTENDED_UNIX_CODE_FIXED_WIDTH_FOR_JAPANESE,
+   STRING_ENCODING_BS_4730,
+   STRING_ENCODING_SEN_850200_C,
+   STRING_ENCODING_IT,
+   STRING_ENCODING_ES,
+   STRING_ENCODING_DIN_66003,
+   STRING_ENCODING_NS_4551_1,
+   STRING_ENCODING_NF_Z_62_010,
+   STRING_ENCODING_ISO_10646_UTF_1,
+   STRING_ENCODING_ISO_646_BASIC_1983,
+   STRING_ENCODING_INVARIANT,
+   STRING_ENCODING_ISO_646_IRV_1983,
+   STRING_ENCODING_NATS_SEFI,
+   STRING_ENCODING_NATS_SEFI_ADD,
+   STRING_ENCODING_NATS_DANO,
+   STRING_ENCODING_NATS_DANO_ADD,
+   STRING_ENCODING_SEN_850200_B,
+   STRING_ENCODING_KS_C_5601_1987,
+   STRING_ENCODING_JIS_C6220_1969_JP,
+   STRING_ENCODING_JIS_C6220_1969_RO,
+   STRING_ENCODING_PT,
+   STRING_ENCODING_GREEK7_OLD,
+   STRING_ENCODING_LATIN_GREEK,
+   STRING_ENCODING_NF_Z_62_010__1973_,
+   STRING_ENCODING_LATIN_GREEK_1,
+   STRING_ENCODING_ISO_5427,
+   STRING_ENCODING_JIS_C6226_1978,
+   STRING_ENCODING_BS_VIEWDATA,
+   STRING_ENCODING_INIS,
+   STRING_ENCODING_INIS_8,
+   STRING_ENCODING_INIS_CYRILLIC,
+   STRING_ENCODING_ISO_5427_1981,
+   STRING_ENCODING_ISO_5428_1980,
+   STRING_ENCODING_GB_1988_80,
+   STRING_ENCODING_GB_2312_80,
+   STRING_ENCODING_NS_4551_2,
+   STRING_ENCODING_VIDEOTEX_SUPPL,
+   STRING_ENCODING_PT2,
+   STRING_ENCODING_ES2,
+   STRING_ENCODING_MSZ_7795_3,
+   STRING_ENCODING_JIS_C6226_1983,
+   STRING_ENCODING_GREEK7,
+   STRING_ENCODING_ASMO_449,
+   STRING_ENCODING_ISO_IR_90,
+   STRING_ENCODING_JIS_C6229_1984_A,
+   STRING_ENCODING_JIS_C6229_1984_B,
+   STRING_ENCODING_JIS_C6229_1984_B_ADD,
+   STRING_ENCODING_JIS_C6229_1984_HAND,
+   STRING_ENCODING_JIS_C6229_1984_HAND_ADD,
+   STRING_ENCODING_JIS_C6229_1984_KANA,
+   STRING_ENCODING_ISO_2033_1983,
+   STRING_ENCODING_ANSI_X3_110_1983,
+   STRING_ENCODING_T_61_7BIT,
+   STRING_ENCODING_T_61_8BIT,
+   STRING_ENCODING_ECMA_CYRILLIC,
+   STRING_ENCODING_CSA_Z243_4_1985_1,
+   STRING_ENCODING_CSA_Z243_4_1985_2,
+   STRING_ENCODING_CSA_Z243_4_1985_GR,
+   STRING_ENCODING_ISO_8859_6_E,
+   STRING_ENCODING_ISO_8859_6_I,
+   STRING_ENCODING_T_101_G2,
+   STRING_ENCODING_ISO_8859_8_E,
+   STRING_ENCODING_ISO_8859_8_I,
+   STRING_ENCODING_CSN_369103,
+   STRING_ENCODING_JUS_I_B1_002,
+   STRING_ENCODING_IEC_P27_1,
+   STRING_ENCODING_JUS_I_B1_003_SERB,
+   STRING_ENCODING_JUS_I_B1_003_MAC,
+   STRING_ENCODING_GREEK_CCITT,
+   STRING_ENCODING_NC_NC00_10_81,
+   STRING_ENCODING_ISO_6937_2_25,
+   STRING_ENCODING_GOST_19768_74,
+   STRING_ENCODING_ISO_8859_SUPP,
+   STRING_ENCODING_ISO_10367_BOX,
+   STRING_ENCODING_LATIN_LAP,
+   STRING_ENCODING_JIS_X0212_1990,
+   STRING_ENCODING_DS_2089,
+   STRING_ENCODING_US_DK,
+   STRING_ENCODING_DK_US,
+   STRING_ENCODING_KSC5636,
+   STRING_ENCODING_UNICODE_1_1_UTF_7,
+   STRING_ENCODING_ISO_2022_CN_EXT,
+   STRING_ENCODING_ISO_8859_16,
+   STRING_ENCODING_OSD_EBCDIC_DF04_15,
+   STRING_ENCODING_OSD_EBCDIC_DF03_IRV,
+   STRING_ENCODING_OSD_EBCDIC_DF04_1,
+   STRING_ENCODING_ISO_11548_1,
+   STRING_ENCODING_KZ_1048,
+   STRING_ENCODING_ISO_10646_UCS_2,
+   STRING_ENCODING_ISO_10646_UCS_4,
+   STRING_ENCODING_ISO_10646_UCS_BASIC,
+   STRING_ENCODING_ISO_10646_UNICODE_LATIN1,
+   STRING_ENCODING_ISO_10646_J_1,
+   STRING_ENCODING_ISO_UNICODE_IBM_1261,
+   STRING_ENCODING_ISO_UNICODE_IBM_1268,
+   STRING_ENCODING_ISO_UNICODE_IBM_1276,
+   STRING_ENCODING_ISO_UNICODE_IBM_1264,
+   STRING_ENCODING_ISO_UNICODE_IBM_1265,
+   STRING_ENCODING_UNICODE_1_1,
+   STRING_ENCODING_SCSU,
+   STRING_ENCODING_UTF_7,
+   STRING_ENCODING_CESU_8,
+   STRING_ENCODING_BOCU_1,
+   STRING_ENCODING_ISO_8859_1_WINDOWS_3_0_LATIN_1,
+   STRING_ENCODING_ISO_8859_1_WINDOWS_3_1_LATIN_1,
+   STRING_ENCODING_ISO_8859_2_WINDOWS_LATIN_2,
+   STRING_ENCODING_ISO_8859_9_WINDOWS_LATIN_5,
+   STRING_ENCODING_HP_ROMAN8,
+   STRING_ENCODING_ADOBE_STANDARD_ENCODING,
+   STRING_ENCODING_VENTURA_US,
+   STRING_ENCODING_VENTURA_INTERNATIONAL,
+   STRING_ENCODING_DEC_MCS,
+   STRING_ENCODING_IBM850,
+   STRING_ENCODING_PC8_DANISH_NORWEGIAN,
+   STRING_ENCODING_IBM862,
+   STRING_ENCODING_PC8_TURKISH,
+   STRING_ENCODING_IBM_SYMBOLS,
+   STRING_ENCODING_IBM_THAI,
+   STRING_ENCODING_HP_LEGAL,
+   STRING_ENCODING_HP_PI_FONT,
+   STRING_ENCODING_HP_MATH8,
+   STRING_ENCODING_ADOBE_SYMBOL_ENCODING,
+   STRING_ENCODING_HP_DESKTOP,
+   STRING_ENCODING_VENTURA_MATH,
+   STRING_ENCODING_MICROSOFT_PUBLISHING,
+   STRING_ENCODING_WINDOWS_31J,
+   STRING_ENCODING_MACINTOSH,
+   STRING_ENCODING_IBM037,
+   STRING_ENCODING_IBM038,
+   STRING_ENCODING_IBM273,
+   STRING_ENCODING_IBM274,
+   STRING_ENCODING_IBM275,
+   STRING_ENCODING_IBM277,
+   STRING_ENCODING_IBM278,
+   STRING_ENCODING_IBM280,
+   STRING_ENCODING_IBM281,
+   STRING_ENCODING_IBM284,
+   STRING_ENCODING_IBM285,
+   STRING_ENCODING_IBM290,
+   STRING_ENCODING_IBM297,
+   STRING_ENCODING_IBM420,
+   STRING_ENCODING_IBM423,
+   STRING_ENCODING_IBM424,
+   STRING_ENCODING_IBM437,
+   STRING_ENCODING_IBM500,
+   STRING_ENCODING_IBM851,
+   STRING_ENCODING_IBM852,
+   STRING_ENCODING_IBM855,
+   STRING_ENCODING_IBM857,
+   STRING_ENCODING_IBM860,
+   STRING_ENCODING_IBM861,
+   STRING_ENCODING_IBM863,
+   STRING_ENCODING_IBM864,
+   STRING_ENCODING_IBM865,
+   STRING_ENCODING_IBM868,
+   STRING_ENCODING_IBM869,
+   STRING_ENCODING_IBM870,
+   STRING_ENCODING_IBM871,
+   STRING_ENCODING_IBM880,
+   STRING_ENCODING_IBM891,
+   STRING_ENCODING_IBM903,
+   STRING_ENCODING_IBM904,
+   STRING_ENCODING_IBM905,
+   STRING_ENCODING_IBM918,
+   STRING_ENCODING_IBM1026,
+   STRING_ENCODING_EBCDIC_AT_DE,
+   STRING_ENCODING_EBCDIC_AT_DE_A,
+   STRING_ENCODING_EBCDIC_CA_FR,
+   STRING_ENCODING_EBCDIC_DK_NO,
+   STRING_ENCODING_EBCDIC_DK_NO_A,
+   STRING_ENCODING_EBCDIC_FI_SE,
+   STRING_ENCODING_EBCDIC_FI_SE_A,
+   STRING_ENCODING_EBCDIC_FR,
+   STRING_ENCODING_EBCDIC_IT,
+   STRING_ENCODING_EBCDIC_PT,
+   STRING_ENCODING_EBCDIC_ES,
+   STRING_ENCODING_EBCDIC_ES_A,
+   STRING_ENCODING_EBCDIC_ES_S,
+   STRING_ENCODING_EBCDIC_UK,
+   STRING_ENCODING_EBCDIC_US,
+   STRING_ENCODING_UNKNOWN_8BIT,
+   STRING_ENCODING_MNEMONIC,
+   STRING_ENCODING_MNEM,
+   STRING_ENCODING_VISCII,
+   STRING_ENCODING_VIQR,
+   STRING_ENCODING_KOI8_R,
+   STRING_ENCODING_HZ_GB_2312,
+   STRING_ENCODING_IBM866,
+   STRING_ENCODING_IBM775,
+   STRING_ENCODING_KOI8_U,
+   STRING_ENCODING_IBM00858,
+   STRING_ENCODING_IBM00924,
+   STRING_ENCODING_IBM01140,
+   STRING_ENCODING_IBM01141,
+   STRING_ENCODING_IBM01142,
+   STRING_ENCODING_IBM01143,
+   STRING_ENCODING_IBM01144,
+   STRING_ENCODING_IBM01145,
+   STRING_ENCODING_IBM01146,
+   STRING_ENCODING_IBM01147,
+   STRING_ENCODING_IBM01148,
+   STRING_ENCODING_IBM01149,
+   STRING_ENCODING_IBM1047,
+   STRING_ENCODING_PTCP154,
+   STRING_ENCODING_AMIGA_1251,
+   STRING_ENCODING_KOI7_SWITCHED,
+   STRING_ENCODING_BRF,
+   STRING_ENCODING_TSCII,
+   STRING_ENCODING_TIS_620,
+   STRING_ENCODING_WINDOWS_709,
+   STRING_ENCODING_WINDOWS_710,
+   STRING_ENCODING_WINDOWS_720,
+   STRING_ENCODING_WINDOWS_737,
+   STRING_ENCODING_WINDOWS_775,
+   STRING_ENCODING_WINDOWS_875,
+   STRING_ENCODING_WINDOWS_1361,
+   STRING_ENCODING_WINDOWS_10000,
+   STRING_ENCODING_WINDOWS_10001,
+   STRING_ENCODING_WINDOWS_10002,
+   STRING_ENCODING_WINDOWS_10003,
+   STRING_ENCODING_WINDOWS_10004,
+   STRING_ENCODING_WINDOWS_10005,
+   STRING_ENCODING_WINDOWS_10006,
+   STRING_ENCODING_WINDOWS_10007,
+   STRING_ENCODING_WINDOWS_10008,
+   STRING_ENCODING_WINDOWS_10010,
+   STRING_ENCODING_WINDOWS_10017,
+   STRING_ENCODING_WINDOWS_10021,
+   STRING_ENCODING_WINDOWS_10029,
+   STRING_ENCODING_WINDOWS_10079,
+   STRING_ENCODING_WINDOWS_10081,
+   STRING_ENCODING_WINDOWS_10082,
+   STRING_ENCODING_WINDOWS_20000,
+   STRING_ENCODING_WINDOWS_20001,
+   STRING_ENCODING_WINDOWS_20002,
+   STRING_ENCODING_WINDOWS_20003,
+   STRING_ENCODING_WINDOWS_20004,
+   STRING_ENCODING_WINDOWS_20005,
+   STRING_ENCODING_WINDOWS_20105,
+   STRING_ENCODING_WINDOWS_20106,
+   STRING_ENCODING_WINDOWS_20107,
+   STRING_ENCODING_WINDOWS_20108,
+   STRING_ENCODING_WINDOWS_20269,
+   STRING_ENCODING_WINDOWS_20833,
+   STRING_ENCODING_WINDOWS_20838,
+   STRING_ENCODING_WINDOWS_20949,
+   STRING_ENCODING_WINDOWS_21025,
+   STRING_ENCODING_WINDOWS_21027,
+   STRING_ENCODING_WINDOWS_29001,
+   STRING_ENCODING_WINDOWS_38598,
+   STRING_ENCODING_WINDOWS_50221,
+   STRING_ENCODING_WINDOWS_50222,
+   STRING_ENCODING_WINDOWS_50229,
+   STRING_ENCODING_WINDOWS_50930,
+   STRING_ENCODING_WINDOWS_50931,
+   STRING_ENCODING_WINDOWS_50933,
+   STRING_ENCODING_WINDOWS_50935,
+   STRING_ENCODING_WINDOWS_50936,
+   STRING_ENCODING_WINDOWS_50937,
+   STRING_ENCODING_WINDOWS_50939,
+   STRING_ENCODING_WINDOWS_51936,
+   STRING_ENCODING_WINDOWS_51950,
+   STRING_ENCODING_WINDOWS_57002,
+   STRING_ENCODING_WINDOWS_57003,
+   STRING_ENCODING_WINDOWS_57004,
+   STRING_ENCODING_WINDOWS_57005,
+   STRING_ENCODING_WINDOWS_57006,
+   STRING_ENCODING_WINDOWS_57007,
+   STRING_ENCODING_WINDOWS_57008,
+   STRING_ENCODING_WINDOWS_57009,
+   STRING_ENCODING_WINDOWS_57010,
+   STRING_ENCODING_WINDOWS_57011,
+
    // Add more encodings here.
 
    // Sentinel value after the last explicitly specified encoding.
@@ -168,14 +450,8 @@ typedef enum {
 } StringEncoding;
 
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 const char *Unicode_EncodingEnumToName(StringEncoding encoding);
 StringEncoding Unicode_EncodingNameToEnum(const char *encodingName);
-StringEncoding Unicode_GetCurrentEncoding(void);
-Bool Unicode_IsEncodingSupported(StringEncoding encoding);
 Bool Unicode_IsEncodingValid(StringEncoding encoding);
 void Unicode_Init(int argc, char ***argv, char ***envp);
 #if defined (_WIN32)
@@ -183,6 +459,39 @@ void Unicode_InitW(int argc, utf16_t **wargv, utf16_t **wenvp,
                    char ***argv, char ***envp);
 #endif
 
+StringEncoding UnicodeGetCurrentEncodingInternal(void);
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Unicode_GetCurrentEncoding --
+ *
+ *      Return the current encoding (corresponding to
+ *     CodeSet_GetCurrentCodeSet()).
+ *
+ * Results:
+ *      The current encoding.
+ *
+ * Side effects:
+ *      Since the return value of CodeSet_GetCurrentCodeSet() and
+ *     our look-up table do not change, we memoize the value.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE StringEncoding
+Unicode_GetCurrentEncoding(void)
+{
+   static StringEncoding encoding = STRING_ENCODING_UNKNOWN;
+
+   if (UNLIKELY(encoding == STRING_ENCODING_UNKNOWN)) {
+      encoding = UnicodeGetCurrentEncodingInternal();
+   }
+   return encoding;
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
@@ -203,11 +512,14 @@ void Unicode_InitW(int argc, utf16_t **wargv, utf16_t **wenvp,
 static INLINE StringEncoding
 Unicode_ResolveEncoding(StringEncoding encoding) // IN
 {
-   return (encoding == STRING_ENCODING_DEFAULT)
-          ? Unicode_GetCurrentEncoding()
-          : encoding;
+   if (encoding == STRING_ENCODING_DEFAULT) {
+      encoding = Unicode_GetCurrentEncoding();
+   }
+   ASSERT(Unicode_IsEncodingValid(encoding));
+   return encoding;
 }
 
+
 #ifdef __cplusplus
 }
 #endif
index de338a4248949b3363a512066e9e3b4a69dce856..f34697592cce1da8b7c2f1474676cf77c658a5d5 100644 (file)
 #include "vm_assert.h"
 #include "unicodeTypes.h"
 
+/*
+ * Define the Util_ThreadID type.
+ */
+#if defined(__APPLE__) || defined(__FreeBSD__)
+#include <pthread.h>
+typedef pthread_t Util_ThreadID;
+#elif defined(_WIN32)
+typedef DWORD Util_ThreadID;
+#else // Linux et al
+#include <unistd.h>
+typedef pid_t Util_ThreadID;
+#endif
+
 #ifdef __APPLE__
 EXTERN char *Util_CFStringToUTF8CString(CFStringRef s);
 EXTERN char *Util_IORegGetStringProperty(io_object_t entry, CFStringRef property);
@@ -92,7 +105,7 @@ EXTERN int Util_BumpNoFds(uint32 *cur, uint32 *wanted);
 EXTERN Bool Util_CanonicalPathsIdentical(const char *path1, const char *path2);
 EXTERN Bool Util_IsAbsolutePath(const char *path);
 EXTERN unsigned Util_GetPrime(unsigned n0);
-EXTERN uintptr_t Util_GetCurrentThreadId(void);
+EXTERN Util_ThreadID Util_GetCurrentThreadId(void);
 
 EXTERN char *Util_DeriveFileName(const char *source,
                                  const char *name,
index 3a7038e7b676803a68801c9d805ff3e4d33c0f22..b9de2e37e104c9c64046ef750a876c7bff1c47d3 100644 (file)
@@ -156,6 +156,11 @@ enum {
    VIX_E_TEMPLATE_VM                            = 4003,
    VIX_E_VM_ALREADY_LOADED                      = 4004,
    VIX_E_VM_ALREADY_UP_TO_DATE                  = 4006,
+
+   /* Wrapper Errors */
+   VIX_E_WRAPPER_WORKSTATION_NOT_INSTALLED      = 5001,
+   VIX_E_WRAPPER_VERSION_NOT_FOUND              = 5002,
+   VIX_E_WRAPPER_SERVICEPROVIDER_NOT_FOUND      = 5003,
  
    /* Property Errors */
    VIX_E_UNRECOGNIZED_PROPERTY                  = 6000,
@@ -255,6 +260,7 @@ enum {
    /* Remoting Errors. */
    VIX_E_CANNOT_CONNECT_TO_HOST                 = 18000,
    VIX_E_NOT_FOR_REMOTE_HOST                    = 18001,
+   VIX_E_INVALID_HOSTNAME_SPECIFICATION         = 18002,
     
    /* Screen Capture Errors. */
    VIX_E_SCREEN_CAPTURE_ERROR                   = 19000,
@@ -687,6 +693,13 @@ VixHandle VixVM_WaitForToolsInGuest(VixHandle vmHandle,
                                     VixEventProc *callbackProc,
                                     void *clientData);
 
+/*
+ * VixVM_LoginInGuest option flags.
+ */
+enum {
+   VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT      = 0x08,                     
+};
+
 VixHandle VixVM_LoginInGuest(VixHandle vmHandle,
                              const char *userName,
                              const char *password,
index f488d8b50f7bc5e91e8a477f0a590e1e124f9dec..e7da4913c0a94cc53ea89d9a1dab0db3790ab796 100644 (file)
@@ -908,6 +908,39 @@ struct VixMsgSnapshotMRURequest {
 #include "vmware_pack_end.h"
 VixMsgSnapshotMRURequest;
 
+typedef
+#include "vmware_pack_begin.h"
+struct VixMsgSetSnapshotInfoRequest {
+   VixCommandRequestHeader    header;
+
+   int32                      snapshotId;
+   int32                      clientFlags;
+
+   uint32                     displayNameLength;
+   uint32                     descriptionLength;
+   uint32                     propertyListLength;
+
+   /*
+    * Followed by:
+    *   displayName string
+    *   description string
+    *   serialized property list.
+    */
+}
+#include "vmware_pack_end.h"
+VixMsgSetSnapshotInfoRequest;
+
+typedef
+#include "vmware_pack_begin.h"
+struct VixMsgSetSnapshotInfoResponse {
+   VixCommandResponseHeader    header;
+
+   uint32                     propertyListLength;
+}
+#include "vmware_pack_end.h"
+VixMsgSetSnapshotInfoResponse;
+
+
 /*
  * Fork a running VM.
  */
@@ -2093,9 +2126,11 @@ enum {
    VIX_COMMAND_GET_TIMEMARKER                   = 153,
    VIX_COMMAND_REMOVE_TIMEMARKER                = 154,
 
+   VIX_COMMAND_SET_SNAPSHOT_INFO                = 155,
    VIX_COMMAND_SNAPSHOT_SET_MRU                 = 156,
 
    VIX_COMMAND_LAST_NORMAL_COMMAND              = 157,
+
    VIX_TEST_UNSUPPORTED_TOOLS_OPCODE_COMMAND    = 998,
    VIX_TEST_UNSUPPORTED_VMX_OPCODE_COMMAND      = 999,
 };
index 20fe0870c327b3149f16ddcaa722c04bf4c8654d..ec2c76240ae42fb67c2928dd555abb73f0622cab 100644 (file)
@@ -397,13 +397,32 @@ enum {
 
 extern int vixDebugGlobalSpewLevel;
 extern char *VixAllocDebugString(char *fmt, ...);
-extern void VixDebugInit(int level);
+extern void VixDebugInit(int level, Bool panicOnVixAssert);
 extern const char *VixDebug_GetFileBaseName(const char *path);
+extern void VixAssert(const char *cond, const char *file, int lineNum);
 
 /*
  * preference name for client and vmx
  */
-#define  VIX_DEBUG_PREFERENCE_NAME   "vix.debugLevel"
+#define VIX_DEBUG_PREFERENCE_NAME  "vix.debugLevel"
+#define VIX_ASSERT_PREFERENCE_NAME "vix.doAssert"
+
+/*
+ * Assertions.  Normally we'd just use ASSERT(), but we've hit many cases
+ * where ASSERT() is desired by foundry developers, but not by foundry users.
+ * So we have our own VIX_ASSERT(), which is configured via a preference,
+ * vix.doAssert, off by default.
+ */
+#ifdef VMX86_DEBUG
+# ifdef __cplusplus
+# define  VIX_ASSERT(cond) (UNLIKELY(!(cond)) ? VixAssert(#cond, __FILE__, __LINE__) : (void) 0)
+# else
+# define  VIX_ASSERT(cond) (UNLIKELY(!(cond)) ? VixAssert(#cond, __FILE__, __LINE__) : 0)
+# endif
+#else
+#define  VIX_ASSERT(cond)
+#endif
+
 
 #define  VIX_DEBUG_LEVEL(logLevel, s) if (logLevel <= vixDebugGlobalSpewLevel) \
     {  char *debugString = VixAllocDebugString s; \
index 3dfcc8ed4aa39a852904d7e401a4883bc21744d3..72fdbc9f5d23b42a3d6a322b63997e2c9c97be77 100644 (file)
@@ -65,6 +65,7 @@ typedef struct GuestOsStateChangeCmd {
 #define TOOLS_UPGRADER_NAME       "tools-upgrader"
 #define TOOLS_SSO_NAME            "tools-sso"
 #define TOOLS_HGFS_NAME           "tools-hgfs"
+#define TOOLS_TRAY_NAME           "tools-tray"
 
 /*
  * Option strings
index ade5afb4b9ff2d0d3b9b486fbc332525fdd443a9..376130c6d9256a0ded02b60b1e769cbbadbbe11a 100644 (file)
 #define PRODUCT_VDM_SHORT_NAME "VDM"
 #define PRODUCT_VDM_NAME MAKE_NAME("Virtual Desktop Manager")
 
+#define PRODUCT_VDM_CLIENT_NAME MAKE_NAME("VDM Client")
+#define PRODUCT_VDM_CLIENT_NAME_FOR_LICENSE PRODUCT_VDM_CLIENT_NAME
+
 // XXX VMvisor is the underlying technology for possibly several products,
 // XXX not the product. Fix when names are decided.
 #define PRODUCT_VMVISOR_NAME MAKE_NAME("VMvisor")
 
 /*
- * VMware Remote Console version definitions
+ * VMware Remote Console (VMRC) version definitions
  */
 
 #define PRODUCT_VMRC_SHORT_NAME "VMRC"
 #define PRODUCT_VMRC_DESCRIPTION "Enables remote interaction with virtual machines."
 #ifdef _WIN32
 #define PRODUCT_VMRC_EXECUTABLE PRODUCT_GENERIC_NAME_LOWER "-vmrc.exe"
-#define PRODUCT_VMRC_MIMETYPE_SEPARATOR "|"
-#define PRODUCT_VMRC_MIMETYPE_TERMINATOR ""
 #else
 #define PRODUCT_VMRC_EXECUTABLE PRODUCT_GENERIC_NAME_LOWER "-vmrc"
-#define PRODUCT_VMRC_MIMETYPE_SEPARATOR "::" PRODUCT_VMRC_PLUGIN_NAME ";"
-#define PRODUCT_VMRC_MIMETYPE_TERMINATOR "::" PRODUCT_VMRC_PLUGIN_NAME ";"
 #endif
 
 /*
- * current Gecko/WebKit plugin mimetype
+ * VMRC ActiveX CLSIDs and ProgIDs
+ */
+#define PRODUCT_VMRC_PLUGIN_GUID_WEB           B94C2238-346E-4c5e-9B36-8CC627F35574
+#define PRODUCT_VMRC_PLUGIN_GUID_WEB_TYPELIB   84D652E1-9364-4536-B13C-24F16FBEBCFE
+#define PRODUCT_VMRC_PLUGIN_WEB_CLSID          CLSID:##PRODUCT_VMRC_PLUGIN_GUID_WEB
+#define PRODUCT_VMRC_PLUGIN_WEB_PROGID_BASE    "VMware.web.VMwareRemoteConsole"
+#define PRODUCT_VMRC_PLUGIN_WEB_PROGID         PRODUCT_VMRC_PLUGIN_WEB_PROGID_BASE "." \
+                                               XSTR(VMRC_PLUGIN_VERSION_BASE)
+
+#define PRODUCT_VMRC_PLUGIN_GUID               B94C2248-346E-4C5E-9B36-8CC627F35574
+#define PRODUCT_VMRC_PLUGIN_GUID_EMBEDDED      B94C2249-346E-4C5E-9B36-8CC627F35574
+#define PRODUCT_VMRC_PLUGIN_GUID_QUICKMKSAXCTL 338095E4-1806-4BA3-AB51-38A3179200E9
+#define PRODUCT_VMRC_PLUGIN_GUID_TYPELIB       A51B0CB2-1545-43AD-B66E-AD322009406C
+#define PRODUCT_VMRC_PLUGIN_PROGID_BASE        "VMware.hosted.VMwareRemoteConsole"
+#define PRODUCT_VMRC_PLUGIN_PROGID             PRODUCT_VMRC_PLUGIN_PROGID_BASE "." \
+                                               XSTR(VMRC_PLUGIN_VERSION_BASE)
+#define PRODUCT_VMRC_PLUGIN_PROGID_EMBEDDED_BASE "VMware.hosted.VMwareEmbeddedRemoteConsole"
+#define PRODUCT_VMRC_PLUGIN_PROGID_EMBEDDED    PRODUCT_VMRC_PLUGIN_PROGID_EMBEDDED_BASE "." \
+                                               XSTR(VMRC_PLUGIN_VERSION_BASE)
+
+/*
+ * VMRC MIME types
  */
+#ifdef _WIN32
+#define PRODUCT_VMRC_MIMETYPE_SEPARATOR "|"
+#define PRODUCT_VMRC_MIMETYPE_TERMINATOR ""
+#else
+#define PRODUCT_VMRC_MIMETYPE_SEPARATOR "::" PRODUCT_VMRC_PLUGIN_NAME ";"
+#define PRODUCT_VMRC_MIMETYPE_TERMINATOR "::" PRODUCT_VMRC_PLUGIN_NAME ";"
+#endif
 
 #define PRODUCT_VMRC_PLUGIN_CURRENT_MIMETYPE \
-   "application/x-vmware-vmrc;version=" \
-   VMRC_PLUGIN_VERSION "." BUILD_NUMBER_NUMERIC_STRING PRODUCT_VMRC_MIMETYPE_SEPARATOR
+   "application/x-vmware-vmrc;version=" VMRC_PLUGIN_VERSION
 
 /*
  * previously shipped plugin mimetypes (updated as we ship them)
  */
 #define PRODUCT_VMRC_PLUGIN_PREVIOUS_MIMETYPES \
-   "application/x-vmware-vmrc;version=2.5.0.0" \
-   PRODUCT_VMRC_MIMETYPE_TERMINATOR
+   "application/x-vmware-vmrc;version=2.5.0.0"
 
 /*
- * legacy plugin mimetypes
+ * legacy plugin mimetypes (currently unused but here for reference)
  */
 #define PRODUCT_VMRC_PLUGIN_LEGACY_MIMETYPES \
    "application/x-vmware-mks;version=2.5.0.0" PRODUCT_VMRC_MIMETYPE_SEPARATOR \
    "application/x-vmware-mks;version=2.0.0.0" PRODUCT_VMRC_MIMETYPE_SEPARATOR
 
 /*
- * All plugin mimetypes
+ * All supported plugin mimetypes
  */
 #define PRODUCT_VMRC_PLUGIN_MIMETYPES \
-   PRODUCT_VMRC_PLUGIN_CURRENT_MIMETYPE \
-   PRODUCT_VMRC_PLUGIN_PREVIOUS_MIMETYPES \
-   // PRODUCT_VMRC_PLUGIN_LEGACY_MIMETYPES /* Legacy support disabled */
+   PRODUCT_VMRC_PLUGIN_CURRENT_MIMETYPE PRODUCT_VMRC_MIMETYPE_SEPARATOR \
+   PRODUCT_VMRC_PLUGIN_PREVIOUS_MIMETYPES PRODUCT_VMRC_MIMETYPE_TERMINATOR
 
 /*
  * TODO: This properly lives in productState, but we need it here to
index 8ab4259887dc9f36dbd75b6f30b6351b2ec89096..91fe2a62f691ab78e3191267a287a5e18fd0ce99 100644 (file)
@@ -744,6 +744,13 @@ typedef uint32 ToolsVersion;
  * We still haven't used that range (beta 1 was released with 7.7.1).
  */
 
+#ifndef RC_INVOKED
+#define   TOOLS_VERSION_WS65_BETA1     TOOLS_VERSION_TO_UINT(TOOLS_VERSION_WS65_BETA1_V)
+#endif /* RC_INVOKED */
+#define   TOOLS_VERSION_WS65_BETA1_V_MJR     7
+#define   TOOLS_VERSION_WS65_BETA1_V_MNR     8
+#define   TOOLS_VERSION_WS65_BETA1_V_BASE    0
+
 #ifndef RC_INVOKED
 #define   TOOLS_VERSION_FUSION15_BETA1     TOOLS_VERSION_TO_UINT(TOOLS_VERSION_FUSION15_BETA1_V)
 #endif /* RC_INVOKED */
@@ -755,6 +762,7 @@ typedef uint32 ToolsVersion;
 #define   TOOLS_VERSION_CURRENT_STR    TOOLS_VERSION_TO_STR(TOOLS_VERSION_FUSION15_BETA1)
 #define   TOOLS_VERSION_CURRENT_CSV    TOOLS_VERSION_TO_CSV(TOOLS_VERSION_FUSION15_BETA1)
 
+
 /*
  * The extended Tools version is the current Tools version with the
  * build number appended. Useful until the PRODUCT_VERSION
index e24ee3e1006f880a29719acbc00ce98635cc4883..9955d2a79786bd219bfb9dc1d090f0b5be3a5122 100644 (file)
 #define VIPERL_VERSION "1.1.0"
 #define RCLI_VERSION "1.5.0"
 #define VDM_VERSION "e.x.p"
+#define VDM_CLIENT_VERSION "e.x.p"
 
 // VMRC_PLUGIN_VERSION should match PLAYER_VERSION but can't be e.x.p
-#define VMRC_PLUGIN_VERSION "2.5.0"
-#define VMRC_PLUGIN_VERSION_COMMAS 2,5,0,PRODUCT_BUILD_NUMBER_NUMERIC
+#ifndef MAKESTR
+#define MAKESTR(x) #x
+#define XSTR(x) MAKESTR(x)
+#endif
+
+#define VMRC_PLUGIN_VERSION_MAJOR 2
+#define VMRC_PLUGIN_VERSION_MINOR 5
+#define VMRC_PLUGIN_VERSION_Z     0
+#define VMRC_PLUGIN_VERSION_BASE  VMRC_PLUGIN_VERSION_MAJOR.VMRC_PLUGIN_VERSION_MINOR
+
+#define VMRC_PLUGIN_VERSION       \
+        XSTR(VMRC_PLUGIN_VERSION_BASE) "." XSTR(VMRC_PLUGIN_VERSION_Z) "." BUILD_NUMBER_NUMERIC_STRING
+#define VMRC_PLUGIN_VERSION_COMMAS \
+        VMRC_PLUGIN_VERSION_MAJOR,VMRC_PLUGIN_VERSION_MINOR,0,PRODUCT_BUILD_NUMBER_NUMERIC
 
 /*
  * When setting the Tools product version, please use the string corresponding
  *
  * XXX: The extract-macro script should be updated to handle this special case.
  */
-#define TOOLS_VERSION "2008.05.15"
+#define TOOLS_VERSION "2008.06.03"
 
 #ifdef VMX86_VPX
 #define VIM_API_TYPE "VirtualCenter"
index c84a9c9c4c416c0cb40fea169da1796965b631d1..8ae14b063c58130cf9f663c3cf3bd60230e9f78a 100644 (file)
@@ -416,7 +416,7 @@ FLAGDEF(  8A, EAX, AMD,     8,  1, SVM_HYPERVISOR,      MASK,    0, FALSE)
 FIELDDEF( 8A, EAX, AMD,     9, 23, SVMEAX_RSVD,         MASK,    0, FALSE)            \
 FIELDDEF( 8A, EBX, AMD,     0, 32, SVM_N_ASIDS,         MASK,    0, FALSE)            \
 FIELDDEF( 8A, ECX, AMD,     0, 32, SVMECX_RSVD,         MASK,    0, FALSE)            \
-FLAGDEF(  8A, EDX, AMD,     0,  1, SVM_NP,              MASK,    0, FALSE)            \
+FLAGDEFA( 8A, EDX, AMD,     0,  1, SVM_NP,              MASK,    0, FALSE, NPT)       \
 FLAGDEF(  8A, EDX, AMD,     1,  1, SVM_LBR,             MASK,    0, FALSE)            \
 FLAGDEF(  8A, EDX, AMD,     2,  1, SVM_LOCK,            MASK,    0, FALSE)            \
 FLAGDEF(  8A, EDX, AMD,     3,  1, SVM_NRIP,            MASK,    0, FALSE)            \
@@ -599,7 +599,6 @@ FIELD_FUNC(MWAIT_C4_SUBSTATE, CPUID_INTEL_ID5EDX_MWAIT_C4_SUBSTATE)
 #define CPUID_MODEL_CORE       14
 #define CPUID_MODEL_CORE2      15
 #define CPUID_MODEL_PENRYN     0x17  // Effective model
-#define CPUID_MODEL_NEHALEM    0x1a  // Effective model
 
 static INLINE uint32
 CPUID_EFFECTIVE_FAMILY(uint32 v) /* %eax from CPUID with %eax=1. */
index 6a03c8b76ad9192fd398a913c99b19e54ea6f6c0..043a68bd60c8ba796468da06ffcc2697b1d37002 100644 (file)
@@ -152,6 +152,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -160,6 +161,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -168,6 +170,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index b373c2bd4fa9c1cc3078a61b588d2c03c1a7d4a6..eab47b91693b288c5e9239a7739ba515182c8b93 100644 (file)
@@ -140,6 +140,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -148,6 +149,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -156,6 +158,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 62ccd7b830333a564796d02b5608d463c263064b..3c36fad547e7bddf35e7da2dd3add8d4fcae9b71 100644 (file)
@@ -165,6 +165,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -173,6 +174,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -181,6 +183,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 762a07763a5fc9f07554352ee42000918c8325e4..42e3e6eb6b35da9efb113dec7cf91ab54ed7b4aa 100644 (file)
@@ -34,6 +34,7 @@
 #   endif
 #   include <string.h>
 #   include <stdlib.h>
+#   include <unistd.h>
 #   include <errno.h>
 #endif
 
@@ -1714,7 +1715,7 @@ CodeSetOld_Utf16leToCurrent(char const *bufIn,     // IN
                             size_t *sizeOut) // OUT
 {
 #if defined(CURRENT_IS_UTF8)
-   NOT_IMPLEMENTED();
+   return CodeSetOld_Utf16leToUtf8(bufIn, sizeIn, bufOut, sizeOut);
 #elif defined(USE_ICONV)
    DynBuf db;
    Bool ok;
@@ -1758,7 +1759,18 @@ CodeSetOld_Utf16beToCurrent(char const *bufIn,     // IN
                             size_t *sizeOut) // OUT
 {
 #if defined(CURRENT_IS_UTF8)
-   NOT_IMPLEMENTED();
+   Bool status;
+   char *temp;
+
+   if ((temp = malloc(sizeIn)) == NULL) {
+      return FALSE;
+   }
+   ASSERT((sizeIn & 1) == 0);
+   ASSERT((ssize_t) sizeIn >= 0);
+   swab(bufIn, temp, sizeIn);
+   status = CodeSetOld_Utf16leToUtf8(temp, sizeIn, bufOut, sizeOut);
+   free(temp);
+   return status;
 #elif defined(USE_ICONV)
    DynBuf db;
    Bool ok;
index 1d17a4ec810ae2477414d73ad6e15b48ce7815fa..de437c89a494bf2f7076e6667a6758dbb421aacb 100644 (file)
@@ -164,7 +164,7 @@ DblLnkLst_Unlink1(DblLnkLst_Links *l) // IN
  */
 
 Bool
-DblLnkLst_IsLinked(DblLnkLst_Links *l) // IN
+DblLnkLst_IsLinked(DblLnkLst_Links const *l) // IN
 {
    ASSERT(l);
 
index e3074f175448f2812903f0d25db002bcd272a16c..6e5c7748509ed123debeccddfec1bb6e7e401726 100644 (file)
@@ -272,8 +272,12 @@ DynBuf_Enlarge(DynBuf *b,       // IN
 #if defined(DYNBUF_DEBUG)
                         b->allocated + 1
 #else
-                        /* Double the previously allocated size --hpreg */
-                        b->allocated * 2
+                        /* 
+                         * Double the previously allocated size if it is less
+                         * than 256KB; otherwise grow it linearly by 256KB
+                         */
+                        (b->allocated < 256 * 1024 ? b->allocated * 2
+                                                   : b->allocated + 256 * 1024)
 #endif
                       :
 #if defined(DYNBUF_DEBUG)
index 2d834a971ae62de8ea737566c3a9d2b8b1f33dd8..1f1fa541c0aab2a092131842e4d4bd2c28125d89 100644 (file)
@@ -27,6 +27,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
+#ifdef _WIN32
+#include <windows.h>
+#endif
 
 #include "vmware.h"
 #include "hashTable.h"
@@ -254,16 +257,16 @@ HashTable_Alloc(uint32 numEntries,       // IN: must be a power of 2
 #ifdef NO_ATOMIC_HASHTABLE
    ASSERT_NOT_IMPLEMENTED((keyType & HASH_FLAG_ATOMIC) == 0);
 #endif
-   ASSERT(((keyType & ~HASH_FLAG_MASK) != HASH_STRING_KEY &&
-           (keyType & ~HASH_FLAG_MASK) != HASH_ISTRING_KEY) ||
-         (keyType & HASH_FLAG_COPYKEY) == 0);
+   ASSERT((keyType & HASH_FLAG_COPYKEY) == 0 ||
+          ((keyType & HASH_TYPE_MASK) == HASH_STRING_KEY ||
+           (keyType & HASH_TYPE_MASK) == HASH_ISTRING_KEY));
 
    ht = Util_SafeMalloc(sizeof *ht);
    ASSERT_MEM_ALLOC(ht);
 
    ht->numBits = ffs(numEntries) - 1;
    ht->numEntries = numEntries;
-   ht->keyType = keyType & ~HASH_FLAG_MASK;
+   ht->keyType = keyType & HASH_TYPE_MASK;
    ht->atomic = (keyType & HASH_FLAG_ATOMIC) != 0;
    ht->copyKey = (keyType & HASH_FLAG_COPYKEY) != 0;
    ht->freeEntryFn = fn;
@@ -625,6 +628,62 @@ HashTable_ReplaceOrInsert(HashTable  *ht,          // IN/OUT
 }
 
 
+/*
+ *----------------------------------------------------------------------
+ *
+ * HashTable_ReplaceIfEqual --
+ *
+ *      Look up an a key.  If found, replace the existing clientData
+ *     if it is the same as oldClientData and return TRUE.
+ *     Return FALSE otherwise.
+ *
+ * Results:
+ *      TRUE if replaced, FALSE otherwise.
+ *
+ * Side effects:
+ *     None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Bool
+HashTable_ReplaceIfEqual(HashTable  *ht,            // IN/OUT
+                         const char *keyStr,        // IN
+                        void       *oldClientData, // IN
+                         void       *newClientData) // IN
+{
+   uint32 hash = HashTableComputeHash(ht, keyStr);
+   HashTableEntry *entry = HashTableLookup(ht, keyStr, hash);
+   Bool retval = FALSE;
+
+   if (entry == NULL) {
+      return FALSE;
+   }
+
+#ifndef NO_ATOMIC_HASHTABLE
+   if (ht->atomic) {
+      void *data = Atomic_ReadIfEqualWritePtr(&entry->clientData,
+                                             oldClientData, newClientData);
+      if (data == oldClientData) {
+        retval = TRUE;
+        if (ht->freeEntryFn != NULL) {
+           ht->freeEntryFn(data);
+        }
+      }
+   } else
+#endif
+   if (Atomic_ReadPtr(&entry->clientData) == oldClientData) {
+      retval = TRUE;
+      if (ht->freeEntryFn) {
+        ht->freeEntryFn(Atomic_ReadPtr(&entry->clientData));
+      }
+      Atomic_WritePtr(&entry->clientData, newClientData);
+   }
+
+   return retval;
+}
+
+
 /*
  *----------------------------------------------------------------------
  *
index 2a1f696fc45b11723072df08f366699e26cb084e..02dd92c49706dd94fb0c52026b3b0bc5c6d78ec8 100644 (file)
 #define UNICODE_BUILDING_POSIX_WRAPPERS
 #include <stdio.h>
 #include <stdlib.h>
+#include <errno.h>
 
 #if defined(__APPLE__) || defined(linux)
 #include <dlfcn.h>
 #endif
 
 #include "vmware.h"
-#include "str.h"
-#include "posix.h"
-#include "unicode.h"
+#include "posixInt.h"
 
 
 #if defined(__APPLE__) || defined(linux)
@@ -52,8 +51,14 @@ void *
 Posix_Dlopen(ConstUnicode pathName,  // IN:
              int flag)               // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   void *ret = dlopen(path, flag);
+   char *path;
+   void *ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return NULL;
+   }
+
+   ret = dlopen(path, flag);
 
    free(path);
    return ret;
diff --git a/open-vm-tools/lib/misc/posixInt.h b/open-vm-tools/lib/misc/posixInt.h
new file mode 100644 (file)
index 0000000..f58769c
--- /dev/null
@@ -0,0 +1,245 @@
+/*********************************************************
+ * Copyright (C) 2008 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.
+ *
+ *********************************************************/
+
+/*
+ * posixInt.h --
+ *
+ *     Internal definitions for the Posix wrapper module.
+ */
+
+#ifndef _POSIXINT_H_
+#define _POSIXINT_H_
+
+#define INCLUDE_ALLOW_USERLEVEL
+#include "includeCheck.h"
+
+#include "posix.h"
+#include "unicode.h"
+#ifndef N_PLAT_NLM
+#include "hashTable.h"
+#include "vm_atomic.h"
+#include "util.h"
+#include "str.h"
+#endif
+
+
+#ifndef _WIN32 // {
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * PosixConvertToCurrent --
+ *
+ *      Utility function to convert a Unicode string
+ *      to the current encoding.
+ *
+ * Results:
+ *      TRUE on success.
+ *      Conversion result in *out or NULL on failure.
+ *      errno is untouched on success, set to UNICODE_CONVERSION_ERRNO
+ *      on failure.
+ *
+ * Side effects:
+ *      As described.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static INLINE Bool
+PosixConvertToCurrent(ConstUnicode in,   // IN: string to convert
+                      char **out)        // OUT: conversion result
+{
+   int e = errno;
+   char *p = Unicode_GetAllocBytes(in, STRING_ENCODING_DEFAULT);
+   Bool success = p != NULL || in == NULL;
+
+   if (!success) {
+      e = UNICODE_CONVERSION_ERRNO;
+   }
+   *out = p;
+   errno = e;
+   return success;
+}
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * PosixConvertToCurrentList --
+ *
+ *      Utility function to convert a list of Unicode strings
+ *      to the current encoding.
+ *     Return NULL if list is NULL.
+ *
+ * Results:
+ *      TRUE on success.
+ *      Conversion result in *out or NULL on failure.
+ *      errno is untouched on success, set to UNICODE_CONVERSION_ERRNO
+ *      on failure.
+ *
+ * Side effects:
+ *      As described.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static INLINE Bool
+PosixConvertToCurrentList(Unicode const *in,  // IN: list to convert
+                          char ***out)        // OUT: conversion result
+{
+   int e = errno;
+   char **p;
+   Bool success;
+
+   if (in == NULL) {
+      p = NULL;
+      success = TRUE;
+   } else {
+      p = Unicode_GetAllocList(in, -1, STRING_ENCODING_DEFAULT);
+      success = p != NULL;
+   }
+
+   if (!success) {
+      e = UNICODE_CONVERSION_ERRNO;
+   }
+   *out = p;
+   errno = e;
+   return success;
+}
+
+#endif // }
+
+
+#ifndef N_PLAT_NLM // {
+
+/*
+ * Hash table for Posix_Getenv
+ */
+
+typedef struct PosixEnvEntry {
+   Atomic_Ptr value;
+   Atomic_Ptr lastValue;
+} PosixEnvEntry;
+
+static INLINE void
+PosixEnvFree(void *v)
+{
+   // never called
+   NOT_REACHED();
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * PosixGetenvHash --
+ *
+ *      Save away Unicode result for Posix_Getenv() to make
+ *      it persistent.
+ *
+ * Results:
+ *      The value.
+ *
+ * Side effects:
+ *      The passed-in value string may be saved in a hash table,
+ *      or it may be freed.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE_SINGLE_CALLER Unicode
+PosixGetenvHash(ConstUnicode name,  // IN
+                Unicode value)      // IN/OUT: may be freed
+{
+   static Atomic_Ptr htPtr;
+   HashTable *ht;
+   Unicode oldValue;
+   PosixEnvEntry *e;
+
+   /*
+    * Don't need to save NULL.
+    */
+
+   if (value == NULL) {
+      return value;
+   }
+
+   ht = HashTable_AllocOnce(&htPtr, 128,
+                           HASH_FLAG_ATOMIC | HASH_FLAG_COPYKEY |
+                              HASH_STRING_KEY,
+                            PosixEnvFree);
+
+   /*
+    * We have to allow any number of concurrent getenv()'s.
+    * So if the saved value is the same, don't change it,
+    * and if it must change, all the threads together must
+    * establish a single new value.
+    *
+    * On the other hand, we don't have to support concurrent
+    * getenv() and setenv().
+    */
+
+   for (;;) {
+      /*
+       * If not in hash table, then insert and return.
+       */
+
+      if (!HashTable_Lookup(ht, name, (void **) &e)) {
+        e = Util_SafeMalloc(sizeof *e);
+        Atomic_WritePtr(&e->value, value);
+        Atomic_WritePtr(&e->lastValue, NULL);
+        if (!HashTable_Insert(ht, name, e)) {
+           free(e);
+           continue;
+        }
+        break;
+      }
+
+      /*
+       * If old value is the same, then use it.
+       */
+
+      oldValue = Atomic_ReadPtr(&e->value);
+      if (Str_Strcmp(oldValue, value) == 0) {
+        Unicode_Free(value);
+        value = oldValue;
+        break;
+      }
+
+      /*
+       * If value has changed, use new value, but don't free old
+       * value yet because somebody else may be going through this
+       * same code and still using it.  Because we don't need
+       * to care about concurrent setenv(), a single lastValue
+       * slot is sufficient.
+       */
+
+      if (Atomic_ReadIfEqualWritePtr(&e->value, oldValue, value) == oldValue) {
+        oldValue = Atomic_ReadWritePtr(&e->lastValue, oldValue);
+        Unicode_Free(oldValue);
+        break;
+      }
+   }
+
+   return value;
+}
+
+#endif // }
+
+
+#endif // ifndef _POSIXINT_H_
index 1a45e22be1d50b8a472e073a21665c9a3011d9be..34d427f46ee4ba682600bcbb94cf9bd01dd18dde 100644 (file)
 # endif
 
 #include "vmware.h"
-#include "str.h"
-#include "posix.h"
-#include "unicode.h"
-#if !defined(N_PLAT_NLM)
-#include "hashTable.h"
-#include "vm_atomic.h"
-#endif
+#include "posixInt.h"
 
 
 #if !defined(N_PLAT_NLM)
@@ -112,10 +106,14 @@ Posix_Open(ConstUnicode pathName,  // IN:
            int flags,              // IN:
            ...)                    // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   char *path;
    mode_t mode = 0;
    int fd;
 
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
    if ((flags & O_CREAT) != 0) {
       va_list a;
 
@@ -185,11 +183,15 @@ FILE *
 Posix_Fopen(ConstUnicode pathName, // IN:
             const char *mode)      // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   char *path;
    FILE *stream;
 
    ASSERT(mode);
 
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return NULL;
+   }
+
    stream = fopen(path, mode);
 
    free(path);
@@ -218,8 +220,14 @@ int
 Posix_Stat(ConstUnicode pathName,  // IN:
            struct stat *statbuf)   // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = stat(path, statbuf);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = stat(path, statbuf);
 
    free(path);
    return ret;
@@ -247,8 +255,14 @@ int
 Posix_Chmod(ConstUnicode pathName,  // IN:
             mode_t mode)            // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = chmod(path, mode);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = chmod(path, mode);
 
    free(path);
    return ret;
@@ -276,10 +290,19 @@ int
 Posix_Rename(ConstUnicode fromPathName,  // IN:
              ConstUnicode toPathName)    // IN:
 {
-   char *toPath = Unicode_GetAllocBytes(toPathName, STRING_ENCODING_DEFAULT);
-   char *fromPath = Unicode_GetAllocBytes(fromPathName,
-                                         STRING_ENCODING_DEFAULT);
-   int result = rename(fromPath, toPath);
+   char *toPath;
+   char *fromPath;
+   int result;
+
+   if (!PosixConvertToCurrent(fromPathName, &fromPath)) {
+      return -1;
+   }
+   if (!PosixConvertToCurrent(toPathName, &toPath)) {
+      free(fromPath);
+      return -1;
+   }
+
+   result = rename(fromPath, toPath);
 
    free(toPath);
    free(fromPath);
@@ -307,8 +330,14 @@ Posix_Rename(ConstUnicode fromPathName,  // IN:
 int
 Posix_Unlink(ConstUnicode pathName)  // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = unlink(path);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = unlink(path);
 
    free(path);
    return ret;
@@ -335,8 +364,14 @@ Posix_Unlink(ConstUnicode pathName)  // IN:
 int
 Posix_Rmdir(ConstUnicode pathName)  // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = rmdir(path);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = rmdir(path);
 
    free(path);
    return ret;
@@ -365,11 +400,15 @@ Posix_Freopen(ConstUnicode pathName, // IN:
               const char *mode,      // IN:
               FILE *input_stream)    // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   char *path;
    FILE *stream;
 
    ASSERT(mode);
 
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return NULL;
+   }
+
    stream = freopen(path, mode, input_stream);
 
    free(path);
@@ -398,8 +437,14 @@ int
 Posix_Access(ConstUnicode pathName,  // IN:
              int mode)               // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = access(path, mode);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = access(path, mode);
 
    free(path);
    return ret;
@@ -427,8 +472,14 @@ int
 Posix_Utime(ConstUnicode pathName,        // IN:
             const struct utimbuf *times)  // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = utime(path, times);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = utime(path, times);
 
    free(path);
    return ret;
@@ -457,6 +508,7 @@ Posix_Perror(ConstUnicode str)         // IN:
 {
    char *tmpstr = Unicode_GetAllocBytes(str, STRING_ENCODING_DEFAULT);
 
+   // ignore conversion error silently
    perror(tmpstr);
 
    free(tmpstr);
@@ -484,9 +536,14 @@ long
 Posix_Pathconf(ConstUnicode pathName,   // IN:
                int name)                // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   char *path;
+   long ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
 
-   long ret = pathconf(path, name);
+   ret = pathconf(path, name);
 
    free(path);
    return ret;
@@ -514,11 +571,15 @@ FILE *
 Posix_Popen(ConstUnicode pathName,  // IN:
             const char *mode)       // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   char *path;
    FILE *stream;
 
    ASSERT(mode);
 
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return NULL;
+   }
+
    stream = popen(path, mode);
 
    free(path);
@@ -548,8 +609,14 @@ Posix_Mknod(ConstUnicode pathName,  // IN:
             mode_t mode,            // IN:
             dev_t dev)              // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = mknod(path, mode, dev);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = mknod(path, mode, dev);
 
    free(path);
    return ret;
@@ -578,8 +645,14 @@ Posix_Chown(ConstUnicode pathName,  // IN:
             uid_t owner,            // IN:
             gid_t group)            // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = chown(path, owner, group);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = chown(path, owner, group);
 
    free(path);
    return ret;
@@ -608,8 +681,14 @@ Posix_Lchown(ConstUnicode pathName,  // IN:
              uid_t owner,            // IN:
              gid_t group)            // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = lchown(path, owner, group);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = lchown(path, owner, group);
 
    free(path);
    return ret;
@@ -637,9 +716,19 @@ int
 Posix_Link(ConstUnicode pathName1,  // IN:
            ConstUnicode pathName2)  // IN:
 {
-   char *path1 = Unicode_GetAllocBytes(pathName1, STRING_ENCODING_DEFAULT);
-   char *path2 = Unicode_GetAllocBytes(pathName2, STRING_ENCODING_DEFAULT);
-   int ret = link(path1, path2);
+   char *path1;
+   char *path2;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName1, &path1)) {
+      return -1;
+   }
+   if (!PosixConvertToCurrent(pathName2, &path2)) {
+      free(path1);
+      return -1;
+   }
+
+   ret = link(path1, path2);
 
    free(path1);
    free(path2);
@@ -668,9 +757,19 @@ int
 Posix_Symlink(ConstUnicode pathName1,  // IN:
               ConstUnicode pathName2)  // IN:
 {
-   char *path1 = Unicode_GetAllocBytes(pathName1, STRING_ENCODING_DEFAULT);
-   char *path2 = Unicode_GetAllocBytes(pathName2, STRING_ENCODING_DEFAULT);
-   int ret = symlink(path1, path2);
+   char *path1;
+   char *path2;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName1, &path1)) {
+      return -1;
+   }
+   if (!PosixConvertToCurrent(pathName2, &path2)) {
+      free(path1);
+      return -1;
+   }
+
+   ret = symlink(path1, path2);
 
    free(path1);
    free(path2);
@@ -699,8 +798,14 @@ int
 Posix_Mkfifo(ConstUnicode pathName,  // IN:
              mode_t mode)            // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = mkfifo(path, mode);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = mkfifo(path, mode);
 
    free(path);
    return ret;
@@ -728,8 +833,14 @@ int
 Posix_Truncate(ConstUnicode pathName,  // IN:
                off_t length)           // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = truncate(path, length);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = truncate(path, length);
 
    free(path);
    return ret;
@@ -757,8 +868,14 @@ int
 Posix_Utimes(ConstUnicode pathName,        // IN:
              const struct timeval *times)  // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = utimes(path, times);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = utimes(path, times);
 
    free(path);
    return ret;
@@ -787,11 +904,15 @@ Posix_Execl(ConstUnicode pathName,   // IN:
             ConstUnicode arg0, ...)  // IN:
 {
    int ret = -1;
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   char *path;
    va_list vl;
    char **argv = NULL;
    int i, count = 0;
 
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      goto exit;
+   }
+
    if (arg0) {
       count = 1;
       va_start(vl, arg0);
@@ -802,30 +923,31 @@ Posix_Execl(ConstUnicode pathName,   // IN:
    }
 
    argv = (char **) malloc(sizeof(char *) * (count + 1));
+   if (argv == NULL) {
+      errno = ENOMEM;
+      goto exit;
+   }
    if (argv) {
+      errno = 0;
       if (count > 0) {
-         argv[0] = Unicode_GetAllocBytes(arg0, STRING_ENCODING_DEFAULT);
+        PosixConvertToCurrent(arg0, &argv[0]);
          va_start(vl, arg0);
          for (i = 1; i < count; i++) {
-            argv[i] = Unicode_GetAllocBytes(va_arg(vl, char *),
-                                            STRING_ENCODING_DEFAULT);
+           PosixConvertToCurrent(va_arg(vl, char *), &argv[i]);
          }
          va_end(vl);
       }
       argv[count] = NULL;
-   } else {
-      errno = ENOMEM;
-      goto exit;
+      if (errno != 0) {
+        goto exit;
+      }
    }
 
    ret = execv(path, argv);
 
 exit:
    if (argv) {
-      for (i = 0; i < count; i++) {
-         free(argv[i]);
-      }
-      free(argv);
+      Util_FreeStringList(argv, count + 1);
    }
    free(path);
    return ret;
@@ -853,11 +975,15 @@ Posix_Execlp(ConstUnicode fileName,   // IN:
              ConstUnicode arg0, ...)  // IN:
 {
    int ret = -1;
-   char *file = Unicode_GetAllocBytes(fileName, STRING_ENCODING_DEFAULT);
+   char *file;
    va_list vl;
    char **argv = NULL;
    int i, count = 0;
 
+   if (!PosixConvertToCurrent(fileName, &file)) {
+      goto exit;
+   }
+
    if (arg0) {
       count = 1;
       va_start(vl, arg0);
@@ -868,30 +994,31 @@ Posix_Execlp(ConstUnicode fileName,   // IN:
    }
 
    argv = (char **) malloc(sizeof(char *) * (count + 1));
+   if (argv == NULL) {
+      errno = ENOMEM;
+      goto exit;
+   }
    if (argv) {
+      errno = 0;
       if (count > 0) {
-         argv[0] = Unicode_GetAllocBytes(arg0, STRING_ENCODING_DEFAULT);
+        PosixConvertToCurrent(arg0, &argv[0]);
          va_start(vl, arg0);
          for (i = 1; i < count; i++) {
-            argv[i] = Unicode_GetAllocBytes(va_arg(vl, char *),
-                                            STRING_ENCODING_DEFAULT);
+           PosixConvertToCurrent(va_arg(vl, char *), &argv[i]);
          }
          va_end(vl);
       }
       argv[count] = NULL;
-   } else {
-      errno = ENOMEM;
-      goto exit;
+      if (errno != 0) {
+        goto exit;
+      }
    }
 
    ret = execvp(file, argv);
 
 exit:
    if (argv) {
-      for (i = 0; i < count; i++) {
-         free(argv[i]);
-      }
-      free(argv);
+      Util_FreeStringList(argv, count + 1);
    }
    free(file);
    return ret;
@@ -920,16 +1047,19 @@ Posix_Execv(ConstUnicode pathName,        // IN:
             Unicode const argVal[])       // IN:
 {
    int ret = -1;
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   char *path;
    char **argv = NULL;
 
-   if (argVal) {
-      argv = Unicode_GetAllocList(argVal, -1, 
-                                  STRING_ENCODING_DEFAULT);
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      goto exit;
+   }
+   if (!PosixConvertToCurrentList(argVal, &argv)) {
+      goto exit;
    }
 
    ret = execv(path, argv);
 
+exit:
    if (argv) {
       Util_FreeStringList(argv, -1);
    }
@@ -961,22 +1091,23 @@ Posix_Execve(ConstUnicode pathName,        // IN:
              Unicode const envPtr[])       // IN:
 {
    int ret = -1;
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   char *path;
    char **argv = NULL;
    char **envp = NULL;
 
-   if (argVal) {
-      argv = Unicode_GetAllocList(argVal, -1, 
-                                  STRING_ENCODING_DEFAULT);
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      goto exit;
    }
-
-   if (envPtr) {
-      envp = Unicode_GetAllocList(envPtr, -1, 
-                                  STRING_ENCODING_DEFAULT);
+   if (!PosixConvertToCurrentList(argVal, &argv)) {
+      goto exit;
+   }
+   if (!PosixConvertToCurrentList(envPtr, &envp)) {
+      goto exit;
    }
 
    ret = execve(path, argv, envp);
 
+exit:
    if (argv) {
       Util_FreeStringList(argv, -1);
    }
@@ -1010,16 +1141,19 @@ Posix_Execvp(ConstUnicode fileName,        // IN:
              Unicode const argVal[])       // IN:
 {
    int ret = -1;
-   char *file = Unicode_GetAllocBytes(fileName, STRING_ENCODING_DEFAULT);
+   char *file;
    char **argv = NULL;
 
-   if (argVal) {
-      argv = Unicode_GetAllocList(argVal, -1, 
-                                  STRING_ENCODING_DEFAULT);
+   if (!PosixConvertToCurrent(fileName, &file)) {
+      goto exit;
+   }
+   if (!PosixConvertToCurrentList(argVal, &argv)) {
+      goto exit;
    }
 
    ret = execvp(file, argv);
 
+exit:
    if (argv) {
       Util_FreeStringList(argv, -1);
    }
@@ -1047,9 +1181,14 @@ Posix_Execvp(ConstUnicode fileName,        // IN:
 int
 Posix_System(ConstUnicode command)         // IN:
 {
-   char *tmpcommand = Unicode_GetAllocBytes(command, STRING_ENCODING_DEFAULT);
+   char *tmpcommand;
+   int ret;
 
-   int ret = system(tmpcommand);
+   if (!PosixConvertToCurrent(command, &tmpcommand)) {
+      return -1;
+   }
+
+   ret = system(tmpcommand);
 
    free(tmpcommand);
    return ret;
@@ -1077,8 +1216,14 @@ int
 Posix_Mkdir(ConstUnicode pathName,  // IN:
             mode_t mode)            // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = mkdir(path, mode);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = mkdir(path, mode);
 
    free(path);
    return ret;
@@ -1105,8 +1250,14 @@ Posix_Mkdir(ConstUnicode pathName,  // IN:
 int
 Posix_Chdir(ConstUnicode pathName)  // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = chdir(path);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = chdir(path);
 
    free(path);
    return ret;
@@ -1133,9 +1284,15 @@ Posix_Chdir(ConstUnicode pathName)  // IN:
 Unicode
 Posix_RealPath(ConstUnicode pathName)  // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   char *path;
    char rpath[PATH_MAX];
-   char *p = realpath(path, rpath);
+   char *p;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return NULL;
+   }
+
+   p = realpath(path, rpath);
 
    free(path);
    return p == NULL ? NULL : Unicode_Alloc(rpath, STRING_ENCODING_DEFAULT);
@@ -1162,11 +1319,15 @@ Posix_RealPath(ConstUnicode pathName)  // IN:
 Unicode
 Posix_ReadLink(ConstUnicode pathName)  // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   char *path;
    ssize_t bytes;
    Unicode result = NULL;
    char link[PATH_MAX];
 
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return NULL;
+   }
+
    bytes = readlink(path, link, sizeof link);
    ASSERT_NOT_IMPLEMENTED(bytes < (ssize_t) sizeof link);
 
@@ -1203,8 +1364,14 @@ int
 Posix_Lstat(ConstUnicode pathName,  // IN:
             struct stat *statbuf)   // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = lstat(path, statbuf);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = lstat(path, statbuf);
 
    free(path);
    return ret;
@@ -1231,8 +1398,14 @@ Posix_Lstat(ConstUnicode pathName,  // IN:
 DIR *
 Posix_OpenDir(ConstUnicode pathName)  // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   DIR *ret = opendir(path);
+   char *path;
+   DIR *ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return NULL;
+   }
+
+   ret = opendir(path);
 
    free(path);
    return ret;
@@ -1257,41 +1430,24 @@ Posix_OpenDir(ConstUnicode pathName)  // IN:
  *----------------------------------------------------------------------
  */
 
-static void
-PosixEnvFree(void *v)  // IN:
-{
-   Unicode_Free((Unicode) v);
-}
-
 Unicode
 Posix_Getenv(ConstUnicode name)  // IN:
 {
-   char *rawData;
    char *rawName;
-   Unicode newValue;
-   HashTable *posixHashTable;
-
-   static Atomic_Ptr posixEnvPtr; // Implicitly initialized to NULL. --mbellon
+   char *rawValue;
 
-   posixHashTable = HashTable_AllocOnce(&posixEnvPtr, 128,
-                                        HASH_FLAG_ATOMIC | HASH_STRING_KEY,
-                                        PosixEnvFree);
-
-   rawName = Unicode_GetAllocBytes(name, STRING_ENCODING_DEFAULT);
-   rawData = getenv(rawName);
-   free(rawName);
-
-   if (rawData == NULL) {
-     return NULL;
+   if (!PosixConvertToCurrent(name, &rawName)) {
+      return NULL;
    }
+   rawValue = getenv(rawName);
+   free(rawName);
 
-   newValue = Unicode_Alloc(rawData, STRING_ENCODING_DEFAULT);
-
-   if (newValue != NULL) {
-      HashTable_ReplaceOrInsert(posixHashTable, name, newValue);
+   if (rawValue == NULL) {
+      return NULL;
    }
 
-   return newValue;
+   return PosixGetenvHash(name, Unicode_Alloc(rawValue,
+                                             STRING_ENCODING_DEFAULT));
 }
 
 
@@ -1343,7 +1499,9 @@ Posix_Getpwnam(ConstUnicode name)  // IN:
    struct passwd *pw;
    char *tmpname;
 
-   tmpname = Unicode_GetAllocBytes(name, STRING_ENCODING_DEFAULT);
+   if (!PosixConvertToCurrent(name, &tmpname)) {
+      return NULL;
+   }
    pw = getpwnam(tmpname);
    free(tmpname);
 
@@ -1492,8 +1650,14 @@ int
 Posix_Statfs(ConstUnicode pathName,     // IN:
              struct statfs *statfsbuf)  // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
-   int ret = statfs(path, statfsbuf);
+   char *path;
+   int ret;
+
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return -1;
+   }
+
+   ret = statfs(path, statfsbuf);
 
    free(path);
    return ret;
@@ -1522,19 +1686,53 @@ Posix_Setenv(ConstUnicode name,   // IN:
              ConstUnicode value,  // IN:
              int overWrite)       // IN:
 {
-   int res;
-   char *rawData;
-   char *rawName;
+   int ret = -1;
+   char *rawName = NULL;
+   char *rawValue = NULL;
 
-   rawData = Unicode_GetAllocBytes(value, STRING_ENCODING_DEFAULT);
-   rawName = Unicode_GetAllocBytes(name, STRING_ENCODING_DEFAULT);
+   if (!PosixConvertToCurrent(name, &rawName)) {
+      goto exit;
+   }
+   if (!PosixConvertToCurrent(value, &rawValue)) {
+      goto exit;
+   }
 
-   res = setenv(rawName, rawData, overWrite);
+   ret = setenv(rawName, rawValue, overWrite);
 
-   free(rawData);
+exit:
    free(rawName);
+   free(rawValue);
+   return ret;
+}
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Posix_Unsetenv --
+ *
+ *      POSIX unsetenv().
+ *
+ * Results:
+ *      None.
+ *
+ * Side effects:
+ *      Environment may be changed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Posix_Unsetenv(ConstUnicode name)   // IN:
+{
+   char *rawName;
+
+   if (!PosixConvertToCurrent(name, &rawName)) {
+      return;
+   }
 
-   return res;
+   unsetenv(rawName);
+   free(rawName);
 }
 
 
@@ -1590,11 +1788,22 @@ Posix_Getpwnam_r(ConstUnicode name,    // IN:
    int ret;
    char *tmpname;
 
-   tmpname = Unicode_GetAllocBytes(name, STRING_ENCODING_DEFAULT);
+   if (!PosixConvertToCurrent(name, &tmpname)) {
+      /*
+       * Act like nonexistent user, almost.
+       * While getpwnam_r() returns 0 on nonexistent user,
+       * we will return the errno instead.
+       */
+
+      *ppw = NULL;
+      return errno;
+   }
+
    ret = getpwnam_r(tmpname, pw, buf, size, ppw);
    free(tmpname);
 
-   if (ret != 0) {
+   // ret is errno on failure, *ppw is NULL if no matching entry found.
+   if (ret != 0 || *ppw == NULL) {
       return ret;
    }
 
@@ -1629,7 +1838,8 @@ Posix_Getpwuid_r(uid_t uid,            // IN:
    int ret;
 
    ret = getpwuid_r(uid, pw, buf, size, ppw);
-   if (ret != 0) {
+   // ret is errno on failure, *ppw is NULL if no matching entry found.
+   if (ret != 0 || *ppw == NULL) {
       return ret;
    }
 
@@ -1788,9 +1998,34 @@ Posix_GetGroupList(ConstUnicode user,    // IN:
                    gid_t *groups,        // OUT:
                    int *ngroups)         // IN/OUT:
 {
-   char *tmpuser = Unicode_GetAllocBytes(user, STRING_ENCODING_DEFAULT);
+   char *tmpuser;
+   int ret;
+
+   if (!PosixConvertToCurrent(user, &tmpuser)) {
+      /*
+       * Act like nonexistent user.
+       * The supplied gid is always returned, so there's exactly
+       * one group.
+       * While the man page doesn't say, the return value is
+       * the same as *ngroups in the success case.
+       *
+       * Should we always return -1 instead?
+       *
+       * -- edward
+       */
+
+      int n = *ngroups;
 
-   int ret = getgrouplist(tmpuser, group, groups, ngroups);
+      *ngroups = 1;
+      if (n < 1) {
+        return -1;
+      }
+      ASSERT(groups != NULL);
+      *groups = group;
+      return 1;
+   }
+
+   ret = getgrouplist(tmpuser, group, groups, ngroups);
 
    free(tmpuser);
    return ret;
@@ -1816,10 +2051,12 @@ Posix_Getgrnam(ConstUnicode name)  // IN:
 {
    struct group *gr;
    char *tmpname;
-   int ret, i;
+   int ret;
    static struct group sgr = {0};
    
-   tmpname = Unicode_GetAllocBytes(name, STRING_ENCODING_DEFAULT);
+   if (!PosixConvertToCurrent(name, &tmpname)) {
+      return NULL;
+   }
    gr = getgrnam(tmpname);
    free(tmpname);
    
@@ -1832,11 +2069,10 @@ Posix_Getgrnam(ConstUnicode name)  // IN:
    sgr.gr_name = NULL;
    free(sgr.gr_passwd);
    sgr.gr_passwd = NULL;
-   for (i = 0; sgr.gr_mem[i]; i++) {
-      free(sgr.gr_mem[i]);
+   if (sgr.gr_mem != NULL) {
+      Unicode_FreeList(sgr.gr_mem, -1);
+      sgr.gr_mem = NULL;
    }
-   free(sgr.gr_mem);
-   sgr.gr_mem = NULL;
 
    /* Fill out structure with new values. */
    sgr.gr_gid = gr->gr_gid;
@@ -1851,8 +2087,7 @@ Posix_Getgrnam(ConstUnicode name)  // IN:
       goto exit;
    }
    if (gr->gr_mem) {
-      sgr.gr_mem = Unicode_GetAllocList(gr->gr_mem, -1, 
-                                        STRING_ENCODING_DEFAULT);
+      sgr.gr_mem = Unicode_AllocList(gr->gr_mem, -1, STRING_ENCODING_DEFAULT);
    }
    
    ret = 0;
@@ -1898,11 +2133,22 @@ Posix_Getgrnam_r(ConstUnicode name,    // IN:
    char **grmem = NULL;
    size_t n;
 
-   tmpname = Unicode_GetAllocBytes(name, STRING_ENCODING_DEFAULT);
+   if (!PosixConvertToCurrent(name, &tmpname)) {
+      /*
+       * Act like nonexistent group, almost.
+       * While getgrnam_r() returns 0 on nonexistent group,
+       * we will return the errno instead.
+       */
+
+      *pgr = NULL;
+      return errno;
+   }
+
    ret = getgrnam_r(tmpname, gr, buf, size, pgr);
    free(tmpname);
 
-   if (ret != 0) {
+   // ret is errno on failure, *pgr is NULL if no matching entry found.
+   if (ret != 0 || *pgr == NULL) {
       return ret;
    }
 
@@ -1927,8 +2173,7 @@ Posix_Getgrnam_r(ConstUnicode name,    // IN:
       goto exit;
    }
    if (gr->gr_mem) {
-      grmem = Unicode_GetAllocList(gr->gr_mem, -1,
-                                   STRING_ENCODING_DEFAULT);
+      grmem = Unicode_AllocList(gr->gr_mem, -1, STRING_ENCODING_DEFAULT);
    }
    
    /*
@@ -1973,7 +2218,7 @@ Posix_Getgrnam_r(ConstUnicode name,    // IN:
    free(grpasswd);
    free(grname);
    if (grmem) {
-      Util_FreeStringList(grmem, -1);
+      Unicode_FreeList(grmem, -1);
    }
    return ret;
 }
@@ -2004,11 +2249,20 @@ Posix_Mount(ConstUnicode source,             // IN:
             unsigned long mountflags,        // IN:
             const void *data)                // IN:
 {
-   char *tmpsource = Unicode_GetAllocBytes(source, STRING_ENCODING_DEFAULT);
-   char *tmptarget = Unicode_GetAllocBytes(target, STRING_ENCODING_DEFAULT);
+   int ret = -1;
+   char *tmpsource = NULL;
+   char *tmptarget = NULL;
 
-   int ret = mount(tmpsource, tmptarget, filesystemtype, mountflags, data);
+   if (!PosixConvertToCurrent(source, &tmpsource)) {
+      goto exit;
+   }
+   if (!PosixConvertToCurrent(target, &tmptarget)) {
+      goto exit;
+   }
 
+   ret = mount(tmpsource, tmptarget, filesystemtype, mountflags, data);
+
+exit:
    free(tmpsource);
    free(tmptarget);
    return ret;
@@ -2035,9 +2289,14 @@ Posix_Mount(ConstUnicode source,             // IN:
 int
 Posix_Umount(ConstUnicode target)             // IN:
 {
-   char *tmptarget = Unicode_GetAllocBytes(target, STRING_ENCODING_DEFAULT);
+   char *tmptarget;
+   int ret;
 
-   int ret = umount(tmptarget);
+   if (!PosixConvertToCurrent(target, &tmptarget)) {
+      return -1;
+   }
+
+   ret = umount(tmptarget);
 
    free(tmptarget);
    return ret;
@@ -2065,11 +2324,15 @@ FILE *
 Posix_Setmntent(ConstUnicode pathName, // IN:
                 const char *mode)      // IN:
 {
-   char *path = Unicode_GetAllocBytes(pathName, STRING_ENCODING_DEFAULT);
+   char *path;
    FILE *stream;
 
    ASSERT(mode != NULL);
 
+   if (!PosixConvertToCurrent(pathName, &path)) {
+      return NULL;
+   }
+
    stream = setmntent(path, mode);
 
    free(path);
@@ -2229,7 +2492,7 @@ Posix_Getmntent_r(FILE *fp,          // IN:
 
    if (type) {
       int len = strlen(type) + 1;
-      if (n + len > size || n + len < size) {
+      if (n + len > size || n + len < n) {
          goto exit;
       }
       m->mnt_type = memcpy(buf + n, type, len);
@@ -2238,7 +2501,7 @@ Posix_Getmntent_r(FILE *fp,          // IN:
 
    if (opts) {
       size_t len = strlen(opts) + 1;
-      if (n + len > size || n + len < size) {
+      if (n + len > size || n + len < n) {
          goto exit;
       }
       m->mnt_opts = memcpy(buf + n, opts, len);
index 992a045d4a021d2782a4c014bff8c12af0834899..407810a18c073c9b015083bda07b0e1e36275601 100644 (file)
 #include <stdarg.h>
 
 #include "vmware.h"
-#include "posix.h"
-#include "str.h"
-#include "hashTable.h"
-#include "vm_atomic.h"
-#include "unicode.h"
+#include "posixInt.h"
+#include "win32u.h"
 
 
 /*
@@ -61,6 +58,8 @@ Posix_Open(ConstUnicode pathName,  // IN:
    mode_t mode = 0;
    int fd;
 
+   WIN32U_CHECK_LONGPATH(path, fd = -1, exit);
+
    if ((flags & O_CREAT) != 0) {
       va_list a;
       va_start(a, flags);
@@ -70,6 +69,7 @@ Posix_Open(ConstUnicode pathName,  // IN:
 
    fd = _wopen(path, flags, mode);
 
+  exit:
    UNICODE_RELEASE_UTF16(path);
    return fd;
 }
@@ -121,17 +121,19 @@ FILE *
 Posix_Fopen(ConstUnicode pathName,  // IN:
             const char *mode)       // IN:
 {
-   const utf16_t *path;
-   const utf16_t *modeString;
+   const utf16_t *path = NULL;
+   const utf16_t *modeString = NULL;
    FILE *stream;
 
    ASSERT(mode);
 
    path = UNICODE_GET_UTF16(pathName);
+   WIN32U_CHECK_LONGPATH(path, stream = NULL, exit);
    modeString = UNICODE_GET_UTF16(mode);
 
    stream = _wfopen(path, modeString);
 
+  exit:
    UNICODE_RELEASE_UTF16(path);
    UNICODE_RELEASE_UTF16(modeString);
    return stream;
@@ -159,17 +161,19 @@ FILE *
 Posix_Popen(ConstUnicode pathName,  // IN:
             const char *mode)       // IN:
 {
-   const utf16_t *path;
-   const utf16_t *modeString;
+   const utf16_t *path = NULL;
+   const utf16_t *modeString = NULL;
    FILE *stream;
 
    ASSERT(mode);
 
    path = UNICODE_GET_UTF16(pathName);
+   WIN32U_CHECK_LONGPATH(path, stream = NULL, exit);
    modeString = UNICODE_GET_UTF16(mode);
 
    stream = _wpopen(path, modeString);
 
+  exit:
    UNICODE_RELEASE_UTF16(path);
    UNICODE_RELEASE_UTF16(modeString);
    return stream;
@@ -197,8 +201,12 @@ int
 Posix_Chdir(ConstUnicode pathName)  // IN:
 {
    const utf16_t *path = UNICODE_GET_UTF16(pathName);
-   int result = _wchdir(path);
+   int result;
+
+   WIN32U_CHECK_LONGPATH(path, result = -1, exit);
+   result = _wchdir(path);
 
+  exit:
    UNICODE_RELEASE_UTF16(path);
    return result;
 }
@@ -226,8 +234,12 @@ Posix_Mkdir(ConstUnicode pathName,  // IN:
             mode_t mode)            // IN:
 {
    const utf16_t *path = UNICODE_GET_UTF16(pathName);
-   int result = _wmkdir(path);
+   int result;
+
+   WIN32U_CHECK_LONGPATH(path, result = -1, exit);
+   result = _wmkdir(path);
 
+  exit:
    UNICODE_RELEASE_UTF16(path);
    return result;
 }
@@ -256,7 +268,12 @@ Posix_Stat(ConstUnicode pathName,  // IN:
 {
    struct _stat _statbuf;
    const utf16_t *path = UNICODE_GET_UTF16(pathName);
-   int ret = _wstat(path, &_statbuf);
+   int ret;
+
+   WIN32U_CHECK_LONGPATH(path, ret = -1, exit);
+   ret = _wstat(path, &_statbuf);
+
+  exit:
    UNICODE_RELEASE_UTF16(path);
 
    if (ret == 0) {
@@ -300,8 +317,14 @@ Posix_Rename(ConstUnicode fromPathName,  // IN:
 {
    utf16_t *fromPath = UNICODE_GET_UTF16(fromPathName);
    utf16_t *toPath = UNICODE_GET_UTF16(toPathName);
-   int result = _wrename(fromPath, toPath);
+   int result;
+
+   WIN32U_CHECK_LONGPATH(fromPath, result = -1, exit);
+   WIN32U_CHECK_LONGPATH(toPath, result = -1, exit);
+
+   result =  _wrename(fromPath, toPath);
 
+  exit:
    UNICODE_RELEASE_UTF16(fromPath);
    UNICODE_RELEASE_UTF16(toPath);
    return result;
@@ -329,8 +352,12 @@ int
 Posix_Unlink(ConstUnicode pathName)  // IN:
 {
    const utf16_t *path = UNICODE_GET_UTF16(pathName);
-   int result = _wunlink(path);
+   int result;
 
+   WIN32U_CHECK_LONGPATH(path, result = -1, exit);
+   result = _wunlink(path);
+
+  exit:
    UNICODE_RELEASE_UTF16(path);
    return result;
 }
@@ -357,8 +384,12 @@ int
 Posix_Rmdir(ConstUnicode pathName)  // IN:
 {
    const utf16_t *path = UNICODE_GET_UTF16(pathName);
-   int result = _wrmdir(path);
+   int result;
+
+   WIN32U_CHECK_LONGPATH(path, result = -1, exit);
+   result = _wrmdir(path);
 
+  exit:
    UNICODE_RELEASE_UTF16(path);
    return result;
 }
@@ -386,8 +417,12 @@ Posix_Chmod(ConstUnicode pathName,  // IN:
             mode_t mode)            // IN:
 {
    const utf16_t *path = UNICODE_GET_UTF16(pathName);
-   int result = _wchmod(path, mode);
+   int result;
+
+   WIN32U_CHECK_LONGPATH(path, result = -1, exit);
+   result = _wchmod(path, mode);
 
+  exit:
    UNICODE_RELEASE_UTF16(path);
    return result;
 }
@@ -420,10 +455,12 @@ Posix_Freopen(ConstUnicode pathName,  // IN:
    FILE *stream;
 
    path = UNICODE_GET_UTF16(pathName);
+   WIN32U_CHECK_LONGPATH(path, stream = NULL, exit);
    modeString = UNICODE_GET_UTF16(mode);
 
    stream = _wfreopen(path, modeString, input_stream);
 
+  exit:
    UNICODE_RELEASE_UTF16(path);
    UNICODE_RELEASE_UTF16(modeString);
    return stream;
@@ -452,8 +489,12 @@ Posix_Access(ConstUnicode pathName,  // IN:
              int mode)               // IN:
 {
    utf16_t *path = UNICODE_GET_UTF16(pathName);
-   int ret = _waccess(path, mode);
+   int ret;
 
+   WIN32U_CHECK_LONGPATH(path, ret = -1, exit);
+   ret = _waccess(path, mode);
+
+  exit:
    UNICODE_RELEASE_UTF16(path);
    return ret;
 }
@@ -486,12 +527,14 @@ Posix_Execl(ConstUnicode pathName,   // IN:
    va_list vl;
    int i, count = 0;
 
+   WIN32U_CHECK_LONGPATH(path, ret = -1, exit);
+
    if (arg0) {
       count = 1;
       va_start(vl, arg0);
       while(va_arg(vl, utf16_t *)) {
          count ++;
-      }   
+      }
       va_end(vl);
    }
 
@@ -551,6 +594,8 @@ Posix_Execv(ConstUnicode pathName,        // IN:
    utf16_t **argv = NULL;
    int i, count = 0;
 
+   WIN32U_CHECK_LONGPATH(path, ret = -1, exit);
+
    if (argVal) {
       while (argVal[count]) {
          count++;
@@ -607,6 +652,8 @@ Posix_Execvp(ConstUnicode fileName,        // IN:
    utf16_t **argv = NULL;
    int i, count = 0;
 
+   WIN32U_CHECK_LONGPATH(file, ret = -1, exit);
+
    if (argVal) {
       while (argVal[count]) {
          count++;
@@ -655,39 +702,19 @@ exit:
  *----------------------------------------------------------------------
  */
 
-static void
-PosixEnvFree(void *v)  // IN:
-{
-   Unicode_Free((Unicode) v);
-}
-
 Unicode
 Posix_Getenv(ConstUnicode name)  // IN:
 {
-   utf16_t *rawData;
    utf16_t *rawName;
-   Unicode newValue;
-   HashTable *posixHashTable;
-
-   static Atomic_Ptr posixEnvPtr; // Implicitly initialized to NULL. --mbellon
-
-   posixHashTable = HashTable_AllocOnce(&posixEnvPtr, 128,
-                                        HASH_FLAG_ATOMIC | HASH_STRING_KEY,
-                                        PosixEnvFree);
+   utf16_t *rawValue;
 
    rawName = UNICODE_GET_UTF16(name);
-   rawData = _wgetenv(rawName);
+   rawValue = _wgetenv(rawName);
    UNICODE_RELEASE_UTF16(rawName);
 
-   if (rawData == NULL) {
-     return NULL;
-   }
-
-   newValue = Unicode_AllocWithUTF16(rawData);
-
-   if (newValue != NULL) {
-      HashTable_ReplaceOrInsert(posixHashTable, name, newValue);
+   if (rawValue == NULL) {
+      return NULL;
    }
 
-   return newValue;
+   return PosixGetenvHash(name, Unicode_AllocWithUTF16(rawValue));
 }
index fe7b122e0be2eef0934c307e7abacf89f1a30711..710b25e32e170bae9b83922cd4015204ef61a8bf 100644 (file)
@@ -149,6 +149,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -157,6 +158,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -165,6 +167,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index f97b69e14711adc093053f88aa78e374ae1327a6..870e21c327d0612bf49b7ddba5a763950ffd4549 100644 (file)
@@ -41,6 +41,9 @@
 #include "timeutil.h"
 #include "str.h"
 #include "util.h"
+#ifdef _WIN32
+#include "win32u.h"
+#endif
 
 /*
  * NT time of the Unix epoch:
@@ -449,8 +452,8 @@ TimeUtil_GetTimeFormat(int64 utcTime,  // IN
 {
 #ifdef _WIN32
    SYSTEMTIME systemTime = { 0 };
-   TCHAR dateStr[100];
-   TCHAR timeStr[100];
+   char dateStr[100] = "";
+   char timeStr[100] = "";
 
    if (!showDate && !showTime) {
       return NULL;
@@ -460,11 +463,11 @@ TimeUtil_GetTimeFormat(int64 utcTime,  // IN
       return NULL;
    }
 
-   GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE,
-                 &systemTime, NULL, dateStr, ARRAYSIZE(dateStr));
+   Win32U_GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE,
+                        &systemTime, NULL, dateStr, ARRAYSIZE(dateStr));
 
-   GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systemTime, NULL,
-                 timeStr, ARRAYSIZE(timeStr));
+   Win32U_GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systemTime, NULL,
+                        timeStr, ARRAYSIZE(timeStr));
 
    if (showDate && showTime) {
       return Str_Asprintf(NULL, "%s %s", dateStr, timeStr);
index 1bf28ae2ded2a3bfdd9222ed64832394aa7e7371..b1ee527a1f4fe3b6be2908905ebc11b1995111fd 100644 (file)
@@ -443,7 +443,7 @@ pid_t gettid(void)
  *-----------------------------------------------------------------------------
  */
 
-uintptr_t
+Util_ThreadID
 Util_GetCurrentThreadId(void)
 {
 #if defined(linux)
@@ -460,32 +460,32 @@ Util_GetCurrentThreadId(void)
    // ESX with userworld VMX
 #if defined(VMX86_SERVER)
    if (HostType_OSIsVMK()) {
-      return (uintptr_t)User_GetTid();
+      return User_GetTid();
    }
 #endif
 
    if (useTid) {
       tid = gettid();
       if (tid != (pid_t)-1) {
-         return (uintptr_t)tid;
+         return tid;
       }
       ASSERT(errno == ENOSYS);
       useTid = 0;
    }
    tid = getpid();
    ASSERT(tid != (pid_t)-1);
-   return (uintptr_t)tid;
+   return tid;
 #elif defined(sun)
    pid_t tid;
 
    tid = getpid();
    ASSERT(tid != (pid_t)-1);
-   return (uintptr_t)tid;
+   return tid;
 #elif defined(__APPLE__) || defined(__FreeBSD__)
-   ASSERT_ON_COMPILE(sizeof(uintptr_t) == sizeof(pthread_t));
-   return (uintptr_t)pthread_self();
+   ASSERT_ON_COMPILE(sizeof(Util_ThreadID) == sizeof(pthread_t));
+   return pthread_self();
 #elif defined(_WIN32)
-   return (uintptr_t)GetCurrentThreadId();
+   return GetCurrentThreadId();
 #else
 #error "Unknown platform"
 #endif
index 4417680a2186e4a382ccb033482b4e483139485f..5fdd4b82a23c39c1c9c322708c3f595dec9e0c96 100644 (file)
  *      The fgets() API is poorly designed: it doesn't return how many bytes
  *      were written to the buffer. Hence this function --hpreg
  *
+ *      In addition, this function recognizes three variants of end-of-line
+ *      markers regardless of the platform: \n, \r\n and \r.  The exception
+ *      is that on Windows, \r\n is recognized only if the file is opened
+ *      in text mode.  In binary mode, the \r and \n are interpreted as two
+ *      separate end-of-line markers.
+ *
+ *      As input, *count is the size of bufIn.
+ *
  * Results:
- *      Like fgets(). On success, '*count' is the number of bytes written to the
- *      buffer (excluding the NUL terminator)
+ *      It returns bufIn on success and NULL on error.  The line terminator
+ *      and NUL terminator are not stored in bufIn.  On success, '*count' is
+ *      the number of bytes written to the buffer.
  *    
  * Side effects:
- *      None
+ *      If the line read is terminated by a standalone '\r' (legacy Mac), the
+ *      next character is pushed back using ungetc.  Thus, that character may
+ *      be lost if the caller performs any write operation on the stream
+ *      (including fseek, fflush, etc.) subsequently without an intervening
+ *      read operation.
  *
  *-----------------------------------------------------------------------------
  */
 
 static void *
 SuperFgets(FILE *stream,        // IN
-           void *bufIn,         // OUT
-           size_t *count)       // IN/OUT
+           size_t *count,       // IN/OUT
+           void *bufIn)         // OUT
 {
-   char *buf;
-
-   /*
-    * To compute how many bytes were written to the buffer, we fill our buffer
-    * with non-NUL bytes prior to calling fgets(). Consequently, after calling
-    * fgets(), the only NUL bytes that are in the buffer are:
-    * . those that were read from the stream
-    * . the one added by fgets() after all the other bytes that were read
-    *   from the stream
-    * So all we need to do is locate the last NUL byte in the buffer.
-    *
-    * Note that this may not work if your implementation of fgets() does funny
-    * things (which is unlikely) like writing to buffer positions beyond the
-    * terminating NUL byte --hpreg
-    */
+   char *buf = (char *)bufIn;
+   size_t size = 0;
 
    ASSERT(stream);
-   buf = (char *)bufIn;
    ASSERT(buf);
    ASSERT(count);
    ASSERT(*count);
 
-   memset(buf, '\0' - 1, *count);
-
    /*
-    * In the end of stream case, glibc's fgets() returns NULL but does not set
-    * errno --hpreg
+    * Keep reading until a line terminator is found or *count is reached.
+    * The line terminator itself is not written into the buffer.
+    * Clear errno so that we can distinguish between end-of-file and error.
     */
+
    errno = 0;
-   if (fgets(buf, *count, stream) == NULL) {
-      if (errno) {
-         return NULL;
+
+   for (size = 0; size < *count; size++) {
+      int c;
+
+      c = getc(stream);
+
+      if (c == EOF) {
+         if (errno) {
+            /* getc returned an error. */
+            return NULL;
+         } else {
+            /* Found an end-of-file line terminator. */
+            break;
+         }
+      }
+
+      if (c == '\n') {
+         /* Found a Unix line terminator */
+         break;
+      }
+      
+      if (c == '\r') {
+
+#ifndef _WIN32
+         /* 
+          * Look ahead to see if it is a \r\n line terminator.
+          * On Windows platform, getc() returns one '\n' for a \r\n two-byte
+          * sequence (for files opened in text mode), so we can skip the
+          * look-ahead.
+          */
+
+         c = getc(stream);
+         if (c != EOF && c != '\n') {
+            /* Found a legacy Mac line terminator */
+
+            if (ungetc(c, stream) == EOF) {
+               return NULL;
+            }
+         }
+
+         /* Forget that we peeked. */
+         clearerr(stream);
+#endif
+
+         break;
       }
 
-      /* End of stream and no byte was written --hpreg */
-      *count = 0;
-      return NULL;
+      buf[size] = c;
    }
 
-   do {
-      (*count)--;
-   } while (buf[*count] != '\0');
+   *count = size;
 
    return buf;
 }
@@ -111,11 +148,17 @@ SuperFgets(FILE *stream,        // IN
  *
  *      A line is defined as an arbitrary long sequence of arbitrary bytes, that
  *      ends with the first occurrence of one of these line terminators:
- *      . \r\n          (the ANSI way)
+ *      . \r\n          (the ANSI way, in text mode)
  *      . \n            (the UNIX way)
+ *      . \r            (the Legacy Mac (pre-OS X) way)
  *      . end-of-stream
  *
- *     If maxBufLength is non-zero at most maxBufLength bytes will be allocated.
+ *      Note that on Windows, getc() returns one '\n' for a \r\n two-byte
+ *      sequence only if the file is opened in text mode.  Therefore \r\r\n
+ *      will be interpreted as two newlines in text mode ('\r' followed by
+ *      '\r\n'), but three newlines in binary mode ('\r', '\r', '\n').
+ *
+ *      If maxBufLength is non-zero at most maxBufLength bytes will be allocated.
  *
  * Results:
  *      StdIO_Success on success: '*buf' is an allocated, NUL terminated buffer
@@ -127,7 +170,11 @@ SuperFgets(FILE *stream,        // IN
  *      StdIO_Error on failure: errno is set accordingly
  *
  * Side effects:
- *      None
+ *      If the line read is terminated by a standalone '\r' (legacy Mac), the
+ *      next character is pushed back using ungetc.  Thus, that character may
+ *      be lost if the caller performs any write operation on the stream
+ *      (including fseek, fflush, etc.) subsequently without an intervening
+ *      read operation.
  *
  *-----------------------------------------------------------------------------
  */
@@ -148,6 +195,7 @@ StdIO_ReadNextLine(FILE *stream,         // IN
    for (;;) {
       char *data;
       size_t size;
+      size_t max;
       size_t nr;
 
       /*
@@ -169,64 +217,39 @@ StdIO_ReadNextLine(FILE *stream,         // IN
          goto error;
       }
 
-      nr = DynBuf_GetAllocatedSize(&b) - size;
-      /*
-       * XXX SuperFgets() is such a hack that I may replace it soon with a more
-       *     reliable fgetc() loop --hpreg
-       */
-      if (SuperFgets(stream, data + size, &nr) == NULL) {
-         if (errno) {
-            goto error;
-         }
-
-         /* End of stream: there is no next chunk of line --hpreg */
-         ASSERT(nr == 0);
-
-         if (size) {
-            /* Found an end-of-stream line terminator --hpreg */
-            break;
-         }
-
-         DynBuf_Destroy(&b);
+      max = DynBuf_GetAllocatedSize(&b);
+      nr = max - size;
 
-         return StdIO_EOF;
+      if (SuperFgets(stream, &nr, data + size) == NULL) {
+         goto error;
       }
-      /*
-       * fgets() wrote at least 1 stream byte, and NUL terminated the dynamic
-       * buffer --hpreg
-       */
-      ASSERT(nr);
+
       size += nr;
+      DynBuf_SetSize(&b, size);
 
-      if (data[size - 1] == '\n') {
-         /* Found a Unix or ANSI line terminator --hpreg */
-         size--;
+      if (size < max) {
+         /* SuperFgets() found end-of-line */
 
-/* Win32 takes care of this in fgets() --hpreg */
-#if !defined(_WIN32)
-         if (size && data[size - 1] == '\r') {
-            /* Found an ANSI line terminator --hpreg */
-            size--;
+         if (size == 0 && feof(stream)) {
+            /* Reached end-of-file before reading anything */
+            DynBuf_Destroy(&b);
+            return StdIO_EOF;
          }
-#endif
 
-         /* Remove the line terminator from the dynamic buffer --hpreg */
-         DynBuf_SetSize(&b, size);
          break;
       }
 
       /*
        * No line terminator found yet, we need a larger buffer to do the next
-       * fgets() --hpreg
+       * SuperFgets() --hpreg
        */
-      DynBuf_SetSize(&b, size);
+
    }
 
    /* There is a line in the buffer --hpreg */
 
-   if (   /* NUL terminator --hpreg */
-          DynBuf_Append(&b, "", 1) == FALSE
-       || DynBuf_Trim(&b) == FALSE) {
+   /* NUL terminator --hpreg */
+   if (DynBuf_Append(&b, "", 1) == FALSE) {
       errno = ENOMEM;
       goto error;
    }
index fa001c3cee010b75b73af71b594ff144486de8fd..a95a0d5619ec74aac1ca4ebaa813bb8792a74e84 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 29d89c6213f8dbde509c1e99e83acbc0c982e075..4129fbc52d2228c4a4486ebc6d19a634beb3444e 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 0ce6598c619ab556dc437f82725afd77782c07dd..b779162eb500596d29866f2b3d0fc2bc62374e78 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 2df0361b23e0788e797cfccf0ac98ee46d88b989..4f6ff0018bf2b319ebfe5e31074c19bd1cbf87c9 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 73dbb1d9fdada68910d9fc3481afa053ab775643..2eb810ba82748c6d43afccb66775075fe78623a8 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 241362807f49ed559438d961729f53753d87ba76..4c6eb8626cee92d5f7c7addb03757ae4968a4fce 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index a64d7b77c71c89e8ae0ead6ec0f283b90ebaa7ab..36e45bad6280c42e6ff9e4585d48c40cdf7e4351 100644 (file)
@@ -151,6 +151,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -159,6 +160,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -167,6 +169,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 2a6bc5b005b0cb687c4a3b0fd34a7e290c4aa3b5..63930ec8a2b2443b673fdb3b75b91d6e23091b37 100644 (file)
@@ -293,10 +293,13 @@ RpcOut_sendOne(char **reply,        // OUT: Result
    }
 
    /*
-    * If the command doesn't contain a space, add one to the
-    * end to maintain compatibility with old VMXs.
+    * If the command doesn't contain a space, add one to the end to maintain
+    * compatibility with old VMXs.
     *
-    * XXX Do we still need to bother with this?
+    * For a long time, the GuestRpc logic in the VMX was wired to expect a
+    * trailing space in every command, even commands without arguments. That is
+    * no longer true, but we must continue to add a trailing space because we
+    * don't know whether we're talking to an old or new VMX.
     */
    if (strchr(request, ' ') == NULL) {
       char *tmp;
@@ -346,7 +349,8 @@ RpcOut_sendOne(char **reply,        // OUT: Result
  *    varargs.
  *
  *    Note: It is the caller's responsibility to ensure that the RPCI command
- *          followed by a space appear at the start of the request buffer.
+ *          followed by a space appear at the start of the request buffer. See
+ *          the command in RpcOut_sendOne for details.
  *
  * Return value:
  *    TRUE on success. '*reply' contains an allocated result of the rpc
index 48498a78bf91078ea730202fc9e5bd157c21e22c..d56e41eecde9f31a51f34db8e99ed54171b517dc 100644 (file)
@@ -139,6 +139,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -147,6 +148,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -155,6 +157,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 1cb0a3be65cf45b3e0c88fd45492b73115510e02..cb13036855ede6fee47b34ec2e9c017eeab079c6 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index a28f48bc3b926f340c6f0643213c6c25e7a49e94..ceecbf2c7bb3b787146a4a9d1c7aaccd4518e645 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 8cd494a36f9d2c104a60e38a5095bfbe1dbab8dd..71b2dde442d0d7fd447d4def134058eb9067a619 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 8beb4e3065ef3c5288188b3cee45acb73e6e7dac..82ddab538a9ff97f7419bb19be54d502edfde210 100644 (file)
@@ -153,6 +153,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -161,6 +162,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -169,6 +171,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index fc67b76af2a46b187ed927b4984f4877baf9c441..b9ab445636006478fb946ae6abe243914ee38f0a 100644 (file)
@@ -140,6 +140,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -148,6 +149,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -156,6 +158,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 4bfafddffe6bda46d60d6ac8ae7ca9cf8d7fb75b..7e5007f3a9186bcad6b95376fe463e6b7f860240 100644 (file)
@@ -54,7 +54,7 @@ extern int vsnprintf(char *buf, size_t len, const char *f, va_list arg);
 /*
  *----------------------------------------------------------------------
  *
- * Str_Sprintf
+ * Str_Sprintf --
  *
  *      sprintf wrapper that fails on overflow
  *
@@ -194,7 +194,7 @@ Str_Snprintf(char *str,          // OUT
 /*
  *----------------------------------------------------------------------
  *
- * Str_Strcpy--
+ * Str_Strcpy --
  *
  *    Wrapper for strcpy that checks for buffer overruns.
  *
@@ -342,9 +342,8 @@ Str_Strncat(char *buf,       // IN-OUT
     * if possible.
     *
     * The reason the test with bufLen and n is >= rather than just >
-    * is that both the glibc and the Win32 version of strncat null-
-    * terminate the final resulting string, even if they reach the
-    * length limit n. This means that if it happens that
+    * is that strncat always NUL-terminates the resulting string, even
+    * if it reaches the length limit n. This means that if it happens that
     * bufLen + n == bufSize, strncat will write a null terminator that
     * is outside of the buffer. Therefore, we make sure this does not
     * happen by adding the == case to the Panic test.
@@ -590,7 +589,7 @@ Str_SafeVasprintf(size_t *length,       // OUT
 
 int
 Str_Swprintf(wchar_t *buf,       // OUT
-             size_t maxSize,     // IN
+             size_t maxSize,     // IN: Size of buf, in wide-characters.
              const wchar_t *fmt, // IN
              ...)                // IN
 {
@@ -631,7 +630,7 @@ Str_Swprintf(wchar_t *buf,       // OUT
 
 int
 Str_Vsnwprintf(wchar_t *str,          // OUT
-               size_t size,           // IN
+               size_t size,           // IN: Size of str, in wide-characters.
                const wchar_t *format, // IN
                va_list ap)            // IN
 {
@@ -696,7 +695,7 @@ Str_Vsnwprintf(wchar_t *str,          // OUT
 
 int      
 Str_Snwprintf(wchar_t *str,          // OUT
-              size_t size,           // IN
+              size_t size,           // IN: Size of str, in wide-characters.
               const wchar_t *format, // IN
               ...)                   // IN
 {
@@ -713,7 +712,7 @@ Str_Snwprintf(wchar_t *str,          // OUT
 /*
  *----------------------------------------------------------------------
  *
- * Str_Wcscpy--
+ * Str_Wcscpy --
  *
  *      Wrapper for wcscpy that checks for buffer overruns.
  *
@@ -729,7 +728,7 @@ Str_Snwprintf(wchar_t *str,          // OUT
 wchar_t *
 Str_Wcscpy(wchar_t *buf,       // OUT
            const wchar_t *src, // IN
-           size_t maxSize)     // IN
+           size_t maxSize)     // IN: Size of buf, in wide-characters.
 {
    uint32 *stack = (uint32 *)&buf;
    size_t len;
@@ -762,7 +761,7 @@ Str_Wcscpy(wchar_t *buf,       // OUT
 wchar_t *
 Str_Wcscat(wchar_t *buf,       // IN-OUT
            const wchar_t *src, // IN
-           size_t maxSize)     // IN
+           size_t maxSize)     // IN: Size of buf, in wide-characters.
 {
    uint32 *stack = (uint32 *)&buf;
    size_t bufLen;
@@ -803,7 +802,7 @@ Str_Wcscat(wchar_t *buf,       // IN-OUT
 
 wchar_t *
 Str_Wcsncat(wchar_t *buf,       // IN-OUT
-            size_t bufSize,     // IN: Size of buf
+            size_t bufSize,     // IN: Size of buf, in wide-characters.
             const wchar_t *src, // IN: String to append
             size_t n)           // IN: Max chars of src to append
 {
@@ -815,9 +814,8 @@ Str_Wcsncat(wchar_t *buf,       // IN-OUT
     * if possible.
     *
     * The reason the test with bufLen and n is >= rather than just >
-    * is that both the glibc and the Win32 version of wcsncat null
-    * terminate the final resulting string, even if they reach the
-    * length limit n. This means that if it happens that
+    * is that wcsncat always NUL-terminates the resulting string, even
+    * if it reaches the length limit n. This means that if it happens that
     * bufLen + n == bufSize, wcsncat will write a null terminator that
     * is outside of the buffer. Therefore, we make sure this does not
     * happen by adding the == case to the Panic test.
@@ -840,7 +838,7 @@ Str_Wcsncat(wchar_t *buf,       // IN-OUT
 /*
  *----------------------------------------------------------------------
  *
- * Str_Mbscpy--
+ * Str_Mbscpy --
  *
  *    Wrapper for _mbscpy that checks for buffer overruns.
  *
index 7a0c9c24979a72b6974d2f8350002f7dc20c843a..1afcc6aa13a0496d9be607c02265268d8a791d3d 100644 (file)
@@ -151,6 +151,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -159,6 +160,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -167,6 +169,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 18bdce68bf12ec8342e3ba9ebe974a31ca6b99fc..231eb32dcb04f97e543711804ade1174f3987224 100644 (file)
@@ -139,6 +139,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -147,6 +148,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -155,6 +157,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 31a6a75c190842c6876c2220e032f9697172fd04..0ee830fb40aac6dbea22fafe538d72ffa32dcf98 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index b650081d1e23b02baf638f656b01d34323431694..b548d64cf4a236bf0b652fa5c975e150bc46d180 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 075aca952dbd17c2dcbf7b0d144834f1f6b487ed..8992396ab9f0d250ac1594d06af94e8ea89e989b 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 8ffb33f39568280315334efed0222e31f4ef2d22..28bb2e9665ffb088a7c4c8d1e1c7c22cf76dc234 100644 (file)
@@ -151,6 +151,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -159,6 +160,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -167,6 +169,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 3e4e4ebb1cdf34cd603f7e991ff92a7127a52378..fd575fbeb5600423f816cb8c859112bca7cb24e8 100644 (file)
@@ -78,6 +78,8 @@ Unicode_EscapeBuffer(const void *buffer,      // IN
                      ssize_t lengthInBytes,   // IN
                      StringEncoding encoding) // IN
 {
+   encoding = Unicode_ResolveEncoding(encoding);
+
    if (lengthInBytes == -1) {
       switch (encoding) {
       case STRING_ENCODING_UTF16:
@@ -137,6 +139,8 @@ UnicodeSanityCheck(const void *buffer,      // IN
                    ssize_t lengthInBytes,   // IN
                    StringEncoding encoding) // IN
 {
+   ASSERT(Unicode_IsEncodingValid(encoding));
+
    /*
     * Sanity check US-ASCII here, so we can fast-path its conversion
     * to Unicode later.
@@ -327,6 +331,8 @@ Unicode_AllocWithLength(const void *buffer,      // IN
       return NULL;
    }
 
+   encoding = Unicode_ResolveEncoding(encoding);
+
    if (UnicodeSanityCheck(buffer, lengthInBytes, encoding)) {
       Unicode result = UnicodeAllocInternal(buffer, lengthInBytes, encoding);
       if (result != NULL) {
@@ -377,9 +383,12 @@ Unicode_IsBufferValid(const void *buffer,      // IN
    Unicode result;
 
    if (buffer == NULL) {
+      ASSERT(lengthInBytes <= 0);
       return TRUE;
    }
 
+   encoding = Unicode_ResolveEncoding(encoding);
+
    if (!UnicodeSanityCheck(buffer, lengthInBytes, encoding)) {
       return FALSE;
    }
index da414d3f1b723c24caf17c0f3d6c4531f288c946..564db2b114543e035339f50e734619d6a0ad7448 100644 (file)
@@ -88,6 +88,8 @@ UnicodeAllocInternal(const void *buffer,      // IN
 
    ASSERT(buffer != NULL);
 
+   encoding = Unicode_ResolveEncoding(encoding);
+
    switch (encoding) {
    case STRING_ENCODING_US_ASCII:
       /*
@@ -225,6 +227,8 @@ Unicode_AllocList(char **srcList,          // IN: list of strings
 
    ASSERT(srcList != NULL);
 
+   encoding = Unicode_ResolveEncoding(encoding);
+
    if (length < 0) {
       length = 0;
       while (srcList[length] != NULL) {
@@ -284,7 +288,8 @@ Unicode_FreeList(Unicode *list,    // IN: the list to free
  *      NULL-terminated list (if length is negative).
  *
  * Results:
- *      An allocated list (vector) of NUL terminated buffers.
+ *      An allocated list (vector) of NUL terminated buffers,
+ *      or NULL on conversion failure.
  *      The caller is responsible to free the memory allocated by
  *      this routine.
  *
@@ -304,6 +309,8 @@ Unicode_GetAllocList(Unicode const srcList[], // IN: list of strings
 
    ASSERT(srcList != NULL);
 
+   encoding = Unicode_ResolveEncoding(encoding);
+
    if (length < 0) {
       length = 0;
       while (srcList[length] != NULL) {
@@ -318,6 +325,13 @@ Unicode_GetAllocList(Unicode const srcList[], // IN: list of strings
 
    for (i = 0; i < length; i++) {
       dstList[i] = Unicode_GetAllocBytes(srcList[i], encoding);
+      if (dstList[i] == NULL && srcList[i] != NULL) {
+        while (--i >= 0) {
+           free(dstList[i]);
+        }
+        free(dstList);
+        return NULL;
+      }
    }
 
    return dstList;
@@ -411,6 +425,8 @@ Unicode_BytesRequired(ConstUnicode str,        // IN
 
    size_t result = 0;
 
+   encoding = Unicode_ResolveEncoding(encoding);
+
    switch (encoding) {
    case STRING_ENCODING_UTF8:
       return strlen(utf8) + 1;
@@ -495,8 +511,8 @@ Unicode_BytesRequired(ConstUnicode str,        // IN
  *      maxLengthInBytes bytes in total to the buffer.
  *
  * Results:
- *      Returns FALSE if the Unicode string requires more than
- *      maxLengthInBytes bytes to be encoded in the specified
+ *     FALSE on conversion failure or if the Unicode string requires
+ *      more than maxLengthInBytes bytes to be encoded in the specified
  *      encoding, including NUL termination. (Call
  *      Unicode_BytesRequired(str, encoding) to get the correct
  *      length.). Returns TRUE if no truncation was required. In
@@ -517,9 +533,11 @@ Unicode_CopyBytes(void *destBuffer,        // OUT
                   StringEncoding encoding) // IN
 {
    const char *utf8Str = (const char *)srcBuffer;
-   Bool notTruncated = TRUE;
+   Bool success = FALSE;
    size_t copyBytes = 0;
 
+   encoding = Unicode_ResolveEncoding(encoding);
+
    switch (encoding) {
    case STRING_ENCODING_US_ASCII:
       if (!UnicodeSanityCheck(utf8Str, -1, encoding)) {
@@ -536,8 +554,9 @@ Unicode_CopyBytes(void *destBuffer,        // OUT
           * If we truncated, force a null termination in a UTF-8 safe
           * manner.
           */
-         if (copyBytes < len) {
-            notTruncated = FALSE;
+         if (copyBytes >= len) {
+           success = TRUE;
+        } else {
             if (encoding == STRING_ENCODING_UTF8) {
                copyBytes =
                   CodeSet_Utf8FindCodePointBoundary(destBuffer, copyBytes);
@@ -557,6 +576,8 @@ Unicode_CopyBytes(void *destBuffer,        // OUT
                                     strlen(utf8Str),
                                     &utf16Buf,
                                     &utf16BufLen)) {
+           // input should be valid UTF-8, no conversion error possible
+           ASSERT_MEM_ALLOC(FALSE);
             break;
          }
          copyBytes = MIN(utf16BufLen, maxLengthInBytes - 2);
@@ -565,8 +586,8 @@ Unicode_CopyBytes(void *destBuffer,        // OUT
          ((utf16_t*)destBuffer)[copyBytes / 2] = 0;
          free(utf16Buf);
 
-         if (copyBytes < utf16BufLen) {
-            notTruncated = FALSE;
+         if (copyBytes >= utf16BufLen) {
+            success = TRUE;
          }
 
          break;
@@ -580,6 +601,7 @@ Unicode_CopyBytes(void *destBuffer,        // OUT
                                       Unicode_EncodingEnumToName(encoding),
                                       CSGTG_NORMAL,
                                       &currentBuf, &currentBufSize)) {
+           // XXX can't distinguish error cause
            break;
         }
          copyBytes = MIN(currentBufSize, maxLengthInBytes - 1);
@@ -594,8 +616,8 @@ Unicode_CopyBytes(void *destBuffer,        // OUT
 
          ((char*)destBuffer)[copyBytes] = 0;
 
-         if (copyBytes < currentBufSize) {
-            notTruncated = FALSE;
+         if (copyBytes >= currentBufSize) {
+            success = TRUE;
          }
       }
       break;
@@ -604,7 +626,7 @@ Unicode_CopyBytes(void *destBuffer,        // OUT
    if (retLength) {
       *retLength = copyBytes;
    }
-   return notTruncated;
+   return success;
 }
 
 
@@ -622,8 +644,9 @@ Unicode_CopyBytes(void *destBuffer,        // OUT
  *      NULL is returned for NULL argument.
  *
  * Results:
- *      Pointer to the dynamically allocated memory,
- *      or NULL on NULL argument.
+ *      NULL if argument is NULL.
+ *      Otherwise, pointer to the dynamically allocated memory
+ *      or NULL on conversion failure.
  *      The caller is responsible to free the memory allocated
  *      by this routine.
  *
@@ -637,15 +660,11 @@ void *
 Unicode_GetAllocBytes(ConstUnicode str,        // IN:
                       StringEncoding encoding) // IN:
 {
-   void *result;
-
    if (str == NULL) {
       return NULL;
    }
 
-   result = UnicodeGetAllocBytesInternal(str, encoding, NULL);
-   ASSERT_NOT_IMPLEMENTED(result != NULL);
-   return result;
+   return UnicodeGetAllocBytesInternal(str, encoding, NULL);
 }
 
 
@@ -659,13 +678,13 @@ Unicode_GetAllocBytes(ConstUnicode str,        // IN:
  *
  * Results:
  *      The converted string in an allocated buffer,
- *      or NULL on conversion or memory allocation failure.
+ *      or NULL on conversion failure.
  *
  *     The length of the result (in bytes, without termination)
  *     in retLength.
  *
  * Side effects:
- *      None.
+ *      Panic on memory allocation failure.
  *
  *-----------------------------------------------------------------------------
  */
@@ -681,6 +700,8 @@ UnicodeGetAllocBytesInternal(ConstUnicode ustr,       // IN
 
    ASSERT(ustr != NULL);
 
+   encoding = Unicode_ResolveEncoding(encoding);
+
    len = strlen(utf8Str);
 
    switch (encoding) {
@@ -690,9 +711,7 @@ UnicodeGetAllocBytesInternal(ConstUnicode ustr,       // IN
       }
       // fall through
    case STRING_ENCODING_UTF8:
-      if ((result = malloc(len + 1)) == NULL) {
-        break;
-      }
+      result = Util_SafeMalloc(len + 1);
       memcpy(result, utf8Str, len + 1);
       if (retLength != NULL) {
         *retLength = len;
@@ -702,7 +721,8 @@ UnicodeGetAllocBytesInternal(ConstUnicode ustr,       // IN
    case STRING_ENCODING_UTF16:
    case STRING_ENCODING_UTF16_LE:
       if (!CodeSet_Utf8ToUtf16le(utf8Str, len, &result, retLength)) {
-        ASSERT(result == NULL);
+        // input should be valid UTF-8, no conversion error possible
+        ASSERT_MEM_ALLOC(FALSE);
       }
       break;
 
@@ -711,6 +731,7 @@ UnicodeGetAllocBytesInternal(ConstUnicode ustr,       // IN
                                    Unicode_EncodingEnumToName(encoding),
                                    CSGTG_NORMAL,
                                    &result, retLength)) {
+        // XXX can't distinguish error cause
         ASSERT(result == NULL);
       }
    }
index 694ee609670ccd62b661afbedda5a9f73d4bfcf8..2b346a4f84f4ac144e2392a711ae4c32fd484aa9 100644 (file)
@@ -42,26 +42,28 @@ static char *UnicodeNormalizeEncodingName(const char *encoding);
  * See: http://www.iana.org/assignments/character-sets
  *      http://msdn2.microsoft.com/en-us/library/ms776446(VS.85).aspx
  *
- * If you add new supported StringEncodings to this table, you must
- * keep SIMPLE_ENCODING_LIST[] (see below) and the StringEncoding
- * enum in lib/public/unicodeTypes.h in sync!
+ * If you add new StringEncodings to this table, you must keep the
+ * StringEncoding enum in lib/public/unicodeTypes.h in sync!
  */
 
 #define MAXCHARSETNAMES 12
 #define MIBUNDEF -1
 #define WINUNDEF -1
+#define SUPPORTED TRUE
+#define UNSUPPORTED FALSE
 
 static struct xRef {
    int MIBenum;                   // Assigned by IANA
    int winACP;                    // Windows code page from GetACP()
    StringEncoding encoding;       // ICU encoding enum
+   Bool isSupported;              // VMware supported encoding
    int preferredMime;             // Index of preferred MIME name 
    char *names[MAXCHARSETNAMES];  // Encoding name and aliases
 } xRef[] = {
    /*
     * Source: ECMA registry
     */
-   { 3, 20127, STRING_ENCODING_US_ASCII, 4, 
+   { 3, 20127, STRING_ENCODING_US_ASCII, SUPPORTED, 4,
       { "ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991",
         "ASCII", "ISO646-US", "US-ASCII", "us", "IBM367", "cp367", "csASCII",
          NULL }
@@ -69,83 +71,83 @@ static struct xRef {
    /*
     * Source: ECMA registry
     */
-   { 4, 28591, STRING_ENCODING_ISO_8859_1, 3,
+   { 4, 28591, STRING_ENCODING_ISO_8859_1, SUPPORTED, 3,
       { "ISO_8859-1:1987", "iso-ir-100", "ISO_8859-1", "ISO-8859-1", "latin1",
         "l1", "IBM819", "CP819", "csISOLatin1", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 5, 28592, STRING_ENCODING_ISO_8859_2, 3,
+   { 5, 28592, STRING_ENCODING_ISO_8859_2, SUPPORTED, 3,
       { "ISO_8859-2:1987", "iso-ir-101", "ISO_8859-2", "ISO-8859-2", "latin2",
         "l2", "csISOLatin2", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 6, 28593, STRING_ENCODING_ISO_8859_3, 3,
+   { 6, 28593, STRING_ENCODING_ISO_8859_3, SUPPORTED, 3,
       { "ISO_8859-3:1988", "iso-ir-109", "ISO_8859-3", "ISO-8859-3", "latin3",
         "l3", "csISOLatin3", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 7, 28594, STRING_ENCODING_ISO_8859_4, 3,
-      { "ISO_8859-4:1988", "iso-ir-110", "ISO_8859-4", "ISO-8859-4", "latin4", 
+   { 7, 28594, STRING_ENCODING_ISO_8859_4, SUPPORTED, 3,
+      { "ISO_8859-4:1988", "iso-ir-110", "ISO_8859-4", "ISO-8859-4", "latin4",
         "l4", "csISOLatin4", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 8, 28595, STRING_ENCODING_ISO_8859_5, 3, 
-      { "ISO_8859-5:1988", "iso-ir-144", "ISO_8859-5", "ISO-8859-5", "cyrillic", 
-        "csISOLatinCyrillic", NULL } 
+   { 8, 28595, STRING_ENCODING_ISO_8859_5, SUPPORTED, 3,
+      { "ISO_8859-5:1988", "iso-ir-144", "ISO_8859-5", "ISO-8859-5", "cyrillic",
+        "csISOLatinCyrillic", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 9, 28596, STRING_ENCODING_ISO_8859_6, 3, 
-      { "ISO_8859-6:1987", "iso-ir-127", "ISO_8859-6", "ISO-8859-6", "ECMA-114", 
-        "ASMO-708", "arabic", "csISOLatinArabic", NULL } 
+   { 9, 28596, STRING_ENCODING_ISO_8859_6, SUPPORTED, 3,
+      { "ISO_8859-6:1987", "iso-ir-127", "ISO_8859-6", "ISO-8859-6", "ECMA-114",
+        "ASMO-708", "arabic", "csISOLatinArabic", NULL }
    },
    /*
     * Source: Windows duplicate of ISO-8859-6
     */
-   { 9, 708, STRING_ENCODING_ISO_8859_6, 0,
+   { 9, 708, STRING_ENCODING_ISO_8859_6, SUPPORTED, 0,
       { "ASMO-708", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 10, 28597, STRING_ENCODING_ISO_8859_7, 3,
+   { 10, 28597, STRING_ENCODING_ISO_8859_7, SUPPORTED, 3,
       { "ISO_8859-7:1987", "iso-ir-126", "ISO_8859-7", "ISO-8859-7", "ELOT_928",
         "ECMA-118", "greek", "greek8", "csISOLatinGreek", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 11, 28598, STRING_ENCODING_ISO_8859_8, 3,
+   { 11, 28598, STRING_ENCODING_ISO_8859_8, SUPPORTED, 3,
       { "ISO_8859-8:1988", "iso-ir-138", "ISO_8859-8", "ISO-8859-8", "hebrew",
         "csISOLatinHebrew", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 12, 28599, STRING_ENCODING_ISO_8859_9, 3,
+   { 12, 28599, STRING_ENCODING_ISO_8859_9, SUPPORTED, 3,
       { "ISO_8859-9:1989", "iso-ir-148", "ISO_8859-9", "ISO-8859-9", "latin5",
         "l5", "csISOLatin5", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 13, WINUNDEF, STRING_ENCODING_ISO_8859_10, 0,
-      { "ISO-8859-10", "iso-ir-157", "l6", "ISO_8859-10:1992", "csISOLatin6", 
+   { 13, WINUNDEF, STRING_ENCODING_ISO_8859_10, SUPPORTED, 0,
+      { "ISO-8859-10", "iso-ir-157", "l6", "ISO_8859-10:1992", "csISOLatin6",
         "latin6", NULL }
    },
    /*
     * Source: ECMA registry and ISO 6937-2:1983
     */
-   { 14, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 14, WINUNDEF, STRING_ENCODING_ISO_6937_2_ADD, UNSUPPORTED, 0,
       { "ISO_6937-2-add", "iso-ir-142", "csISOTextComm", NULL }
    },
    /*
@@ -153,14 +155,14 @@ static struct xRef {
     *         JIS/Roman (similar to ASCII) plus eight-bit half-width 
     *         Katakana
     */
-   { 15, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 15, WINUNDEF, STRING_ENCODING_JIS_X0201, UNSUPPORTED, 0,
       { "JIS_X0201", "X0201", "csHalfWidthKatakana", NULL }
    },
    /*
     * Source: JIS X 0202-1991.  Uses ISO 2022 escape sequences to
     *         shift code sets as documented in JIS X 0202-1991.
     */
-   { 16, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 16, WINUNDEF, STRING_ENCODING_JIS_ENCODING, UNSUPPORTED, 0,
       { "JIS_Encoding", "csJISEncoding", NULL }
    },
    /*
@@ -171,7 +173,7 @@ static struct xRef {
     *         X0208:1997.
     *         This charset can be used for the top-level media type "text".
     */
-   { 17, 932, STRING_ENCODING_SHIFT_JIS, 0,
+   { 17, 932, STRING_ENCODING_SHIFT_JIS, SUPPORTED, 0,
       { "Shift_JIS", "MS_Kanji", "csShiftJIS", NULL }
    },
    /*
@@ -186,14 +188,14 @@ static struct xRef {
     *                            restricted to A0-FF in both bytes
     *                            requiring SS3 as the character prefix
     */
-   { 18, 20932, STRING_ENCODING_EUC_JP, 2,
+   { 18, 20932, STRING_ENCODING_EUC_JP, UNSUPPORTED, 2,
       { "Extended_UNIX_Code_Packed_Format_for_Japanese", "csEUCPkdFmtJapanese",
         "EUC-JP", NULL }
    },
    /*
     * Windows duplicate of EUC-JP
     */
-   { 18, 51932, STRING_ENCODING_EUC_JP, 2,
+   { 18, 51932, STRING_ENCODING_EUC_JP, UNSUPPORTED, 2,
       { "Extended_UNIX_Code_Packed_Format_for_Japanese", "csEUCPkdFmtJapanese",
         "EUC-JP", NULL }
    },
@@ -212,53 +214,54 @@ static struct xRef {
     *                             the first byte
     *                 and 21-7E in the second byte
     */
-   { 19, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 19, WINUNDEF, STRING_ENCODING_EXTENDED_UNIX_CODE_FIXED_WIDTH_FOR_JAPANESE,
+     UNSUPPORTED, 0,
       { "Extended_UNIX_Code_Fixed_Width_for_Japanese", "csEUCFixWidJapanese",
          NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 20, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 20, WINUNDEF, STRING_ENCODING_BS_4730, UNSUPPORTED, 0,
       { "BS_4730", "iso-ir-4", "ISO646-GB", "gb", "uk", "csISO4UnitedKingdom",
          NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 21, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 21, WINUNDEF, STRING_ENCODING_SEN_850200_C, UNSUPPORTED, 0,
       { "SEN_850200_C", "iso-ir-11", "ISO646-SE2", "se2",
         "csISO11SwedishForNames", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 22, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 22, WINUNDEF, STRING_ENCODING_IT, UNSUPPORTED, 0,
       { "IT", "iso-ir-15", "ISO646-IT", "csISO15Italian", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 23, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 23, WINUNDEF, STRING_ENCODING_ES, UNSUPPORTED, 0,
       { "ES", "iso-ir-17", "ISO646-ES", "csISO17Spanish", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 24, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 24, WINUNDEF, STRING_ENCODING_DIN_66003, UNSUPPORTED, 0,
       { "DIN_66003", "iso-ir-21", "de", "ISO646-DE", "csISO21German", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 25, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 25, WINUNDEF, STRING_ENCODING_NS_4551_1, UNSUPPORTED, 0,
       { "NS_4551-1", "iso-ir-60", "ISO646-NO", "no", "csISO60DanishNorwegian",
         "csISO60Norwegian1", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 26, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 26, WINUNDEF, STRING_ENCODING_NF_Z_62_010, UNSUPPORTED, 0,
       { "NF_Z_62-010", "iso-ir-69", "ISO646-FR", "fr", "csISO69French", NULL }
    },
    /*
@@ -266,511 +269,507 @@ static struct xRef {
     *         encoding, that subsets ASCII-7. It does not have byte
     *         ordering issues.
     */
-   { 27, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 27, WINUNDEF, STRING_ENCODING_ISO_10646_UTF_1, UNSUPPORTED, 0,
       { "ISO-10646-UTF-1", "csISO10646UTF1", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 28, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 28, WINUNDEF, STRING_ENCODING_ISO_646_BASIC_1983, UNSUPPORTED, 0,
       { "ISO_646.basic:1983", "ref", "csISO646basic1983", NULL }
    },
-   { 29, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 29, WINUNDEF, STRING_ENCODING_INVARIANT, UNSUPPORTED, 0,
       { "INVARIANT", "csINVARIANT", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 30, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 30, WINUNDEF, STRING_ENCODING_ISO_646_IRV_1983, SUPPORTED, 0,
       { "ISO_646.irv:1983", "iso-ir-2", "irv", "csISO2IntlRefVersion", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 31, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 31, WINUNDEF, STRING_ENCODING_NATS_SEFI, UNSUPPORTED, 0,
       { "NATS-SEFI", "iso-ir-8-1", "csNATSSEFI", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 32, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 32, WINUNDEF, STRING_ENCODING_NATS_SEFI_ADD, UNSUPPORTED, 0,
       { "NATS-SEFI-ADD", "iso-ir-8-2", "csNATSSEFIADD", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 33, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 33, WINUNDEF, STRING_ENCODING_NATS_DANO, UNSUPPORTED, 0,
       { "NATS-DANO", "iso-ir-9-1", "csNATSDANO", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 34, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 34, WINUNDEF, STRING_ENCODING_NATS_DANO_ADD, UNSUPPORTED, 0,
       { "NATS-DANO-ADD", "iso-ir-9-2", "csNATSDANOADD", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 35, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 35, WINUNDEF, STRING_ENCODING_SEN_850200_B, UNSUPPORTED, 0,
       { "SEN_850200_B", "iso-ir-10", "FI", "ISO646-FI", "ISO646-SE", "se",
         "csISO10Swedish", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 36, 949, STRING_ENCODING_UNKNOWN, 0,
+   { 36, 949, STRING_ENCODING_KS_C_5601_1987, SUPPORTED, 0,
       { "KS_C_5601-1987", "iso-ir-149", "KS_C_5601-1989", "KSC_5601", "korean",
         "csKSC56011987", NULL }
    },
    /*
     * Source: RFC-1557 (see also KS_C_5601-1987)
     */
-   { 37, 50225, STRING_ENCODING_ISO_2022_KR, 0,
+   { 37, 50225, STRING_ENCODING_ISO_2022_KR, UNSUPPORTED, 0,
       { "ISO-2022-KR", "csISO2022KR", NULL }
    },
    /*
     * Source: RFC-1557 (see also KS_C_5861-1992)
     */
-   { 38, 51949, STRING_ENCODING_EUC_KR, 0,
+   { 38, 51949, STRING_ENCODING_EUC_KR, UNSUPPORTED, 0,
       { "EUC-KR", "csEUCKR", NULL }
    },
    /*
     * Source: RFC-1468 (see also RFC-2237)
     */
-   { 39, 50220, STRING_ENCODING_ISO_2022_JP, 0,
+   { 39, 50220, STRING_ENCODING_ISO_2022_JP, UNSUPPORTED, 0,
       { "ISO-2022-JP", "csISO2022JP", NULL }
    },
    /*
     * Source: VMware
     */
-   { MIBUNDEF, WINUNDEF, STRING_ENCODING_ISO_2022_JP_1, 0,
+   { MIBUNDEF, WINUNDEF, STRING_ENCODING_ISO_2022_JP_1, UNSUPPORTED, 0,
       { "ISO-2022-JP-1", NULL }
    },
    /*
     * Source: RFC-1554
     */
-   { 40, WINUNDEF, STRING_ENCODING_ISO_2022_JP_2, 0,
+   { 40, WINUNDEF, STRING_ENCODING_ISO_2022_JP_2, UNSUPPORTED, 0,
       { "ISO-2022-JP-2", "csISO2022JP2", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 41, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 41, WINUNDEF, STRING_ENCODING_JIS_C6220_1969_JP, UNSUPPORTED, 0,
       { "JIS_C6220-1969-jp", "JIS_C6220-1969", "iso-ir-13", "katakana",
         "x0201-7", "csISO13JISC6220jp", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 42, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 42, WINUNDEF, STRING_ENCODING_JIS_C6220_1969_RO, UNSUPPORTED, 0,
       { "JIS_C6220-1969-ro", "iso-ir-14", "jp", "ISO646-JP",
         "csISO14JISC6220ro", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 43, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 43, WINUNDEF, STRING_ENCODING_PT, UNSUPPORTED, 0,
       { "PT", "iso-ir-16", "ISO646-PT", "csISO16Portuguese", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 44, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 44, WINUNDEF, STRING_ENCODING_GREEK7_OLD, UNSUPPORTED, 0,
       { "greek7-old", "iso-ir-18", "csISO18Greek7Old", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 45, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 45, WINUNDEF, STRING_ENCODING_LATIN_GREEK, UNSUPPORTED, 0,
       { "latin-greek", "iso-ir-19", "csISO19LatinGreek", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 46, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
-      { "NF_Z_62-010_(1973)", "iso-ir-25", "ISO646-FR1", "csISO25French",
-         NULL }
+   { 46, WINUNDEF, STRING_ENCODING_NF_Z_62_010__1973_, UNSUPPORTED, 0,
+      { "NF_Z_62-010_(1973)", "iso-ir-25", "ISO646-FR1", "csISO25French", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 47, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 47, WINUNDEF, STRING_ENCODING_LATIN_GREEK_1, UNSUPPORTED, 0,
       { "Latin-greek-1", "iso-ir-27", "csISO27LatinGreek1", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 48, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 48, WINUNDEF, STRING_ENCODING_ISO_5427, UNSUPPORTED, 0,
       { "ISO_5427", "iso-ir-37", "csISO5427Cyrillic", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 49, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 49, WINUNDEF, STRING_ENCODING_JIS_C6226_1978, UNSUPPORTED, 0,
       { "JIS_C6226-1978", "iso-ir-42", "csISO42JISC62261978", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 50, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 50, WINUNDEF, STRING_ENCODING_BS_VIEWDATA, UNSUPPORTED, 0,
       { "BS_viewdata", "iso-ir-47", "csISO47BSViewdata", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 51, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 51, WINUNDEF, STRING_ENCODING_INIS, UNSUPPORTED, 0,
       { "INIS", "iso-ir-49", "csISO49INIS", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 52, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 52, WINUNDEF, STRING_ENCODING_INIS_8, UNSUPPORTED, 0,
       { "INIS-8", "iso-ir-50", "csISO50INIS8", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 53, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 53, WINUNDEF, STRING_ENCODING_INIS_CYRILLIC, UNSUPPORTED, 0,
       { "INIS-cyrillic", "iso-ir-51", "csISO51INISCyrillic", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 54, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 54, WINUNDEF, STRING_ENCODING_ISO_5427_1981, UNSUPPORTED, 0,
       { "ISO_5427:1981", "iso-ir-54", "ISO5427Cyrillic1981", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 55, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 55, WINUNDEF, STRING_ENCODING_ISO_5428_1980, UNSUPPORTED, 0,
       { "ISO_5428:1980", "iso-ir-55", "csISO5428Greek", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 56, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 56, WINUNDEF, STRING_ENCODING_GB_1988_80, UNSUPPORTED, 0,
       { "GB_1988-80", "iso-ir-57", "cn", "ISO646-CN", "csISO57GB1988", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 57, 20936, STRING_ENCODING_UNKNOWN, 0,
+   { 57, 20936, STRING_ENCODING_GB_2312_80, UNSUPPORTED, 0,
       { "GB_2312-80", "iso-ir-58", "chinese", "csISO58GB231280", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 58, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
-      { "NS_4551-2", "ISO646-NO2", "iso-ir-61", "no2", "csISO61Norwegian2",
-         NULL }
+   { 58, WINUNDEF, STRING_ENCODING_NS_4551_2, UNSUPPORTED, 0,
+      { "NS_4551-2", "ISO646-NO2", "iso-ir-61", "no2", "csISO61Norwegian2", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 59, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 59, WINUNDEF, STRING_ENCODING_VIDEOTEX_SUPPL, UNSUPPORTED, 0,
       { "videotex-suppl", "iso-ir-70", "csISO70VideotexSupp1", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 60, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 60, WINUNDEF, STRING_ENCODING_PT2, UNSUPPORTED, 0,
       { "PT2", "iso-ir-84", "ISO646-PT2", "csISO84Portuguese2", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 61, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 61, WINUNDEF, STRING_ENCODING_ES2, UNSUPPORTED, 0,
       { "ES2", "iso-ir-85", "ISO646-ES2", "csISO85Spanish2", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 62, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
-      { "MSZ_7795.3", "iso-ir-86", "ISO646-HU", "hu", "csISO86Hungarian",
-         NULL }
+   { 62, WINUNDEF, STRING_ENCODING_MSZ_7795_3, UNSUPPORTED, 0,
+      { "MSZ_7795.3", "iso-ir-86", "ISO646-HU", "hu", "csISO86Hungarian", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 63, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 63, WINUNDEF, STRING_ENCODING_JIS_C6226_1983, UNSUPPORTED, 0,
       { "JIS_C6226-1983", "iso-ir-87", "x0208", "JIS_X0208-1983",
         "csISO87JISX0208", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 64, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 64, WINUNDEF, STRING_ENCODING_GREEK7, UNSUPPORTED, 0,
       { "greek7", "iso-ir-88", "csISO88Greek7", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 65, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
-      { "ASMO_449", "ISO_9036", "arabic7", "iso-ir-89", "csISO89ASMO449",
-         NULL }
+   { 65, WINUNDEF, STRING_ENCODING_ASMO_449, UNSUPPORTED, 0,
+      { "ASMO_449", "ISO_9036", "arabic7", "iso-ir-89", "csISO89ASMO449", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 66, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 66, WINUNDEF, STRING_ENCODING_ISO_IR_90, UNSUPPORTED, 0,
       { "iso-ir-90", "csISO90", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 67, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 67, WINUNDEF, STRING_ENCODING_JIS_C6229_1984_A, UNSUPPORTED, 0,
       { "JIS_C6229-1984-a", "iso-ir-91", "jp-ocr-a", "csISO91JISC62291984a",
          NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 68, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 68, WINUNDEF, STRING_ENCODING_JIS_C6229_1984_B, UNSUPPORTED, 0,
       { "JIS_C6229-1984-b", "iso-ir-92", "ISO646-JP-OCR-B", "jp-ocr-b",
         "csISO92JISC62991984b", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 69, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 69, WINUNDEF, STRING_ENCODING_JIS_C6229_1984_B_ADD, UNSUPPORTED, 0,
       { "JIS_C6229-1984-b-add", "iso-ir-93", "jp-ocr-b-add",
         "csISO93JIS62291984badd", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 70, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 70, WINUNDEF, STRING_ENCODING_JIS_C6229_1984_HAND, UNSUPPORTED, 0,
       { "JIS_C6229-1984-hand", "iso-ir-94", "jp-ocr-hand",
         "csISO94JIS62291984hand", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 71, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 71, WINUNDEF, STRING_ENCODING_JIS_C6229_1984_HAND_ADD, UNSUPPORTED, 0,
       { "JIS_C6229-1984-hand-add", "iso-ir-95", "jp-ocr-hand-add",
         "csISO95JIS62291984handadd", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 72, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 72, WINUNDEF, STRING_ENCODING_JIS_C6229_1984_KANA, UNSUPPORTED, 0,
       { "JIS_C6229-1984-kana", "iso-ir-96", "csISO96JISC62291984kana", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 73, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 73, WINUNDEF, STRING_ENCODING_ISO_2033_1983, UNSUPPORTED, 0,
       { "ISO_2033-1983", "iso-ir-98", "e13b", "csISO2033", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 74, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 74, WINUNDEF, STRING_ENCODING_ANSI_X3_110_1983, UNSUPPORTED, 0,
       { "ANSI_X3.110-1983", "iso-ir-99", "CSA_T500-1983", "NAPLPS",
         "csISO99NAPLPS", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 75, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 75, WINUNDEF, STRING_ENCODING_T_61_7BIT, UNSUPPORTED, 0,
       { "T.61-7bit", "iso-ir-102", "csISO102T617bit", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 76, 20261, STRING_ENCODING_UNKNOWN, 0,
+   { 76, 20261, STRING_ENCODING_T_61_8BIT, UNSUPPORTED, 0,
       { "T.61-8bit", "T.61", "iso-ir-103", "csISO103T618bit", NULL }
    },
    /*
     * Source: ISO registry (formerly ECMA registry)
     *          http://www.itscj.ipsj.jp/ISO-IR/111.pdf
     */
-   { 77, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 77, WINUNDEF, STRING_ENCODING_ECMA_CYRILLIC, UNSUPPORTED, 0,
       { "ECMA-cyrillic", "iso-ir-111", "KOI8-E", "csISO111ECMACyrillic", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 78, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 78, WINUNDEF, STRING_ENCODING_CSA_Z243_4_1985_1, UNSUPPORTED, 0,
       { "CSA_Z243.4-1985-1", "iso-ir-121", "ISO646-CA", "csa7-1", "ca",
         "csISO121Canadian1", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 79, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 79, WINUNDEF, STRING_ENCODING_CSA_Z243_4_1985_2, UNSUPPORTED, 0,
       { "CSA_Z243.4-1985-2", "iso-ir-122", "ISO646-CA2", "csa7-2",
         "csISO122Canadian2", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 80, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 80, WINUNDEF, STRING_ENCODING_CSA_Z243_4_1985_GR, UNSUPPORTED, 0,
       { "CSA_Z243.4-1985-gr", "iso-ir-123", "csISO123CSAZ24341985gr", NULL }
    },
    /*
     * Source: RFC1556
     */
-   { 81, WINUNDEF, STRING_ENCODING_UNKNOWN, 2,
+   { 81, WINUNDEF, STRING_ENCODING_ISO_8859_6_E, SUPPORTED, 2,
       { "ISO_8859-6-E", "csISO88596E", "ISO-8859-6-E", NULL }
    },
    /*
     * Source: RFC1556
     */
-   { 82, WINUNDEF, STRING_ENCODING_UNKNOWN, 2,
+   { 82, WINUNDEF, STRING_ENCODING_ISO_8859_6_I, SUPPORTED, 2,
       { "ISO_8859-6-I", "csISO88596I", "ISO-8859-6-I", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 83, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 83, WINUNDEF, STRING_ENCODING_T_101_G2, UNSUPPORTED, 0,
       { "T.101-G2", "iso-ir-128", "csISO128T101G2", NULL }
    },
    /*
     * Source: RFC1556
     */
-   { 84, WINUNDEF, STRING_ENCODING_UNKNOWN, 2,
+   { 84, WINUNDEF, STRING_ENCODING_ISO_8859_8_E, SUPPORTED, 2,
       { "ISO_8859-8-E", "csISO88598E", "ISO-8859-8-E", NULL }
    },
    /*
     * Source: RFC1556
     */
-   { 85, WINUNDEF, STRING_ENCODING_UNKNOWN, 2,
+   { 85, WINUNDEF, STRING_ENCODING_ISO_8859_8_I, SUPPORTED, 2,
       { "ISO_8859-8-I", "csISO88598I", "ISO-8859-8-I", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 86, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 86, WINUNDEF, STRING_ENCODING_CSN_369103, UNSUPPORTED, 0,
       { "CSN_369103", "iso-ir-139", "csISO139CSN369103", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 87, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 87, WINUNDEF, STRING_ENCODING_JUS_I_B1_002, UNSUPPORTED, 0,
       { "JUS_I.B1.002", "iso-ir-141", "ISO646-YU", "js", "yu",
         "csISO141JUSIB1002", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 88, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 88, WINUNDEF, STRING_ENCODING_IEC_P27_1, UNSUPPORTED, 0,
       { "IEC_P27-1", "iso-ir-143", "csISO143IECP271", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 89, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 89, WINUNDEF, STRING_ENCODING_JUS_I_B1_003_SERB, UNSUPPORTED, 0,
       { "JUS_I.B1.003-serb", "iso-ir-146", "serbian", "csISO146Serbian", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 90, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 90, WINUNDEF, STRING_ENCODING_JUS_I_B1_003_MAC, UNSUPPORTED, 0,
       { "JUS_I.B1.003-mac", "macedonian", "iso-ir-147", "csISO147Macedonian",
          NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 91, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 91, WINUNDEF, STRING_ENCODING_GREEK_CCITT, UNSUPPORTED, 0,
       { "greek-ccitt", "iso-ir-150", "csISO150", "csISO150GreekCCITT", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 92, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 92, WINUNDEF, STRING_ENCODING_NC_NC00_10_81, UNSUPPORTED, 0,
       { "NC_NC00-10:81", "cuba", "iso-ir-151", "ISO646-CU", "csISO151Cuba",
          NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 93, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 93, WINUNDEF, STRING_ENCODING_ISO_6937_2_25, UNSUPPORTED, 0,
       { "ISO_6937-2-25", "iso-ir-152", "csISO6937Add", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 94, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 94, WINUNDEF, STRING_ENCODING_GOST_19768_74, UNSUPPORTED, 0,
       { "GOST_19768-74", "ST_SEV_358-88", "iso-ir-153", "csISO153GOST1976874",
          NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 95, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 95, WINUNDEF, STRING_ENCODING_ISO_8859_SUPP, UNSUPPORTED, 0,
       { "ISO_8859-supp", "iso-ir-154", "latin1-2-5", "csISO8859Supp", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 96, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 96, WINUNDEF, STRING_ENCODING_ISO_10367_BOX, UNSUPPORTED, 0,
       { "ISO_10367-box", "iso-ir-155", "csISO10367Box", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 97, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 97, WINUNDEF, STRING_ENCODING_LATIN_LAP, UNSUPPORTED, 0,
       { "latin-lap", "lap", "iso-ir-158", "csISO158Lap", NULL }
    },
    /*
     * Source: ECMA registry
     */
-   { 98, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 98, WINUNDEF, STRING_ENCODING_JIS_X0212_1990, UNSUPPORTED, 0,
       { "JIS_X0212-1990", "x0212", "iso-ir-159", "csISO159JISX02121990", NULL }
    },
    /*
     * Source: Danish Standard, DS 2089, February 1974
     */
-   { 99, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 99, WINUNDEF, STRING_ENCODING_DS_2089, UNSUPPORTED, 0,
       { "DS_2089", "DS2089", "ISO646-DK", "dk", "csISO646Danish", NULL }
    },
-   { 100, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 100, WINUNDEF, STRING_ENCODING_US_DK, UNSUPPORTED, 0,
       { "us-dk", "csUSDK", NULL }
    },
-   { 101, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 101, WINUNDEF, STRING_ENCODING_DK_US, UNSUPPORTED, 0,
       { "dk-us", "csDKUS", NULL }
    },
-   { 102, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 102, WINUNDEF, STRING_ENCODING_KSC5636, UNSUPPORTED, 0,
       { "KSC5636", "ISO646-KR", "csKSC5636", NULL }
    },
    /*
     * Source: RFC 1642
     */
-   { 103, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 103, WINUNDEF, STRING_ENCODING_UNICODE_1_1_UTF_7, UNSUPPORTED, 0,
       { "UNICODE-1-1-UTF-7", "csUnicode11UTF7", NULL }
    },
    /*
     * Source: RFC-1922
     */
-   { 104, 50227, STRING_ENCODING_ISO_2022_CN, 0,
+   { 104, 50227, STRING_ENCODING_ISO_2022_CN, UNSUPPORTED, 0,
       { "ISO-2022-CN", NULL }
    },
    /*
     * Source: RFC-1922
     */
-   { 105, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 105, WINUNDEF, STRING_ENCODING_ISO_2022_CN_EXT, UNSUPPORTED, 0,
       { "ISO-2022-CN-EXT", NULL }
    },
    /*
     * Source: RFC 3629
     */
-   { 106, 65001, STRING_ENCODING_UTF8, 0,
+   { 106, 65001, STRING_ENCODING_UTF8, SUPPORTED, 0,
       { "UTF-8", NULL }
    },
    /*
     * Source: ISO See 
     *     (http://www.iana.org/assignments/charset-reg/ISO-8859-13)[Tumasonis] 
     */
-   { 109, 28603, STRING_ENCODING_ISO_8859_13, 0,
+   { 109, 28603, STRING_ENCODING_ISO_8859_13, SUPPORTED, 0,
       { "ISO-8859-13", NULL }
    },
    /*
     * Source: ISO See
     *      (http://www.iana.org/assignments/charset-reg/ISO-8859-14) [Simonsen]
     */
-   { 110, WINUNDEF, STRING_ENCODING_ISO_8859_14, 0,
+   { 110, WINUNDEF, STRING_ENCODING_ISO_8859_14, SUPPORTED, 0,
       { "ISO-8859-14", "iso-ir-199", "ISO_8859-14:1998", "ISO_8859-14",
         "latin8", "iso-celtic", "l8", NULL }
    },
@@ -778,20 +777,20 @@ static struct xRef {
     * Source: ISO 
     *     Please see: <http://www.iana.org/assignments/charset-reg/ISO-8859-15>
     */
-   { 111, 28605, STRING_ENCODING_ISO_8859_15, 0,
+   { 111, 28605, STRING_ENCODING_ISO_8859_15, SUPPORTED, 0,
       { "ISO-8859-15", "ISO_8859-15", "Latin-9", NULL }
    },
    /*
     * Windows duplicate of ISO-8859-15
     * windows-874: ANSI/OEM Thai (same as 28605, ISO 8859-15)
     */
-   { 111, 874, STRING_ENCODING_ISO_8859_15, 0,
+   { 111, 874, STRING_ENCODING_ISO_8859_15, SUPPORTED, 0,
       { "ISO-8859-15", "ISO_8859-15", "Latin-9", NULL }
    },
    /*
     * Source: ISO
     */
-   { 112, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 112, WINUNDEF, STRING_ENCODING_ISO_8859_16, UNSUPPORTED, 0,
       { "ISO-8859-16", "iso-ir-226", "ISO_8859-16:2001", "ISO_8859-16",
         "latin10", "l10", NULL }
    },
@@ -799,22 +798,22 @@ static struct xRef {
     * Source: Chinese IT Standardization Technical Committee  
     *         Please see: <http://www.iana.org/assignments/charset-reg/GBK>
     */
-   { 113, WINUNDEF, STRING_ENCODING_GBK, 0,
+   { 113, 936, STRING_ENCODING_GBK, SUPPORTED, 0,
       { "GBK", "CP936", "MS936", "windows-936", NULL }
    },
    /*
     * Source: Chinese IT Standardization Technical Committee
     *         Please see: <http://www.iana.org/assignments/charset-reg/GB18030>
     */
-   { 114, 54936, STRING_ENCODING_GB_18030, 0,
+   { 114, 54936, STRING_ENCODING_GB_18030, UNSUPPORTED, 0,
       { "GB18030", NULL }
    },
    /*
     * Source:  Fujitsu-Siemens standard mainframe EBCDIC encoding
     *          Please see:
-               <http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-15>
+    *           <http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-15>
     */
-   { 115, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 115, WINUNDEF, STRING_ENCODING_OSD_EBCDIC_DF04_15, UNSUPPORTED, 0,
       { "OSD_EBCDIC_DF04_15", NULL }
    },
    /*
@@ -822,7 +821,7 @@ static struct xRef {
     *          Please see:
     *          <http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF03-IRV>
     */
-   { 116, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 116, WINUNDEF, STRING_ENCODING_OSD_EBCDIC_DF03_IRV, UNSUPPORTED, 0,
       { "OSD_EBCDIC_DF03_IRV", NULL }
    },
    /*
@@ -830,21 +829,21 @@ static struct xRef {
     *          Please see:
     *          <http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-1>
     */
-   { 117, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 117, WINUNDEF, STRING_ENCODING_OSD_EBCDIC_DF04_1, UNSUPPORTED, 0,
       { "OSD_EBCDIC_DF04_1", NULL }
    },
    /*
     * Source: See <http://www.iana.org/assignments/charset-reg/ISO-11548-1>
     *            [Thibault]
     */
-   { 118, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 118, WINUNDEF, STRING_ENCODING_ISO_11548_1, UNSUPPORTED, 0,
       { "ISO-11548-1", "ISO_11548-1", "ISO_TR_11548-1", "csISO115481", NULL }
    },
    /*
     * Source: See <http://www.iana.org/assignments/charset-reg/KZ-1048>  
     *    [Veremeev, Kikkarin]
     */
-   { 119, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 119, WINUNDEF, STRING_ENCODING_KZ_1048, UNSUPPORTED, 0,
       { "KZ-1048", "STRK1048-2002", "RK1048", "csKZ1048", NULL }
    },
    /*
@@ -852,21 +851,21 @@ static struct xRef {
     *         this needs to specify network byte order: the standard
     *         does not specify (it is a 16-bit integer space)
     */
-   { 1000, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1000, WINUNDEF, STRING_ENCODING_ISO_10646_UCS_2, SUPPORTED, 0,
       { "ISO-10646-UCS-2", "csUnicode", NULL }
    },
    /*
     * Source: the full code space. (same comment about byte order,
     *         these are 31-bit numbers.
     */
-   { 1001, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1001, WINUNDEF, STRING_ENCODING_ISO_10646_UCS_4, SUPPORTED, 0,
       { "ISO-10646-UCS-4", "csUCS4", NULL }
    },
    /*
     * Source: ASCII subset of Unicode.  Basic Latin = collection 1
     *         See ISO 10646, Appendix A
     */
-   { 1002, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1002, WINUNDEF, STRING_ENCODING_ISO_10646_UCS_BASIC, UNSUPPORTED, 0,
       { "ISO-10646-UCS-Basic", "csUnicodeASCII", NULL }
    },
    /*
@@ -874,74 +873,74 @@ static struct xRef {
     *          Supplement  = collections 1 and 2.  See ISO 10646, 
     *          Appendix A.  See RFC 1815.
     */
-   { 1003, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1003, WINUNDEF, STRING_ENCODING_ISO_10646_UNICODE_LATIN1, UNSUPPORTED, 0,
       { "ISO-10646-Unicode-Latin1", "csUnicodeLatin1", "ISO-10646", NULL }
    },
    /*
     * Source: ISO 10646 Japanese, see RFC 1815.
     */
-   { MIBUNDEF, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, WINUNDEF, STRING_ENCODING_ISO_10646_J_1, UNSUPPORTED, 0,
       { "ISO-10646-J-1", NULL }
    },
    /*
     * Source: IBM Latin-2, -3, -5, Extended Presentation Set, GCSGID: 1261
     */
-   { 1005, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1005, WINUNDEF, STRING_ENCODING_ISO_UNICODE_IBM_1261, UNSUPPORTED, 0,
       { "ISO-Unicode-IBM-1261", "csUnicodeIBM1261", NULL }
    },
    /*
     * Source: IBM Latin-4 Extended Presentation Set, GCSGID: 1268
     */
-   { 1006, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1006, WINUNDEF, STRING_ENCODING_ISO_UNICODE_IBM_1268, UNSUPPORTED, 0,
       { "ISO-Unicode-IBM-1268", "csUnicodeIBM1268", NULL }
    },
    /*
     * Source: IBM Cyrillic Greek Extended Presentation Set, GCSGID: 1276
     */
-   { 1007, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1007, WINUNDEF, STRING_ENCODING_ISO_UNICODE_IBM_1276, UNSUPPORTED, 0,
       { "ISO-Unicode-IBM-1276", "csUnicodeIBM1276", NULL }
    },
    /*
     * Source: IBM Arabic Presentation Set, GCSGID: 1264
     */
-   { 1008, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1008, WINUNDEF, STRING_ENCODING_ISO_UNICODE_IBM_1264, UNSUPPORTED, 0,
       { "ISO-Unicode-IBM-1264", "csUnicodeIBM1264", NULL }
    },
    /*
     * Source: IBM Hebrew Presentation Set, GCSGID: 1265
     */
-   { 1009, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1009, WINUNDEF, STRING_ENCODING_ISO_UNICODE_IBM_1265, UNSUPPORTED, 0,
       { "ISO-Unicode-IBM-1265", "csUnicodeIBM1265", NULL }
    },
    /*
     * Source: RFC 1641
     */
-   { 1010, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1010, WINUNDEF, STRING_ENCODING_UNICODE_1_1, UNSUPPORTED, 0,
       { "UNICODE-1-1", "csUnicode11", NULL }
    },
    /*
     * Source: SCSU See (http://www.iana.org/assignments/charset-reg/SCSU)
     *     [Scherer]
     */
-   { 1011, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1011, WINUNDEF, STRING_ENCODING_SCSU, SUPPORTED, 0,
       { "SCSU", NULL }
    },
    /*
     * Source: RFC 2152
     */
-   { 1012, 65000, STRING_ENCODING_UNKNOWN, 0,
+   { 1012, 65000, STRING_ENCODING_UTF_7, SUPPORTED, 0,
       { "UTF-7", NULL }
    },
    /*
     * Source: RFC 2781
     */
-   { 1013, 1201, STRING_ENCODING_UTF16_BE, 0,
+   { 1013, 1201, STRING_ENCODING_UTF16_BE, SUPPORTED, 0,
       { "UTF-16BE", NULL }
    },
    /*
     * Source: RFC 2781
     */
-   { 1015, 1200, STRING_ENCODING_UTF16, 0,
+   { 1015, 1200, STRING_ENCODING_UTF16, SUPPORTED, 0,
       { "UTF-16", NULL }
    },
    /*
@@ -949,79 +948,86 @@ static struct xRef {
     *
     * UTF-16LE is after UTF16 so windows code page 1200 matches UTF16 first
     */
-   { 1014, 1200, STRING_ENCODING_UTF16_LE, 0,
+   { 1014, 1200, STRING_ENCODING_UTF16_LE, SUPPORTED, 0,
       { "UTF-16LE", NULL }
    },
    /*
     * Source: <http://www.unicode.org/unicode/reports/tr26>
     */
-   { 1016, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1016, WINUNDEF, STRING_ENCODING_CESU_8, SUPPORTED, 0,
       { "CESU-8", "csCESU-8", NULL }
    },
    /*
     * Source: <http://www.unicode.org/unicode/reports/tr19/>
     */
-   { 1017, 12000, STRING_ENCODING_UTF32, 0,
+   { 1017, 12000, STRING_ENCODING_UTF32, SUPPORTED, 0,
       { "UTF-32", NULL }
    },
    /*
     * Source: <http://www.unicode.org/unicode/reports/tr19/>
     */
-   { 1018, 12001, STRING_ENCODING_UTF32_BE, 0,
+   { 1018, 12001, STRING_ENCODING_UTF32_BE, SUPPORTED, 0,
       { "UTF-32BE", NULL }
    },
    /*
     * Source: <http://www.unicode.org/unicode/reports/tr19/>
+    *
+    * Windows code page 12000 matches UTF-32 above first 
     */
-   { 1019, 12000, STRING_ENCODING_UTF32_LE, 0,
+   { 1019, 12000, STRING_ENCODING_UTF32_LE, SUPPORTED, 0,
       { "UTF-32LE", NULL }
    },
    /*
     * Source: http://www.unicode.org/notes/tn6/
     */
-   { 1020, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 1020, WINUNDEF, STRING_ENCODING_BOCU_1, SUPPORTED, 0,
       { "BOCU-1", "csBOCU-1", NULL }
    },
    /*
     * Source: Extended ISO 8859-1 Latin-1 for Windows 3.0.  
     *         PCL Symbol Set id: 9U
     */
-   { 2000, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2000, WINUNDEF, STRING_ENCODING_ISO_8859_1_WINDOWS_3_0_LATIN_1,
+     UNSUPPORTED, 0,
       { "ISO-8859-1-Windows-3.0-Latin-1", "csWindows30Latin1", NULL }
    },
    /*
     * Source: Extended ISO 8859-1 Latin-1 for Windows 3.1.  
     *         PCL Symbol Set id: 19U
     */
-   { 2001, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2001, WINUNDEF, STRING_ENCODING_ISO_8859_1_WINDOWS_3_1_LATIN_1,
+     UNSUPPORTED, 0,
       { "ISO-8859-1-Windows-3.1-Latin-1", "csWindows31Latin1", NULL }
    },
    /*
     * Source: Extended ISO 8859-2.  Latin-2 for Windows 3.1.
     *         PCL Symbol Set id: 9E
     */
-   { 2002, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2002, WINUNDEF, STRING_ENCODING_ISO_8859_2_WINDOWS_LATIN_2,
+     UNSUPPORTED, 0,
       { "ISO-8859-2-Windows-Latin-2", "csWindows31Latin2", NULL }
    },
    /*
     * Source: Extended ISO 8859-9.  Latin-5 for Windows 3.1
     *         PCL Symbol Set id: 5T
     */
-   { 2003, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2003, WINUNDEF, STRING_ENCODING_ISO_8859_9_WINDOWS_LATIN_5,
+     UNSUPPORTED, 0,
       { "ISO-8859-9-Windows-Latin-5", "csWindows31Latin5", NULL }
    },
    /*
     * Source: LaserJet IIP Printer User's Manual, 
     *         HP part no 33471-90901, Hewlet-Packard, June 1989.
     */
-   { 2004, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2004, WINUNDEF, STRING_ENCODING_HP_ROMAN8, UNSUPPORTED, 0,
       { "hp-roman8", "roman8", "r8", "csHPRoman8", NULL }
    },
    /*
     * Source: PostScript Language Reference Manual
     *         PCL Symbol Set id: 10J
     */
-   { 2005, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2005, WINUNDEF, STRING_ENCODING_ADOBE_STANDARD_ENCODING,
+     UNSUPPORTED, 0,
       { "Adobe-Standard-Encoding", "csAdobeStandardEncoding", NULL }
    },
    /*
@@ -1031,7 +1037,7 @@ static struct xRef {
     *         to FF (hex).  
     *         PCL Symbol Set id: 14J
     */
-   { 2006, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2006, WINUNDEF, STRING_ENCODING_VENTURA_US, UNSUPPORTED, 0,
       { "Ventura-US", "csVenturaUS", NULL }
    },
    /*
@@ -1039,20 +1045,20 @@ static struct xRef {
     *         to Roman8.
     *         PCL Symbol Set id: 13J
     */
-   { 2007, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2007, WINUNDEF, STRING_ENCODING_VENTURA_INTERNATIONAL, UNSUPPORTED, 0,
       { "Ventura-International", "csVenturaInternational", NULL }
    },
    /*
     * Source: VAX/VMS User's Manual, 
     *         Order Number: AI-Y517A-TE, April 1986.
     */
-   { 2008, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2008, WINUNDEF, STRING_ENCODING_DEC_MCS, UNSUPPORTED, 0,
       { "DEC-MCS", "dec", "csDECMCS", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2009, 850, STRING_ENCODING_UNKNOWN, 0,
+   { 2009, 850, STRING_ENCODING_IBM850, UNSUPPORTED, 0,
       { "IBM850", "cp850", "850", "csPC850Multilingual", NULL }
    },
    /*
@@ -1060,31 +1066,31 @@ static struct xRef {
     *         8-bit PC set for Danish Norwegian
     *         PCL Symbol Set id: 11U
     */
-   { 2012, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2012, WINUNDEF, STRING_ENCODING_PC8_DANISH_NORWEGIAN, UNSUPPORTED, 0,
       { "PC8-Danish-Norwegian", "csPC8DanishNorwegian", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2013, 862, STRING_ENCODING_UNKNOWN, 0,
+   { 2013, 862, STRING_ENCODING_IBM862, UNSUPPORTED, 0,
       { "IBM862", "cp862", "862", "csPC862LatinHebrew", NULL }
    },
    /*
     * Source: PC Latin Turkish.  PCL Symbol Set id: 9T
     */
-   { 2014, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2014, WINUNDEF, STRING_ENCODING_PC8_TURKISH, UNSUPPORTED, 0,
       { "PC8-Turkish", "csPC8Turkish", NULL }
    },
    /*
     * Source: Presentation Set, CPGID: 259
     */
-   { 2015, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2015, WINUNDEF, STRING_ENCODING_IBM_SYMBOLS, UNSUPPORTED, 0,
       { "IBM-Symbols", "csIBMSymbols", NULL }
    },
    /*
     * Source: Presentation Set, CPGID: 838
     */
-   { 2016, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2016, WINUNDEF, STRING_ENCODING_IBM_THAI, UNSUPPORTED, 0,
       { "IBM-Thai", "csIBMThai", NULL }
    },
    /*
@@ -1092,7 +1098,7 @@ static struct xRef {
     *         HP part number 5961-0510, October 1992
     *         PCL Symbol Set id: 1U
     */
-   { 2017, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2017, WINUNDEF, STRING_ENCODING_HP_LEGAL, UNSUPPORTED, 0,
       { "HP-Legal", "csHPLegal", NULL }
    },
    /*
@@ -1100,7 +1106,7 @@ static struct xRef {
     *         HP part number 5961-0510, October 1992
     *         PCL Symbol Set id: 15U
     */
-   { 2018, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2018, WINUNDEF, STRING_ENCODING_HP_PI_FONT, UNSUPPORTED, 0,
       { "HP-Pi-font", "csHPPiFont", NULL }
    },
    /*
@@ -1108,14 +1114,14 @@ static struct xRef {
     *         HP part number 5961-0510, October 1992
     *         PCL Symbol Set id: 8M
     */
-   { 2019, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2019, WINUNDEF, STRING_ENCODING_HP_MATH8, UNSUPPORTED, 0,
       { "HP-Math8", "csHPMath8", NULL }
    },
    /*
     * Source: PostScript Language Reference Manual
     *         PCL Symbol Set id: 5M
     */
-   { 2020, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2020, WINUNDEF, STRING_ENCODING_ADOBE_SYMBOL_ENCODING, UNSUPPORTED, 0,
       { "Adobe-Symbol-Encoding", "csHPPSMath", NULL }
    },
    /*
@@ -1123,7 +1129,7 @@ static struct xRef {
     *         HP part number 5961-0510, October 1992
     *         PCL Symbol Set id: 7J
     */
-   { 2021, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2021, WINUNDEF, STRING_ENCODING_HP_DESKTOP, UNSUPPORTED, 0,
       { "HP-DeskTop", "csHPDesktop", NULL }
    },
    /*
@@ -1131,7 +1137,7 @@ static struct xRef {
     *         HP part number 5961-0510, October 1992
     *         PCL Symbol Set id: 6M
     */
-   { 2022, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2022, WINUNDEF, STRING_ENCODING_VENTURA_MATH, UNSUPPORTED, 0,
       { "Ventura-Math", "csVenturaMath", NULL }
    },
    /*
@@ -1139,7 +1145,7 @@ static struct xRef {
     *         HP part number 5961-0510, October 1992
     *         PCL Symbol Set id: 6J
     */
-   { 2023, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2023, WINUNDEF, STRING_ENCODING_MICROSOFT_PUBLISHING, UNSUPPORTED, 0,
       { "Microsoft-Publishing", "csMicrosoftPublishing", NULL }
    },
    /*
@@ -1152,7 +1158,7 @@ static struct xRef {
     *         but it is of limited or specialized use (see RFC2278).
     *         PCL Symbol Set id: 19K
     */
-   { 2024, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2024, WINUNDEF, STRING_ENCODING_WINDOWS_31J, SUPPORTED, 0,
       { "Windows-31J", "csWindows31J", NULL }
    },
    /*
@@ -1163,434 +1169,433 @@ static struct xRef {
     *         See GB 2312-80 
     *         PCL Symbol Set Id: 18C
     */
-   { 2025, 936, STRING_ENCODING_GB_2312, 0,
+   { 2025, WINUNDEF, STRING_ENCODING_GB_2312, UNSUPPORTED, 0,
       { "GB2312", "csGB2312", NULL }
    },
    /*
     * Source: Chinese for Taiwan Multi-byte set.
     *         PCL Symbol Set Id: 18T
     */
-   { 2026, 950, STRING_ENCODING_BIG_5, 0,
+   { 2026, 950, STRING_ENCODING_BIG_5, SUPPORTED, 0,
       { "Big5", "csBig5", NULL }
    },
    /*
     * Source: The Unicode Standard ver1.0, ISBN 0-201-56788-1, Oct 1991
     */
-   { 2027, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2027, WINUNDEF, STRING_ENCODING_MACINTOSH, UNSUPPORTED, 0,
       { "macintosh", "mac", "csMacintosh", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2028, 37, STRING_ENCODING_UNKNOWN, 0,
+   { 2028, 37, STRING_ENCODING_IBM037, UNSUPPORTED, 0,
       { "IBM037", "cp037", "ebcdic-cp-us", "ebcdic-cp-ca", "ebcdic-cp-wt",
         "ebcdic-cp-nl", "csIBM037", NULL }
    },
    /*
     * Source: IBM 3174 Character Set Ref, GA27-3831-02, March 1990
     */
-   { 2029, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2029, WINUNDEF, STRING_ENCODING_IBM038, UNSUPPORTED, 0,
       { "IBM038", "EBCDIC-INT", "cp038", "csIBM038", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2030, 20273, STRING_ENCODING_UNKNOWN, 0,
+   { 2030, 20273, STRING_ENCODING_IBM273, UNSUPPORTED, 0,
       { "IBM273", "CP273", "csIBM273", NULL }
    },
    /*
     * Source: IBM 3174 Character Set Ref, GA27-3831-02, March 1990
     */
-   { 2031, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2031, WINUNDEF, STRING_ENCODING_IBM274, UNSUPPORTED, 0,
       { "IBM274", "EBCDIC-BE", "CP274", "csIBM274", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2032, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2032, WINUNDEF, STRING_ENCODING_IBM275, UNSUPPORTED, 0,
       { "IBM275", "EBCDIC-BR", "cp275", "csIBM275", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2033, 20277, STRING_ENCODING_UNKNOWN, 0,
+   { 2033, 20277, STRING_ENCODING_IBM277, UNSUPPORTED, 0,
       { "IBM277", "EBCDIC-CP-DK", "EBCDIC-CP-NO", "csIBM277", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2034, 20278, STRING_ENCODING_UNKNOWN, 0,
+   { 2034, 20278, STRING_ENCODING_IBM278, UNSUPPORTED, 0,
       { "IBM278", "CP278", "ebcdic-cp-fi", "ebcdic-cp-se", "csIBM278", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2035, 20280, STRING_ENCODING_UNKNOWN, 0,
+   { 2035, 20280, STRING_ENCODING_IBM280, UNSUPPORTED, 0,
       { "IBM280", "CP280", "ebcdic-cp-it", "csIBM280", NULL }
    },
    /*
     * Source: IBM 3174 Character Set Ref, GA27-3831-02, March 1990
     */
-   { 2036, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2036, WINUNDEF, STRING_ENCODING_IBM281, UNSUPPORTED, 0,
       { "IBM281", "EBCDIC-JP-E", "cp281", "csIBM281", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2037, 20284, STRING_ENCODING_UNKNOWN, 0,
+   { 2037, 20284, STRING_ENCODING_IBM284, UNSUPPORTED, 0,
       { "IBM284", "CP284", "ebcdic-cp-es", "csIBM284", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2038, 20285, STRING_ENCODING_UNKNOWN, 0,
+   { 2038, 20285, STRING_ENCODING_IBM285, UNSUPPORTED, 0,
       { "IBM285", "CP285", "ebcdic-cp-gb", "csIBM285", NULL }
    },
    /*
     * Source: IBM 3174 Character Set Ref, GA27-3831-02, March 1990
     */
-   { 2039, 20290, STRING_ENCODING_UNKNOWN, 0,
+   { 2039, 20290, STRING_ENCODING_IBM290, UNSUPPORTED, 0,
       { "IBM290", "cp290", "EBCDIC-JP-kana", "csIBM290", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2040, 20297, STRING_ENCODING_UNKNOWN, 0,
+   { 2040, 20297, STRING_ENCODING_IBM297, UNSUPPORTED, 0,
       { "IBM297", "cp297", "ebcdic-cp-fr", "csIBM297", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990, 
     *         IBM NLS RM p 11-11
     */
-   { 2041, 20420, STRING_ENCODING_UNKNOWN, 0,
+   { 2041, 20420, STRING_ENCODING_IBM420, UNSUPPORTED, 0,
       { "IBM420", "cp420", "ebcdic-cp-ar1", "csIBM420", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2042, 20423, STRING_ENCODING_UNKNOWN, 0,
+   { 2042, 20423, STRING_ENCODING_IBM423, UNSUPPORTED, 0,
       { "IBM423", "cp423", "ebcdic-cp-gr", "csIBM423", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2043, 20424, STRING_ENCODING_UNKNOWN, 0,
+   { 2043, 20424, STRING_ENCODING_IBM424, UNSUPPORTED, 0,
       { "IBM424", "cp424", "ebcdic-cp-he", "csIBM424", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2011, 437, STRING_ENCODING_UNKNOWN, 0,
+   { 2011, 437, STRING_ENCODING_IBM437, UNSUPPORTED, 0,
       { "IBM437", "cp437", "437", "csPC8CodePage437", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2044, 500, STRING_ENCODING_UNKNOWN, 0,
+   { 2044, 500, STRING_ENCODING_IBM500, UNSUPPORTED, 0,
       { "IBM500", "CP500", "ebcdic-cp-be", "ebcdic-cp-ch", "csIBM500", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2045, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2045, WINUNDEF, STRING_ENCODING_IBM851, UNSUPPORTED, 0,
       { "IBM851", "cp851", "851", "csIBM851", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2010, 852, STRING_ENCODING_UNKNOWN, 0,
+   { 2010, 852, STRING_ENCODING_IBM852, UNSUPPORTED, 0,
       { "IBM852", "cp852", "852", "csPCp852", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2046, 855, STRING_ENCODING_UNKNOWN, 0,
+   { 2046, 855, STRING_ENCODING_IBM855, UNSUPPORTED, 0,
       { "IBM855", "cp855", "855", "csIBM855", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2047, 857, STRING_ENCODING_UNKNOWN, 0,
+   { 2047, 857, STRING_ENCODING_IBM857, UNSUPPORTED, 0,
       { "IBM857", "cp857", "857", "csIBM857", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2048, 860, STRING_ENCODING_UNKNOWN, 0,
+   { 2048, 860, STRING_ENCODING_IBM860, UNSUPPORTED, 0,
       { "IBM860", "cp860", "860", "csIBM860", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2049, 861, STRING_ENCODING_UNKNOWN, 0,
+   { 2049, 861, STRING_ENCODING_IBM861, UNSUPPORTED, 0,
       { "IBM861", "cp861", "861", "cp-is", "csIBM861", NULL }
    },
    /*
     * Source: IBM Keyboard layouts and code pages, PN 07G4586 June 1991
     */
-   { 2050, 863, STRING_ENCODING_UNKNOWN, 0,
+   { 2050, 863, STRING_ENCODING_IBM863, UNSUPPORTED, 0,
       { "IBM863", "cp863", "863", "csIBM863", NULL }
    },
    /*
     * Source: IBM Keyboard layouts and code pages, PN 07G4586 June 1991
     */
-   { 2051, 864, STRING_ENCODING_UNKNOWN, 0,
+   { 2051, 864, STRING_ENCODING_IBM864, UNSUPPORTED, 0,
       { "IBM864", "cp864", "csIBM864", NULL }
    },
    /*
     * Source: IBM DOS 3.3 Ref (Abridged), 94X9575 (Feb 1987)
     */
-   { 2052, 865, STRING_ENCODING_UNKNOWN, 0,
+   { 2052, 865, STRING_ENCODING_IBM865, UNSUPPORTED, 0,
       { "IBM865", "cp865", "865", "csIBM865", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2053, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2053, WINUNDEF, STRING_ENCODING_IBM868, UNSUPPORTED, 0,
       { "IBM868", "CP868", "cp-ar", "csIBM868", NULL }
    },
    /*
     * Source: IBM Keyboard layouts and code pages, PN 07G4586 June 1991
     */
-   { 2054, 869, STRING_ENCODING_UNKNOWN, 0,
+   { 2054, 869, STRING_ENCODING_IBM869, UNSUPPORTED, 0,
       { "IBM869", "cp869", "869", "cp-gr", "csIBM869", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2055, 870, STRING_ENCODING_UNKNOWN, 0,
-      { "IBM870", "CP870", "ebcdic-cp-roece", "ebcdic-cp-yu", "csIBM870",
-         NULL }
+   { 2055, 870, STRING_ENCODING_IBM870, UNSUPPORTED, 0,
+      { "IBM870", "CP870", "ebcdic-cp-roece", "ebcdic-cp-yu", "csIBM870", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2056, 20871, STRING_ENCODING_UNKNOWN, 0,
+   { 2056, 20871, STRING_ENCODING_IBM871, UNSUPPORTED, 0,
       { "IBM871", "CP871", "ebcdic-cp-is", "csIBM871", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2057, 20880, STRING_ENCODING_UNKNOWN, 0,
+   { 2057, 20880, STRING_ENCODING_IBM880, UNSUPPORTED, 0,
       { "IBM880", "cp880", "EBCDIC-Cyrillic", "csIBM880", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2058, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2058, WINUNDEF, STRING_ENCODING_IBM891, UNSUPPORTED, 0,
       { "IBM891", "cp891", "csIBM891", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2059, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2059, WINUNDEF, STRING_ENCODING_IBM903, UNSUPPORTED, 0,
       { "IBM903", "cp903", "csIBM903", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2060, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2060, WINUNDEF, STRING_ENCODING_IBM904, UNSUPPORTED, 0,
       { "IBM904", "cp904", "904", "csIBBM904", NULL }
    },
    /*
     * Source: IBM 3174 Character Set Ref, GA27-3831-02, March 1990
     */
-   { 2061, 20905, STRING_ENCODING_UNKNOWN, 0,
+   { 2061, 20905, STRING_ENCODING_IBM905, UNSUPPORTED, 0,
       { "IBM905", "CP905", "ebcdic-cp-tr", "csIBM905", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2062, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2062, WINUNDEF, STRING_ENCODING_IBM918, UNSUPPORTED, 0,
       { "IBM918", "CP918", "ebcdic-cp-ar2", "csIBM918", NULL }
    },
    /*
     * Source: IBM NLS RM Vol2 SE09-8002-01, March 1990
     */
-   { 2063, 1026, STRING_ENCODING_UNKNOWN, 0,
+   { 2063, 1026, STRING_ENCODING_IBM1026, UNSUPPORTED, 0,
       { "IBM1026", "CP1026", "csIBM1026", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2064, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2064, WINUNDEF, STRING_ENCODING_EBCDIC_AT_DE, UNSUPPORTED, 0,
       { "EBCDIC-AT-DE", "csIBMEBCDICATDE", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 
     */
-   { 2065, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2065, WINUNDEF, STRING_ENCODING_EBCDIC_AT_DE_A, UNSUPPORTED, 0,
       { "EBCDIC-AT-DE-A", "csEBCDICATDEA", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2066, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2066, WINUNDEF, STRING_ENCODING_EBCDIC_CA_FR, UNSUPPORTED, 0,
       { "EBCDIC-CA-FR", "csEBCDICCAFR", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2067, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2067, WINUNDEF, STRING_ENCODING_EBCDIC_DK_NO, UNSUPPORTED, 0,
       { "EBCDIC-DK-NO", "csEBCDICDKNO", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2068, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2068, WINUNDEF, STRING_ENCODING_EBCDIC_DK_NO_A, UNSUPPORTED, 0,
       { "EBCDIC-DK-NO-A", "csEBCDICDKNOA", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2069, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2069, WINUNDEF, STRING_ENCODING_EBCDIC_FI_SE, UNSUPPORTED, 0,
       { "EBCDIC-FI-SE", "csEBCDICFISE", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2070, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2070, WINUNDEF, STRING_ENCODING_EBCDIC_FI_SE_A, UNSUPPORTED, 0,
       { "EBCDIC-FI-SE-A", "csEBCDICFISEA", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2071, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2071, WINUNDEF, STRING_ENCODING_EBCDIC_FR, UNSUPPORTED, 0,
       { "EBCDIC-FR", "csEBCDICFR", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2072, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2072, WINUNDEF, STRING_ENCODING_EBCDIC_IT, UNSUPPORTED, 0,
       { "EBCDIC-IT", "csEBCDICIT", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2073, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2073, WINUNDEF, STRING_ENCODING_EBCDIC_PT, UNSUPPORTED, 0,
       { "EBCDIC-PT", "csEBCDICPT", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2074, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2074, WINUNDEF, STRING_ENCODING_EBCDIC_ES, UNSUPPORTED, 0,
       { "EBCDIC-ES", "csEBCDICES", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2075, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2075, WINUNDEF, STRING_ENCODING_EBCDIC_ES_A, UNSUPPORTED, 0,
       { "EBCDIC-ES-A", "csEBCDICESA", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2076, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2076, WINUNDEF, STRING_ENCODING_EBCDIC_ES_S, UNSUPPORTED, 0,
       { "EBCDIC-ES-S", "csEBCDICESS", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2077, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2077, WINUNDEF, STRING_ENCODING_EBCDIC_UK, UNSUPPORTED, 0,
       { "EBCDIC-UK", "csEBCDICUK", NULL }
    },
    /*
     * Source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
     */
-   { 2078, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2078, WINUNDEF, STRING_ENCODING_EBCDIC_US, UNSUPPORTED, 0,
       { "EBCDIC-US", "csEBCDICUS", NULL }
    },
-   { 2079, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2079, WINUNDEF, STRING_ENCODING_UNKNOWN_8BIT, UNSUPPORTED, 0,
       { "UNKNOWN-8BIT", "csUnknown8BiT", NULL }
    },
    /*
     * Source: RFC 1345, also known as "mnemonic+ascii+38"
     */
-   { 2080, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2080, WINUNDEF, STRING_ENCODING_MNEMONIC, UNSUPPORTED, 0,
       { "MNEMONIC", "csMnemonic", NULL }
    },
    /*
     * Source: RFC 1345, also known as "mnemonic+ascii+8200"
     */
-   { 2081, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2081, WINUNDEF, STRING_ENCODING_MNEM, UNSUPPORTED, 0,
       { "MNEM", "csMnem", NULL }
    },
    /*
     * Source: RFC 1456
     */
-   { 2082, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2082, WINUNDEF, STRING_ENCODING_VISCII, UNSUPPORTED, 0,
       { "VISCII", "csVISCII", NULL }
    },
    /*
     * Source: RFC 1456
     */
-   { 2083, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2083, WINUNDEF, STRING_ENCODING_VIQR, UNSUPPORTED, 0,
       { "VIQR", "csVIQR", NULL }
    },
    /*
     * Source: RFC 1489, based on GOST-19768-74, ISO-6937/8, 
     *         INIS-Cyrillic, ISO-5427.
     */
-   { 2084, 20866, STRING_ENCODING_UNKNOWN, 0,
+   { 2084, 20866, STRING_ENCODING_KOI8_R, UNSUPPORTED, 0,
       { "KOI8-R", "csKOI8R", NULL }
    },
    /*
     * Source: RFC 1842, RFC 1843 [RFC1842, RFC1843]
     */
-   { 2085, 52936, STRING_ENCODING_UNKNOWN, 0,
+   { 2085, 52936, STRING_ENCODING_HZ_GB_2312, SUPPORTED, 0,
       { "HZ-GB-2312", NULL }
    },
    /*
     * Source: IBM NLDG Volume 2 (SE09-8002-03) August 1994
     */
-   { 2086, 866, STRING_ENCODING_UNKNOWN, 0,
+   { 2086, 866, STRING_ENCODING_IBM866, UNSUPPORTED, 0,
       { "IBM866", "cp866", "866", "csIBM866", NULL }
    },
    /*
     * Source: HP PCL 5 Comparison Guide (P/N 5021-0329) pp B-13, 1996
     */
-   { 2087, 775, STRING_ENCODING_UNKNOWN, 0,
+   { 2087, 775, STRING_ENCODING_IBM775, UNSUPPORTED, 0,
       { "IBM775", "cp775", "csPC775Baltic", NULL }
    },
    /*
     * Source: RFC 2319
     */
-   { 2088, 21866, STRING_ENCODING_UNKNOWN, 0,
+   { 2088, 21866, STRING_ENCODING_KOI8_U, UNSUPPORTED, 0,
       { "KOI8-U", NULL }
    },
    /*
     * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM00858) 
     *   [Mahdi]
     */
-   { 2089, 858, STRING_ENCODING_UNKNOWN, 0,
+   { 2089, 858, STRING_ENCODING_IBM00858, UNSUPPORTED, 0,
       { "IBM00858", "CCSID00858", "CP00858", "PC-Multilingual-850+euro", NULL }
    },
    /*
-    * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM00924)i
-        [Mahdi]
+    * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM00924)
+    *   [Mahdi]
     */
-   { 2090, 20924, STRING_ENCODING_UNKNOWN, 0,
+   { 2090, 20924, STRING_ENCODING_IBM00924, UNSUPPORTED, 0,
       { "IBM00924", "CCSID00924", "CP00924", "ebcdic-Latin9--euro", NULL }
    },
    /*
     * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01140)
     *    [Mahdi]
     */
-   { 2091, 1140, STRING_ENCODING_UNKNOWN, 0,
+   { 2091, 1140, STRING_ENCODING_IBM01140, UNSUPPORTED, 0,
       { "IBM01140", "CCSID01140", "CP01140", "ebcdic-us-37+euro", NULL }
    },
    /*
     * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01141)
-        [Mahdi]
+    *    [Mahdi]
     */
-   { 2092, 1141, STRING_ENCODING_UNKNOWN, 0,
+   { 2092, 1141, STRING_ENCODING_IBM01141, UNSUPPORTED, 0,
       { "IBM01141", "CCSID01141", "CP01141", "ebcdic-de-273+euro", NULL }
    },
    /*
     * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01142)
     *    [Mahdi]
     */
-   { 2093, 1142, STRING_ENCODING_UNKNOWN, 0,
+   { 2093, 1142, STRING_ENCODING_IBM01142, UNSUPPORTED, 0,
       { "IBM01142", "CCSID01142", "CP01142", "ebcdic-dk-277+euro",
         "ebcdic-no-277+euro", NULL }
    },
@@ -1598,7 +1603,7 @@ static struct xRef {
     * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01143)
     *    [Mahdi]
     */
-   { 2094, 1143, STRING_ENCODING_UNKNOWN, 0,
+   { 2094, 1143, STRING_ENCODING_IBM01143, UNSUPPORTED, 0,
       { "IBM01143", "CCSID01143", "CP01143", "ebcdic-fi-278+euro",
         "ebcdic-se-278+euro", NULL }
    },
@@ -1606,49 +1611,49 @@ static struct xRef {
     * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01144)
     *    [Mahdi]
     */
-   { 2095, 1144, STRING_ENCODING_UNKNOWN, 0,
+   { 2095, 1144, STRING_ENCODING_IBM01144, UNSUPPORTED, 0,
       { "IBM01144", "CCSID01144", "CP01144", "ebcdic-it-280+euro", NULL }
    },
    /*
     * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01145)
     *    [Mahdi]
     */
-   { 2096, 1145, STRING_ENCODING_UNKNOWN, 0,
+   { 2096, 1145, STRING_ENCODING_IBM01145, UNSUPPORTED, 0,
       { "IBM01145", "CCSID01145", "CP01145", "ebcdic-es-284+euro", NULL }
    },
    /*
     * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01146)
     *    [Mahdi]
     */
-   { 2097, 1146, STRING_ENCODING_UNKNOWN, 0,
+   { 2097, 1146, STRING_ENCODING_IBM01146, UNSUPPORTED, 0,
       { "IBM01146", "CCSID01146", "CP01146", "ebcdic-gb-285+euro", NULL }
    },
    /*
     * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01147)
     *    [Mahdi]
     */
-   { 2098, 1147, STRING_ENCODING_UNKNOWN, 0,
+   { 2098, 1147, STRING_ENCODING_IBM01147, UNSUPPORTED, 0,
       { "IBM01147", "CCSID01147", "CP01147", "ebcdic-fr-297+euro", NULL }
    },
    /*
-    * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01148)i
+    * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01148)
     *    [Mahdi]
     */
-   { 2099, 1148, STRING_ENCODING_UNKNOWN, 0,
+   { 2099, 1148, STRING_ENCODING_IBM01148, UNSUPPORTED, 0,
       { "IBM01148", "CCSID01148", "CP01148", "ebcdic-international-500+euro",
          NULL }
    },
    /*
-    * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01149)i
+    * Source: IBM See (http://www.iana.org/assignments/charset-reg/IBM01149)
     *    [Mahdi]
     */
-   { 2100, 1149, STRING_ENCODING_UNKNOWN, 0,
+   { 2100, 1149, STRING_ENCODING_IBM01149, UNSUPPORTED, 0,
       { "IBM01149", "CCSID01149", "CP01149", "ebcdic-is-871+euro", NULL }
    },
    /*
     * Source:   See (http://www.iana.org/assignments/charset-reg/Big5-HKSCS) 
     */
-   { 2101, WINUNDEF, STRING_ENCODING_BIG_5_HK, 0,
+   { 2101, WINUNDEF, STRING_ENCODING_BIG_5_HK, UNSUPPORTED, 0,
       { "Big5-HKSCS", NULL }
    },
    /*
@@ -1656,153 +1661,156 @@ static struct xRef {
     * http://www-1.ibm.com/servers/eserver/iseries/software/globalization/
     *        pdf/cp01047z.pdf
     */
-   { 2102, 1047, STRING_ENCODING_UNKNOWN, 0,
+   { 2102, 1047, STRING_ENCODING_IBM1047, UNSUPPORTED, 0,
       { "IBM1047", "IBM-1047", NULL }
    },
    /*
     * Source: See (http://www.iana.org/assignments/charset-reg/PTCP154)
     */
-   { 2103, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2103, WINUNDEF, STRING_ENCODING_PTCP154, UNSUPPORTED, 0,
       { "PTCP154", "csPTCP154", "PT154", "CP154", "Cyrillic-Asian", NULL }
    },
    /*
     * Source:  See (http://www.amiga.ultranet.ru/Amiga-1251.html)
     */
-   { 2104, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2104, WINUNDEF, STRING_ENCODING_AMIGA_1251, UNSUPPORTED, 0,
       { "Amiga-1251", "Ami1251", "Amiga1251", "Ami-1251", NULL }
    },
    /*
     * Source:  See <http://www.iana.org/assignments/charset-reg/KOI7-switched>
     * Aliases:  None
     */
-   { 2105, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2105, WINUNDEF, STRING_ENCODING_KOI7_SWITCHED, UNSUPPORTED, 0,
       { "KOI7-switched", NULL }
    },
    /*
-    * Source: See <http://www.iana.org/assignments/charset-reg/BRF>                    [Thibault]
+    * Source: See <http://www.iana.org/assignments/charset-reg/BRF>
+    * [Thibault]
     */
-   { 2106, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2106, WINUNDEF, STRING_ENCODING_BRF, UNSUPPORTED, 0,
       { "BRF", "csBRF", NULL }
    },
    /*
-    * Source: See <http://www.iana.org/assignments/charset-reg/TSCII>           [Kalyanasundaram]
+    * Source: See <http://www.iana.org/assignments/charset-reg/TSCII>
+    * [Kalyanasundaram]
     */
-   { 2107, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2107, WINUNDEF, STRING_ENCODING_TSCII, UNSUPPORTED, 0,
       { "TSCII", "csTSCII", NULL }
    },
    /*
     * Source: Microsoft  
     *  (http://www.iana.org/assignments/charset-reg/windows-1250) [Lazhintseva]
     */
-   { 2250, 1250, STRING_ENCODING_WINDOWS_1250, 0,
+   { 2250, 1250, STRING_ENCODING_WINDOWS_1250, SUPPORTED, 0,
       { "windows-1250", NULL }
    },
    /*
     * Source: Microsoft
     *  (http://www.iana.org/assignments/charset-reg/windows-1251) [Lazhintseva]
     */
-   { 2251, 1251, STRING_ENCODING_WINDOWS_1251, 0,
+   { 2251, 1251, STRING_ENCODING_WINDOWS_1251, SUPPORTED, 0,
       { "windows-1251", NULL }
    },
    /*
     * Source: Microsoft 
-    *  (http://www.iana.org/assignments/charset-reg/windows-1252)       [Wendt]
+    *  (http://www.iana.org/assignments/charset-reg/windows-1252) [Wendt]
     */
-   { 2252, 1252, STRING_ENCODING_WINDOWS_1252, 0,
+   { 2252, 1252, STRING_ENCODING_WINDOWS_1252, SUPPORTED, 0,
       { "windows-1252", NULL }
    },
    /*
     * Source: Microsoft 
     *  (http://www.iana.org/assignments/charset-reg/windows-1253) [Lazhintseva]
     */
-   { 2253, 1253, STRING_ENCODING_WINDOWS_1253, 0,
+   { 2253, 1253, STRING_ENCODING_WINDOWS_1253, SUPPORTED, 0,
       { "windows-1253", NULL }
    },
    /*
     * Source: Microsoft
     *  (http://www.iana.org/assignments/charset-reg/windows-1254) [Lazhintseva]
     */
-   { 2254, 1254, STRING_ENCODING_WINDOWS_1254, 0,
+   { 2254, 1254, STRING_ENCODING_WINDOWS_1254, SUPPORTED, 0,
       { "windows-1254", NULL }
    },
    /*
     * Source: Microsoft 
     *  (http://www.iana.org/assignments/charset-reg/windows-1255) [Lazhintseva]
     */
-   { 2255, 1255, STRING_ENCODING_WINDOWS_1255, 0,
+   { 2255, 1255, STRING_ENCODING_WINDOWS_1255, SUPPORTED, 0,
       { "windows-1255", NULL }
    },
    /*
     * Source: Microsoft
     *  (http://www.iana.org/assignments/charset-reg/windows-1256) [Lazhintseva]
     */
-   { 2256, 1256, STRING_ENCODING_WINDOWS_1256, 0,
+   { 2256, 1256, STRING_ENCODING_WINDOWS_1256, SUPPORTED, 0,
       { "windows-1256", NULL }
    },
    /*
     * Source: Microsoft 
     *  (http://www.iana.org/assignments/charset-reg/windows-1257) [Lazhintseva]
     */
-   { 2257, 1257, STRING_ENCODING_WINDOWS_1257, 0,
+   { 2257, 1257, STRING_ENCODING_WINDOWS_1257, SUPPORTED, 0,
       { "windows-1257", NULL }
    },
    /*
     * Source: Microsoft
     *  (http://www.iana.org/assignments/charset-reg/windows-1258) [Lazhintseva]
     */
-   { 2258, 1258, STRING_ENCODING_WINDOWS_1258, 0,
+   { 2258, 1258, STRING_ENCODING_WINDOWS_1258, SUPPORTED, 0,
       { "windows-1258", NULL }
    },
    /*
-    * Source: Thai Industrial Standards Institute (TISI)                             [Tantsetthi]
+    * Source: Thai Industrial Standards Institute (TISI)
+    *    [Tantsetthi]
     */
-   { 2259, WINUNDEF, STRING_ENCODING_UNKNOWN, 0,
+   { 2259, WINUNDEF, STRING_ENCODING_TIS_620, SUPPORTED, 0,
       { "TIS-620", NULL }
    },
    /*
-    * Windows specific entries for which there is no corresponding iana mapping
+    * Windows specific entries for which there is no corresponding IANA mapping
     */
-
+   
    /*
     * Windows-709: Arabic (ASMO-449+, BCON V4)
     */
-   { MIBUNDEF, 709, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 709, STRING_ENCODING_WINDOWS_709, UNSUPPORTED, 0,
       { "Windows-709", "ASMO-449+", "BCON_V4", NULL }
    },
    /*
     * Windows-710: Arabic - Transparent Arabic
     */
-   { MIBUNDEF, 710, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 710, STRING_ENCODING_WINDOWS_710, UNSUPPORTED, 0,
       { "Windows-710", NULL }
    },
    /*
     * DOS-720: Arabic (Transparent ASMO); Arabic (DOS)
     */
-   { MIBUNDEF, 720, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 720, STRING_ENCODING_WINDOWS_720, UNSUPPORTED, 0,
       { "Windows-720", "DOS-720", "DOS_720", NULL }
    },
    /*
     * ibm737: OEM Greek (formerly 437G); Greek (DOS)
     */
-   { MIBUNDEF, 737, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 737, STRING_ENCODING_WINDOWS_737, UNSUPPORTED, 0,
       { "Windows-737", "IBM737", NULL }
    },
    /*
     * ibm775: OEM Baltic; Baltic (DOS)
     */
-   { MIBUNDEF, 775, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 775, STRING_ENCODING_WINDOWS_775, UNSUPPORTED, 0,
       { "Windows-775", "IBM775", NULL }
    },
    /*
     * cp875: IBM EBCDIC Greek Modern
     */
-   { MIBUNDEF, 875, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 875, STRING_ENCODING_WINDOWS_875, UNSUPPORTED, 0,
       { "Windows-875", "cp875", NULL }
    },
    /*
     * Johab: Korean (Johab)
     */
-   { MIBUNDEF, 1361, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 1361, STRING_ENCODING_WINDOWS_1361, UNSUPPORTED, 0,
       { "Windows-1361", "Johab", NULL }
    },
    /*
@@ -1810,342 +1818,342 @@ static struct xRef {
     * using the encoding names "mac" and "macintosh"
     * is probably a bad idea here
     */
-   { MIBUNDEF, 10000, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10000, STRING_ENCODING_WINDOWS_10000, UNSUPPORTED, 0,
       { "Windows-10000", NULL }
    },
    /*
     * x-mac-japanese: Japanese (Mac)
     */
-   { MIBUNDEF, 10001, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10001, STRING_ENCODING_WINDOWS_10001, UNSUPPORTED, 0,
       { "Windows-10001", "x-mac-japanese", NULL }
    },
    /*
     * x-mac-chinesetrad: MAC Traditional Chinese (Big5);
     *                    Chinese Traditional (Mac)
     */
-   { MIBUNDEF, 10002, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10002, STRING_ENCODING_WINDOWS_10002, UNSUPPORTED, 0,
       { "Windows-10002", "x-mac-chinesetrad", NULL }
    },
    /*
     * x-mac-korean: Korean (Mac)
     */
-   { MIBUNDEF, 10003, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10003, STRING_ENCODING_WINDOWS_10003, UNSUPPORTED, 0,
       { "Windows-10003", "x-mac-korean", NULL }
    },
    /*
     * x-mac-arabic: Arabic (Mac)
     */
-   { MIBUNDEF, 10004, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10004, STRING_ENCODING_WINDOWS_10004, UNSUPPORTED, 0,
       { "Windows-10004", "x-mac-arabic", NULL }
    },
    /*
     * x-mac-hebrew: Hebrew (Mac)
     */
-   { MIBUNDEF, 10005, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10005, STRING_ENCODING_WINDOWS_10005, UNSUPPORTED, 0,
       { "Windows-10005", "x-mac-hebrew", NULL }
    },
    /*
     * x-mac-greek: Greek (Mac)
     */
-   { MIBUNDEF, 10006, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10006, STRING_ENCODING_WINDOWS_10006, UNSUPPORTED, 0,
       { "Windows-10006", "x-mac-greek", NULL }
    },
    /*
     * x-mac-cyrillic: Cyrillic (Mac)
     */
-   { MIBUNDEF, 10007, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10007, STRING_ENCODING_WINDOWS_10007, UNSUPPORTED, 0,
       { "Windows-10007", "x-mac-cyrillic", NULL }
    },
    /*
     * x-mac-chinesesimp: MAC Simplified Chinese (GB 2312);
     *                    Chinese Simplified (Mac)
     */
-   { MIBUNDEF, 10008, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10008, STRING_ENCODING_WINDOWS_10008, UNSUPPORTED, 0,
       { "Windows-10008", "x-mac-chinesesimp", NULL }
    },
    /*
     * x-mac-romanian: Romanian (Mac)
     */
-   { MIBUNDEF, 10010, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10010, STRING_ENCODING_WINDOWS_10010, UNSUPPORTED, 0,
       { "Windows-10010", "x-mac-romanian", NULL }
    },
    /*
     * x-mac-ukrainian: Ukrainian (Mac)
     */
-   { MIBUNDEF, 10017, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10017, STRING_ENCODING_WINDOWS_10017, UNSUPPORTED, 0,
       { "Windows-10017", "x-mac-ukrainian", NULL }
    },
    /*
     * x-mac-thai: Thai (Mac)
     */
-   { MIBUNDEF, 10021, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10021, STRING_ENCODING_WINDOWS_10021, UNSUPPORTED, 0,
       { "Windows-10021", "x-mac-thai", NULL }
    },
    /*
     * x-mac-ce: MAC Latin 2; Central European (Mac)
     */
-   { MIBUNDEF, 10029, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10029, STRING_ENCODING_WINDOWS_10029, UNSUPPORTED, 0,
       { "Windows-10029", "x-mac-ce", NULL }
    },
    /*
     * x-mac-icelandic: Icelandic (Mac)
     */
-   { MIBUNDEF, 10079, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10079, STRING_ENCODING_WINDOWS_10079, UNSUPPORTED, 0,
       { "Windows-10079", "x-mac-icelandic", NULL }
    },
    /*
     * x-mac-turkish: Turkish (Mac)
     */
-   { MIBUNDEF, 10081, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10081, STRING_ENCODING_WINDOWS_10081, UNSUPPORTED, 0,
       { "Windows-10081", "x-mac-turkish", NULL }
    },
    /*
     * x-mac-croatian: Croatian (Mac)
     */
-   { MIBUNDEF, 10082, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 10082, STRING_ENCODING_WINDOWS_10082, UNSUPPORTED, 0,
       { "Windows-10082", "x-mac-croatian", NULL }
    },
    /*
     * x-Chinese_CNS: CNS Taiwan; Chinese Traditional (CNS)
     */
-   { MIBUNDEF, 20000, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20000, STRING_ENCODING_WINDOWS_20000, UNSUPPORTED, 0,
       { "Windows-20000", "x-Chinese_CNS", NULL }
    },
    /*
     * x-cp20001: TCA Taiwan
     */
-   { MIBUNDEF, 20001, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20001, STRING_ENCODING_WINDOWS_20001, UNSUPPORTED, 0,
       { "Windows-20001", "x-cp20001", NULL }
    },
    /*
     * x_Chinese-Eten: Eten Taiwan; Chinese Traditional (Eten)
     */
-   { MIBUNDEF, 20002, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20002, STRING_ENCODING_WINDOWS_20002, UNSUPPORTED, 0,
       { "Windows-20002", "x_Chinese-Eten", NULL }
    },
    /*
     * x-cp20003: IBM5550 Taiwan
     */
-   { MIBUNDEF, 20003, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20003, STRING_ENCODING_WINDOWS_20003, UNSUPPORTED, 0,
       { "Windows-20003", "x-cp20003", NULL }
    },
    /*
     * x-cp20004: TeleText Taiwan
     */
-   { MIBUNDEF, 20004, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20004, STRING_ENCODING_WINDOWS_20004, UNSUPPORTED, 0,
       { "Windows-20004", "x-cp20004", NULL }
    },
    /*
     * x-cp20005: Wang Taiwan
     */
-   { MIBUNDEF, 20005, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20005, STRING_ENCODING_WINDOWS_20005, UNSUPPORTED, 0,
       { "Windows-20005", "x-cp20005", NULL }
    },
    /*
     * x-IA5: IA5 (IRV International Alphabet No. 5, 7-bit);
     *        Western European (IA5)
     */
-   { MIBUNDEF, 20105, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20105, STRING_ENCODING_WINDOWS_20105, UNSUPPORTED, 0,
       { "Windows-20105", "x-IA5", NULL }
    },
    /*
     * x-IA5-German: IA5 German (7-bit)
     */
-   { MIBUNDEF, 20106, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20106, STRING_ENCODING_WINDOWS_20106, UNSUPPORTED, 0,
       { "Windows-20106", "x-IA5-German", NULL }
    },
    /*
     * x-IA5-Swedish: IA5 Swedish (7-bit)
     */
-   { MIBUNDEF, 20107, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20107, STRING_ENCODING_WINDOWS_20107, UNSUPPORTED, 0,
       { "Windows-20107", "x-IA5-Swedish", NULL }
    },
    /*
     * x-IA5-Norwegian: IA5 Norwegian (7-bit)
     */
-   { MIBUNDEF, 20108, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20108, STRING_ENCODING_WINDOWS_20108, UNSUPPORTED, 0,
       { "Windows-20108", "x-IA5-Norwegian", NULL }
    },
    /*
     * x-cp20269: ISO 6937 Non-Spacing Accent
     */
-   { MIBUNDEF, 20269, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20269, STRING_ENCODING_WINDOWS_20269, UNSUPPORTED, 0,
       { "Windows-20269", "x-cp20269", NULL }
    },
    /*
     * x-EBCDIC-KoreanExtended: IBM EBCDIC Korean Extended
     */
-   { MIBUNDEF, 20833, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20833, STRING_ENCODING_WINDOWS_20833, UNSUPPORTED, 0,
       { "Windows-20833", "x-EBCDIC-KoreanExtended", NULL }
    },
    /*
     * IBM-Thai: IBM EBCDIC Thai
     */
-   { MIBUNDEF, 20838, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20838, STRING_ENCODING_WINDOWS_20838, UNSUPPORTED, 0,
       { "Windows-20838", "IBM-Thai", NULL }
    },
    /*
     * x-cp20949: Korean Wansung
     */
-   { MIBUNDEF, 20949, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 20949, STRING_ENCODING_WINDOWS_20949, UNSUPPORTED, 0,
       { "Windows-20949", "x-cp20949", NULL }
    },
    /*
     * cp1025: IBM EBCDIC Cyrillic Serbian-Bulgarian
     */
-   { MIBUNDEF, 21025, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 21025, STRING_ENCODING_WINDOWS_21025, UNSUPPORTED, 0,
       { "Windows-21025", "cp1025", NULL }
    },
    /*
     * Windows-21027: (deprecated)
     */
-   { MIBUNDEF, 21027, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 21027, STRING_ENCODING_WINDOWS_21027, UNSUPPORTED, 0,
       { "Windows-21027", NULL }
    },
    /*
     * x-Europa: Europa 3
     */
-   { MIBUNDEF, 29001, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 29001, STRING_ENCODING_WINDOWS_29001, UNSUPPORTED, 0,
       { "Windows-29001", "x-Europa", NULL }
    },
    /*
     * iso-8859-8-i: ISO 8859-8 Hebrew; Hebrew (ISO-Logical)
     */
-   { MIBUNDEF, 38598, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 38598, STRING_ENCODING_WINDOWS_38598, UNSUPPORTED, 0,
       { "Windows-38598", "iso-8859-8-i", NULL }
    },
    /*
     * csISO2022JP: ISO 2022 Japanese with halfwidth Katakana;
     *              Japanese (JIS-Allow 1 byte Kana)
     */
-   { MIBUNDEF, 50221, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 50221, STRING_ENCODING_WINDOWS_50221, UNSUPPORTED, 0,
       { "Windows-50221", "csISO2022JP", NULL }
    },
    /*
     * iso-2022-jp: ISO 2022 Japanese JIS X 0201-1989;
     *              Japanese (JIS-Allow 1 byte Kana - SO/SI)
     */
-   { MIBUNDEF, 50222, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 50222, STRING_ENCODING_WINDOWS_50222, UNSUPPORTED, 0,
       { "Windows-50222", "iso-2022-jp", NULL }
    },
    /*
     * Windows-50229: ISO 2022 Traditional Chinese
     */
-   { MIBUNDEF, 50229, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 50229, STRING_ENCODING_WINDOWS_50229, UNSUPPORTED, 0,
       { "Windows-50229", NULL }
    },
    /*
     * Windows-50930: EBCDIC Japanese (Katakana) Extended
     */
-   { MIBUNDEF, 50930, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 50930, STRING_ENCODING_WINDOWS_50930, UNSUPPORTED, 0,
       { "Windows-50930", NULL }
    },
    /*
     * Windows-50931: EBCDIC US-Canada and Japanese
     */
-   { MIBUNDEF, 50931, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 50931, STRING_ENCODING_WINDOWS_50931, UNSUPPORTED, 0,
       { "Windows-50931", NULL }
    },
    /*
     * Windows-50933: EBCDIC Korean Extended and Korean
     */
-   { MIBUNDEF, 50933, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 50933, STRING_ENCODING_WINDOWS_50933, UNSUPPORTED, 0,
       { "Windows-50933", NULL }
    },
    /*
     * Windows-50935: EBCDIC Simplified Chinese Extended and Simplified Chinese
     */
-   { MIBUNDEF, 50935, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 50935, STRING_ENCODING_WINDOWS_50935, UNSUPPORTED, 0,
       { "Windows-50935", NULL }
    },
    /*
     * Windows-50936: EBCDIC Simplified Chinese
     */
-   { MIBUNDEF, 50936, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 50936, STRING_ENCODING_WINDOWS_50936, UNSUPPORTED, 0,
       { "Windows-50936", NULL }
    },
    /*
     * Windows-50937: EBCDIC US-Canada and Traditional Chinese
     */
-   { MIBUNDEF, 50937, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 50937, STRING_ENCODING_WINDOWS_50937, UNSUPPORTED, 0,
       { "Windows-50937", NULL }
    },
    /*
     * Windows-50939: EBCDIC Japanese (Latin) Extended and Japanese
     */
-   { MIBUNDEF, 50939, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 50939, STRING_ENCODING_WINDOWS_50939, UNSUPPORTED, 0,
       { "Windows-50939", NULL }
    },
    /*
     * EUC-CN: EUC Simplified Chinese; Chinese Simplified (EUC)
     */
-   { MIBUNDEF, 51936, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 51936, STRING_ENCODING_WINDOWS_51936, UNSUPPORTED, 0,
       { "Windows-51936", "EUC-CN", NULL }
    },
    /*
     * Windows-51950: EUC Traditional Chinese
     */
-   { MIBUNDEF, 51950, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 51950, STRING_ENCODING_WINDOWS_51950, UNSUPPORTED, 0,
       { "Windows-51950", NULL }
    },
    /*
     * x-iscii-de: ISCII Devanagari
     */
-   { MIBUNDEF, 57002, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 57002, STRING_ENCODING_WINDOWS_57002, SUPPORTED, 0,
       { "Windows-57002", "x-iscii-de", NULL }
    },
    /*
     * x-iscii-be: ISCII Bengali
     */
-   { MIBUNDEF, 57003, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 57003, STRING_ENCODING_WINDOWS_57003, SUPPORTED, 0,
       { "Windows-57003", "x-iscii-be", NULL }
    },
    /*
     * x-iscii-ta: ISCII Tamil
     */
-   { MIBUNDEF, 57004, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 57004, STRING_ENCODING_WINDOWS_57004, SUPPORTED, 0,
       { "Windows-57004", "x-iscii-ta", NULL }
    },
    /*
     * x-iscii-te: ISCII Telugu
     */
-   { MIBUNDEF, 57005, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 57005, STRING_ENCODING_WINDOWS_57005, SUPPORTED, 0,
       { "Windows-57005", "x-iscii-te", NULL }
    },
    /*
     * x-iscii-as: ISCII Assamese
     */
-   { MIBUNDEF, 57006, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 57006, STRING_ENCODING_WINDOWS_57006, SUPPORTED, 0,
       { "Windows-57006", "x-iscii-as", NULL }
    },
    /*
     * x-iscii-or: ISCII Oriya
     */
-   { MIBUNDEF, 57007, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 57007, STRING_ENCODING_WINDOWS_57007, SUPPORTED, 0,
       { "Windows-57007", "x-iscii-or", NULL }
    },
    /*
     * x-iscii-ka: ISCII Kannada
     */
-   { MIBUNDEF, 57008, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 57008, STRING_ENCODING_WINDOWS_57008, SUPPORTED, 0,
       { "Windows-57008", "x-iscii-ka", NULL }
    },
    /*
     * x-iscii-ma: ISCII Malayalam
     */
-   { MIBUNDEF, 57009, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 57009, STRING_ENCODING_WINDOWS_57009, SUPPORTED, 0,
       { "Windows-57009", "x-iscii-ma", NULL }
    },
    /*
     * x-iscii-gu: ISCII Gujarati
     */
-   { MIBUNDEF, 57010, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 57010, STRING_ENCODING_WINDOWS_57010, SUPPORTED, 0,
       { "Windows-57010", "x-iscii-gu", NULL }
    },
    /*
     * x-iscii-pa: ISCII Punjabi
     */
-   { MIBUNDEF, 57011, STRING_ENCODING_UNKNOWN, 0,
+   { MIBUNDEF, 57011, STRING_ENCODING_WINDOWS_57011, SUPPORTED, 0,
       { "Windows-57011", "x-iscii-pa", NULL }
    },
 };
@@ -2224,10 +2232,10 @@ UnicodeIANALookup(const char *encodingName) // IN
    
    /*
     * check for Windows-xxxx encoding names generated from GetACP()
-    * code page numbers, see:  CodeSet_GetCurrentCodeSet()
+    * code page numbers, see: CodeSetOld_GetCurrentCodeSet()
     */
-   if (!strncmp(encodingName, "windows", strlen("windows"))) {
-      p = encodingName + strlen("windows") + 1;
+   if (!strncmp(encodingName, "windows-", strlen("windows-"))) {
+      p = encodingName + strlen("windows-");
       acp = 0;
       while (*p && isdigit((int)*p)) {
          acp *= 10;
@@ -2270,43 +2278,6 @@ done:
 }
 
 
-/*
- *-----------------------------------------------------------------------------
- *
- * UnicodeIANANameLookup --
- *
- *      Lookup an encoding name in the IANA cross reference table.
- *
- * Results:
- *      The IANA preferred Mime name for the encoding in NUL-terminated
- *      US-ASCII bytes or the argument if no match is found.
- *
- * Side effects:
- *      None
- *
- *-----------------------------------------------------------------------------
- */
-
-static const char *
-UnicodeIANANameLookup(const char *encodingName) // IN
-{
-   int pref;
-   int idx;
-
-   idx = UnicodeIANALookup(encodingName);
-   if (idx < 0) {
-      /*
-       * Did not find a matching name.  Don't validate encoding names
-       * here, unrecognized encodings will be caught when converting
-       * from name to enum.
-       */
-      return encodingName;
-   }
-   pref = xRef[idx].preferredMime;            
-   return xRef[idx].names[pref];
-}
-
-
 /*
  *-----------------------------------------------------------------------------
  *
@@ -2331,36 +2302,22 @@ Unicode_EncodingEnumToName(StringEncoding encoding) // IN
 {
    int i;
 
-   // STRING_ENCODING_UNKNOWN shouldn't be hit at runtime.
-   ASSERT(encoding != STRING_ENCODING_UNKNOWN);
+   encoding = Unicode_ResolveEncoding(encoding);
 
-   switch (encoding) {
-
-   case STRING_ENCODING_UNKNOWN:
-      /*
-       * We will only get here in non-debug builds.  Fall through to
-       * the process-default encoding name.
-       */
-   case STRING_ENCODING_DEFAULT: 
-      return UnicodeIANANameLookup(CodeSet_GetCurrentCodeSet());
-      break;
+   /*
+    * Look for a match in the xRef table. If found, return the
+    * preferred MIME name. Whether ICU supports this encoding or
+    * not isn't material here.
+    */
 
-   default:
-      /*
-       * Look for a match in the xRef table. If found, return the
-       * preferred MIME name. Whether ICU supports this encoding or
-       * not isn't material here.
-       */
-      for (i = 0; i < ARRAYSIZE(xRef); i++) {
-         if (encoding == xRef[i].encoding) {
-            return xRef[i].names[xRef[i].preferredMime];
-         }
+   for (i = 0; i < ARRAYSIZE(xRef); i++) {
+      if (encoding == xRef[i].encoding) {
+        return xRef[i].names[xRef[i].preferredMime];
       }
-
-      Log("%s: Unknown encoding %d, returning default (UTF-8).",
-          __FUNCTION__, encoding);
-      return "UTF-8";
    }
+
+   Log("%s: Unknown encoding %d.\n", __FUNCTION__, encoding);
+   NOT_REACHED();
 }
 
 
@@ -2374,7 +2331,7 @@ Unicode_EncodingEnumToName(StringEncoding encoding) // IN
  *
  * Results:
  *      The StringEncoding enum value corresponding to the name, or
- *      STRING_ENCODING_UNKNOWN if the encoding name wasn't found.
+ *      STRING_ENCODING_UNKNOWN if the encoding name is not supported.
  *
  * Side effects:
  *      None
@@ -2391,20 +2348,20 @@ Unicode_EncodingNameToEnum(const char *encodingName) // IN
    if (idx < 0) {
       return STRING_ENCODING_UNKNOWN;
    }
-   return xRef[idx].encoding;
+   return xRef[idx].isSupported ? xRef[idx].encoding : STRING_ENCODING_UNKNOWN;
 }
 
 
 /*
  *-----------------------------------------------------------------------------
  *
- * Unicode_GetCurrentEncoding --
+ * UnicodeGetCurrentEncodingInternal --
  *
  *      Calls CodeSet_GetCurrentCodeSet() and returns the corresponding
  *      encoding.
  *
  * Results:
- *      StringEncoding if we support it or STRING_ENCODING_UNKNOWN.
+ *      The current encoding.
  *
  * Side effects:
  *      None.
@@ -2413,47 +2370,13 @@ Unicode_EncodingNameToEnum(const char *encodingName) // IN
  */
 
 StringEncoding
-Unicode_GetCurrentEncoding(void)  // IN
-{
-   return Unicode_EncodingNameToEnum(CodeSet_GetCurrentCodeSet());
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * Unicode_IsEncodingSupported --
- *
- *      Checks whether we support the given encoding.
- *
- * Results:
- *      TRUE if supported, FALSE otherwise.
- *
- * Side effects:
- *      None.
- *
- *-----------------------------------------------------------------------------
- */
-
-Bool
-Unicode_IsEncodingSupported(StringEncoding encoding)  // IN
+UnicodeGetCurrentEncodingInternal(void)
 {
-   /*
-    * Get alias assumed to be understood by ICU.
-    */
-   const char *name = Unicode_EncodingEnumToName(encoding);
-
-   if (!name) {
-      return FALSE;
-   }
+   StringEncoding encoding =
+      Unicode_EncodingNameToEnum(CodeSet_GetCurrentCodeSet());
 
-   /*
-    * Ask ICU (codeset will fall back onto a reverse-lookup into the
-    * above table if no ICU is available, which is functionally
-    * equivalent to what Unicode_IsEncodingSupported did pre-ICU
-    * anyways).
-    */
-   return CodeSet_IsEncodingSupported(name);
+   ASSERT(Unicode_IsEncodingValid(encoding));
+   return encoding;
 }
 
 
@@ -2462,11 +2385,10 @@ Unicode_IsEncodingSupported(StringEncoding encoding)  // IN
  *
  * Unicode_IsEncodingValid --
  *
- *      Checks whether the specified encoding value is valid (not
- *      necessarily whether we support it).
+ *      Checks whether we support the given encoding.
  *
  * Results:
- *      TRUE if legal, FALSE otherwise.
+ *      TRUE if supported, FALSE otherwise.
  *
  * Side effects:
  *      None.
@@ -2496,12 +2418,9 @@ Unicode_IsEncodingValid(StringEncoding encoding)  // IN
  *      errors are terminal
  *
  * Side effects:
- *     Calling Unicode_AllocList initializes the cache of the native code
- *     set name used in CodeSet_GetCurrentCodeSet().  The cached name is
- *     used to resolve references to STRING_ENCODING_DEFAULT in unicode
- *     functions.  When Unicode_Init is called with NULL argv/envp,
- *     CodeSet_GetCurrentCodeSet is called explicitly to initialize the
- *     code set name.
+ *     Calling CodeSet_GetCurrentCodeSet() initializes the cache of the
+ *      native code set name.  The cached name is used to resolve references
+ *      to STRING_ENCODING_DEFAULT in unicode functions.
  *
  *-----------------------------------------------------------------------------
  */
@@ -2513,6 +2432,7 @@ Unicode_Init(int argc,        // IN
 {
 #if !defined(__APPLE__) && !defined(VMX86_SERVER)
    char **list;
+   StringEncoding encoding;
 #endif
 
    /*
@@ -2530,9 +2450,9 @@ Unicode_Init(int argc,        // IN
 
 #else
 
-   if (!argv && !envp) {
-      CodeSet_GetCurrentCodeSet();
-      return;
+   encoding = Unicode_EncodingNameToEnum(CodeSet_GetCurrentCodeSet());
+   if (!Unicode_IsEncodingValid(encoding)) {
+      goto bail;
    }
 
    if (argv) {
@@ -2570,6 +2490,7 @@ Unicode_InitW(int argc,         // IN
               char ***envp)     // OUT
 {
    char **list;
+   StringEncoding encoding;
 
    /*
     * Always init the codeset module first.
@@ -2580,11 +2501,13 @@ Unicode_InitW(int argc,         // IN
       exit(1);
    }
 
-   if (!wargv && !wenvp) {
-      CodeSet_GetCurrentCodeSet();
-      return;
+   encoding = Unicode_EncodingNameToEnum(CodeSet_GetCurrentCodeSet());
+   if (!Unicode_IsEncodingValid(encoding)) {
+      goto bail;
    }
 
+   encoding = STRING_ENCODING_UTF16;
+
    if (wargv) {
       list = Unicode_AllocList((char **)wargv, argc + 1, STRING_ENCODING_UTF16);
       if (!list) {
@@ -2605,7 +2528,7 @@ Unicode_InitW(int argc,         // IN
 
 bail:
    Panic("Unsupported character encoding \"%s\".\n",
-          Unicode_EncodingEnumToName(STRING_ENCODING_UTF16));
+          Unicode_EncodingEnumToName(encoding));
    exit(1);
 }
 #endif
index bac99802b6258d0cc885bcc2d607b4c8e09fc452..2499f4a6e39044205f9be96acb81abf8e22f4ac9 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 76e5639b5923ad47977c5bd1598ddf6252652064..df884a3bfcf5f3fc9e507b2b4ba54782af575be0 100644 (file)
@@ -142,6 +142,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -150,6 +151,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -158,6 +160,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 70565734f325a7d4a966a30201c8896eeaeeab89..73d6f6f10cb89b1ac9ace77698c048732111fff0 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 13d319bf0d0845737b6d65ead4c7de7dcb62a14c..63b736013224c1752b1e63b70e5abdaad8f7c085 100644 (file)
@@ -65,6 +65,7 @@
 #include "hgfs.h"
 #include "system.h"
 #include "codeset.h"
+#include "posix.h"
 #include "unicode.h"
 
 #if defined(linux) || defined(_WIN32)
@@ -1254,7 +1255,27 @@ VixToolsDeleteObject(VixCommandRequestHeader *requestMsg)  // IN
          }
       }
 
+#ifdef _WIN32
       resultInt = File_UnlinkIfExists(pathName);
+#else
+      /*
+       * UnlinkIfExists() chases the symlink and tries to delete
+       * what it points to.  We don't want this, and rather than
+       * fight with bora/lib/file, just do it here ourselves.
+       */
+      {
+         char *primaryPath = Unicode_GetAllocBytes(pathName,
+                                                   STRING_ENCODING_DEFAULT);
+         if (NULL != primaryPath) {
+            resultInt = (unlink(primaryPath) == -1) ? errno : 0;
+            resultInt = (resultInt == ENOENT) ? 0 : resultInt;
+            free(primaryPath);
+         } else {
+            resultInt = UNICODE_CONVERSION_ERRNO;
+         }
+      }
+#endif
+
       if (0 != resultInt) {
          err = FoundryToolsDaemon_TranslateSystemErr();
       }
@@ -2414,26 +2435,25 @@ if (0 == *interpreterName) {
          goto abort;
       }
       
-      fd = open(tempScriptFilePath,
-                  O_CREAT
-                | O_EXCL
+      fd = Posix_Open(tempScriptFilePath, // UTF-8
+                      O_CREAT | O_EXCL
 #if defined(_WIN32)
-                | O_BINARY
+                     | O_BINARY
 #endif
 #if defined(linux) && defined(GLIBC_VERSION_21)
-                | O_LARGEFILE
+                     | O_LARGEFILE
 #endif
-                | O_RDWR,
-                0600);
+                     | O_RDWR,
+                      0600);
       if (fd >= 0) {
          break;
       }
 
       if (errno != EEXIST) {
          /*
-          * While persistence is generally a worthwhile trail, if something happens
-          * to the temp directory while we're using it (e.g., someone deletes it), we
-          * should not try 4+ billion times.
+          * While persistence is generally a worthwhile trail, if something
+          * happens to the temp directory while we're using it (e.g., someone
+          * deletes it), we should not try 4+ billion times.
           */
          break;
       }
index e33765db82f86b1489301e0b8e47086ba88cb7b9..e2ee54411592e8916a32d427ffad61341df84254 100644 (file)
@@ -142,6 +142,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -150,6 +151,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -158,6 +160,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 6be3fa475c7280d36eed4c0627075c928e61484d..881a8f8f46863717d4a2b008cf9152231c4b59d6 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index e8bd7e75702df19c7e2d411d3116c2cf543e2c54..4f5a57f70386a29f8007c60d08c8fb9c3f746a14 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 430619a209156dc8355cf842153b4ce2a8f15382..ed3dee0e26f641bc5dd3c0486082c51302860662 100644 (file)
@@ -141,6 +141,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -149,6 +150,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -157,6 +159,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index f5192344030584be68663579a30e86c3bc845354..0bfb44e9bcfe771d387a5cb181f370dfe8b20994 100644 (file)
@@ -153,6 +153,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -161,6 +162,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -169,6 +171,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
index 77748b728d88355ab4d54191fff6150797761d56..56d57c90abf0ddcb9cc5897f2fee1fdd3fadc021 100755 (executable)
@@ -6,10 +6,39 @@ modules: $(MODULES)
 $(MODULES):
        $(MAKE) -C "$(MODULES_OS)/$@"
 
+if LINUX
+export vmblockdir = $(MODULES_DIR)/fs/vmblock
+export vmhgfsdir = $(MODULES_DIR)/fs/vmhgfs
+export vmmemctldir = $(MODULES_DIR)/drivers/misc
+export vmsyncdir = $(MODULES_DIR)/drivers/misc
+export vmxnetdir = $(MODULES_DIR)/drivers/net
+export DEPMOD = depmod -a
+endif LINUX
+
+if FREEBSD
+export vmblockdir = $(MODULES_DIR)
+export vmhgfsdir = $(MODULES_DIR)
+export vmmemctldir = $(MODULES_DIR)
+export vmsyncdir = $(MODULES_DIR)
+export vmxnetdir = $(MODULES_DIR)
+endif FREEBSD
+
 ## Automake will supplement its own "distclean" and "clean" targets with these.
 distclean-local:
 clean-local:
        for MOD in $(MODULES); do \
           $(MAKE) -C "$(MODULES_OS)/$$MOD" clean || exit 1; \
        done
-       rm -f $(MODULES_OS)/*.o $(MODULES_OS)/*.ko
+       $(RM) -f $(MODULES_OS)/*.o $(MODULES_OS)/*.ko
+
+install-exec-hook:
+       for MOD in $(MODULES); do \
+               $(INSTALL) -d `eval echo '$$'$${MOD}dir`; \
+               $(INSTALL) -m644 $(MODULES_OS)/$$MOD/$$MOD.ko `eval echo '$$'$${MOD}dir`; \
+       done
+       eval "$$DEPMOD"
+uninstall-hook:
+       for MOD in $(MODULES); do \
+               $(RM) -f `eval echo '$$'$${MOD}dir`/$$MOD.ko &> /dev/null; \
+       done
+       eval "$$DEPMOD"
index edbf7436797593fe40960cb3775d655371924218..521fef319ba91b849d2dfd86b257fdf5bd0067aa 100644 (file)
@@ -103,6 +103,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -111,6 +112,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -119,6 +121,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
@@ -300,6 +303,8 @@ install-data-am:
 install-dvi: install-dvi-am
 
 install-exec-am:
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
 
 install-html: install-html-am
 
@@ -330,20 +335,22 @@ ps: ps-am
 ps-am:
 
 uninstall-am:
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
 
-.MAKE: install-am install-strip
+.MAKE: install-am install-exec-am install-strip uninstall-am
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
        clean-local distclean distclean-generic distclean-libtool \
        distclean-local distdir dvi dvi-am html html-am info info-am \
        install install-am install-data install-data-am install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       uninstall uninstall-am
+       install-dvi-am install-exec install-exec-am install-exec-hook \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am uninstall uninstall-am uninstall-hook
 
 all: modules
 
@@ -353,12 +360,37 @@ modules: $(MODULES)
 $(MODULES):
        $(MAKE) -C "$(MODULES_OS)/$@"
 
+@LINUX_TRUE@export vmblockdir = $(MODULES_DIR)/fs/vmblock
+@LINUX_TRUE@export vmhgfsdir = $(MODULES_DIR)/fs/vmhgfs
+@LINUX_TRUE@export vmmemctldir = $(MODULES_DIR)/drivers/misc
+@LINUX_TRUE@export vmsyncdir = $(MODULES_DIR)/drivers/misc
+@LINUX_TRUE@export vmxnetdir = $(MODULES_DIR)/drivers/net
+@LINUX_TRUE@export DEPMOD = depmod -a
+
+@FREEBSD_TRUE@export vmblockdir = $(MODULES_DIR)
+@FREEBSD_TRUE@export vmhgfsdir = $(MODULES_DIR)
+@FREEBSD_TRUE@export vmmemctldir = $(MODULES_DIR)
+@FREEBSD_TRUE@export vmsyncdir = $(MODULES_DIR)
+@FREEBSD_TRUE@export vmxnetdir = $(MODULES_DIR)
+
 distclean-local:
 clean-local:
        for MOD in $(MODULES); do \
           $(MAKE) -C "$(MODULES_OS)/$$MOD" clean || exit 1; \
        done
-       rm -f $(MODULES_OS)/*.o $(MODULES_OS)/*.ko
+       $(RM) -f $(MODULES_OS)/*.o $(MODULES_OS)/*.ko
+
+install-exec-hook:
+       for MOD in $(MODULES); do \
+               $(INSTALL) -d `eval echo '$$'$${MOD}dir`; \
+               $(INSTALL) -m644 $(MODULES_OS)/$$MOD/$$MOD.ko `eval echo '$$'$${MOD}dir`; \
+       done
+       eval "$$DEPMOD"
+uninstall-hook:
+       for MOD in $(MODULES); do \
+               $(RM) -f `eval echo '$$'$${MOD}dir`/$$MOD.ko &> /dev/null; \
+       done
+       eval "$$DEPMOD"
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 8eaf56282ca0af9783c6c69572021e71998e84f8..113c05f8529ff4d9bae85897d94abebcf0049001 100644 (file)
@@ -176,7 +176,7 @@ DblLnkLst_Unlink1(DblLnkLst_Links *l) // IN
  */
 
 Bool
-DblLnkLst_IsLinked(DblLnkLst_Links *l) // IN
+DblLnkLst_IsLinked(DblLnkLst_Links const *l) // IN
 {
    ASSERT(l);
 
index dfd757cb95bbbc0593c78033c04c99e06fffdcb7..f3b61cbb573e27e6e1cdedcb0f31432a425bcf51 100644 (file)
@@ -70,7 +70,7 @@ void DblLnkLst_Init(DblLnkLst_Links *l);
 void DblLnkLst_Link(DblLnkLst_Links *l1, DblLnkLst_Links *l2);
 void DblLnkLst_Unlink(DblLnkLst_Links *l1, DblLnkLst_Links *l2);
 void DblLnkLst_Unlink1(DblLnkLst_Links *l);
-Bool DblLnkLst_IsLinked(DblLnkLst_Links *l);
+Bool DblLnkLst_IsLinked(DblLnkLst_Links const *l);
 
 /* Functions specific to anchored lists. --hpreg */
 
index 28b9888e35d237c04d7c0cf7cb19018515f590b3..7faa5a3146d94ff8899ff1b8e7278f7c39695fab 100644 (file)
@@ -164,7 +164,7 @@ DblLnkLst_Unlink1(DblLnkLst_Links *l) // IN
  */
 
 Bool
-DblLnkLst_IsLinked(DblLnkLst_Links *l) // IN
+DblLnkLst_IsLinked(DblLnkLst_Links const *l) // IN
 {
    ASSERT(l);
 
index 645b722d7841112bd4d0455059a0246b11b475f1..70610410b198e3d957b63c4a4d7f1597bc7c27f3 100644 (file)
@@ -58,7 +58,7 @@ void DblLnkLst_Init(DblLnkLst_Links *l);
 void DblLnkLst_Link(DblLnkLst_Links *l1, DblLnkLst_Links *l2);
 void DblLnkLst_Unlink(DblLnkLst_Links *l1, DblLnkLst_Links *l2);
 void DblLnkLst_Unlink1(DblLnkLst_Links *l);
-Bool DblLnkLst_IsLinked(DblLnkLst_Links *l);
+Bool DblLnkLst_IsLinked(DblLnkLst_Links const *l);
 
 /* Functions specific to anchored lists. --hpreg */
 
index c4cb2654e93b8e80a5e111fe77a7151e0ee55a5e..66cd10036326735177609e7eae6614f083b7cea1 100644 (file)
@@ -988,9 +988,8 @@ typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestGetattrV3 {
    HgfsAttrHint hints;       /* Flags for file handle valid. */
-   HgfsHandle file;          /* Opaque file ID used by the server. */
-   HgfsFileNameV3 fileName;  /* Filename used when file handle invalid. */
    uint64 reserved;          /* Reserved for future use */
+   HgfsFileNameV3 fileName;  /* Filename used when file handle invalid. */
 }
 #include "vmware_pack_end.h"
 HgfsRequestGetattrV3;
@@ -1082,7 +1081,6 @@ typedef
 struct HgfsRequestSetattrV3 {
    HgfsAttrHint hints;
    HgfsAttrV2 attr;
-   HgfsHandle file;          /* Opaque file ID used by the server. */
    uint64 reserved;          /* Reserved for future use */
    HgfsFileNameV3 fileName;  /* Filename used when file handle invalid. */
 }
@@ -1231,7 +1229,6 @@ typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestDeleteV3 {
    HgfsDeleteHint hints;
-   HgfsHandle file;              /* Opaque file ID used by the server. */
    uint64 reserved;              /* Reserved for future use */
    HgfsFileNameV3 fileName;      /* Name used if the file is HGFS_HANDLE_INVALID */
 }
@@ -1330,8 +1327,6 @@ typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestRenameV3 {
    HgfsRenameHint hints;
-   HgfsHandle srcFile;           /* Opaque file ID to "old name" used by the server. */
-   HgfsHandle targetFile;        /* Opaque file ID to "old name" used by the server. */
    uint64 reserved;              /* Reserved for future use */
    HgfsFileNameV3 oldName;
    HgfsFileNameV3 newName;
index c8eeb489d5d3c6de180f56ce1c9de7815a699177..aa84eeb4551185c2e4a9a90d097403226111d0a0 100644 (file)
@@ -293,10 +293,13 @@ RpcOut_sendOne(char **reply,        // OUT: Result
    }
 
    /*
-    * If the command doesn't contain a space, add one to the
-    * end to maintain compatibility with old VMXs.
+    * If the command doesn't contain a space, add one to the end to maintain
+    * compatibility with old VMXs.
     *
-    * XXX Do we still need to bother with this?
+    * For a long time, the GuestRpc logic in the VMX was wired to expect a
+    * trailing space in every command, even commands without arguments. That is
+    * no longer true, but we must continue to add a trailing space because we
+    * don't know whether we're talking to an old or new VMX.
     */
    if (strchr(request, ' ') == NULL) {
       char *tmp;
@@ -346,7 +349,8 @@ RpcOut_sendOne(char **reply,        // OUT: Result
  *    varargs.
  *
  *    Note: It is the caller's responsibility to ensure that the RPCI command
- *          followed by a space appear at the start of the request buffer.
+ *          followed by a space appear at the start of the request buffer. See
+ *          the command in RpcOut_sendOne for details.
  *
  * Return value:
  *    TRUE on success. '*reply' contains an allocated result of the rpc
index 6d8a1111442b991fb7c89eec489bc66573169660..ef07e636ef3b60bedcb732cf8b5e12f70b0d6606 100644 (file)
@@ -416,7 +416,7 @@ FLAGDEF(  8A, EAX, AMD,     8,  1, SVM_HYPERVISOR,      MASK,    0, FALSE)
 FIELDDEF( 8A, EAX, AMD,     9, 23, SVMEAX_RSVD,         MASK,    0, FALSE)            \
 FIELDDEF( 8A, EBX, AMD,     0, 32, SVM_N_ASIDS,         MASK,    0, FALSE)            \
 FIELDDEF( 8A, ECX, AMD,     0, 32, SVMECX_RSVD,         MASK,    0, FALSE)            \
-FLAGDEF(  8A, EDX, AMD,     0,  1, SVM_NP,              MASK,    0, FALSE)            \
+FLAGDEFA( 8A, EDX, AMD,     0,  1, SVM_NP,              MASK,    0, FALSE, NPT)       \
 FLAGDEF(  8A, EDX, AMD,     1,  1, SVM_LBR,             MASK,    0, FALSE)            \
 FLAGDEF(  8A, EDX, AMD,     2,  1, SVM_LOCK,            MASK,    0, FALSE)            \
 FLAGDEF(  8A, EDX, AMD,     3,  1, SVM_NRIP,            MASK,    0, FALSE)            \
@@ -599,7 +599,6 @@ FIELD_FUNC(MWAIT_C4_SUBSTATE, CPUID_INTEL_ID5EDX_MWAIT_C4_SUBSTATE)
 #define CPUID_MODEL_CORE       14
 #define CPUID_MODEL_CORE2      15
 #define CPUID_MODEL_PENRYN     0x17  // Effective model
-#define CPUID_MODEL_NEHALEM    0x1a  // Effective model
 
 static INLINE uint32
 CPUID_EFFECTIVE_FAMILY(uint32 v) /* %eax from CPUID with %eax=1. */
index 28b9888e35d237c04d7c0cf7cb19018515f590b3..7faa5a3146d94ff8899ff1b8e7278f7c39695fab 100644 (file)
@@ -164,7 +164,7 @@ DblLnkLst_Unlink1(DblLnkLst_Links *l) // IN
  */
 
 Bool
-DblLnkLst_IsLinked(DblLnkLst_Links *l) // IN
+DblLnkLst_IsLinked(DblLnkLst_Links const *l) // IN
 {
    ASSERT(l);
 
index 645b722d7841112bd4d0455059a0246b11b475f1..70610410b198e3d957b63c4a4d7f1597bc7c27f3 100644 (file)
@@ -58,7 +58,7 @@ void DblLnkLst_Init(DblLnkLst_Links *l);
 void DblLnkLst_Link(DblLnkLst_Links *l1, DblLnkLst_Links *l2);
 void DblLnkLst_Unlink(DblLnkLst_Links *l1, DblLnkLst_Links *l2);
 void DblLnkLst_Unlink1(DblLnkLst_Links *l);
-Bool DblLnkLst_IsLinked(DblLnkLst_Links *l);
+Bool DblLnkLst_IsLinked(DblLnkLst_Links const *l);
 
 /* Functions specific to anchored lists. --hpreg */
 
index 88e1add93789ef99d5ceef45bdebdadfad5dd3ae..d06e23d86d4ead11b8c172782bf929b2eb18d4c9 100644 (file)
@@ -226,15 +226,21 @@ HgfsSendUnsentReqs(void)
 void
 HgfsResetOps(void)
 {
-   atomic_set(&hgfsProtocolVersion, HGFS_VERSION_3);
-   atomic_set(&hgfsVersionOpen, HGFS_OP_OPEN_V2);
-   atomic_set(&hgfsVersionGetattr, HGFS_OP_GETATTR_V2);
-   atomic_set(&hgfsVersionSetattr, HGFS_OP_SETATTR_V2);
-   atomic_set(&hgfsVersionSearchRead, HGFS_OP_SEARCH_READ_V2);
-   atomic_set(&hgfsVersionCreateDir, HGFS_OP_CREATE_DIR_V2);
-   atomic_set(&hgfsVersionSearchOpen, HGFS_OP_SEARCH_OPEN);
-   atomic_set(&hgfsVersionCreateSymlink, HGFS_OP_CREATE_SYMLINK);
-   atomic_set(&hgfsVersionQueryVolumeInfo, HGFS_OP_QUERY_VOLUME_INFO);
+   atomic_set(&hgfsVersionOpen, HGFS_OP_OPEN_V3);
+   atomic_set(&hgfsVersionRead, HGFS_OP_READ_V3);
+   atomic_set(&hgfsVersionWrite, HGFS_OP_WRITE_V3);
+   atomic_set(&hgfsVersionClose, HGFS_OP_CLOSE_V3);
+   atomic_set(&hgfsVersionSearchOpen, HGFS_OP_SEARCH_OPEN_V3);
+   atomic_set(&hgfsVersionSearchRead, HGFS_OP_SEARCH_READ_V3);
+   atomic_set(&hgfsVersionSearchClose, HGFS_OP_SEARCH_CLOSE_V3);
+   atomic_set(&hgfsVersionGetattr, HGFS_OP_GETATTR_V3);
+   atomic_set(&hgfsVersionSetattr, HGFS_OP_SETATTR_V3);
+   atomic_set(&hgfsVersionCreateDir, HGFS_OP_CREATE_DIR_V3);
+   atomic_set(&hgfsVersionDeleteFile, HGFS_OP_DELETE_FILE_V3);
+   atomic_set(&hgfsVersionDeleteDir, HGFS_OP_DELETE_DIR_V3);
+   atomic_set(&hgfsVersionRename, HGFS_OP_RENAME_V3);
+   atomic_set(&hgfsVersionQueryVolumeInfo, HGFS_OP_QUERY_VOLUME_INFO_V3);
+   atomic_set(&hgfsVersionCreateSymlink, HGFS_OP_CREATE_SYMLINK_V3);
 }
 
 
index 645b722d7841112bd4d0455059a0246b11b475f1..70610410b198e3d957b63c4a4d7f1597bc7c27f3 100644 (file)
@@ -58,7 +58,7 @@ void DblLnkLst_Init(DblLnkLst_Links *l);
 void DblLnkLst_Link(DblLnkLst_Links *l1, DblLnkLst_Links *l2);
 void DblLnkLst_Unlink(DblLnkLst_Links *l1, DblLnkLst_Links *l2);
 void DblLnkLst_Unlink1(DblLnkLst_Links *l);
-Bool DblLnkLst_IsLinked(DblLnkLst_Links *l);
+Bool DblLnkLst_IsLinked(DblLnkLst_Links const *l);
 
 /* Functions specific to anchored lists. --hpreg */
 
index b9ada3bcfc89b9b12a26ab44716dbe363104ce33..a351c9e91b5f5f41813017abc92224027f646ff9 100644 (file)
@@ -233,10 +233,6 @@ HgfsGetNextDirEntry(HgfsSuperInfo *si,       // IN: Superinfo for this SB
 
   retry:
    opUsed = atomic_read(&hgfsVersionSearchRead);
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
-      opUsed = HGFS_OP_SEARCH_READ_V3;
-   }
-
    if (opUsed == HGFS_OP_SEARCH_READ_V3) {
       HgfsRequest *header;
       HgfsRequestSearchReadV3 *request;
@@ -248,6 +244,8 @@ HgfsGetNextDirEntry(HgfsSuperInfo *si,       // IN: Superinfo for this SB
       request = (HgfsRequestSearchReadV3 *)(HGFS_REQ_PAYLOAD_V3(req));
       request->search = searchHandle;
       request->offset = offset;
+      request->flags = 0;
+      request->reserved = 0;
       req->payloadSize = HGFS_REQ_PAYLOAD_SIZE_V3(request);
    } else {
       HgfsRequestSearchRead *request;
@@ -279,18 +277,16 @@ HgfsGetNextDirEntry(HgfsSuperInfo *si,       // IN: Superinfo for this SB
          break;
 
       case -EPROTO:
-         /* Retry with Version 1 of SearchRead. Set globally. */
+         /* Retry with older version(s). Set globally. */
          if (attr->requestType == HGFS_OP_SEARCH_READ_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsGetNextDirEntry: Version 3 "
                     "not supported. Falling back to version 2.\n"));
             atomic_set(&hgfsVersionSearchRead, HGFS_OP_SEARCH_READ_V2);
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
             goto retry;
          } else if (attr->requestType == HGFS_OP_SEARCH_READ_V2) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsGetNextDirEntry: Version 2 "
                     "not supported. Falling back to version 1.\n"));
             atomic_set(&hgfsVersionSearchRead, HGFS_OP_SEARCH_READ);
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
             goto retry;
          }
 
@@ -360,6 +356,8 @@ HgfsPackDirOpenRequest(struct inode *inode, // IN: Inode of the file to open
       nameLength = &requestV3->dirName.length;
       requestV3->dirName.flags = 0;
       requestV3->dirName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE;
+      requestV3->dirName.fid = HGFS_INVALID_HANDLE;
+      requestV3->reserved = 0;
       requestSize = HGFS_REQ_PAYLOAD_SIZE_V3(requestV3);
       break;
    }
@@ -460,10 +458,10 @@ HgfsDirOpen(struct inode *inode,  // IN: Inode of the dir to open
 
   retry:
    opUsed = atomic_read(&hgfsVersionSearchOpen);
-   replySearch = &((HgfsReplySearchOpen *)HGFS_REQ_PAYLOAD(req))->search;
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
-      opUsed = HGFS_OP_SEARCH_OPEN_V3;
+   if (opUsed == HGFS_OP_SEARCH_OPEN_V3) {
       replySearch = &((HgfsReplySearchOpenV3 *)HGFS_REP_PAYLOAD_V3(req))->search;
+   } else {
+      replySearch = &((HgfsReplySearchOpen *)HGFS_REQ_PAYLOAD(req))->search;
    }
 
    result = HgfsPackDirOpenRequest(inode, file, opUsed, req);
@@ -479,29 +477,31 @@ HgfsDirOpen(struct inode *inode,  // IN: Inode of the dir to open
       replyStatus = HgfsReplyStatus(req);
       result = HgfsStatusConvertToLinux(replyStatus);
 
-      if (result == 0) {
+      switch (result) {
+      case 0:
          result = HgfsCreateFileInfo(file, *replySearch);
-         switch (result) {
-        case 0:
-            LOG(6, (KERN_DEBUG "VMware hgfs: HgfsDirOpen: set handle to %u\n",
+         if (result) {
+           goto out;
+         }
+         LOG(6, (KERN_DEBUG "VMware hgfs: HgfsDirOpen: set handle to %u\n",
                     *replySearch));
-            break;
-         case -EPROTO:
-            /* Retry with Version 1 of SearchOpen. Set globally. */
-            if (opUsed == HGFS_OP_SEARCH_OPEN_V3) {
-               LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDirOpen: Version 3 not "
-                       "supported. Falling back to version 1.\n"));
-               atomic_set(&hgfsVersionSearchOpen, HGFS_OP_SEARCH_OPEN);
-               atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
-               goto retry;
-            }
-            break;
-
-         default:
-            LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDirOpen: server "
-                    "returned error: %d\n", result));
-            break;
+         break;
+      case -EPROTO:
+         /* Retry with older version(s). Set globally. */
+         if (opUsed == HGFS_OP_SEARCH_OPEN_V3) {
+            LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDirOpen: Version 3 not "
+                    "supported. Falling back to version 1.\n"));
+            atomic_set(&hgfsVersionSearchOpen, HGFS_OP_SEARCH_OPEN);
+            goto retry;
          }
+         LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDirOpen: server "
+                 "returned error: %d\n", result));
+         break;
+
+      default:
+         LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDirOpen: server "
+                  "returned error: %d\n", result));
+         break;
       }
    } else if (result == -EIO) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDirOpen: timed out\n"));
@@ -808,23 +808,25 @@ HgfsDirRelease(struct inode *inode,  // IN: Inode that the file* points to
    }
 
  retry:
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
+   opUsed = atomic_read(&hgfsVersionSearchClose);
+   if (opUsed == HGFS_OP_SEARCH_CLOSE_V3) {
       HgfsRequestSearchCloseV3 *request;
       HgfsRequest *header;
 
       header = (HgfsRequest *)(HGFS_REQ_PAYLOAD(req));
       header->id = req->id;
-      header->op = opUsed = HGFS_OP_SEARCH_CLOSE_V3;
+      header->op = opUsed;
 
       request = (HgfsRequestSearchCloseV3 *)(HGFS_REQ_PAYLOAD_V3(req));
       request->search = handle;
+      request->reserved = 0;
       req->payloadSize = HGFS_REQ_PAYLOAD_SIZE_V3(request);
    } else {
       HgfsRequestSearchClose *request;
 
       request = (HgfsRequestSearchClose *)(HGFS_REQ_PAYLOAD(req));
       request->header.id = req->id;
-      request->header.op = opUsed = HGFS_OP_SEARCH_CLOSE;
+      request->header.op = opUsed;
       request->search = handle;
       req->payloadSize = sizeof *request;
    }
@@ -842,11 +844,11 @@ HgfsDirRelease(struct inode *inode,  // IN: Inode that the file* points to
                  handle));
          break;
       case -EPROTO:
-         /* Retry with Version 2 of Open. Set globally. */
+         /* Retry with older version(s). Set globally. */
          if (opUsed == HGFS_OP_SEARCH_CLOSE_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDirRelease: Version 3 not "
                     "supported. Falling back to version 1.\n"));
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
+            atomic_set(&hgfsVersionSearchClose, HGFS_OP_SEARCH_CLOSE);
             goto retry;
          }
          break;
index 82d4c146af188abd14c7756674e89ac9393e2fbb..5de171af5159361aff2780ffc586ca9d07e34f01 100644 (file)
@@ -194,7 +194,7 @@ HgfsPackOpenRequest(struct inode *inode, // IN: Inode of the file to open
       /* Linux clients need case-sensitive lookups. */
       requestV3->fileName.flags = 0;
       requestV3->fileName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE;
-      requestV3->fileName.fid = 0;
+      requestV3->fileName.fid = HGFS_INVALID_HANDLE;
 
       /* Set mode. */
       result = HgfsGetOpenMode(file->f_flags);
@@ -223,6 +223,9 @@ HgfsPackOpenRequest(struct inode *inode, // IN: Inode of the file to open
 
       /* XXX: Request no lock for now. */
       requestV3->desiredLock = HGFS_LOCK_NONE;
+
+      requestV3->reserved1 = 0;
+      requestV3->reserved2 = 0;
       break;
    }
 
@@ -563,10 +566,6 @@ HgfsOpen(struct inode *inode,  // IN: Inode of the file to open
     */
 
    opUsed = atomic_read(&hgfsVersionOpen);
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
-      opUsed = HGFS_OP_OPEN_V3;
-   }
-
    result = HgfsPackOpenRequest(inode, file, opUsed, req);
    if (result != 0) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsOpen: error packing request\n"));
@@ -644,11 +643,10 @@ HgfsOpen(struct inode *inode,  // IN: Inode of the file to open
          break;
 
       case -EPROTO:
-         /* Retry with Version 2 of Open. Set globally. */
+         /* Retry with older version(s). Set globally. */
          if (opUsed == HGFS_OP_OPEN_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsOpen: Version 3 not "
                     "supported. Falling back to version 2.\n"));
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
             atomic_set(&hgfsVersionOpen, HGFS_OP_OPEN_V2);
             goto retry;
          }
@@ -657,7 +655,6 @@ HgfsOpen(struct inode *inode,  // IN: Inode of the file to open
          if (opUsed == HGFS_OP_OPEN_V2) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsOpen: Version 2 not "
                     "supported. Falling back to version 1.\n"));
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
             atomic_set(&hgfsVersionOpen, HGFS_OP_OPEN);
             goto retry;
          }
@@ -1039,23 +1036,25 @@ HgfsRelease(struct inode *inode,  // IN: Inode that this file points to
    }
 
  retry:
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
+   opUsed = atomic_read(&hgfsVersionClose);
+   if (opUsed == HGFS_OP_CLOSE_V3) {
       HgfsRequest *header;
       HgfsRequestCloseV3 *request;
 
       header = (HgfsRequest *)(HGFS_REQ_PAYLOAD(req));
       header->id = req->id;
-      header->op = opUsed = HGFS_OP_CLOSE_V3;
+      header->op = opUsed;
 
       request = (HgfsRequestCloseV3 *)(HGFS_REQ_PAYLOAD_V3(req));
       request->file = handle;
+      request->reserved = 0;
       req->payloadSize = HGFS_REQ_PAYLOAD_SIZE_V3(request);
    } else {
       HgfsRequestClose *request;
 
       request = (HgfsRequestClose *)(HGFS_REQ_PAYLOAD(req));
       request->header.id = req->id;
-      request->header.op = opUsed = HGFS_OP_CLOSE;
+      request->header.op = opUsed;
       request->file = handle;
       req->payloadSize = sizeof *request;
    }
@@ -1073,11 +1072,11 @@ HgfsRelease(struct inode *inode,  // IN: Inode that this file points to
                  handle));
          break;
       case -EPROTO:
-         /* Retry with Version 2 of Open. Set globally. */
+         /* Retry with older version(s). Set globally. */
          if (opUsed == HGFS_OP_CLOSE_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsRelease: Version 3 not "
                     "supported. Falling back to version 1.\n"));
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
+            atomic_set(&hgfsVersionClose, HGFS_OP_CLOSE);
             goto retry;
          }
          break;
index 3b547f99eb065ba001111b965122dbc8e7f405fb..edb7c25581fb6ed544cd8d28b9c24ef860265498 100644 (file)
@@ -83,16 +83,21 @@ unsigned int hgfsIdCounter = 0;
 struct list_head hgfsReqsUnsent;
 
 /* Global protocol version switch. */
-atomic_t hgfsProtocolVersion;
-
 atomic_t hgfsVersionOpen;
+atomic_t hgfsVersionRead;
+atomic_t hgfsVersionWrite;
+atomic_t hgfsVersionClose;
+atomic_t hgfsVersionSearchOpen;
+atomic_t hgfsVersionSearchRead;
+atomic_t hgfsVersionSearchClose;
 atomic_t hgfsVersionGetattr;
 atomic_t hgfsVersionSetattr;
-atomic_t hgfsVersionSearchRead;
 atomic_t hgfsVersionCreateDir;
-atomic_t hgfsVersionSearchOpen;
-atomic_t hgfsVersionCreateSymlink;
+atomic_t hgfsVersionDeleteFile;
+atomic_t hgfsVersionDeleteDir;
+atomic_t hgfsVersionRename;
 atomic_t hgfsVersionQueryVolumeInfo;
+atomic_t hgfsVersionCreateSymlink;
 
 /* Private functions. */
 static inline unsigned long HgfsComputeBlockBits(unsigned long blockSize);
index 7f388fbecb8b2c5833cfdff004652b78a0f47e49..28e1c0d44b11403bc1b0904ec6f61609aaaa2af2 100644 (file)
@@ -343,19 +343,23 @@ HgfsPackGetattrRequest(HgfsReq *req,            // IN/OUT: Request buffer
        * correct regardless. If we don't find a handle, fall back on getattr
        * by name.
        */
+      requestV3->hints = 0;
       if (allowHandleReuse && HgfsGetHandle(dentry->d_inode,
                                             0,
                                             &handle) == 0) {
-         requestV3->hints = HGFS_ATTR_HINT_USE_FILE_DESC;
-         requestV3->file = handle;
+         requestV3->fileName.flags = HGFS_FILE_NAME_USE_FILE_DESC;
+         requestV3->fileName.fid = handle;
+         requestV3->fileName.length = 0;
+         requestV3->fileName.caseType = HGFS_FILE_NAME_DEFAULT_CASE;
          fileName = NULL;
       } else {
-         requestV3->hints = 0;
          fileName = requestV3->fileName.name;
-        fileNameLength = &requestV3->fileName.length;
-        requestV3->fileName.flags = 0;
-        requestV3->fileName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE;
+         fileNameLength = &requestV3->fileName.length;
+         requestV3->fileName.flags = 0;
+         requestV3->fileName.fid = HGFS_INVALID_HANDLE;
+         requestV3->fileName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE;
       }
+      requestV3->reserved = 0;
       reqSize = HGFS_REQ_PAYLOAD_SIZE_V3(requestV3);
       reqBufferSize = HGFS_NAME_BUFFER_SIZET(reqSize);
       break;
@@ -383,7 +387,7 @@ HgfsPackGetattrRequest(HgfsReq *req,            // IN/OUT: Request buffer
       } else {
          requestV2->hints = 0;
          fileName = requestV2->fileName.name;
-        fileNameLength = &requestV2->fileName.length;
+         fileNameLength = &requestV2->fileName.length;
       }
       reqSize = sizeof *requestV2;
       reqBufferSize = HGFS_NAME_BUFFER_SIZE(requestV2);
@@ -915,10 +919,6 @@ HgfsPrivateGetattr(struct dentry *dentry,  // IN: Dentry containing name
   retry:
 
    opUsed = atomic_read(&hgfsVersionGetattr);
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
-      opUsed = HGFS_OP_GETATTR_V3;
-   }
-
    result = HgfsPackGetattrRequest(req, dentry, allowHandleReuse, opUsed, attr);
    if (result != 0) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsPrivateGetattr: no attrs\n"));
@@ -961,17 +961,15 @@ HgfsPrivateGetattr(struct dentry *dentry,  // IN: Dentry containing name
          break;
 
       case -EPROTO:
-         /* Retry with older versions of Getattr. Set globally. */
+         /* Retry with older version(s). Set globally. */
          if (attr->requestType == HGFS_OP_GETATTR_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsPrivateGetattr: Version 3 "
                     "not supported. Falling back to version 2.\n"));
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
             atomic_set(&hgfsVersionGetattr, HGFS_OP_GETATTR_V2);
             goto retry;
          } else if (attr->requestType == HGFS_OP_GETATTR_V2) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsPrivateGetattr: Version 2 "
                     "not supported. Falling back to version 1.\n"));
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
             atomic_set(&hgfsVersionGetattr, HGFS_OP_GETATTR);
             goto retry;
          }
index c4cb2654e93b8e80a5e111fe77a7151e0ee55a5e..66cd10036326735177609e7eae6614f083b7cea1 100644 (file)
@@ -988,9 +988,8 @@ typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestGetattrV3 {
    HgfsAttrHint hints;       /* Flags for file handle valid. */
-   HgfsHandle file;          /* Opaque file ID used by the server. */
-   HgfsFileNameV3 fileName;  /* Filename used when file handle invalid. */
    uint64 reserved;          /* Reserved for future use */
+   HgfsFileNameV3 fileName;  /* Filename used when file handle invalid. */
 }
 #include "vmware_pack_end.h"
 HgfsRequestGetattrV3;
@@ -1082,7 +1081,6 @@ typedef
 struct HgfsRequestSetattrV3 {
    HgfsAttrHint hints;
    HgfsAttrV2 attr;
-   HgfsHandle file;          /* Opaque file ID used by the server. */
    uint64 reserved;          /* Reserved for future use */
    HgfsFileNameV3 fileName;  /* Filename used when file handle invalid. */
 }
@@ -1231,7 +1229,6 @@ typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestDeleteV3 {
    HgfsDeleteHint hints;
-   HgfsHandle file;              /* Opaque file ID used by the server. */
    uint64 reserved;              /* Reserved for future use */
    HgfsFileNameV3 fileName;      /* Name used if the file is HGFS_HANDLE_INVALID */
 }
@@ -1330,8 +1327,6 @@ typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestRenameV3 {
    HgfsRenameHint hints;
-   HgfsHandle srcFile;           /* Opaque file ID to "old name" used by the server. */
-   HgfsHandle targetFile;        /* Opaque file ID to "old name" used by the server. */
    uint64 reserved;              /* Reserved for future use */
    HgfsFileNameV3 oldName;
    HgfsFileNameV3 newName;
index d57adcdc44599c375057f8c93537ba3453cbd768..9ee72fb87c294a052d83ae421699fbd0e0ae5f41 100644 (file)
@@ -197,8 +197,8 @@ HgfsDelete(struct inode *dir,      // IN: Parent dir of file/dir to delete
    HgfsStatus replyStatus;
    char *fileName = NULL;
    uint32 *fileNameLength;
-   HgfsOp opUsed;
    uint32 reqSize;
+   HgfsOp opUsed;
 
    ASSERT(dir);
    ASSERT(dir->i_sb);
@@ -211,9 +211,8 @@ HgfsDelete(struct inode *dir,      // IN: Parent dir of file/dir to delete
       goto out;
    }
 
-   /* Check opcode. */
    if ((op != HGFS_OP_DELETE_FILE) &&
-      (op != HGFS_OP_DELETE_DIR)) {
+       (op != HGFS_OP_DELETE_DIR)) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDelete: Invalid opcode\n"));
       result = -EINVAL;
       goto out;
@@ -228,16 +227,17 @@ HgfsDelete(struct inode *dir,      // IN: Parent dir of file/dir to delete
    }
 
   retry:
-   opUsed = op;
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
+   if (op == HGFS_OP_DELETE_FILE) {
+      opUsed = atomic_read(&hgfsVersionDeleteFile);
+   } else {
+      opUsed = atomic_read(&hgfsVersionDeleteDir);
+   }
+
+   if (opUsed == HGFS_OP_DELETE_FILE_V3 ||
+       opUsed == HGFS_OP_DELETE_DIR_V3) {
       HgfsRequestDeleteV3 *request;
       HgfsRequest *header;
 
-      if (op == HGFS_OP_DELETE_DIR) {
-         opUsed = HGFS_OP_DELETE_DIR_V3;
-      } else {
-         opUsed = HGFS_OP_DELETE_FILE_V3;
-      }
       header = (HgfsRequest *)(HGFS_REQ_PAYLOAD(req));
       header->id = req->id;
       header->op = opUsed;
@@ -246,6 +246,10 @@ HgfsDelete(struct inode *dir,      // IN: Parent dir of file/dir to delete
       request->hints = 0;
       fileName = request->fileName.name;
       fileNameLength = &request->fileName.length;
+      request->fileName.fid = HGFS_INVALID_HANDLE;
+      request->fileName.flags = 0;
+      request->fileName.caseType = HGFS_FILE_NAME_DEFAULT_CASE;
+      request->reserved = 0;
       reqSize = HGFS_REQ_PAYLOAD_SIZE_V3(request);
    } else {
       HgfsRequestDelete *request;
@@ -253,7 +257,7 @@ HgfsDelete(struct inode *dir,      // IN: Parent dir of file/dir to delete
       request = (HgfsRequestDelete *)(HGFS_REQ_PAYLOAD(req));
       /* Fill out the request packet. */
       request->header.id = req->id;
-      request->header.op = opUsed = op;
+      request->header.op = opUsed;
       fileName = request->fileName.name;
       fileNameLength = &request->fileName.length;
       reqSize = sizeof *request;
@@ -266,7 +270,7 @@ HgfsDelete(struct inode *dir,      // IN: Parent dir of file/dir to delete
       result = -EINVAL;
       goto out;
    }
-   LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDelete: deleting \"%s\", op %u\n",
+   LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDelete: deleting \"%s\", opUsed %u\n",
            fileName, opUsed));
 
    /* Convert to CP name. */
@@ -339,15 +343,16 @@ HgfsDelete(struct inode *dir,      // IN: Parent dir of file/dir to delete
          }
          break;
       case -EPROTO:
+         /* Retry with older version(s). Set globally. */
          if (opUsed == HGFS_OP_DELETE_DIR_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDelete: Version 3 not "
                     "supported. Falling back to version 1.\n"));
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
+            atomic_set(&hgfsVersionDeleteDir, HGFS_OP_DELETE_DIR);
             goto retry;
          } else if (opUsed == HGFS_OP_DELETE_FILE_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDelete: Version 3 not "
                     "supported. Falling back to version 1.\n"));
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
+            atomic_set(&hgfsVersionDeleteFile, HGFS_OP_DELETE_FILE);
             goto retry;
          }
 
@@ -457,15 +462,20 @@ HgfsPackSetattrRequest(struct iattr *iattr,   // IN: Inode attrs to update from
                                             (valid & ATTR_MTIME) ?
                                             HGFS_OPEN_MODE_WRITE_ONLY + 1 : 0,
                                             &handle) == 0) {
-         *hints = HGFS_ATTR_HINT_USE_FILE_DESC;
-         requestV3->file = handle;
+         requestV3->fileName.fid = handle;
+         requestV3->fileName.flags = HGFS_FILE_NAME_USE_FILE_DESC;
+         requestV3->fileName.caseType = HGFS_FILE_NAME_DEFAULT_CASE;
+         requestV3->fileName.length = 0;
          LOG(6, (KERN_DEBUG "VMware hgfs: HgfsPackSetattrRequest: setting "
                  "attributes of handle %u\n", handle));
       } else {
          fileName = requestV3->fileName.name;
-        fileNameLength = &requestV3->fileName.length;
-        requestV3->fileName.caseType = HGFS_FILE_NAME_DEFAULT_CASE;
+         fileNameLength = &requestV3->fileName.length;
+         requestV3->fileName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE;
+         requestV3->fileName.fid = HGFS_INVALID_HANDLE;
+         requestV3->fileName.flags = 0;
       }
+      requestV3->reserved = 0;
       reqSize = HGFS_REQ_PAYLOAD_SIZE_V3(requestV3);
       reqBufferSize = HGFS_NAME_BUFFER_SIZET(reqSize);
 
@@ -772,6 +782,7 @@ HgfsPackCreateDirRequest(struct dentry *dentry, // IN: Directory to create
       fileName = requestV3->fileName.name;
       fileNameLength = &requestV3->fileName.length;
       requestV3->fileName.flags = 0;
+      requestV3->fileName.fid = HGFS_INVALID_HANDLE;
       requestV3->fileName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE;
 
       requestSize = HGFS_REQ_PAYLOAD_SIZE_V3(requestV3);
@@ -783,6 +794,7 @@ HgfsPackCreateDirRequest(struct dentry *dentry, // IN: Directory to create
       requestV3->ownerPerms = (mode & S_IRWXU) >> 6;
       requestV3->groupPerms = (mode & S_IRWXG) >> 3;
       requestV3->otherPerms = (mode & S_IRWXO);
+      requestV3->reserved = 0;
       break;
    }
    case HGFS_OP_CREATE_DIR_V2: {
@@ -1159,10 +1171,6 @@ HgfsMkdir(struct inode *dir,     // IN: Inode of parent directory
 
   retry:
    opUsed = atomic_read(&hgfsVersionCreateDir);
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
-      opUsed = HGFS_OP_CREATE_DIR_V3;
-   }
-
    result = HgfsPackCreateDirRequest(dentry, mode, opUsed, req);
    if (result != 0) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsMkdir: error packing request\n"));
@@ -1201,18 +1209,16 @@ HgfsMkdir(struct inode *dir,     // IN: Inode of parent directory
           */
          break;
       case -EPROTO:
-         /* Retry with older versions of CreateDir. Set globally. */
+         /* Retry with older version(s). Set globally. */
          if (opUsed == HGFS_OP_CREATE_DIR_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsMkdir: Version 3 not "
                     "supported. Falling back to version 2.\n"));
             atomic_set(&hgfsVersionCreateDir, HGFS_OP_CREATE_DIR_V2);
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
             goto retry;
          } else if (opUsed == HGFS_OP_CREATE_DIR_V2) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsMkdir: Version 2 not "
                     "supported. Falling back to version 1.\n"));
             atomic_set(&hgfsVersionCreateDir, HGFS_OP_CREATE_DIR);
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
             goto retry;
          }
 
@@ -1358,22 +1364,26 @@ HgfsRename(struct inode *oldDir,      // IN: Inode of original directory
    }
 
 retry:
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
+   opUsed = atomic_read(&hgfsVersionRename);
+   if (opUsed == HGFS_OP_RENAME_V3) {
       HgfsRequestRenameV3 *request = (HgfsRequestRenameV3 *)HGFS_REQ_PAYLOAD_V3(req);
       HgfsRequest *header = (HgfsRequest *)HGFS_REQ_PAYLOAD(req);
 
-      header->op = opUsed = HGFS_OP_RENAME_V3;
+      header->op = opUsed;
       header->id = req->id;
 
       oldName = request->oldName.name;
       oldNameLength = &request->oldName.length;
+      request->hints = 0;
       request->oldName.flags = 0;
+      request->oldName.fid = HGFS_INVALID_HANDLE;
       request->oldName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE;
+      request->reserved = 0;
       reqSize = HGFS_REQ_PAYLOAD_SIZE_V3(request);
    } else {
       HgfsRequestRename *request = (HgfsRequestRename *)HGFS_REQ_PAYLOAD(req);
 
-      request->header.op = opUsed = HGFS_OP_RENAME;
+      request->header.op = opUsed;
       oldName = request->oldName.name;
       oldNameLength = &request->oldName.length;
       reqSize = sizeof *request;
@@ -1420,6 +1430,7 @@ retry:
       newName = newNameP->name;
       newNameLength = &newNameP->length;
       newNameP->flags = 0;
+      newNameP->fid = HGFS_INVALID_HANDLE;
       newNameP->caseType = HGFS_FILE_NAME_CASE_SENSITIVE;
    } else {
       HgfsRequestRename *request = (HgfsRequestRename *)HGFS_REQ_PAYLOAD(req);
@@ -1463,8 +1474,9 @@ retry:
       result = HgfsStatusConvertToLinux(replyStatus);
 
       if (result == -EPROTO) {
+         /* Retry with older version(s). Set globally. */
          if (opUsed == HGFS_OP_RENAME_V3) {
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
+            atomic_set(&hgfsVersionRename, HGFS_OP_RENAME);
             goto retry;
          } else {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsRename: server "
@@ -1539,7 +1551,9 @@ HgfsPackSymlinkCreateRequest(struct dentry *dentry,   // IN: File pointer for th
       symlinkName = requestV3->symlinkName.name;
       symlinkNameLength = &requestV3->symlinkName.length;
       requestV3->symlinkName.flags = 0;
+      requestV3->symlinkName.fid = HGFS_INVALID_HANDLE;
       requestV3->symlinkName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE;
+      requestV3->reserved = 0;
       requestSize = HGFS_REQ_PAYLOAD_SIZE_V3(requestV3);
       break;
    }
@@ -1603,6 +1617,7 @@ HgfsPackSymlinkCreateRequest(struct dentry *dentry,   // IN: File pointer for th
       targetName = fileNameP->name;
       targetNameLength = &fileNameP->length;
       fileNameP->flags = 0;
+      fileNameP->fid = HGFS_INVALID_HANDLE;
       fileNameP->caseType = HGFS_FILE_NAME_CASE_SENSITIVE;
    } else {
       HgfsFileName *fileNameP;
@@ -1676,10 +1691,6 @@ HgfsSymlink(struct inode *dir,     // IN: Inode of parent directory
 
   retry:
    opUsed = atomic_read(&hgfsVersionCreateSymlink);
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
-      opUsed = HGFS_OP_CREATE_SYMLINK_V3;
-   }
-
    result = HgfsPackSymlinkCreateRequest(dentry, symname, opUsed, req);
    if (result != 0) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsSymlink: error packing request\n"));
@@ -1696,12 +1707,11 @@ HgfsSymlink(struct inode *dir,     // IN: Inode of parent directory
                  "successfully, instantiating dentry\n"));
          result = HgfsInstantiate(dentry, 0, NULL);
       } else if (result == -EPROTO) {
-         /* Retry with older versions of Setattr. Set globally. */
+         /* Retry with older version(s). Set globally. */
          if (opUsed == HGFS_OP_CREATE_SYMLINK_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsSymlink: Version 3 "
                     "not supported. Falling back to version 2.\n"));
             atomic_set(&hgfsVersionCreateSymlink, HGFS_OP_CREATE_SYMLINK);
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
             goto retry;
          } else {
             LOG(6, (KERN_DEBUG "VMware hgfs: HgfsSymlink: symlink was not "
@@ -1817,10 +1827,6 @@ HgfsSetattr(struct dentry *dentry,  // IN: File to set attributes of
   retry:
    /* Fill out the request packet. */
    opUsed = atomic_read(&hgfsVersionSetattr);
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
-      opUsed = HGFS_OP_SETATTR_V3;
-   }
-
    result = HgfsPackSetattrRequest(iattr, dentry, allowHandleReuse,
                                    opUsed, req, &changed);
    if (result != 0 || !changed) {
@@ -1893,18 +1899,16 @@ HgfsSetattr(struct dentry *dentry,  // IN: File to set attributes of
          break;
 
       case -EPROTO:
-         /* Retry with older versions of Setattr. Set globally. */
+         /* Retry with older version(s). Set globally. */
          if (opUsed == HGFS_OP_SETATTR_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsSetattr: Version 3 "
                     "not supported. Falling back to version 2.\n"));
             atomic_set(&hgfsVersionSetattr, HGFS_OP_SETATTR_V2);
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
             goto retry;
          } else if (opUsed == HGFS_OP_SETATTR_V2) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsSetattr: Version 2 "
                     "not supported. Falling back to version 1.\n"));
             atomic_set(&hgfsVersionSetattr, HGFS_OP_SETATTR);
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
             goto retry;
          }
 
index f4764c685badbe000eb536df92b44826f9697916..1ba2e20ad9385ed2bbfe9080b96406a2b520d04d 100644 (file)
@@ -242,14 +242,21 @@ extern compat_kmem_cache *hgfsInodeCache;
 extern RpcOut *hgfsRpcOut;
 extern unsigned int hgfsIdCounter;
 extern struct list_head hgfsReqsUnsent;
-extern atomic_t hgfsProtocolVersion;
+
 extern atomic_t hgfsVersionOpen;
+extern atomic_t hgfsVersionRead;
+extern atomic_t hgfsVersionWrite;
+extern atomic_t hgfsVersionClose;
+extern atomic_t hgfsVersionSearchOpen;
+extern atomic_t hgfsVersionSearchRead;
+extern atomic_t hgfsVersionSearchClose;
 extern atomic_t hgfsVersionGetattr;
 extern atomic_t hgfsVersionSetattr;
-extern atomic_t hgfsVersionSearchRead;
 extern atomic_t hgfsVersionCreateDir;
-extern atomic_t hgfsVersionSearchOpen;
-extern atomic_t hgfsVersionCreateSymlink;
+extern atomic_t hgfsVersionDeleteFile;
+extern atomic_t hgfsVersionDeleteDir;
+extern atomic_t hgfsVersionRename;
 extern atomic_t hgfsVersionQueryVolumeInfo;
+extern atomic_t hgfsVersionCreateSymlink;
 
 #endif // _HGFS_DRIVER_MODULE_H_
index 38dd0d7f261a7eb9a19e29d267f0f8992d7edbb9..8cc1227f2194d7bbff7b45c1fedc7520eb1635e0 100644 (file)
@@ -150,25 +150,27 @@ HgfsDoRead(HgfsHandle handle,  // IN:  Handle for this file
    }
 
  retry:
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
+   opUsed = atomic_read(&hgfsVersionRead);
+   if (opUsed == HGFS_OP_READ_V3) {
       HgfsRequest *header;
       HgfsRequestReadV3 *request;
 
       header = (HgfsRequest *)(HGFS_REQ_PAYLOAD(req));
       header->id = req->id;
-      header->op = opUsed = HGFS_OP_READ_V3;
+      header->op = opUsed;
 
       request = (HgfsRequestReadV3 *)(HGFS_REQ_PAYLOAD_V3(req));
       request->file = handle;
       request->offset = offset;
       request->requiredSize = count;
+      request->reserved = 0;
       req->payloadSize = HGFS_REQ_PAYLOAD_SIZE_V3(request);
    } else {
       HgfsRequestRead *request;
 
       request = (HgfsRequestRead *)(HGFS_REQ_PAYLOAD(req));
       request->header.id = req->id;
-      request->header.op = opUsed = HGFS_OP_READ;
+      request->header.op = opUsed;
       request->file = handle;
       request->offset = offset;
       request->requiredSize = count;
@@ -216,11 +218,11 @@ HgfsDoRead(HgfsHandle handle,  // IN:  Handle for this file
         break;
 
       case -EPROTO:
-         /* Retry with Version 2 of Open. Set globally. */
+         /* Retry with older version(s). Set globally. */
          if (opUsed == HGFS_OP_READ_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDoRead: Version 3 not "
                     "supported. Falling back to version 1.\n"));
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
+            atomic_set(&hgfsVersionRead, HGFS_OP_READ);
             goto retry;
          }
         break;
@@ -293,19 +295,21 @@ HgfsDoWrite(HgfsHandle handle,       // IN: Handle for this file
    }
 
  retry:
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
+   opUsed = atomic_read(&hgfsVersionWrite);
+   if (opUsed == HGFS_OP_WRITE_V3) {
       HgfsRequest *header;
       HgfsRequestWriteV3 *request;
 
       header = (HgfsRequest *)(HGFS_REQ_PAYLOAD(req));
       header->id = req->id;
-      header->op = opUsed = HGFS_OP_WRITE_V3;
+      header->op = opUsed;
 
       request = (HgfsRequestWriteV3 *)(HGFS_REQ_PAYLOAD_V3(req));
       request->file = handle;
       request->flags = 0;
       request->offset = offset;
       request->requiredSize = count;
+      request->reserved = 0;
       payload = request->payload;
       requiredSize = request->requiredSize;
       reqSize = HGFS_REQ_PAYLOAD_SIZE_V3(request);
@@ -314,7 +318,7 @@ HgfsDoWrite(HgfsHandle handle,       // IN: Handle for this file
 
       request = (HgfsRequestWrite *)(HGFS_REQ_PAYLOAD(req));
       request->header.id = req->id;
-      request->header.op = opUsed = HGFS_OP_WRITE;
+      request->header.op = opUsed;
       request->file = handle;
       request->flags = 0;
       request->offset = offset;
@@ -340,7 +344,7 @@ HgfsDoWrite(HgfsHandle handle,       // IN: Handle for this file
             actualSize = ((HgfsReplyWriteV3 *)HGFS_REP_PAYLOAD_V3(req))->actualSize;
          } else {
             actualSize = ((HgfsReplyWrite *)HGFS_REQ_PAYLOAD(req))->actualSize;
-        }
+         }
 
          /* Return result. */
          LOG(6, (KERN_DEBUG "VMware hgfs: HgfsDoWrite: wrote %u bytes\n",
@@ -349,11 +353,11 @@ HgfsDoWrite(HgfsHandle handle,       // IN: Handle for this file
          break;
 
       case -EPROTO:
-         /* Retry with Version 2 of Open. Set globally. */
+         /* Retry with older version(s). Set globally. */
          if (opUsed == HGFS_OP_WRITE_V3) {
             LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDoWrite: Version 3 not "
                     "supported. Falling back to version 1.\n"));
-            atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
+            atomic_set(&hgfsVersionWrite, HGFS_OP_WRITE);
             goto retry;
          }
          break;
index c8eeb489d5d3c6de180f56ce1c9de7815a699177..aa84eeb4551185c2e4a9a90d097403226111d0a0 100644 (file)
@@ -293,10 +293,13 @@ RpcOut_sendOne(char **reply,        // OUT: Result
    }
 
    /*
-    * If the command doesn't contain a space, add one to the
-    * end to maintain compatibility with old VMXs.
+    * If the command doesn't contain a space, add one to the end to maintain
+    * compatibility with old VMXs.
     *
-    * XXX Do we still need to bother with this?
+    * For a long time, the GuestRpc logic in the VMX was wired to expect a
+    * trailing space in every command, even commands without arguments. That is
+    * no longer true, but we must continue to add a trailing space because we
+    * don't know whether we're talking to an old or new VMX.
     */
    if (strchr(request, ' ') == NULL) {
       char *tmp;
@@ -346,7 +349,8 @@ RpcOut_sendOne(char **reply,        // OUT: Result
  *    varargs.
  *
  *    Note: It is the caller's responsibility to ensure that the RPCI command
- *          followed by a space appear at the start of the request buffer.
+ *          followed by a space appear at the start of the request buffer. See
+ *          the command in RpcOut_sendOne for details.
  *
  * Return value:
  *    TRUE on success. '*reply' contains an allocated result of the rpc
index c6b2b44155b275564ac63be7fef9f881ff557422..32ce6cf62a30e5449a59b48cb7b5db1d0a431e0a 100644 (file)
@@ -278,7 +278,9 @@ HgfsPackQueryVolumeRequest(struct dentry *dentry,   // IN: File pointer for this
       name = requestV3->fileName.name;
       nameLength = &requestV3->fileName.length;
       requestV3->fileName.flags = 0;
+      requestV3->fileName.fid = HGFS_INVALID_HANDLE;
       requestV3->fileName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE;
+      requestV3->reserved = 0;
       requestSize = HGFS_REQ_PAYLOAD_SIZE_V3(requestV3);
       break;
    }
@@ -390,10 +392,6 @@ HgfsStatfs(struct super_block *sb, // IN : The superblock
 
   retry:
    opUsed = atomic_read(&hgfsVersionQueryVolumeInfo);
-   if (atomic_read(&hgfsProtocolVersion) == HGFS_VERSION_3) {
-      opUsed = HGFS_OP_QUERY_VOLUME_INFO_V3;
-   }
-
    result = HgfsPackQueryVolumeRequest(dentryToUse, opUsed, req);
    if (result != 0) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsStatfs: error packing request\n"));
@@ -415,16 +413,16 @@ HgfsStatfs(struct super_block *sb,        // IN : The superblock
          stat->f_type = HGFS_SUPER_MAGIC;
          stat->f_bsize = sbToUse->s_blocksize;
          stat->f_namelen = PATH_MAX;
-         stat->f_bavail = stat->f_bfree;
-        if (opUsed == HGFS_OP_QUERY_VOLUME_INFO_V3) {
+         if (opUsed == HGFS_OP_QUERY_VOLUME_INFO_V3) {
             totalBytes = ((HgfsReplyQueryVolumeV3 *)HGFS_REP_PAYLOAD_V3(req))->totalBytes;
             freeBytes = ((HgfsReplyQueryVolumeV3 *)HGFS_REP_PAYLOAD_V3(req))->freeBytes;
-        } else {
+         } else {
             totalBytes = ((HgfsReplyQueryVolume *)HGFS_REQ_PAYLOAD(req))->totalBytes;
             freeBytes = ((HgfsReplyQueryVolume *)HGFS_REQ_PAYLOAD(req))->freeBytes;
-        }
+         }
          stat->f_blocks = totalBytes >> sbToUse->s_blocksize_bits;
          stat->f_bfree = freeBytes >> sbToUse->s_blocksize_bits;
+         stat->f_bavail = stat->f_bfree;
          break;
 
       case -EPERM:
@@ -437,21 +435,22 @@ HgfsStatfs(struct super_block *sb,        // IN : The superblock
          result = 0;
          break;
 
+      case -EPROTO:
+         /* Retry with older version(s). Set globally. */
+         if (opUsed == HGFS_OP_QUERY_VOLUME_INFO_V3) {
+            LOG(4, (KERN_DEBUG "VMware hgfs: HgfsStatfs: Version 3 not "
+                    "supported. Falling back to version 1.\n"));
+            atomic_set(&hgfsVersionQueryVolumeInfo, HGFS_OP_QUERY_VOLUME_INFO);
+            goto retry;
+         }
+         break;
+
       default:
          break;
       }
    } else if (result == -EIO) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsStatfs: timed out\n"));
    } else if (result == -EPROTO) {
-      /* Retry with Version 1 of SearchOpen. Set globally. */
-      if (opUsed == HGFS_OP_QUERY_VOLUME_INFO_V3) {
-         LOG(4, (KERN_DEBUG "VMware hgfs: HgfsStatfs: Version 3 not "
-                 "supported. Falling back to version 1.\n"));
-         atomic_set(&hgfsProtocolVersion, HGFS_VERSION_OLD);
-         atomic_set(&hgfsVersionQueryVolumeInfo, HGFS_OP_QUERY_VOLUME_INFO);
-         goto retry;
-      }
-
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsStatfs: server returned error: "
               "%d\n", result));
    } else {
index 6d8a1111442b991fb7c89eec489bc66573169660..ef07e636ef3b60bedcb732cf8b5e12f70b0d6606 100644 (file)
@@ -416,7 +416,7 @@ FLAGDEF(  8A, EAX, AMD,     8,  1, SVM_HYPERVISOR,      MASK,    0, FALSE)
 FIELDDEF( 8A, EAX, AMD,     9, 23, SVMEAX_RSVD,         MASK,    0, FALSE)            \
 FIELDDEF( 8A, EBX, AMD,     0, 32, SVM_N_ASIDS,         MASK,    0, FALSE)            \
 FIELDDEF( 8A, ECX, AMD,     0, 32, SVMECX_RSVD,         MASK,    0, FALSE)            \
-FLAGDEF(  8A, EDX, AMD,     0,  1, SVM_NP,              MASK,    0, FALSE)            \
+FLAGDEFA( 8A, EDX, AMD,     0,  1, SVM_NP,              MASK,    0, FALSE, NPT)       \
 FLAGDEF(  8A, EDX, AMD,     1,  1, SVM_LBR,             MASK,    0, FALSE)            \
 FLAGDEF(  8A, EDX, AMD,     2,  1, SVM_LOCK,            MASK,    0, FALSE)            \
 FLAGDEF(  8A, EDX, AMD,     3,  1, SVM_NRIP,            MASK,    0, FALSE)            \
@@ -599,7 +599,6 @@ FIELD_FUNC(MWAIT_C4_SUBSTATE, CPUID_INTEL_ID5EDX_MWAIT_C4_SUBSTATE)
 #define CPUID_MODEL_CORE       14
 #define CPUID_MODEL_CORE2      15
 #define CPUID_MODEL_PENRYN     0x17  // Effective model
-#define CPUID_MODEL_NEHALEM    0x1a  // Effective model
 
 static INLINE uint32
 CPUID_EFFECTIVE_FAMILY(uint32 v) /* %eax from CPUID with %eax=1. */
diff --git a/open-vm-tools/scripts/Makefile.am b/open-vm-tools/scripts/Makefile.am
new file mode 100644 (file)
index 0000000..3ec9728
--- /dev/null
@@ -0,0 +1,7 @@
+confdir = /etc/vmware-tools
+
+conf_SCRIPTS = ./common/vm-support
+conf_SCRIPTS += $(MODULES_OS)/poweron-vm-default
+conf_SCRIPTS += $(MODULES_OS)/poweroff-vm-default
+conf_SCRIPTS += $(MODULES_OS)/suspend-vm-default
+conf_SCRIPTS += $(MODULES_OS)/resume-vm-default
diff --git a/open-vm-tools/scripts/Makefile.in b/open-vm-tools/scripts/Makefile.in
new file mode 100644 (file)
index 0000000..b804377
--- /dev/null
@@ -0,0 +1,384 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = scripts
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(confdir)"
+confSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(conf_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMMON_XLIBS = @COMMON_XLIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DNET_CONFIG = @DNET_CONFIG@
+DNET_CPPFLAGS = @DNET_CPPFLAGS@
+DNET_LIBS = @DNET_LIBS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+GTK_CPPFLAGS = @GTK_CPPFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GUESTD_LDADD = @GUESTD_LDADD@
+HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_CPPFLAGS = @ICU_CPPFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@
+LIB_FILE_CPPFLAGS = @LIB_FILE_CPPFLAGS@
+LIB_HGFS_SERVER_CPPFLAGS = @LIB_HGFS_SERVER_CPPFLAGS@
+LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@
+LIB_MISC_CPPFLAGS = @LIB_MISC_CPPFLAGS@
+LIB_PROC_MGR_CPPFLAGS = @LIB_PROC_MGR_CPPFLAGS@
+LIB_STRING_CPPFLAGS = @LIB_STRING_CPPFLAGS@
+LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
+MODULES_OS = @MODULES_OS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
+PROCPS_LIBS = @PROCPS_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
+VERSION = @VERSION@
+VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
+VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+confdir = /etc/vmware-tools
+conf_SCRIPTS = ./common/vm-support $(MODULES_OS)/poweron-vm-default \
+       $(MODULES_OS)/poweroff-vm-default \
+       $(MODULES_OS)/suspend-vm-default \
+       $(MODULES_OS)/resume-vm-default
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  scripts/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  scripts/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-confSCRIPTS: $(conf_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(confdir)" || $(MKDIR_P) "$(DESTDIR)$(confdir)"
+       @list='$(conf_SCRIPTS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f $$d$$p; then \
+           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+           echo " $(confSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(confdir)/$$f'"; \
+           $(confSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(confdir)/$$f"; \
+         else :; fi; \
+       done
+
+uninstall-confSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(conf_SCRIPTS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+         echo " rm -f '$(DESTDIR)$(confdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(confdir)/$$f"; \
+       done
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+       for dir in "$(DESTDIR)$(confdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-confSCRIPTS
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-confSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+       distclean distclean-generic distclean-libtool distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-confSCRIPTS install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       uninstall uninstall-am uninstall-confSCRIPTS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/open-vm-tools/scripts/common/vmware-toolbox.desktop b/open-vm-tools/scripts/common/vmware-toolbox.desktop
new file mode 100644 (file)
index 0000000..db2297c
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=VMware Toolbox
+Comment=VMware Guest Toolbox utility
+# have to use the full path here otherwise help won't work
+Exec=/usr/lib/vmware-tools/bin/vmware-toolbox
+Icon=vmware-toolbox
+Terminal=false
+Type=Application
+Categories=Application;Utility;
diff --git a/open-vm-tools/scripts/common/vmware-user.desktop b/open-vm-tools/scripts/common/vmware-user.desktop
new file mode 100644 (file)
index 0000000..c0042c0
--- /dev/null
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Encoding=UTF-8
+Exec=vmware-user
+Name=VMware User Agent
+X-KDE-autostart-phase=1
+NoDisplay=true
diff --git a/open-vm-tools/scripts/linux/pam.d/vmware-guestd b/open-vm-tools/scripts/linux/pam.d/vmware-guestd
new file mode 100644 (file)
index 0000000..53bfaa3
--- /dev/null
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth       sufficient       /lib/security/pam_unix2.so shadow nullok
+auth       required         /lib/security/pam_unix_auth.so shadow nullok
+account    sufficient       /lib/security/pam_unix2.so
+account    required         /lib/security/pam_unix_acct.so
diff --git a/open-vm-tools/scripts/linux/pam.d/vmware-guestd-x64 b/open-vm-tools/scripts/linux/pam.d/vmware-guestd-x64
new file mode 100644 (file)
index 0000000..d91081d
--- /dev/null
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth       sufficient       /lib64/security/pam_unix2.so shadow nullok
+auth       required         /lib64/security/pam_unix_auth.so shadow nullok
+account    sufficient       /lib64/security/pam_unix2.so
+account    required         /lib64/security/pam_unix_acct.so
index ed0e9e345f86120044418218a48bbb5fe485cc6e..9cdc1fb8ee625acbe037ebb5da0af882dfdec2c2 100644 (file)
 ### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ################################################################################
 
-noinst_PROGRAMS = toolbox
+bin_PROGRAMS = vmware-toolbox
 
 AM_CFLAGS = @GTK_CPPFLAGS@
 
-toolbox_LDADD =
-toolbox_LDADD += ../lib/conf/libConf.a
-toolbox_LDADD += ../lib/eventManager/libEventManager.a
-toolbox_LDADD += ../lib/file/libFile.a
-toolbox_LDADD += ../lib/guestApp/libGuestApp.a
-toolbox_LDADD += ../lib/hgfs/libHgfs.a
-toolbox_LDADD += ../lib/procMgr/libProcMgr.a
-toolbox_LDADD += ../lib/rpcIn/libRpcIn.a
-toolbox_LDADD += ../lib/rpcOut/libRpcOut.a
-toolbox_LDADD += ../lib/strUtil/libStrUtil.a
-toolbox_LDADD += ../lib/string/libString.a
-toolbox_LDADD += ../lib/system/libSystem.a
-toolbox_LDADD += ../lib/user/libUser.a
-toolbox_LDADD += ../lib/vmCheck/libVmCheck.a
-toolbox_LDADD += ../lib/vmSignal/libVmSignal.a
-toolbox_LDADD += ../lib/wiper/libWiper.a
+vmware_toolbox_LDADD =
+vmware_toolbox_LDADD += ../lib/conf/libConf.a
+vmware_toolbox_LDADD += ../lib/eventManager/libEventManager.a
+vmware_toolbox_LDADD += ../lib/file/libFile.a
+vmware_toolbox_LDADD += ../lib/guestApp/libGuestApp.a
+vmware_toolbox_LDADD += ../lib/hgfs/libHgfs.a
+vmware_toolbox_LDADD += ../lib/procMgr/libProcMgr.a
+vmware_toolbox_LDADD += ../lib/rpcIn/libRpcIn.a
+vmware_toolbox_LDADD += ../lib/rpcOut/libRpcOut.a
+vmware_toolbox_LDADD += ../lib/strUtil/libStrUtil.a
+vmware_toolbox_LDADD += ../lib/string/libString.a
+vmware_toolbox_LDADD += ../lib/system/libSystem.a
+vmware_toolbox_LDADD += ../lib/user/libUser.a
+vmware_toolbox_LDADD += ../lib/vmCheck/libVmCheck.a
+vmware_toolbox_LDADD += ../lib/vmSignal/libVmSignal.a
+vmware_toolbox_LDADD += ../lib/wiper/libWiper.a
 # In the absence of the linker options --start-group and --end-group (which
 # can't be put in LDADD), we need to bring the following libraries out of
 # the alphabetical order so their symbols are properly resolved.
-toolbox_LDADD += ../lib/err/libErr.a
-toolbox_LDADD += ../lib/backdoor/libBackdoor.a
-toolbox_LDADD += ../lib/dict/libDict.a
-toolbox_LDADD += ../lib/message/libMessage.a
-toolbox_LDADD += ../lib/unicode/libUnicode.a
-toolbox_LDADD += ../lib/sync/libSync.a
-toolbox_LDADD += ../lib/misc/libMisc.a
-toolbox_LDADD += ../lib/panicDefault/libPanicDefault.a
-toolbox_LDADD += ../lib/panic/libPanic.a
-toolbox_LDADD += -lX11
-toolbox_LDADD += @GTK_LIBS@
-toolbox_LDADD += @ICU_LIBS@
+vmware_toolbox_LDADD += ../lib/err/libErr.a
+vmware_toolbox_LDADD += ../lib/backdoor/libBackdoor.a
+vmware_toolbox_LDADD += ../lib/dict/libDict.a
+vmware_toolbox_LDADD += ../lib/message/libMessage.a
+vmware_toolbox_LDADD += ../lib/unicode/libUnicode.a
+vmware_toolbox_LDADD += ../lib/sync/libSync.a
+vmware_toolbox_LDADD += ../lib/misc/libMisc.a
+vmware_toolbox_LDADD += ../lib/panicDefault/libPanicDefault.a
+vmware_toolbox_LDADD += ../lib/panic/libPanic.a
+vmware_toolbox_LDADD += -lX11
+vmware_toolbox_LDADD += @GTK_LIBS@
+vmware_toolbox_LDADD += @ICU_LIBS@
 
-toolbox_SOURCES =
-toolbox_SOURCES += debugStdio.c
-toolbox_SOURCES += stub.c
-toolbox_SOURCES += toolbox-gtk.c
-toolbox_SOURCES += toolboxAbout.c
-toolbox_SOURCES += toolboxDevices.c
-toolbox_SOURCES += toolboxOptions.c
-toolbox_SOURCES += toolboxScripts.c
-toolbox_SOURCES += toolboxShrink.c
+vmware_toolbox_SOURCES =
+vmware_toolbox_SOURCES += debugStdio.c
+vmware_toolbox_SOURCES += stub.c
+vmware_toolbox_SOURCES += toolbox-gtk.c
+vmware_toolbox_SOURCES += toolboxAbout.c
+vmware_toolbox_SOURCES += toolboxDevices.c
+vmware_toolbox_SOURCES += toolboxOptions.c
+vmware_toolbox_SOURCES += toolboxScripts.c
+vmware_toolbox_SOURCES += toolboxShrink.c
+
+install-exec-hook:
+       $(INSTALL) -d $(datadir)/applications/
+       $(INSTALL) -m 644 ../scripts/common/vmware-toolbox.desktop \
+               $(datadir)/applications/
+       $(SED) -i s/Exec=.*/Exec=vmware-toolbox/ \
+               $(datadir)/applications/vmware-toolbox.desktop
+       $(INSTALL) -d /usr/share/pixmaps/vmware
+       $(INSTALL) -m 644 bigIcon.xpm \
+               /usr/share/pixmaps/vmware/vmware-toolbox.xpm
+uninstall-hook:
+       -$(RM) -f $(datadir)/share/applications/vmware-toolbox.desktop
+       -$(RM) -rf /usr/share/pixmaps/vmware
index 1f918de5269bbef5c98528890191a991fd4e7d55..78b3540952741758cbe738738042f8c156b84c68 100644 (file)
@@ -49,7 +49,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = toolbox$(EXEEXT)
+bin_PROGRAMS = vmware-toolbox$(EXEEXT)
 subdir = toolbox
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -58,13 +58,15 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-am_toolbox_OBJECTS = debugStdio.$(OBJEXT) stub.$(OBJEXT) \
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_vmware_toolbox_OBJECTS = debugStdio.$(OBJEXT) stub.$(OBJEXT) \
        toolbox-gtk.$(OBJEXT) toolboxAbout.$(OBJEXT) \
        toolboxDevices.$(OBJEXT) toolboxOptions.$(OBJEXT) \
        toolboxScripts.$(OBJEXT) toolboxShrink.$(OBJEXT)
-toolbox_OBJECTS = $(am_toolbox_OBJECTS)
-toolbox_DEPENDENCIES = ../lib/conf/libConf.a \
+vmware_toolbox_OBJECTS = $(am_vmware_toolbox_OBJECTS)
+vmware_toolbox_DEPENDENCIES = ../lib/conf/libConf.a \
        ../lib/eventManager/libEventManager.a ../lib/file/libFile.a \
        ../lib/guestApp/libGuestApp.a ../lib/hgfs/libHgfs.a \
        ../lib/procMgr/libProcMgr.a ../lib/rpcIn/libRpcIn.a \
@@ -89,8 +91,8 @@ CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-SOURCES = $(toolbox_SOURCES)
-DIST_SOURCES = $(toolbox_SOURCES)
+SOURCES = $(vmware_toolbox_SOURCES)
+DIST_SOURCES = $(vmware_toolbox_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -155,6 +157,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -163,6 +166,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -171,6 +175,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
@@ -234,7 +239,7 @@ AM_CFLAGS = @GTK_CPPFLAGS@
 # In the absence of the linker options --start-group and --end-group (which
 # can't be put in LDADD), we need to bring the following libraries out of
 # the alphabetical order so their symbols are properly resolved.
-toolbox_LDADD = ../lib/conf/libConf.a \
+vmware_toolbox_LDADD = ../lib/conf/libConf.a \
        ../lib/eventManager/libEventManager.a ../lib/file/libFile.a \
        ../lib/guestApp/libGuestApp.a ../lib/hgfs/libHgfs.a \
        ../lib/procMgr/libProcMgr.a ../lib/rpcIn/libRpcIn.a \
@@ -247,9 +252,9 @@ toolbox_LDADD = ../lib/conf/libConf.a \
        ../lib/unicode/libUnicode.a ../lib/sync/libSync.a \
        ../lib/misc/libMisc.a ../lib/panicDefault/libPanicDefault.a \
        ../lib/panic/libPanic.a -lX11 @GTK_LIBS@ @ICU_LIBS@
-toolbox_SOURCES = debugStdio.c stub.c toolbox-gtk.c toolboxAbout.c \
-       toolboxDevices.c toolboxOptions.c toolboxScripts.c \
-       toolboxShrink.c
+vmware_toolbox_SOURCES = debugStdio.c stub.c toolbox-gtk.c \
+       toolboxAbout.c toolboxDevices.c toolboxOptions.c \
+       toolboxScripts.c toolboxShrink.c
 all: all-am
 
 .SUFFIXES:
@@ -283,16 +288,37 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         if test -f $$p \
+            || test -f $$p1 \
+         ; then \
+           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+         else :; fi; \
+       done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(bindir)/$$f"; \
+       done
 
-clean-noinstPROGRAMS:
-       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+clean-binPROGRAMS:
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
-toolbox$(EXEEXT): $(toolbox_OBJECTS) $(toolbox_DEPENDENCIES) 
-       @rm -f toolbox$(EXEEXT)
-       $(LINK) $(toolbox_OBJECTS) $(toolbox_LDADD) $(LIBS)
+vmware-toolbox$(EXEEXT): $(vmware_toolbox_OBJECTS) $(vmware_toolbox_DEPENDENCIES) 
+       @rm -f vmware-toolbox$(EXEEXT)
+       $(LINK) $(vmware_toolbox_OBJECTS) $(vmware_toolbox_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -414,6 +440,9 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
+       for dir in "$(DESTDIR)$(bindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -440,8 +469,7 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
-       mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -rf ./$(DEPDIR)
@@ -463,7 +491,9 @@ install-data-am:
 
 install-dvi: install-dvi-am
 
-install-exec-am:
+install-exec-am: install-binPROGRAMS
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
 
 install-html: install-html-am
 
@@ -495,23 +525,39 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-noinstPROGRAMS ctags distclean \
-       distclean-compile distclean-generic distclean-libtool \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags uninstall uninstall-am
-
+uninstall-am: uninstall-binPROGRAMS
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+
+.MAKE: install-am install-exec-am install-strip uninstall-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+       clean-generic clean-libtool ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-binPROGRAMS install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-exec-hook \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-binPROGRAMS uninstall-hook
+
+
+install-exec-hook:
+       $(INSTALL) -d $(datadir)/applications/
+       $(INSTALL) -m 644 ../scripts/common/vmware-toolbox.desktop \
+               $(datadir)/applications/
+       $(SED) -i s/Exec=.*/Exec=vmware-toolbox/ \
+               $(datadir)/applications/vmware-toolbox.desktop
+       $(INSTALL) -d /usr/share/pixmaps/vmware
+       $(INSTALL) -m 644 bigIcon.xpm \
+               /usr/share/pixmaps/vmware/vmware-toolbox.xpm
+uninstall-hook:
+       -$(RM) -f $(datadir)/share/applications/vmware-toolbox.desktop
+       -$(RM) -rf /usr/share/pixmaps/vmware
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 70501cd3ad98b9f540d157d0288282cdb1cd66cb..b1774810323960b797a1ebe0ac8fb328be40b2ab 100644 (file)
@@ -163,22 +163,20 @@ void DebugToFile(const char *str) // IN
 {
 #ifndef _CONSOLE
    FileIOResult fr;
-   FileIODescriptor *fd;
+   FileIODescriptor fd;
    size_t bytesWritten;
    Unicode timePrefix;
    const char *timePrefixUtf8;
-   
+
    ASSERT(debugFile[0] != 0);
-   
-   fd = (FileIODescriptor *) malloc(sizeof(FileIODescriptor));
-   ASSERT_NOT_IMPLEMENTED(fd);
-   FileIO_Invalidate(fd);
-   
-   fr = FileIO_Open(fd, debugFile, FILEIO_OPEN_ACCESS_WRITE,
+
+   FileIO_Invalidate(&fd);
+
+   fr = FileIO_Open(&fd, debugFile, FILEIO_OPEN_ACCESS_WRITE,
                     FILEIO_OPEN_CREATE);
    if (fr != FILEIO_SUCCESS) {
-      Warning("---Error opening file '%s'.\n", debugFile);
       debugFile[0] = '\0';
+      Warning("---Error opening file '%s'.\n", debugFile);
       goto done;
    }
 
@@ -195,19 +193,18 @@ void DebugToFile(const char *str) // IN
    timePrefixUtf8 = UTF8(timePrefix);
    ASSERT(timePrefixUtf8);
 
-   FileIO_Seek(fd, 0, FILEIO_SEEK_END);
-   fr = FileIO_Write(fd, timePrefixUtf8, strlen(timePrefixUtf8), &bytesWritten);
-   fr = FileIO_Write(fd, str, strlen(str), &bytesWritten);
+   FileIO_Seek(&fd, 0, FILEIO_SEEK_END);
+   fr = FileIO_Write(&fd, timePrefixUtf8, strlen(timePrefixUtf8), &bytesWritten);
+   fr = FileIO_Write(&fd, str, strlen(str), &bytesWritten);
    Unicode_Free(timePrefix);
    if (fr != FILEIO_SUCCESS) {
       Warning("---Error writing to file '%s'.\n", debugFile);
    }
 
  close:
-   FileIO_Close(fd);
-   
+   FileIO_Close(&fd);
+
  done:
-   free(fd);
    return;
 #endif // _CONSOLE
 }
@@ -255,7 +252,7 @@ Debug(char const *fmt, // IN: Format string
    OutputDebugString(str);
 #endif
 #if !defined(_WIN32) || defined(_CONSOLE)
-   fprintf(stderr, str);
+   fputs(str, stderr);
 #endif
 #endif
    if (debugFile[0] != '\0') {
diff --git a/open-vm-tools/vmware-user-suid-wrapper/COPYING b/open-vm-tools/vmware-user-suid-wrapper/COPYING
new file mode 100644 (file)
index 0000000..09f465a
--- /dev/null
@@ -0,0 +1,502 @@
+                 GNU LESSER GENERAL PUBLIC LICENSE
+                      Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+                 GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                           NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library 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; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/open-vm-tools/vmware-user-suid-wrapper/Makefile.am b/open-vm-tools/vmware-user-suid-wrapper/Makefile.am
new file mode 100644 (file)
index 0000000..e37bbb2
--- /dev/null
@@ -0,0 +1,29 @@
+################################################################################
+### Copyright 2007 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_PROGRAMS = vmware-user-suid-wrapper
+
+# We shouldn't impose on users' installation preferences, so just provide
+# a sane default and let them override it at configure or make time.
+VMWARE_USER_PATH = $(bindir)/vmware-user
+
+AM_CPPFLAGS =
+AM_CPPFLAGS += -DVMWARE_USER_PATH=\"$(VMWARE_USER_PATH)\"
+
+vmware_user_suid_wrapper_SOURCES =
+vmware_user_suid_wrapper_SOURCES += main.c
+vmware_user_suid_wrapper_SOURCES += wrapper-@TARGET_OS@.c
diff --git a/open-vm-tools/vmware-user-suid-wrapper/Makefile.in b/open-vm-tools/vmware-user-suid-wrapper/Makefile.in
new file mode 100644 (file)
index 0000000..76191b7
--- /dev/null
@@ -0,0 +1,487 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+################################################################################
+### Copyright 2007 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
+################################################################################
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = vmware-user-suid-wrapper$(EXEEXT)
+subdir = vmware-user-suid-wrapper
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_vmware_user_suid_wrapper_OBJECTS = main.$(OBJEXT) \
+       wrapper-@TARGET_OS@.$(OBJEXT)
+vmware_user_suid_wrapper_OBJECTS =  \
+       $(am_vmware_user_suid_wrapper_OBJECTS)
+vmware_user_suid_wrapper_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+SOURCES = $(vmware_user_suid_wrapper_SOURCES)
+DIST_SOURCES = $(vmware_user_suid_wrapper_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMMON_XLIBS = @COMMON_XLIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DNET_CONFIG = @DNET_CONFIG@
+DNET_CPPFLAGS = @DNET_CPPFLAGS@
+DNET_LIBS = @DNET_LIBS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+GTK_CPPFLAGS = @GTK_CPPFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GUESTD_LDADD = @GUESTD_LDADD@
+HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_CPPFLAGS = @ICU_CPPFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@
+LIB_FILE_CPPFLAGS = @LIB_FILE_CPPFLAGS@
+LIB_HGFS_SERVER_CPPFLAGS = @LIB_HGFS_SERVER_CPPFLAGS@
+LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@
+LIB_MISC_CPPFLAGS = @LIB_MISC_CPPFLAGS@
+LIB_PROC_MGR_CPPFLAGS = @LIB_PROC_MGR_CPPFLAGS@
+LIB_STRING_CPPFLAGS = @LIB_STRING_CPPFLAGS@
+LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
+MODULES_OS = @MODULES_OS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
+PROCPS_LIBS = @PROCPS_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
+VERSION = @VERSION@
+VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
+VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# We shouldn't impose on users' installation preferences, so just provide
+# a sane default and let them override it at configure or make time.
+VMWARE_USER_PATH = $(bindir)/vmware-user
+AM_CPPFLAGS = -DVMWARE_USER_PATH=\"$(VMWARE_USER_PATH)\"
+vmware_user_suid_wrapper_SOURCES = main.c wrapper-@TARGET_OS@.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  vmware-user-suid-wrapper/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  vmware-user-suid-wrapper/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         echo " rm -f $$p $$f"; \
+         rm -f $$p $$f ; \
+       done
+vmware-user-suid-wrapper$(EXEEXT): $(vmware_user_suid_wrapper_OBJECTS) $(vmware_user_suid_wrapper_DEPENDENCIES) 
+       @rm -f vmware-user-suid-wrapper$(EXEEXT)
+       $(LINK) $(vmware_user_suid_wrapper_OBJECTS) $(vmware_user_suid_wrapper_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrapper-@TARGET_OS@.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-noinstPROGRAMS ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/open-vm-tools/vmware-user-suid-wrapper/locationsdb.c b/open-vm-tools/vmware-user-suid-wrapper/locationsdb.c
new file mode 100644 (file)
index 0000000..8059eb7
--- /dev/null
@@ -0,0 +1,149 @@
+/*********************************************************
+ * Copyright (C) 2007 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.
+ *
+ *********************************************************/
+
+
+/*
+ * locationsdb.c --
+ *
+ *    Provides the QueryLocationsDB routine for finding keys in the locations
+ *    database.  Because our application is a setuid binary and we want to
+ *    minimize risk, we retain the duplicated functionality here rather than
+ *    link against lib/unixinstall.
+ */
+
+#if !defined(sun) && !defined(__FreeBSD__) && !defined(linux)
+# error This program is not supported on your platform.
+#endif
+
+#include <sys/param.h>
+
+#include <fcntl.h>
+#include <string.h>
+#include <strings.h>
+
+#include "vm_basic_types.h"
+#include "wrapper.h"
+
+
+
+/*
+ * Local data
+ */
+
+/*
+ * Mappings between queries and search strings
+ */
+
+typedef struct Mapping {
+   const char *answer;          /* string to match for "answer FOO" */
+   const char *remove;          /* string to match for "remove_answer FOO" */
+   size_t answerSize;           /* size of answer buffer */
+   size_t removeSize;           /* size of remove buffer */
+} Mapping;
+
+/*
+ * queryMappings between Selector => search strings.  Used by QueryLocationsDB.
+ */
+
+#define ANSWER_LIBDIR   "answer LIBDIR"
+#define REMOVE_LIBDIR   "remove_answer LIBDIR"
+#define ANSWER_BINDIR   "answer BINDIR"
+#define REMOVE_BINDIR   "remove_answer BINDIR"
+
+static Mapping queryMappings[] = {
+   { ANSWER_LIBDIR, REMOVE_LIBDIR, sizeof ANSWER_LIBDIR, sizeof REMOVE_LIBDIR },
+   { ANSWER_BINDIR, REMOVE_BINDIR, sizeof ANSWER_BINDIR, sizeof REMOVE_BINDIR },
+   { 0, 0, 0, 0 }
+};
+
+
+/*
+ * Global functions (definitions)
+ */
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * QueryLocationsDB --
+ *
+ *    Based on the caller's Selector, determines the directory selected as
+ *    "LIBDIR", "BINDIR", etc. when the Tools were last configured.
+ *
+ * Results:
+ *    TRUE on success, FALSE on failure.  queryDir is filled in on success.
+ *
+ * Side effects:
+ *    None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+Bool
+QueryLocationsDB(const char *locations, // IN : path of locations database
+                 Selector selector,     // IN : DB query to search for
+                 char *queryDir,        // OUT: address to write dirname to
+                 size_t queryDirSize)   // IN : size of queryDir buffer
+{
+   FILE *file = NULL;
+   char buf[MAXPATHLEN];
+   Bool found = FALSE;
+   Mapping *map;
+
+   if (selector < 0 || selector >= QUERY_MAX) {
+      Error("Internal logic error.  This is a bug.");
+      return FALSE;
+   }
+
+   file = fopen(locations, "r");
+   if (!file) {
+      return FALSE;
+   }
+
+   map = &queryMappings[selector];
+
+   /*
+    * We need to inspect the entire locations database since there are both
+    * "answer"s and "remove_answer"s.  We want to provide the last answer that
+    * has not been removed.
+    */
+   while (fgets(buf, sizeof buf, file)) {
+      if (strncmp(buf, map->answer, map->answerSize - 1) == 0) {
+         char *newline;
+
+         strncpy(queryDir, buf + map->answerSize, queryDirSize);
+         if (queryDir[queryDirSize - 1] != '\0') {
+            found = FALSE;
+            continue;
+         }
+
+         /* Truncate the string at the newline character, if it's present. */
+         newline = strchr(queryDir, '\n');
+         if (newline && newline - queryDir < queryDirSize) {
+            *newline = '\0';
+         }
+
+         found = TRUE;
+      } else if (strncmp(buf, map->remove, map->removeSize - 1) == 0) {
+         found = FALSE;
+      }
+   }
+
+   fclose(file);
+   return found;
+}
diff --git a/open-vm-tools/vmware-user-suid-wrapper/main.c b/open-vm-tools/vmware-user-suid-wrapper/main.c
new file mode 100644 (file)
index 0000000..e556477
--- /dev/null
@@ -0,0 +1,499 @@
+/*********************************************************
+ * Copyright (C) 2007 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.
+ *
+ *********************************************************/
+
+
+/*
+ * main.c --
+ *
+ *      This program is run as root to prepare the system for vmware-user.  It
+ *      unmounts the vmblock file system, unloads the vmblock module, then
+ *      reloads the module, mounts the file system, and opens a file descriptor
+ *      that vmware-user can use to add and remove blocks.  This must all
+ *      happen as root since we cannot allow any random process to add and
+ *      remove blocks in the blocking file system.
+ */
+
+#if !defined(sun) && !defined(__FreeBSD__) && !defined(linux)
+# error This program is not supported on your platform.
+#endif
+
+#include <sys/param.h>
+#include <sys/mount.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined(sun)
+# include <sys/systeminfo.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <strings.h>
+
+#include "vmware.h"
+#include "vmblock.h"
+#include "wrapper.h"
+
+#include "wrapper_version.h"
+#include "embed_version.h"
+VM_EMBED_VERSION(WRAPPER_VERSION_STRING);
+
+
+/*
+ * Local functions (prototypes)
+ */
+
+#ifdef TOGGLE_VMBLOCK
+static void ToggleVMBlock(void);
+static Bool StartVMBlock(void);
+static Bool StopVMBlock(void);
+static Bool MakeDirectory(const char *path, mode_t mode, uid_t uid, gid_t gid);
+static Bool ChmodChownDirectory(const char *path,
+                                mode_t mode, uid_t uid, gid_t gid);
+#endif
+static Bool StartVMwareUser(char *const envp[]);
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * main --
+ *
+ *    On platforms where this wrapper manages the vmblock module:
+ *       Unmounts vmblock and unloads the module, then reloads the module,
+ *       and remounts the file system, then starts vmware-user as described
+ *       below.
+ *
+ *       This program is the only point at which vmblock is stopped or
+ *       started.  This means we must always unload the module to ensure that
+ *       we are using the newest installed version (since an upgrade could
+ *       have occurred since the last time this program ran).
+ *
+ *    On all platforms:
+ *       Acquires the vmblock control file descriptor, drops privileges, then
+ *       starts vmware-user.
+ *
+ * Results:
+ *    EXIT_SUCCESS on success and EXIT_FAILURE on failure.
+ *
+ * Side effects:
+ *    None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+int
+main(int argc,
+     char *argv[],
+     char *envp[])
+{
+#ifdef TOGGLE_VMBLOCK
+   ToggleVMBlock();
+#endif
+
+   if (!StartVMwareUser(envp)) {
+      Error("failed to start vmware-user\n");
+      exit(EXIT_FAILURE);
+   }
+
+   exit(EXIT_SUCCESS);
+}
+
+
+/*
+ * Local functions (definitions)
+ */
+
+
+#ifdef TOGGLE_VMBLOCK
+/*
+ *----------------------------------------------------------------------------
+ *
+ * ToggleVMBlock --
+ *
+ *    Unmounts vmblock and unloads the module, then reloads the module and
+ *    remounts the file system.
+ *
+ * Results:
+ *    Vmblock file system "service" is reloaded.
+ *
+ * Side effects:
+ *    May exit with EXIT_FAILURE if the vmblock service cannot be stopped.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+static void
+ToggleVMBlock(void)
+{
+   if (!StopVMBlock()) {
+      Error("failed to stop vmblock\n");
+      exit(EXIT_FAILURE);
+   }
+
+   if (!StartVMBlock()) {
+      /*
+       * There is more to vmware-user than VMBlock, so in case of error,
+       * only make a little noise.  Continue to launch vmware-user.
+       */
+      Error("failed to start vmblock\n");
+   }
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * StopVMBlock --
+ *
+ *    Unmounts the vmblock file system and unload the vmblock module.
+ *
+ * Results:
+ *    TRUE on success, FALSE on failure.
+ *
+ * Side effects:
+ *    None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+static Bool
+StopVMBlock(void)
+{
+   Bool ret;
+   int id;
+
+   /*
+    * Default to success whether or not module loaded.  Can fail only if
+    * unload fails.
+    */
+   ret = TRUE;
+
+   /*
+    * The file system may not be mounted and that's okay.  If it is mounted and
+    * this fails, the unloading of the module will fail later.
+    */
+   UnmountVMBlock(VMBLOCK_MOUNT_POINT);
+
+   id = GetModuleId(MODULE_NAME);
+   if (id >= 0) {
+      /* The module is loaded. */
+      if (!UnloadModule(id)) {
+         ret = FALSE;
+      }
+   }
+
+   return ret;
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * StartVMBlock --
+ *
+ *    Loads the vmblock module and mounts its file system.
+ *
+ * Results:
+ *    TRUE on success and FALSE on failure.
+ *
+ * Side effects:
+ *    None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+static Bool
+StartVMBlock(void)
+{
+   uid_t euid;
+   gid_t egid;
+
+   euid = geteuid();
+   egid = getegid();
+
+   if (!MakeDirectory(TMP_DIR, TMP_DIR_MODE, euid, egid)) {
+      Error("failed to create %s\n", TMP_DIR);
+      return FALSE;
+   }
+
+   if (!MakeDirectory(VMBLOCK_MOUNT_POINT, MOUNT_POINT_MODE, euid, egid)) {
+      Error("failed to create %s\n", VMBLOCK_MOUNT_POINT);
+      return FALSE;
+   }
+
+   if (!LoadVMBlock()) {
+      return FALSE;
+   }
+
+   if (!MountVMBlock()) {
+      /* This will unload the module and ignore the unmount failure. */
+      StopVMBlock();
+      return FALSE;
+   }
+
+   return TRUE;
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * MakeDirectory --
+ *
+ *    Creates a directory with the provided mode, uid, and gid.  If the
+ *    provided path already exists, this will ensure that it has the correct
+ *    mode, uid, and gid, or else it will fail.
+ *
+ * Results:
+ *    TRUE on success, FALSE on failure.
+ *
+ * Side effects:
+ *    None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+static Bool
+MakeDirectory(const char *path, // IN: path to create
+              mode_t mode,      // IN: mode of new directory
+              uid_t uid,        // IN: owner of new directory
+              gid_t gid)        // IN: group of new directory
+{
+   if (mkdir(path, mode) == 0) {
+      /*
+       * We still need to chmod(2) the directory since mkdir(2) takes the umask
+       * into account.
+       */
+      if (!ChmodChownDirectory(path, mode, uid, gid)) {
+         return FALSE;
+      }
+      return TRUE;
+   }
+
+   /*
+    * If we couldn't create the directory because the path already exists, we
+    * need to make sure it's a directory and that it has the correct
+    * permissions and owner.  For any other failure we fail.
+    */
+   if (errno != EEXIST || !ChmodChownDirectory(path, mode, uid, gid)) {
+      return FALSE;
+   }
+
+   return TRUE;
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * ChmodChownDirectory --
+ *
+ *    Atomically ensures the provided path is a directory and changes its mode,
+ *    uid, and gid to the provided values.
+ *
+ * Results:
+ *    TRUE on success, FALSE on failure.
+ *
+ * Side effects:
+ *    None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+static Bool
+ChmodChownDirectory(const char *path,  // IN
+                    mode_t mode,       // IN
+                    uid_t uid,         // IN
+                    gid_t gid)         // IN
+{
+   int fd;
+   struct stat stat;
+   int ret = FALSE;
+
+   fd = open(path, O_RDONLY);
+   if (fd < 0) {
+      return FALSE;
+   }
+
+   if (fstat(fd, &stat) != 0) {
+      goto out;
+   }
+
+   if (!S_ISDIR(stat.st_mode)) {
+      goto out;
+   }
+
+   if ((stat.st_uid != uid || stat.st_gid != gid) &&
+       fchown(fd, uid, gid) != 0) {
+      goto out;
+   }
+
+   if (stat.st_mode != mode && fchmod(fd, mode) != 0) {
+      goto out;
+   }
+
+   ret = TRUE;
+
+out:
+   close(fd);
+   return ret;
+}
+#endif  // ifdef TOGGLE_VMBLOCK
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * StartVMwareUser --
+ *
+ *    Obtains the library directory from the Tools locations database, then
+ *    opens a file descriptor (while still root) to add and remove blocks,
+ *    drops privilege to the real uid of this process, and finally starts
+ *    vmware-user.
+ *
+ * Results:
+ *    Parent: TRUE on success, FALSE on failure.
+ *    Child: FALSE on failure, no return on success.
+ *
+ * Side effects:
+ *    None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+static Bool
+StartVMwareUser(char *const envp[])
+{
+   pid_t pid;
+   uid_t uid;
+   gid_t gid;
+   int fd = -1;
+   int ret;
+   char path[MAXPATHLEN];
+   char *argv[4];
+
+   if (!BuildExecPath(path, sizeof path)) {
+      return FALSE;
+   }
+
+   /*
+    * Now create a child process, obtain a file descriptor as root, downgrade
+    * privilege, and run vmware-user.
+    */
+   pid = fork();
+   if (pid == -1) {
+      Error("fork failed: %s\n", strerror(errno));
+      return FALSE;
+   } else if (pid != 0) {
+      /* Parent */
+      return TRUE;
+   }
+
+   /* Child */
+
+   /*
+    * We know the file system is mounted and want to keep this suid
+    * root wrapper as small as possible, so here we directly open(2) the
+    * "device" instead of calling DnD_InitializeBlocking() and bringing along
+    * a whole host of libs.
+    */
+   fd = open(VMBLOCK_DEVICE, VMBLOCK_DEVICE_MODE);
+
+   uid = getuid();
+   gid = getgid();
+
+   if ((setreuid(uid, uid) != 0) ||
+       (setregid(gid, gid) != 0)) {
+      Error("could not drop privileges: %s\n", strerror(errno));
+      if (fd != -1) {
+         close(fd);
+      }
+      return FALSE;
+   }
+
+   /*
+    * Since vmware-user provides features that don't depend on vmblock, we
+    * invoke vmware-user even if we couldn't obtain a file descriptor or we
+    * can't parse the descriptor to pass as an argument.  We set up the
+    * argument vector accordingly.
+    */
+   argv[0] = path;
+
+   if (fd < 0) {
+      Error("could not open %s\n", VMBLOCK_DEVICE);
+      argv[1] = NULL;
+   } else {
+      char fdStr[8];
+
+      ret = snprintf(fdStr, sizeof fdStr, "%d", fd);
+      if (ret == 0 || ret >= sizeof fdStr) {
+         Error("could not parse file descriptor (%d)\n", fd);
+         argv[1] = NULL;
+      } else {
+         argv[1] = "-blockFd";
+         argv[2] = fdStr;
+         argv[3] = NULL;
+      }
+   }
+
+   CompatExec(path, argv, envp);
+
+   /*
+    * CompatExec, if successful, doesn't return.  I.e., we're here only
+    * if CompatExec fails.
+    */
+   Error("could not execute %s: %s\n", path, strerror(errno));
+   exit(EXIT_FAILURE);
+}
+
+
+#ifndef USES_LOCATIONS_DB
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * BuildExecPath --
+ *
+ *     Writes the path to vmware-user to execPath.  This version, as opposed
+ *     to the versions in $platform/wrapper.c, is only used when the locations
+ *     database isn't used.
+ *
+ * Results:
+ *      TRUE on success, FALSE on failure.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+BuildExecPath(char *execPath,           // OUT: Buffer to store executable's path
+              size_t execPathSize)      // IN : size of execPath buffer
+{
+   if (execPathSize < sizeof VMWARE_USER_PATH) {
+      return FALSE;
+   }
+   strcpy(execPath, VMWARE_USER_PATH);
+   return TRUE;
+}
+#endif // ifndef USES_LOCATIONS_DB
diff --git a/open-vm-tools/vmware-user-suid-wrapper/wrapper-freebsd.c b/open-vm-tools/vmware-user-suid-wrapper/wrapper-freebsd.c
new file mode 100644 (file)
index 0000000..0cc31f5
--- /dev/null
@@ -0,0 +1,291 @@
+/*********************************************************
+ * Copyright (C) 2007 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.
+ *
+ *********************************************************/
+
+/*
+ * wrapper.c --
+ *
+ *      Platform specific code for the VMware User Agent setuid wrapper.
+ */
+
+
+#include <sys/param.h>
+#include <sys/mount.h>
+#include <sys/uio.h>    // for nmount(2)
+#include <sys/linker.h> // for kldfind(2), kldload(2), etc.
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "vmware.h"
+#include "wrapper.h"
+
+
+/*
+ * Global functions
+ */
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * GetModuleId --
+ *
+ *      Finds the id of the provided loaded module.
+ *
+ * Results:
+ *      The id on success, a negative error code on failure.
+ *
+ * Side effects:
+ *      None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+int
+GetModuleId(const char *name)   // IN: module name to search for
+{
+   return kldfind(name);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * UnloadModule --
+ *
+ *      Lookup and, if loaded, unload the VMBlock kernel module.
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+UnloadModule(int id)    // IN: module id for kldunload(2) 
+{
+   if (kldunload(id) < 0) {
+      Error("failed to unload vmblock: %s\n", strerror(errno));
+      return FALSE;
+   }
+
+   return TRUE;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * LoadVMBlock --
+ *
+ *      Load the VMBlock kernel module.
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+LoadVMBlock(void)
+{
+   /*
+    * Kldload(2) will handle module search paths for us.
+    */
+   if (kldload(MODULE_NAME) == -1) {
+      Error("failed to load vmblock: %s\n", strerror(errno));
+      return FALSE;
+   }
+
+   return TRUE;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * UnmountVMBlock --
+ *
+ *      Unmount the VMBlock file system.
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+UnmountVMBlock(const char *mountPoint)  // IN: VMBlock mount point
+{
+   if (unmount(mountPoint, 0) == -1) {
+      return FALSE;
+   }
+   return TRUE;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * MountVMBlock --
+ *
+ *      Mount the VMBlock file system.
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+MountVMBlock(void)
+{
+   /*
+    * These arguments are given as interleaved key => value pairs.  We're
+    * requesting mount of the VMBlock filesystem (fstype), with TMP_DIR (target)
+    * remounted over VMBLOCK_MOUNT_POINT (fspath).
+    */
+   struct iovec iov[] = {
+      { .iov_base = "fstype", .iov_len = sizeof "fstype" },
+      { .iov_base = "vmblock", .iov_len = sizeof "vmblock" },
+      { .iov_base = "fspath", .iov_len = sizeof "fspath" },
+      { .iov_base = VMBLOCK_MOUNT_POINT, .iov_len = sizeof VMBLOCK_MOUNT_POINT },
+      { .iov_base = "target", .iov_len = sizeof "target" },
+      { .iov_base = TMP_DIR, .iov_len = sizeof TMP_DIR }
+   };
+
+   if (nmount(iov, ARRAYSIZE(iov), MNT_NOSUID) == -1) {
+      Error("failed to mount vmblock file system: %s\n", strerror(errno));
+      return FALSE;
+   }
+
+   return TRUE;
+}
+
+
+#ifdef USES_LOCATIONS_DB
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * BuildExecPath --
+ *
+ *      Determine & return path of vmware-user for use by execve(2).
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+BuildExecPath(char *execPath,           // OUT: Buffer to store executable's path
+              size_t execPathSize)      // IN : size of execPath buffer
+{
+   char tmpPath[MAXPATHLEN];
+   int execLen;
+
+   /*
+    * The locations database is the only path that's fixed, and it contains the
+    * paths to all the other paths selected during Tools configuration.  The
+    * locations database file is only writable by root, so we can trust it.
+    */
+   if (!QueryLocationsDB(LOCATIONS_PATH, QUERY_BINDIR, tmpPath, sizeof tmpPath)) {
+      Error("could not obtain BINDIR\n");
+      return FALSE;
+   }
+
+   if (strlcat(tmpPath,
+               "/vmware-user-wrapper", sizeof tmpPath) >= sizeof tmpPath) {
+      Error("could not construct program filename\n");
+      return FALSE;
+   }
+
+   /*
+    * From readlink(2), "The readlink() system call does not append a NUL
+    * character to buf."  (NB:  This breaks if user ever replaces the symlink
+    * with the target.)
+    */
+   if ((execLen = readlink(tmpPath, execPath, execPathSize - 1)) == -1) {
+      Error("could not resolve symlink: %s\n", strerror(errno));
+      return FALSE;
+   }
+
+   execPath[execLen] = '\0';
+
+   /*
+    * Now make sure that the target is actually part of our "trusted"
+    * directory.  (Check that execPath has LIBDIR as a prefix and does
+    * not contain "..".)
+    */
+   if (!QueryLocationsDB(LOCATIONS_PATH, QUERY_LIBDIR, tmpPath,
+                         sizeof tmpPath)) {
+      Error("could not obtain LIBDIR\n");
+      return FALSE;
+   }
+
+   if ((strncmp(execPath, tmpPath, strlen(tmpPath)) != 0) ||
+       (strstr(execPath, "..") != NULL)) {
+      Error("vmware-user path untrusted\n");
+      return FALSE;
+   }
+
+   return TRUE;
+}
+#endif // ifdef USES_LOCATIONS_DB
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * CompatExec --
+ *
+ *      Simple platform-dependent execve() wrapper.
+ *
+ * Results:
+ *      False.
+ *
+ * Side effects:
+ *      This function may not return.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+Bool
+CompatExec(const char *path, char * const argv[], char * const envp[])
+{
+   execve(path, argv, envp);
+   return FALSE;
+}
diff --git a/open-vm-tools/vmware-user-suid-wrapper/wrapper-linux.c b/open-vm-tools/vmware-user-suid-wrapper/wrapper-linux.c
new file mode 100644 (file)
index 0000000..bf7e2fe
--- /dev/null
@@ -0,0 +1,145 @@
+/*********************************************************
+ * Copyright (C) 2008 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.
+ *
+ *********************************************************/
+
+/*
+ * wrapper.c --
+ *
+ *      Platform specific code for the VMware User Agent setuid wrapper.
+ */
+
+#include <sys/mount.h>
+#include <sys/param.h>
+#include <sys/utsname.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "vmware.h"
+#include "wrapper.h"
+
+
+/*
+ * Global functions
+ */
+
+
+#ifdef USES_LOCATIONS_DB
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * BuildExecPath --
+ *
+ *      Determine & return path of vmware-user for use by execve(2).
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+BuildExecPath(char *execPath,           // OUT: Buffer to store executable's path
+              size_t execPathSize)      // IN : size of execPath buffer
+{
+   char tmpPath[MAXPATHLEN];
+   int execLen;
+
+   /*
+    * The locations database is the only path that's fixed, and it contains the
+    * paths to all the other paths selected during Tools configuration.  The
+    * locations database file is only writable by root, so we can trust it.
+    */
+   if (!QueryLocationsDB(LOCATIONS_PATH, QUERY_BINDIR, tmpPath, sizeof tmpPath)) {
+      Error("could not obtain BINDIR\n");
+      return FALSE;
+   }
+
+   if (strlen(tmpPath) + strlen("/vmware-user-wrapper") + 1 > sizeof tmpPath) {
+      Error("could not construct program filename\n");
+      return FALSE;
+   }
+   strcat(tmpPath, "/vmware-user-wrapper");
+
+   /*
+    * From readlink(2), "The readlink() system call does not append a NUL
+    * character to buf."  (NB:  This breaks if user ever replaces the symlink
+    * with the target.)
+    */
+   if ((execLen = readlink(tmpPath, execPath, execPathSize - 1)) == -1) {
+      Error("could not resolve symlink: %s\n", strerror(errno));
+      return FALSE;
+   }
+
+   execPath[execLen] = '\0';
+
+   /*
+    * Now make sure that the target is actually part of our "trusted"
+    * directory.  (Check that execPath has LIBDIR as a prefix and does
+    * not contain "..".)
+    */
+   if (!QueryLocationsDB(LOCATIONS_PATH, QUERY_LIBDIR, tmpPath,
+                         sizeof tmpPath)) {
+      Error("could not obtain LIBDIR\n");
+      return FALSE;
+   }
+
+   if ((strncmp(execPath, tmpPath, strlen(tmpPath)) != 0) ||
+       (strstr(execPath, "..") != NULL)) {
+      Error("vmware-user path untrusted\n");
+      return FALSE;
+   }
+
+   return TRUE;
+}
+#endif // ifdef USES_LOCATIONS_DB
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * CompatExec --
+ *
+ *      Simple platform-dependent execve() wrapper.
+ *
+ * Results:
+ *      False.
+ *
+ * Side effects:
+ *      This function may not return.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+Bool
+CompatExec(const char *path,    // IN: path to executable
+           char * const argv[], // IN: argument vector (see execve)
+           char * const envp[]) // IN: environment vector (see execve)
+{
+   execve(path, argv, envp);
+   return FALSE;
+}
diff --git a/open-vm-tools/vmware-user-suid-wrapper/wrapper-solaris.c b/open-vm-tools/vmware-user-suid-wrapper/wrapper-solaris.c
new file mode 100644 (file)
index 0000000..d975076
--- /dev/null
@@ -0,0 +1,261 @@
+/*********************************************************
+ * Copyright (C) 2007 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.
+ *
+ *********************************************************/
+
+/*
+ * wrapper.c --
+ *
+ *      Platform dependent code for the VMware User Agent setuid wrapper.
+ */
+
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/mntent.h>
+#include <sys/modctl.h>
+#include <sys/systeminfo.h>
+
+#include <errno.h>
+#include <strings.h>
+#include <unistd.h>
+
+#include "wrapper.h"
+
+
+/*
+ * Global functions
+ */
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * UnloadModule --
+ *
+ *      Lookup and, if loaded, unload the VMBlock kernel module.
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+UnloadModule(int id)    // IN: module id for modctl(2)
+{
+   if (modctl(MODUNLOAD, id) < 0) {
+      Error("Error unloading VMBlock module: %s", strerror(errno));
+      return FALSE;
+   }
+
+   return TRUE;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * LoadVMBlock --
+ *
+ *      Load the VMBlock kernel module.
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+LoadVMBlock(void)
+{
+   /*
+    * modctl will load either the 32-bit or 64-bit module, as appropriate.
+    */
+   if (modctl(MODLOAD, 1, "drv/vmblock", NULL) < 0) {
+      Error("failed to load vmblock\n");
+      return FALSE;
+   }
+
+   return TRUE;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * UnmountVMBlock --
+ *
+ *      Unmount the VMBlock file system.
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+UnmountVMBlock(const char *mountPoint)  // IN: VMBlock mount point
+{
+   if (umount(mountPoint) == -1) {
+      return FALSE;
+   }
+   return TRUE;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * MountVMBlock --
+ *
+ *      Mount the VMBlock file system.
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+MountVMBlock(void)
+{
+   if (mount(TMP_DIR, VMBLOCK_MOUNT_POINT, MS_DATA, VMBLOCK_FS_NAME) < 0) {
+      Error("failed to mount vmblock file system: %s\n", strerror(errno));
+      return FALSE;
+   }
+
+   return TRUE;
+}
+
+
+#ifdef USES_LOCATIONS_DB
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * BuildExecPath --
+ *
+ *      Mount the VMBlock file system.
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+BuildExecPath(char *execPath,           // OUT: Path to executable for isaexec()
+              size_t execPathSize)      // IN : size of execPath buffer
+{
+   /*
+    * The locations database is the only path that's fixed, and it contains the
+    * paths to all the other paths selected during Tools configuration.  The
+    * locations database file is only writable by root, so we can trust it.
+    */
+   if (!QueryLocationsDB(LOCATIONS_PATH, QUERY_LIBDIR, execPath, execPathSize)) {
+      Error("could not obtain LIBDIR\n");
+      return FALSE;
+   }
+
+   /*
+    * We will use isaexec(3C) below so we specify the base directory in our
+    * tarball that contains the ISA directories with actual binaries.
+    */
+   if (strlcat(execPath,
+               "/bin/vmware-user-wrapper", execPathSize) >= execPathSize) {
+      Error("could not construct program filename\n");
+      return FALSE;
+   }
+
+   return TRUE;
+}
+#endif // ifdef USES_LOCATIONS_DB
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * GetModuleId --
+ *
+ *      Finds the id of the provided loaded module.
+ *
+ * Results:
+ *      The id on success, a negative error code on failure.
+ *
+ * Side effects:
+ *      None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+int
+GetModuleId(const char *name)   // IN: module name to search for
+{
+   struct modinfo modinfo;
+
+   /*
+    * Loop until either there are no more modules (modctl() fails) or we found
+    * the module the caller wanted.
+    */
+   modinfo.mi_id = modinfo.mi_nextid = -1;
+   modinfo.mi_info = MI_INFO_ALL;
+
+   do {
+      if (modctl(MODINFO, modinfo.mi_id, &modinfo) < 0) {
+         return -1;
+      }
+   } while (strcmp(modinfo.mi_name, name) != 0);
+
+   return modinfo.mi_id;
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * CompatExec --
+ *
+ *      Simple platform-dependent isaexec() wrapper.
+ *
+ * Results:
+ *      False.
+ *
+ * Side effects:
+ *      Ideally, this function should not return.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+Bool
+CompatExec(const char *path, char * const argv[], char * const envp[])
+{
+   isaexec(path, argv, envp);
+   return FALSE;
+}
diff --git a/open-vm-tools/vmware-user-suid-wrapper/wrapper.h b/open-vm-tools/vmware-user-suid-wrapper/wrapper.h
new file mode 100644 (file)
index 0000000..a6ed699
--- /dev/null
@@ -0,0 +1,95 @@
+/*********************************************************
+ * Copyright (C) 2007 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.
+ *
+ *********************************************************/
+
+/*
+ * wrapper.h --
+ *
+ *      Platform independent definitions for the VMware User Agent setuid
+ *      wrapper.
+ */
+
+#ifndef _WRAPPER_H_
+#define _WRAPPER_H_
+
+#include <sys/types.h>
+
+#include <stdio.h>
+
+#include "vm_basic_types.h"
+#include "vmblock.h"
+
+#define TMP_DIR                 "/tmp/VMwareDnD"
+#define TMP_DIR_MODE            (S_ISVTX | S_IRWXU | S_IRWXO | S_IRWXG)
+#define MOUNT_POINT_MODE        (S_IRWXU | S_IRWXO | S_IRWXG)
+#define MODULE_NAME             VMBLOCK_FS_NAME
+
+#define progname                "vmware-user"
+#define Error(fmt, args...)     fprintf(stderr, "%s: " fmt, progname, ##args);
+
+
+/*
+ * XXX Document official VMware Tools releases vs. Open VM Tools and the
+ * use of the locations database in the former vs. compile-time pathing
+ * in the latter.
+ */
+#ifdef USES_LOCATIONS_DB
+#   define LOCATIONS_PATH       "/etc/vmware-tools/locations"
+
+/*
+ * Locations DB query selector.  Values in this enum are used as array
+ * indexes, so any updates to this enum must follow updating
+ * main.c::queryMappings.
+ */
+
+typedef enum {
+   QUERY_LIBDIR = 0,    /* Ask for "BINDIR" */
+   QUERY_BINDIR,        /* Ask for "LIBDIR" */
+   QUERY_MAX            /* Upper limit -- Insert other queries above only. */
+} Selector;
+#else
+#   ifndef VMWARE_USER_PATH
+#      error This program requires either USES_LOCATIONS_DB or VMWARE_USER_PATH.
+#   endif // ifndef VMWARE_USER_PATH
+#endif // ifdef USES_LOCATIONS_DB
+
+
+/*
+ * Global functions
+ */
+
+#if defined(sun) || defined(__FreeBSD__)
+#define TOGGLE_VMBLOCK
+extern int GetModuleId(const char *);
+extern Bool UnloadModule(int);
+
+extern Bool UnloadVMBlock(void);
+extern Bool LoadVMBlock(void);
+extern Bool UnmountVMBlock(const char *);
+extern Bool MountVMBlock(void);
+#endif
+
+extern Bool CompatExec(const char *, char * const [], char * const []);
+extern Bool BuildExecPath(char *, size_t);
+
+/* See above re: USES_LOCATIONS_DB. */
+#ifdef USES_LOCATIONS_DB
+extern Bool QueryLocationsDB(const char *, Selector, char *, size_t);
+#endif // ifdef USES_LOCATIONS_DB
+
+
+#endif // ifndef _WRAPPER_H_
diff --git a/open-vm-tools/vmware-user-suid-wrapper/wrapper_version.h b/open-vm-tools/vmware-user-suid-wrapper/wrapper_version.h
new file mode 100644 (file)
index 0000000..1f6e42c
--- /dev/null
@@ -0,0 +1,39 @@
+/*********************************************************
+ * Copyright (C) 2008 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.
+ *
+ *********************************************************/
+
+/*
+ * wrapper_version.h --
+ *
+ * Version definitions for the vmware-user SUID wrapper.
+ */
+
+#ifndef _WRAPPER_VERSION_H_
+#define _WRAPPER_VERSION_H_
+
+/*
+ * This component's version is coupled with Tools versioning. The effect
+ * is that the version increments with each build, and with each Tools
+ * version bump. If and when it becomes necessary to version the component
+ * manually, make sure that the version is bumped any time the component or
+ * its dependencies are changed.
+ */
+#include "vm_tools_version.h"
+#define WRAPPER_VERSION_COMMAS   TOOLS_VERSION_EXT_CURRENT_CSV
+#define WRAPPER_VERSION_STRING   TOOLS_VERSION_EXT_CURRENT_STR
+
+#endif /* _WRAPPER_VERSION_H_ */
index a0f41f49c62ba1b3a4417405d771446543d9d738..48a1238873fef50d14659ef9152c0c2599fa174b 100644 (file)
@@ -15,7 +15,7 @@
 ### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ################################################################################
 
-noinst_PROGRAMS = vmware-user
+bin_PROGRAMS = vmware-user
 
 AM_CFLAGS =
 AM_CFLAGS += @GTK_CPPFLAGS@
@@ -84,3 +84,10 @@ vmware_user_SOURCES += pointer.c
 vmware_user_SOURCES += resolution.c
 vmware_user_SOURCES += stub.c
 vmware_user_SOURCES += vmware-user.c
+
+install-exec-hook:
+       $(INSTALL) -d $(datadir)/applications/
+       $(INSTALL) -m 644 ../scripts/common/vmware-user.desktop \
+               $(datadir)/applications/
+uninstall-hook:
+       -$(RM) -f $(datadir)/applications/vmware-user.desktop
index 37e74cf23eeae9eca371707d1567baa0a33814e8..e0a431eeb886d3ee8ca254ac069779fe357e7d7f 100644 (file)
@@ -49,7 +49,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = vmware-user$(EXEEXT)
+bin_PROGRAMS = vmware-user$(EXEEXT)
 subdir = vmware-user
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -58,7 +58,9 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
 am_vmware_user_OBJECTS = copyPaste.$(OBJEXT) debugStdio.$(OBJEXT) \
        dnd.$(OBJEXT) foreignVMToolsDaemon.$(OBJEXT) \
        foreignVMToolsNetworking.$(OBJEXT) \
@@ -167,6 +169,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -175,6 +178,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -183,6 +187,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
@@ -308,9 +313,30 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         if test -f $$p \
+            || test -f $$p1 \
+         ; then \
+           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+         else :; fi; \
+       done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(bindir)/$$f"; \
+       done
 
-clean-noinstPROGRAMS:
-       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+clean-binPROGRAMS:
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
@@ -442,6 +468,9 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
+       for dir in "$(DESTDIR)$(bindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -468,8 +497,7 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
-       mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -rf ./$(DEPDIR)
@@ -491,7 +519,9 @@ install-data-am:
 
 install-dvi: install-dvi-am
 
-install-exec-am:
+install-exec-am: install-binPROGRAMS
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
 
 install-html: install-html-am
 
@@ -523,23 +553,33 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-noinstPROGRAMS ctags distclean \
-       distclean-compile distclean-generic distclean-libtool \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags uninstall uninstall-am
-
+uninstall-am: uninstall-binPROGRAMS
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+
+.MAKE: install-am install-exec-am install-strip uninstall-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+       clean-generic clean-libtool ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-binPROGRAMS install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-exec-hook \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-binPROGRAMS uninstall-hook
+
+
+install-exec-hook:
+       $(INSTALL) -d $(datadir)/applications/
+       $(INSTALL) -m 644 ../scripts/common/vmware-user.desktop \
+               $(datadir)/applications/
+uninstall-hook:
+       -$(RM) -f $(datadir)/applications/vmware-user.desktop
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 70501cd3ad98b9f540d157d0288282cdb1cd66cb..b1774810323960b797a1ebe0ac8fb328be40b2ab 100644 (file)
@@ -163,22 +163,20 @@ void DebugToFile(const char *str) // IN
 {
 #ifndef _CONSOLE
    FileIOResult fr;
-   FileIODescriptor *fd;
+   FileIODescriptor fd;
    size_t bytesWritten;
    Unicode timePrefix;
    const char *timePrefixUtf8;
-   
+
    ASSERT(debugFile[0] != 0);
-   
-   fd = (FileIODescriptor *) malloc(sizeof(FileIODescriptor));
-   ASSERT_NOT_IMPLEMENTED(fd);
-   FileIO_Invalidate(fd);
-   
-   fr = FileIO_Open(fd, debugFile, FILEIO_OPEN_ACCESS_WRITE,
+
+   FileIO_Invalidate(&fd);
+
+   fr = FileIO_Open(&fd, debugFile, FILEIO_OPEN_ACCESS_WRITE,
                     FILEIO_OPEN_CREATE);
    if (fr != FILEIO_SUCCESS) {
-      Warning("---Error opening file '%s'.\n", debugFile);
       debugFile[0] = '\0';
+      Warning("---Error opening file '%s'.\n", debugFile);
       goto done;
    }
 
@@ -195,19 +193,18 @@ void DebugToFile(const char *str) // IN
    timePrefixUtf8 = UTF8(timePrefix);
    ASSERT(timePrefixUtf8);
 
-   FileIO_Seek(fd, 0, FILEIO_SEEK_END);
-   fr = FileIO_Write(fd, timePrefixUtf8, strlen(timePrefixUtf8), &bytesWritten);
-   fr = FileIO_Write(fd, str, strlen(str), &bytesWritten);
+   FileIO_Seek(&fd, 0, FILEIO_SEEK_END);
+   fr = FileIO_Write(&fd, timePrefixUtf8, strlen(timePrefixUtf8), &bytesWritten);
+   fr = FileIO_Write(&fd, str, strlen(str), &bytesWritten);
    Unicode_Free(timePrefix);
    if (fr != FILEIO_SUCCESS) {
       Warning("---Error writing to file '%s'.\n", debugFile);
    }
 
  close:
-   FileIO_Close(fd);
-   
+   FileIO_Close(&fd);
+
  done:
-   free(fd);
    return;
 #endif // _CONSOLE
 }
@@ -255,7 +252,7 @@ Debug(char const *fmt, // IN: Format string
    OutputDebugString(str);
 #endif
 #if !defined(_WIN32) || defined(_CONSOLE)
-   fprintf(stderr, str);
+   fputs(str, stderr);
 #endif
 #endif
    if (debugFile[0] != '\0') {
index e1530a5f74900235875cd14b0d950a08c7ff477d..6d3229fe9fb054535aa278c05acb8b91fe81095b 100644 (file)
  */
 
 
+#include <errno.h>
+#include <fcntl.h>
 #include <string.h>
 #include <stdlib.h>
+#include <pwd.h>
 #include <unistd.h>
 #include <gtk/gtkinvisible.h>
 #include <locale.h>
@@ -93,9 +96,15 @@ void VMwareUserRpcInErrorCB    (void *clientdata, char const *status);
 extern Bool ForeignTools_Initialize(GuestApp_Dict *configDictionaryParam);
 extern void ForeignTools_Shutdown(void);
 
+static Bool InitLockFile(void);
+static Bool TryAcquireLockFile(void);
+static void ReleaseLockFile(void);
+
+
 /*
  * Globals
  */
+
 static Bool gOpenUrlRegistered;
 static Bool gResolutionSetRegistered;
 static Bool gDnDRegistered;
@@ -104,6 +113,13 @@ static Bool gHgfsServerRegistered;
 static pid_t gParentPid;
 static char gLogFilePath[PATH_MAX];
 
+/*
+ * The lock file is used to -try- to prevent multiple instances of vmware-user
+ * from executing.  See InitLockFile() for more information.
+ */
+static char gLockFilePath[PATH_MAX] = "";
+static int gLockFileFd = -1;
+
 /*
  * From vmwareuserInt.h
  */
@@ -567,6 +583,7 @@ int VMwareUserXIOErrorHandler(Display *dpy)
    } else {
       Debug("VMwareUserXIOErrorHandler hit from forked() child, not cleaning Rpc\n");
    }
+   ReleaseLockFile();
    exit(1);
    return 1;
 }
@@ -688,6 +705,20 @@ main(int argc, char *argv[])
    /* Set to system locale. */
    setlocale(LC_CTYPE, "");
 
+   /*
+    * There can be only one vmware-user (in theory) per X session.
+    *
+    * Reminder:  Use of the lock file is entirely opportunistic.  If
+    * InitLockFile fails, we'll ignore it and continue on without lock file
+    * protection.
+    */
+   if (InitLockFile()) {
+      if (TryAcquireLockFile() == FALSE) {
+         Warning("Another instance of vmware-user already running.  Exiting.\n");
+         return -1;
+      }
+   }
+
    gParentPid = getpid();
 
    /*
@@ -855,5 +886,192 @@ main(int argc, char *argv[])
    if (gBlockFd >= 0 && !DnD_UninitializeBlocking(gBlockFd)) {
       Debug("vmware-user failed to uninitialize blocking.\n");
    }
+
+   ReleaseLockFile();
+
    return 0;
 }
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * InitLockFile --
+ *
+ *      Initializes gLockFileFd to a file descriptor on one of the following:
+ *        1. $HOME/.vmware-user.<hostname>.<displayname>.lock
+ *        2. /tmp/vmware-user.<uid>.<displayname>.lock
+ *
+ *      The first option is preferred, because I'd rather store a lock file
+ *      where only our user can access it.  (This avoids a race involved with
+ *      relying on known pathnames under /tmp.)  If that path is unavailable
+ *      for any reason, we fall back to a path under /tmp.  
+ *
+ *      In the first case, even if the user's home directory is NFS mounted,
+ *      NFS clients still honor fcntl() locks locally, so we would be good to go.
+ *
+ *      This scheme is to be considered entirely advisory / opportunistic.
+ *      I.e., if we're unable to create and open a lock file, we'll plod on,
+ *      ignoring failures, and possibly launch multiple instances of vmware-user.
+ *
+ *      NB:  The lock files are not removed upon exit.
+ *
+ * Results:
+ *      TRUE if the path was generated & lock file opened, FALSE otherwise.
+ *
+ * Side effects:
+ *      On success:
+ *         Lock file path is written to gLockFilePath.
+ *         Lock file is opened and descriptor assigned to gLockFileFd.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static Bool
+InitLockFile(void)
+{
+   struct passwd *pw = NULL;
+   /* XXX We really need a constant for maximum hostname lengths. */
+   char hostname[256] = "";
+   char *display = NULL;
+
+   if ((pw = getpwuid(getuid())) == NULL) {
+      Warning("%s: getpwuid: %s\n", __func__, strerror(errno));
+      return FALSE;
+   }
+
+   if (gethostname(hostname, sizeof hostname) == -1) {
+      Warning("%s: gethostname: %s\n", __func__,  strerror(errno));
+      return FALSE;
+   }
+
+   /*
+    * XXX Would it be any better to rely on something returned from gtk/gdk
+    * instead?
+    */
+   if ((display = getenv("DISPLAY")) == NULL) {
+      Warning("Environment variable DISPLAY missing.");
+      return FALSE;
+   }
+
+   /*
+    * Sure, the user could put some nasty things in DISPLAY, but what good
+    * would it do?  We're running with his/her permissions, anyway.
+    *
+    * Additionally, this may fail if someone's machine has a really long
+    * hostname.  Workarounds may include truncating the hostname, using an
+    * MD5 or SHA hash, etc.
+    */
+   Str_Snprintf(gLockFilePath, sizeof gLockFilePath, "%s/.vmware-user.%s.%s.lock",
+                pw->pw_dir, hostname, display);
+
+   if ((gLockFileFd = open(gLockFilePath, O_CREAT | O_RDWR, 00600)) == -1) {
+      Debug("%s: %s: %s\n", __func__, gLockFilePath, strerror(errno));
+
+      /*
+       * If the first attempt to create a lock in the user's home directory
+       * failed, we generate a new lock file path under /tmp and make a
+       * second (and final) attempt.
+       */
+      Str_Snprintf(gLockFilePath, sizeof gLockFilePath,
+                   "/tmp/vmware-user.%"FMTUID".%s.lock", pw->pw_uid, display);
+
+      if ((gLockFileFd = open(gLockFilePath, O_CREAT | O_RDWR, 00600)) == -1) {
+         Debug("%s: %s: %s\n", __func__, gLockFilePath, strerror(errno));
+      }
+   }
+
+   /*
+    * To reiterate, true if we opened the file, false otherwise.
+    */
+   return (gLockFileFd != -1) ? TRUE : FALSE;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * TryAcquireLockFile --
+ *
+ *      Uses non-blocking fcntl() to try to lock gLockFileFd.
+ *
+ *      Only call this if InitLockFile succeeded.  See InitLockFile re:
+ *      advisory locking.
+ *
+ * Results:
+ *      TRUE if lock acquired, FALSE otherwise.
+ *
+ * Side effects:
+ *      On success, exclusive lock of gLockFileFd acquired.  On failure,
+ *      gLockFileFd is closed and reset to -1.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static Bool
+TryAcquireLockFile(void)
+{
+   struct flock lock;
+
+   ASSERT(gLockFileFd != -1);
+
+   lock.l_type = F_WRLCK;
+   lock.l_whence = SEEK_SET;
+   lock.l_start = 0;
+   lock.l_len = 0;
+
+   if (fcntl(gLockFileFd, F_SETLK, &lock) == -1) {
+      Debug("%s: fcntl: %s\n", __func__, strerror(errno));
+      close(gLockFileFd);
+      gLockFileFd = -1;
+      return FALSE;
+   }
+
+   return TRUE;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * ReleaseLockFile --
+ *
+ *      Releases advisory lock on gLockFileFd, and closes it.  Note that the
+ *      lock file will persist, because otherwise we have a race between 3
+ *      processes:  us (P1), P2, and P3.
+ *
+ *      P2      open
+ *      P1      unlink
+ *              [unlock]
+ *      P3      open(O_CREAT) -- succeeds & is separate lock file
+ *
+ * Results:
+ *      None.
+ *
+ * Side effects:
+ *      Exclusive lock of gLockFileFd released.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static void
+ReleaseLockFile(void)
+{
+   struct flock lock;
+
+   if (gLockFileFd == -1) {
+      return;
+   }
+
+   lock.l_type = F_UNLCK;
+   lock.l_whence = SEEK_SET;
+   lock.l_start = 0;
+   lock.l_len = 0;
+
+   if (fcntl(gLockFileFd, F_SETLK, &lock) == -1) {
+      Debug("%s: fcntl: %s\n", __func__, strerror(errno));
+   }
+
+   close(gLockFileFd);
+   gLockFileFd = -1;
+}
index 005d06f4c286e41475da674c2336eaae0618779c..ffc78d18eba2b469c880589bc1a6c3cb6e6703b8 100644 (file)
 ### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ################################################################################
 
-noinst_PROGRAMS = xferlogs
+bin_PROGRAMS = vmware-xferlogs
 
-xferlogs_LDADD =
-xferlogs_LDADD += ../lib/rpcVmx/libRpcVmx.a
-xferlogs_LDADD += ../lib/string/libString.a
+vmware_xferlogs_LDADD =
+vmware_xferlogs_LDADD += ../lib/rpcVmx/libRpcVmx.a
+vmware_xferlogs_LDADD += ../lib/string/libString.a
 # In the absence of the linker options --start-group and --end-group (which can't
 # be put in LDADD), we need to bring the following libraries out of the alphebetical
 # order so their symbols are properly resolved.
-xferlogs_LDADD += ../lib/rpcOut/libRpcOut.a
-xferlogs_LDADD += ../lib/message/libMessage.a
-xferlogs_LDADD += ../lib/backdoor/libBackdoor.a
-xferlogs_LDADD += ../lib/misc/libMisc.a
-xferlogs_LDADD += @ICU_LIBS@
+vmware_xferlogs_LDADD += ../lib/rpcOut/libRpcOut.a
+vmware_xferlogs_LDADD += ../lib/message/libMessage.a
+vmware_xferlogs_LDADD += ../lib/backdoor/libBackdoor.a
+vmware_xferlogs_LDADD += ../lib/misc/libMisc.a
+vmware_xferlogs_LDADD += @ICU_LIBS@
 
-xferlogs_SOURCES =
-xferlogs_SOURCES += xferlogs.c
+vmware_xferlogs_SOURCES =
+vmware_xferlogs_SOURCES += xferlogs.c
index 357fc7a718f3c6131e79b24fa5f20c5cbbdde11f..88a0b899cfa9f659049f1631458aaff839093900 100644 (file)
@@ -49,7 +49,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = xferlogs$(EXEEXT)
+bin_PROGRAMS = vmware-xferlogs$(EXEEXT)
 subdir = xferlogs
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -58,10 +58,12 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-am_xferlogs_OBJECTS = xferlogs.$(OBJEXT)
-xferlogs_OBJECTS = $(am_xferlogs_OBJECTS)
-xferlogs_DEPENDENCIES = ../lib/rpcVmx/libRpcVmx.a \
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_vmware_xferlogs_OBJECTS = xferlogs.$(OBJEXT)
+vmware_xferlogs_OBJECTS = $(am_vmware_xferlogs_OBJECTS)
+vmware_xferlogs_DEPENDENCIES = ../lib/rpcVmx/libRpcVmx.a \
        ../lib/string/libString.a ../lib/rpcOut/libRpcOut.a \
        ../lib/message/libMessage.a ../lib/backdoor/libBackdoor.a \
        ../lib/misc/libMisc.a
@@ -77,8 +79,8 @@ CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-SOURCES = $(xferlogs_SOURCES)
-DIST_SOURCES = $(xferlogs_SOURCES)
+SOURCES = $(vmware_xferlogs_SOURCES)
+DIST_SOURCES = $(vmware_xferlogs_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -143,6 +145,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
 MODULES_OS = @MODULES_OS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -151,6 +154,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
@@ -159,6 +163,7 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
 VERSION = @VERSION@
 VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
 VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
@@ -221,10 +226,11 @@ top_srcdir = @top_srcdir@
 # In the absence of the linker options --start-group and --end-group (which can't
 # be put in LDADD), we need to bring the following libraries out of the alphebetical
 # order so their symbols are properly resolved.
-xferlogs_LDADD = ../lib/rpcVmx/libRpcVmx.a ../lib/string/libString.a \
-       ../lib/rpcOut/libRpcOut.a ../lib/message/libMessage.a \
-       ../lib/backdoor/libBackdoor.a ../lib/misc/libMisc.a @ICU_LIBS@
-xferlogs_SOURCES = xferlogs.c
+vmware_xferlogs_LDADD = ../lib/rpcVmx/libRpcVmx.a \
+       ../lib/string/libString.a ../lib/rpcOut/libRpcOut.a \
+       ../lib/message/libMessage.a ../lib/backdoor/libBackdoor.a \
+       ../lib/misc/libMisc.a @ICU_LIBS@
+vmware_xferlogs_SOURCES = xferlogs.c
 all: all-am
 
 .SUFFIXES:
@@ -258,16 +264,37 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         if test -f $$p \
+            || test -f $$p1 \
+         ; then \
+           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+         else :; fi; \
+       done
 
-clean-noinstPROGRAMS:
-       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(bindir)/$$f"; \
+       done
+
+clean-binPROGRAMS:
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
-xferlogs$(EXEEXT): $(xferlogs_OBJECTS) $(xferlogs_DEPENDENCIES) 
-       @rm -f xferlogs$(EXEEXT)
-       $(LINK) $(xferlogs_OBJECTS) $(xferlogs_LDADD) $(LIBS)
+vmware-xferlogs$(EXEEXT): $(vmware_xferlogs_OBJECTS) $(vmware_xferlogs_DEPENDENCIES) 
+       @rm -f vmware-xferlogs$(EXEEXT)
+       $(LINK) $(vmware_xferlogs_OBJECTS) $(vmware_xferlogs_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -382,6 +409,9 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
+       for dir in "$(DESTDIR)$(bindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -408,8 +438,7 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
-       mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -rf ./$(DEPDIR)
@@ -431,7 +460,7 @@ install-data-am:
 
 install-dvi: install-dvi-am
 
-install-exec-am:
+install-exec-am: install-binPROGRAMS
 
 install-html: install-html-am
 
@@ -463,22 +492,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-binPROGRAMS
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-noinstPROGRAMS ctags distclean \
-       distclean-compile distclean-generic distclean-libtool \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-dvi \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+       clean-generic clean-libtool ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-binPROGRAMS install-data install-data-am install-dvi \
        install-dvi-am install-exec install-exec-am install-html \
        install-html-am install-info install-info-am install-man \
        install-pdf install-pdf-am install-ps install-ps-am \
        install-strip installcheck installcheck-am installdirs \
        maintainer-clean maintainer-clean-generic mostlyclean \
        mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags uninstall uninstall-am
+       pdf pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-binPROGRAMS
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index e00c0f8377fb2b7011f7bc142d7ee19c931e61be..36748a87518aa88770fe34fb3039e5306324c553 100644 (file)
@@ -286,7 +286,7 @@ Panic(const char *fmt, ...)
    Str_Vsnprintf(buf, sizeof buf, fmt, args);
    va_end(args);
 
-   fprintf(stderr, buf);
+   fputs(buf, stderr);
    abort();
 }