]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Annotate the os-release guest identification function HostinfoOsRelease()
authorKruti <kpendharkar@vmware.com>
Tue, 27 Aug 2024 09:11:00 +0000 (02:11 -0700)
committerKruti <kpendharkar@vmware.com>
Tue, 27 Aug 2024 09:11:00 +0000 (02:11 -0700)
The HostinfoOsRelease() function examines the os-release standard file(s) to
collect distro identification data of interest. This is open-source and users
can legally modify the code changing the standard file priority order or
accessing other files. Any such change breaks compliance with the os-release
standard and may cause confusion in the field.
The function header has been updated to remind users of this issue.

open-vm-tools/lib/misc/hostinfoPosix.c

index 8002c6f2588dc5276d32b8e14b6c6e90a4e4b2d7..54219577653f6aa239c038c70f4ef971d8ec6221 100644 (file)
@@ -1821,6 +1821,11 @@ HostinfoGetCmdOutput(const char *cmd)  // IN:
  *
  *      https://www.linux.org/docs/man5/os-release.html
  *
+ *      IF THIS ROUTINE IS MODIFIED IN ANY WAY - DIRECTLY OR INDIRECTLY - TO
+ *      USE FILES OTHER THAN THOSE OFFICIALLY SANCTIONED BY THE os-release
+ *      STANDARD, THE CODE IS NO LONGER IN COMPLIANCE WITH THE os-release
+ *      STANDARD AND VMware IS NOT RESPONSIBLE FOR THE BEHAVIOR THAT RESULTS.
+ *
  * Return value:
  *      -1     Failure. No data returned.
  *      0..n   Success. A "score", the number of interesting pieces of data