forked from openembedded/meta-openembedded
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
polkit: refresh patch to fix warning
Fix the following warning: WARNING: polkit-0.119-r0 do_patch: Fuzz detected: Applying patch 0004-Make-netgroup-support-optional.patch patching file configure.ac Hunk openembedded#1 succeeded at 117 with fuzz 2 (offset 17 lines). patching file meson.build patching file src/polkit/polkitidentity.c patching file src/polkit/polkitunixnetgroup.c patching file src/polkitbackend/polkitbackendinteractiveauthority.c patching file src/polkitbackend/polkitbackendjsauthority.cpp Hunk openembedded#1 succeeded at 1291 (offset -233 lines). Hunk openembedded#2 succeeded at 1306 (offset -233 lines). patching file test/polkit/polkitidentitytest.c patching file test/polkit/polkitunixnetgrouptest.c patching file test/polkitbackend/test-polkitbackendjsauthority.c Signed-off-by: Sergio Prado <[email protected]> Signed-off-by: Khem Raj <[email protected]>
- Loading branch information
1 parent
4fdcfde
commit 0d5a3e6
Showing
1 changed file
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 7ef2621ab7adcedc099ed39acfb73c6fa835cbc3 Mon Sep 17 00:00:00 2001 | ||
From 501e6df3468f5da05881fc38cf68740e153ab403 Mon Sep 17 00:00:00 2001 | ||
From: "A. Wilcox" <[email protected]> | ||
Date: Sun, 15 May 2022 05:04:10 +0000 | ||
Subject: [PATCH] Make netgroup support optional | ||
|
@@ -37,20 +37,20 @@ Signed-off-by: Marta Rybczynska <[email protected]> | |
9 files changed, 43 insertions(+), 8 deletions(-) | ||
|
||
diff --git a/configure.ac b/configure.ac | ||
index 59858df..5a7fc11 100644 | ||
index 18e422300bb7..0f87ea0e8a26 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -100,7 +100,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="-lexpat"], | ||
[AC_MSG_ERROR([Can't find expat library. Please install expat.])]) | ||
AC_SUBST(EXPAT_LIBS) | ||
@@ -117,7 +117,7 @@ CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | ||
CC="$PTHREAD_CC" | ||
AC_CHECK_FUNCS([pthread_condattr_setclock]) | ||
|
||
-AC_CHECK_FUNCS(clearenv fdatasync) | ||
+AC_CHECK_FUNCS(clearenv fdatasync setnetgrent) | ||
|
||
if test "x$GCC" = "xyes"; then | ||
LDFLAGS="-Wl,--as-needed $LDFLAGS" | ||
diff --git a/meson.build b/meson.build | ||
index 733bbff..d840926 100644 | ||
index 750623179750..2d9d67a23409 100644 | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -82,6 +82,7 @@ config_h.set('_GNU_SOURCE', true) | ||
|
@@ -62,7 +62,7 @@ index 733bbff..d840926 100644 | |
|
||
foreach func: check_functions | ||
diff --git a/src/polkit/polkitidentity.c b/src/polkit/polkitidentity.c | ||
index 3aa1f7f..793f17d 100644 | ||
index 3aa1f7f1c762..793f17d5d1fe 100644 | ||
--- a/src/polkit/polkitidentity.c | ||
+++ b/src/polkit/polkitidentity.c | ||
@@ -182,7 +182,15 @@ polkit_identity_from_string (const gchar *str, | ||
|
@@ -105,7 +105,7 @@ index 3aa1f7f..793f17d 100644 | |
else | ||
{ | ||
diff --git a/src/polkit/polkitunixnetgroup.c b/src/polkit/polkitunixnetgroup.c | ||
index 8a2b369..83f8d4a 100644 | ||
index 8a2b36938ac5..83f8d4a13efd 100644 | ||
--- a/src/polkit/polkitunixnetgroup.c | ||
+++ b/src/polkit/polkitunixnetgroup.c | ||
@@ -194,6 +194,9 @@ polkit_unix_netgroup_set_name (PolkitUnixNetgroup *group, | ||
|
@@ -119,7 +119,7 @@ index 8a2b369..83f8d4a 100644 | |
return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_NETGROUP, | ||
"name", name, | ||
diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c | ||
index 056d9a8..36c2f3d 100644 | ||
index 056d9a8f27f8..36c2f3dc1a79 100644 | ||
--- a/src/polkitbackend/polkitbackendinteractiveauthority.c | ||
+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c | ||
@@ -2233,25 +2233,26 @@ get_users_in_net_group (PolkitIdentity *group, | ||
|
@@ -164,18 +164,18 @@ index 056d9a8..36c2f3d 100644 | |
} | ||
|
||
diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp | ||
index 5027815..bcb040c 100644 | ||
index 11e91c045da1..9ee0391b8c70 100644 | ||
--- a/src/polkitbackend/polkitbackendjsauthority.cpp | ||
+++ b/src/polkitbackend/polkitbackendjsauthority.cpp | ||
@@ -1524,6 +1524,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx, | ||
@@ -1291,6 +1291,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx, | ||
|
||
JS::CallArgs args = JS::CallArgsFromVp (argc, vp); | ||
|
||
+#ifdef HAVE_SETNETGRENT | ||
JS::RootedString usrstr (authority->priv->cx); | ||
usrstr = args[0].toString(); | ||
user = JS_EncodeStringToUTF8 (cx, usrstr); | ||
@@ -1538,6 +1539,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx, | ||
@@ -1305,6 +1306,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx, | ||
{ | ||
is_in_netgroup = true; | ||
} | ||
|
@@ -184,7 +184,7 @@ index 5027815..bcb040c 100644 | |
ret = true; | ||
|
||
diff --git a/test/polkit/polkitidentitytest.c b/test/polkit/polkitidentitytest.c | ||
index e91967b..2635c4c 100644 | ||
index e91967bec5b9..2635c4c4c64b 100644 | ||
--- a/test/polkit/polkitidentitytest.c | ||
+++ b/test/polkit/polkitidentitytest.c | ||
@@ -145,11 +145,15 @@ struct ComparisonTestData comparison_test_data [] = { | ||
|
@@ -219,7 +219,7 @@ index e91967b..2635c4c 100644 | |
add_comparison_tests (); | ||
|
||
diff --git a/test/polkit/polkitunixnetgrouptest.c b/test/polkit/polkitunixnetgrouptest.c | ||
index 3701ba1..e1d211e 100644 | ||
index 3701ba1671b7..e1d211e47634 100644 | ||
--- a/test/polkit/polkitunixnetgrouptest.c | ||
+++ b/test/polkit/polkitunixnetgrouptest.c | ||
@@ -69,7 +69,9 @@ int | ||
|
@@ -233,7 +233,7 @@ index 3701ba1..e1d211e 100644 | |
return g_test_run (); | ||
} | ||
diff --git a/test/polkitbackend/test-polkitbackendjsauthority.c b/test/polkitbackend/test-polkitbackendjsauthority.c | ||
index f97e0e0..fc52149 100644 | ||
index 2103b174d58d..b187a2ffee3e 100644 | ||
--- a/test/polkitbackend/test-polkitbackendjsauthority.c | ||
+++ b/test/polkitbackend/test-polkitbackendjsauthority.c | ||
@@ -137,12 +137,14 @@ test_get_admin_identities (void) | ||
|