tizen-smack: Handling network
authorCasey Schaufler <casey@schaufler-ca.com>
Fri, 8 Nov 2013 17:42:26 +0000 (09:42 -0800)
committerMaciej Wereski <m.wereski@partner.samsung.com>
Mon, 27 Apr 2015 11:22:11 +0000 (13:22 +0200)
commitdb4f6c9a074644aa2bf62e1dfcdddb1cbd14324e
tree3614838a2296665ac5d94f19729bfacf9e39d49b
parent214c39894401bb4fcdfa400f86846a97d9080c7b
tizen-smack: Handling network

- Set Smack ambient to match run label
- Set Smack netlabel host rules

Set Smack ambient to match run label
------------------------------------
Set the Smack networking ambient label to match the
run label of systemd. System services may expect to
communicate with external services over IP. Setting
the ambient label assigns that label to IP packets
that do not include CIPSO headers. This allows systemd
and the services it spawns access to unlabeled IP
packets, and hence external services.

A system may choose to restrict network access to
particular services later in the startup process.
This is easily done by resetting the ambient label
elsewhere.

Set Smack netlabel host rules
-----------------------------
If SMACK_RUN_LABEL is defined set all other hosts to be
single label hosts at the specified label. Set the loopback
address to be a CIPSO host.

If any netlabel host rules are defined in /etc/smack/netlabel.d
install them into the smackfs netlabel interface.
src/core/smack-setup.c