Re: Can we block or drop a special dbus connection?

Simon McVittie <simon.mcvittie-ZGY8ohtN/[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Organization Collabora Ltd.
Message-ID <[email protected]>
On 02/02/15 07:29, WaLyong Cho wrote:
> A process has a dbus connection. And this process was gone to
> unreasonable state by any reason. And the other system daemon or
> itself(who the owner of the connection) notify to dbus daemon about this
> connection is not reachable now. So any message should be dropped. Then
> dbus daemon will drop any messages to the connection.

So... you want an IPC call that will create a denial of service
on-demand? :-)

What is your use-case here? Why would you want to do this?

> Does dbus already have this functionality? or similar?

The process owning the connection can stop receiving messages by
disconnecting from D-Bus. (You will need to turn off exit-on-disconnect
first, so that libdbus doesn't call _exit() when disconnection succeeds,
or so that GDBus doesn't call raise(SIGTERM).)

Other processes cannot do that, except by killing the owner of the
problematic connection, or taking control over it with ptrace or similar.

If this is intended as a way to stop a buggy process from using
resources, I would suggest just killing it with SIGTERM (or SIGKILL). If
not, you'll need to explain what you want before I can suggest a good
way to achieve it.

    S

_______________________________________________
dbus mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.