Re: [PATCH v2 2/2] selinux: default to security isid in sel_make_bools() if no sid is found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 19, 2016 at 8:28 PM, Gary Tierney <gary.tierney@xxxxxxx> wrote:
> Use SECINITSID_SECURITY as the default SID for booleans which don't have
> a matching SID returned from security_genfs_sid(), also update the
> error message to a warning which matches this.
>
> This prevents the policy failing to load (and consequently the system
> failing to boot) when there is no default genfscon statement matched for
> the selinuxfs in the new policy.
>
> Signed-off-by: Gary Tierney <gary.tierney@xxxxxxx>
> ---
>  security/selinux/selinuxfs.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Also merged, thank you.

> diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
> index e667c34..616a8d2 100644
> --- a/security/selinux/selinuxfs.c
> +++ b/security/selinux/selinuxfs.c
> @@ -1308,9 +1308,9 @@ static int sel_make_bools(void)
>                 isec = (struct inode_security_struct *)inode->i_security;
>                 ret = security_genfs_sid("selinuxfs", page, SECCLASS_FILE, &sid);
>                 if (ret) {
> -                       pr_err("SELinux: failed to lookup sid for %s\n", page);
> -                       goto out;
> -
> +                       pr_warn_ratelimited("SELinux: no sid found, defaulting to security isid for %s\n",
> +                                          page);
> +                       sid = SECINITSID_SECURITY;
>                 }
>
>                 isec->sid = sid;
> --
> 2.7.4
>

-- 
paul moore
www.paul-moore.com
_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux