38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
$OpenBSD: patch-src_polkitbackend_polkitbackendlocalauthority_c,v 1.4 2012/02/16 22:28:23 ajacoutot Exp $
|
|
--- src/polkitbackend/polkitbackendlocalauthority.c.orig Tue Jan 3 15:45:22 2012
|
|
+++ src/polkitbackend/polkitbackendlocalauthority.c Wed Feb 8 17:51:32 2012
|
|
@@ -23,7 +23,11 @@
|
|
#include <errno.h>
|
|
#include <pwd.h>
|
|
#include <grp.h>
|
|
+#if defined __OpenBSD__
|
|
+#include <netgroup.h>
|
|
+#else
|
|
#include <netdb.h>
|
|
+#endif
|
|
#include <string.h>
|
|
#include <glib/gstdio.h>
|
|
#include <locale.h>
|
|
@@ -700,15 +704,20 @@ get_users_in_net_group (PolkitIdentity
|
|
ret = NULL;
|
|
name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group));
|
|
|
|
+/* Under BSD, setnetgrent() returns void. */
|
|
+#if defined __OpenBSD__
|
|
+ setnetgrent (name);
|
|
+#else
|
|
if (setnetgrent (name) == 0)
|
|
{
|
|
g_warning ("Error looking up net group with name %s: %s", name, g_strerror (errno));
|
|
goto out;
|
|
}
|
|
+#endif
|
|
|
|
for (;;)
|
|
{
|
|
- char *hostname, *username, *domainname;
|
|
+ const char *hostname, *username, *domainname;
|
|
PolkitIdentity *user;
|
|
GError *error = NULL;
|
|
|