From: Kruti Date: Tue, 21 May 2024 05:58:12 +0000 (-0700) Subject: Remove unused header files from the open-vm-tools source bundle. X-Git-Tag: stable-12.5.0~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33aa649c612d2a41f850ace726047fb5d6f70475;p=thirdparty%2Fopen-vm-tools.git Remove unused header files from the open-vm-tools source bundle. --- diff --git a/open-vm-tools/lib/include/miscSolaris.h b/open-vm-tools/lib/include/miscSolaris.h deleted file mode 100644 index c2676ada6..000000000 --- a/open-vm-tools/lib/include/miscSolaris.h +++ /dev/null @@ -1,47 +0,0 @@ -/********************************************************* - * Copyright (C) 2005-2017 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. - * - *********************************************************/ - -/* - *---------------------------------------------------------------------- - * - * miscSolaris -- - * - * Implementation of new Linux functions for Solaris. - * - *---------------------------------------------------------------------- - */ - -#ifndef _MISCSOLARIS_H_ -#define _MISCSOLARIS_H_ - -#define INCLUDE_ALLOW_USERLEVEL - -#if defined(__cplusplus) -extern "C" { -#endif - -int -daemon(int nochdir, int noclose); - -#if defined(__cplusplus) -} // extern "C" -#endif - -#endif /* _MISCSOLARIS_H_ */ - - diff --git a/open-vm-tools/lib/include/syncEvent.h b/open-vm-tools/lib/include/syncEvent.h deleted file mode 100644 index 8e4f13e0d..000000000 --- a/open-vm-tools/lib/include/syncEvent.h +++ /dev/null @@ -1,89 +0,0 @@ -/********************************************************* - * Copyright (C) 2004-2017 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. - * - *********************************************************/ - -/* - * syncEvent.h -- - * - * Implements a platform independent condition event that - * you can either wait on or pass to Poll() or your event loop. - * - * WARNING! - * This is an auto-reset event. So, you cannot use it for devices - * in Poll that may be holding a device lock. It works fine for Poll if - * you don't specify a lock when you register the handle with Poll(). - */ - -#ifndef _SYNC_EVENT_H_ -#define _SYNC_EVENT_H_ - -//#include "syncWaitQ.h" -#include "vm_atomic.h" - -#if defined(__cplusplus) -extern "C" { -#endif - - -#ifndef _WIN32 -typedef enum -{ - READ_FD_INDEX = 0, - WRITE_FD_INDEX = 1, - NUM_SYNC_EVENT_FDS = 2 -} SyncEventFDTypes; -#endif // _WIN32 - - -/* - * SyncEvent -- - */ -typedef struct SyncEvent { - /* - * Whether the waitqueue has been initialized; - */ - Bool initialized; - -#ifdef _WIN32 - HANDLE event; -#else - Atomic_uint32 signalled; - int fdList[NUM_SYNC_EVENT_FDS]; -#endif // #ifdef _WIN32 -} SyncEvent; - - -/* - * Be careful, on win64, handles are 64 bits, but Poll takes an int32. - */ -typedef int32 SyncEventSelectableHandle; - - -Bool SyncEvent_Init(SyncEvent *that); -void SyncEvent_Destroy(SyncEvent *that); - -void SyncEvent_Signal(SyncEvent *that); -Bool SyncEvent_TryWait(SyncEvent *that); -void SyncEvent_Wait(SyncEvent *that); - -SyncEventSelectableHandle SyncEvent_GetHandle(SyncEvent *that); - -#if defined(__cplusplus) -} // extern "C" -#endif - -#endif // #ifndef _SYNC_EVENT_H_ diff --git a/open-vm-tools/lib/include/vm_basic_math.h b/open-vm-tools/lib/include/vm_basic_math.h deleted file mode 100644 index 065ba368f..000000000 --- a/open-vm-tools/lib/include/vm_basic_math.h +++ /dev/null @@ -1,197 +0,0 @@ -/********************************************************* - * Copyright (C) 2008-2017 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. - * - *********************************************************/ - -/* - * vm_basic_math.h -- - * - * Standard mathematical macros for VMware source code. - */ - -#ifndef _VM_BASIC_MATH_H_ -#define _VM_BASIC_MATH_H_ - -#define INCLUDE_ALLOW_USERLEVEL - -#define INCLUDE_ALLOW_MODULE -#define INCLUDE_ALLOW_VMMON -#define INCLUDE_ALLOW_VMKERNEL -#define INCLUDE_ALLOW_VMKDRIVERS -#define INCLUDE_ALLOW_VMK_MODULE -#define INCLUDE_ALLOW_DISTRIBUTE -#define INCLUDE_ALLOW_VMCORE -#include "includeCheck.h" -#include "vm_basic_types.h" // For INLINE. -#include "vm_basic_asm.h" // For Div64... - -#if defined __cplusplus -extern "C" { -#endif - - -static INLINE uint32 -RatioOf(uint32 numer1, uint32 numer2, uint32 denom) -{ - uint64 numer = (uint64)numer1 * numer2; - /* Calculate "(numer1 * numer2) / denom" avoiding round-off errors. */ -#if defined(VMM) || !(defined(__i386__) || defined(__x86_64__)) - return numer / denom; -#else - uint32 ratio; - uint32 unused; - Div643232(numer, denom, &ratio, &unused); - return ratio; -#endif -} - -static INLINE uint32 -ExponentialAvg(uint32 avg, uint32 value, uint32 gainNumer, uint32 gainDenom) -{ - uint32 term1 = gainNumer * avg; - uint32 term2 = (gainDenom - gainNumer) * value; - return (term1 + term2) / gainDenom; -} - - -/* - *----------------------------------------------------------------------------- - * - * IsZeroOrPowerOfTwo -- - * IsZeroOrPowerOfTwo64 -- - * - * Results: - * TRUE iff the value is 0 or a power of two. - * - * Side effects: - * None. - * - *----------------------------------------------------------------------------- - */ - -static INLINE Bool -IsZeroOrPowerOfTwo64(uint64 x) -{ - return !(x & (x - 1)); -} - - -static INLINE Bool -IsZeroOrPowerOfTwo(uint32 x) // IN -{ - return !(x & (x - 1)); -} - - -static INLINE uint32 -GetPowerOfTwo(uint32 x) -{ - /* Returns next-greatest power-of-two. */ - uint32 power2 = 1; - while (x > power2) { - power2 = power2 << 1; - } - return power2; -} - - -#if !defined(_WIN32) && !defined(_WIN64) -/* - *----------------------------------------------------------------------------- - * - * RotateLeft32 -- - * - * Results: - * Value rotated to the left by 'shift' bits. - * - * Side effects: - * None. - * - *----------------------------------------------------------------------------- - */ -static INLINE uint32 -RotateLeft32(uint32 value, uint8 shift) -{ - return ((value << shift) | (value >> (32 - shift))); -} - - -/* - *----------------------------------------------------------------------------- - * - * RotateRight32 -- - * - * Results: - * Value rotated to the right by 'shift' bits. - * - * Side effects: - * None. - * - *----------------------------------------------------------------------------- - */ -static INLINE uint32 -RotateRight32(uint32 value, uint8 shift) -{ - return ((value >> shift) | (value << (32 - shift))); -} - - -/* - *----------------------------------------------------------------------------- - * - * RotateLeft64 -- - * - * Results: - * Value rotated to the left by 'shift' bits. - * - * Side effects: - * None. - * - *----------------------------------------------------------------------------- - */ -static INLINE uint64 -RotateLeft64(uint64 value, uint8 shift) -{ - return ((value << shift) | (value >> (64 - shift))); -} - - -/* - *----------------------------------------------------------------------------- - * - * RotateRight64 -- - * - * Results: - * Value rotated to the right by 'shift' bits. - * - * Side effects: - * None. - * - *----------------------------------------------------------------------------- - */ -static INLINE uint64 -RotateRight64(uint64 value, uint8 shift) -{ - return ((value >> shift) | (value << (64 - shift))); -} -#endif // if !defined(_WIN32) && !defined(_WIN64) - - -#if defined __cplusplus -} // extern "C" -#endif - -#endif // ifndef _VM_BASIC_MATH_H_ diff --git a/open-vm-tools/lib/include/vm_legal.h b/open-vm-tools/lib/include/vm_legal.h deleted file mode 100644 index fc5830e74..000000000 --- a/open-vm-tools/lib/include/vm_legal.h +++ /dev/null @@ -1,94 +0,0 @@ -/********************************************************* - * Copyright (c) 2006-2024 Broadcom. All rights reserved. - * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. - * - * 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. - * - *********************************************************/ - -/* - * All the legalese that we display in About boxes and similar places. - */ - - -#ifndef VM_LEGAL_H -#define VM_LEGAL_H - -#include "vm_product.h" - -#ifndef WSTR -#define WSTR_(x) L ## x -#define WSTR(x) WSTR_(x) -#endif - - -/* - * NOTE: The following strings may be incorporated into MSGID strings. - * Updating them therefore may require updating translations and vmsg - * auditing files in bora/messages/ to avoid breaking the build. - */ -#define COPYRIGHT_YEARS "1998-2024" /* See the note above when changing. */ -#define COPYRIGHT_STRING "Copyright (C) " COPYRIGHT_YEARS " " COMPANY_NAME -#define RIGHT_RESERVED "All rights reserved." - -/* - * Use UTF8_COPYRIGHT_STRING_BASE when the COMPANY_NAME must be separated out - * to create a hyperlink. - */ -#define UTF8_COPYRIGHT_STRING_BASE "Copyright \302\251 " COPYRIGHT_YEARS -#define UTF8_COPYRIGHT_STRING UTF8_COPYRIGHT_STRING_BASE " " COMPANY_NAME - -/* - * A UTF-16 version of the copyright string. wchar_t is an - * implementation-defined type, but we can expect it to be UTF-16 on - * Windows. (Only Windows cares about UTF-16 anyway.) - */ -#ifdef _WIN32 -#if defined(VMX86_TOOLS) || defined(VMX86_VGAUTH) || defined(VMX86_SYSIMAGE) -/* - * XXX - Temporary fix for Windows user-mode binaries properties copyright. - */ -#define COMPANY_COPYRIGHT_NAME "Broadcom Inc. and/or its subsidiaries." - -#define UTF16_COPYRIGHT_STRING L"Copyright \x00A9 " WSTR(COPYRIGHT_YEARS) L" " \ - WSTR(COMPANY_COPYRIGHT_NAME) L" All Rights Reserved." -#else -#define UTF16_COPYRIGHT_STRING L"Copyright \x00A9 " WSTR(COPYRIGHT_YEARS) L" " WSTR(COMPANY_NAME) -#endif -#endif - - -/* - * Use PATENTS_STRING for showing the patents string in plaintext form. - * PATENTS_FMT_STRING can be used with PATENTS_URL for creating hyperlinks. - * - * The spaces that precede embedded newlines in the strings below are - * intentional. (See bug 1089068.) - */ -#define PATENTS_STRING_BASE \ - "This product is protected by U.S. and international copyright and \n" \ - "intellectual property laws. VMware products are covered by one or \n" \ - "more patents listed at " -#define PATENTS_STRING PATENTS_STRING_BASE "<" PATENTS_URL ">." -#define PATENTS_FMT_STRING PATENTS_STRING_BASE "%s." -#define PATENTS_URL "http://www.vmware.com/go/patents" - -#define TRADEMARK_STRING \ - "VMware is a registered trademark or trademark of VMware, Inc. in the \n" \ - "United States and/or other jurisdictions." -#define GENERIC_TRADEMARK_STRING \ - "All other marks and names mentioned herein may be trademarks of their \n" \ - "respective companies." - -#endif /* VM_LEGAL_H */ diff --git a/open-vm-tools/libDeployPkg/libDeployPkg_version.h b/open-vm-tools/libDeployPkg/libDeployPkg_version.h deleted file mode 100644 index f2ad8ef3d..000000000 --- a/open-vm-tools/libDeployPkg/libDeployPkg_version.h +++ /dev/null @@ -1,37 +0,0 @@ -/********************************************************* - * Copyright (C) 2014-2017 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. - * - *********************************************************/ - -/* - * libDeployPkg_version.h -- - * - * Version definitions for libDeployPkg. - */ - -#ifndef _LIBDEPLOYPKG_VERSION_H_ -#define _LIBDEPLOYPKG_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. - */ -#include "vm_tools_version.h" -#define LIBDEPLOYPKG_VERSION_COMMAS TOOLS_VERSION_EXT_CURRENT_CSV -#define LIBDEPLOYPKG_VERSION_STRING TOOLS_VERSION_EXT_CURRENT_STR - -#endif /* _LIBDEPLOYPKG_VERSION_H_ */ diff --git a/open-vm-tools/libguestlib/vmguestlib_version.h b/open-vm-tools/libguestlib/vmguestlib_version.h deleted file mode 100644 index 9349bff7a..000000000 --- a/open-vm-tools/libguestlib/vmguestlib_version.h +++ /dev/null @@ -1,39 +0,0 @@ -/********************************************************* - * Copyright (C) 2007-2016 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. - * - *********************************************************/ - -/* - * vmguestlib_version.h -- - * - * Version definitions for GuestLib. - */ - -#ifndef _VMGUESTLIB_VERSION_H_ -#define _VMGUESTLIB_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 VMGUESTLIB_VERSION_COMMAS TOOLS_VERSION_EXT_CURRENT_CSV -#define VMGUESTLIB_VERSION_STRING TOOLS_VERSION_EXT_CURRENT_STR - -#endif /* _VMGUESTLIB_VERSION_H_ */ diff --git a/open-vm-tools/vgauth/common/createToken.h b/open-vm-tools/vgauth/common/createToken.h deleted file mode 100644 index a62b32bad..000000000 --- a/open-vm-tools/vgauth/common/createToken.h +++ /dev/null @@ -1,36 +0,0 @@ -/********************************************************* - * Copyright (C) 2011-2016 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. - * - *********************************************************/ - -/** - * @file winToken.h -- - * - * NtCReateToken() support. - * - */ - - -#ifndef _VGAUTH_CREATE_TOKEN_H_ -#define _VGAUTH_CREATE_TOKEN_H_ - -#include - -// obsolete NtCreateToken() wrappers -HANDLE WinToken_Create(const gchar *user); -HANDLE WinTokenCreateImpl(const gchar *user); - -#endif // _VGAUTH_CREATE_TOKEN_H_ diff --git a/open-vm-tools/vgauth/common/s4u2self.h b/open-vm-tools/vgauth/common/s4u2self.h deleted file mode 100644 index ba2c8a987..000000000 --- a/open-vm-tools/vgauth/common/s4u2self.h +++ /dev/null @@ -1,33 +0,0 @@ -/********************************************************* - * Copyright (C) 2012-2016 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. - * - *********************************************************/ - -/** - * @file s4u2self.h -- - * - * Code to use the Windows Service-for-User-to-Self extension. - */ - - -#ifndef _VGAUTH_S4U2SELF_H_ -#define _VGAUTH_S4U2SELF_H_ - -#include - -DWORD Win_CreateS4UTokenForUser(const char *userName, HANDLE *userTokenRet); - -#endif // _VGAUTH_S4U2SELF_H_ diff --git a/open-vm-tools/vgauth/common/serviceUser.h b/open-vm-tools/vgauth/common/serviceUser.h deleted file mode 100644 index ae2f2f1f5..000000000 --- a/open-vm-tools/vgauth/common/serviceUser.h +++ /dev/null @@ -1,37 +0,0 @@ -/********************************************************* - * Copyright (C) 2012-2016 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. - * - *********************************************************/ - -/** - * @file serviceUser.h -- - * - * Functions to manipulate a local account with privileges - * to call NtCreateToken() - */ - - -#ifndef _VGAUTH_SERVICEUSER_H_ -#define _VGAUTH_SERVICEUSER_H_ - -#include - -extern BOOL WinServiceUser_CreateTokenAccount(void); -extern BOOL WinServiceUser_DeleteTokenAccount(void); -extern BOOL WinServiceUser_CreateTokenForUser(const char *userName, - HANDLE *userTokenRet); - -#endif // _VGAUTH_SERVICEUSER_H_ diff --git a/open-vm-tools/vgauth/public/VGAuthIdProvider.h b/open-vm-tools/vgauth/public/VGAuthIdProvider.h deleted file mode 100644 index 8f25de2df..000000000 --- a/open-vm-tools/vgauth/public/VGAuthIdProvider.h +++ /dev/null @@ -1,185 +0,0 @@ -/********************************************************* - * Copyright (C) 2011-2016 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. - * - *********************************************************/ - -/** - * @file VGAuthIdProvider.h - * - * Client library identity provider management API definitions. - * - * @addtogroup vgauth_id VGAuth Identity Management - * @{ - * - */ -#ifndef _VGAUTHIDPROVIDER_H_ -#define _VGAUTHIDPROVIDER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "VGAuthCommon.h" - -/** - * The types of subjects. Any is a special case. - */ -typedef enum { - /** The Subject field in a SAML token must match in the token verification process. */ - VGAUTH_SUBJECT_NAMED, - - /** Any Subject field in a SAML token can be matched in the token verification process. */ - VGAUTH_SUBJECT_ANY, -} VGAuthSubjectType; - - -/** - * VGAuthSubject is either ANY or NAMED, in which case it contains - * the Subject name. - * - * When authenticating a SAML token, the Subject is used to determine - * what guest user the SAML token can be authenticated as. If no - * entry in the IdProvider store is found using that Subject, then - * if the special ANY subject exists in the identity store, that entry - * will be used. - */ -typedef struct VGAuthSubject { - VGAuthSubjectType type; /**< The subject type. */ - union { - char *name; /**< The subject name, if type VGAUTH_SUBJECT_NAMED */ - } val; -} VGAuthSubject; - - -/** - * VGAuthSubjectInfo combines a subject and a comment. Each subject can - * have its own comment describing its use. - */ -typedef struct VGAuthSubjectInfo { - VGAuthSubject subject; /**< The subject. */ - char *comment; /**< User-supplied data to describe the subject. */ -} VGAuthSubjectInfo; - - -/** - * Describes all subjects that are associated with a certficate. - */ -typedef struct VGAuthIdProvider { - char *pemCert; /**< The provider's certficate in PEM format. */ - int numInfos; - VGAuthSubjectInfo *infos; /**< The SubjectInfos associated with the - certificate. */ -} VGAuthIdProvider; - - -/** - * Describes an entry in the IdProvider mapping file. - */ -typedef struct VGAuthMappedIdentity { - char *pemCert; /**< The provider's certificate in PEM format. */ - int numSubjects; /**< The number of Subjects associated with - the mapping file entry. */ - VGAuthSubject *subjects; /**< The Subjects associated with - the mapping file entry. */ - - char *userName; /**< The username associated with the mapping file entry. */ -} VGAuthMappedIdentity; - - -/* - * Adds the given VGAuthSubjectInfo associated with the pemCert - * to the identity store of @a userName. - * - * If addMapping is TRUE, also create an entry in the mapping file from - * the cert and subject to @a userName. - */ -VGAuthError VGAuth_AddSubject(VGAuthContext *ctx, - const char *userName, - VGAuthBool addMapping, - const char *pemCert, - VGAuthSubjectInfo *si, - int numExtraParams, - const VGAuthExtraParams *extraParams); - -/* - * Removes the VGAuthSubjectInfo from the @a userName identity provider for @a - * subject, also removing any associated mapping entry. - */ -VGAuthError VGAuth_RemoveSubject(VGAuthContext *ctx, - const char *userName, - const char *pemCert, - VGAuthSubject *subject, - int numExtraParams, - const VGAuthExtraParams *extraParams); -/* - * Removes all VGAuthIdentities with the matching PEM certificate from - * the @a userName identity store for all subjects, also removing any associated - * mapping entry. - */ -VGAuthError VGAuth_RemoveCert(VGAuthContext *ctx, - const char *userName, - const char *pemCert, - int numExtraParams, - const VGAuthExtraParams *extraParams); - -/* - * Lists all the VGAuthIdProvider from the identity store belonging - * to @a userName. - */ -VGAuthError VGAuth_QueryIdProviders(VGAuthContext *ctx, - const char *userName, - int numExtraParams, - const VGAuthExtraParams *extraParams, - int *num, // OUT - VGAuthIdProvider **idList); // OUT - -/* - * Lists all the certificates/subject pairs in the mapping file and their - * associated user. - */ -VGAuthError VGAuth_QueryMappedIdentities(VGAuthContext *ctx, - int numExtraParams, - const VGAuthExtraParams *extraParams, - int *num, // OUT - VGAuthMappedIdentity **miList); // OUT - -/* - * Data structure cleanup functions. - */ - -/* - * Frees an array of VGAuthIdProvider. - */ -void VGAuth_FreeIdProviderList(int num, VGAuthIdProvider *idList); - -/* - * Frees a VGAuthVGAuthSubjectInfo and contents. - */ -void VGAuth_FreeSubjectInfo(VGAuthSubjectInfo *si); - -/* - * Frees an array of VGAuthMappedIdentity. - */ -void VGAuth_FreeMappedIdentityList(int num, VGAuthMappedIdentity *miList); - -/** @} */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif // _VGAUTHIDPROVIDER_H_ - diff --git a/open-vm-tools/vgauth/service/vgauthService_version.h b/open-vm-tools/vgauth/service/vgauthService_version.h deleted file mode 100644 index 9ce67e733..000000000 --- a/open-vm-tools/vgauth/service/vgauthService_version.h +++ /dev/null @@ -1,39 +0,0 @@ -/********************************************************* - * Copyright (C) 2013-2016 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. - * - *********************************************************/ - -/* - * vgauthService_version.h -- - * - * Version definitions for the vgauthService program - */ - -#ifndef _VGAUTHSERVICE_VERSION_H_ -#define _VGAUTHSERVICE_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 VGAUTHSERVICE_VERSION_COMMAS TOOLS_VERSION_EXT_CURRENT_CSV -#define VGAUTHSERVICE_VERSION_STRING TOOLS_VERSION_EXT_CURRENT_STR - -#endif /* _VGAUTHSERVICE_VERSION_H_ */