FreeBSD Bugzilla – Attachment 201485 Details for
Bug 234919
sysutils/polkit: Update to 0.115
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to update sysutils/polkit
polkit.diff (text/plain), 12.27 KB, created by
Olivier Duchateau
on 2019-01-28 18:37:34 UTC
(
hide
)
Description:
Patch to update sysutils/polkit
Filename:
MIME Type:
Creator:
Olivier Duchateau
Created:
2019-01-28 18:37:34 UTC
Size:
12.27 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (révision 491504) >+++ Makefile (copie de travail) >@@ -2,8 +2,7 @@ > # $FreeBSD$ > > PORTNAME= polkit >-PORTVERSION= 0.114 >-PORTREVISION= 2 >+PORTVERSION= 0.115 > CATEGORIES= sysutils gnome > MASTER_SITES= http://www.freedesktop.org/software/polkit/releases/ > >@@ -15,14 +14,13 @@ > > LIB_DEPENDS= libexpat.so:textproc/expat2 \ > libmozjs-52.so:lang/spidermonkey52 >-RUN_DEPENDS= dbus-launch:devel/dbus > > USERS= polkitd > GROUPS= polkitd > >-USES= compiler:c++11-lib gettext gmake libtool localbase pathfix \ >- pkgconfig shebangfix >-USE_GNOME= glib20 intlhack introspection:build >+USES= compiler:c++11-lib gettext gmake gnome libtool localbase \ >+ pathfix pkgconfig shebangfix >+USE_GNOME= glib20 intltool introspection:build > SHEBANG_FILES= ${WRKSRC}/src/polkitbackend/toarray.pl > GNU_CONFIGURE= yes > USE_LDCONFIG= yes >@@ -34,8 +32,8 @@ > --with-polkitd-user=${USERS} \ > --disable-static \ > --disable-examples \ >- --disable-libsystemd-login \ >- --disable-libelogind \ >+ --enable-libsystemd-login=no \ >+ --enable-libelogind=no \ > --disable-test \ > --enable-introspection=yes \ > --localstatedir=/var >Index: distinfo >=================================================================== >--- distinfo (révision 491504) >+++ distinfo (copie de travail) >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1525103481 >-SHA256 (polkit-0.114.tar.gz) = bdf4007367d758fd794de2495975c115984d206267e52d1e6ac5ceea77e8ede6 >-SIZE (polkit-0.114.tar.gz) = 1557340 >+TIMESTAMP = 1547377221 >+SHA256 (polkit-0.115.tar.gz) = 2f87ecdabfbd415c6306673ceadc59846f059b18ef2fce42bac63fe283f12131 >+SIZE (polkit-0.115.tar.gz) = 1550932 >Index: files/patch-src_polkit_polkitunixgroup.c >=================================================================== >--- files/patch-src_polkit_polkitunixgroup.c (nonexistent) >+++ files/patch-src_polkit_polkitunixgroup.c (copie de travail) >@@ -0,0 +1,59 @@ >+--- src/polkit/polkitunixgroup.c.orig 2017-09-04 19:52:53 UTC >++++ src/polkit/polkitunixgroup.c >+@@ -71,6 +71,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixGroup, polkit_unix_ >+ static void >+ polkit_unix_group_init (PolkitUnixGroup *unix_group) >+ { >++ unix_group->gid = -1; /* (git_t) -1 is not a valid GID under Linux */ >+ } >+ >+ static void >+@@ -100,11 +101,14 @@ polkit_unix_group_set_property (GObject *object, >+ GParamSpec *pspec) >+ { >+ PolkitUnixGroup *unix_group = POLKIT_UNIX_GROUP (object); >++ gint val; >+ >+ switch (prop_id) >+ { >+ case PROP_GID: >+- unix_group->gid = g_value_get_int (value); >++ val = g_value_get_int (value); >++ g_return_if_fail (val != -1); >++ unix_group->gid = val; >+ break; >+ >+ default: >+@@ -131,9 +135,9 @@ polkit_unix_group_class_init (PolkitUnixGroupClass *kl >+ g_param_spec_int ("gid", >+ "Group ID", >+ "The UNIX group ID", >+- 0, >++ G_MININT, >+ G_MAXINT, >+- 0, >++ -1, >+ G_PARAM_CONSTRUCT | >+ G_PARAM_READWRITE | >+ G_PARAM_STATIC_NAME | >+@@ -166,9 +170,10 @@ polkit_unix_group_get_gid (PolkitUnixGroup *group) >+ */ >+ void >+ polkit_unix_group_set_gid (PolkitUnixGroup *group, >+- gint gid) >++ gint gid) >+ { >+ g_return_if_fail (POLKIT_IS_UNIX_GROUP (group)); >++ g_return_if_fail (gid != -1); >+ group->gid = gid; >+ } >+ >+@@ -183,6 +188,8 @@ polkit_unix_group_set_gid (PolkitUnixGroup *group, >+ PolkitIdentity * >+ polkit_unix_group_new (gint gid) >+ { >++ g_return_val_if_fail (gid != -1, NULL); >++ >+ return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_GROUP, >+ "gid", gid, >+ NULL)); > >Property changes on: files/patch-src_polkit_polkitunixgroup.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_polkit_polkitunixuser.c >=================================================================== >--- files/patch-src_polkit_polkitunixuser.c (nonexistent) >+++ files/patch-src_polkit_polkitunixuser.c (copie de travail) >@@ -0,0 +1,55 @@ >+--- src/polkit/polkitunixuser.c.orig 2017-09-04 19:52:53 UTC >++++ src/polkit/polkitunixuser.c >+@@ -72,6 +72,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixUser, polkit_unix_u >+ static void >+ polkit_unix_user_init (PolkitUnixUser *unix_user) >+ { >++ unix_user->uid = -1; /* (uid_t) -1 is not a valid UID under Linux */ >+ unix_user->name = NULL; >+ } >+ >+@@ -112,11 +113,14 @@ polkit_unix_user_set_property (GObject *object, >+ GParamSpec *pspec) >+ { >+ PolkitUnixUser *unix_user = POLKIT_UNIX_USER (object); >++ gint val; >+ >+ switch (prop_id) >+ { >+ case PROP_UID: >+- unix_user->uid = g_value_get_int (value); >++ val = g_value_get_int (value); >++ g_return_if_fail (val != -1); >++ unix_user->uid = val; >+ break; >+ >+ default: >+@@ -144,9 +148,9 @@ polkit_unix_user_class_init (PolkitUnixUserClass *klas >+ g_param_spec_int ("uid", >+ "User ID", >+ "The UNIX user ID", >+- 0, >++ G_MININT, >+ G_MAXINT, >+- 0, >++ -1, >+ G_PARAM_CONSTRUCT | >+ G_PARAM_READWRITE | >+ G_PARAM_STATIC_NAME | >+@@ -182,6 +186,7 @@ polkit_unix_user_set_uid (PolkitUnixUser *user, >+ gint uid) >+ { >+ g_return_if_fail (POLKIT_IS_UNIX_USER (user)); >++ g_return_if_fail (uid != -1); >+ user->uid = uid; >+ } >+ >+@@ -196,6 +201,8 @@ polkit_unix_user_set_uid (PolkitUnixUser *user, >+ PolkitIdentity * >+ polkit_unix_user_new (gint uid) >+ { >++ g_return_val_if_fail (uid != -1, NULL); >++ >+ return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_USER, >+ "uid", uid, >+ NULL)); > >Property changes on: files/patch-src_polkit_polkitunixuser.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_polkitagent_polkitagentlistener.c >=================================================================== >--- files/patch-src_polkitagent_polkitagentlistener.c (nonexistent) >+++ files/patch-src_polkitagent_polkitagentlistener.c (copie de travail) >@@ -0,0 +1,10 @@ >+--- src/polkitagent/polkitagentlistener.c.orig 2018-04-03 20:57:57 UTC >++++ src/polkitagent/polkitagentlistener.c >+@@ -439,6 +439,7 @@ polkit_agent_listener_register_with_options (PolkitAge >+ server->thread_initialization_error = NULL; >+ g_thread_join (server->thread); >+ server_free (server); >++ server = NULL; >+ goto out; >+ } >+ } > >Property changes on: files/patch-src_polkitagent_polkitagentlistener.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_polkitbackend_polkitbackendinteractiveauthority.c >=================================================================== >--- files/patch-src_polkitbackend_polkitbackendinteractiveauthority.c (nonexistent) >+++ files/patch-src_polkitbackend_polkitbackendinteractiveauthority.c (copie de travail) >@@ -0,0 +1,56 @@ >+--- src/polkitbackend/polkitbackendinteractiveauthority.c.orig 2018-06-22 22:20:18 UTC >++++ src/polkitbackend/polkitbackendinteractiveauthority.c >+@@ -3031,7 +3031,44 @@ temporary_authorization_store_free (TemporaryAuthoriza >+ g_free (store); >+ } >+ >++/* See the comment at the top of polkitunixprocess.c */ >+ static gboolean >++subject_equal_for_authz (PolkitSubject *a, >++ PolkitSubject *b) >++{ >++ if (!polkit_subject_equal (a, b)) >++ return FALSE; >++ >++ /* Now special case unix processes, as we want to protect against >++ * pid reuse by including the UID. >++ */ >++ if (POLKIT_IS_UNIX_PROCESS (a) && POLKIT_IS_UNIX_PROCESS (b)) { >++ PolkitUnixProcess *ap = (PolkitUnixProcess*)a; >++ int uid_a = polkit_unix_process_get_uid ((PolkitUnixProcess*)a); >++ PolkitUnixProcess *bp = (PolkitUnixProcess*)b; >++ int uid_b = polkit_unix_process_get_uid ((PolkitUnixProcess*)b); >++ >++ if (uid_a != -1 && uid_b != -1) >++ { >++ if (uid_a == uid_b) >++ { >++ return TRUE; >++ } >++ else >++ { >++ g_printerr ("denying slowfork; pid %d uid %d != %d!\n", >++ polkit_unix_process_get_pid (ap), >++ uid_a, uid_b); >++ return FALSE; >++ } >++ } >++ /* Fall through; one of the uids is unset so we can't reliably compare */ >++ } >++ >++ return TRUE; >++} >++ >++static gboolean >+ temporary_authorization_store_has_authorization (TemporaryAuthorizationStore *store, >+ PolkitSubject *subject, >+ const gchar *action_id, >+@@ -3073,7 +3110,7 @@ temporary_authorization_store_has_authorization (Tempo >+ TemporaryAuthorization *authorization = l->data; >+ >+ if (strcmp (action_id, authorization->action_id) == 0 && >+- polkit_subject_equal (subject_to_use, authorization->subject)) >++ subject_equal_for_authz (subject_to_use, authorization->subject)) >+ { >+ ret = TRUE; >+ if (out_tmp_authz_id != NULL) > >Property changes on: files/patch-src_polkitbackend_polkitbackendinteractiveauthority.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_polkitbackend_polkitbackendjsauthority.cpp >=================================================================== >--- files/patch-src_polkitbackend_polkitbackendjsauthority.cpp (nonexistent) >+++ files/patch-src_polkitbackend_polkitbackendjsauthority.cpp (copie de travail) >@@ -0,0 +1,12 @@ >+--- src/polkitbackend/polkitbackendjsauthority.cpp.orig 2018-04-03 20:57:57 UTC >++++ src/polkitbackend/polkitbackendjsauthority.cpp >+@@ -1595,7 +1595,8 @@ utils_spawn_data_free (UtilsSpawnData *data) >+ (GSourceFunc) utils_child_watch_from_release_cb, >+ source, >+ (GDestroyNotify) g_source_destroy); >+- g_source_attach (source, data->main_context); >++ /* attach source to the global default main context */ >++ g_source_attach (source, NULL); >+ g_source_unref (source); >+ data->child_pid = 0; >+ } > >Property changes on: files/patch-src_polkitbackend_polkitbackendjsauthority.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 234919
:
201097
| 201485