Skip to content

Commit

Permalink
[SELINUX]: Fix bug in security_sid_mls_copy
Browse files Browse the repository at this point in the history
The following fixes a bug where random mem is being tampered with in the
non-mls case; encountered by Jashua Brindle on a gentoo box.

Signed-off-by: Venkat Yekkirala <vyekkirala@TrustedCS.com>
Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
Venkat Yekkirala authored and David S. Miller committed Sep 22, 2006
1 parent 1616436 commit 4eb327b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/ss/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ int security_sid_mls_copy(u32 sid, u32 mls_sid, u32 *new_sid)
u32 len;
int rc = 0;

if (!ss_initialized) {
if (!ss_initialized || !selinux_mls_enabled) {
*new_sid = sid;
goto out;
}
Expand Down

0 comments on commit 4eb327b

Please sign in to comment.