Generate distinct Smack labels for appId and pkgId 42/35042/10
authorRafal Krypa <r.krypa@samsung.com>
Fri, 27 Feb 2015 16:37:22 +0000 (17:37 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Mon, 2 Mar 2015 15:19:55 +0000 (16:19 +0100)
commit5464c8863931bce9ff6bf536e09a5fff0c14a890
tree4c095af74f027fb882c74492aa4e7d8e99f70298
parent5a80e0b13efec880d97fb74ad0aa02fa6b0982ab
Generate distinct Smack labels for appId and pkgId

Stop hard-wiring Smack labels to "User".
Proper unique labels will be generated:
- "User::App::$appid" for appId
- "User::Pkg::$pkgid" for pkgId

Generated rules are also validated against Smack restrictions for labels.
This imposes the following limitations on appId and pkgId values:
- length up to 244 characters (255 minus prefix length)
- non-printable ASCII characters and space are not allowed
- other prohibited characters: slash, backslash, single quote, double quote

Change-Id: Ib60b1f6fae785919542b2e749bceabbea0b9a89b
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
src/common/smack-labels.cpp