]> git.hungrycats.org Git - linux/commitdiff
[PATCH] selinux: remove hardcoded policy assumption from get_user_sids() logic
authorAndrew Morton <akpm@osdl.org>
Wed, 21 Apr 2004 00:44:05 +0000 (17:44 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 21 Apr 2004 00:44:05 +0000 (17:44 -0700)
From: Stephen Smalley <sds@epoch.ncsc.mil>

This patch removes a hardcoded policy assumption from the get_user_sids logic
in the SELinux module that was preventing it from returning contexts that had
the same type as the caller even if the policy allowed such a transition.  The
assumption is not valid for all policies, and can be handled via policy
configuration and userspace rather than hardcoding it in the module logic.

security/selinux/ss/services.c

index 12e6777f5d23fca666742864bf0a324451285e45..7d0fedf04179398d9765b71f13cf657ae8dc3c24 100644 (file)
@@ -1341,8 +1341,6 @@ int security_get_user_sids(u32 fromsid,
                        if (!ebitmap_get_bit(&role->types, j))
                                continue;
                        usercon.type = j+1;
-                       if (usercon.type == fromcon->type)
-                               continue;
                        mls_for_user_ranges(user,usercon) {
                                rc = context_struct_compute_av(fromcon, &usercon,
                                                               SECCLASS_PROCESS,