kdbus: Do not use fstat() to determinte memfd size 01/105201/1
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 15 Dec 2016 13:13:14 +0000 (14:13 +0100)
committerINSUN PYO <insun.pyo@samsung.com>
Fri, 16 Dec 2016 03:01:39 +0000 (19:01 -0800)
commita9e049f18b679076353aad77dc1022ea799f6fbc
tree04792f9279ab355c62a27d0ee2a489305305821a
parent75ab298452793ea20ab1daa255602200bb309ac8
kdbus: Do not use fstat() to determinte memfd size

Memfd size is available via kdbus metadata so there is no need to use fstat.

This fixes failure on Smack system:

    [ 5352.471226] audit: type=1400 audit(946690155.785:99): lsm=SMACK fn=smack_inode_getattr action=denied subject="USER::server" object="USER::client" requested=r pid=13139 comm="gkdbus" path=2F6D656D66643A6B64627573202864656C657465642

Original idea by Insun Pyo <insun.pyo@samsung.com>

Change-Id: Ia7fe30c9604277d5ccf7cafedb0909a2c62b0d59
gio/gkdbus.c
glib/gbytes.c
glib/gbytes.h