€•Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ)/translations/zh_CN/admin-guide/LSM/Smack”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/zh_TW/admin-guide/LSM/Smack”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/it_IT/admin-guide/LSM/Smack”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ja_JP/admin-guide/LSM/Smack”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ko_KR/admin-guide/LSM/Smack”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/pt_BR/admin-guide/LSM/Smack”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/sp_SP/admin-guide/LSM/Smack”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒSmack”h]”hŒSmack”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒC/var/lib/git/docbuild/linux/Documentation/admin-guide/LSM/Smack.rst”h´KubhŒ block_quote”“”)�”}”(hŒU"Good for you, you've decided to clean the elevator!" - The Elevator, from Dark Star ”h]”hŒ paragraph”“”)�”}”(hŒT"Good for you, you've decided to clean the elevator!" - The Elevator, from Dark Star”h]”hŒZ“Good for you, you’ve decided to clean the elevator!â€� - The Elevator, from Dark Star”…”�”}”(hhÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´KhhÍubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÒ)�”}”(hŒ±Smack is the Simplified Mandatory Access Control Kernel. Smack is a kernel based implementation of mandatory access control that includes simplicity in its primary design goals.”h]”hŒ±Smack is the Simplified Mandatory Access Control Kernel. Smack is a kernel based implementation of mandatory access control that includes simplicity in its primary design goals.”…”�”}”(hhçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´K hh·h²hubhÒ)�”}”(hŒîSmack is not the only Mandatory Access Control scheme available for Linux. Those new to Mandatory Access Control are encouraged to compare Smack with the other mechanisms available to determine which is best suited to the problem at hand.”h]”hŒîSmack is not the only Mandatory Access Control scheme available for Linux. Those new to Mandatory Access Control are encouraged to compare Smack with the other mechanisms available to determine which is best suited to the problem at hand.”…”�”}”(hhõh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´K hh·h²hubhÒ)�”}”(hŒ)Smack consists of three major components:”h]”hŒ)Smack consists of three major components:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Khh·h²hubhÌ)�”}”(hŒX- The kernel - Basic utilities, which are helpful but not required - Configuration data ”h]”hŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒ The kernel”h]”hÒ)�”}”(hjh]”hŒ The kernel”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒ3Basic utilities, which are helpful but not required”h]”hÒ)�”}”(hj5h]”hŒ3Basic utilities, which are helpful but not required”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Khj3ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒConfiguration data ”h]”hÒ)�”}”(hŒConfiguration data”h]”hŒConfiguration data”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´KhjJubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jh³hÊh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÒ)�”}”(hX The kernel component of Smack is implemented as a Linux Security Modules (LSM) module. It requires netlabel and works best with file systems that support extended attributes, although xattr support is not strictly required. It is safe to run a Smack kernel under a "vanilla" distribution.”h]”hX$The kernel component of Smack is implemented as a Linux Security Modules (LSM) module. It requires netlabel and works best with file systems that support extended attributes, although xattr support is not strictly required. It is safe to run a Smack kernel under a “vanillaâ€� distribution.”…”�”}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Khh·h²hubhÒ)�”}”(hŒ�Smack kernels use the CIPSO IP option. Some network configurations are intolerant of IP options and can impede access to systems that use them as Smack does.”h]”hŒ�Smack kernels use the CIPSO IP option. Some network configurations are intolerant of IP options and can impede access to systems that use them as Smack does.”…”�”}”(hj~h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Khh·h²hubhÒ)�”}”(hŒ�Smack is used in the Tizen operating system. Please go to http://wiki.tizen.org for information about how Smack is used in Tizen.”h]”(hŒ:Smack is used in the Tizen operating system. Please go to ”…”�”}”(hjŒh²hh³Nh´NubhŒ reference”“”)�”}”(hŒhttp://wiki.tizen.org”h]”hŒhttp://wiki.tizen.org”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j˜uh1j”hjŒubhŒ2 for information about how Smack is used in Tizen.”…”�”}”(hjŒh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´K#hh·h²hubhÒ)�”}”(hŒ3The current git repository for Smack user space is:”h]”hŒ3The current git repository for Smack user space is:”…”�”}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´K'hh·h²hubhÌ)�”}”(hŒ&git://github.com/smack-team/smack.git ”h]”hÒ)�”}”(hŒ%git://github.com/smack-team/smack.git”h]”hŒ%git://github.com/smack-team/smack.git”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´K)hj½ubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K)hh·h²hubhÒ)�”}”(hŒiThis should make and install on most modern distributions. There are five commands included in smackutil:”h]”hŒiThis should make and install on most modern distributions. There are five commands included in smackutil:”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´K+hh·h²hubhŒdefinition_list”“”)�”}”(hhh]”(hŒdefinition_list_item”“”)�”}”(hŒ8chsmack: display or set Smack extended attribute values ”h]”(hŒterm”“”)�”}”(hŒchsmack:”h]”hŒchsmack:”…”�”}”(hjðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´K/hjêubhŒ definition”“”)�”}”(hhh]”hÒ)�”}”(hŒ.display or set Smack extended attribute values”h]”hŒ.display or set Smack extended attribute values”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´K/hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjêubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´K/hjåubjé)�”}”(hŒ&smackctl: load the Smack access rules ”h]”(jï)�”}”(hŒ smackctl:”h]”hŒ smackctl:”…”�”}”(hj!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´K2hjubjÿ)�”}”(hhh]”hÒ)�”}”(hŒload the Smack access rules”h]”hŒload the Smack access rules”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´K2hj/ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´K2hjåh²hubjé)�”}”(hŒUsmackaccess: report if a process with one label has access to an object with another ”h]”(jï)�”}”(hŒ smackaccess:”h]”hŒ smackaccess:”…”�”}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´K6hjLubjÿ)�”}”(hhh]”hÒ)�”}”(hŒGreport if a process with one label has access to an object with another”h]”hŒGreport if a process with one label has access to an object with another”…”�”}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´K5hj^ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjLubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´K6hjåh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jãhh·h²hh³hÊh´NubhÒ)�”}”(hŒiThese two commands are obsolete with the introduction of the smackfs/load2 and smackfs/cipso2 interfaces.”h]”hŒiThese two commands are obsolete with the introduction of the smackfs/load2 and smackfs/cipso2 interfaces.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´K8hh·h²hubjä)�”}”(hhh]”(jé)�”}”(hŒ=smackload: properly formats data for writing to smackfs/load ”h]”(jï)�”}”(hŒ smackload:”h]”hŒ smackload:”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´Kthis is the policy that relies on Smack access rules. For the ”…”�”}”(hjf h²hh³Nh´Nubj )�”}”(hŒ``PTRACE_READ``”h]”hŒ PTRACE_READ”…”�”}”(hjn h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjf ubhŒ: a subject needs to have a read access on object. For the ”…”�”}”(hjf h²hh³Nh´Nubj )�”}”(hŒ``PTRACE_ATTACH``”h]”hŒ PTRACE_ATTACH”…”�”}”(hj€ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjf ubhŒ! a read-write access is required.”…”�”}”(hjf h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M$hjc ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjQ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M&hjN ubjé)�”}”(hŒÎ1 - exact: this is the policy that limits ``PTRACE_ATTACH``. Attach is only allowed when subject's and object's labels are equal. ``PTRACE_READ`` is not affected. Can be overridden with ``CAP_SYS_PTRACE``. ”h]”(jï)�”}”(hŒ 1 - exact:”h]”hŒ 1 - exact:”…”�”}”(hj¨ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M+hj¤ ubjÿ)�”}”(hhh]”hÒ)�”}”(hŒÂthis is the policy that limits ``PTRACE_ATTACH``. Attach is only allowed when subject's and object's labels are equal. ``PTRACE_READ`` is not affected. Can be overridden with ``CAP_SYS_PTRACE``.”h]”(hŒthis is the policy that limits ”…”�”}”(hj¹ h²hh³Nh´Nubj )�”}”(hŒ``PTRACE_ATTACH``”h]”hŒ PTRACE_ATTACH”…”�”}”(hjÁ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj¹ ubhŒK. Attach is only allowed when subject’s and object’s labels are equal. ”…”�”}”(hj¹ h²hh³Nh´Nubj )�”}”(hŒ``PTRACE_READ``”h]”hŒ PTRACE_READ”…”�”}”(hjÓ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj¹ ubhŒ) is not affected. Can be overridden with ”…”�”}”(hj¹ h²hh³Nh´Nubj )�”}”(hŒ``CAP_SYS_PTRACE``”h]”hŒCAP_SYS_PTRACE”…”�”}”(hjå h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj¹ ubhŒ.”…”�”}”(hj¹ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M)hj¶ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhj¤ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M+hjN ubjé)�”}”(hŒ�2 - draconian: this policy behaves like the 'exact' above with an exception that it can't be overridden with ``CAP_SYS_PTRACE``. ”h]”(jï)�”}”(hŒ2 - draconian:”h]”hŒ2 - draconian:”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M/hj ubjÿ)�”}”(hhh]”hÒ)�”}”(hŒqthis policy behaves like the 'exact' above with an exception that it can't be overridden with ``CAP_SYS_PTRACE``.”h]”(hŒdthis policy behaves like the ‘exact’ above with an exception that it can’t be overridden with ”…”�”}”(hj h²hh³Nh´Nubj )�”}”(hŒ``CAP_SYS_PTRACE``”h]”hŒCAP_SYS_PTRACE”…”�”}”(hj& h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj ubhŒ.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M.hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M/hjN ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jãhj= ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jþhj+ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M/hjh²hubjé)�”}”(hŒorevoke-subject Writing a Smack label here sets the access to '-' for all access rules with that subject label. ”h]”(jï)�”}”(hŒrevoke-subject”h]”hŒrevoke-subject”…”�”}”(hj` h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M3hj\ ubjÿ)�”}”(hhh]”hÒ)�”}”(hŒ_Writing a Smack label here sets the access to '-' for all access rules with that subject label.”h]”hŒcWriting a Smack label here sets the access to ‘-’ for all access rules with that subject label.”…”�”}”(hjq h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M2hjn ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhj\ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M3hjh²hubjé)�”}”(hX|unconfined If the kernel is configured with ``CONFIG_SECURITY_SMACK_BRINGUP`` a process with ``CAP_MAC_ADMIN`` can write a label into this interface. Thereafter, accesses that involve that label will be logged and the access permitted if it wouldn't be otherwise. Note that this is dangerous and can ruin the proper labeling of your system. It should never be used in production. ”h]”(jï)�”}”(hŒ unconfined”h]”hŒ unconfined”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M;hj‹ ubjÿ)�”}”(hhh]”hÒ)�”}”(hXpIf the kernel is configured with ``CONFIG_SECURITY_SMACK_BRINGUP`` a process with ``CAP_MAC_ADMIN`` can write a label into this interface. Thereafter, accesses that involve that label will be logged and the access permitted if it wouldn't be otherwise. Note that this is dangerous and can ruin the proper labeling of your system. It should never be used in production.”h]”(hŒ!If the kernel is configured with ”…”�”}”(hj  h²hh³Nh´Nubj )�”}”(hŒ!``CONFIG_SECURITY_SMACK_BRINGUP``”h]”hŒCONFIG_SECURITY_SMACK_BRINGUP”…”�”}”(hj¨ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj  ubhŒ a process with ”…”�”}”(hj  h²hh³Nh´Nubj )�”}”(hŒ``CAP_MAC_ADMIN``”h]”hŒ CAP_MAC_ADMIN”…”�”}”(hjº h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj  ubhX can write a label into this interface. Thereafter, accesses that involve that label will be logged and the access permitted if it wouldn’t be otherwise. Note that this is dangerous and can ruin the proper labeling of your system. It should never be used in production.”…”�”}”(hj  h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M6hj� ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhj‹ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M;hjh²hubjé)�”}”(hXIrelabel-self This interface contains a list of labels to which the process can transition to, by writing to ``/proc/self/attr/current``. Normally a process can change its own label to any legal value, but only if it has ``CAP_MAC_ADMIN``. This interface allows a process without ``CAP_MAC_ADMIN`` to relabel itself to one of labels from predefined list. A process without ``CAP_MAC_ADMIN`` can change its label only once. When it does, this list will be cleared. The values are set by writing the desired labels, separated by spaces, to the file or cleared by writing "-" to the file. ”h]”(jï)�”}”(hŒ relabel-self”h]”hŒ relabel-self”…”�”}”(hjâ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´MFhjÞ ubjÿ)�”}”(hhh]”hÒ)�”}”(hX;This interface contains a list of labels to which the process can transition to, by writing to ``/proc/self/attr/current``. Normally a process can change its own label to any legal value, but only if it has ``CAP_MAC_ADMIN``. This interface allows a process without ``CAP_MAC_ADMIN`` to relabel itself to one of labels from predefined list. A process without ``CAP_MAC_ADMIN`` can change its label only once. When it does, this list will be cleared. The values are set by writing the desired labels, separated by spaces, to the file or cleared by writing "-" to the file.”h]”(hŒ_This interface contains a list of labels to which the process can transition to, by writing to ”…”�”}”(hjó h²hh³Nh´Nubj )�”}”(hŒ``/proc/self/attr/current``”h]”hŒ/proc/self/attr/current”…”�”}”(hjû h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjó ubhŒU. Normally a process can change its own label to any legal value, but only if it has ”…”�”}”(hjó h²hh³Nh´Nubj )�”}”(hŒ``CAP_MAC_ADMIN``”h]”hŒ CAP_MAC_ADMIN”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjó ubhŒ*. This interface allows a process without ”…”�”}”(hjó h²hh³Nh´Nubj )�”}”(hŒ``CAP_MAC_ADMIN``”h]”hŒ CAP_MAC_ADMIN”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjó ubhŒL to relabel itself to one of labels from predefined list. A process without ”…”�”}”(hjó h²hh³Nh´Nubj )�”}”(hŒ``CAP_MAC_ADMIN``”h]”hŒ CAP_MAC_ADMIN”…”�”}”(hj1 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjó ubhŒÇ can change its label only once. When it does, this list will be cleared. The values are set by writing the desired labels, separated by spaces, to the file or cleared by writing “-â€� to the file.”…”�”}”(hjó h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M>hjð ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjÞ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´MFhjh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jãhh·h²hh³hÊh´NubhÒ)�”}”(hŒpIf you are using the smackload utility you can add access rules in ``/etc/smack/accesses``. They take the form::”h]”(hŒCIf you are using the smackload utility you can add access rules in ”…”�”}”(hj[ h²hh³Nh´Nubj )�”}”(hŒ``/etc/smack/accesses``”h]”hŒ/etc/smack/accesses”…”�”}”(hjc h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj[ ubhŒ. They take the form:”…”�”}”(hj[ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MHhh·h²hubj')�”}”(hŒsubjectlabel objectlabel access”h]”hŒsubjectlabel objectlabel access”…”�”}”hj{ sbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´MKhh·h²hubhÒ)�”}”(hŒ½access is a combination of the letters rwxatb which specify the kind of access permitted a subject with subjectlabel on an object with objectlabel. If there is no rule no access is allowed.”h]”hŒ½access is a combination of the letters rwxatb which specify the kind of access permitted a subject with subjectlabel on an object with objectlabel. If there is no rule no access is allowed.”…”�”}”(hj‰ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MMhh·h²hubhÒ)�”}”(hŒ7Look for additional programs on http://schaufler-ca.com”h]”(hŒ Look for additional programs on ”…”�”}”(hj— h²hh³Nh´Nubj•)�”}”(hŒhttp://schaufler-ca.com”h]”hŒhttp://schaufler-ca.com”…”�”}”(hjŸ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j¡ uh1j”hj— ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MQhh·h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ;The Simplified Mandatory Access Control Kernel (Whitepaper)”h]”hŒ;The Simplified Mandatory Access Control Kernel (Whitepaper)”…”�”}”(hj· h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj´ h²hh³hÊh´MTubhÒ)�”}”(hŒ&Casey Schaufler casey@schaufler-ca.com”h]”(hŒCasey Schaufler ”…”�”}”(hjÅ h²hh³Nh´Nubj•)�”}”(hŒcasey@schaufler-ca.com”h]”hŒcasey@schaufler-ca.com”…”�”}”(hjÍ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:casey@schaufler-ca.com”uh1j”hjÅ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MVhj´ h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒMandatory Access Control”h]”hŒMandatory Access Control”…”�”}”(hjæ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjã h²hh³hÊh´MZubhÒ)�”}”(hX—Computer systems employ a variety of schemes to constrain how information is shared among the people and services using the machine. Some of these schemes allow the program or user to decide what other programs or users are allowed access to pieces of data. These schemes are called discretionary access control mechanisms because the access control is specified at the discretion of the user. Other schemes do not leave the decision regarding what a user or program can access up to users or programs. These schemes are called mandatory access control mechanisms because you don't have a choice regarding the users or programs that have access to pieces of data.”h]”hX™Computer systems employ a variety of schemes to constrain how information is shared among the people and services using the machine. Some of these schemes allow the program or user to decide what other programs or users are allowed access to pieces of data. These schemes are called discretionary access control mechanisms because the access control is specified at the discretion of the user. Other schemes do not leave the decision regarding what a user or program can access up to users or programs. These schemes are called mandatory access control mechanisms because you don’t have a choice regarding the users or programs that have access to pieces of data.”…”�”}”(hjô h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M\hjã h²hubeh}”(h]”Œmandatory-access-control”ah ]”h"]”Œmandatory access control”ah$]”h&]”uh1hµhj´ h²hh³hÊh´MZubh¶)�”}”(hhh]”(h»)�”}”(hŒBell & LaPadula”h]”hŒBell & LaPadula”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´MgubhÒ)�”}”(hX©From the middle of the 1980's until the turn of the century Mandatory Access Control (MAC) was very closely associated with the Bell & LaPadula security model, a mathematical description of the United States Department of Defense policy for marking paper documents. MAC in this form enjoyed a following within the Capital Beltway and Scandinavian supercomputer centers but was often sited as failing to address general needs.”h]”hX«From the middle of the 1980’s until the turn of the century Mandatory Access Control (MAC) was very closely associated with the Bell & LaPadula security model, a mathematical description of the United States Department of Defense policy for marking paper documents. MAC in this form enjoyed a following within the Capital Beltway and Scandinavian supercomputer centers but was often sited as failing to address general needs.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mihj h²hubeh}”(h]”Œ bell-lapadula”ah ]”h"]”Œbell & lapadula”ah$]”h&]”uh1hµhj´ h²hh³hÊh´Mgubh¶)�”}”(hhh]”(h»)�”}”(hŒDomain Type Enforcement”h]”hŒDomain Type Enforcement”…”�”}”(hj4 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj1 h²hh³hÊh´MqubhÒ)�”}”(hXóAround the turn of the century Domain Type Enforcement (DTE) became popular. This scheme organizes users, programs, and data into domains that are protected from each other. This scheme has been widely deployed as a component of popular Linux distributions. The administrative overhead required to maintain this scheme and the detailed understanding of the whole system necessary to provide a secure domain mapping leads to the scheme being disabled or used in limited ways in the majority of cases.”h]”hXóAround the turn of the century Domain Type Enforcement (DTE) became popular. This scheme organizes users, programs, and data into domains that are protected from each other. This scheme has been widely deployed as a component of popular Linux distributions. The administrative overhead required to maintain this scheme and the detailed understanding of the whole system necessary to provide a secure domain mapping leads to the scheme being disabled or used in limited ways in the majority of cases.”…”�”}”(hjB h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mshj1 h²hubeh}”(h]”Œdomain-type-enforcement”ah ]”h"]”Œdomain type enforcement”ah$]”h&]”uh1hµhj´ h²hh³hÊh´Mqubh¶)�”}”(hhh]”(h»)�”}”(hŒSmack”h]”hŒSmack”…”�”}”(hj[ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjX h²hh³hÊh´M|ubhÒ)�”}”(hXÚSmack is a Mandatory Access Control mechanism designed to provide useful MAC while avoiding the pitfalls of its predecessors. The limitations of Bell & LaPadula are addressed by providing a scheme whereby access can be controlled according to the requirements of the system and its purpose rather than those imposed by an arcane government policy. The complexity of Domain Type Enforcement and avoided by defining access controls in terms of the access modes already in use.”h]”hXÚSmack is a Mandatory Access Control mechanism designed to provide useful MAC while avoiding the pitfalls of its predecessors. The limitations of Bell & LaPadula are addressed by providing a scheme whereby access can be controlled according to the requirements of the system and its purpose rather than those imposed by an arcane government policy. The complexity of Domain Type Enforcement and avoided by defining access controls in terms of the access modes already in use.”…”�”}”(hji h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M~hjX h²hubeh}”(h]”Œid1”ah ]”h"]”h$]”Œsmack”ah&]”uh1hµhj´ h²hh³hÊh´M|Œ referenced”Kubh¶)�”}”(hhh]”(h»)�”}”(hŒSmack Terminology”h]”hŒSmack Terminology”…”�”}”(hjƒ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj€ h²hh³hÊh´M‡ubhÒ)�”}”(hŒúThe jargon used to talk about Smack will be familiar to those who have dealt with other MAC systems and shouldn't be too difficult for the uninitiated to pick up. There are four terms that are used in a specific way and that are especially important:”h]”hŒüThe jargon used to talk about Smack will be familiar to those who have dealt with other MAC systems and shouldn’t be too difficult for the uninitiated to pick up. There are four terms that are used in a specific way and that are especially important:”…”�”}”(hj‘ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M‰hj€ h²hubhÌ)�”}”(hX Subject: A subject is an active entity on the computer system. On Smack a subject is a task, which is in turn the basic unit of execution. Object: An object is a passive entity on the computer system. On Smack files of all types, IPC, and tasks can be objects. Access: Any attempt by a subject to put information into or get information from an object is an access. Label: Data that identifies the Mandatory Access Control characteristics of a subject or an object. ”h]”jä)�”}”(hhh]”(jé)�”}”(hŒ‹Subject: A subject is an active entity on the computer system. On Smack a subject is a task, which is in turn the basic unit of execution. ”h]”(jï)�”}”(hŒSubject:”h]”hŒSubject:”…”�”}”(hjª h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M‘hj¦ ubjÿ)�”}”(hhh]”hÒ)�”}”(hŒ�A subject is an active entity on the computer system. On Smack a subject is a task, which is in turn the basic unit of execution.”h]”hŒ�A subject is an active entity on the computer system. On Smack a subject is a task, which is in turn the basic unit of execution.”…”�”}”(hj» h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M�hj¸ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhj¦ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M‘hj£ ubjé)�”}”(hŒzObject: An object is a passive entity on the computer system. On Smack files of all types, IPC, and tasks can be objects. ”h]”(jï)�”}”(hŒObject:”h]”hŒObject:”…”�”}”(hjÙ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M•hjÕ ubjÿ)�”}”(hhh]”hÒ)�”}”(hŒqAn object is a passive entity on the computer system. On Smack files of all types, IPC, and tasks can be objects.”h]”hŒqAn object is a passive entity on the computer system. On Smack files of all types, IPC, and tasks can be objects.”…”�”}”(hjê h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M”hjç ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjÕ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M•hj£ ubjé)�”}”(hŒiAccess: Any attempt by a subject to put information into or get information from an object is an access. ”h]”(jï)�”}”(hŒAccess:”h]”hŒAccess:”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M™hj ubjÿ)�”}”(hhh]”hÒ)�”}”(hŒ`Any attempt by a subject to put information into or get information from an object is an access.”h]”hŒ`Any attempt by a subject to put information into or get information from an object is an access.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M˜hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M™hj£ ubjé)�”}”(hŒdLabel: Data that identifies the Mandatory Access Control characteristics of a subject or an object. ”h]”(jï)�”}”(hŒLabel:”h]”hŒLabel:”…”�”}”(hj7 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M�hj3 ubjÿ)�”}”(h•Góhh]”hÒ)�”}”(hŒ\Data that identifies the Mandatory Access Control characteristics of a subject or an object.”h]”hŒ\Data that identifies the Mandatory Access Control characteristics of a subject or an object.”…”�”}”(hjH h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MœhjE ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhj3 ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M�hj£ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jãhjŸ ubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MŽhj€ h²hubhÒ)�”}”(hŒ•These definitions are consistent with the traditional use in the security community. There are also some terms from Linux that are likely to crop up:”h]”hŒ•These definitions are consistent with the traditional use in the security community. There are also some terms from Linux that are likely to crop up:”…”�”}”(hjn h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MŸhj€ h²hubhÌ)�”}”(hX/Capability: A task that possesses a capability has permission to violate an aspect of the system security policy, as identified by the specific capability. A task that possesses one or more capabilities is a privileged task, whereas a task with no capabilities is an unprivileged task. Privilege: A task that is allowed to violate the system security policy is said to have privilege. As of this writing a task can have privilege either by possessing capabilities or by having an effective user of root. ”h]”jä)�”}”(hhh]”(jé)�”}”(hXCapability: A task that possesses a capability has permission to violate an aspect of the system security policy, as identified by the specific capability. A task that possesses one or more capabilities is a privileged task, whereas a task with no capabilities is an unprivileged task. ”h]”(jï)�”}”(hŒ Capability:”h]”hŒ Capability:”…”�”}”(hj‡ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M§hjƒ ubjÿ)�”}”(hhh]”hÒ)�”}”(hXA task that possesses a capability has permission to violate an aspect of the system security policy, as identified by the specific capability. A task that possesses one or more capabilities is a privileged task, whereas a task with no capabilities is an unprivileged task.”h]”hXA task that possesses a capability has permission to violate an aspect of the system security policy, as identified by the specific capability. A task that possesses one or more capabilities is a privileged task, whereas a task with no capabilities is an unprivileged task.”…”�”}”(hj˜ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M£hj• ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjƒ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M§hj€ ubjé)�”}”(hŒÚPrivilege: A task that is allowed to violate the system security policy is said to have privilege. As of this writing a task can have privilege either by possessing capabilities or by having an effective user of root. ”h]”(jï)�”}”(hŒ Privilege:”h]”hŒ Privilege:”…”�”}”(hj¶ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M­hj² ubjÿ)�”}”(hhh]”hÒ)�”}”(hŒÎA task that is allowed to violate the system security policy is said to have privilege. As of this writing a task can have privilege either by possessing capabilities or by having an effective user of root.”h]”hŒÎA task that is allowed to violate the system security policy is said to have privilege. As of this writing a task can have privilege either by possessing capabilities or by having an effective user of root.”…”�”}”(hjÇ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MªhjÄ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhj² ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M­hj€ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jãhj| ubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M¢hj€ h²hubeh}”(h]”Œsmack-terminology”ah ]”h"]”Œsmack terminology”ah$]”h&]”uh1hµhj´ h²hh³hÊh´M‡ubh¶)�”}”(hhh]”(h»)�”}”(hŒ Smack Basics”h]”hŒ Smack Basics”…”�”}”(hjø h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjõ h²hh³hÊh´M°ubhÒ)�”}”(hŒ»Smack is an extension to a Linux system. It enforces additional restrictions on what subjects can access which objects, based on the labels attached to each of the subject and the object.”h]”hŒ»Smack is an extension to a Linux system. It enforces additional restrictions on what subjects can access which objects, based on the labels attached to each of the subject and the object.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M²hjõ h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒLabels”h]”hŒLabels”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´M·ubhÒ)�”}”(hXvSmack labels are ASCII character strings. They can be up to 255 characters long, but keeping them to twenty-three characters is recommended. Single character labels using special characters, that being anything other than a letter or digit, are reserved for use by the Smack development team. Smack labels are unstructured, case sensitive, and the only operation ever performed on them is comparison for equality. Smack labels cannot contain unprintable characters, the "/" (slash), the "\" (backslash), the "'" (quote) and '"' (double-quote) characters. Smack labels cannot begin with a '-'. This is reserved for special options.”h]”hXŒSmack labels are ASCII character strings. They can be up to 255 characters long, but keeping them to twenty-three characters is recommended. Single character labels using special characters, that being anything other than a letter or digit, are reserved for use by the Smack development team. Smack labels are unstructured, case sensitive, and the only operation ever performed on them is comparison for equality. Smack labels cannot contain unprintable characters, the “/â€� (slash), the “" (backslash), the “’â€� (quote) and ‘â€�’ (double-quote) characters. Smack labels cannot begin with a ‘-’. This is reserved for special options.”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M¹hjh²hubhÒ)�”}”(hŒ"There are some predefined labels::”h]”hŒ!There are some predefined labels:”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MÃhjh²hubj')�”}”(hX_ Pronounced "floor", a single underscore character. ^ Pronounced "hat", a single circumflex character. * Pronounced "star", a single asterisk character. ? Pronounced "huh", a single question mark character. @ Pronounced "web", a single at sign character.”h]”hX_ Pronounced "floor", a single underscore character. ^ Pronounced "hat", a single circumflex character. * Pronounced "star", a single asterisk character. ? Pronounced "huh", a single question mark character. @ Pronounced "web", a single at sign character.”…”�”}”hjAsbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´MÅhjh²hubhÒ)�”}”(hŒ�Every task on a Smack system is assigned a label. The Smack label of a process will usually be assigned by the system initialization mechanism.”h]”hŒ�Every task on a Smack system is assigned a label. The Smack label of a process will usually be assigned by the system initialization mechanism.”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MËhjh²hubeh}”(h]”Œlabels”ah ]”h"]”Œlabels”ah$]”h&]”uh1hµhjõ h²hh³hÊh´M·ubh¶)�”}”(hhh]”(h»)�”}”(hŒ Access Rules”h]”hŒ Access Rules”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjeh²hh³hÊh´MÐubhÒ)�”}”(hŒ¿Smack uses the traditional access modes of Linux. These modes are read, execute, write, and occasionally append. There are a few cases where the access mode may not be obvious. These include:”h]”hŒ¿Smack uses the traditional access modes of Linux. These modes are read, execute, write, and occasionally append. There are a few cases where the access mode may not be obvious. These include:”…”�”}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MÒhjeh²hubhÌ)�”}”(hŒæSignals: A signal is a write operation from the subject task to the object task. Internet Domain IPC: Transmission of a packet is considered a write operation from the source task to the destination task. ”h]”jä)�”}”(hhh]”(jé)�”}”(hŒQSignals: A signal is a write operation from the subject task to the object task. ”h]”(jï)�”}”(hŒSignals:”h]”hŒSignals:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´MØhj‹ubjÿ)�”}”(hhh]”hÒ)�”}”(hŒGA signal is a write operation from the subject task to the object task.”h]”hŒGA signal is a write operation from the subject task to the object task.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M×hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhj‹ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´MØhjˆubjé)�”}”(hŒ|Internet Domain IPC: Transmission of a packet is considered a write operation from the source task to the destination task. ”h]”(jï)�”}”(hŒInternet Domain IPC:”h]”hŒInternet Domain IPC:”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´MÜhjºubjÿ)�”}”(hhh]”hÒ)�”}”(hŒfTransmission of a packet is considered a write operation from the source task to the destination task.”h]”hŒfTransmission of a packet is considered a write operation from the source task to the destination task.”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MÛhjÌubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjºubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´MÜhjˆubeh}”(h]”h ]”h"]”h$]”h&]”uh1jãhj„ubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÖhjeh²hubhÒ)�”}”(hŒžSmack restricts access based on the label attached to a subject and the label attached to the object it is trying to access. The rules enforced are, in order:”h]”hŒžSmack restricts access based on the label attached to a subject and the label attached to the object it is trying to access. The rules enforced are, in order:”…”�”}”(hjõh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MÞhjeh²hubhÌ)�”}”(hXã1. Any access requested by a task labeled "*" is denied. 2. A read or execute access requested by a task labeled "^" is permitted. 3. A read or execute access requested on an object labeled "_" is permitted. 4. Any access requested on an object labeled "*" is permitted. 5. Any access requested by a task on an object with the same label is permitted. 6. Any access requested that is explicitly defined in the loaded rule set is permitted. 7. Any other access is denied. ”h]”hŒenumerated_list”“”)�”}”(hhh]”(j)�”}”(hŒ5Any access requested by a task labeled "*" is denied.”h]”hÒ)�”}”(hjh]”hŒ9Any access requested by a task labeled “*â€� is denied.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mâhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hŒFA read or execute access requested by a task labeled "^" is permitted.”h]”hÒ)�”}”(hŒFA read or execute access requested by a task labeled "^" is permitted.”h]”hŒJA read or execute access requested by a task labeled “^â€� is permitted.”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mãhj#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hŒIA read or execute access requested on an object labeled "_" is permitted.”h]”hÒ)�”}”(hŒIA read or execute access requested on an object labeled "_" is permitted.”h]”hŒMA read or execute access requested on an object labeled “_â€� is permitted.”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Måhj;ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hŒ;Any access requested on an object labeled "*" is permitted.”h]”hÒ)�”}”(hjUh]”hŒ?Any access requested on an object labeled “*â€� is permitted.”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MçhjSubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hŒMAny access requested by a task on an object with the same label is permitted.”h]”hÒ)�”}”(hŒMAny access requested by a task on an object with the same label is permitted.”h]”hŒMAny access requested by a task on an object with the same label is permitted.”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mèhjjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hŒTAny access requested that is explicitly defined in the loaded rule set is permitted.”h]”hÒ)�”}”(hŒTAny access requested that is explicitly defined in the loaded rule set is permitted.”h]”hŒTAny access requested that is explicitly defined in the loaded rule set is permitted.”…”�”}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mêhj‚ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hŒAny other access is denied. ”h]”hÒ)�”}”(hŒAny other access is denied.”h]”hŒAny other access is denied.”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mìhjšubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mâhjeh²hubeh}”(h]”Œ access-rules”ah ]”h"]”Œ access rules”ah$]”h&]”uh1hµhjõ h²hh³hÊh´MÐubh¶)�”}”(hhh]”(h»)�”}”(hŒSmack Access Rules”h]”hŒSmack Access Rules”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjËh²hh³hÊh´MïubhÒ)�”}”(hXþWith the isolation provided by Smack access separation is simple. There are many interesting cases where limited access by subjects to objects with different labels is desired. One example is the familiar spy model of sensitivity, where a scientist working on a highly classified project would be able to read documents of lower classifications and anything she writes will be "born" highly classified. To accommodate such schemes Smack includes a mechanism for specifying rules allowing access between labels.”h]”hXWith the isolation provided by Smack access separation is simple. There are many interesting cases where limited access by subjects to objects with different labels is desired. One example is the familiar spy model of sensitivity, where a scientist working on a highly classified project would be able to read documents of lower classifications and anything she writes will be “bornâ€� highly classified. To accommodate such schemes Smack includes a mechanism for specifying rules allowing access between labels.”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MñhjËh²hubeh}”(h]”Œsmack-access-rules”ah ]”h"]”Œsmack access rules”ah$]”h&]”uh1hµhjõ h²hh³hÊh´Mïubh¶)�”}”(hhh]”(h»)�”}”(hŒAccess Rule Format”h]”hŒAccess Rule Format”…”�”}”(hjõh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjòh²hh³hÊh´MúubhÒ)�”}”(hŒ!The format of an access rule is::”h]”hŒ The format of an access rule is:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mühjòh²hubj')�”}”(hŒ!subject-label object-label access”h]”hŒ!subject-label object-label access”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´Mþhjòh²hubhÒ)�”}”(hŒûWhere subject-label is the Smack label of the task, object-label is the Smack label of the thing being accessed, and access is a string specifying the sort of access allowed. The access specification is searched for letters that describe access modes:”h]”hŒûWhere subject-label is the Smack label of the task, object-label is the Smack label of the thing being accessed, and access is a string specifying the sort of access allowed. The access specification is searched for letters that describe access modes:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mhjòh²hubhÌ)�”}”(hX9a: indicates that append access should be granted. r: indicates that read access should be granted. w: indicates that write access should be granted. x: indicates that execute access should be granted. t: indicates that the rule requests transmutation. b: indicates that the rule should be reported for bring-up. ”h]”hÒ)�”}”(hX8a: indicates that append access should be granted. r: indicates that read access should be granted. w: indicates that write access should be granted. x: indicates that execute access should be granted. t: indicates that the rule requests transmutation. b: indicates that the rule should be reported for bring-up.”h]”hX8a: indicates that append access should be granted. r: indicates that read access should be granted. w: indicates that write access should be granted. x: indicates that execute access should be granted. t: indicates that the rule requests transmutation. b: indicates that the rule should be reported for bring-up.”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mhj-ubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjòh²hubhÒ)�”}”(hŒ–Uppercase values for the specification letters are allowed as well. Access mode specifications can be in any order. Examples of acceptable rules are::”h]”hŒ•Uppercase values for the specification letters are allowed as well. Access mode specifications can be in any order. Examples of acceptable rules are:”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M hjòh²hubj')�”}”(hŒ•TopSecret Secret rx Secret Unclass R Manager Game x User HR w Snap Crackle rwxatb New Old rRrRr Closed Off -”h]”hŒ•TopSecret Secret rx Secret Unclass R Manager Game x User HR w Snap Crackle rwxatb New Old rRrRr Closed Off -”…”�”}”hjSsbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´Mhjòh²hubhÒ)�”}”(hŒ$Examples of unacceptable rules are::”h]”hŒ#Examples of unacceptable rules are:”…”�”}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mhjòh²hubj')�”}”(hŒOTop Secret Secret rx Ace Ace r Odd spells waxbeans”h]”hŒOTop Secret Secret rx Ace Ace r Odd spells waxbeans”…”�”}”hjosbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´Mhjòh²hubhÒ)�”}”(hXmSpaces are not allowed in labels. Since a subject always has access to files with the same label specifying a rule for that case is pointless. Only valid letters (rwxatbRWXATB) and the dash ('-') character are allowed in access specifications. The dash is a placeholder, so "a-r" is the same as "ar". A lone dash is used to specify that no access should be allowed.”h]”hXySpaces are not allowed in labels. Since a subject always has access to files with the same label specifying a rule for that case is pointless. Only valid letters (rwxatbRWXATB) and the dash (‘-’) character are allowed in access specifications. The dash is a placeholder, so “a-râ€� is the same as “arâ€�. A lone dash is used to specify that no access should be allowed.”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mhjòh²hubeh}”(h]”Œaccess-rule-format”ah ]”h"]”Œaccess rule format”ah$]”h&]”uh1hµhjõ h²hh³hÊh´Múubh¶)�”}”(hhh]”(h»)�”}”(hŒApplying Access Rules”h]”hŒApplying Access Rules”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj“h²hh³hÊh´M%ubhÒ)�”}”(hX�The developers of Linux rarely define new sorts of things, usually importing schemes and concepts from other systems. Most often, the other systems are variants of Unix. Unix has many endearing properties, but consistency of access control models is not one of them. Smack strives to treat accesses as uniformly as is sensible while keeping with the spirit of the underlying mechanism.”h]”hX�The developers of Linux rarely define new sorts of things, usually importing schemes and concepts from other systems. Most often, the other systems are variants of Unix. Unix has many endearing properties, but consistency of access control models is not one of them. Smack strives to treat accesses as uniformly as is sensible while keeping with the spirit of the underlying mechanism.”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M'hj“h²hubhÒ)�”}”(hXýFile system objects including files, directories, named pipes, symbolic links, and devices require access permissions that closely match those used by mode bit access. To open a file for reading read access is required on the file. To search a directory requires execute access. Creating a file with write access requires both read and write access on the containing directory. Deleting a file requires read and write access to the file and to the containing directory. It is possible that a user may be able to see that a file exists but not any of its attributes by the circumstance of having read access to the containing directory but not to the differently labeled file. This is an artifact of the file name being data in the directory, not a part of the file.”h]”hXýFile system objects including files, directories, named pipes, symbolic links, and devices require access permissions that closely match those used by mode bit access. To open a file for reading read access is required on the file. To search a directory requires execute access. Creating a file with write access requires both read and write access on the containing directory. Deleting a file requires read and write access to the file and to the containing directory. It is possible that a user may be able to see that a file exists but not any of its attributes by the circumstance of having read access to the containing directory but not to the differently labeled file. This is an artifact of the file name being data in the directory, not a part of the file.”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M.hj“h²hubhÒ)�”}”(hX€If a directory is marked as transmuting (SMACK64TRANSMUTE=TRUE) and the access rule that allows a process to create an object in that directory includes 't' access the label assigned to the new object will be that of the directory, not the creating process. This makes it much easier for two processes with different labels to share data without granting access to all of their files.”h]”hX„If a directory is marked as transmuting (SMACK64TRANSMUTE=TRUE) and the access rule that allows a process to create an object in that directory includes ‘t’ access the label assigned to the new object will be that of the directory, not the creating process. This makes it much easier for two processes with different labels to share data without granting access to all of their files.”…”�”}”(hjÀh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M9hj“h²hubhÒ)�”}”(hŒ IPC objects, message queues, semaphore sets, and memory segments exist in flat namespaces and access requests are only required to match the object in question.”h]”hŒ IPC objects, message queues, semaphore sets, and memory segments exist in flat namespaces and access requests are only required to match the object in question.”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M@hj“h²hubhÒ)�”}”(hX¾Process objects reflect tasks on the system and the Smack label used to access them is the same Smack label that the task would use for its own access attempts. Sending a signal via the kill() system call is a write operation from the signaler to the recipient. Debugging a process requires both reading and writing. Creating a new task is an internal operation that results in two tasks with identical Smack labels and requires no access checks.”h]”hX¾Process objects reflect tasks on the system and the Smack label used to access them is the same Smack label that the task would use for its own access attempts. Sending a signal via the kill() system call is a write operation from the signaler to the recipient. Debugging a process requires both reading and writing. Creating a new task is an internal operation that results in two tasks with identical Smack labels and requires no access checks.”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MDhj“h²hubhÒ)�”}”(hŒÞSockets are data structures attached to processes and sending a packet from one process to another requires that the sender have write access to the receiver. The receiver is not required to have read access to the sender.”h]”hŒÞSockets are data structures attached to processes and sending a packet from one process to another requires that the sender have write access to the receiver. The receiver is not required to have read access to the sender.”…”�”}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MKhj“h²hubeh}”(h]”Œapplying-access-rules”ah ]”h"]”Œapplying access rules”ah$]”h&]”uh1hµhjõ h²hh³hÊh´M%ubh¶)�”}”(hhh]”(h»)�”}”(hŒSetting Access Rules”h]”hŒSetting Access Rules”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´MPubhÒ)�”}”(hXgThe configuration file /etc/smack/accesses contains the rules to be set at system startup. The contents are written to the special file /sys/fs/smackfs/load2. Rules can be added at any time and take effect immediately. For any pair of subject and object labels there can be only one rule, with the most recently specified overriding any earlier specification.”h]”hXgThe configuration file /etc/smack/accesses contains the rules to be set at system startup. The contents are written to the special file /sys/fs/smackfs/load2. Rules can be added at any time and take effect immediately. For any pair of subject and object labels there can be only one rule, with the most recently specified overriding any earlier specification.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MRhjh²hubeh}”(h]”Œsetting-access-rules”ah ]”h"]”Œsetting access rules”ah$]”h&]”uh1hµhjõ h²hh³hÊh´MPubh¶)�”}”(hhh]”(h»)�”}”(hŒTask Attribute”h]”hŒTask Attribute”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj'h²hh³hÊh´MZubhÒ)�”}”(hXThe Smack label of a process can be read from ``/proc//attr/current``. A process can read its own Smack label from ``/proc/self/attr/current``. A privileged process can change its own Smack label by writing to ``/proc/self/attr/current`` but not the label of another process.”h]”(hŒ.The Smack label of a process can be read from ”…”�”}”(hj8h²hh³Nh´Nubj )�”}”(hŒ``/proc//attr/current``”h]”hŒ/proc//attr/current”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj8ubhŒ.. A process can read its own Smack label from ”…”�”}”(hj8h²hh³Nh´Nubj )�”}”(hŒ``/proc/self/attr/current``”h]”hŒ/proc/self/attr/current”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj8ubhŒD. A privileged process can change its own Smack label by writing to ”…”�”}”(hj8h²hh³Nh´Nubj )�”}”(hŒ``/proc/self/attr/current``”h]”hŒ/proc/self/attr/current”…”�”}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj8ubhŒ& but not the label of another process.”…”�”}”(hj8h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M\hj'h²hubhÒ)�”}”(hXFormat of writing is : only the label or the label followed by one of the 3 trailers: ``\n`` (by common agreement for ``/proc/...`` interfaces), ``\0`` (because some applications incorrectly include it), ``\n\0`` (because we think some applications may incorrectly include it).”h]”(hŒVFormat of writing is : only the label or the label followed by one of the 3 trailers: ”…”�”}”(hj|h²hh³Nh´Nubj )�”}”(hŒ``\n``”h]”hŒ\n”…”�”}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj|ubhŒ (by common agreement for ”…”�”}”(hj|h²hh³Nh´Nubj )�”}”(hŒ ``/proc/...``”h]”hŒ /proc/...”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj|ubhŒ interfaces), ”…”�”}”(hj|h²hh³Nh´Nubj )�”}”(hŒ``\0``”h]”hŒ\0”…”�”}”(hj¨h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj|ubhŒ5 (because some applications incorrectly include it), ”…”�”}”(hj|h²hh³Nh´Nubj )�”}”(hŒ``\n\0``”h]”hŒ\n\0”…”�”}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj|ubhŒA (because we think some applications may incorrectly include it).”…”�”}”(hj|h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mahj'h²hubeh}”(h]”Œtask-attribute”ah ]”h"]”Œtask attribute”ah$]”h&]”uh1hµhjõ h²hh³hÊh´MZubh¶)�”}”(hhh]”(h»)�”}”(hŒFile Attribute”h]”hŒFile Attribute”…”�”}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÚh²hh³hÊh´MgubhÒ)�”}”(hŒÅThe Smack label of a filesystem object is stored as an extended attribute named SMACK64 on the file. This attribute is in the security namespace. It can only be changed by a process with privilege.”h]”hŒÅThe Smack label of a filesystem object is stored as an extended attribute named SMACK64 on the file. This attribute is in the security namespace. It can only be changed by a process with privilege.”…”�”}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MihjÚh²hubeh}”(h]”Œfile-attribute”ah ]”h"]”Œfile attribute”ah$]”h&]”uh1hµhjõ h²hh³hÊh´Mgubh¶)�”}”(hhh]”(h»)�”}”(hŒ Privilege”h]”hŒ Privilege”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´MnubhÒ)�”}”(hŒèA process with CAP_MAC_OVERRIDE or CAP_MAC_ADMIN is privileged. CAP_MAC_OVERRIDE allows the process access to objects it would be denied otherwise. CAP_MAC_ADMIN allows a process to change Smack data, including rules and attributes.”h]”hŒèA process with CAP_MAC_OVERRIDE or CAP_MAC_ADMIN is privileged. CAP_MAC_OVERRIDE allows the process access to objects it would be denied otherwise. CAP_MAC_ADMIN allows a process to change Smack data, including rules and attributes.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mphjh²hubeh}”(h]”Œ privilege”ah ]”h"]”Œ privilege”ah$]”h&]”uh1hµhjõ h²hh³hÊh´Mnubh¶)�”}”(hhh]”(h»)�”}”(hŒSmack Networking”h]”hŒSmack Networking”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj(h²hh³hÊh´MvubhÒ)�”}”(hX2As mentioned before, Smack enforces access control on network protocol transmissions. Every packet sent by a Smack process is tagged with its Smack label. This is done by adding a CIPSO tag to the header of the IP packet. Each packet received is expected to have a CIPSO tag that identifies the label and if it lacks such a tag the network ambient label is assumed. Before the packet is delivered a check is made to determine that a subject with the label on the packet has write access to the receiving process and if that is not the case the packet is dropped.”h]”hX2As mentioned before, Smack enforces access control on network protocol transmissions. Every packet sent by a Smack process is tagged with its Smack label. This is done by adding a CIPSO tag to the header of the IP packet. Each packet received is expected to have a CIPSO tag that identifies the label and if it lacks such a tag the network ambient label is assumed. Before the packet is delivered a check is made to determine that a subject with the label on the packet has write access to the receiving process and if that is not the case the packet is dropped.”…”�”}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mxhj(h²hubeh}”(h]”Œsmack-networking”ah ]”h"]”Œsmack networking”ah$]”h&]”uh1hµhjõ h²hh³hÊh´Mvubh¶)�”}”(hhh]”(h»)�”}”(hŒCIPSO Configuration”h]”hŒCIPSO Configuration”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjOh²hh³hÊh´M‚ubhÒ)�”}”(hX<It is normally unnecessary to specify the CIPSO configuration. The default values used by the system handle all internal cases. Smack will compose CIPSO label values to match the Smack labels being used without administrative intervention. Unlabeled packets that come into the system will be given the ambient label.”h]”hX<It is normally unnecessary to specify the CIPSO configuration. The default values used by the system handle all internal cases. Smack will compose CIPSO label values to match the Smack labels being used without administrative intervention. Unlabeled packets that come into the system will be given the ambient label.”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M„hjOh²hubhÒ)�”}”(hXŸSmack requires configuration in the case where packets from a system that is not Smack that speaks CIPSO may be encountered. Usually this will be a Trusted Solaris system, but there are other, less widely deployed systems out there. CIPSO provides 3 important values, a Domain Of Interpretation (DOI), a level, and a category set with each packet. The DOI is intended to identify a group of systems that use compatible labeling schemes, and the DOI specified on the Smack system must match that of the remote system or packets will be discarded. The DOI is 3 by default. The value can be read from /sys/fs/smackfs/doi and can be changed by writing to /sys/fs/smackfs/doi.”h]”hXŸSmack requires configuration in the case where packets from a system that is not Smack that speaks CIPSO may be encountered. Usually this will be a Trusted Solaris system, but there are other, less widely deployed systems out there. CIPSO provides 3 important values, a Domain Of Interpretation (DOI), a level, and a category set with each packet. The DOI is intended to identify a group of systems that use compatible labeling schemes, and the DOI specified on the Smack system must match that of the remote system or packets will be discarded. The DOI is 3 by default. The value can be read from /sys/fs/smackfs/doi and can be changed by writing to /sys/fs/smackfs/doi.”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MŠhjOh²hubhÒ)�”}”(hŒVThe label and category set are mapped to a Smack label as defined in /etc/smack/cipso.”h]”hŒVThe label and category set are mapped to a Smack label as defined in /etc/smack/cipso.”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M”hjOh²hubhÒ)�”}”(hŒ$A Smack/CIPSO mapping has the form::”h]”hŒ#A Smack/CIPSO mapping has the form:”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M—hjOh²hubj')�”}”(hŒ"smack level [category [category]*]”h]”hŒ"smack level [category [category]*]”…”�”}”hj˜sbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´M™hjOh²hubhÒ)�”}”(hŒ¦Smack does not expect the level or category sets to be related in any particular way and does not assume or assign accesses based on them. Some examples of mappings::”h]”hŒ¥Smack does not expect the level or category sets to be related in any particular way and does not assume or assign accesses based on them. Some examples of mappings:”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M›hjOh²hubj')�”}”(hŒ?TopSecret 7 TS:A,B 7 1 2 SecBDE 5 2 4 6 RAFTERS 7 12 26”h]”hŒ?TopSecret 7 TS:A,B 7 1 2 SecBDE 5 2 4 6 RAFTERS 7 12 26”…”�”}”hj´sbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´MŸhjOh²hubhÒ)�”}”(hŒVThe ":" and "," characters are permitted in a Smack label but have no special meaning.”h]”hŒ^The “:â€� and “,â€� characters are permitted in a Smack label but have no special meaning.”…”�”}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M¤hjOh²hubhÒ)�”}”(hŒ\The mapping of Smack labels to CIPSO values is defined by writing to /sys/fs/smackfs/cipso2.”h]”hŒ\The mapping of Smack labels to CIPSO values is defined by writing to /sys/fs/smackfs/cipso2.”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M§hjOh²hubhÒ)�”}”(hXFIn addition to explicit mappings Smack supports direct CIPSO mappings. One CIPSO level is used to indicate that the category set passed in the packet is in fact an encoding of the Smack label. The level used is 250 by default. The value can be read from /sys/fs/smackfs/direct and changed by writing to /sys/fs/smackfs/direct.”h]”hXFIn addition to explicit mappings Smack supports direct CIPSO mappings. One CIPSO level is used to indicate that the category set passed in the packet is in fact an encoding of the Smack label. The level used is 250 by default. The value can be read from /sys/fs/smackfs/direct and changed by writing to /sys/fs/smackfs/direct.”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MªhjOh²hubeh}”(h]”Œcipso-configuration”ah ]”h"]”Œcipso configuration”ah$]”h&]”uh1hµhjõ h²hh³hÊh´M‚ubh¶)�”}”(hhh]”(h»)�”}”(hŒSocket Attributes”h]”hŒSocket Attributes”…”�”}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjôh²hh³hÊh´M±ubhÒ)�”}”(hŒ¢There are two attributes that are associated with sockets. These attributes can only be set by privileged tasks, but any task can read them for their own sockets.”h]”hŒ¢There are two attributes that are associated with sockets. These attributes can only be set by privileged tasks, but any task can read them for their own sockets.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M³hjôh²hubhÌ)�”}”(hXHSMACK64IPIN: The Smack label of the task object. A privileged program that will enforce policy may set this to the star label. SMACK64IPOUT: The Smack label transmitted with outgoing packets. A privileged program may set this to match the label of another task with which it hopes to communicate. ”h]”jä)�”}”(hhh]”(jé)�”}”(hŒSMACK64IPIN: The Smack label of the task object. A privileged program that will enforce policy may set this to the star label. ”h]”(jï)�”}”(hŒ SMACK64IPIN:”h]”hŒ SMACK64IPIN:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M¹hjubjÿ)�”}”(hhh]”hÒ)�”}”(hŒqThe Smack label of the task object. A privileged program that will enforce policy may set this to the star label.”h]”hŒqThe Smack label of the task object. A privileged program that will enforce policy may set this to the star label.”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M¸hj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M¹hjubjé)�”}”(hŒªSMACK64IPOUT: The Smack label transmitted with outgoing packets. A privileged program may set this to match the label of another task with which it hopes to communicate. ”h]”(jï)�”}”(hŒ SMACK64IPOUT:”h]”hŒ SMACK64IPOUT:”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M¾hjIubjÿ)�”}”(hhh]”hÒ)�”}”(hŒ›The Smack label transmitted with outgoing packets. A privileged program may set this to match the label of another task with which it hopes to communicate.”h]”hŒ›The Smack label transmitted with outgoing packets. A privileged program may set this to match the label of another task with which it hopes to communicate.”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M¼hj[ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjIubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M¾hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jãhjubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M·hjôh²hubhÒ)�”}”(hŒøUNIX domain socket (UDS) with a BSD address functions both as a file in a filesystem and as a socket. As a file, it carries the SMACK64 attribute. This attribute is not involved in Smack security enforcement and is immutably assigned the label "*".”h]”hŒüUNIX domain socket (UDS) with a BSD address functions both as a file in a filesystem and as a socket. As a file, it carries the SMACK64 attribute. This attribute is not involved in Smack security enforcement and is immutably assigned the label “*â€�.”…”�”}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MÀhjôh²hubeh}”(h]”Œsocket-attributes”ah ]”h"]”Œsocket attributes”ah$]”h&]”uh1hµhjõ h²hh³hÊh´M±ubh¶)�”}”(hhh]”(h»)�”}”(hŒSmack Netlabel Exceptions”h]”hŒSmack Netlabel Exceptions”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjšh²hh³hÊh´MÆubhÒ)�”}”(hŒÌYou will often find that your labeled application has to talk to the outside, unlabeled world. To do this there's a special file /sys/fs/smackfs/netlabel where you can add some exceptions in the form of::”h]”hŒÍYou will often find that your labeled application has to talk to the outside, unlabeled world. To do this there’s a special file /sys/fs/smackfs/netlabel where you can add some exceptions in the form of:”…”�”}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MÈhjšh²hubj')�”}”(hŒ&@IP1 LABEL1 or @IP2/MASK LABEL2”h]”hŒ&@IP1 LABEL1 or @IP2/MASK LABEL2”…”�”}”hj¹sbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´MÌhjšh²hubhÒ)�”}”(hŒ¨It means that your application will have unlabeled access to @IP1 if it has write access on LABEL1, and access to the subnet @IP2/MASK if it has write access on LABEL2.”h]”hŒ¨It means that your application will have unlabeled access to @IP1 if it has write access on LABEL1, and access to the subnet @IP2/MASK if it has write access on LABEL2.”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MÏhjšh²hubhÒ)�”}”(hŒoEntries in the /sys/fs/smackfs/netlabel file are matched by longest mask first, like in classless IPv4 routing.”h]”hŒoEntries in the /sys/fs/smackfs/netlabel file are matched by longest mask first, like in classless IPv4 routing.”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MÓhjšh²hubhÒ)�”}”(hŒ>A special label '@' and an option '-CIPSO' can be used there::”h]”hŒEA special label ‘@’ and an option ‘-CIPSO’ can be used there:”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MÖhjšh²hubj')�”}”(hŒm@ means Internet, any application with any label has access to it -CIPSO means standard CIPSO networking”h]”hŒm@ means Internet, any application with any label has access to it -CIPSO means standard CIPSO networking”…”�”}”hjñsbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´MØhjšh²hubhÒ)�”}”(hŒKIf you don't know what CIPSO is and don't plan to use it, you can just do::”h]”hŒNIf you don’t know what CIPSO is and don’t plan to use it, you can just do:”…”�”}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MÛhjšh²hubj')�”}”(hŒaecho 127.0.0.1 -CIPSO > /sys/fs/smackfs/netlabel echo 0.0.0.0/0 @ > /sys/fs/smackfs/netlabel”h]”hŒaecho 127.0.0.1 -CIPSO > /sys/fs/smackfs/netlabel echo 0.0.0.0/0 @ > /sys/fs/smackfs/netlabel”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´MÝhjšh²hubhÒ)�”}”(hŒmIf you use CIPSO on your 192.168.0.0/16 local network and need also unlabeled Internet access, you can have::”h]”hŒlIf you use CIPSO on your 192.168.0.0/16 local network and need also unlabeled Internet access, you can have:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Màhjšh²hubj')�”}”(hŒ¡echo 127.0.0.1 -CIPSO > /sys/fs/smackfs/netlabel echo 192.168.0.0/16 -CIPSO > /sys/fs/smackfs/netlabel echo 0.0.0.0/0 @ > /sys/fs/smackfs/netlabel”h]”hŒ¡echo 127.0.0.1 -CIPSO > /sys/fs/smackfs/netlabel echo 192.168.0.0/16 -CIPSO > /sys/fs/smackfs/netlabel echo 0.0.0.0/0 @ > /sys/fs/smackfs/netlabel”…”�”}”hj)sbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´Mãhjšh²hubeh}”(h]”Œsmack-netlabel-exceptions”ah ]”h"]”Œsmack netlabel exceptions”ah$]”h&]”uh1hµhjõ h²hh³hÊh´MÆubeh}”(h]”Œ smack-basics”ah ]”h"]”Œ smack basics”ah$]”h&]”uh1hµhj´ h²hh³hÊh´M°ubh¶)�”}”(hhh]”(h»)�”}”(hŒWriting Applications for Smack”h]”hŒWriting Applications for Smack”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjGh²hh³hÊh´MèubhÒ)�”}”(hŒ³There are three sorts of applications that will run on a Smack system. How an application interacts with Smack will determine what it will have to do to work properly under Smack.”h]”hŒ³There are three sorts of applications that will run on a Smack system. How an application interacts with Smack will determine what it will have to do to work properly under Smack.”…”�”}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MêhjGh²hubeh}”(h]”Œwriting-applications-for-smack”ah ]”h"]”Œwriting applications for smack”ah$]”h&]”uh1hµhj´ h²hh³hÊh´Mèubh¶)�”}”(hhh]”(h»)�”}”(hŒSmack Ignorant Applications”h]”hŒSmack Ignorant Applications”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjnh²hh³hÊh´MïubhÒ)�”}”(hXBy far the majority of applications have no reason whatever to care about the unique properties of Smack. Since invoking a program has no impact on the Smack label associated with the process the only concern likely to arise is whether the process has execute access to the program.”h]”hXBy far the majority of applications have no reason whatever to care about the unique properties of Smack. Since invoking a program has no impact on the Smack label associated with the process the only concern likely to arise is whether the process has execute access to the program.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mñhjnh²hubeh}”(h]”Œsmack-ignorant-applications”ah ]”h"]”Œsmack ignorant applications”ah$]”h&]”uh1hµhj´ h²hh³hÊh´Mïubh¶)�”}”(hhh]”(h»)�”}”(hŒSmack Relevant Applications”h]”hŒSmack Relevant Applications”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj•h²hh³hÊh´M÷ubhÒ)�”}”(hŒ¢Some programs can be improved by teaching them about Smack, but do not make any security decisions themselves. The utility ls(1) is one example of such a program.”h]”hŒ¢Some programs can be improved by teaching them about Smack, but do not make any security decisions themselves. The utility ls(1) is one example of such a program.”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mùhj•h²hubeh}”(h]”Œsmack-relevant-applications”ah ]”h"]”Œsmack relevant applications”ah$]”h&]”uh1hµhj´ h²hh³hÊh´M÷ubh¶)�”}”(hhh]”(h»)�”}”(hŒSmack Enforcing Applications”h]”hŒSmack Enforcing Applications”…”�”}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj¼h²hh³hÊh´MþubhÒ)�”}”(hXThese are special programs that not only know about Smack, but participate in the enforcement of system policy. In most cases these are the programs that set up user sessions. There are also network services that provide information to processes running with various labels.”h]”hXThese are special programs that not only know about Smack, but participate in the enforcement of system policy. In most cases these are the programs that set up user sessions. There are also network services that provide information to processes running with various labels.”…”�”}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mhj¼h²hubeh}”(h]”Œsmack-enforcing-applications”ah ]”h"]”Œsmack enforcing applications”ah$]”h&]”uh1hµhj´ h²hh³hÊh´Mþubh¶)�”}”(hhh]”(h»)�”}”(hŒFile System Interfaces”h]”hŒFile System Interfaces”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjãh²hh³hÊh´MubhÒ)�”}”(hŒ®Smack maintains labels on file system objects using extended attributes. The Smack label of a file, directory, or other file system object can be obtained using getxattr(2)::”h]”hŒ­Smack maintains labels on file system objects using extended attributes. The Smack label of a file, directory, or other file system object can be obtained using getxattr(2):”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mhjãh²hubj')�”}”(hŒ?len = getxattr("/", "security.SMACK64", value, sizeof (value));”h]”hŒ?len = getxattr("/", "security.SMACK64", value, sizeof (value));”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´M hjãh²hubhÒ)�”}”(hŒ’will put the Smack label of the root directory into value. A privileged process can set the Smack label of a file system object with setxattr(2)::”h]”hŒ‘will put the Smack label of the root directory into value. A privileged process can set the Smack label of a file system object with setxattr(2):”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mhjãh²hubj')�”}”(hŒTlen = strlen("Rubble"); rc = setxattr("/foo", "security.SMACK64", "Rubble", len, 0);”h]”hŒTlen = strlen("Rubble"); rc = setxattr("/foo", "security.SMACK64", "Rubble", len, 0);”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´Mhjãh²hubhÒ)�”}”(hŒVwill set the Smack label of /foo to "Rubble" if the program has appropriate privilege.”h]”hŒZwill set the Smack label of /foo to “Rubbleâ€� if the program has appropriate privilege.”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mhjãh²hubeh}”(h]”Œfile-system-interfaces”ah ]”h"]”Œfile system interfaces”ah$]”h&]”uh1hµhj´ h²hh³hÊh´Mubh¶)�”}”(hhh]”(h»)�”}”(hŒSocket Interfaces”h]”hŒSocket Interfaces”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjBh²hh³hÊh´MubhÒ)�”}”(hŒ5The socket attributes can be read using fgetxattr(2).”h]”hŒ5The socket attributes can be read using fgetxattr(2).”…”�”}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MhjBh²hubhÒ)�”}”(hŒTA privileged process can set the Smack label of outgoing packets with fsetxattr(2)::”h]”hŒSA privileged process can set the Smack label of outgoing packets with fsetxattr(2):”…”�”}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MhjBh²hubj')�”}”(hŒVlen = strlen("Rubble"); rc = fsetxattr(fd, "security.SMACK64IPOUT", "Rubble", len, 0);”h]”hŒVlen = strlen("Rubble"); rc = fsetxattr(fd, "security.SMACK64IPOUT", "Rubble", len, 0);”…”�”}”hjosbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´MhjBh²hubhÒ)�”}”(hŒqwill set the Smack label "Rubble" on packets going out from the socket if the program has appropriate privilege::”h]”hŒtwill set the Smack label “Rubbleâ€� on packets going out from the socket if the program has appropriate privilege:”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M"hjBh²hubj')�”}”(hŒ?rc = fsetxattr(fd, "security.SMACK64IPIN, "*", strlen("*"), 0);”h]”hŒ?rc = fsetxattr(fd, "security.SMACK64IPIN, "*", strlen("*"), 0);”…”�”}”hj‹sbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´M%hjBh²hubhÒ)�”}”(hŒ‰will set the Smack label "*" as the object label against which incoming packets will be checked if the program has appropriate privilege.”h]”hŒ�will set the Smack label “*â€� as the object label against which incoming packets will be checked if the program has appropriate privilege.”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M'hjBh²hubeh}”(h]”Œsocket-interfaces”ah ]”h"]”Œsocket interfaces”ah$]”h&]”uh1hµhj´ h²hh³hÊh´Mubh¶)�”}”(hhh]”(h»)�”}”(hŒAdministration”h]”hŒAdministration”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj¯h²hh³hÊh´M+ubhÒ)�”}”(hŒ"Smack supports some mount options:”h]”hŒ"Smack supports some mount options:”…”�”}”(hjÀh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M-hj¯h²hubhÌ)�”}”(hX†smackfsdef=label: specifies the label to give files that lack the Smack label extended attribute. smackfsroot=label: specifies the label to assign the root of the file system if it lacks the Smack extended attribute. smackfshat=label: specifies a label that must have read access to all labels set on the filesystem. Not yet enforced. smackfsfloor=label: specifies a label to which all labels set on the filesystem must have read access. Not yet enforced. smackfstransmute=label: behaves exactly like smackfsroot except that it also sets the transmute flag on the root of the mount ”h]”jä)�”}”(hhh]”(jé)�”}”(hŒbsmackfsdef=label: specifies the label to give files that lack the Smack label extended attribute. ”h]”(jï)�”}”(hŒsmackfsdef=label:”h]”hŒsmackfsdef=label:”…”�”}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M1hjÕubjÿ)�”}”(hhh]”hÒ)�”}”(hŒOspecifies the label to give files that lack the Smack label extended attribute.”h]”hŒOspecifies the label to give files that lack the Smack label extended attribute.”…”�”}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M0hjçubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjÕubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M1hjÒubjé)�”}”(hŒwsmackfsroot=label: specifies the label to assign the root of the file system if it lacks the Smack extended attribute. ”h]”(jï)�”}”(hŒsmackfsroot=label:”h]”hŒsmackfsroot=label:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M5hjubjÿ)�”}”(hhh]”hÒ)�”}”(hŒcspecifies the label to assign the root of the file system if it lacks the Smack extended attribute.”h]”hŒcspecifies the label to assign the root of the file system if it lacks the Smack extended attribute.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M4hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M5hjÒubjé)�”}”(hŒvsmackfshat=label: specifies a label that must have read access to all labels set on the filesystem. Not yet enforced. ”h]”(jï)�”}”(hŒsmackfshat=label:”h]”hŒsmackfshat=label:”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M9hj3ubjÿ)�”}”(hhh]”hÒ)�”}”(hŒcspecifies a label that must have read access to all labels set on the filesystem. Not yet enforced.”h]”hŒcspecifies a label that must have read access to all labels set on the filesystem. Not yet enforced.”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M8hjEubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhj3ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M9hjÒubjé)�”}”(hŒysmackfsfloor=label: specifies a label to which all labels set on the filesystem must have read access. Not yet enforced. ”h]”(jï)�”}”(hŒsmackfsfloor=label:”h]”hŒsmackfsfloor=label:”…”�”}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´M=hjbubjÿ)�”}”(hhh]”hÒ)�”}”(hŒdspecifies a label to which all labels set on the filesystem must have read access. Not yet enforced.”h]”hŒdspecifies a label to which all labels set on the filesystem must have read access. Not yet enforced.”…”�”}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M<hjtubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhjbubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´M=hjÒubjé)�”}”(hŒ~smackfstransmute=label: behaves exactly like smackfsroot except that it also sets the transmute flag on the root of the mount ”h]”(jï)�”}”(hŒsmackfstransmute=label:”h]”hŒsmackfstransmute=label:”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´MAhj‘ubjÿ)�”}”(hhh]”hÒ)�”}”(hŒebehaves exactly like smackfsroot except that it also sets the transmute flag on the root of the mount”h]”hŒebehaves exactly like smackfsroot except that it also sets the transmute flag on the root of the mount”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´M@hj£ubah}”(h]”h ]”h"]”h$]”h&]”uh1jþhj‘ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jèh³hÊh´MAhjÒubeh}”(h]”h ]”h"]”h$]”h&]”uh1jãhjÎubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M/hj¯h²hubhÒ)�”}”(hŒ3These mount options apply to all file system types.”h]”hŒ3These mount options apply to all file system types.”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MChj¯h²hubeh}”(h]”Œadministration”ah ]”h"]”Œadministration”ah$]”h&]”uh1hµhj´ h²hh³hÊh´M+ubh¶)�”}”(hhh]”(h»)�”}”(hŒSmack auditing”h]”hŒSmack auditing”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjâh²hh³hÊh´MFubhÒ)�”}”(hŒùIf you want Smack auditing of security events, you need to set CONFIG_AUDIT in your kernel configuration. By default, all denied events will be audited. You can change this behavior by writing a single character to the /sys/fs/smackfs/logging file::”h]”hŒøIf you want Smack auditing of security events, you need to set CONFIG_AUDIT in your kernel configuration. By default, all denied events will be audited. You can change this behavior by writing a single character to the /sys/fs/smackfs/logging file:”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MHhjâh²hubj')�”}”(hŒR0 : no logging 1 : log denied (default) 2 : log accepted 3 : log denied & accepted”h]”hŒR0 : no logging 1 : log denied (default) 2 : log accepted 3 : log denied & accepted”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j6j7uh1j&h³hÊh´MMhjâh²hubhÒ)�”}”(hŒîEvents are logged as 'key=value' pairs, for each event you at least will get the subject, the object, the rights requested, the action, the kernel function that triggered the event, plus other pairs depending on the type of event audited.”h]”hŒòEvents are logged as ‘key=value’ pairs, for each event you at least will get the subject, the object, the rights requested, the action, the kernel function that triggered the event, plus other pairs depending on the type of event audited.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MRhjâh²hubeh}”(h]”Œsmack-auditing”ah ]”h"]”Œsmack auditing”ah$]”h&]”uh1hµhj´ h²hh³hÊh´MFubh¶)�”}”(hhh]”(h»)�”}”(hŒ Bringup Mode”h]”hŒ Bringup Mode”…”�”}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj%h²hh³hÊh´MXubhÒ)�”}”(hXÖBringup mode provides logging features that can make application configuration and system bringup easier. Configure the kernel with CONFIG_SECURITY_SMACK_BRINGUP to enable these features. When bringup mode is enabled accesses that succeed due to rules marked with the "b" access mode will logged. When a new label is introduced for processes rules can be added aggressively, marked with the "b". The logging allows tracking of which rules actual get used for that label.”h]”hXÞBringup mode provides logging features that can make application configuration and system bringup easier. Configure the kernel with CONFIG_SECURITY_SMACK_BRINGUP to enable these features. When bringup mode is enabled accesses that succeed due to rules marked with the “bâ€� access mode will logged. When a new label is introduced for processes rules can be added aggressively, marked with the “bâ€�. The logging allows tracking of which rules actual get used for that label.”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´MZhj%h²hubhÒ)�”}”(hX�Another feature of bringup mode is the "unconfined" option. Writing a label to /sys/fs/smackfs/unconfined makes subjects with that label able to access any object, and objects with that label accessible to all subjects. Any access that is granted because a label is unconfined is logged. This feature is dangerous, as files and directories may be created in places they couldn't if the policy were being enforced.”h]”hX£Another feature of bringup mode is the “unconfinedâ€� option. Writing a label to /sys/fs/smackfs/unconfined makes subjects with that label able to access any object, and objects with that label accessible to all subjects. Any access that is granted because a label is unconfined is logged. This feature is dangerous, as files and directories may be created in places they couldn’t if the policy were being enforced.”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑh³hÊh´Mbhj%h²hubeh}”(h]”Œ bringup-mode”ah ]”h"]”Œ bringup mode”ah$]”h&]”uh1hµhj´ h²hh³hÊh´MXubeh}”(h]”Œ9the-simplified-mandatory-access-control-kernel-whitepaper”ah ]”h"]”Œ;the simplified mandatory access control kernel (whitepaper)”ah$]”h&]”uh1hµhh·h²hh³hÊh´MTubeh}”(h]”Œsmack”ah ]”h"]”h$]”j} ah&]”uh1hµhhh²hh³hÊh´Kj Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jŒŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(Œsmack”Nj_j\j j j. j+ jU jR jò jï jDjAjbj_jÈjÅjïjìj�j�jýjúj$j!j×jÔjþjûj%j"jLjIjñjîj—j”j<j9jkjhj’j�j¹j¶jàjÝj?j<j¬j©jßjÜj"jjWjTuŒ nametypes”}”(jЉj_‰j ‰j. ‰jU ‰jò ‰jD‰jb‰jȉjï‰j�‰jý‰j$‰j׉jþ‰j%‰jL‰jñ‰j—‰j<‰jk‰j’‰j¹‰jà‰j?‰j¬‰j߉j"‰jW‰uh}”(jdh·j\j´ j jã j+ j jR j1 jy jX jï j€ jAjõ j_jjÅjejìjËj�jòjúj“j!jjÔj'jûjÚj"jjIj(jîjOj”jôj9jšjhjGj�jnj¶j•jÝj¼j<jãj©jBjÜj¯jjâjTj%uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”jšKs…”R”Œparse_messages”]”hŒsystem_message”“”)�”}”(hhh]”hÒ)�”}”(hŒ(Duplicate implicit target name: "smack".”h]”hŒ,Duplicate implicit target name: “smackâ€�.”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑhjñubah}”(h]”h ]”h"]”h$]”h&]”jy aŒlevel”KŒtype”ŒINFO”Œsource”hÊŒline”M|uh1jïhjX h²hh³hÊh´M|ubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.