Tue Mar 8 11:16:01 2022 UTC ()
dbus: update to 1.14.0.

1.14.x is a new stable branch, superseding 1.12.x.

Summary of major changes between 1.12.x and 1.14.0
--------------------------------------------------

Dependencies:

• On Unix platforms, if getpwnam_r() and getgrnam_r() are implemented,
  they must be POSIX-conformant. The non-POSIX signature seen in ancient
  Solaris versions will no longer work.

...

Deprecations:

• Third-party software should install default dbus policies for the system
  bus into ${datadir}/dbus-1/system.d (this has been supported since dbus
  1.10, released in August 2015). Installing default dbus policies in
  ${sysconfdir}/dbus-1/system.d is now considered to be deprecated. Policy
  files in ${sysconfdir}/dbus-1/system.d continue to be read, but this
  directory should only be used by system administrators wishing to
  override the default policies.

  The ${datadir} applicable to dbus is usually /usr/share and the
  ${sysconfdir} is usually /etc.

• A similar pattern applies to the session bus policies in session.d.

• The dbus-send(1) man page now documents --bus and --peer instead of
  the old --address synonym for --peer, which has been deprecated since
  the introduction of --bus and --peer in 1.7.6

• The dbus-daemon man page now has scarier warnings about
  <allow_anonymous/> and non-local TCP, which are insecure and should
  not be used, particularly for the standard system and session buses

• DBusServer (and hence the dbus-daemon) no longer accepts usernames
  (login names) for the recommended EXTERNAL authentication mechanism,
  only numeric user IDs or the empty string. See 1.13.0 release notes
  for full details.

New features:

• On Linux 4.13 or later when built against a suitable glibc version,
  GetConnectionCredentials() now includes UnixGroupIDs, the effective
  group IDs of the initiator of the connection, taken from
  SO_PEERGROUPS.

• On Linux 4.13 or later, <policy group="…"> now uses the SO_PEERGROUPS
  credentials-passing socket option to get the effective group IDs
  of the initiator of the connection. See 1.13.4 release notes for details.

• Add a --sender option to dbus-send, which requests a name and holds it
  until the signal has been sent

• dbus-daemon <allow> and <deny> rules can now specify a
  send_destination_prefix attribute, which is like a combination of
  send_destination and the arg0namespace keyword in match rules.
  See 1.13.12 release notes for more details

• The dbus-daemon now filters the messages that it relays, removing
  header fields that it does not understand. Clients must not rely on
  this behaviour unless they have confirmed that they are connected to
  a suitable message bus implementation, for example by querying its
  Features property.

• The dbus-daemon now emits a signal, ActivatableServicesChanged, when
  the list of activatable services may have changed. Support for this
  signal can be discovered by querying the Features property.

• It is now possible to disable traditional (non-systemd) service
  activation at build-time (Autotools: --disable-traditional-activation,
  CMake: -DENABLE_TRADITIONAL_ACTIVATION=OFF). See 1.13.10 release notes
  for details.

• The API reference manual can be built as a Qt compiled help file if
  qhelpgenerator(-qt5) is available. See 1.13.16 release notes for details.

Miscellaneous behaviour changes:

• When using the "user bus" (--enable-user-session), put the dbus-daemon
  in the session slice

• Several environment variables set by systemd are no longer passed
  on to activated services

• If the dbus-daemon is compiled for Linux with systemd support, it
  now informs systemd that it is ready for use via the sd_notify()
  mechanism


(wiz)
diff -r1.128 -r1.129 pkgsrc/sysutils/dbus/Makefile
diff -r1.21 -r1.22 pkgsrc/sysutils/dbus/PLIST
diff -r1.97 -r1.98 pkgsrc/sysutils/dbus/distinfo
diff -r1.4 -r1.5 pkgsrc/sysutils/dbus/patches/patch-dbus_dbus-sysdeps-util-unix.c

cvs diff -r1.128 -r1.129 pkgsrc/sysutils/dbus/Makefile (switch to unified diff)

