selinux/stable-5.14 PR 20210805
-----BEGIN PGP SIGNATURE----- iQJIBAABCAAyFiEES0KozwfymdVUl37v6iDy2pc3iXMFAmEMDlwUHHBhdWxAcGF1 bC1tb29yZS5jb20ACgkQ6iDy2pc3iXOYORAAtw9XyVxiqEdHkX4L6PftF392CsOM slxcVzV2p6Dl4QxT+nL+UU1IoJcJCAwV6lEfiTEShqblLGV/Fepzcii86yt7M6+Z 1Mqm0y/2K8o5Fo1Lowbg3qPauU0PdyS9BbyWH1Uvc1IRmKvF13WsS0OYwtueWWBN Rab6YzkXBsemFZVzzRqB4mEUwDZ9E0Thl385jgcwUsjawB8ox3JnTNA47N45VZj3 PDUhugULT/t6gGI5u+TTzdsGH0TQ3MHALrJCRJmf5L5RVd/1N3bnL0op9h7SYt5p 7FJCncNl16L4ThNLL7QZtLHkXiIV0CG0i+WlWjSKqAFxnQp9F4TPNrpC9Cl/yi0G WnFThdsgzQVO0Qg99ch27TtskUMkQwT0jEnNv8iee4uSmAdcoC1li7UbsoSRAf3b u/2uRhybMIFQ37I+m5a1uAElmphHpr8Kp9r5IkzZsqC9Xcs76WI3CyU2FSGXIbVG dytX+6Y2Shp/tgNkReO0JReoF3e2MndaIMa1TImnzDdrngaf3uX3THiUv2JeB7pE xZlZnFy4tZiBRslySuh6t6f3hErmnw78jI23uHHeJIi2X0WGdJ/YlQ2wmGDvBoDQ senQl6XxHZxSKfExSvFr12D+BOu9TK3RhbrxNbFFc+TYHPWBgeVBMjTj1KPqo0a/ hTDtuS7Zb/B3nS8= =ewLR -----END PGP SIGNATURE----- Merge tag 'selinux-pr-20210805' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux fix from Paul Moore: "One small SELinux fix for a problem where an error code was not being propagated back up to userspace when a bogus SELinux policy is loaded into the kernel" * tag 'selinux-pr-20210805' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: correct the return value when loads initial sids
This commit is contained in:
commit
0b53abfc5f
|
@ -874,7 +874,7 @@ int policydb_load_isids(struct policydb *p, struct sidtab *s)
|
|||
rc = sidtab_init(s);
|
||||
if (rc) {
|
||||
pr_err("SELinux: out of memory on SID table init\n");
|
||||
goto out;
|
||||
return rc;
|
||||
}
|
||||
|
||||
head = p->ocontexts[OCON_ISID];
|
||||
|
@ -885,7 +885,7 @@ int policydb_load_isids(struct policydb *p, struct sidtab *s)
|
|||
if (sid == SECSID_NULL) {
|
||||
pr_err("SELinux: SID 0 was assigned a context.\n");
|
||||
sidtab_destroy(s);
|
||||
goto out;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Ignore initial SIDs unused by this kernel. */
|
||||
|
@ -897,12 +897,10 @@ int policydb_load_isids(struct policydb *p, struct sidtab *s)
|
|||
pr_err("SELinux: unable to load initial SID %s.\n",
|
||||
name);
|
||||
sidtab_destroy(s);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
rc = 0;
|
||||
out:
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int policydb_class_isvalid(struct policydb *p, unsigned int class)
|
||||
|
|
Loading…
Reference in New Issue