Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132627
b: refs/heads/master
c: f1c6381
h: refs/heads/master
i:
  132625: fe8a520
  132623: 69a2550
v: v3
  • Loading branch information
Eric Paris authored and James Morris committed Feb 13, 2009
1 parent 5ec6ba9 commit 04837d9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21193dcd1f3570ddfd8a04f4465e484c1f94252f
refs/heads/master: f1c6381a6e337adcecf84be2a838bd9e610e2365
15 changes: 5 additions & 10 deletions trunk/security/selinux/avc.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,30 +381,25 @@ static inline struct avc_node *avc_search_node(u32 ssid, u32 tsid, u16 tclass)
* @ssid: source security identifier
* @tsid: target security identifier
* @tclass: target security class
* @requested: requested permissions, interpreted based on @tclass
*
* Look up an AVC entry that is valid for the
* @requested permissions between the SID pair
* (@ssid, @tsid), interpreting the permissions
* based on @tclass. If a valid AVC entry exists,
* then this function return the avc_node.
* Otherwise, this function returns NULL.
*/
static struct avc_node *avc_lookup(u32 ssid, u32 tsid, u16 tclass, u32 requested)
static struct avc_node *avc_lookup(u32 ssid, u32 tsid, u16 tclass)
{
struct avc_node *node;

avc_cache_stats_incr(lookups);
node = avc_search_node(ssid, tsid, tclass);

if (node && ((node->ae.avd.decided & requested) == requested)) {
if (node)
avc_cache_stats_incr(hits);
goto out;
}
else
avc_cache_stats_incr(misses);

node = NULL;
avc_cache_stats_incr(misses);
out:
return node;
}

Expand Down Expand Up @@ -875,7 +870,7 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid,

rcu_read_lock();

node = avc_lookup(ssid, tsid, tclass, requested);
node = avc_lookup(ssid, tsid, tclass);
if (!node) {
rcu_read_unlock();

Expand Down
1 change: 0 additions & 1 deletion trunk/security/selinux/include/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ int security_policycap_supported(unsigned int req_cap);
#define SEL_VEC_MAX 32
struct av_decision {
u32 allowed;
u32 decided;
u32 auditallow;
u32 auditdeny;
u32 seqno;
Expand Down
2 changes: 1 addition & 1 deletion trunk/security/selinux/selinuxfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ static ssize_t sel_write_access(struct file *file, char *buf, size_t size)

length = scnprintf(buf, SIMPLE_TRANSACTION_LIMIT,
"%x %x %x %x %u",
avd.allowed, avd.decided,
avd.allowed, 0xffffffff,
avd.auditallow, avd.auditdeny,
avd.seqno);
out2:
Expand Down
2 changes: 0 additions & 2 deletions trunk/security/selinux/ss/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ static int context_struct_compute_av(struct context *scontext,
* Initialize the access vectors to the default values.
*/
avd->allowed = 0;
avd->decided = 0xffffffff;
avd->auditallow = 0;
avd->auditdeny = 0xffffffff;
avd->seqno = latest_granting;
Expand Down Expand Up @@ -743,7 +742,6 @@ int security_compute_av(u32 ssid,

if (!ss_initialized) {
avd->allowed = 0xffffffff;
avd->decided = 0xffffffff;
avd->auditallow = 0;
avd->auditdeny = 0xffffffff;
avd->seqno = latest_granting;
Expand Down

0 comments on commit 04837d9

Please sign in to comment.