79 lines
2.8 KiB
Diff
79 lines
2.8 KiB
Diff
--- configure.ac.orig 2015-07-03 07:10:14.570457101 +0200
|
|
+++ configure.ac 2015-07-03 07:10:46.449875012 +0200
|
|
@@ -158,7 +158,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXP
|
|
[AC_MSG_ERROR([Can't find expat library. Please install expat.])])
|
|
AC_SUBST(EXPAT_LIBS)
|
|
|
|
-AC_CHECK_FUNCS(clearenv fdatasync)
|
|
+AC_CHECK_FUNCS(clearenv fdatasync getnetgrent)
|
|
|
|
if test "x$GCC" = "xyes"; then
|
|
LDFLAGS="-Wl,--as-needed $LDFLAGS"
|
|
--- src/polkitbackend/polkitbackendinteractiveauthority.c.orig 2015-05-08 10:22:03.093307918 +0200
|
|
+++ src/polkitbackend/polkitbackendinteractiveauthority.c 2015-05-08 10:23:44.516263273 +0200
|
|
@@ -2103,6 +2103,7 @@ get_users_in_group (PolkitIdentity
|
|
return ret;
|
|
}
|
|
|
|
+#if defined HAVE_GETNETGRENT
|
|
static GList *
|
|
get_users_in_net_group (PolkitIdentity *group,
|
|
gboolean include_root)
|
|
@@ -2154,6 +2155,7 @@ get_users_in_net_group (PolkitIdentity
|
|
endnetgrent ();
|
|
return ret;
|
|
}
|
|
+#endif
|
|
|
|
/* ---------------------------------------------------------------------------------------------------- */
|
|
|
|
@@ -2243,10 +2245,12 @@ authentication_agent_initiate_challenge
|
|
{
|
|
user_identities = g_list_concat (user_identities, get_users_in_group (identity, FALSE));
|
|
}
|
|
+#if defined HAVE_GETNETGRENT
|
|
else if (POLKIT_IS_UNIX_NETGROUP (identity))
|
|
{
|
|
user_identities = g_list_concat (user_identities, get_users_in_net_group (identity, FALSE));
|
|
}
|
|
+#endif
|
|
else
|
|
{
|
|
g_warning ("Unsupported identity");
|
|
--- src/polkitbackend/polkitbackendjsauthority.c.orig 2015-05-08 10:26:51.509181105 +0200
|
|
+++ src/polkitbackend/polkitbackendjsauthority.c 2015-05-08 10:27:41.357159439 +0200
|
|
@@ -180,13 +180,17 @@ static JSClass js_polkit_class = {
|
|
|
|
static JSBool js_polkit_log (JSContext *cx, unsigned argc, jsval *vp);
|
|
static JSBool js_polkit_spawn (JSContext *cx, unsigned argc, jsval *vp);
|
|
+#if defined HAVE_GETNETGRENT
|
|
static JSBool js_polkit_user_is_in_netgroup (JSContext *cx, unsigned argc, jsval *vp);
|
|
+#endif
|
|
|
|
static JSFunctionSpec js_polkit_functions[] =
|
|
{
|
|
JS_FS("log", js_polkit_log, 0, 0),
|
|
JS_FS("spawn", js_polkit_spawn, 0, 0),
|
|
+#if defined HAVE_GETNETGRENT
|
|
JS_FS("_userIsInNetGroup", js_polkit_user_is_in_netgroup, 0, 0),
|
|
+#endif
|
|
JS_FS_END
|
|
};
|
|
|
|
@@ -1441,6 +1445,7 @@ js_polkit_spawn (JSContext *cx,
|
|
/* ---------------------------------------------------------------------------------------------------- */
|
|
|
|
|
|
+#if defined HAVE_GETNETGRENT
|
|
static JSBool
|
|
js_polkit_user_is_in_netgroup (JSContext *cx,
|
|
unsigned argc,
|
|
@@ -1477,7 +1482,7 @@ js_polkit_user_is_in_netgroup (JSContext
|
|
out:
|
|
return ret;
|
|
}
|
|
-
|
|
+#endif
|
|
|
|
|
|
/* ---------------------------------------------------------------------------------------------------- */
|