From: John Wolfe Date: Thu, 8 Sep 2022 21:51:40 +0000 (-0700) Subject: Change to common source file not applicable to open-vm-tools. X-Git-Tag: stable-12.2.0~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29b92ada5842c2b9d1cde7dbc9dafb69d6a18b96;p=thirdparty%2Fopen-vm-tools.git Change to common source file not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/misc/idLinux.c b/open-vm-tools/lib/misc/idLinux.c index 1bb86f483..ab35df06d 100644 --- a/open-vm-tools/lib/misc/idLinux.c +++ b/open-vm-tools/lib/misc/idLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2019 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2022 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 @@ -844,7 +844,7 @@ Id_AuthSet(void const *buf, // IN * Results: * TRUE if the right was granted, FALSE if the user cancelled, * entered the wrong password three times in a row, or if an - * error was encountered, or if the Authorization session is + * error was encountered, or if the Authorization session is * invalid or has not been granted the 'right'. * * Side effects: @@ -1045,10 +1045,23 @@ IdIsSetUGid(void) #else static const char envName[] = "VMW_SETUGID_TEST"; + /* + * Solves issue where includes are taken from glibc-2.11 while libraries are being + * linked against glibc-2.31 for a rde-rft-rel app + */ + extern __attribute__((weak)) char *__secure_getenv(const char *); + extern __attribute__((weak)) char *secure_getenv(const char *); + if (setenv(envName, "1", TRUE) == -1) { return TRUE; /* Conservative */ } - return __secure_getenv(envName) == NULL; + if (__secure_getenv != NULL) { + return __secure_getenv(envName) == NULL; + } + if (secure_getenv != NULL) { + return secure_getenv(envName) == NULL; + } + return TRUE; #endif #endif }