Sync with the patch in fd.o BZ.

This commit is contained in:
ajacoutot 2015-07-16 17:45:37 +00:00
parent 652032cd70
commit d31a860588
5 changed files with 52 additions and 27 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.63 2015/07/03 06:42:27 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.64 2015/07/16 17:45:37 ajacoutot Exp $
COMMENT= framework for granting privileged operations to users
DISTNAME= polkit-0.113
REVISION= 1
REVISION= 2
SHARED_LIBS += polkit-gobject-1 2.0 # .0.0
SHARED_LIBS += polkit-agent-1 2.0 # .0.0

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-configure_ac,v 1.14 2015/07/03 05:57:26 ajacoutot Exp $
$OpenBSD: patch-configure_ac,v 1.15 2015/07/16 17:45:38 ajacoutot Exp $
GTK_DOC_CHECK chunk:
Remove when updating to a newer release with integrated bsd_auth(3) support.
@ -6,7 +6,7 @@ Remove when updating to a newer release with integrated bsd_auth(3) support.
https://bugs.freedesktop.org/show_bug.cgi?id=75187
--- configure.ac.orig Fri Jun 19 22:31:02 2015
+++ configure.ac Fri Jul 3 07:48:32 2015
+++ configure.ac Thu Jul 16 19:33:13 2015
@@ -46,7 +46,7 @@ AC_PATH_PROG([XSLTPROC], [xsltproc])
fi
AM_CONDITIONAL(MAN_PAGES_ENABLED, test x$enable_man_pages = xyes)
@ -16,16 +16,36 @@ https://bugs.freedesktop.org/show_bug.cgi?id=75187
#### gcc warning flags
@@ -169,7 +169,7 @@ dnl - Check whether setnetgrent has a return value
@@ -167,12 +167,22 @@ fi
dnl ---------------------------------------------------------------------------
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stddef.h>
dnl - Check whether setnetgrent has a return value
dnl ---------------------------------------------------------------------------
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <stddef.h>
- #include <netdb.h>
+ #include <netgroup.h>
]], [[
int r = setnetgrent (NULL);]])],
[AC_DEFINE([HAVE_SETNETGRENT_RETURN], 1, [Define to 1 if setnetgrent has return value])])
@@ -318,6 +318,11 @@ case $POLKIT_AUTHFW in
-]], [[
- int r = setnetgrent (NULL);]])],
-[AC_DEFINE([HAVE_SETNETGRENT_RETURN], 1, [Define to 1 if setnetgrent has return value])])
+case "$host_os" in
+ *openbsd*)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <stddef.h>
+ #include <netgroup.h>
+ ]], [[int r = setnetgrent (NULL);]])],
+ [AC_DEFINE([HAVE_SETNETGRENT_RETURN], 1, [Define to 1 if setnetgrent has return value])])
+ ;;
+ *)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <stddef.h>
+ #include <netdb.h>
+ ]], [[int r = setnetgrent (NULL);]])],
+ [AC_DEFINE([HAVE_SETNETGRENT_RETURN], 1, [Define to 1 if setnetgrent has return value])])
+ ;;
+esac
dnl ---------------------------------------------------------------------------
dnl - Check whether we want to build test
@@ -318,6 +328,11 @@ case $POLKIT_AUTHFW in
AC_DEFINE(POLKIT_AUTHFW_SHADOW, 1, [If using the Shadow authentication framework])
;;
@ -37,7 +57,7 @@ https://bugs.freedesktop.org/show_bug.cgi?id=75187
*)
AC_MSG_ERROR([Unknown Authentication Framework: $POLKIT_AUTHFW])
;;
@@ -326,6 +331,7 @@ esac
@@ -326,6 +341,7 @@ esac
AM_CONDITIONAL(POLKIT_AUTHFW_NONE, [test x$POLKIT_AUTHFW = xnone], [Using no authfw])
AM_CONDITIONAL(POLKIT_AUTHFW_PAM, [test x$POLKIT_AUTHFW = xpam], [Using PAM authfw])
AM_CONDITIONAL(POLKIT_AUTHFW_SHADOW, [test x$POLKIT_AUTHFW = xshadow], [Using Shadow authfw])
@ -45,7 +65,7 @@ https://bugs.freedesktop.org/show_bug.cgi?id=75187
dnl ---------------------------------------------------------------------------
@@ -504,6 +510,9 @@ case "$host_os" in
@@ -504,6 +520,9 @@ case "$host_os" in
;;
*freebsd*)
AC_DEFINE([HAVE_FREEBSD], 1, [Is this a FreeBSD system?])

View File

