aboutsummaryrefslogtreecommitdiffstats
path: root/community/polkit-elogind
diff options
context:
space:
mode:
Diffstat (limited to 'community/polkit-elogind')
-rw-r--r--community/polkit-elogind/APKBUILD85
-rw-r--r--community/polkit-elogind/alpine-polkit.pam7
-rw-r--r--community/polkit-elogind/make-innetgr-optional.patch239
-rw-r--r--community/polkit-elogind/polkit-elogind.pre-install6
-rw-r--r--community/polkit-elogind/polkit.initd12
5 files changed, 0 insertions, 349 deletions
diff --git a/community/polkit-elogind/APKBUILD b/community/polkit-elogind/APKBUILD
deleted file mode 100644
index 5f2b983dcf..0000000000
--- a/community/polkit-elogind/APKBUILD
+++ /dev/null
@@ -1,85 +0,0 @@
-# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
-pkgname=polkit-elogind
-pkgver=0.118
-pkgrel=1
-pkgdesc="Application development toolkit for controlling system-wide privileges (elogind variant)"
-url="https://www.freedesktop.org/wiki/Software/polkit/"
-arch="all !mips !mips64 !s390x !riscv64" # blocked by mozjs78 -> rust
-license="GPL-2.0-or-later"
-options="suid !check"
-depends_dev="dbus-glib-dev"
-makedepends="$depends_dev expat-dev glib-dev gtk-doc gobject-introspection-dev
- intltool autoconf automake libtool bash mozjs78-dev elogind-dev linux-pam-dev"
-subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-openrc"
-source="https://www.freedesktop.org/software/polkit/releases/polkit-$pkgver.tar.gz
- make-innetgr-optional.patch
- alpine-polkit.pam
- polkit.initd
- "
-install="polkit-elogind.pre-install"
-pkgusers="polkitd"
-pkggroups="polkitd"
-provides="polkit"
-
-builddir="$srcdir/polkit-$pkgver"
-
-prepare() {
- default_prepare
- autoreconf -fi
-}
-
-build() {
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --libexecdir=/usr/lib/polkit-1 \
- --localstatedir=/var \
- --disable-static \
- --enable-introspection \
- --with-authfw=pam \
- --with-os-type=alpine \
- --disable-gtk-doc \
- --disable-gtk-doc-html \
- --disable-gtk-doc-pdf \
- --disable-libelogind \
- --disable-systemd \
- --enable-libsystemd-login
- make
-}
-
-check() {
- make check
-}
-
-package() {
- # Set SHELL as a workaround for #10081
- make SHELL=/bin/bash DESTDIR="$pkgdir" \
- dbusconfdir=/usr/share/dbus-1/system.d \
- rulesdir=/usr/share/polkit-1/rules.d \
- install
-
- # Use our own polkit rules, upstream may change them
- install -m644 "$srcdir"/alpine-polkit.pam "$pkgdir"/etc/pam.d/polkit-1
-
- # See polkit's configure script which tells us what permissions to set
- chown -R polkitd:polkitd "$pkgdir"/etc/polkit-1/rules.d "$pkgdir"/usr/share/polkit-1/rules.d
- chmod -R 700 "$pkgdir"/etc/polkit-1/rules.d "$pkgdir"/usr/share/polkit-1/rules.d
- chmod 4755 "$pkgdir"/usr/lib/polkit-1/polkit-agent-helper-1
- chmod 4755 "$pkgdir"/usr/bin/pkexec
-
- install -Dm755 "$srcdir"/polkit.initd "$pkgdir"/etc/init.d/polkit
-}
-
-dev() {
- provides="polkit-dev"
- default_dev
-}
-
-sha512sums="3d412f40c903cfaf68530f9c0cb616106f8edf43bec6805de129f8bb9cb4e64c98da6bf02caa3ef5619974f3e2df7a70564f08b92901662453477e9005752b4e polkit-0.118.tar.gz
-0c47751e928a91ce3a477a330ef38b8f6f003b515c94e7fb9842e6f2043be43d749ab7390cc1dbcf1fa6128b62cf0eab353d4f8855d68e595bc53777512f4562 make-innetgr-optional.patch
-f5102dc00d390b3a3c957b62e1712db778c7ffb7378f3d8e816c0757c11a308c5d5303e42595b0d6add9839247c773880cd34e56afacc89eb6efaadf9aae7826 alpine-polkit.pam
-f6e5ac0ed41feb392dfd104979ec577c5936f3db2bd252b12b7b9b2609a0901dae38bebec1ea65ccf4f427860b520383ae4d2c66fb74ab986c715f6b0ad50473 polkit.initd"
diff --git a/community/polkit-elogind/alpine-polkit.pam b/community/polkit-elogind/alpine-polkit.pam
deleted file mode 100644
index e718f7ee15..0000000000
--- a/community/polkit-elogind/alpine-polkit.pam
+++ /dev/null
@@ -1,7 +0,0 @@
-auth requisite pam_nologin.so
-auth required pam_env.so
-auth required pam_unix.so
-account required pam_unix.so
-session required pam_unix.so
-session required pam_limits.so
-password required pam_unix.so
diff --git a/community/polkit-elogind/make-innetgr-optional.patch b/community/polkit-elogind/make-innetgr-optional.patch
deleted file mode 100644
index 8459c670ba..0000000000
--- a/community/polkit-elogind/make-innetgr-optional.patch
+++ /dev/null
@@ -1,239 +0,0 @@
-See https://gitlab.freedesktop.org/polkit/polkit/merge_requests/10
-
-From 778bb45e0e0cbabe2b04adf67a500af1dab09768 Mon Sep 17 00:00:00 2001
-From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
-Date: Wed, 11 Jul 2018 04:54:26 -0500
-Subject: [PATCH] make netgroup support optional
-
-On at least Linux/musl and Linux/uclibc, netgroup support is not
-available. PolKit fails to compile on these systems for that reason.
-
-This change makes netgroup support conditional on the presence of the
-setnetgrent(3) function which is required for the support to work. If
-that function is not available on the system, an error will be returned
-to the administrator if unix-netgroup: is specified in configuration.
-
-Fixes bug 50145.
-
-Closes polkit/polkit#14.
-
-Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
----
-diff --git a/configure.ac b/configure.ac
-index 4ac2219..ca478df 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)
-
--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/src/polkit/polkitidentity.c b/src/polkit/polkitidentity.c
-index 3aa1f7f..10e9c17 100644
---- a/src/polkit/polkitidentity.c
-+++ b/src/polkit/polkitidentity.c
-@@ -182,7 +182,15 @@ polkit_identity_from_string (const gchar *str,
- }
- else if (g_str_has_prefix (str, "unix-netgroup:"))
- {
-+#ifndef HAVE_SETNETGRENT
-+ g_set_error (error,
-+ POLKIT_ERROR,
-+ POLKIT_ERROR_FAILED,
-+ "Netgroups are not available on this machine ('%s')",
-+ str);
-+#else
- identity = polkit_unix_netgroup_new (str + sizeof "unix-netgroup:" - 1);
-+#endif
- }
-
- if (identity == NULL && (error != NULL && *error == NULL))
-@@ -344,6 +352,13 @@ polkit_identity_new_for_gvariant (GVariant *variant,
- GVariant *v;
- const char *name;
-
-+#ifndef HAVE_SETNETGRENT
-+ g_set_error (error,
-+ POLKIT_ERROR,
-+ POLKIT_ERROR_FAILED,
-+ "Netgroups are not available on this machine");
-+ goto out;
-+#else
- v = lookup_asv (details_gvariant, "name", G_VARIANT_TYPE_STRING, error);
- if (v == NULL)
- {
-@@ -353,6 +368,7 @@ polkit_identity_new_for_gvariant (GVariant *variant,
- name = g_variant_get_string (v, NULL);
- ret = polkit_unix_netgroup_new (name);
- g_variant_unref (v);
-+#endif
- }
- else
- {
-diff --git a/src/polkit/polkitunixnetgroup.c b/src/polkit/polkitunixnetgroup.c
-index 8a2b369..83f8d4a 100644
---- a/src/polkit/polkitunixnetgroup.c
-+++ b/src/polkit/polkitunixnetgroup.c
-@@ -194,6 +194,9 @@ polkit_unix_netgroup_set_name (PolkitUnixNetgroup *group,
- PolkitIdentity *
- polkit_unix_netgroup_new (const gchar *name)
- {
-+#ifndef HAVE_SETNETGRENT
-+ g_assert_not_reached();
-+#endif
- g_return_val_if_fail (name != NULL, NULL);
- 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
---- a/src/polkitbackend/polkitbackendinteractiveauthority.c
-+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c
-@@ -2233,25 +2233,26 @@ get_users_in_net_group (PolkitIdentity *group,
- GList *ret;
-
- ret = NULL;
-+#ifdef HAVE_SETNETGRENT
- name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group));
-
--#ifdef HAVE_SETNETGRENT_RETURN
-+# ifdef HAVE_SETNETGRENT_RETURN
- if (setnetgrent (name) == 0)
- {
- g_warning ("Error looking up net group with name %s: %s", name, g_strerror (errno));
- goto out;
- }
--#else
-+# else
- setnetgrent (name);
--#endif
-+# endif /* HAVE_SETNETGRENT_RETURN */
-
- for (;;)
- {
--#if defined(HAVE_NETBSD) || defined(HAVE_OPENBSD)
-+# if defined(HAVE_NETBSD) || defined(HAVE_OPENBSD)
- const char *hostname, *username, *domainname;
--#else
-+# else
- char *hostname, *username, *domainname;
--#endif
-+# endif /* defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) */
- PolkitIdentity *user;
- GError *error = NULL;
-
-@@ -2282,6 +2283,7 @@ get_users_in_net_group (PolkitIdentity *group,
-
- out:
- endnetgrent ();
-+#endif /* HAVE_SETNETGRENT */
- return ret;
- }
-
-diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
-index ca17108..da95180 100644
---- a/src/polkitbackend/polkitbackendjsauthority.cpp
-+++ b/src/polkitbackend/polkitbackendjsauthority.cpp
-@@ -1520,6 +1520,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);
-@@ -1534,6 +1535,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx,
- {
- is_in_netgroup = true;
- }
-+ #endif
-
- ret = true;
-
-diff --git a/test/polkit/polkitidentitytest.c b/test/polkit/polkitidentitytest.c
-index e91967b..e829aaa 100644
---- a/test/polkit/polkitidentitytest.c
-+++ b/test/polkit/polkitidentitytest.c
-@@ -19,6 +19,7 @@
- * Author: Nikki VonHollen <vonhollen@google.com>
- */
-
-+#include "config.h"
- #include "glib.h"
- #include <polkit/polkit.h>
- #include <polkit/polkitprivate.h>
-@@ -145,11 +146,15 @@ struct ComparisonTestData comparison_test_data [] = {
- {"unix-group:root", "unix-group:jane", FALSE},
- {"unix-group:jane", "unix-group:jane", TRUE},
-
-+#ifdef HAVE_SETNETGRENT
- {"unix-netgroup:foo", "unix-netgroup:foo", TRUE},
- {"unix-netgroup:foo", "unix-netgroup:bar", FALSE},
-+#endif
-
- {"unix-user:root", "unix-group:root", FALSE},
-+#ifdef HAVE_SETNETGRENT
- {"unix-user:jane", "unix-netgroup:foo", FALSE},
-+#endif
-
- {NULL},
- };
-@@ -181,11 +186,13 @@ main (int argc, char *argv[])
- g_test_add_data_func ("/PolkitIdentity/group_string_2", "unix-group:jane", test_string);
- g_test_add_data_func ("/PolkitIdentity/group_string_3", "unix-group:users", test_string);
-
-+#ifdef HAVE_SETNETGRENT
- g_test_add_data_func ("/PolkitIdentity/netgroup_string", "unix-netgroup:foo", test_string);
-+ g_test_add_data_func ("/PolkitIdentity/netgroup_gvariant", "unix-netgroup:foo", test_gvariant);
-+#endif
-
- g_test_add_data_func ("/PolkitIdentity/user_gvariant", "unix-user:root", test_gvariant);
- g_test_add_data_func ("/PolkitIdentity/group_gvariant", "unix-group:root", test_gvariant);
-- g_test_add_data_func ("/PolkitIdentity/netgroup_gvariant", "unix-netgroup:foo", test_gvariant);
-
- add_comparison_tests ();
-
-diff --git a/test/polkit/polkitunixnetgrouptest.c b/test/polkit/polkitunixnetgrouptest.c
-index 3701ba1..e3352eb 100644
---- a/test/polkit/polkitunixnetgrouptest.c
-+++ b/test/polkit/polkitunixnetgrouptest.c
-@@ -19,6 +19,7 @@
- * Author: Nikki VonHollen <vonhollen@google.com>
- */
-
-+#include "config.h"
- #include "glib.h"
- #include <polkit/polkit.h>
- #include <string.h>
-@@ -69,7 +70,9 @@ int
- main (int argc, char *argv[])
- {
- g_test_init (&argc, &argv, NULL);
-+#ifdef HAVE_SETNETGRENT
- g_test_add_func ("/PolkitUnixNetgroup/new", test_new);
- g_test_add_func ("/PolkitUnixNetgroup/set_name", test_set_name);
-+#endif
- return g_test_run ();
- }
-diff --git a/test/polkitbackend/test-polkitbackendjsauthority.c b/test/polkitbackend/test-polkitbackendjsauthority.c
-index f97e0e0..fc52149 100644
---- a/test/polkitbackend/test-polkitbackendjsauthority.c
-+++ b/test/polkitbackend/test-polkitbackendjsauthority.c
-@@ -137,12 +137,14 @@ test_get_admin_identities (void)
- "unix-group:users"
- }
- },
-+#ifdef HAVE_SETNETGRENT
- {
- "net.company.action3",
- {
- "unix-netgroup:foo"
- }
- },
-+#endif
- };
- guint n;
-
diff --git a/community/polkit-elogind/polkit-elogind.pre-install b/community/polkit-elogind/polkit-elogind.pre-install
deleted file mode 100644
index 7c4e3eff88..0000000000
--- a/community/polkit-elogind/polkit-elogind.pre-install
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-addgroup -S polkitd 2>/dev/null
-adduser -S -D -H -h /var/empty -s /sbin/nologin -G polkitd -g polkitd polkitd 2>/dev/null
-
-exit 0
diff --git a/community/polkit-elogind/polkit.initd b/community/polkit-elogind/polkit.initd
deleted file mode 100644
index 30d2387447..0000000000
--- a/community/polkit-elogind/polkit.initd
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/sbin/openrc-run
-supervisor=supervise-daemon
-
-name="Polkit System Daemon"
-description="Provide System authentication via PolicyKit1 D-Bus service"
-
-command=/usr/lib/polkit-1/polkitd
-command_args="${POLKIT_OPTS:---no-debug}"
-
-depend() {
- need dbus
-}