update to 1.6.4
this is a step of two major branches, to much to list here pkgsrc notes: -I've left out our NETBSD_ATOMIC_OPS patch because it is very invasive and gcc intrinsics are hopefully good enough -A workaround for non-standard behavior of vsnprintf has been added upstream, for HPUX as the comment says. We had a patch for __hpux||__sgi which is removed now - the sgi case should be checked.
This commit is contained in:
parent
4a361e4e82
commit
125139b81b
17 changed files with 151 additions and 748 deletions
|
@ -1,8 +1,6 @@
|
|||
# $NetBSD: Makefile,v 1.53 2012/07/28 21:50:31 reed Exp $
|
||||
# $NetBSD: Makefile,v 1.54 2012/08/01 17:52:21 drochner Exp $
|
||||
|
||||
DISTNAME= dbus-1.2.4.6permissive
|
||||
PKGNAME= dbus-1.2.4.6
|
||||
PKGREVISION= 4
|
||||
DISTNAME= dbus-1.6.4
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= http://dbus.freedesktop.org/releases/dbus/
|
||||
|
||||
|
@ -31,6 +29,7 @@ SPECIAL_PERMS+= libexec/dbus-daemon-launch-helper ${REAL_ROOT_USER} ${DBUS_GROU
|
|||
|
||||
CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}
|
||||
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
|
||||
#CONFIGURE_ARGS+= --enable-embedded-tests
|
||||
|
||||
#CFLAGS.NetBSD+= -D_NETBSD_SOURCE
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@comment $NetBSD: PLIST,v 1.14 2011/10/29 13:26:59 marino Exp $
|
||||
@comment $NetBSD: PLIST,v 1.15 2012/08/01 17:52:21 drochner Exp $
|
||||
bin/dbus-cleanup-sockets
|
||||
bin/dbus-daemon
|
||||
bin/dbus-launch
|
||||
|
@ -18,6 +18,7 @@ include/dbus-1.0/dbus/dbus-protocol.h
|
|||
include/dbus-1.0/dbus/dbus-server.h
|
||||
include/dbus-1.0/dbus/dbus-shared.h
|
||||
include/dbus-1.0/dbus/dbus-signature.h
|
||||
include/dbus-1.0/dbus/dbus-syntax.h
|
||||
include/dbus-1.0/dbus/dbus-threads.h
|
||||
include/dbus-1.0/dbus/dbus-types.h
|
||||
include/dbus-1.0/dbus/dbus.h
|
||||
|
@ -31,6 +32,13 @@ man/man1/dbus-launch.1
|
|||
man/man1/dbus-monitor.1
|
||||
man/man1/dbus-send.1
|
||||
man/man1/dbus-uuidgen.1
|
||||
share/doc/dbus/dbus-faq.html
|
||||
share/doc/dbus/dbus-specification.html
|
||||
share/doc/dbus/dbus-test-plan.html
|
||||
share/doc/dbus/dbus-tutorial.html
|
||||
share/doc/dbus/diagram.png
|
||||
share/doc/dbus/diagram.svg
|
||||
share/doc/dbus/system-activation.txt
|
||||
share/examples/dbus/session.conf
|
||||
share/examples/dbus/system.conf
|
||||
share/examples/rc.d/dbus
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
$NetBSD: distinfo,v 1.38 2012/03/30 14:28:29 obache Exp $
|
||||
$NetBSD: distinfo,v 1.39 2012/08/01 17:52:21 drochner Exp $
|
||||
|
||||
SHA1 (dbus-1.2.4.6permissive.tar.gz) = f71219624885fe2ec1990bb8bdd599e184dd5774
|
||||
RMD160 (dbus-1.2.4.6permissive.tar.gz) = 05d1c5fae8ae763a9beb8c7d6f390f3ff54e9c30
|
||||
Size (dbus-1.2.4.6permissive.tar.gz) = 1575270 bytes
|
||||
SHA1 (patch-CVE-2010-4352-1) = bc83f7a2b56558b6514de8de2d6319ad84f84fce
|
||||
SHA1 (patch-CVE-2010-4352-2) = 1427c2c4aea6cd21f5d19aa8fad90b87282b232b
|
||||
SHA1 (patch-CVE-2010-4352-3) = d5598dab11bad66c2f586e418a8b409ac5fc67d5
|
||||
SHA1 (patch-CVE-2010-4352-4) = 82a43bc19bf4ef73d6e2909dd1c948798585135d
|
||||
SHA1 (patch-CVE-2011-2200) = 99e991dd51312fb7181f12c1c5d3b87897e417ac
|
||||
SHA1 (patch-aa) = fd7cc2e11e15e13885e882e8de51e17af8a63d70
|
||||
SHA1 (patch-ab) = e08250a12e6c04c69278c03078a817159592b3d0
|
||||
SHA1 (patch-ac) = 63aab0ffac02a9cb85a80e31bbb1234534db378b
|
||||
SHA1 (patch-ag) = 999071b782982c12329025ea8e393bfed940b654
|
||||
SHA1 (patch-ai) = a45bd8d29955e9c14a4d8b3f44b42242d70c1cd8
|
||||
SHA1 (patch-ak) = 56c0a917e770b8d6ffc37ec7ab8beb631dd8ef72
|
||||
SHA1 (patch-al) = fad2f4df4537b2a3e21aaef29138060724ba8286
|
||||
SHA1 (dbus-1.6.4.tar.gz) = 17e619f008301592b7f01a60e7cf18e2752b5270
|
||||
RMD160 (dbus-1.6.4.tar.gz) = 041ad41c26f38647f3da8d7f0cb548c979521def
|
||||
Size (dbus-1.6.4.tar.gz) = 1927446 bytes
|
||||
SHA1 (patch-aa) = 0c3d145979e3b2358261c9f7f34701d02eb6ecd4
|
||||
SHA1 (patch-ab) = 1edd2dfd566b96a8908af2efa37d905919f07713
|
||||
SHA1 (patch-ak) = fcb0cad1b6e306db03d538d4ca65f4a18d4726ab
|
||||
SHA1 (patch-al) = 3f9f793b0c1455bf2bf079cc27b841c22f42c276
|
||||
SHA1 (patch-am) = 8c794ff8b0981e90243ee20c26ae1ecc72e68de8
|
||||
SHA1 (patch-ba) = ceb8e0c424c57410f8c3775087e4cae1b44da4c5
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: options.mk,v 1.5 2010/12/05 18:29:17 asau Exp $
|
||||
# $NetBSD: options.mk,v 1.6 2012/08/01 17:52:21 drochner Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.dbus
|
||||
PKG_SUPPORTED_OPTIONS+= debug x11
|
||||
|
@ -15,9 +15,9 @@ PKG_SUGGESTED_OPTIONS+= kqueue
|
|||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mdebug)
|
||||
CONFIGURE_ARGS.enable+= asserts tests verbose-mode
|
||||
CONFIGURE_ARGS.enable+= asserts verbose-mode
|
||||
.else
|
||||
CONFIGURE_ARGS.disable+= asserts tests verbose-mode
|
||||
CONFIGURE_ARGS.disable+= asserts verbose-mode
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mkqueue)
|
||||
|
|
|
@ -1,81 +0,0 @@
|
|||
$NetBSD: patch-CVE-2010-4352-1,v 1.1 2010/12/29 10:49:21 tron Exp $
|
||||
|
||||
Fix for CVE-2010-4352 taken from here:
|
||||
|
||||
http://cgit.freedesktop.org/dbus/dbus/commit/?h=dbus-1.2&id=5042c1e5e6df31700215c9dc0618634911b0c9f5
|
||||
|
||||
--- dbus/dbus-marshal-validate.c.orig 2009-05-06 18:26:48.000000000 +0100
|
||||
+++ dbus/dbus-marshal-validate.c 2010-12-29 10:35:49.000000000 +0000
|
||||
@@ -289,16 +289,30 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
+/* note: this function is also used to validate the header's values,
|
||||
+ * since the header is a valid body with a particular signature.
|
||||
+ */
|
||||
static DBusValidity
|
||||
validate_body_helper (DBusTypeReader *reader,
|
||||
int byte_order,
|
||||
dbus_bool_t walk_reader_to_end,
|
||||
+ int total_depth,
|
||||
const unsigned char *p,
|
||||
const unsigned char *end,
|
||||
const unsigned char **new_p)
|
||||
{
|
||||
int current_type;
|
||||
|
||||
+ /* The spec allows arrays and structs to each nest 32, for total
|
||||
+ * nesting of 2*32. We want to impose the same limit on "dynamic"
|
||||
+ * value nesting (not visible in the signature) which is introduced
|
||||
+ * by DBUS_TYPE_VARIANT.
|
||||
+ */
|
||||
+ if (total_depth > (DBUS_MAXIMUM_TYPE_RECURSION_DEPTH * 2))
|
||||
+ {
|
||||
+ return DBUS_INVALID_NESTED_TOO_DEEPLY;
|
||||
+ }
|
||||
+
|
||||
while ((current_type = _dbus_type_reader_get_current_type (reader)) != DBUS_TYPE_INVALID)
|
||||
{
|
||||
const unsigned char *a;
|
||||
@@ -474,7 +488,9 @@
|
||||
{
|
||||
while (p < array_end)
|
||||
{
|
||||
- validity = validate_body_helper (&sub, byte_order, FALSE, p, end, &p);
|
||||
+ validity = validate_body_helper (&sub, byte_order, FALSE,
|
||||
+ total_depth + 1,
|
||||
+ p, end, &p);
|
||||
if (validity != DBUS_VALID)
|
||||
return validity;
|
||||
}
|
||||
@@ -591,7 +607,9 @@
|
||||
|
||||
_dbus_assert (_dbus_type_reader_get_current_type (&sub) != DBUS_TYPE_INVALID);
|
||||
|
||||
- validity = validate_body_helper (&sub, byte_order, FALSE, p, end, &p);
|
||||
+ validity = validate_body_helper (&sub, byte_order, FALSE,
|
||||
+ total_depth + 1,
|
||||
+ p, end, &p);
|
||||
if (validity != DBUS_VALID)
|
||||
return validity;
|
||||
|
||||
@@ -620,7 +638,9 @@
|
||||
|
||||
_dbus_type_reader_recurse (reader, &sub);
|
||||
|
||||
- validity = validate_body_helper (&sub, byte_order, TRUE, p, end, &p);
|
||||
+ validity = validate_body_helper (&sub, byte_order, TRUE,
|
||||
+ total_depth + 1,
|
||||
+ p, end, &p);
|
||||
if (validity != DBUS_VALID)
|
||||
return validity;
|
||||
}
|
||||
@@ -705,7 +725,7 @@
|
||||
p = _dbus_string_get_const_data_len (value_str, value_pos, len);
|
||||
end = p + len;
|
||||
|
||||
- validity = validate_body_helper (&reader, byte_order, TRUE, p, end, &p);
|
||||
+ validity = validate_body_helper (&reader, byte_order, TRUE, 0, p, end, &p);
|
||||
if (validity != DBUS_VALID)
|
||||
return validity;
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
$NetBSD: patch-CVE-2010-4352-2,v 1.1 2010/12/29 10:49:21 tron Exp $
|
||||
|
||||
Fix for CVE-2010-4352 taken from here:
|
||||
|
||||
http://cgit.freedesktop.org/dbus/dbus/commit/?h=dbus-1.2&id=5042c1e5e6df31700215c9dc0618634911b0c9f5
|
||||
|
||||
--- dbus/dbus-message-factory.c.orig 2009-05-06 18:26:48.000000000 +0100
|
||||
+++ dbus/dbus-message-factory.c 2010-12-29 10:35:49.000000000 +0000
|
||||
@@ -333,6 +333,53 @@
|
||||
return message;
|
||||
}
|
||||
|
||||
+static DBusMessage*
|
||||
+message_with_nesting_levels (int levels)
|
||||
+{
|
||||
+ DBusMessage *message;
|
||||
+ dbus_int32_t v_INT32;
|
||||
+ DBusMessageIter *parents;
|
||||
+ DBusMessageIter *children;
|
||||
+ int i;
|
||||
+
|
||||
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealIter
|
||||
+ * in dbus-message.c, this assert is just to help you know you need
|
||||
+ * to fix that if you hit it
|
||||
+ */
|
||||
+ _dbus_assert (levels < 256);
|
||||
+
|
||||
+ parents = dbus_new(DBusMessageIter, levels + 1);
|
||||
+ children = dbus_new(DBusMessageIter, levels + 1);
|
||||
+
|
||||
+ v_INT32 = 42;
|
||||
+ message = simple_method_call ();
|
||||
+
|
||||
+ i = 0;
|
||||
+ dbus_message_iter_init_append (message, &parents[i]);
|
||||
+ while (i < levels)
|
||||
+ {
|
||||
+ dbus_message_iter_open_container (&parents[i], DBUS_TYPE_VARIANT,
|
||||
+ i == (levels - 1) ?
|
||||
+ DBUS_TYPE_INT32_AS_STRING :
|
||||
+ DBUS_TYPE_VARIANT_AS_STRING,
|
||||
+ &children[i]);
|
||||
+ ++i;
|
||||
+ parents[i] = children[i-1];
|
||||
+ }
|
||||
+ --i;
|
||||
+ dbus_message_iter_append_basic (&children[i], DBUS_TYPE_INT32, &v_INT32);
|
||||
+ while (i >= 0)
|
||||
+ {
|
||||
+ dbus_message_iter_close_container (&parents[i], &children[i]);
|
||||
+ --i;
|
||||
+ }
|
||||
+
|
||||
+ dbus_free(parents);
|
||||
+ dbus_free(children);
|
||||
+
|
||||
+ return message;
|
||||
+}
|
||||
+
|
||||
static dbus_bool_t
|
||||
generate_special (DBusMessageDataIter *iter,
|
||||
DBusString *data,
|
||||
@@ -735,6 +782,24 @@
|
||||
|
||||
*expected_validity = DBUS_INVALID_DICT_ENTRY_HAS_NO_FIELDS;
|
||||
}
|
||||
+ else if (item_seq == 20)
|
||||
+ {
|
||||
+ /* 64 levels of nesting is OK */
|
||||
+ message = message_with_nesting_levels(64);
|
||||
+
|
||||
+ generate_from_message (data, expected_validity, message);
|
||||
+
|
||||
+ *expected_validity = DBUS_VALID;
|
||||
+ }
|
||||
+ else if (item_seq == 21)
|
||||
+ {
|
||||
+ /* 65 levels of nesting is not OK */
|
||||
+ message = message_with_nesting_levels(65);
|
||||
+
|
||||
+ generate_from_message (data, expected_validity, message);
|
||||
+
|
||||
+ *expected_validity = DBUS_INVALID_NESTED_TOO_DEEPLY;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
return FALSE;
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: patch-CVE-2010-4352-3,v 1.1 2010/12/29 10:49:21 tron Exp $
|
||||
|
||||
Fix for CVE-2010-4352 taken from here:
|
||||
|
||||
http://cgit.freedesktop.org/dbus/dbus/commit/?h=dbus-1.2&id=5042c1e5e6df31700215c9dc0618634911b0c9f5
|
||||
|
||||
--- dbus/dbus-marshal-validate.h.orig 2009-05-06 18:26:48.000000000 +0100
|
||||
+++ dbus/dbus-marshal-validate.h 2010-12-29 10:35:49.000000000 +0000
|
||||
@@ -117,6 +117,7 @@
|
||||
DBUS_INVALID_DICT_ENTRY_HAS_TOO_MANY_FIELDS = 53,
|
||||
DBUS_INVALID_DICT_ENTRY_NOT_INSIDE_ARRAY = 54,
|
||||
DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE = 55,
|
||||
+ DBUS_INVALID_NESTED_TOO_DEEPLY = 56,
|
||||
DBUS_VALIDITY_LAST
|
||||
} DBusValidity;
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
$NetBSD: patch-CVE-2010-4352-4,v 1.1 2010/12/29 10:49:21 tron Exp $
|
||||
|
||||
Fix for CVE-2010-4352 taken from here:
|
||||
|
||||
http://cgit.freedesktop.org/dbus/dbus/commit/?h=dbus-1.2&id=5042c1e5e6df31700215c9dc0618634911b0c9f5
|
||||
|
||||
--- doc/dbus-specification.xml.orig 2009-04-17 20:45:29.000000000 +0100
|
||||
+++ doc/dbus-specification.xml 2010-12-29 10:35:49.000000000 +0000
|
||||
@@ -561,12 +561,14 @@
|
||||
</row><row>
|
||||
<entry><literal>VARIANT</literal></entry>
|
||||
<entry>
|
||||
- A variant type has a marshaled <literal>SIGNATURE</literal>
|
||||
- followed by a marshaled value with the type
|
||||
- given in the signature.
|
||||
- Unlike a message signature, the variant signature
|
||||
- can contain only a single complete type.
|
||||
- So "i", "ai" or "(ii)" is OK, but "ii" is not.
|
||||
+ A variant type has a marshaled
|
||||
+ <literal>SIGNATURE</literal> followed by a marshaled
|
||||
+ value with the type given in the signature. Unlike
|
||||
+ a message signature, the variant signature can
|
||||
+ contain only a single complete type. So "i", "ai"
|
||||
+ or "(ii)" is OK, but "ii" is not. Use of variants may not
|
||||
+ cause a total message depth to be larger than 64, including
|
||||
+ other container types such as structures.
|
||||
</entry>
|
||||
<entry>
|
||||
1 (alignment of the signature)
|
|
@ -1,27 +0,0 @@
|
|||
$NetBSD: patch-CVE-2011-2200,v 1.1 2011/06/13 22:06:39 tez Exp $
|
||||
|
||||
Patch for CVE-2011-2200 from http://cgit.freedesktop.org/dbus/dbus/commit/?h=dbus-1.2&id=6519a1f77c61d753d4c97efd6e15630eb275336e
|
||||
|
||||
--- dbus/dbus-marshal-header.c.orig 2011-06-13 16:48:26.166342800 -0500
|
||||
+++ dbus/dbus-marshal-header.c 2011-06-13 16:52:02.755479400 -0500
|
||||
@@ -1462,14 +1462,20 @@
|
||||
_dbus_header_byteswap (DBusHeader *header,
|
||||
int new_order)
|
||||
{
|
||||
+ unsigned char byte_order;
|
||||
+
|
||||
if (header->byte_order == new_order)
|
||||
return;
|
||||
|
||||
+ byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET);
|
||||
+ _dbus_assert (header->byte_order == byte_order);
|
||||
+
|
||||
_dbus_marshal_byteswap (&_dbus_header_signature_str,
|
||||
0, header->byte_order,
|
||||
new_order,
|
||||
&header->data, 0);
|
||||
|
||||
+ _dbus_string_set_byte (&header->data, BYTE_ORDER_OFFSET, new_order);
|
||||
header->byte_order = new_order;
|
||||
}
|
||||
|
|
@ -1,35 +1,42 @@
|
|||
$NetBSD: patch-aa,v 1.10 2009/01/07 19:11:36 wiz Exp $
|
||||
$NetBSD: patch-aa,v 1.11 2012/08/01 17:52:22 drochner Exp $
|
||||
|
||||
--- bus/Makefile.in.orig 2008-12-18 21:47:13.000000000 +0100
|
||||
--- bus/Makefile.in.orig 2012-07-26 16:39:09.000000000 +0000
|
||||
+++ bus/Makefile.in
|
||||
@@ -415,9 +415,10 @@ target_vendor = @target_vendor@
|
||||
@@ -500,7 +500,8 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-configdir = $(sysconfdir)/dbus-1
|
||||
+etcconfigdir = $(sysconfdir)/dbus-1
|
||||
+configdir = $(datadir)/examples/@PACKAGE@
|
||||
INCLUDES = -I$(top_srcdir) $(DBUS_BUS_CFLAGS) @PIE_CFLAGS@ \
|
||||
- -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
|
||||
+ -DDBUS_SYSTEM_CONFIG_FILE=\""$(etcconfigdir)/system.conf"\" \
|
||||
-DDAEMON_NAME=\"dbus-daemon\" -DDBUS_COMPILATION
|
||||
dbus_daemon_execdir = $(DBUS_DAEMONDIR)
|
||||
DBUS_BUS_LIBS = \
|
||||
$(XML_LIBS) \
|
||||
@@ -519,7 +520,7 @@ DBUS_LAUNCHER_LIBS = \
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XML_CFLAGS) \
|
||||
- -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
|
||||
+ -DDBUS_SYSTEM_CONFIG_FILE=\""$(etcconfigdir)/system.conf"\" \
|
||||
-DDBUS_COMPILATION \
|
||||
-DDBUS_STATIC_BUILD \
|
||||
$(NULL)
|
||||
@@ -1510,9 +1511,6 @@ clean-local:
|
||||
/bin/rm *.bb *.bbg *.da *.gcov || true
|
||||
|
||||
EFENCE =
|
||||
@@ -1294,16 +1295,13 @@ install-data-hook:
|
||||
chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \
|
||||
fi
|
||||
$(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR)
|
||||
install-data-hook:
|
||||
- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
|
||||
- $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
|
||||
- $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
|
||||
$(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1
|
||||
$(INSTALL_PROGRAM) dbus-daemon-launch-helper $(DESTDIR)$(libexecdir)
|
||||
if test `id -u` -eq 0; then \
|
||||
chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
|
||||
- chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
|
||||
+ chmod 4550 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
|
||||
else \
|
||||
echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
|
||||
echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
|
||||
# Install dbus.socket as default implementation of a D-Bus stack.
|
||||
@@ -1529,7 +1527,7 @@ install-data-hook:
|
||||
@DBUS_UNIX_TRUE@install-exec-hook:
|
||||
@DBUS_UNIX_TRUE@ if test `id -u` -eq 0; then \
|
||||
@DBUS_UNIX_TRUE@ chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
|
||||
-@DBUS_UNIX_TRUE@ chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
|
||||
+@DBUS_UNIX_TRUE@ chmod 4550 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
|
||||
@DBUS_UNIX_TRUE@ else \
|
||||
@DBUS_UNIX_TRUE@ echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
|
||||
@DBUS_UNIX_TRUE@ echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
|
||||
|
|
|
@ -1,26 +1,17 @@
|
|||
$NetBSD: patch-ab,v 1.18 2012/03/30 14:28:29 obache Exp $
|
||||
$NetBSD: patch-ab,v 1.19 2012/08/01 17:52:22 drochner Exp $
|
||||
|
||||
--- dbus/dbus-sysdeps-unix.c.orig 2009-05-05 20:51:37.000000000 +0000
|
||||
--- dbus/dbus-sysdeps-unix.c.orig 2012-07-03 18:02:45.000000000 +0000
|
||||
+++ dbus/dbus-sysdeps-unix.c
|
||||
@@ -23,6 +23,7 @@
|
||||
@@ -22,6 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
+#define _NETBSD_SOURCE
|
||||
+
|
||||
#include <config.h>
|
||||
|
||||
#include "dbus-internals.h"
|
||||
#include "dbus-sysdeps.h"
|
||||
@@ -35,6 +36,9 @@
|
||||
#include "dbus-list.h"
|
||||
#include "dbus-credentials.h"
|
||||
|
||||
+#ifdef HAVE_NETBSD_ATOMIC_OPS
|
||||
+#include <sys/atomic.h>
|
||||
+#endif
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -71,6 +75,10 @@
|
||||
@@ -72,6 +74,10 @@
|
||||
#include <ucred.h>
|
||||
#endif
|
||||
|
||||
|
@ -31,9 +22,9 @@ $NetBSD: patch-ab,v 1.18 2012/03/30 14:28:29 obache Exp $
|
|||
#ifdef HAVE_ADT
|
||||
#include <bsm/adt.h>
|
||||
#endif
|
||||
@@ -87,6 +95,32 @@
|
||||
#define socklen_t int
|
||||
#endif
|
||||
@@ -122,6 +128,32 @@
|
||||
|
||||
#endif /* Solaris */
|
||||
|
||||
+#ifdef LOCAL_PEEREID
|
||||
+static dbus_bool_t
|
||||
|
@ -56,7 +47,7 @@ $NetBSD: patch-ab,v 1.18 2012/03/30 14:28:29 obache Exp $
|
|||
+ *gid = cred.unp_egid;
|
||||
+
|
||||
+ _dbus_verbose ("dbus_nb_getpeereid: returning TRUE, pid=%d uid=%d gid=%d\n",
|
||||
+ cred.unp_pid, cred.unp_euid, cred.unp_egid);
|
||||
+ cred.unp_pid, cred.unp_euid, cred.unp_egid);
|
||||
+ return TRUE;
|
||||
+}
|
||||
+#endif
|
||||
|
@ -64,132 +55,68 @@ $NetBSD: patch-ab,v 1.18 2012/03/30 14:28:29 obache Exp $
|
|||
static dbus_bool_t
|
||||
_dbus_open_socket (int *fd_p,
|
||||
int domain,
|
||||
@@ -581,7 +615,7 @@ _dbus_set_local_creds (int fd, dbus_bool
|
||||
@@ -969,7 +1001,7 @@ _dbus_set_local_creds (int fd, dbus_bool
|
||||
{
|
||||
dbus_bool_t retval = TRUE;
|
||||
|
||||
-#if defined(HAVE_CMSGCRED)
|
||||
+#if defined(HAVE_CMSGCRED) || defined(LOCAL_PEEREID)
|
||||
/* NOOP just to make sure only one codepath is used
|
||||
/* NOOP just to make sure only one codepath is used
|
||||
* and to prefer CMSGCRED
|
||||
*/
|
||||
@@ -1041,9 +1075,9 @@ write_credentials_byte (int
|
||||
int bytes_written;
|
||||
char buf[1] = { '\0' };
|
||||
#if defined(HAVE_CMSGCRED)
|
||||
- struct {
|
||||
+ union {
|
||||
struct cmsghdr hdr;
|
||||
- struct cmsgcred cred;
|
||||
+ char cred[CMSG_SPACE (sizeof (struct cmsgcred))];
|
||||
} cmsg;
|
||||
struct iovec iov;
|
||||
struct msghdr msg;
|
||||
@@ -1054,10 +1088,10 @@ write_credentials_byte (int
|
||||
msg.msg_iov = &iov;
|
||||
msg.msg_iovlen = 1;
|
||||
|
||||
- msg.msg_control = &cmsg;
|
||||
- msg.msg_controllen = sizeof (cmsg);
|
||||
+ msg.msg_control = (caddr_t) &cmsg;
|
||||
+ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred));
|
||||
memset (&cmsg, 0, sizeof (cmsg));
|
||||
- cmsg.hdr.cmsg_len = sizeof (cmsg);
|
||||
+ cmsg.hdr.cmsg_len = CMSG_LEN (sizeof (struct cmsgcred));
|
||||
cmsg.hdr.cmsg_level = SOL_SOCKET;
|
||||
cmsg.hdr.cmsg_type = SCM_CREDS;
|
||||
#endif
|
||||
@@ -1129,15 +1163,15 @@ _dbus_read_credentials_socket (int
|
||||
dbus_pid_t pid_read;
|
||||
int bytes_read;
|
||||
|
||||
- uid_read = DBUS_UID_UNSET;
|
||||
- pid_read = DBUS_PID_UNSET;
|
||||
-
|
||||
#ifdef HAVE_CMSGCRED
|
||||
- struct {
|
||||
+ union {
|
||||
struct cmsghdr hdr;
|
||||
- struct cmsgcred cred;
|
||||
+ char cred[CMSG_SPACE (sizeof (struct cmsgcred))];
|
||||
@@ -1674,6 +1706,11 @@ _dbus_read_credentials_socket (int
|
||||
char cred[CMSG_SPACE (sizeof (struct cmsgcred))];
|
||||
} cmsg;
|
||||
|
||||
+#elif defined(LOCAL_PEEREID)
|
||||
+ pid_t sockpid, sockuid, sockgid;
|
||||
+ pid_t sockpid;
|
||||
+ uid_t sockuid;
|
||||
+ gid_t sockgid;
|
||||
+
|
||||
#elif defined(LOCAL_CREDS)
|
||||
struct {
|
||||
struct cmsghdr hdr;
|
||||
@@ -1145,6 +1179,9 @@ _dbus_read_credentials_socket (int
|
||||
} cmsg;
|
||||
#endif
|
||||
|
||||
+ uid_read = DBUS_UID_UNSET;
|
||||
+ pid_read = DBUS_PID_UNSET;
|
||||
+
|
||||
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
|
||||
|
||||
/* The POSIX spec certainly doesn't promise this, but
|
||||
@@ -1170,11 +1207,16 @@ _dbus_read_credentials_socket (int
|
||||
@@ -1709,10 +1746,15 @@ _dbus_read_credentials_socket (int
|
||||
msg.msg_iov = &iov;
|
||||
msg.msg_iovlen = 1;
|
||||
|
||||
-#if defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)
|
||||
+#if (defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)) && !defined(LOCAL_PEEREID)
|
||||
memset (&cmsg, 0, sizeof (cmsg));
|
||||
_DBUS_ZERO(cmsg);
|
||||
+#ifdef HAVE_CMSGCRED
|
||||
+ msg.msg_control = (caddr_t) &cmsg;
|
||||
+ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred));
|
||||
msg.msg_control = (caddr_t) &cmsg;
|
||||
msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred));
|
||||
+#else /* defined(LOCAL_CREDS) */
|
||||
msg.msg_control = &cmsg;
|
||||
msg.msg_controllen = sizeof (cmsg);
|
||||
#endif
|
||||
+ msg.msg_control = &cmsg;
|
||||
+ msg.msg_controllen = sizeof (cmsg);
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
again:
|
||||
bytes_read = recvmsg (client_fd, &msg, 0);
|
||||
@@ -1210,8 +1252,12 @@ _dbus_read_credentials_socket (int
|
||||
@@ -1749,9 +1791,13 @@ _dbus_read_credentials_socket (int
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
-#if defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)
|
||||
+#if (defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)) && !defined(LOCAL_PEEREID)
|
||||
+#ifdef HAVE_CMSGCRED
|
||||
+ if (cmsg.hdr.cmsg_len < CMSG_LEN (sizeof (struct cmsgcred)) || cmsg.hdr.cmsg_type != SCM_CREDS)
|
||||
if (cmsg.hdr.cmsg_len < CMSG_LEN (sizeof (struct cmsgcred))
|
||||
|| cmsg.hdr.cmsg_type != SCM_CREDS)
|
||||
+#else /* defined(LOCAL_CREDS) */
|
||||
if (cmsg.hdr.cmsg_len < sizeof (cmsg) || cmsg.hdr.cmsg_type != SCM_CREDS)
|
||||
+ if (cmsg.hdr.cmsg_len < sizeof (cmsg) || cmsg.hdr.cmsg_type != SCM_CREDS)
|
||||
+#endif
|
||||
{
|
||||
dbus_set_error (error, DBUS_ERROR_FAILED,
|
||||
"Message from recvmsg() was not SCM_CREDS");
|
||||
@@ -1223,7 +1269,11 @@ _dbus_read_credentials_socket (int
|
||||
|
||||
{
|
||||
#ifdef SO_PEERCRED
|
||||
+#ifdef __OpenBSD__
|
||||
+ struct sockpeercred cr;
|
||||
+#else
|
||||
struct ucred cr;
|
||||
+#endif
|
||||
int cr_len = sizeof (cr);
|
||||
|
||||
if (getsockopt (client_fd, SOL_SOCKET, SO_PEERCRED, &cr, &cr_len) == 0 &&
|
||||
@@ -1238,8 +1288,21 @@ _dbus_read_credentials_socket (int
|
||||
cr_len, (int) sizeof (cr), _dbus_strerror (errno));
|
||||
}
|
||||
#elif defined(HAVE_CMSGCRED)
|
||||
- pid_read = cmsg.cred.cmcred_pid;
|
||||
- uid_read = cmsg.cred.cmcred_euid;
|
||||
+ struct cmsgcred *cred;
|
||||
+
|
||||
+ cred = (struct cmsgcred *) CMSG_DATA (&cmsg);
|
||||
+ pid_read = cred->cmcred_pid;
|
||||
+ uid_read = cred->cmcred_euid;
|
||||
@@ -1787,6 +1833,16 @@ _dbus_read_credentials_socket (int
|
||||
cred = (struct cmsgcred *) CMSG_DATA (&cmsg.hdr);
|
||||
pid_read = cred->cmcred_pid;
|
||||
uid_read = cred->cmcred_euid;
|
||||
+#elif defined(LOCAL_PEEREID)
|
||||
+ if (dbus_nb_getpeereid(client_fd, &sockpid, &sockuid, &sockgid) == TRUE)
|
||||
+ {
|
||||
+ pid_read = sockpid;
|
||||
+ uid_read = sockuid;
|
||||
+ pid_read = sockpid;
|
||||
+ uid_read = sockuid;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
|
@ -198,66 +125,12 @@ $NetBSD: patch-ab,v 1.18 2012/03/30 14:28:29 obache Exp $
|
|||
#elif defined(LOCAL_CREDS)
|
||||
pid_read = DBUS_PID_UNSET;
|
||||
uid_read = cmsg.cred.sc_uid;
|
||||
@@ -1301,7 +1364,7 @@ _dbus_read_credentials_socket (int
|
||||
@@ -1848,7 +1904,7 @@ _dbus_read_credentials_socket (int
|
||||
}
|
||||
if (ucred != NULL)
|
||||
ucred_free (ucred);
|
||||
-#else /* !SO_PEERCRED && !HAVE_CMSGCRED && !HAVE_GETPEEREID && !HAVE_GETPEERUCRED */
|
||||
+#else /* !SO_PEERCRED && !HAVE_CMSGCRED && !HAVE_GETPEEREID && !HAVE_GETPEERUCRED && !LOCAL_PEEREID*/
|
||||
+#else /* !SO_PEERCRED && !HAVE_CMSGCRED && !HAVE_GETPEEREID && !HAVE_GETPEERUCRED && !LOCAL_PEEREID */
|
||||
_dbus_verbose ("Socket credentials not supported on this OS\n");
|
||||
#endif
|
||||
}
|
||||
@@ -1826,7 +1889,26 @@ _dbus_parse_uid (const DBusString *
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+#ifdef HAVE_NETBSD_ATOMIC_OPS
|
||||
+dbus_int32_t
|
||||
+_dbus_atomic_inc (DBusAtomic *atomic)
|
||||
+{
|
||||
+ register dbus_int32_t old = atomic->value;
|
||||
|
||||
+ atomic_inc_uint((unsigned *)&atomic->value);
|
||||
+ return old;
|
||||
+}
|
||||
+
|
||||
+dbus_int32_t
|
||||
+_dbus_atomic_dec (DBusAtomic *atomic)
|
||||
+{
|
||||
+ register dbus_int32_t old = atomic->value;
|
||||
+
|
||||
+ atomic_dec_uint((unsigned *)&atomic->value);
|
||||
+ return old;
|
||||
+}
|
||||
+_DBUS_DEFINE_GLOBAL_LOCK (atomic);
|
||||
+#else
|
||||
_DBUS_DEFINE_GLOBAL_LOCK (atomic);
|
||||
|
||||
#if DBUS_USE_ATOMIC_INT_486_COND
|
||||
@@ -1891,6 +1973,7 @@ _dbus_atomic_dec (DBusAtomic *atomic)
|
||||
return res;
|
||||
#endif
|
||||
}
|
||||
+#endif /* HAVE_NETBSD_ATOMIC_OPS */
|
||||
|
||||
#ifdef DBUS_BUILD_TESTS
|
||||
/** Gets our GID
|
||||
@@ -2792,8 +2875,18 @@ int
|
||||
_dbus_printf_string_upper_bound (const char *format,
|
||||
va_list args)
|
||||
{
|
||||
+#if defined(__hpux) || defined(__sgi)
|
||||
+/* this code from libnbcompat's vsnprintf */
|
||||
+ static FILE *devnull = 0;
|
||||
+ if (!devnull) {
|
||||
+ devnull = fopen("/dev/null", "w");
|
||||
+ if (!devnull) return -1;
|
||||
+ }
|
||||
+ return vfprintf(devnull, format, args);
|
||||
+#else
|
||||
char c;
|
||||
return vsnprintf (&c, 1, format, args);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,241 +0,0 @@
|
|||
$NetBSD: patch-ac,v 1.9 2010/02/21 19:32:26 tez Exp $
|
||||
|
||||
--- configure.orig 2009-05-06 12:35:38.000000000 -0500
|
||||
+++ configure 2009-12-01 13:23:46.338973100 -0600
|
||||
@@ -6110,6 +6110,224 @@
|
||||
|
||||
need_locks="$enable_libtool_lock"
|
||||
|
||||
+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
|
||||
+ { echo "$as_me:$LINENO: checking for sys/atomic.h" >&5
|
||||
+echo $ECHO_N "checking for sys/atomic.h... $ECHO_C" >&6; }
|
||||
+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
|
||||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
+fi
|
||||
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_atomic_h" >&5
|
||||
+echo "${ECHO_T}$ac_cv_header_sys_atomic_h" >&6; }
|
||||
+else
|
||||
+ # Is the header compilable?
|
||||
+{ echo "$as_me:$LINENO: checking sys/atomic.h usability" >&5
|
||||
+echo $ECHO_N "checking sys/atomic.h usability... $ECHO_C" >&6; }
|
||||
+cat >conftest.$ac_ext <<_ACEOF
|
||||
+/* confdefs.h. */
|
||||
+_ACEOF
|
||||
+cat confdefs.h >>conftest.$ac_ext
|
||||
+cat >>conftest.$ac_ext <<_ACEOF
|
||||
+/* end confdefs.h. */
|
||||
+$ac_includes_default
|
||||
+#include <sys/atomic.h>
|
||||
+_ACEOF
|
||||
+rm -f conftest.$ac_objext
|
||||
+if { (ac_try="$ac_compile"
|
||||
+case "(($ac_try" in
|
||||
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
+ *) ac_try_echo=$ac_try;;
|
||||
+esac
|
||||
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
+ (eval "$ac_compile") 2>conftest.er1
|
||||
+ ac_status=$?
|
||||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||||
+ rm -f conftest.er1
|
||||
+ cat conftest.err >&5
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); } && {
|
||||
+ test -z "$ac_c_werror_flag" ||
|
||||
+ test ! -s conftest.err
|
||||
+ } && test -s conftest.$ac_objext; then
|
||||
+ ac_header_compiler=yes
|
||||
+else
|
||||
+ echo "$as_me: failed program was:" >&5
|
||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||||
+
|
||||
+ ac_header_compiler=no
|
||||
+fi
|
||||
+
|
||||
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
||||
+echo "${ECHO_T}$ac_header_compiler" >&6; }
|
||||
+
|
||||
+# Is the header present?
|
||||
+{ echo "$as_me:$LINENO: checking sys/atomic.h presence" >&5
|
||||
+echo $ECHO_N "checking sys/atomic.h presence... $ECHO_C" >&6; }
|
||||
+cat >conftest.$ac_ext <<_ACEOF
|
||||
+/* confdefs.h. */
|
||||
+_ACEOF
|
||||
+cat confdefs.h >>conftest.$ac_ext
|
||||
+cat >>conftest.$ac_ext <<_ACEOF
|
||||
+/* end confdefs.h. */
|
||||
+#include <sys/atomic.h>
|
||||
+_ACEOF
|
||||
+if { (ac_try="$ac_cpp conftest.$ac_ext"
|
||||
+case "(($ac_try" in
|
||||
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
+ *) ac_try_echo=$ac_try;;
|
||||
+esac
|
||||
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
|
||||
+ ac_status=$?
|
||||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||||
+ rm -f conftest.er1
|
||||
+ cat conftest.err >&5
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); } >/dev/null && {
|
||||
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
|
||||
+ test ! -s conftest.err
|
||||
+ }; then
|
||||
+ ac_header_preproc=yes
|
||||
+else
|
||||
+ echo "$as_me: failed program was:" >&5
|
||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||||
+
|
||||
+ ac_header_preproc=no
|
||||
+fi
|
||||
+
|
||||
+rm -f conftest.err conftest.$ac_ext
|
||||
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
||||
+echo "${ECHO_T}$ac_header_preproc" >&6; }
|
||||
+
|
||||
+# So? What about this header?
|
||||
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
||||
+ yes:no: )
|
||||
+ { echo "$as_me:$LINENO: WARNING: sys/atomic.h: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
+echo "$as_me: WARNING: sys/atomic.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
+ { echo "$as_me:$LINENO: WARNING: sys/atomic.h: proceeding with the compiler's result" >&5
|
||||
+echo "$as_me: WARNING: sys/atomic.h: proceeding with the compiler's result" >&2;}
|
||||
+ ac_header_preproc=yes
|
||||
+ ;;
|
||||
+ no:yes:* )
|
||||
+ { echo "$as_me:$LINENO: WARNING: sys/atomic.h: present but cannot be compiled" >&5
|
||||
+echo "$as_me: WARNING: sys/atomic.h: present but cannot be compiled" >&2;}
|
||||
+ { echo "$as_me:$LINENO: WARNING: sys/atomic.h: check for missing prerequisite headers?" >&5
|
||||
+echo "$as_me: WARNING: sys/atomic.h: check for missing prerequisite headers?" >&2;}
|
||||
+ { echo "$as_me:$LINENO: WARNING: sys/atomic.h: see the Autoconf documentation" >&5
|
||||
+echo "$as_me: WARNING: sys/atomic.h: see the Autoconf documentation" >&2;}
|
||||
+ { echo "$as_me:$LINENO: WARNING: sys/atomic.h: section \"Present But Cannot Be Compiled\"" >&5
|
||||
+echo "$as_me: WARNING: sys/atomic.h: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
+ { echo "$as_me:$LINENO: WARNING: sys/atomic.h: proceeding with the preprocessor's result" >&5
|
||||
+echo "$as_me: WARNING: sys/atomic.h: proceeding with the preprocessor's result" >&2;}
|
||||
+ { echo "$as_me:$LINENO: WARNING: sys/atomic.h: in the future, the compiler will take precedence" >&5
|
||||
+echo "$as_me: WARNING: sys/atomic.h: in the future, the compiler will take precedence" >&2;}
|
||||
+
|
||||
+ ;;
|
||||
+esac
|
||||
+{ echo "$as_me:$LINENO: checking for sys/atomic.h" >&5
|
||||
+echo $ECHO_N "checking for sys/atomic.h... $ECHO_C" >&6; }
|
||||
+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
|
||||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
+else
|
||||
+ ac_cv_header_sys_atomic_h=$ac_header_preproc
|
||||
+fi
|
||||
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_atomic_h" >&5
|
||||
+echo "${ECHO_T}$ac_cv_header_sys_atomic_h" >&6; }
|
||||
+
|
||||
+fi
|
||||
+if test $ac_cv_header_sys_atomic_h = yes; then
|
||||
+ { echo "$as_me:$LINENO: checking for atomic_inc_32_nv" >&5
|
||||
+echo $ECHO_N "checking for atomic_inc_32_nv... $ECHO_C" >&6; }
|
||||
+if test "${ac_cv_func_atomic_inc_32_nv+set}" = set; then
|
||||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
+else
|
||||
+ cat >conftest.$ac_ext <<_ACEOF
|
||||
+/* confdefs.h. */
|
||||
+_ACEOF
|
||||
+cat confdefs.h >>conftest.$ac_ext
|
||||
+cat >>conftest.$ac_ext <<_ACEOF
|
||||
+/* end confdefs.h. */
|
||||
+/* Define atomic_inc_32_nv to an innocuous variant, in case <limits.h> declares atomic_inc_32_nv.
|
||||
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
|
||||
+#define atomic_inc_32_nv innocuous_atomic_inc_32_nv
|
||||
+
|
||||
+/* System header to define __stub macros and hopefully few prototypes,
|
||||
+ which can conflict with char atomic_inc_32_nv (); below.
|
||||
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
+ <limits.h> exists even on freestanding compilers. */
|
||||
+
|
||||
+#ifdef __STDC__
|
||||
+# include <limits.h>
|
||||
+#else
|
||||
+# include <assert.h>
|
||||
+#endif
|
||||
+
|
||||
+#undef atomic_inc_32_nv
|
||||
+
|
||||
+/* Override any GCC internal prototype to avoid an error.
|
||||
+ Use char because int might match the return type of a GCC
|
||||
+ builtin and then its argument prototype would still apply. */
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+#endif
|
||||
+char atomic_inc_32_nv ();
|
||||
+/* The GNU C library defines this for functions which it implements
|
||||
+ to always fail with ENOSYS. Some functions are actually named
|
||||
+ something starting with __ and the normal name is an alias. */
|
||||
+#if defined __stub_atomic_inc_32_nv || defined __stub___atomic_inc_32_nv
|
||||
+choke me
|
||||
+#endif
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+return atomic_inc_32_nv ();
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
+if { (ac_try="$ac_link"
|
||||
+case "(($ac_try" in
|
||||
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
+ *) ac_try_echo=$ac_try;;
|
||||
+esac
|
||||
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
+ (eval "$ac_link") 2>conftest.er1
|
||||
+ ac_status=$?
|
||||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||||
+ rm -f conftest.er1
|
||||
+ cat conftest.err >&5
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); } && {
|
||||
+ test -z "$ac_c_werror_flag" ||
|
||||
+ test ! -s conftest.err
|
||||
+ } && test -s conftest$ac_exeext &&
|
||||
+ $as_test_x conftest$ac_exeext; then
|
||||
+ ac_cv_func_atomic_inc_32_nv=yes
|
||||
+else
|
||||
+ echo "$as_me: failed program was:" >&5
|
||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||||
+
|
||||
+ ac_cv_func_atomic_inc_32_nv=no
|
||||
+fi
|
||||
+
|
||||
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
+ conftest$ac_exeext conftest.$ac_ext
|
||||
+fi
|
||||
+{ echo "$as_me:$LINENO: result: $ac_cv_func_atomic_inc_32_nv" >&5
|
||||
+echo "${ECHO_T}$ac_cv_func_atomic_inc_32_nv" >&6; }
|
||||
+if test $ac_cv_func_atomic_inc_32_nv = yes; then
|
||||
+
|
||||
+cat >>confdefs.h <<\_ACEOF
|
||||
+#define HAVE_NETBSD_ATOMIC_OPS 1
|
||||
+_ACEOF
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+
|
||||
|
||||
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
|
||||
|
||||
@@ -20958,7 +21176,10 @@
|
||||
esac
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wno-pointer-sign[\ \ ]*) ;;
|
||||
- *) CFLAGS="$CFLAGS -Wno-pointer-sign" ;;
|
||||
+ *) if cc_supports_flag -Wno-pointer-sign; then
|
||||
+ CFLAGS="$CFLAGS -Wno-pointer-sign"
|
||||
+ fi
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
# http://bugs.freedesktop.org/show_bug.cgi?id=19195
|
|
@ -1,15 +0,0 @@
|
|||
$NetBSD: patch-ag,v 1.5 2008/08/16 16:38:01 drochner Exp $
|
||||
|
||||
--- tools/dbus-monitor.c.orig 2008-04-04 11:24:08.000000000 -0400
|
||||
+++ tools/dbus-monitor.c
|
||||
@@ -295,8 +295,10 @@ main (int argc, char *argv[])
|
||||
exit (1);
|
||||
}
|
||||
|
||||
+#if 0 /* XXX this doesn't work because the loop around poll() is not left */
|
||||
/* we handle SIGINT so exit() is reached and flushes stdout */
|
||||
signal (SIGINT, sigint_handler);
|
||||
+#endif
|
||||
while (dbus_connection_read_write_dispatch(connection, -1)
|
||||
&& !sigint_received)
|
||||
;
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-ai,v 1.2 2008/06/19 01:56:44 bjs Exp $
|
||||
|
||||
--- config.h.in.orig 2008-04-04 14:24:08.000000000 -0400
|
||||
+++ config.h.in
|
||||
@@ -86,6 +86,8 @@
|
||||
for 486, else 0 */
|
||||
#undef DBUS_USE_ATOMIC_INT_486_COND
|
||||
|
||||
+#undef HAVE_NETBSD_ATOMIC_OPS
|
||||
+
|
||||
/* A 'va_copy' style function */
|
||||
#undef DBUS_VA_COPY
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
$NetBSD: patch-ak,v 1.1 2008/09/24 11:37:31 taca Exp $
|
||||
$NetBSD: patch-ak,v 1.2 2012/08/01 17:52:22 drochner Exp $
|
||||
|
||||
--- dbus/Makefile.in.orig 2008-08-07 04:43:39.000000000 +0900
|
||||
--- dbus/Makefile.in.orig 2012-07-26 16:44:07.000000000 +0000
|
||||
+++ dbus/Makefile.in
|
||||
@@ -310,7 +310,7 @@ top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
configdir = $(sysconfdir)/dbus-1
|
||||
INCLUDES = -I$(top_builddir) -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) @PIC_CFLAGS@ -DDBUS_COMPILATION \
|
||||
- -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \
|
||||
+ -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/db/dbus/machine-id"\" \
|
||||
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
|
||||
-DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\"
|
||||
|
||||
@@ -591,7 +591,7 @@ AM_CPPFLAGS = \
|
||||
$(SYSTEMD_CFLAGS) \
|
||||
$(VALGRIND_CFLAGS) \
|
||||
-DDBUS_COMPILATION \
|
||||
- -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \
|
||||
+ -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/db/dbus/machine-id"\" \
|
||||
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
|
||||
-DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\" \
|
||||
$(NULL)
|
||||
|
|
|
@ -1,24 +1,25 @@
|
|||
$NetBSD: patch-al,v 1.1 2008/09/24 11:37:31 taca Exp $
|
||||
$NetBSD: patch-al,v 1.2 2012/08/01 17:52:22 drochner Exp $
|
||||
|
||||
--- tools/Makefile.in.orig 2008-08-07 04:43:39.000000000 +0900
|
||||
--- tools/Makefile.in.orig 2012-07-26 16:45:13.000000000 +0000
|
||||
+++ tools/Makefile.in
|
||||
@@ -301,7 +301,7 @@ target_vendor = @target_vendor@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
configdir = $(sysconfdir)/dbus-1
|
||||
-INCLUDES = -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"@EXPANDED_DATADIR@/locale\" -DDBUS_COMPILATION -DDBUS_DAEMONDIR=\"@DBUS_DAEMONDIR@\" -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\"
|
||||
+INCLUDES = -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"@EXPANDED_DATADIR@/locale\" -DDBUS_COMPILATION -DDBUS_DAEMONDIR=\"@DBUS_DAEMONDIR@\" -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/db/dbus/machine-id"\"
|
||||
dbus_send_SOURCES = \
|
||||
dbus-print-message.c \
|
||||
dbus-print-message.h \
|
||||
@@ -337,8 +337,8 @@ CLEANFILES = \
|
||||
run-with-tmp-session-bus.conf
|
||||
@@ -358,7 +358,7 @@ AM_CPPFLAGS = \
|
||||
$(DBUS_STATIC_BUILD_CPPFLAGS) \
|
||||
$(DBUS_X_CFLAGS) \
|
||||
-DDBUS_COMPILATION \
|
||||
- -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \
|
||||
+ -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/db/dbus/machine-id"\" \
|
||||
$(NULL)
|
||||
|
||||
|
||||
-#create the /var/lib/data directory for dbus-uuidgen
|
||||
-localstatelibdir = $(localstatedir)/lib/dbus
|
||||
+#create the /var/db/dbus directory for dbus-uuidgen
|
||||
+localstatelibdir = $(localstatedir)/db/dbus
|
||||
localstatelib_DATA =
|
||||
all: all-am
|
||||
@@ -756,9 +756,9 @@ uninstall-am: uninstall-binPROGRAMS
|
||||
uninstall-binPROGRAMS
|
||||
|
||||
|
||||
-# create the /var/lib/dbus directory for dbus-uuidgen
|
||||
+# create the /var/db/dbus directory for dbus-uuidgen
|
||||
install-data-local:
|
||||
- $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/dbus
|
||||
+ $(MKDIR_P) $(DESTDIR)$(localstatedir)/db/dbus
|
||||
|
||||
installcheck-local:
|
||||
test -d $(DESTDIR)$(localstatedir)/lib/dbus
|
||||
|
|
31
sysutils/dbus/patches/patch-ba
Normal file
31
sysutils/dbus/patches/patch-ba
Normal file
|
@ -0,0 +1,31 @@
|
|||
$NetBSD: patch-ba,v 1.2 2012/08/01 17:52:22 drochner Exp $
|
||||
|
||||
--- tools/dbus-monitor.c.orig 2012-07-26 17:37:48.000000000 +0000
|
||||
+++ tools/dbus-monitor.c
|
||||
@@ -107,7 +107,7 @@ monitor_filter_func (DBusConnection
|
||||
#ifdef __APPLE__
|
||||
#define PROFILE_TIMED_FORMAT "%s\t%lu\t%d"
|
||||
#else
|
||||
-#define PROFILE_TIMED_FORMAT "%s\t%lu\t%lu"
|
||||
+#define PROFILE_TIMED_FORMAT "%s\t%llu\t%lu"
|
||||
#endif
|
||||
#define TRAP_NULL_STRING(str) ((str) ? (str) : "<none>")
|
||||
|
||||
@@ -127,7 +127,7 @@ static void
|
||||
profile_print_with_attrs (const char *type, DBusMessage *message,
|
||||
struct timeval *t, ProfileAttributeFlags attrs)
|
||||
{
|
||||
- printf (PROFILE_TIMED_FORMAT, type, t->tv_sec, t->tv_usec);
|
||||
+ printf (PROFILE_TIMED_FORMAT, type, (unsigned long long)(t->tv_sec), (unsigned long)(t->tv_usec));
|
||||
|
||||
if (attrs & PROFILE_ATTRIBUTE_FLAG_SERIAL)
|
||||
printf ("\t%u", dbus_message_get_serial (message));
|
||||
@@ -197,7 +197,7 @@ print_message_profile (DBusMessage *mess
|
||||
PROFILE_ATTRIBUTE_FLAG_MEMBER);
|
||||
break;
|
||||
default:
|
||||
- printf (PROFILE_TIMED_FORMAT "\n", "tun", t.tv_sec, t.tv_usec);
|
||||
+ printf (PROFILE_TIMED_FORMAT "\n", "tun", (unsigned long long)(t.tv_sec), (unsigned long)(t.tv_usec));
|
||||
break;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue