driver core: set up ownership of class devices in sysfs
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 20 Jul 2018 21:56:50 +0000 (21:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Jul 2018 06:44:35 +0000 (23:44 -0700)
commit9944e894c1266dc8515c82d1ff752d681215526b
tree38b9c8de3fb5c789d3e57f0f05cd4acbd075407b
parentd028b6f703209dbe96201b2714ff46625877128e
driver core: set up ownership of class devices in sysfs

Plumb in get_ownership() callback for devices belonging to a class so that
they can be created with uid/gid different from global root. This will
allow network devices in a container to belong to container's root and not
global root.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/base/core.c
include/linux/device.h