On Sat, Sep 10, 2016 at 3:43 AM, Wei Yongjun <weiyj.lk@xxxxxxxxx> wrote: > From: Wei Yongjun <weiyongjun1@xxxxxxxxxx> > > Fix to return error code -EINVAL from the error handling case instead > of 0(rc is overwrite to 0 when policyvers >= POLICYDB_VERSION_ROLETRANS), > as done elsewhere in this function. > > Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx> > --- > security/selinux/ss/policydb.c | 1 + > 1 file changed, 1 insertion(+) Nice catch, thanks for the patch; it has been merged into the selinux#next branch. > diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c > index 8c661f0..ace6838 100644 > --- a/security/selinux/ss/policydb.c > +++ b/security/selinux/ss/policydb.c > @@ -2417,6 +2417,7 @@ int policydb_read(struct policydb *p, void *fp) > } else > tr->tclass = p->process_class; > > + rc = -EINVAL; > if (!policydb_role_isvalid(p, tr->role) || > !policydb_type_isvalid(p, tr->type) || > !policydb_class_isvalid(p, tr->tclass) || > -- 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.