Can we block or drop a special dbus connection?

WaLyong Cho walyong.cho at samsung.com
Tue Feb 3 00:28:12 PST 2015


On 02/02/2015 07:57 PM, Simon McVittie wrote:
> 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?

Our system is using cgroup freezer. When some of processes(what have
connection with dbus.) had be freezed, if non-freezed process send a
message to freezed process then timeout will be occurred. I hope that
just be returned with some of error message.

>> 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.

I don't know well about Android. But, blocking intent functionality was
added recently.
And if possible, in some of special state(power saving mode in mobile
phone), we can block unwanted dbus auto activation.


Thanks for your reply,
WaLyong

> 
>     S
> 
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
> 


More information about the dbus mailing list