[lxc-users] DBUS connection from inside container using system dbus

Adithya K linux.challenge1 at gmail.com
Fri Mar 10 13:45:56 UTC 2017


Hi All,

 Thanks for the response but no luck. Few clarification,

1: I tried to use UID with lower range(1000), but still same issue. From
this I don't think it is UID range issue.
2: /var/run/dbus/system_bus_socket has complete permission.
  srwxrwxrwx 1 root root 0 Feb  9 00:21 /var/run/dbus/system_bus_socket
3: I tried even with DBUS_BUS_SESSION, DBUS_BUS_SYSTEM, DBUS_BUS_STARTER.
dbus_bus_get fails for all.

 I am using http://www.matthew.ath.cx/projects.git/dbus-example.c code for
testing. Has for any one dbus is working when container is started as non
privilage mode. I am trying to connect dbus from inside container to
outside using dbus,and using busybox template on Ubuntu 14.04. I am
attaching config.

Thanks,
Adithya


2017-03-03 19:21 GMT+05:30 Andrey Repin <anrdaemon at yandex.ru>:

> Greetings, Adithya K!
>
> > Hi All,
>
> > I am usig busybox  template to create container on ubuntu. I am creating
> > container as non  privilage. Attached is the config created.
>
>
> >  I am mapping var/run/duns/socket from host to container. Basically I am
> using host dbus.
>
>
> >  What  I see is when I try to run and dbus program,
> > dbus_bus_get(DBUS_BUS_SYSTEM, &err); call fails. Basically I am not
> able to get dbus bus connection.
>
> I suppose you're running containers with subuid?
> Then the answer is obvious - your container don't have permissions to
> access the socket.
>
> >  When I create container using privilage mode, then this issue doesn't
> exist.
>
> >  Any solution for this issue.
>
> Don't use system dbus.
>
>
> --
> With best regards,
> Andrey Repin
> Friday, March 3, 2017 16:50:25
>
> Sorry for my terrible english...
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170310/0ee5a127/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config
Type: application/octet-stream
Size: 943 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170310/0ee5a127/attachment.obj>


More information about the lxc-users mailing list