diff options
author | Stephen Smalley <sds@tycho.nsa.gov> | 2013-12-30 14:40:32 -0500 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2013-12-30 14:40:32 -0500 |
commit | 2ba1541f218234b2b9fd39dc6a766f5ff9d0908c (patch) | |
tree | 4d70b51ac14722bb95503cc34d55abd87069d64f /libselinux/src/avc.c | |
parent | 5ba8c79721c8482927c985f9beeca0e52a62d366 (diff) | |
parent | edc2e99687b050d5be21a78a66d038aa1fc068d9 (diff) | |
download | android_external_selinux-2ba1541f218234b2b9fd39dc6a766f5ff9d0908c.tar.gz android_external_selinux-2ba1541f218234b2b9fd39dc6a766f5ff9d0908c.tar.bz2 android_external_selinux-2ba1541f218234b2b9fd39dc6a766f5ff9d0908c.zip |
Merge branch 'master' into next
Diffstat (limited to 'libselinux/src/avc.c')
-rw-r--r-- | libselinux/src/avc.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libselinux/src/avc.c b/libselinux/src/avc.c index f14eeb7a..1f7aca9f 100644 --- a/libselinux/src/avc.c +++ b/libselinux/src/avc.c @@ -336,11 +336,7 @@ static inline struct avc_node *avc_reclaim_node(void) static inline void avc_clear_avc_entry(struct avc_entry *ae) { - ae->ssid = ae->tsid = ae->create_sid = NULL; - ae->tclass = 0; - ae->avd.allowed = ae->avd.decided = 0; - ae->avd.auditallow = ae->avd.auditdeny = 0; - ae->used = 0; + memset(ae, 0, sizeof(*ae)); } static inline struct avc_node *avc_claim_node(security_id_t ssid, @@ -488,11 +484,7 @@ static int avc_insert(security_id_t ssid, security_id_t tsid, goto out; } - node->ae.avd.allowed = ae->avd.allowed; - node->ae.avd.decided = ae->avd.decided; - node->ae.avd.auditallow = ae->avd.auditallow; - node->ae.avd.auditdeny = ae->avd.auditdeny; - node->ae.avd.seqno = ae->avd.seqno; + memcpy(&node->ae.avd, &ae->avd, sizeof(ae->avd)); aeref->ae = &node->ae; out: return rc; |