mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
753064963c
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> |
||
---|---|---|
.. | ||
libvirt_guest_nss.syms | ||
libvirt_nss_bsd.syms | ||
libvirt_nss_leases.c | ||
libvirt_nss_leases.h | ||
libvirt_nss_macs.c | ||
libvirt_nss_macs.h | ||
libvirt_nss.c | ||
libvirt_nss.h | ||
libvirt_nss.syms | ||
meson.build |