From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 71969@debbugs.gnu.org, steven@stebalien.com
Subject: bug#71969: [PATCH] Support interactive D-Bus authentication
Date: Sat, 06 Jul 2024 17:24:45 +0200 [thread overview]
Message-ID: <877cdy1r2a.fsf@gmx.de> (raw)
In-Reply-To: <86v81i36vh.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 06 Jul 2024 17:57:54 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli,
>> > Furthermore, does exist dbus_message_set_allow_interactive_authorization
>> > "since ever"? Or shall we check for the existence in configure.ac, like
>> > we do it with other dbus_* functions?
>>
>> I've just checked the dbus git repo.
>> dbus_message_set_allow_interactive_authorization was added in
>> D-Bus 1.8.10, so we need a check in configure.ac.
>
> Is this really a build-time condition, not a run-time condition? Can
> we know in advance which version of D-Bus will be used at run time?
Well, we must call this function, or not, in dbusbind.c. Of course it
depends on the libdbus-1.so version whether it is available at
runtime. But we must know already at build time, whether the function is
offered via /usr/include/dbus-1.0/dbus/dbus-message.h. Otherwise, the
function call would result in a compiler error.
So it is a build time dependency. We do a similar check for other D-Bus
functions in configure.ac, see this snippet:
--8<---------------cut here---------------start------------->8---
AC_CHECK_FUNCS([dbus_watch_get_unix_fd \
dbus_type_is_valid \
dbus_validate_bus_name \
dbus_validate_path \
dbus_validate_interface \
dbus_validate_member])
--8<---------------cut here---------------end--------------->8---
And in dbusbind.c, we have then code like
--8<---------------cut here---------------start------------->8---
#if HAVE_DBUS_WATCH_GET_UNIX_FD
/* TODO: Reverse these on w32, which prefers the opposite. */
int fd = dbus_watch_get_unix_fd (watch);
if (fd == -1)
fd = dbus_watch_get_socket (watch);
#else
int fd = dbus_watch_get_fd (watch);
#endif
--8<---------------cut here---------------end--------------->8---
Of course there is the risk, that Emacs is compiled with a function call
(based on an include file), which does not exist at runtime, because the
Emacs program runs somewhere else. OTOH, D-Bus 1.8.10 was tagged in the
D-Bus git on "Thu Nov 6 15:39:51 2014 +0000". The likelihood, that we run
into problems, is small, and the check in configure.ac is just "to be
sure".
Best regards, Michael.
next prev parent reply other threads:[~2024-07-06 15:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-06 7:53 bug#71969: [PATCH] Support interactive D-Bus authentication Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-06 11:54 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-06 14:53 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-06 14:57 ` Eli Zaretskii
2024-07-06 15:24 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-07-07 11:53 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-07 14:50 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08 9:24 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08 12:29 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08 12:50 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08 13:21 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 7:52 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 9:09 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 12:10 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 15:45 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 19:28 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 19:34 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 19:54 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877cdy1r2a.fsf@gmx.de \
--to=bug-gnu-emacs@gnu.org \
--cc=71969@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=michael.albinus@gmx.de \
--cc=steven@stebalien.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.