For more information about SELINUX

Source: Internet
Author: User
For more information about SELINUX, see Linux general technology-Linux programming and kernel. Question 1: How does the system cache new decisions made by the security server to AVC? What is the use of netlink broadcast?

Question 2: in kernel code, why do the security_load_policy function in security/selinux/ss/services. c need to save the old SID table, load the new table, and release the old table? What's wrong with releasing the old table directly without saving it?
Int security_load_policy (void * data, size_t len ){
...
/* Save the old policydb and SID table to free later .*/
Memcpy (& oldpolicydb, & policydb, sizeof policydb );
Sidtab_set (& oldsidtab, & sidtab );

/* Install the new policydb and SID table .*/
POLICY_WRLOCK;
Memcpy (& policydb, & newpolicydb, sizeof policydb );
Sidtab_set (& sidtab, & newsidtab );
Seqno = ++ latest_granting;
Policydb_loaded_version = policydb. policyvers;
POLICY_WRUNLOCK;
LOAD_UNLOCK;

/* Free the old policydb and SID table .*/
Policydb_destroy (& oldpolicydb );
Sidtab_destroy (& oldsidtab );
...
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.