pkgsrc/security/polkit/patches/patch-test_mocklibc_src_netdb.c
wiz b4348cc11f polkit: update to 0.119.
Fix some pkglint, including renaming a patch to match the file it applies
to.

This is polkit 0.119.

Highlights:
 meson build system added
 CVE-2021-3560 mitigation

Build requirements

 glib, gobject, gio    >= 2.32
 mozjs-78
 gobject-introspection >= 0.6.2 (optional)
 pam (optional)
 ConsoleKit OR systemd

Changes since polkit 0.118:

 Inigo Martinez:
    meson build system added alongside autotools (many thanks!!)

 Matthias Classen:
    properties in text listener

 René Genz:
    typos fixups

 Balázs Úr:
    Update Hungarian translation

 Hendrik Werner:
    meson post-install script mod to avoid calling external processes

 Kevin Backhouse, Jan Rybar:
    CVE-2021-3560 mitigation

Many thanks to all contributors!

Jan Rybar et al.,
June 3, 2021
2021-06-03 14:43:07 +00:00

30 lines
908 B
C

$NetBSD: patch-test_mocklibc_src_netdb.c,v 1.1 2021/06/03 14:43:07 wiz Exp $
Darwin has setnetgrent.
SunOS has endnetgrent.
--- test/mocklibc/src/netdb.c.orig 2014-01-14 22:42:25.000000000 +0000
+++ test/mocklibc/src/netdb.c
@@ -36,6 +36,7 @@ static struct netgroup_iter global_iter;
// REMEMBER: 1 means success, 0 means failure for netgroup methods
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__)
int setnetgrent(const char *netgroup) {
if (!global_netgroup_head)
global_netgroup_head = netgroup_parse_all();
@@ -50,11 +51,14 @@ int setnetgrent(const char *netgroup) {
netgroup_iter_init(&global_iter, group);
return 1;
}
+#endif
+#ifndef __sun__
void endnetgrent(void) {
netgroup_free_all(global_netgroup_head);
global_netgroup_head = NULL;
}
+#endif
int getnetgrent(char **host, char **user, char **domain) {
if (!global_netgroup_head)