[PATCH] xfce4-session systemd support: polkit_unix_process_new is deprecated

Eric eric.koegel at gmail.com
Thu Apr 3 17:11:28 CEST 2014


Thanks for the taking the time to write the patch.

polkit_unix_process_new_for_owner looks like it was introduced in
0.102 which was released in 2011-08-01 so we will probably need
to change:
-XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.100],
+XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.102],
in configure.ac.in as well.

If you can, please open a bug on our bug tracker so this patch
doesn't get lost on the mailing list.

Eric

On Thu, Apr 3, 2014 at 10:19 AM, Baurzhan Muftakhidinov
<baurthefirst at gmail.com> wrote:
> Hello,
>
> While building latest dev release of xfce4-session on Fedora 20
> I have noticed the next warning
>
> xfsm-systemd.c:79:3: warning: 'polkit_unix_process_new' is deprecated
> (declared at /usr/include/polkit-1/polkit/polkitunixprocess.h:51): Use
> polkit_unix_process_new_for_owner instead [-Wdeprecated-declarations]
>    systemd->subject = polkit_unix_process_new (getpid());
>    ^
>
> Below is the simple patch to fix that
>
>
> diff --git a/xfce4-session/xfsm-systemd.c b/xfce4-session/xfsm-systemd.c
> index 7bdd39d..90f8e2d 100644
> --- a/xfce4-session/xfsm-systemd.c
> +++ b/xfce4-session/xfsm-systemd.c
> @@ -76,7 +76,7 @@ static void
>  xfsm_systemd_init (XfsmSystemd *systemd)
>  {
>    systemd->authority = polkit_authority_get_sync (NULL, NULL);
> -  systemd->subject = polkit_unix_process_new (getpid());
> +  systemd->subject = polkit_unix_process_new_for_owner (getpid(), 0, -1);
>  }
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/xfce4-dev


More information about the Xfce4-dev mailing list