pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/security/polkit



Module Name:    pkgsrc
Committed By:   nia
Date:           Mon Jul  5 13:22:39 UTC 2021

Modified Files:
        pkgsrc/security/polkit: distinfo
        pkgsrc/security/polkit/patches:
            patch-src_polkitbackend_polkitbackendduktapeauthority.c

Log Message:
polkit: Include a replacement getgrouplist for SunOS in the duktape backend

Should hopefully fix the SunOS builds.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/security/polkit/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendduktapeauthority.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/polkit/distinfo
diff -u pkgsrc/security/polkit/distinfo:1.13 pkgsrc/security/polkit/distinfo:1.14
--- pkgsrc/security/polkit/distinfo:1.13        Mon Jun 28 12:38:46 2021
+++ pkgsrc/security/polkit/distinfo     Mon Jul  5 13:22:39 2021
@@ -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-meson__options.txt) = cb8d92
 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

Index: pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendduktapeauthority.c
diff -u pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendduktapeauthority.c:1.1 pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendduktapeauthority.c:1.2
--- pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendduktapeauthority.c:1.1  Mon Jun 28 12:38:46 2021
+++ pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendduktapeauthority.c      Mon Jul  5 13:22:39 2021
@@ -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 @@ https://gitlab.freedesktop.org/polkit/po
 +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