]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - security/selinux/avc.c
Embed a struct path into struct nameidata instead of nd->{dentry,mnt}
[linux-2.6-omap-h63xx.git] / security / selinux / avc.c
index 0e69adf63bdbffa522039f1df111ccb0dcbaca99..e8529e2f51e5ba24042ccd88b77e481c9457a5aa 100644 (file)
@@ -661,9 +661,18 @@ void avc_audit(u32 ssid, u32 tsid,
                                                    "daddr", "dest");
                                break;
                        }
-                       if (a->u.net.netif)
-                               audit_log_format(ab, " netif=%s",
-                                       a->u.net.netif);
+                       if (a->u.net.netif > 0) {
+                               struct net_device *dev;
+
+                               /* NOTE: we always use init's namespace */
+                               dev = dev_get_by_index(&init_net,
+                                                      a->u.net.netif);
+                               if (dev) {
+                                       audit_log_format(ab, " netif=%s",
+                                                        dev->name);
+                                       dev_put(dev);
+                               }
+                       }
                        break;
                }
        }
@@ -916,3 +925,8 @@ int avc_has_perm(u32 ssid, u32 tsid, u16 tclass,
        avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata);
        return rc;
 }
+
+u32 avc_policy_seqno(void)
+{
+       return avc_cache.latest_notif;
+}