pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Delete polkit, imported in pkgsrc.
Module Name: pkgsrc-wip
Committed By: youri <youri%NetBSD.org@localhost>
Pushed By: youri
Date: Fri May 20 20:41:38 2016 +0200
Changeset: 61b13f37f8fb8a26abdbc4ba68129edab035ff24
Removed Files:
polkit/DESCR
polkit/Makefile
polkit/PLIST
polkit/buildlink3.mk
polkit/distinfo
polkit/options.mk
polkit/patches/patch-src_polkit_polkitunixprocess.c
polkit/patches/patch-src_polkitbackend_polkitbackendinteractiveauthority.c
polkit/patches/patch-src_polkitbackend_polkitbackendjsauthority.c
polkit/patches/patch-src_polkitbackend_polkitd.c
polkit/patches/patch-src_programs_pkexec.c
polkit/patches/patch-src_programs_pkttyagent.c
polkit/patches/patch-test_mocklib_src_netdb.c
polkit/patches/patch-test_mocklibc_src_grp.c
polkit/patches/patch-test_mocklibc_src_pwd.c
Log Message:
Delete polkit, imported in pkgsrc.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=61b13f37f8fb8a26abdbc4ba68129edab035ff24
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
polkit/DESCR | 3 -
polkit/Makefile | 69 -------
polkit/PLIST | 58 ------
polkit/buildlink3.mk | 17 --
polkit/distinfo | 15 --
polkit/options.mk | 35 ----
.../patches/patch-src_polkit_polkitunixprocess.c | 215 ---------------------
...lkitbackend_polkitbackendinteractiveauthority.c | 28 ---
...ch-src_polkitbackend_polkitbackendjsauthority.c | 107 ----------
polkit/patches/patch-src_polkitbackend_polkitd.c | 68 -------
polkit/patches/patch-src_programs_pkexec.c | 24 ---
polkit/patches/patch-src_programs_pkttyagent.c | 23 ---
polkit/patches/patch-test_mocklib_src_netdb.c | 30 ---
polkit/patches/patch-test_mocklibc_src_grp.c | 19 --
polkit/patches/patch-test_mocklibc_src_pwd.c | 19 --
15 files changed, 730 deletions(-)
diffs:
diff --git a/polkit/DESCR b/polkit/DESCR
deleted file mode 100644
index 1fd906b..0000000
--- a/polkit/DESCR
+++ /dev/null
@@ -1,3 +0,0 @@
-PolicyKit is a toolkit for defining and handling authorizations. It
-is used for allowing unprivileged processes to speak to privileged
-processes.
diff --git a/polkit/Makefile b/polkit/Makefile
deleted file mode 100644
index 467d076..0000000
--- a/polkit/Makefile
+++ /dev/null
@@ -1,69 +0,0 @@
-# $NetBSD: Makefile,v 1.10 2015/05/20 11:22:11 krytarowski Exp $
-#
-
-DISTNAME= polkit-0.113
-PKGREVISION= 1
-CATEGORIES= security
-MASTER_SITES= http://www.freedesktop.org/software/polkit/releases/
-
-MAINTAINER= pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE= http://www.freedesktop.org/wiki/Software/polkit
-COMMENT= Authorization Manager
-LICENSE= gnu-lgpl-v2
-
-BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
-BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl
-
-GNU_CONFIGURE= yes
-USE_LIBTOOL= yes
-USE_PKGLOCALEDIR= yes
-USE_TOOLS+= pkg-config intltool gmake msgfmt perl
-
-PKGCONFIG_OVERRIDE+= data/polkit-gobject-1.pc.in
-PKGCONFIG_OVERRIDE+= data/polkit-agent-1.pc.in
-
-CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+= --with-polkitd-user=${POLKITD_USER}
-
-.include "../../mk/bsd.prefs.mk"
-
-POLKITD_USER?= polkitd
-POLKITD_GROUP?= polkitd
-PKG_GROUPS+= ${POLKITD_GROUP}
-PKG_USERS+= ${POLKITD_USER}:${POLKITD_GROUP}
-PKG_GECOS.${POLKITD_USER}= Polkit Daemon User
-PKG_HOME.${POLKITD_USER}= ${VARBASE}
-PKG_GROUPS_VARS+= POLKITD_GROUP
-PKG_USERS_VARS+= POLKITD_USER
-
-REPLACE_PERL+= src/polkitbackend/toarray.pl
-
-INSTALL_MAKE_FLAGS+= sysconfdir=${PREFIX}/share/examples/polkit
-INSTALL_MAKE_FLAGS+= pamdir=${PREFIX}/share/examples/pam.d
-
-OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/polkit-1/rules.d \
- ${POLKITD_USER} ${POLKITD_GROUP} 700
-OWN_DIRS_PERMS+= ${PREFIX}/share/polkit-1/rules.d \
- ${POLKITD_USER} ${POLKITD_GROUP} 700
-SPECIAL_PERMS+= lib/polkit-1/polkit-agent-helper-1 ${SETUID_ROOT_PERMS}
-SPECIAL_PERMS+= bin/pkexec ${SETUID_ROOT_PERMS}
-
-CONF_FILES+= ${PREFIX}/share/examples/polkit/dbus-1/system.d/org.freedesktop.PolicyKit1.conf \
- ${PKG_SYSCONFDIR}/dbus-1/system.d/org.freedesktop.PolicyKit1.conf
-CONF_FILES+= ${PREFIX}/share/examples/polkit/polkit-1/rules.d/50-default.rules \
- ${PKG_SYSCONFDIR}/polkit-1/rules.d/50-default.rules
-
-.include "options.mk"
-
-SUBST_CLASSES+= paths
-SUBST_STAGE.paths= pre-configure
-SUBST_FILES.paths+= docs/man/pkexec.xml
-SUBST_FILES.paths+= src/examples/org.freedesktop.policykit.examples.pkexec.policy.in
-SUBST_SED.paths+= -e 's,/usr/bin/,${PREFIX}/bin/,g'
-
-.include "../../wip/spidermonkey17/buildlink3.mk"
-#.include "../../lang/spidermonkey/buildlink3.mk"
-.include "../../devel/gettext-lib/buildlink3.mk"
-.include "../../devel/glib2/buildlink3.mk"
-.include "../../textproc/expat/buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/polkit/PLIST b/polkit/PLIST
deleted file mode 100644
index 436ff2a..0000000
--- a/polkit/PLIST
+++ /dev/null
@@ -1,58 +0,0 @@
-@comment $NetBSD$
-bin/pk-example-frobnicate
-bin/pkaction
-bin/pkcheck
-bin/pkexec
-bin/pkttyagent
-include/polkit-1/polkit/polkit.h
-include/polkit-1/polkit/polkitactiondescription.h
-include/polkit-1/polkit/polkitauthority.h
-include/polkit-1/polkit/polkitauthorityfeatures.h
-include/polkit-1/polkit/polkitauthorizationresult.h
-include/polkit-1/polkit/polkitcheckauthorizationflags.h
-include/polkit-1/polkit/polkitdetails.h
-include/polkit-1/polkit/polkitenumtypes.h
-include/polkit-1/polkit/polkiterror.h
-include/polkit-1/polkit/polkitidentity.h
-include/polkit-1/polkit/polkitimplicitauthorization.h
-include/polkit-1/polkit/polkitpermission.h
-include/polkit-1/polkit/polkitprivate.h
-include/polkit-1/polkit/polkitsubject.h
-include/polkit-1/polkit/polkitsystembusname.h
-include/polkit-1/polkit/polkittemporaryauthorization.h
-include/polkit-1/polkit/polkittypes.h
-include/polkit-1/polkit/polkitunixgroup.h
-include/polkit-1/polkit/polkitunixnetgroup.h
-include/polkit-1/polkit/polkitunixprocess.h
-include/polkit-1/polkit/polkitunixsession.h
-include/polkit-1/polkit/polkitunixuser.h
-include/polkit-1/polkitagent/polkitagent.h
-include/polkit-1/polkitagent/polkitagentenumtypes.h
-include/polkit-1/polkitagent/polkitagentlistener.h
-include/polkit-1/polkitagent/polkitagentsession.h
-include/polkit-1/polkitagent/polkitagenttextlistener.h
-include/polkit-1/polkitagent/polkitagenttypes.h
-${PLIST.introspection}lib/girepository-1.0/Polkit-1.0.typelib
-${PLIST.introspection}lib/girepository-1.0/PolkitAgent-1.0.typelib
-lib/libpolkit-agent-1.la
-lib/libpolkit-gobject-1.la
-lib/pkgconfig/polkit-agent-1.pc
-lib/pkgconfig/polkit-gobject-1.pc
-lib/polkit-1/polkit-agent-helper-1
-lib/polkit-1/polkitd
-man/man1/pkaction.1
-man/man1/pkcheck.1
-man/man1/pkexec.1
-man/man1/pkttyagent.1
-man/man8/polkit.8
-man/man8/polkitd.8
-share/dbus-1/system-services/org.freedesktop.PolicyKit1.service
-${PLIST.pam}share/examples/pam.d/polkit-1
-share/examples/polkit/dbus-1/system.d/org.freedesktop.PolicyKit1.conf
-share/examples/polkit/polkit-1/rules.d/50-default.rules
-${PLIST.introspection}share/gir-1.0/Polkit-1.0.gir
-${PLIST.introspection}share/gir-1.0/PolkitAgent-1.0.gir
-share/locale/cs/LC_MESSAGES/polkit-1.mo
-share/locale/da/LC_MESSAGES/polkit-1.mo
-share/polkit-1/actions/org.freedesktop.policykit.examples.pkexec.policy
-share/polkit-1/actions/org.freedesktop.policykit.policy
diff --git a/polkit/buildlink3.mk b/polkit/buildlink3.mk
deleted file mode 100644
index 2536ce4..0000000
--- a/polkit/buildlink3.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# $NetBSD: buildlink3.mk,v 1.3 2015/04/02 14:55:36 bsiegert Exp $
-#
-
-BUILDLINK_TREE+= polkit
-
-.if !defined(POLKIT_BUILDLINK3_MK)
-POLKIT_BUILDLINK3_MK:=
-
-BUILDLINK_API_DEPENDS.polkit+= polkit>=0.103
-BUILDLINK_PKGSRCDIR.polkit?= ../../wip/polkit
-
-#.include "../../devel/gettext-lib/buildlink3.mk"
-.include "../../devel/glib2/buildlink3.mk"
-#.include "../../textproc/expat/buildlink3.mk"
-.endif # POLKIT_BUILDLINK3_MK
-
-BUILDLINK_TREE+= -polkit
diff --git a/polkit/distinfo b/polkit/distinfo
deleted file mode 100644
index 389e540..0000000
--- a/polkit/distinfo
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: distinfo,v 1.4 2015/04/02 14:55:36 bsiegert Exp $
-
-SHA1 (polkit-0.113.tar.gz) = ef855c2d04184dceb38e0940dc7bec9cc3da415c
-RMD160 (polkit-0.113.tar.gz) = 661b0a678f7c770c213404db3af604935fdb25bc
-SHA512 (polkit-0.113.tar.gz) = ab177c89a20eeb2978ddbe28afb205d3619f9c5defe833eb68a85e71a0f2c905367f1295cbbfb85da5eafdd661bce474d5d84aca9195cd425a18c9b4170eb5f9
-Size (polkit-0.113.tar.gz) = 1448865 bytes
-SHA1 (patch-src_polkit_polkitunixprocess.c) = 214541bcb012892b4fc2416897424bce8ed95518
-SHA1 (patch-src_polkitbackend_polkitbackendinteractiveauthority.c) = d8b7cbcd0db26969bc4b83c32a731ae920c2e87b
-SHA1 (patch-src_polkitbackend_polkitbackendjsauthority.c) = 88ed2d42208743db4013399e9ece4cf24a3eaf62
-SHA1 (patch-src_polkitbackend_polkitd.c) = a567b31131f63f92f8e2967c3aabfa7f3d41f627
-SHA1 (patch-src_programs_pkexec.c) = 2c1191d5e5246b62d7bfac144ad2f23eb122efec
-SHA1 (patch-src_programs_pkttyagent.c) = 72a1c3750e6b496b981eb5479201946da80b6d15
-SHA1 (patch-test_mocklib_src_netdb.c) = 7d378cd31577c63a336bad4714ac30f87b892e6f
-SHA1 (patch-test_mocklibc_src_grp.c) = 1ad61ca043e0586ded84c3157d0271a1e3af2b9e
-SHA1 (patch-test_mocklibc_src_pwd.c) = 8f2b35cb90f96a115f7621a8751b9e64cba0a106
diff --git a/polkit/options.mk b/polkit/options.mk
deleted file mode 100644
index 9f8046b..0000000
--- a/polkit/options.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-# $NetBSD: options.mk,v 1.5 2015/04/02 14:55:36 bsiegert Exp $
-
-PKG_OPTIONS_VAR= PKG_OPTIONS.polkit
-PKG_SUPPORTED_OPTIONS= introspection pam
-PKG_SUGGESTED_OPTIONS= introspection pam
-
-.include "../../mk/bsd.options.mk"
-
-PLIST_VARS+= introspection pam
-
-.if !empty(PKG_OPTIONS:Mintrospection)
-BUILDLINK_DEPMETHOD.gobject-introspection+= build
-.include "../../devel/gobject-introspection/buildlink3.mk"
-CONFIGURE_ARGS+= --enable-introspection
-PLIST.introspection= yes
-.else
-CONFIGURE_ARGS+= --disable-introspection
-.endif
-
-.if !empty(PKG_OPTIONS:Mpam)
-.include "../../mk/pam.buildlink3.mk"
-CONFIGURE_ARGS+= --with-authfw=pam
-CONFIGURE_ARGS+= --with-pam-module-dir=${PREFIX}/lib/security
-PLIST.pam= yes
-.include "../../mk/bsd.prefs.mk"
-. if ${OPSYS} == "NetBSD"
-CONFIGURE_ARGS+= --with-pam-include=system
-. endif
-MAKE_DIRS+= /etc/pam.d
-CONF_FILES+= ${PREFIX}/share/examples/pam.d/polkit-1 \
- /etc/pam.d/polkit-1
-.else
-CONFIGURE_ARGS+= --with-authfw=shadow
-CONFIGURE_ARGS+= --disable-pam-module
-.endif
diff --git a/polkit/patches/patch-src_polkit_polkitunixprocess.c b/polkit/patches/patch-src_polkit_polkitunixprocess.c
deleted file mode 100644
index 6c52bb6..0000000
--- a/polkit/patches/patch-src_polkit_polkitunixprocess.c
+++ /dev/null
@@ -1,215 +0,0 @@
-$NetBSD: patch-src_polkit_polkitunixprocess.c,v 1.3 2015/04/02 14:55:36 bsiegert Exp $
-
-* NetBSD support
-* SunOS support
-
---- src/polkit/polkitunixprocess.c.orig 2014-01-14 22:42:25.000000000 +0000
-+++ src/polkit/polkitunixprocess.c
-@@ -29,10 +29,19 @@
- #include <sys/sysctl.h>
- #include <sys/user.h>
- #endif
-+#ifdef __NetBSD__
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#endif
- #include <stdlib.h>
- #include <string.h>
- #include <errno.h>
- #include <stdio.h>
-+#include <fcntl.h>
-+
-+#ifdef HAVE_SOLARIS
-+#include <procfs.h>
-+#endif
-
- #include "polkitunixprocess.h"
- #include "polkitsubject.h"
-@@ -80,7 +89,7 @@ enum
-
- static void subject_iface_init (PolkitSubjectIface *subject_iface);
-
--static guint64 get_start_time_for_pid (gint pid,
-+static guint64 get_start_time_for_pid (pid_t pid,
- GError **error);
-
- static gint _polkit_unix_process_get_owner (PolkitUnixProcess *process,
-@@ -89,6 +98,9 @@ static gint _polkit_unix_process_get_own
- #ifdef HAVE_FREEBSD
- static gboolean get_kinfo_proc (gint pid, struct kinfo_proc *p);
- #endif
-+#if defined(__NetBSD__)
-+static gboolean get_kinfo_proc (gint pid, struct kinfo_proc2 *p);
-+#endif
-
- G_DEFINE_TYPE_WITH_CODE (PolkitUnixProcess, polkit_unix_process, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (POLKIT_TYPE_SUBJECT, subject_iface_init)
-@@ -514,17 +526,17 @@ subject_iface_init (PolkitSubjectIface *
-
- #ifdef HAVE_SOLARIS
- static int
--get_pid_psinfo (pid_t pid, struct psinfo *ps)
-+get_pid_psinfo (pid_t pid, psinfo_t *ps)
- {
- char pname[32];
- int procfd;
-
-- (void) snprintf(pname, sizeof(pname), "/proc/%d/psinfo", pid);
-+ (void) snprintf(pname, sizeof(pname), "/proc/%lu/psinfo", pid);
- if ((procfd = open(pname, O_RDONLY)) == -1)
- {
- return -1;
- }
-- if (read(procfd, ps, sizeof(struct psinfo)) < 0)
-+ if (read(procfd, ps, sizeof(psinfo_t)) < 0)
- {
- (void) close(procfd);
- return -1;
-@@ -554,12 +566,38 @@ get_kinfo_proc (pid_t pid, struct kinfo_
- }
- #endif
-
-+#ifdef __NetBSD__
-+static gboolean
-+get_kinfo_proc (pid_t pid, struct kinfo_proc2 *p)
-+{
-+ int name[6];
-+ u_int namelen;
-+ size_t sz;
-+
-+ sz = sizeof(*p);
-+ namelen = 0;
-+ name[namelen++] = CTL_KERN;
-+ name[namelen++] = KERN_PROC2;
-+ name[namelen++] = KERN_PROC_PID;
-+ name[namelen++] = pid;
-+ name[namelen++] = sz;
-+ name[namelen++] = 1;
-+
-+ if (sysctl (name, namelen, p, &sz, NULL, 0) == -1) {
-+ perror("sysctl kern.proc2.pid");
-+ return FALSE;
-+ }
-+
-+ return TRUE;
-+}
-+#endif
-+
- static guint64
- get_start_time_for_pid (pid_t pid,
- GError **error)
- {
- guint64 start_time;
--#ifndef HAVE_FREEBSD
-+#if !defined(HAVE_FREEBSD) || !defined(__NetBSD__)
- gchar *filename;
- gchar *contents;
- size_t length;
-@@ -571,7 +609,7 @@ get_start_time_for_pid (pid_t pid,
- start_time = 0;
- contents = NULL;
-
-- filename = g_strdup_printf ("/proc/%d/stat", pid);
-+ filename = g_strdup_printf ("/proc/%lu/stat", pid);
-
- if (!g_file_get_contents (filename, &contents, &length, error))
- goto out;
-@@ -631,8 +669,8 @@ get_start_time_for_pid (pid_t pid,
- out:
- g_free (filename);
- g_free (contents);
--#else
-- struct kinfo_proc p;
-+#elif defined(__NetBSD__)
-+ struct kinfo_proc2 p;
-
- start_time = 0;
-
-@@ -647,9 +685,43 @@ get_start_time_for_pid (pid_t pid,
- goto out;
- }
-
-+ start_time = (guint64) p.p_ustart_sec;
-+
-+out:
-+
-+#elif HAVE_FREEBSD
-+ struct kinfo_proc p;
-+
-+ if (! get_kinfo_proc (pid, &p))
-+ {
-+ g_set_error (error,
-+ POLKIT_ERROR,
-+ POLKIT_ERROR_FAILED,
-+ "Error obtaining start time for %d (%s)",
-+ (gint) pid,
-+ g_strerror (errno));
-+ goto out;
-+ }
-+
- start_time = (guint64) p.ki_start.tv_sec;
-
- out:
-+#elif HAVE_SOLARIS
-+ psinfo_t p;
-+ if (!get_pid_psinfo (pid, &p))
-+ {
-+ g_set_error (error,
-+ POLKIT_ERROR,
-+ POLKIT_ERROR_FAILED,
-+ "Error obtaining start time for %d (%s)",
-+ (gint) pid,
-+ g_strerror (errno));
-+ goto out;
-+ }
-+ start_time = (guint64) p.pr_start.tv_sec;
-+out:
-+#else
-+#warning Your system is not supported
- #endif
-
- return start_time;
-@@ -664,6 +736,10 @@ _polkit_unix_process_get_owner (PolkitUn
- gchar **lines;
- #ifdef HAVE_FREEBSD
- struct kinfo_proc p;
-+#elif defined(__NetBSD__)
-+ struct kinfo_proc2 p;
-+#elif HAVE_SOLARIS
-+ psinfo_t p;
- #else
- gchar filename[64];
- guint n;
-@@ -676,7 +752,7 @@ _polkit_unix_process_get_owner (PolkitUn
- lines = NULL;
- contents = NULL;
-
--#ifdef HAVE_FREEBSD
-+#if defined(HAVE_FREEBSD) || defined(__NetBSD__)
- if (get_kinfo_proc (process->pid, &p) == 0)
- {
- g_set_error (error,
-@@ -688,7 +764,23 @@ _polkit_unix_process_get_owner (PolkitUn
- goto out;
- }
-
-+#ifdef __NetBSD__
-+ result = p.p_uid;
-+#else
- result = p.ki_uid;
-+#endif
-+#elif HAVE_SOLARIS
-+ if (!get_pid_psinfo (process->pid, &p))
-+ {
-+ g_set_error (error,
-+ POLKIT_ERROR,
-+ POLKIT_ERROR_FAILED,
-+ "get_pid_psinfo() failed for pid %d: %s",
-+ process->pid,
-+ g_strerror (errno));
-+ goto out;
-+ }
-+ result = p.pr_uid;
- #else
-
- /* see 'man proc' for layout of the status file
diff --git a/polkit/patches/patch-src_polkitbackend_polkitbackendinteractiveauthority.c b/polkit/patches/patch-src_polkitbackend_polkitbackendinteractiveauthority.c
deleted file mode 100644
index bc2ea49..0000000
--- a/polkit/patches/patch-src_polkitbackend_polkitbackendinteractiveauthority.c
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-src_polkitbackend_polkitbackendinteractiveauthority.c,v 1.3 2015/04/02 14:55:36 bsiegert Exp $
-
-* for *BSD netgroup functions
-
---- src/polkitbackend/polkitbackendinteractiveauthority.c.orig 2015-06-19 20:39:58.000000000 +0000
-+++ src/polkitbackend/polkitbackendinteractiveauthority.c
-@@ -23,7 +23,12 @@
- #include <errno.h>
- #include <pwd.h>
- #include <grp.h>
-+#if defined(__NetBSD__)
-+#include <netgroup.h>
-+#define BSD_NETGROUP
-+#else
- #include <netdb.h>
-+#endif
- #include <string.h>
- #include <glib/gstdio.h>
- #include <locale.h>
-@@ -2224,7 +2229,7 @@ get_users_in_net_group (PolkitIdentity
- ret = NULL;
- name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group));
-
--#ifdef HAVE_SETNETGRENT_RETURN
-+#if HAVE_SETNETGRENT_RETURN && !defined(__NetBSD__)
- if (setnetgrent (name) == 0)
- {
- g_warning ("Error looking up net group with name %s: %s", name, g_strerror (errno));
diff --git a/polkit/patches/patch-src_polkitbackend_polkitbackendjsauthority.c b/polkit/patches/patch-src_polkitbackend_polkitbackendjsauthority.c
deleted file mode 100644
index 8a95a56..0000000
--- a/polkit/patches/patch-src_polkitbackend_polkitbackendjsauthority.c
+++ /dev/null
@@ -1,107 +0,0 @@
-$NetBSD: patch-src_polkitbackend_polkitbackendjsauthority.c,v 1.3 2015/04/02 14:55:36 bsiegert Exp $
-
-* for *BSD netgroup functions
-* for no SIGPOLL
-* Fix a memory leak
-* Add getgrouplist for SunOS
-
---- src/polkitbackend/polkitbackendjsauthority.c.orig 2015-06-19 20:39:58.000000000 +0000
-+++ src/polkitbackend/polkitbackendjsauthority.c
-@@ -24,7 +24,12 @@
- #include <errno.h>
- #include <pwd.h>
- #include <grp.h>
-+#if defined(__NetBSD__)
-+#include <netgroup.h>
-+#define BSD_NETENT
-+#else
- #include <netdb.h>
-+#endif
- #include <string.h>
- #include <glib/gstdio.h>
- #include <locale.h>
-@@ -812,7 +817,7 @@ subject_to_jsval (PolkitBackendJsAuthori
- if (passwd == NULL)
- {
- user_name = g_strdup_printf ("%d", (gint) uid);
-- g_warning ("Error looking up info for uid %d: %m", (gint) uid);
-+ g_warning ("Error looking up info for uid %d: %s", (gint) uid, g_strerror(errno));
- }
- else
- {
-@@ -826,7 +831,7 @@ subject_to_jsval (PolkitBackendJsAuthori
- gids,
- &num_gids) < 0)
- {
-- g_warning ("Error looking up groups for uid %d: %m", (gint) uid);
-+ g_warning ("Error looking up groups for uid %d: %s", (gint) uid, g_strerror(errno));
- }
- else
- {
-@@ -1508,8 +1513,13 @@ js_polkit_user_is_in_netgroup (JSContext
- JSBool ret = JS_FALSE;
- JSString *user_str;
- JSString *netgroup_str;
-+#ifdef BSD_NETENT
-+ const char *user;
-+ const char *netgroup;
-+#else
- char *user;
- char *netgroup;
-+#endif
- JSBool is_in_netgroup = JS_FALSE;
-
- if (!JS_ConvertArguments (cx, argc, JS_ARGV (cx, vp), "SS", &user_str, &netgroup_str))
-@@ -1913,3 +1923,52 @@ utils_spawn_finish (GAsyncResult *res,
- out:
- return ret;
- }
-+
-+#ifdef __sun__
-+#include <string.h>
-+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;
-+ /*
-+ * When installing primary group, duplicate it;
-+ * the first element of groups is the effective gid
-+ * and will be overwritten when a setgid file is executed.
-+ */
-+ groups ? groups[ngroups++] = agroup : ngroups++;
-+ if (maxgroups > 1)
-+ groups ? groups[ngroups++] = agroup : ngroups++;
-+ /*
-+ * Scan the group file to find additional groups.
-+ */
-+ 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
diff --git a/polkit/patches/patch-src_polkitbackend_polkitd.c b/polkit/patches/patch-src_polkitbackend_polkitd.c
deleted file mode 100644
index 678792a..0000000
--- a/polkit/patches/patch-src_polkitbackend_polkitd.c
+++ /dev/null
@@ -1,68 +0,0 @@
-$NetBSD$
-
-Avoid %m usage in printf.
-
---- src/polkitbackend/polkitd.c.orig 2015-06-18 20:20:50.000000000 +0000
-+++ src/polkitbackend/polkitd.c
-@@ -22,6 +22,7 @@
- #include "config.h"
-
- #include <signal.h>
-+#include <errno.h>
-
- #include <glib-unix.h>
-
-@@ -109,20 +110,20 @@ become_user (const gchar *user,
- if (pw == NULL)
- {
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-- "Error calling getpwnam(): %m");
-+ "Error calling getpwnam(): %s", g_strerror(errno));
- goto out;
- }
-
- if (setgroups (0, NULL) != 0)
- {
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-- "Error clearing groups: %m");
-+ "Error clearing groups: %s", g_strerror(errno));
- goto out;
- }
- if (initgroups (pw->pw_name, pw->pw_gid) != 0)
- {
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-- "Error initializing groups: %m");
-+ "Error initializing groups: %s", g_strerror(errno));
- goto out;
- }
-
-@@ -132,16 +133,16 @@ become_user (const gchar *user,
- (getegid () != pw->pw_gid) || (getgid () != pw->pw_gid))
- {
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-- "Error becoming real+effective uid %d and gid %d: %m",
-- (int) pw->pw_uid, (int) pw->pw_gid);
-+ "Error becoming real+effective uid %d and gid %d: %s",
-+ (int) pw->pw_uid, (int) pw->pw_gid, g_strerror(errno));
- goto out;
- }
-
- if (chdir (pw->pw_dir) != 0)
- {
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-- "Error changing to home directory %s: %m",
-- pw->pw_dir);
-+ "Error changing to home directory %s: %s",
-+ pw->pw_dir, g_strerror(errno));
- goto out;
- }
-
-@@ -196,7 +197,7 @@ main (int argc,
- }
- else
- {
-- g_warning ("Error opening /dev/null: %m");
-+ g_warning ("Error opening /dev/null: %s", g_strerror(errno));
- }
- }
-
diff --git a/polkit/patches/patch-src_programs_pkexec.c b/polkit/patches/patch-src_programs_pkexec.c
deleted file mode 100644
index df34034..0000000
--- a/polkit/patches/patch-src_programs_pkexec.c
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
-Avoid conflict with SunOS function.
-
---- src/programs/pkexec.c.orig 2015-06-18 20:20:50.000000000 +0000
-+++ src/programs/pkexec.c
-@@ -247,7 +247,7 @@ set_close_on_exec (gint fd,
- }
-
- static gboolean
--fdwalk (FdCallback callback,
-+gfdwalk (FdCallback callback,
- gpointer user_data)
- {
- gint fd;
-@@ -922,7 +922,7 @@ main (int argc, char *argv[])
- }
-
- /* set close_on_exec on all file descriptors except stdin, stdout, stderr */
-- if (!fdwalk (set_close_on_exec, GINT_TO_POINTER (3)))
-+ if (!gfdwalk (set_close_on_exec, GINT_TO_POINTER (3)))
- {
- g_printerr ("Error setting close-on-exec for file desriptors\n");
- goto out;
diff --git a/polkit/patches/patch-src_programs_pkttyagent.c b/polkit/patches/patch-src_programs_pkttyagent.c
deleted file mode 100644
index c62e740..0000000
--- a/polkit/patches/patch-src_programs_pkttyagent.c
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD$
-
-Avoid %m usage in printf.
-
---- src/programs/pkttyagent.c.orig 2015-06-18 20:20:50.000000000 +0000
-+++ src/programs/pkttyagent.c
-@@ -24,6 +24,7 @@
- #endif
-
- #include <stdio.h>
-+#include <errno.h>
- #include <glib/gi18n.h>
- #include <polkit/polkit.h>
- #define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE
-@@ -204,7 +205,7 @@ main (int argc, char *argv[])
- {
- if (close (opt_notify_fd) != 0)
- {
-- g_printerr ("Error closing notify-fd %d: %m\n", opt_notify_fd);
-+ g_printerr ("Error closing notify-fd %d: %s\n", opt_notify_fd, g_strerror(errno));
- goto out;
- }
- }
diff --git a/polkit/patches/patch-test_mocklib_src_netdb.c b/polkit/patches/patch-test_mocklib_src_netdb.c
deleted file mode 100644
index 59ce215..0000000
--- a/polkit/patches/patch-test_mocklib_src_netdb.c
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD$
-
-Darwin has setnetgrent.
-SunOS has endnetgrent.
-
---- test/mocklibc/src/netdb.c.orig 2014-01-14 22:42:25.000000000 +0000
-+++ test/mocklibc/src/netdb.c
-@@ -36,6 +36,7 @@ static struct netgroup_iter global_iter;
-
- // REMEMBER: 1 means success, 0 means failure for netgroup methods
-
-+#ifndef __APPLE__
- int setnetgrent(const char *netgroup) {
- if (!global_netgroup_head)
- global_netgroup_head = netgroup_parse_all();
-@@ -50,11 +51,14 @@ int setnetgrent(const char *netgroup) {
- netgroup_iter_init(&global_iter, group);
- return 1;
- }
-+#endif
-
-+#ifndef __sun__
- void endnetgrent(void) {
- netgroup_free_all(global_netgroup_head);
- global_netgroup_head = NULL;
- }
-+#endif
-
- int getnetgrent(char **host, char **user, char **domain) {
- if (!global_netgroup_head)
diff --git a/polkit/patches/patch-test_mocklibc_src_grp.c b/polkit/patches/patch-test_mocklibc_src_grp.c
deleted file mode 100644
index 8dcd59c..0000000
--- a/polkit/patches/patch-test_mocklibc_src_grp.c
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-test_mocklibc_src_grp.c,v 1.3 2015/04/02 14:55:36 bsiegert Exp $
-
-* XXX: no fgetgrent(3)
-
---- test/mocklibc/src/grp.c.orig 2014-01-14 22:42:25.000000000 +0000
-+++ test/mocklibc/src/grp.c
-@@ -27,6 +27,12 @@
-
- static FILE *global_stream = NULL;
-
-+#ifdef __NetBSD__
-+static struct group *fgetgrent(FILE *stream) {
-+ return NULL;
-+}
-+#endif
-+
- void setgrent(void) {
- if (global_stream)
- endgrent();
diff --git a/polkit/patches/patch-test_mocklibc_src_pwd.c b/polkit/patches/patch-test_mocklibc_src_pwd.c
deleted file mode 100644
index ae750c1..0000000
--- a/polkit/patches/patch-test_mocklibc_src_pwd.c
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-test_mocklibc_src_pwd.c,v 1.3 2015/04/02 14:55:36 bsiegert Exp $
-
-* XXX: no fgetpwent(3)
-
---- test/mocklibc/src/pwd.c.orig 2014-01-14 22:42:25.000000000 +0000
-+++ test/mocklibc/src/pwd.c
-@@ -27,6 +27,12 @@
-
- static FILE *global_stream = NULL;
-
-+#ifdef __NetBSD__
-+static struct passwd *fgetpwent(FILE* stream) {
-+ return NULL;
-+}
-+#endif
-+
- void setpwent(void) {
- if (global_stream)
- endpwent();
Home |
Main Index |
Thread Index |
Old Index