--- pkgsrc/sysutils/dbus/Makefile 2022/01/27 09:02:58 1.128
+++ pkgsrc/sysutils/dbus/Makefile 2022/03/08 11:16:00 1.129
@@ -1,116 +1,116 @@ @@ -1,116 +1,116 @@
1# $NetBSD: Makefile,v 1.128 2022/01/27 09:02:58 nros Exp $ 1# $NetBSD: Makefile,v 1.129 2022/03/08 11:16:00 wiz Exp $
2 2
3DISTNAME= dbus-1.12.20 3DISTNAME= dbus-1.14.0
4PKGREVISION= 2 
5CATEGORIES= sysutils 4CATEGORIES= sysutils
6MASTER_SITES= http://dbus.freedesktop.org/releases/dbus/ 5MASTER_SITES= https://dbus.freedesktop.org/releases/dbus/
 6EXTRACT_SUFX= .tar.xz
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= https://www.freedesktop.org/Software/dbus 9HOMEPAGE= https://www.freedesktop.org/Software/dbus
10COMMENT= Message bus system 10COMMENT= Message bus system
11LICENSE= gnu-gpl-v2 11LICENSE= gnu-gpl-v2
12 12
13CONFLICTS+= dbus-glib<0.71 13CONFLICTS+= dbus-glib<0.71
14CONFLICTS+= py27-dbus<0.71 14CONFLICTS+= py27-dbus<0.71
15 15
16BUILD_DEPENDS+= xmlto-[0-9]*:../../textproc/xmlto 16BUILD_DEPENDS+= xmlto-[0-9]*:../../textproc/xmlto
17 17
18GNU_CONFIGURE= YES 18GNU_CONFIGURE= YES
19USE_TOOLS+= gmake msgfmt pkg-config 19USE_TOOLS+= gmake msgfmt pkg-config
20USE_LIBTOOL= YES 20USE_LIBTOOL= YES
21 21
22PKGCONFIG_OVERRIDE= dbus-1.pc.in 22PKGCONFIG_OVERRIDE= dbus-1.pc.in
23 23
24BUILD_DEFS+= VARBASE PKG_SYSCONFBASE 24BUILD_DEFS+= VARBASE PKG_SYSCONFBASE
25 25
26OWN_DIRS_PERMS+= ${VARBASE}/lib/dbus ${DBUS_USER} ${DBUS_GROUP} 0755 26OWN_DIRS_PERMS+= ${VARBASE}/lib/dbus ${DBUS_USER} ${DBUS_GROUP} 0755
27SPECIAL_PERMS+= libexec/dbus-daemon-launch-helper ${REAL_ROOT_USER} ${DBUS_GROUP} 4511 27SPECIAL_PERMS+= libexec/dbus-daemon-launch-helper ${REAL_ROOT_USER} ${DBUS_GROUP} 4511
28 28
29SMF_METHODS= dbus 29SMF_METHODS= dbus
30SMF_NAME= dbus 30SMF_NAME= dbus
31 31
32.include "../../mk/bsd.prefs.mk" 32.include "../../mk/bsd.prefs.mk"
33 33
34.if ${INIT_SYSTEM} == "rc.d" 34.if ${INIT_SYSTEM} == "rc.d"
35MESSAGE_SRC+= MESSAGE.rcd 35MESSAGE_SRC+= MESSAGE.rcd
36.endif 36.endif
37 37
38CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q} 38CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}
39 39
40# Prevent the configure script from picking up a per-user tmp 40# Prevent the configure script from picking up a per-user tmp
41# directory. See the commit message on revision 1.35 41# directory. See the commit message on revision 1.35
42CONFIGURE_ARGS+= --with-session-socket-dir=/tmp 42CONFIGURE_ARGS+= --with-session-socket-dir=/tmp
43 43
44CONFIGURE_ARGS+= --disable-ansi 44CONFIGURE_ARGS+= --disable-ansi
45CONFIGURE_ARGS+= --disable-console-owner-file 45CONFIGURE_ARGS+= --disable-console-owner-file
46CONFIGURE_ARGS+= --disable-doxygen-docs 46CONFIGURE_ARGS+= --disable-doxygen-docs
47CONFIGURE_ARGS+= --enable-checks 47CONFIGURE_ARGS+= --enable-checks
48CONFIGURE_ARGS+= --enable-static 48CONFIGURE_ARGS+= --enable-static
49 49
50### 50###
51### XXX the spawn test hangs, and some of these tests may be bogus 51### XXX the spawn test hangs, and some of these tests may be bogus
52### 52###
53#.if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss]) 53#.if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss])
54#PKG_OPTIONS.dbus+= debug 54#PKG_OPTIONS.dbus+= debug
55#TEST_TARGET= check 55#TEST_TARGET= check
56#.endif 56#.endif
57 57
58CONFIGURE_ARGS+= --with-dbus-user=${DBUS_USER} 58CONFIGURE_ARGS+= --with-dbus-user=${DBUS_USER}
59CONFIGURE_ARGS+= --with-test-socket-dir=${WRKDIR:Q} 59CONFIGURE_ARGS+= --with-test-socket-dir=${WRKDIR:Q}
60 60
61SUBST_CLASSES+= docbook 61SUBST_CLASSES+= docbook
62SUBST_STAGE.docbook= pre-configure 62SUBST_STAGE.docbook= pre-configure
63SUBST_FILES.docbook= doc/*.xml* 63SUBST_FILES.docbook= doc/*.xml*
64SUBST_SED.docbook= -e 's,http://www.oasis-open.org/docbook/xml,${PREFIX}/share/xml/docbook,g' 64SUBST_SED.docbook= -e 's,http://www.oasis-open.org/docbook/xml,${PREFIX}/share/xml/docbook,g'
65 65
66PTHREAD_AUTO_VARS= yes 66PTHREAD_AUTO_VARS= yes
67 67
68.if ${OPSYS} == "Linux" 68.if ${OPSYS} == "Linux"
69# not currently used 69# not currently used
70#PLIST.linux= yes 70#PLIST.linux= yes
71.else 71.else
72CONFIGURE_ARGS+= --disable-selinux 72CONFIGURE_ARGS+= --disable-selinux
73.endif 73.endif
74 74
75DBUS_CONF_DIR= ${PKG_SYSCONFBASE}/dbus-1 75DBUS_CONF_DIR= ${PKG_SYSCONFBASE}/dbus-1
76OWN_DIRS+= ${DBUS_CONF_DIR}/services 76OWN_DIRS+= ${DBUS_CONF_DIR}/services
77OWN_DIRS+= ${DBUS_CONF_DIR}/system-services 77OWN_DIRS+= ${DBUS_CONF_DIR}/system-services
78OWN_DIRS+= ${DBUS_CONF_DIR}/session.d 78OWN_DIRS+= ${DBUS_CONF_DIR}/session.d
79OWN_DIRS+= ${DBUS_CONF_DIR}/system.d 79OWN_DIRS+= ${DBUS_CONF_DIR}/system.d
80 80
81RCD_SCRIPTS= dbus 81RCD_SCRIPTS= dbus
82 82
83PKG_GROUPS_VARS+= DBUS_GROUP 83PKG_GROUPS_VARS+= DBUS_GROUP
84PKG_USERS_VARS+= DBUS_USER 84PKG_USERS_VARS+= DBUS_USER
85 85
86PKG_GROUPS= ${DBUS_GROUP} 86PKG_GROUPS= ${DBUS_GROUP}
87PKG_USERS= ${DBUS_USER}:${DBUS_GROUP} 87PKG_USERS= ${DBUS_USER}:${DBUS_GROUP}
88PKG_GECOS.${DBUS_USER}= System message bus 88PKG_GECOS.${DBUS_USER}= System message bus
89PKG_HOME.${DBUS_USER}= ${VARBASE}/run/dbus 89PKG_HOME.${DBUS_USER}= ${VARBASE}/run/dbus
90 90
91FILES_SUBST+= DBUS_USER=${DBUS_USER} 91FILES_SUBST+= DBUS_USER=${DBUS_USER}
92FILES_SUBST+= DBUS_GROUP=${DBUS_GROUP} 92FILES_SUBST+= DBUS_GROUP=${DBUS_GROUP}
93 93
94BUILDLINK_TRANSFORM+= rm:-Wl,--gc-sections 94BUILDLINK_TRANSFORM+= rm:-Wl,--gc-sections
95.if !empty(_PKGSRC_MKPIE:M[Nn][Oo]) 95.if !empty(_PKGSRC_MKPIE:M[Nn][Oo])
96# Package tries to use these if gcc accepts them, but that doesn't 96# Package tries to use these if gcc accepts them, but that doesn't
97# mean that we universally can *run* the executables 97# mean that we universally can *run* the executables
98BUILDLINK_TRANSFORM+= rm:-fPIE 98BUILDLINK_TRANSFORM+= rm:-fPIE
99BUILDLINK_TRANSFORM+= rm:-pie 99BUILDLINK_TRANSFORM+= rm:-pie
100.endif 100.endif
101 101
102BUILDLINK_TRANSFORM.OpenBSD+= rm:-lrt 102BUILDLINK_TRANSFORM.OpenBSD+= rm:-lrt
103 103
104.include "options.mk" 104.include "options.mk"
105 105
106post-install: 106post-install:
107 ${INSTALL_DATA} ${WRKSRC}/doc/introspect.* \ 107 ${INSTALL_DATA} ${WRKSRC}/doc/introspect.* \
108 ${DESTDIR}${PREFIX}/share/doc/dbus/ 108 ${DESTDIR}${PREFIX}/share/doc/dbus/
109 ${RM} -f ${DESTDIR}${PREFIX}/etc/dbus-1/s*.conf 109 ${RM} -f ${DESTDIR}${PREFIX}/etc/dbus-1/s*.conf
110 ${RMDIR} ${DESTDIR}${PREFIX}/etc/dbus-1 || ${TRUE} 110 ${RMDIR} ${DESTDIR}${PREFIX}/etc/dbus-1 || ${TRUE}
111 111
112.include "../../mk/pthread.buildlink3.mk" 112.include "../../mk/pthread.buildlink3.mk"
113.include "../../devel/gettext-lib/buildlink3.mk" 113.include "../../devel/gettext-lib/buildlink3.mk"
114BUILDLINK_API_DEPENDS.expat+= expat>=2.1.0 114BUILDLINK_API_DEPENDS.expat+= expat>=2.1.0
115.include "../../textproc/expat/buildlink3.mk" 115.include "../../textproc/expat/buildlink3.mk"
116.include "../../mk/bsd.pkg.mk" 116.include "../../mk/bsd.pkg.mk"

cvs diff -r1.21 -r1.22 pkgsrc/sysutils/dbus/PLIST (switch to unified diff)

--- pkgsrc/sysutils/dbus/PLIST 2017/11/23 14:43:23 1.21
+++ pkgsrc/sysutils/dbus/PLIST 2022/03/08 11:16:00 1.22
@@ -1,68 +1,70 @@ @@ -1,68 +1,70 @@
1@comment $NetBSD: PLIST,v 1.21 2017/11/23 14:43:23 wiz Exp $ 1@comment $NetBSD: PLIST,v 1.22 2022/03/08 11:16:00 wiz Exp $
2${PLIST.launchd}Library/LaunchAgents/org.freedesktop.dbus-session.plist 2${PLIST.launchd}Library/LaunchAgents/org.freedesktop.dbus-session.plist
3bin/dbus-cleanup-sockets 3bin/dbus-cleanup-sockets
4bin/dbus-daemon 4bin/dbus-daemon
5bin/dbus-launch 5bin/dbus-launch
6bin/dbus-monitor 6bin/dbus-monitor
7bin/dbus-run-session 7bin/dbus-run-session
8bin/dbus-send 8bin/dbus-send
9bin/dbus-test-tool 9bin/dbus-test-tool
10bin/dbus-update-activation-environment 10bin/dbus-update-activation-environment
11bin/dbus-uuidgen 11bin/dbus-uuidgen
12include/dbus-1.0/dbus/dbus-address.h 12include/dbus-1.0/dbus/dbus-address.h
13include/dbus-1.0/dbus/dbus-bus.h 13include/dbus-1.0/dbus/dbus-bus.h
14include/dbus-1.0/dbus/dbus-connection.h 14include/dbus-1.0/dbus/dbus-connection.h
15include/dbus-1.0/dbus/dbus-errors.h 15include/dbus-1.0/dbus/dbus-errors.h
16include/dbus-1.0/dbus/dbus-macros.h 16include/dbus-1.0/dbus/dbus-macros.h
17include/dbus-1.0/dbus/dbus-memory.h 17include/dbus-1.0/dbus/dbus-memory.h
18include/dbus-1.0/dbus/dbus-message.h 18include/dbus-1.0/dbus/dbus-message.h
19include/dbus-1.0/dbus/dbus-misc.h 19include/dbus-1.0/dbus/dbus-misc.h
20include/dbus-1.0/dbus/dbus-pending-call.h 20include/dbus-1.0/dbus/dbus-pending-call.h
21include/dbus-1.0/dbus/dbus-protocol.h 21include/dbus-1.0/dbus/dbus-protocol.h
22include/dbus-1.0/dbus/dbus-server.h 22include/dbus-1.0/dbus/dbus-server.h
23include/dbus-1.0/dbus/dbus-shared.h 23include/dbus-1.0/dbus/dbus-shared.h
24include/dbus-1.0/dbus/dbus-signature.h 24include/dbus-1.0/dbus/dbus-signature.h
25include/dbus-1.0/dbus/dbus-syntax.h 25include/dbus-1.0/dbus/dbus-syntax.h
26include/dbus-1.0/dbus/dbus-threads.h 26include/dbus-1.0/dbus/dbus-threads.h
27include/dbus-1.0/dbus/dbus-types.h 27include/dbus-1.0/dbus/dbus-types.h
28include/dbus-1.0/dbus/dbus.h 28include/dbus-1.0/dbus/dbus.h
29lib/cmake/DBus1/DBus1Config.cmake 29lib/cmake/DBus1/DBus1Config.cmake
30lib/cmake/DBus1/DBus1ConfigVersion.cmake 30lib/cmake/DBus1/DBus1ConfigVersion.cmake
31lib/dbus-1.0/include/dbus/dbus-arch-deps.h 31lib/dbus-1.0/include/dbus/dbus-arch-deps.h
32lib/libdbus-1.la 32lib/libdbus-1.la
33lib/pkgconfig/dbus-1.pc 33lib/pkgconfig/dbus-1.pc
34libexec/dbus-daemon-launch-helper 34libexec/dbus-daemon-launch-helper
35man/man1/dbus-cleanup-sockets.1 35man/man1/dbus-cleanup-sockets.1
36man/man1/dbus-daemon.1 36man/man1/dbus-daemon.1
37man/man1/dbus-launch.1 37man/man1/dbus-launch.1
38man/man1/dbus-monitor.1 38man/man1/dbus-monitor.1
39man/man1/dbus-run-session.1 39man/man1/dbus-run-session.1
40man/man1/dbus-send.1 40man/man1/dbus-send.1
41man/man1/dbus-test-tool.1 41man/man1/dbus-test-tool.1
42man/man1/dbus-update-activation-environment.1 42man/man1/dbus-update-activation-environment.1
43man/man1/dbus-uuidgen.1 43man/man1/dbus-uuidgen.1
44share/dbus-1/session.conf 44share/dbus-1/session.conf
45share/dbus-1/system.conf 45share/dbus-1/system.conf
46share/doc/dbus/dbus-cleanup-sockets.1.html 46share/doc/dbus/dbus-cleanup-sockets.1.html
47share/doc/dbus/dbus-daemon.1.html 47share/doc/dbus/dbus-daemon.1.html
48share/doc/dbus/dbus-faq.html 48share/doc/dbus/dbus-faq.html
49share/doc/dbus/dbus-launch.1.html 49share/doc/dbus/dbus-launch.1.html
50share/doc/dbus/dbus-monitor.1.html 50share/doc/dbus/dbus-monitor.1.html
51share/doc/dbus/dbus-run-session.1.html 51share/doc/dbus/dbus-run-session.1.html
52share/doc/dbus/dbus-send.1.html 52share/doc/dbus/dbus-send.1.html
53share/doc/dbus/dbus-specification.html 53share/doc/dbus/dbus-specification.html
54share/doc/dbus/dbus-test-plan.html 54share/doc/dbus/dbus-test-plan.html
55share/doc/dbus/dbus-test-tool.1.html 55share/doc/dbus/dbus-test-tool.1.html
56share/doc/dbus/dbus-tutorial.html 56share/doc/dbus/dbus-tutorial.html
57share/doc/dbus/dbus-update-activation-environment.1.html 57share/doc/dbus/dbus-update-activation-environment.1.html
58share/doc/dbus/dbus-uuidgen.1.html 58share/doc/dbus/dbus-uuidgen.1.html
59share/doc/dbus/diagram.png 59share/doc/dbus/diagram.png
60share/doc/dbus/diagram.svg 60share/doc/dbus/diagram.svg
61share/doc/dbus/examples/GetAllMatchRules.py 61share/doc/dbus/examples/GetAllMatchRules.py
62share/doc/dbus/examples/example-session-disable-stats.conf 62share/doc/dbus/examples/example-session-disable-stats.conf
63share/doc/dbus/examples/example-system-enable-stats.conf 63share/doc/dbus/examples/example-system-enable-stats.conf
 64share/doc/dbus/examples/example-system-hardening-without-traditional-activation.conf
64share/doc/dbus/introspect.dtd 65share/doc/dbus/introspect.dtd
65share/doc/dbus/introspect.xsl 66share/doc/dbus/introspect.xsl
66share/doc/dbus/system-activation.txt 67share/doc/dbus/system-activation.txt
67share/xml/dbus-1/busconfig.dtd 68share/xml/dbus-1/busconfig.dtd
 69share/xml/dbus-1/catalog.xml
68share/xml/dbus-1/introspect.dtd 70share/xml/dbus-1/introspect.dtd

cvs diff -r1.97 -r1.98 pkgsrc/sysutils/dbus/distinfo (switch to unified diff)

--- pkgsrc/sysutils/dbus/distinfo 2021/10/26 11:19:28 1.97
+++ pkgsrc/sysutils/dbus/distinfo 2022/03/08 11:16:00 1.98
@@ -1,9 +1,8 @@ @@ -1,9 +1,8 @@
1$NetBSD: distinfo,v 1.97 2021/10/26 11:19:28 nia Exp $ 1$NetBSD: distinfo,v 1.98 2022/03/08 11:16:00 wiz Exp $
2 2
3BLAKE2s (dbus-1.12.20.tar.gz) = 48094ee2b00de08613c83e926db5f36f9c004bb07dc394b953a5680d16095ab4 3BLAKE2s (dbus-1.14.0.tar.xz) = 5440d545926ad199ac0a523aa81a737ff84274f5a4a16a1cbd3f1eea8da2c621
4SHA512 (dbus-1.12.20.tar.gz) = 0964683bc6859374cc94e42e1ec0cdb542cca67971c205fcba4352500b6c0891665b0718e7d85eb060c81cb82e3346c313892bc02384da300ddd306c7eef0056 4SHA512 (dbus-1.14.0.tar.xz) = 9bf17a3ebb3cf44722c6fbf24ee56e9dc14d6882fc312f26c7f07459d969424bc2fb63a229139e011804ecc479a8f0eb1a0c83286f8d5a664c5979d12634179f
5Size (dbus-1.12.20.tar.gz) = 2095511 bytes 5Size (dbus-1.14.0.tar.xz) = 1360228 bytes
6SHA1 (patch-am) = ed334bc76911c9db9f5472c58fb762c56255c5b4 
7SHA1 (patch-configure) = 9dee6306aa07b60449a0f9f0f1ea3dccbc70dcb4 6SHA1 (patch-configure) = 9dee6306aa07b60449a0f9f0f1ea3dccbc70dcb4
8SHA1 (patch-dbus_dbus-sysdeps-unix.c) = 3dfc60eba7ab9d5a29d2a842ce0baa1b109df716 7SHA1 (patch-dbus_dbus-sysdeps-unix.c) = 3dfc60eba7ab9d5a29d2a842ce0baa1b109df716
9SHA1 (patch-dbus_dbus-sysdeps-util-unix.c) = 1a25e53514064e452a207ad8b2a0057c11d5c190 8SHA1 (patch-dbus_dbus-sysdeps-util-unix.c) = a99de7c8abb77940000814f593416d21ae234193

cvs diff -r1.4 -r1.5 pkgsrc/sysutils/dbus/patches/patch-dbus_dbus-sysdeps-util-unix.c (switch to unified diff)

--- pkgsrc/sysutils/dbus/patches/patch-dbus_dbus-sysdeps-util-unix.c 2017/11/23 14:43:23 1.4
+++ pkgsrc/sysutils/dbus/patches/patch-dbus_dbus-sysdeps-util-unix.c 2022/03/08 11:16:00 1.5
@@ -1,57 +1,57 @@ @@ -1,57 +1,57 @@
1$NetBSD: patch-dbus_dbus-sysdeps-util-unix.c,v 1.4 2017/11/23 14:43:23 wiz Exp $ 1$NetBSD: patch-dbus_dbus-sysdeps-util-unix.c,v 1.5 2022/03/08 11:16:00 wiz Exp $
2 2
3add solaris specific console_user test 3add solaris specific console_user test
4 4
5--- dbus/dbus-sysdeps-util-unix.c.orig 2017-10-30 12:26:18.000000000 +0000 5--- dbus/dbus-sysdeps-util-unix.c.orig 2022-02-23 14:39:11.000000000 +0000
6+++ dbus/dbus-sysdeps-util-unix.c 6+++ dbus/dbus-sysdeps-util-unix.c
7@@ -51,6 +51,10 @@ 7@@ -56,6 +56,10 @@
8 #include <dirent.h> 8 #include <sys/prctl.h>
9 #include <sys/un.h> 9 #endif
10  10
11+#if defined(__sun) && defined(__SVR4) 11+#if defined(__sun) && defined(__SVR4)
12+#include <pwd.h> 12+#include <pwd.h>
13+#endif 13+#endif
14+ 14+
15 #ifdef HAVE_SYS_SYSLIMITS_H 15 #ifdef HAVE_SYS_SYSLIMITS_H
16 #include <sys/syslimits.h> 16 #include <sys/syslimits.h>
17 #endif 17 #endif
18@@ -551,8 +555,31 @@ _dbus_user_at_console (const char *usern 18@@ -581,8 +585,31 @@ _dbus_user_at_console (const char *usern
19 #ifdef DBUS_CONSOLE_AUTH_DIR 19 #ifdef DBUS_CONSOLE_AUTH_DIR
20 DBusString u, f; 20 DBusString u, f;
21 dbus_bool_t result; 21 dbus_bool_t result;
22+#if defined(__sun) && defined(__SVR4) 22+#if defined(__sun) && defined(__SVR4)
23+ struct passwd *passwd_entry; 23+ struct passwd *passwd_entry;
24+#endif 24+#endif
25  25
26 result = FALSE; 26 result = FALSE;
27+ 27+
28+#if defined(__sun) && defined(__SVR4) 28+#if defined(__sun) && defined(__SVR4)
29+ passwd_entry = getpwnam (username); 29+ passwd_entry = getpwnam (username);
30+ if (passwd_entry != NULL) 30+ if (passwd_entry != NULL)
31+ { 31+ {
32+ struct stat st; 32+ struct stat st;
33+ uid_t uid; 33+ uid_t uid;
34+ 34+
35+ uid = passwd_entry->pw_uid; 35+ uid = passwd_entry->pw_uid;
36+ 36+
37+ if (stat ("/dev/vt/console_user", &st) == 0 && st.st_uid == uid) 37+ if (stat ("/dev/vt/console_user", &st) == 0 && st.st_uid == uid)
38+ { 38+ {
39+ /* 39+ /*
40+ * Owner is allowed to take over. Before we have real 40+ * Owner is allowed to take over. Before we have real
41+ * ownership in HAL, assume it's the console owner. 41+ * ownership in HAL, assume it's the console owner.
42+ */ 42+ */
43+ result = TRUE; 43+ result = TRUE;
44+ } 44+ }
45+ } 45+ }
46+#else 46+#else
47 if (!_dbus_string_init (&f)) 47 if (!_dbus_string_init (&f))
48 { 48 {
49 _DBUS_SET_OOM (error); 49 _DBUS_SET_OOM (error);
50@@ -577,6 +604,7 @@ _dbus_user_at_console (const char *usern 50@@ -607,6 +634,7 @@ _dbus_user_at_console (const char *usern
51  51
52 out: 52 out:
53 _dbus_string_free (&f); 53 _dbus_string_free (&f);
54+#endif 54+#endif
55  55
56 return result; 56 return result;
57 #else 57 #else