When setting process Smack label, fix labels of socket file descriptors 49/27849/4
authorRafal Krypa <r.krypa@samsung.com>
Fri, 19 Sep 2014 17:36:14 +0000 (19:36 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Mon, 27 Oct 2014 13:54:06 +0000 (14:54 +0100)
commitc36017da697f08ee75d4cd42cec9a5429a991404
tree06919eb3ea004c709657c60378cc5e8d364e3937
parent67770e78a4668d6f5868be697462ab2a63ae21d5
When setting process Smack label, fix labels of socket file descriptors

File descriptors for sockets get Smack labels when sockets are created.
But if Smack labels is changed for a process with open socket descriptors,
those descriptors keep the old Smack label. This should not happen during
application launch, because launched application could be identified as
a non-app user process.
To avoid this, all open file descriptors which happen to be sockets will
be relabeled inside security_manager_set_process_label_* functions.

Change-Id: I209a7a15edef7a2c20a9a4a00806a5d3876fb9e0
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
src/client/client-security-manager.cpp