pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/polkit polkit: Include a replacement getgroup...
details: https://anonhg.NetBSD.org/pkgsrc/rev/926a296ff9b3
branches: trunk
changeset: 455497:926a296ff9b3
user: nia <nia%pkgsrc.org@localhost>
date: Mon Jul 05 13:22:39 2021 +0000
description:
polkit: Include a replacement getgrouplist for SunOS in the duktape backend
Should hopefully fix the SunOS builds.
diffstat:
security/polkit/distinfo | 4 +-
security/polkit/patches/patch-src_polkitbackend_polkitbackendduktapeauthority.c | 46 +++++++++-
2 files changed, 45 insertions(+), 5 deletions(-)
diffs (83 lines):
diff -r d38ec24e6b94 -r 926a296ff9b3 security/polkit/distinfo
--- a/security/polkit/distinfo Mon Jul 05 13:21:11 2021 +0000
+++ b/security/polkit/distinfo Mon Jul 05 13:22:39 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2021/06/28 12:38:46 nia Exp $
+$NetBSD: distinfo,v 1.14 2021/07/05 13:22:39 nia Exp $
SHA1 (polkit-0.119.tar.gz) = 0794825e31a0a6e4859f93596d3f475b9d08f9e1
RMD160 (polkit-0.119.tar.gz) = 52d66bd2b80e3a1ca52495fd09e307adbd2360a0
@@ -10,7 +10,7 @@
SHA1 (patch-src_polkit_polkitunixprocess.c) = 88818b7b64502f64eade34ad379c07f2b0fd1aea
SHA1 (patch-src_polkitbackend_Makefile.am) = 3e821914e54ce5d3dc31275cd05d5266a3edc9ba
SHA1 (patch-src_polkitbackend_meson.build) = 8f4788a5080902eaae949d1c026046d6a3321259
-SHA1 (patch-src_polkitbackend_polkitbackendduktapeauthority.c) = 33cc276888d48422b8239bee5532a9811cca9d21
+SHA1 (patch-src_polkitbackend_polkitbackendduktapeauthority.c) = a80ba55ecd4726f28c02bd0add0a454b7597519a
SHA1 (patch-src_polkitbackend_polkitbackendinteractiveauthority.c) = dd91b4e74e6c39f24e0f5a9b3150fdac12899cb5
SHA1 (patch-src_polkitbackend_polkitbackendjsauthority.cpp) = 432a3d7d082ba6e596ba164d91408fc521b84422
SHA1 (patch-src_polkitbackend_polkitd.c) = b8e11b40e2b171d4f030eb4c4cbc6fdc7a96b2c2
diff -r d38ec24e6b94 -r 926a296ff9b3 security/polkit/patches/patch-src_polkitbackend_polkitbackendduktapeauthority.c
--- a/security/polkit/patches/patch-src_polkitbackend_polkitbackendduktapeauthority.c Mon Jul 05 13:21:11 2021 +0000
+++ b/security/polkit/patches/patch-src_polkitbackend_polkitbackendduktapeauthority.c Mon Jul 05 13:22:39 2021 +0000
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_polkitbackend_polkitbackendduktapeauthority.c,v 1.1 2021/06/28 12:38:46 nia Exp $
+$NetBSD: patch-src_polkitbackend_polkitbackendduktapeauthority.c,v 1.2 2021/07/05 13:22:39 nia Exp $
Add duktape as javascript engine.
https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/35
---- src/polkitbackend/polkitbackendduktapeauthority.c.orig 2021-06-28 12:18:53.849178838 +0000
+--- src/polkitbackend/polkitbackendduktapeauthority.c.orig 2021-07-05 13:20:22.211263229 +0000
+++ src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -0,0 +1,1428 @@
+@@ -0,0 +1,1468 @@
+/*
+ * Copyright (C) 2008-2012 Red Hat, Inc.
+ * Copyright (C) 2015 Tangent Space <jstpierre%mecheye.net@localhost>
@@ -136,6 +136,46 @@
+static duk_ret_t js_polkit_spawn (duk_context *cx);
+static duk_ret_t js_polkit_user_is_in_netgroup (duk_context *cx);
+
++#ifdef __sun
++int
++getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt)
++{
++ const struct group *grp;
++ int i, maxgroups, ngroups, ret;
++
++ ret = 0;
++ ngroups = 0;
++ maxgroups = *grpcnt;
++ groups ? groups[ngroups++] = agroup : ngroups++;
++ if (maxgroups > 1)
++ groups ? groups[ngroups++] = agroup : ngroups++;
++ setgrent();
++ while ((grp = getgrent()) != NULL) {
++ if (groups) {
++ for (i = 0; i < ngroups; i++) {
++ if (grp->gr_gid == groups[i])
++ goto skip;
++ }
++ }
++ for (i = 0; grp->gr_mem[i]; i++) {
++ if (!strcmp(grp->gr_mem[i], uname)) {
++ if (ngroups >= maxgroups) {
++ ret = -1;
++ break;
++ }
++ groups ? groups[ngroups++] = grp->gr_gid : ngroups++;
++ break;
++ }
++ }
++skip:
++ ;
++ }
++ endgrent();
++ *grpcnt = ngroups;
++ return (ret);
++}
++#endif
++
+static const duk_function_list_entry js_polkit_functions[] =
+{
+ { "log", js_polkit_log, 1 },
Home |
Main Index |
Thread Index |
Old Index