Re: maybe a bug in SELinux: security_context_to_sid_core

2018-03-08 Thread Zhang, Ning A
Hi, Bill For below SELinux behavior, do you know why. BR. Ning. 在 2018-02-28三的 14:47 +0800,Zhang Ning写道: > Hi, > > Before SELinux is initialized, get scontext by secid by using: > > security_secctx_to_secid() may return wrong numbe > > eg: > security_secctx_to_secid("devnull", strlen("devnul

maybe a bug in SELinux: security_context_to_sid_core

2018-02-27 Thread Zhang, Ning A
Hi, Before SELinux is initialized, get scontext by secid by using: security_secctx_to_secid() may return wrong numbe eg: security_secctx_to_secid("devnull", strlen("devnull"), &sid); sid here will be 1 because: in security_context_to_sid_core: ... if (!ss_initialized) {