aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2019-04-26 17:52:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-05-04 17:12:57 +0000
commit98957a9d69834988d1951cc70c0e76520f5801f7 (patch)
tree6fbd8eb902909f0016884124375eb22f1cf54c07
parent5484c34b960e71375884471847a5986cf996bb12 (diff)
downloadaports-98957a9d69834988d1951cc70c0e76520f5801f7.tar.gz
aports-98957a9d69834988d1951cc70c0e76520f5801f7.tar.bz2
aports-98957a9d69834988d1951cc70c0e76520f5801f7.tar.xz
main/linux-pam: add elogind to base-session
This also changes base-auth from a very minimal config to what elogind recommends, which is required for at least GNOME. Also include system-local-login and system-login files, which are required by GDM.
-rw-r--r--main/linux-pam/APKBUILD18
-rw-r--r--main/linux-pam/base-auth.pamd16
-rw-r--r--main/linux-pam/base-session.pamd1
-rw-r--r--main/linux-pam/system-local-login.pamd6
-rw-r--r--main/linux-pam/system-login.pamd21
-rw-r--r--main/polkit-elogind/APKBUILD79
-rw-r--r--main/polkit-elogind/CVE-2018-19788.patch150
-rw-r--r--main/polkit-elogind/alpine-pam.patch18
-rw-r--r--main/polkit-elogind/make-innetgr-optional.patch68
-rw-r--r--main/polkit-elogind/mozjs60-1.patch28
-rw-r--r--main/polkit-elogind/mozjs60-2.patch158
-rw-r--r--main/polkit-elogind/polkit-elogind.pre-install6
12 files changed, 50 insertions, 519 deletions
diff --git a/main/linux-pam/APKBUILD b/main/linux-pam/APKBUILD
index 262000a676..48c752a2c9 100644
--- a/main/linux-pam/APKBUILD
+++ b/main/linux-pam/APKBUILD
@@ -1,12 +1,11 @@
-# Contributor:
-# Maintainer:
+# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=linux-pam
pkgver=1.3.0
-pkgrel=0
+pkgrel=1
pkgdesc="pluggable authentication modules for linux"
url="http://www.kernel.org/pub/linux/libs/pam"
arch="all"
-license="BSD"
+license="BSD-3-Clause"
depends_dev="gettext-dev"
makedepends="$depends_dev bison flex-dev autoconf automake libtool"
options="suid !check"
@@ -22,6 +21,8 @@ source="http://linux-pam.org/library/Linux-PAM-$pkgver.tar.bz2
base-session.pamd
base-session-noninteractive.pamd
other.pamd
+ system-local-login.pamd
+ system-login.pamd
su.pamd
"
@@ -55,9 +56,6 @@ package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
- # do not install pam.d files bundled with the source, they could be broken
- rm -rf "$pkgdir"/etc/pam.d
-
# install our pam.d files
mkdir "$pkgdir"/etc/pam.d
for i in $source; do
@@ -78,10 +76,12 @@ sha512sums="4a89ca4b6f4676107aca4018f7c11addf03495266b209cb11c913f8b5d191d9a1f72
52b97e23084f7b835ce1fa441663f91a50ea797cb38ba2c6662bcdaf0d25ba487118442674ac347fb17353af126dd6b3b696612faa56cac428dd842d14e1c90d fix-compat.patch
f49edf3876cc6bcb87bbea4e7beaeb0a382d596898c755f5fbaf6c2ed4e0c8f082b2cd16dde8a74af82bb09a1334f463e07a4bb5b8a48f023ff90a67ad2fdd44 libpam-fix-build-with-eglibc-2.16.patch
bc443d2a9b1d90b81959ce6fa154042365d5e7840f8696f847a145bbaaeffcbe1e9cd2b8ba76131a7b48737929e281f4fe864582fa4fc40315f2d10c650e0cd9 musl-fix-pam_exec.patch
-0672ab21adb969af2a0082e2559f1196d8a4f8b1cff2836f97e5f24edb03b6aed156c61cf335a4df978e423dcd9934ffee8cb5784ed5dde704d7e5ddec4ba9f6 base-auth.pamd
+bb368f3f05d5a2bacee2befeaa75adfb6fcf2aecf5d6e8e01842ec499920e62ff06bdc1ca91ce970b61d628c9036ca669bff38d4874d4a235071995aa1d82a56 base-auth.pamd
85462201a4044c7e170e617d39b0eceb4790abc6c0504999117548030a16d80a9d2078d1ad97690d7d346e6374201f0c52e792ccb08ce2b1c4bbf0cc2be96f5b base-account.pamd
8223b815148c3b9b874d2c283840f6428c266e56c7cf49ce8fc508c4945ae31c837bef96dab17f64a60812d1c9cd0055cf0a50d7951d23070b69bd2e5bb9666d base-password.pamd
-b0138f662715974bd865d755c5e7d403faf5b9ad1b7e2b1d1598ad7eb5764a9ff407f1a5e6ce7f16db9fc10f8d643323b494563416fd6a654032529b52213c5b base-session.pamd
+6e262f1b1bb4cc01f43c0c3cb72136ebd976d25cb27ca35fd8a76b3dfd57e9938e359d20671f4077ad75b1d38cb944596539220a44d9b6b92cc234605a95ada1 base-session.pamd
444e20046843057b17c0aac14d2b71a68923b989b3d8b478bbf684698673683186e928e5ca2e6cb9a1c76abc4248044a0e10ef6b06b3f51857106796ecce250d base-session-noninteractive.pamd
d103ba06b2c4929171e09c845f9866539220cd20d8d56a03d25850342ef5eabe281e958dfe1eaefd550c00f9440e8700c1d74c88c3001f933134ca6fd7cb9b7b other.pamd
+83cc3d84ef5afded9afd4d347132901b9adcbd8b21be45b80d010370a2082e8388a713eb78d052944bc47b07fd7383edf18e2674d9d0545215cc45e14a2e14b1 system-local-login.pamd
+80b8b8153f7537190a5f6dc965169e5ab4b535a01024e554b14aa99ec5f6428740da54087e4c186978a3df0f9a5b62d37ae5cd35dd69a31c1d5ba71166b1f1a6 system-login.pamd
b512d691f2a6b11fc329bf91dd05ca9c589bbd444308b27d3c87c75262dedf6afc68a9739229249a4bd3d0c43cb1f871eecbb93c4fe559e0f38bdabbffd06ad7 su.pamd"
diff --git a/main/linux-pam/base-auth.pamd b/main/linux-pam/base-auth.pamd
index 012445aa3a..ea59ce9665 100644
--- a/main/linux-pam/base-auth.pamd
+++ b/main/linux-pam/base-auth.pamd
@@ -1,5 +1,15 @@
# basic PAM configuration for Alpine.
+auth required pam_env.so
+auth required pam_unix.so nullok_secure
+auth required pam_nologin.so successok
-auth required pam_env.so
-auth required pam_unix.so nullok_secure
-auth required pam_nologin.so successok
+auth sufficient pam_unix.so nullok try_first_pass
+
+account required pam_nologin.so
+account sufficient pam_unix.so
+
+password sufficient pam_unix.so nullok sha512 shadow try_first_pass try_authtok
+
+-session optional pam_loginuid.so
+-session optional pam_elogind.so
+session sufficient pam_unix.so
diff --git a/main/linux-pam/base-session.pamd b/main/linux-pam/base-session.pamd
index bf5bcb7344..3804699b26 100644
--- a/main/linux-pam/base-session.pamd
+++ b/main/linux-pam/base-session.pamd
@@ -2,3 +2,4 @@
session include base-session-noninteractive
session required pam_motd.so
+-session optional pam_elogind.so
diff --git a/main/linux-pam/system-local-login.pamd b/main/linux-pam/system-local-login.pamd
new file mode 100644
index 0000000000..347b8155b8
--- /dev/null
+++ b/main/linux-pam/system-local-login.pamd
@@ -0,0 +1,6 @@
+#%PAM-1.0
+
+auth include system-login
+account include system-login
+password include system-login
+session include system-login
diff --git a/main/linux-pam/system-login.pamd b/main/linux-pam/system-login.pamd
new file mode 100644
index 0000000000..a143189e69
--- /dev/null
+++ b/main/linux-pam/system-login.pamd
@@ -0,0 +1,21 @@
+#%PAM-1.0
+
+auth required pam_tally.so onerr=succeed file=/var/log/faillog
+auth required pam_shells.so
+auth requisite pam_nologin.so
+auth include base-auth
+
+account required pam_access.so
+account required pam_nologin.so
+account include base-auth
+
+password include base-auth
+
+session optional pam_loginuid.so
+session include base-auth
+session optional pam_motd.so motd=/etc/motd
+session optional pam_mail.so dir=/var/mail standard quiet
+-session optional pam_elogind.so
+-session optional pam_ck_connector.so nox11
+session required pam_env.so
+session required pam_lastlog.so silent
diff --git a/main/polkit-elogind/APKBUILD b/main/polkit-elogind/APKBUILD
deleted file mode 100644
index 779ea1f9f1..0000000000
--- a/main/polkit-elogind/APKBUILD
+++ /dev/null
@@ -1,79 +0,0 @@
-# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
-pkgname=polkit-elogind
-pkgver=0.115
-pkgrel=0
-pkgdesc="Application development toolkit for controlling system-wide privileges (elogind variant)"
-url="https://www.freedesktop.org/wiki/Software/polkit/"
-arch="all !armhf !armv7 !sx390" # limited by mozjs60
-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 mozjs60-dev elogind-dev linux-pam-dev"
-subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
-source="https://www.freedesktop.org/software/polkit/releases/polkit-$pkgver.tar.gz
- CVE-2018-19788.patch
- make-innetgr-optional.patch
- mozjs60-1.patch
- mozjs60-2.patch
- alpine-pam.patch
-"
-install="polkit-elogind.pre-install"
-pkgusers="polkitd"
-pkggroups="polkitd"
-provides="polkit"
-
-builddir="$srcdir/polkit-$pkgver"
-
-prepare() {
- cd "$builddir"
- default_prepare
- autoreconf -fi
-}
-
-build() {
- cd "$builddir"
- ./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() {
- cd "$builddir"
- make check
-}
-
-package() {
- cd "$builddir"
- # Set SHELL as a workaround for #10081
- make SHELL=/bin/bash DESTDIR="$pkgdir" install
-
- # Required to run the polkitd daemon as non-root
- 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
-}
-
-sha512sums="1153011fa93145b2c184e6b3446d3ca21b38918641aeccd8fac3985ac3e30ec6bc75be6973985fde90f2a24236592f1595be259155061c2d33358dd17c4ee4fc polkit-0.115.tar.gz
-5b951d7532b0ad51214cf63814cb863fe83ebc57722245cef3f5f003bba368ffd18fab03b9f23bbef8ed30972ad32f074d25491c3fe338389e02e279b4ced62c CVE-2018-19788.patch
-1e679eda2cacb25ad0d7409ab7c5811697519e46d3873a86a9ff2d8d3d3664e63c925ab13e5faf643031ea27e8e35730556121c96e06acd28c5f690848a8ce00 make-innetgr-optional.patch
-8d71494ddfc3f8d24b6c7dbab2b0440d9ab9df49d9e095c90f3802054bf858f4c81c644d1ab64872a6ea61ae70c58a181e47123a4c50bd8a339b27a23bfffaaa mozjs60-1.patch
-d7dc9fc3189a0897e8f484f7dfcee3722f75694401f7a01cac3eb1f0f6cb639081136e86e4bf467c908f77c847d4ddf310817c722fd21a73662ca6b908ce8d53 mozjs60-2.patch
-077a3e10ada918e6f9879ce50bba9145229bd92d3f13d4c6454147eb051086afbcf8d0a683a5ebe583ba00f956db011aa1afd3d9e99d7693e288737191468b8f alpine-pam.patch"
diff --git a/main/polkit-elogind/CVE-2018-19788.patch b/main/polkit-elogind/CVE-2018-19788.patch
deleted file mode 100644
index c48df46fa3..0000000000
--- a/main/polkit-elogind/CVE-2018-19788.patch
+++ /dev/null
@@ -1,150 +0,0 @@
---- a/src/polkit/polkitunixgroup.c
-+++ b/src/polkit/polkitunixgroup.c
-@@ -71,6 +71,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixGroup, polkit_unix_group, G_TYPE_OBJECT,
- 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 *klass)
- 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));
---- a/src/polkit/polkitunixprocess.c
-+++ b/src/polkit/polkitunixprocess.c
-@@ -159,9 +159,14 @@ polkit_unix_process_set_property (GObject *object,
- polkit_unix_process_set_pid (unix_process, g_value_get_int (value));
- break;
-
-- case PROP_UID:
-- polkit_unix_process_set_uid (unix_process, g_value_get_int (value));
-+ case PROP_UID: {
-+ gint val;
-+
-+ val = g_value_get_int (value);
-+ g_return_if_fail (val != -1);
-+ polkit_unix_process_set_uid (unix_process, val);
- break;
-+ }
-
- case PROP_START_TIME:
- polkit_unix_process_set_start_time (unix_process, g_value_get_uint64 (value));
-@@ -239,7 +244,7 @@ polkit_unix_process_class_init (PolkitUnixProcessClass *klass)
- g_param_spec_int ("uid",
- "User ID",
- "The UNIX user ID",
-- -1,
-+ G_MININT,
- G_MAXINT,
- -1,
- G_PARAM_CONSTRUCT |
-@@ -303,7 +308,6 @@ polkit_unix_process_set_uid (PolkitUnixProcess *process,
- gint uid)
- {
- g_return_if_fail (POLKIT_IS_UNIX_PROCESS (process));
-- g_return_if_fail (uid >= -1);
- process->uid = uid;
- }
-
---- a/src/polkit/polkitunixuser.c
-+++ b/src/polkit/polkitunixuser.c
-@@ -72,6 +72,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixUser, polkit_unix_user, G_TYPE_OBJECT,
- 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 *klass)
- 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));
diff --git a/main/polkit-elogind/alpine-pam.patch b/main/polkit-elogind/alpine-pam.patch
deleted file mode 100644
index 662e7c4d99..0000000000
--- a/main/polkit-elogind/alpine-pam.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Point /etc/pam.d/polkit-1 to the right PAM files.
-
-diff --git configure.ac configure.ac
-index 36df239..53b5573 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -470,6 +470,11 @@ elif test x$with_os_type = xfreebsd -o x$with_os_type = xnetbsd; then
- PAM_FILE_INCLUDE_ACCOUNT=system
- PAM_FILE_INCLUDE_PASSWORD=system
- PAM_FILE_INCLUDE_SESSION=system
-+elif test x$with_os_type = xalpine; then
-+ PAM_FILE_INCLUDE_AUTH=base-auth
-+ PAM_FILE_INCLUDE_ACCOUNT=base-account
-+ PAM_FILE_INCLUDE_PASSWORD=base-password
-+ PAM_FILE_INCLUDE_SESSION=base-session
- else
- PAM_FILE_INCLUDE_AUTH=system-auth
- PAM_FILE_INCLUDE_ACCOUNT=system-auth
diff --git a/main/polkit-elogind/make-innetgr-optional.patch b/main/polkit-elogind/make-innetgr-optional.patch
deleted file mode 100644
index 338c201745..0000000000
--- a/main/polkit-elogind/make-innetgr-optional.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -99,7 +99,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 getnetgrent)
-
- if test "x$GCC" = "xyes"; then
- LDFLAGS="-Wl,--as-needed $LDFLAGS"
---- a/src/polkitbackend/polkitbackendinteractiveauthority.c
-+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c
-@@ -2228,6 +2228,7 @@ get_users_in_net_group (PolkitIdentity *group,
- ret = NULL;
- name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group));
-
-+#if defined HAVE_GETNETGRENT
- #ifdef HAVE_SETNETGRENT_RETURN
- if (setnetgrent (name) == 0)
- {
-@@ -2236,6 +2237,7 @@ get_users_in_net_group (PolkitIdentity *group,
- }
- #else
- setnetgrent (name);
-+#endif
- #endif
-
- for (;;)
-@@ -2248,8 +2250,10 @@ get_users_in_net_group (PolkitIdentity *group,
- PolkitIdentity *user;
- GError *error = NULL;
-
-+#if defined HAVE_GETNETGRENT
- if (getnetgrent (&hostname, &username, &domainname) == 0)
- break;
-+#endif
-
- /* Skip NULL entries since we never want to make everyone an admin
- * Skip "-" entries which mean "no match ever" in netgroup land */
-@@ -2274,7 +2278,9 @@ get_users_in_net_group (PolkitIdentity *group,
- ret = g_list_reverse (ret);
-
- out:
-+#if defined HAVE_GETNETGRENT
- endnetgrent ();
-+#endif
- return ret;
- }
-
---- a/src/polkitbackend/polkitbackendjsauthority.cpp
-+++ b/src/polkitbackend/polkitbackendjsauthority.cpp
-@@ -1499,6 +1499,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx,
-
- JS::CallArgs args = JS::CallArgsFromVp (argc, vp);
-
-+#if defined HAVE_GETNETGRENT
- user = JS_EncodeString (cx, args[0].toString());
- netgroup = JS_EncodeString (cx, args[1].toString());
-
-@@ -1514,6 +1515,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx,
- JS_free (cx, user);
-
- ret = true;
-+#endif
-
- args.rval ().setBoolean (is_in_netgroup);
-
diff --git a/main/polkit-elogind/mozjs60-1.patch b/main/polkit-elogind/mozjs60-1.patch
deleted file mode 100644
index d76a3350b3..0000000000
--- a/main/polkit-elogind/mozjs60-1.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream: yes
-From c9cd7024140b837b5693d7c1bbaad1b0cd31cce6 Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Fri, 31 Aug 2018 13:32:16 +0100
-Subject: Depend on mozjs-60
-
-This is the new ESR version of the Mozilla JS engine, superceding
-mozjs-52.
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 5c37e48..5cedb4e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -79,7 +79,7 @@ PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-unix-2.0 >= 2.30.0])
- AC_SUBST(GLIB_CFLAGS)
- AC_SUBST(GLIB_LIBS)
-
--PKG_CHECK_MODULES(LIBJS, [mozjs-52])
-+PKG_CHECK_MODULES(LIBJS, [mozjs-60])
-
- AC_SUBST(LIBJS_CFLAGS)
- AC_SUBST(LIBJS_CXXFLAGS)
---
-cgit v1.1
-
diff --git a/main/polkit-elogind/mozjs60-2.patch b/main/polkit-elogind/mozjs60-2.patch
deleted file mode 100644
index 22369bc985..0000000000
--- a/main/polkit-elogind/mozjs60-2.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-Upstream: yes
-From dd00683e8781d230a45781d509d86ad676138564 Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Fri, 31 Aug 2018 13:33:20 +0100
-Subject: Port the JS authority to mozjs-60
-
-API changes in mozjs that need to be reflected in the JS authority:
-
- - the JS::CompileOptions constructor and the JS::CompartmentOptions
- do not allow setting a JS version any more
-
- - do not use NULL comparisons for C++ objects
-
- - the resize() method for a vector has a return value that needs
- to be handled
-
- - JSClassOps has different fields
----
- src/polkitbackend/polkitbackendjsauthority.cpp | 65 +++++++++++++-------------
- 1 file changed, 32 insertions(+), 33 deletions(-)
-
-diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
-index 7602714..984a0f0 100644
---- a/src/polkitbackend/polkitbackendjsauthority.cpp
-+++ b/src/polkitbackend/polkitbackendjsauthority.cpp
-@@ -150,18 +150,17 @@ G_DEFINE_TYPE (PolkitBackendJsAuthority, polkit_backend_js_authority, POLKIT_BAC
- /* ---------------------------------------------------------------------------------------------------- */
-
- static const struct JSClassOps js_global_class_ops = {
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL
-+ nullptr, // addProperty
-+ nullptr, // deleteProperty
-+ nullptr, // enumerate
-+ nullptr, // newEnumerate
-+ nullptr, // resolve
-+ nullptr, // mayResolve
-+ nullptr, // finalize
-+ nullptr, // call
-+ nullptr, // hasInstance
-+ nullptr, // construct
-+ JS_GlobalObjectTraceHook
- };
-
- static JSClass js_global_class = {
-@@ -172,18 +171,17 @@ static JSClass js_global_class = {
-
- /* ---------------------------------------------------------------------------------------------------- */
- static const struct JSClassOps js_polkit_class_ops = {
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL,
-- NULL
-+ nullptr, // addProperty
-+ nullptr, // deleteProperty
-+ nullptr, // enumerate
-+ nullptr, // newEnumerate
-+ nullptr, // resolve
-+ nullptr, // mayResolve
-+ nullptr, // finalize
-+ nullptr, // call
-+ nullptr, // hasInstance
-+ nullptr, // construct
-+ nullptr // trace
- };
-
- static JSClass js_polkit_class = {
-@@ -469,19 +467,18 @@ polkit_backend_js_authority_constructed (GObject *object)
-
- {
- JS::CompartmentOptions compart_opts;
-- compart_opts.behaviors().setVersion(JSVERSION_LATEST);
-+
- JS::RootedObject global(authority->priv->cx);
-
- authority->priv->js_global = new JS::Heap<JSObject*> (JS_NewGlobalObject (authority->priv->cx, &js_global_class, NULL, JS::FireOnNewGlobalHook, compart_opts));
-
- global = authority->priv->js_global->get ();
--
-- if (global == NULL)
-+ if (!global)
- goto fail;
-
- authority->priv->ac = new JSAutoCompartment(authority->priv->cx, global);
-
-- if (authority->priv->ac == NULL)
-+ if (!authority->priv->ac)
- goto fail;
-
- if (!JS_InitStandardClasses (authority->priv->cx, global))
-@@ -493,7 +490,7 @@ polkit_backend_js_authority_constructed (GObject *object)
-
- polkit = authority->priv->js_polkit->get ();
-
-- if (polkit == NULL)
-+ if (!polkit)
- goto fail;
-
- if (!JS_DefineProperty(authority->priv->cx, global, "polkit", polkit, JSPROP_ENUMERATE))
-@@ -504,7 +501,7 @@ polkit_backend_js_authority_constructed (GObject *object)
- js_polkit_functions))
- goto fail;
-
-- JS::CompileOptions options(authority->priv->cx, JSVERSION_UNKNOWN);
-+ JS::CompileOptions options(authority->priv->cx);
- JS::RootedValue rval(authority->priv->cx);
- if (!JS::Evaluate (authority->priv->cx,
- options,
-@@ -684,7 +681,9 @@ set_property_strv (PolkitBackendJsAuthority *authority,
- JS::AutoValueVector elems(authority->priv->cx);
- guint n;
-
-- elems.resize(value->len);
-+ if (!elems.resize(value->len))
-+ g_error ("Unable to resize vector");
-+
- for (n = 0; n < value->len; n++)
- {
- const char *c_string = (const char *) g_ptr_array_index(value, n);
-@@ -741,7 +740,7 @@ subject_to_jsval (PolkitBackendJsAuthority *authority,
- GError **error)
- {
- gboolean ret = FALSE;
-- JS::CompileOptions options(authority->priv->cx, JSVERSION_UNKNOWN);
-+ JS::CompileOptions options(authority->priv->cx);
- const char *src;
- JS::RootedObject obj(authority->priv->cx);
- pid_t pid;
-@@ -868,7 +867,7 @@ action_and_details_to_jsval (PolkitBackendJsAuthority *authority,
- GError **error)
- {
- gboolean ret = FALSE;
-- JS::CompileOptions options(authority->priv->cx, JSVERSION_UNKNOWN);
-+ JS::CompileOptions options(authority->priv->cx);
- const char *src;
- JS::RootedObject obj(authority->priv->cx);
- gchar **keys;
---
-cgit v1.1
-
diff --git a/main/polkit-elogind/polkit-elogind.pre-install b/main/polkit-elogind/polkit-elogind.pre-install
deleted file mode 100644
index 7c4e3eff88..0000000000
--- a/main/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