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: jperkin
Date: Mon May 14 09:30:35 UTC 2018
Modified Files:
pkgsrc/security/polkit: distinfo
Added Files:
pkgsrc/security/polkit/patches: patch-src_polkit_polkitunixprocess.c
patch-src_polkitbackend_polkitbackendjsauthority.cpp
Log Message:
polkit: Fix build on SunOS.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/security/polkit/distinfo
cvs rdiff -u -r0 -r1.4 \
pkgsrc/security/polkit/patches/patch-src_polkit_polkitunixprocess.c
cvs rdiff -u -r0 -r1.1 \
pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendjsauthority.cpp
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.5 pkgsrc/security/polkit/distinfo:1.6
--- pkgsrc/security/polkit/distinfo:1.5 Sun Apr 29 05:14:36 2018
+++ pkgsrc/security/polkit/distinfo Mon May 14 09:30:35 2018
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.5 2018/04/29 05:14:36 wiz Exp $
+$NetBSD: distinfo,v 1.6 2018/05/14 09:30:35 jperkin Exp $
SHA1 (polkit-0.114.tar.gz) = f29deef0076e76588f209a028a3e33ef70c2d9cd
RMD160 (polkit-0.114.tar.gz) = 000749a5f902b9be347f462d486bed20f8bbe8d5
SHA512 (polkit-0.114.tar.gz) = 49cdf9dd3663714b1c6569ad8740cb413d9c5bd5c11e4bdbba3ce82b744f36638b652547edff9203caab9287834bc68a1d6a4895ec7a188fa1524dc1e9c9b4ea
Size (polkit-0.114.tar.gz) = 1557340 bytes
+SHA1 (patch-src_polkit_polkitunixprocess.c) = 8a709f90dca2143765e4a3388dc736bc72292add
SHA1 (patch-src_polkitbackend_polkitbackendinteractiveauthority.c) = dd91b4e74e6c39f24e0f5a9b3150fdac12899cb5
+SHA1 (patch-src_polkitbackend_polkitbackendjsauthority.cpp) = 43e8ec118601e978435d66ba805c35bc3db24b17
SHA1 (patch-src_polkitbackend_polkitd.c) = b8e11b40e2b171d4f030eb4c4cbc6fdc7a96b2c2
SHA1 (patch-src_programs_pkexec.c) = bfc0414c7a943c8e8b8412566a2519198eab8abd
SHA1 (patch-src_programs_pkttyagent.c) = 4dbffd02c7e66910d4104a75d6f5f437bd51acc9
Added files:
Index: pkgsrc/security/polkit/patches/patch-src_polkit_polkitunixprocess.c
diff -u /dev/null pkgsrc/security/polkit/patches/patch-src_polkit_polkitunixprocess.c:1.4
--- /dev/null Mon May 14 09:30:35 2018
+++ pkgsrc/security/polkit/patches/patch-src_polkit_polkitunixprocess.c Mon May 14 09:30:35 2018
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_polkit_polkitunixprocess.c,v 1.4 2018/05/14 09:30:35 jperkin Exp $
+
+Fix SunOS includes.
+
+--- src/polkit/polkitunixprocess.c.orig 2018-03-23 15:09:30.000000000 +0000
++++ src/polkit/polkitunixprocess.c
+@@ -24,6 +24,11 @@
+ #endif
+
+ #include <sys/types.h>
++#ifdef HAVE_SOLARIS
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <procfs.h>
++#endif
+ #ifdef HAVE_FREEBSD
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
Index: pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendjsauthority.cpp
diff -u /dev/null pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendjsauthority.cpp:1.1
--- /dev/null Mon May 14 09:30:35 2018
+++ pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendjsauthority.cpp Mon May 14 09:30:35 2018
@@ -0,0 +1,54 @@
+$NetBSD: patch-src_polkitbackend_polkitbackendjsauthority.cpp,v 1.1 2018/05/14 09:30:35 jperkin Exp $
+
+Provide getgrouplist for SunOS. This is available in newer Solaris,
+so if that becomes a problem we'll need to add a configure test.
+
+--- src/polkitbackend/polkitbackendjsauthority.cpp.orig 2018-04-03 18:16:49.000000000 +0000
++++ src/polkitbackend/polkitbackendjsauthority.cpp
+@@ -55,6 +55,46 @@
+ #error "This code is not safe in SpiderMonkey exact stack rooting configurations"
+ #endif
+
++#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
++
+ /**
+ * SECTION:polkitbackendjsauthority
+ * @title: PolkitBackendJsAuthority
Home |
Main Index |
Thread Index |
Old Index