]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - security/dummy.c
[XFS] kill XFS_ICSB_SB_LOCKED
[linux-2.6-omap-h63xx.git] / security / dummy.c
index fb2e942efbb66f927b454cff70c1f489bafb3dce..58d4dd1af5c7054f76d1d26e7b407eaaed12a25a 100644 (file)
@@ -196,13 +196,13 @@ static int dummy_sb_statfs (struct dentry *dentry)
        return 0;
 }
 
-static int dummy_sb_mount (char *dev_name, struct nameidata *nd, char *type,
+static int dummy_sb_mount (char *dev_name, struct path *path, char *type,
                           unsigned long flags, void *data)
 {
        return 0;
 }
 
-static int dummy_sb_check_sb (struct vfsmount *mnt, struct nameidata *nd)
+static int dummy_sb_check_sb (struct vfsmount *mnt, struct path *path)
 {
        return 0;
 }
@@ -229,17 +229,17 @@ static void dummy_sb_post_remount (struct vfsmount *mnt, unsigned long flags,
 }
 
 
-static void dummy_sb_post_addmount (struct vfsmount *mnt, struct nameidata *nd)
+static void dummy_sb_post_addmount (struct vfsmount *mnt, struct path *path)
 {
        return;
 }
 
-static int dummy_sb_pivotroot (struct nameidata *old_nd, struct nameidata *new_nd)
+static int dummy_sb_pivotroot (struct path *old_path, struct path *new_path)
 {
        return 0;
 }
 
-static void dummy_sb_post_pivotroot (struct nameidata *old_nd, struct nameidata *new_nd)
+static void dummy_sb_post_pivotroot (struct path *old_path, struct path *new_path)
 {
        return;
 }
@@ -604,7 +604,7 @@ static int dummy_task_kill (struct task_struct *p, struct siginfo *info,
 }
 
 static int dummy_task_prctl (int option, unsigned long arg2, unsigned long arg3,
-                            unsigned long arg4, unsigned long arg5)
+                            unsigned long arg4, unsigned long arg5, long *rc_p)
 {
        return 0;
 }
@@ -888,22 +888,23 @@ static inline void dummy_req_classify_flow(const struct request_sock *req,
 #endif /* CONFIG_SECURITY_NETWORK */
 
 #ifdef CONFIG_SECURITY_NETWORK_XFRM
-static int dummy_xfrm_policy_alloc_security(struct xfrm_policy *xp,
-               struct xfrm_user_sec_ctx *sec_ctx)
+static int dummy_xfrm_policy_alloc_security(struct xfrm_sec_ctx **ctxp,
+                                           struct xfrm_user_sec_ctx *sec_ctx)
 {
        return 0;
 }
 
-static inline int dummy_xfrm_policy_clone_security(struct xfrm_policy *old, struct xfrm_policy *new)
+static inline int dummy_xfrm_policy_clone_security(struct xfrm_sec_ctx *old_ctx,
+                                          struct xfrm_sec_ctx **new_ctxp)
 {
        return 0;
 }
 
-static void dummy_xfrm_policy_free_security(struct xfrm_policy *xp)
+static void dummy_xfrm_policy_free_security(struct xfrm_sec_ctx *ctx)
 {
 }
 
-static int dummy_xfrm_policy_delete_security(struct xfrm_policy *xp)
+static int dummy_xfrm_policy_delete_security(struct xfrm_sec_ctx *ctx)
 {
        return 0;
 }
@@ -923,7 +924,8 @@ static int dummy_xfrm_state_delete_security(struct xfrm_state *x)
        return 0;
 }
 
-static int dummy_xfrm_policy_lookup(struct xfrm_policy *xp, u32 sk_sid, u8 dir)
+static int dummy_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx,
+                                   u32 sk_sid, u8 dir)
 {
        return 0;
 }
@@ -993,7 +995,33 @@ static inline int dummy_key_permission(key_ref_t key_ref,
 }
 #endif /* CONFIG_KEYS */
 
-struct security_operations dummy_security_ops;
+#ifdef CONFIG_AUDIT
+static inline int dummy_audit_rule_init(u32 field, u32 op, char *rulestr,
+                                       void **lsmrule)
+{
+       return 0;
+}
+
+static inline int dummy_audit_rule_known(struct audit_krule *krule)
+{
+       return 0;
+}
+
+static inline int dummy_audit_rule_match(u32 secid, u32 field, u32 op,
+                                        void *lsmrule,
+                                        struct audit_context *actx)
+{
+       return 0;
+}
+
+static inline void dummy_audit_rule_free(void *lsmrule)
+{ }
+
+#endif /* CONFIG_AUDIT */
+
+struct security_operations dummy_security_ops = {
+       .name = "dummy",
+};
 
 #define set_to_dummy_if_null(ops, function)                            \
        do {                                                            \
@@ -1182,6 +1210,11 @@ void security_fixup_ops (struct security_operations *ops)
        set_to_dummy_if_null(ops, key_free);
        set_to_dummy_if_null(ops, key_permission);
 #endif /* CONFIG_KEYS */
-
+#ifdef CONFIG_AUDIT
+       set_to_dummy_if_null(ops, audit_rule_init);
+       set_to_dummy_if_null(ops, audit_rule_known);
+       set_to_dummy_if_null(ops, audit_rule_match);
+       set_to_dummy_if_null(ops, audit_rule_free);
+#endif
 }