mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-09 05:49:23 +00:00
polkit: update to 0.111
note: this version's rules are written in jscript. The following tests were performed: * run-tests for gnome- and xfce-based image * update a package that installs a new rule to check if the restricted access rights for /etc/polkit-1/rules.d don't cause trouble Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
committed by
Martin Jansa
parent
0368f18b3f
commit
da51d044a8
-70
@@ -1,70 +0,0 @@
|
|||||||
From c46d2d13eac240d2a609b2dd8fc617ea18a78bfa Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Zeuthen <davidz@redhat.com>
|
|
||||||
Date: Mon, 6 Feb 2012 11:24:53 -0500
|
|
||||||
Subject: [PATCH 1/2] PolkitUnixSession: Set error if we cannot find a session for the given pid
|
|
||||||
|
|
||||||
Also, don't treat the integer returned by sd_pid_get_session() as a
|
|
||||||
boolean because that's just confusing. Also, don't confuse memory
|
|
||||||
supposed to be freed by g_free() and free(3) with each other. See
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=787222
|
|
||||||
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
Upstream-Status: Accepted
|
|
||||||
|
|
||||||
src/polkit/polkitunixsession-systemd.c | 21 ++++++++++++++++-----
|
|
||||||
1 files changed, 16 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/polkit/polkitunixsession-systemd.c b/src/polkit/polkitunixsession-systemd.c
|
|
||||||
index e7e913f..94a7ee4 100644
|
|
||||||
--- a/src/polkit/polkitunixsession-systemd.c
|
|
||||||
+++ b/src/polkit/polkitunixsession-systemd.c
|
|
||||||
@@ -23,6 +23,7 @@
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "polkitunixsession.h"
|
|
||||||
#include "polkitsubject.h"
|
|
||||||
@@ -450,9 +451,8 @@ polkit_unix_session_initable_init (GInitable *initable,
|
|
||||||
GError **error)
|
|
||||||
{
|
|
||||||
PolkitUnixSession *session = POLKIT_UNIX_SESSION (initable);
|
|
||||||
- gboolean ret;
|
|
||||||
-
|
|
||||||
- ret = FALSE;
|
|
||||||
+ gboolean ret = FALSE;
|
|
||||||
+ char *s;
|
|
||||||
|
|
||||||
if (session->session_id != NULL)
|
|
||||||
{
|
|
||||||
@@ -461,8 +461,19 @@ polkit_unix_session_initable_init (GInitable *initable,
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!sd_pid_get_session (session->pid, &session->session_id))
|
|
||||||
- ret = TRUE;
|
|
||||||
+ if (sd_pid_get_session (session->pid, &s) == 0)
|
|
||||||
+ {
|
|
||||||
+ session->session_id = g_strdup (s);
|
|
||||||
+ free (s);
|
|
||||||
+ ret = TRUE;
|
|
||||||
+ goto out;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ g_set_error (error,
|
|
||||||
+ POLKIT_ERROR,
|
|
||||||
+ POLKIT_ERROR_FAILED,
|
|
||||||
+ "No session for pid %d",
|
|
||||||
+ (gint) session->pid);
|
|
||||||
|
|
||||||
out:
|
|
||||||
return ret;
|
|
||||||
--
|
|
||||||
1.7.2.5
|
|
||||||
|
|
||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
From 8fb8b406bab50c5ef8c5d4f743e3f13924bd5f73 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Zeuthen <davidz@redhat.com>
|
|
||||||
Date: Mon, 6 Feb 2012 11:26:06 -0500
|
|
||||||
Subject: [PATCH 2/2] PolkitUnixSession: Actually return TRUE if a session exists
|
|
||||||
|
|
||||||
Also, don't treat the integer returned by sd_session_get_uid() as a
|
|
||||||
boolean because that's just confusing.
|
|
||||||
|
|
||||||
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
Upstream-Status: Accepted
|
|
||||||
|
|
||||||
src/polkit/polkitunixsession-systemd.c | 12 +++++-------
|
|
||||||
1 files changed, 5 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/polkit/polkitunixsession-systemd.c b/src/polkit/polkitunixsession-systemd.c
|
|
||||||
index 94a7ee4..8a8bf65 100644
|
|
||||||
--- a/src/polkit/polkitunixsession-systemd.c
|
|
||||||
+++ b/src/polkit/polkitunixsession-systemd.c
|
|
||||||
@@ -361,17 +361,15 @@ polkit_unix_session_to_string (PolkitSubject *subject)
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
polkit_unix_session_exists_sync (PolkitSubject *subject,
|
|
||||||
- GCancellable *cancellable,
|
|
||||||
- GError **error)
|
|
||||||
+ GCancellable *cancellable,
|
|
||||||
+ GError **error)
|
|
||||||
{
|
|
||||||
PolkitUnixSession *session = POLKIT_UNIX_SESSION (subject);
|
|
||||||
- gboolean ret;
|
|
||||||
+ gboolean ret = FALSE;
|
|
||||||
uid_t uid;
|
|
||||||
|
|
||||||
- ret = FALSE;
|
|
||||||
-
|
|
||||||
- if (!sd_session_get_uid (session->session_id, &uid))
|
|
||||||
- ret = FALSE;
|
|
||||||
+ if (sd_session_get_uid (session->session_id, &uid) == 0)
|
|
||||||
+ ret = TRUE;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.7.2.5
|
|
||||||
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59091]
|
|
||||||
|
|
||||||
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
|
|
||||||
diff -Nurd polkit-0.104/configure.ac polkit-0.104/configure.ac
|
|
||||||
--- polkit-0.104/configure.ac 2012-01-03 18:25:49.000000000 +0200
|
|
||||||
+++ polkit-0.104/configure.ac 2013-01-07 03:13:31.862125625 +0200
|
|
||||||
@@ -3,7 +3,7 @@
|
|
||||||
AC_PREREQ(2.59c)
|
|
||||||
AC_INIT(polkit, 0.104, http://lists.freedesktop.org/mailman/listinfo/polkit-devel)
|
|
||||||
AM_INIT_AUTOMAKE(polkit, 0.104)
|
|
||||||
-AM_CONFIG_HEADER(config.h)
|
|
||||||
+AC_CONFIG_HEADERS(config.h)
|
|
||||||
AM_MAINTAINER_MODE
|
|
||||||
|
|
||||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
||||||
@@ -24,7 +24,6 @@
|
|
||||||
|
|
||||||
AC_ISC_POSIX
|
|
||||||
AC_PROG_CC
|
|
||||||
-AM_PROG_CC_STDC
|
|
||||||
AC_HEADER_STDC
|
|
||||||
AM_PROG_LIBTOOL
|
|
||||||
AC_PROG_MAKE_SET
|
|
||||||
+34
-17
@@ -5,39 +5,56 @@ LICENSE = "LGPLv2+"
|
|||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \
|
LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \
|
||||||
file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4"
|
file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4"
|
||||||
|
|
||||||
DEPENDS = "expat glib-2.0 intltool-native gobject-introspection-stub"
|
DEPENDS = "expat glib-2.0 intltool-native gobject-introspection-stub mozjs"
|
||||||
|
|
||||||
|
inherit autotools gtk-doc pkgconfig useradd systemd
|
||||||
|
|
||||||
PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
|
PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
|
||||||
${@base_contains('DISTRO_FEATURES','systemd','systemd','consolekit',d)}"
|
${@base_contains('DISTRO_FEATURES','systemd','systemd','consolekit',d)}"
|
||||||
|
|
||||||
PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=shadow,libpam,libpam"
|
PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=shadow,libpam,libpam"
|
||||||
PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
|
PACKAGECONFIG[systemd] = "--enable-libsystemd-login=yes --with-systemdsystemunitdir=${systemd_unitdir}/system/,--enable-libsystemd-login=no --with-systemdsystemunitdir=,systemd"
|
||||||
# there is no --enable/--disable option for consolekit and it's not picked by shlibs, so add it to RDEPENDS
|
# there is no --enable/--disable option for consolekit and it's not picked by shlibs, so add it to RDEPENDS
|
||||||
PACKAGECONFIG[consolekit] = ",,,consolekit"
|
PACKAGECONFIG[consolekit] = ",,,consolekit"
|
||||||
|
|
||||||
PR = "r12"
|
|
||||||
|
|
||||||
PAM_SRC_URI = "file://polkit-1_pam.patch"
|
PAM_SRC_URI = "file://polkit-1_pam.patch"
|
||||||
SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \
|
SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \
|
||||||
${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
|
${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
|
||||||
file://0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch \
|
|
||||||
file://0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch \
|
|
||||||
file://obsolete_automake_macros.patch \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "e380b4c6fb1e7bccf854e92edc0a8ce1"
|
SRC_URI[md5sum] = "81b116edf986d8e13502929a171f4e0d"
|
||||||
SRC_URI[sha256sum] = "6b0a13d8381e4a7b7e37c18a54595191b50757e0fcd186cd9918e9ad0f18c7f9"
|
SRC_URI[sha256sum] = "02ae544547211b687818c97bcbf19bf6b8b5be7fda93000525a8765c7bed1ea1"
|
||||||
|
|
||||||
EXTRA_OECONF = "--with-os-type=moblin --disable-man-pages --disable-introspection"
|
EXTRA_OECONF = "--with-os-type=moblin --disable-man-pages --disable-introspection"
|
||||||
|
|
||||||
inherit autotools gtk-doc pkgconfig
|
|
||||||
|
|
||||||
do_install_append() {
|
do_install_append() {
|
||||||
rm -f ${D}${libdir}/${BPN}-1/extensions/*.a
|
# see configure.log for more details
|
||||||
|
chown root:root ${D}${libdir}/${BPN}-1/polkit-agent-helper-1
|
||||||
|
chmod 4755 ${D}${libdir}/${BPN}-1/polkit-agent-helper-1
|
||||||
|
|
||||||
|
chown root:root ${D}${bindir}/pkexec
|
||||||
|
chmod 4755 ${D}${bindir}/pkexec
|
||||||
|
|
||||||
|
chown polkitd:polkitd ${D}${sysconfdir}/${BPN}-1/rules.d
|
||||||
|
chmod 700 ${D}${sysconfdir}/${BPN}-1/rules.d
|
||||||
|
|
||||||
|
chown polkitd:polkitd ${D}${datadir}/${BPN}-1/rules.d
|
||||||
|
chmod 700 ${D}${datadir}/${BPN}-1/rules.d
|
||||||
}
|
}
|
||||||
|
|
||||||
FILES_${PN} += "${libdir}/${BPN}-1/extensions/*.so \
|
PACKAGES =+ "${PN}-examples"
|
||||||
${datadir}/${BPN}-1/actions/* \
|
|
||||||
${datadir}/dbus-1/system-services/*"
|
FILES_${PN} += " \
|
||||||
FILES_${PN}-dbg += "${libdir}/${BPN}-1/extensions/.debug/*.so"
|
${libdir}/${BPN}-1 \
|
||||||
FILES_${PN}-dev += "${libdir}/${BPN}-1/extensions/*.la "
|
${datadir}/dbus-1 \
|
||||||
|
${datadir}/${BPN}-1 \
|
||||||
|
"
|
||||||
|
FILES_${PN}-dbg += "${libdir}/${BPN}-1/.debug"
|
||||||
|
|
||||||
|
FILES_${PN}-examples = "${bindir}/*example*"
|
||||||
|
|
||||||
|
USERADD_PACKAGES = "${PN}"
|
||||||
|
USERADD_PARAM_${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 polkitd"
|
||||||
|
|
||||||
|
SYSTEMD_SERVICE_${PN} = "${BPN}.service"
|
||||||
|
SYSTEMD_AUTO_ENABLE = "disable"
|
||||||
Reference in New Issue
Block a user