libvirt/tools/nss
Michal Privoznik 753064963c libvirt_nss: Fix ERROR() macro
The purpose of ERROR() macro in our NSS module is to print error
message provided as arguments followed by error string
corresponding to errno. Historically, we've used strerror_r() for
that (please note, we want our NSS module to be free of libvirt
internal functions, or glib even - hence, g_strerror() is off the
table).

Now strerror_r() is documented as:

  Returns ... a pointer to a string that the function stores in
  buf, or a pointer to some (immutable) static string (in which
  case buf is unused).

Therefore, we can't rely the string being stored in the buf and
really need to store the retval and print that instead.

While touching this area, decrease the ebuf size, since its
current size (1KiB) is triggering our stack limit (2KiB) in some
cases.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-04-18 14:57:30 +02:00
..
libvirt_guest_nss.syms nss: Introduce libvirt-guest module 2016-12-06 13:34:00 +01:00
libvirt_nss_bsd.syms nss: FreeBSD support 2016-03-30 10:21:44 +03:00
libvirt_nss_leases.c nss: Compare hostname case insensitive 2022-05-27 13:43:14 +02:00
libvirt_nss_leases.h tools: avoid accidentally using files from gnulib 2019-08-08 13:32:02 +01:00
libvirt_nss_macs.c nss: Compare hostname case insensitive 2022-05-27 13:43:14 +02:00
libvirt_nss_macs.h tools: avoid accidentally using files from gnulib 2019-08-08 13:32:02 +01:00
libvirt_nss.c syntax-check: Forbid use of qsort() 2023-11-24 09:53:14 +01:00
libvirt_nss.h libvirt_nss: Fix ERROR() macro 2024-04-18 14:57:30 +02:00
libvirt_nss.syms Implement _nss_libvirt_gethostbyname4_r 2016-03-18 17:29:53 +01:00
meson.build meson: Don't attempt to use version scripts on macOS 2022-05-06 11:12:48 +02:00