@ -1,21 +1,20 @@
$OpenBSD: patch-src_polkit_polkitunixprocess_c,v 1.6 2014/03/09 22:26:56 ajacoutot Exp $
$OpenBSD: patch-src_polkit_polkitunixprocess_c,v 1.7 2015/07/16 17:45:38 ajacoutot Exp $
https://bugs.freedesktop.org/show_bug.cgi?id=75187
--- src/polkit/polkitunixprocess.c.orig Mon May 6 19:54:15 2013
+++ src/polkit/polkitunixprocess.c Wed Feb 19 08:50:41 2014
@@ -29,6 +29,10 @@
--- src/polkit/polkitunixprocess.c.orig Tue Jan 14 23:42:25 2014
+++ src/polkit/polkitunixprocess.c Thu Jul 16 19:22:55 2015
@@ -29,6 +29,9 @@
#include <sys/sysctl.h>
#include <sys/user.h>
#endif
+#ifdef HAVE_OPENBSD
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#endif
#include <stdlib.h>
#include <string.h>
#include <errno.h>
@@ -86,7 +90,7 @@ static guint64 get_start_time_for_pid (gint pid,
@@ -86,7 +89,7 @@ static guint64 get_start_time_for_pid (gint pid,
static gint _polkit_unix_process_get_owner (PolkitUnixProcess *process,
GError **error);
@ -24,7 +23,7 @@ https://bugs.freedesktop.org/show_bug.cgi?id=75187
static gboolean get_kinfo_proc (gint pid, struct kinfo_proc *p);
#endif
@@ -554,12 +558,38 @@ get_kinfo_proc (pid_t pid, struct kinfo_proc *p)
@@ -554,12 +557,38 @@ get_kinfo_proc (pid_t pid, struct kinfo_proc *p)
}
#endif
@ -64,7 +63,7 @@ https://bugs.freedesktop.org/show_bug.cgi?id=75187
gchar *filename;
gchar *contents;
size_t length;
@@ -647,7 +677,11 @@ get_start_time_for_pid (pid_t pid,
@@ -647,7 +676,11 @@ get_start_time_for_pid (pid_t pid,
goto out;
}
@ -76,7 +75,7 @@ https://bugs.freedesktop.org/show_bug.cgi?id=75187
out:
#endif
@@ -662,7 +696,7 @@ _polkit_unix_process_get_owner (PolkitUnixProcess *pr
@@ -662,7 +695,7 @@ _polkit_unix_process_get_owner (PolkitUnixProcess *pr
gint result;
gchar *contents;
gchar **lines;
@ -85,7 +84,7 @@ https://bugs.freedesktop.org/show_bug.cgi?id=75187
struct kinfo_proc p;
#else
gchar filename[64];
@@ -676,7 +710,7 @@ _polkit_unix_process_get_owner (PolkitUnixProcess *pr
@@ -676,7 +709,7 @@ _polkit_unix_process_get_owner (PolkitUnixProcess *pr
lines = NULL;
contents = NULL;
@ -94,7 +93,7 @@ https://bugs.freedesktop.org/show_bug.cgi?id=75187
if (get_kinfo_proc (process->pid, &p) == 0)
{
g_set_error (error,
@@ -688,7 +722,11 @@ _polkit_unix_process_get_owner (PolkitUnixProcess *pr
@@ -688,7 +721,11 @@ _polkit_unix_process_get_owner (PolkitUnixProcess *pr
goto out;
}

View File

@ -1,4 +1,7 @@
$OpenBSD: patch-src_polkitbackend_polkitbackendinteractiveauthority_c,v 1.3 2015/07/03 05:57:26 ajacoutot Exp $
$OpenBSD: patch-src_polkitbackend_polkitbackendinteractiveauthority_c,v 1.4 2015/07/16 17:45:38 ajacoutot Exp $
https://bugs.freedesktop.org/show_bug.cgi?id=75187
--- src/polkitbackend/polkitbackendinteractiveauthority.c.orig Fri Jun 19 22:39:58 2015
+++ src/polkitbackend/polkitbackendinteractiveauthority.c Fri Jul 3 07:35:00 2015
@@ -23,7 +23,11 @@

View File

@ -1,4 +1,7 @@
$OpenBSD: patch-src_polkitbackend_polkitbackendjsauthority_c,v 1.8 2015/07/03 05:57:26 ajacoutot Exp $
$OpenBSD: patch-src_polkitbackend_polkitbackendjsauthority_c,v 1.9 2015/07/16 17:45:38 ajacoutot Exp $
https://bugs.freedesktop.org/show_bug.cgi?id=75187
--- src/polkitbackend/polkitbackendjsauthority.c.orig Fri Jun 19 22:39:58 2015
+++ src/polkitbackend/polkitbackendjsauthority.c Fri Jul 3 07:31:00 2015
@@ -24,7 +24,11 @@