]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - security/capability.c
OMAP: dmtimer: enable all timers to be wakeup events
[linux-2.6-omap-h63xx.git] / security / capability.c
index 2dce66fcb992a106196054847c21f93cd87c5eeb..21b6cead6a8ed38927abab1bd8cd9c491194c1bf 100644 (file)
@@ -263,6 +263,53 @@ static void cap_inode_getsecid(const struct inode *inode, u32 *secid)
        *secid = 0;
 }
 
+#ifdef CONFIG_SECURITY_PATH
+static int cap_path_mknod(struct path *dir, struct dentry *dentry, int mode,
+                         unsigned int dev)
+{
+       return 0;
+}
+
+static int cap_path_mkdir(struct path *dir, struct dentry *dentry, int mode)
+{
+       return 0;
+}
+
+static int cap_path_rmdir(struct path *dir, struct dentry *dentry)
+{
+       return 0;
+}
+
+static int cap_path_unlink(struct path *dir, struct dentry *dentry)
+{
+       return 0;
+}
+
+static int cap_path_symlink(struct path *dir, struct dentry *dentry,
+                           const char *old_name)
+{
+       return 0;
+}
+
+static int cap_path_link(struct dentry *old_dentry, struct path *new_dir,
+                        struct dentry *new_dentry)
+{
+       return 0;
+}
+
+static int cap_path_rename(struct path *old_path, struct dentry *old_dentry,
+                          struct path *new_path, struct dentry *new_dentry)
+{
+       return 0;
+}
+
+static int cap_path_truncate(struct path *path, loff_t length,
+                            unsigned int time_attrs)
+{
+       return 0;
+}
+#endif
+
 static int cap_file_permission(struct file *file, int mask)
 {
        return 0;
@@ -573,10 +620,6 @@ static int cap_socket_accept(struct socket *sock, struct socket *newsock)
        return 0;
 }
 
-static void cap_socket_post_accept(struct socket *sock, struct socket *newsock)
-{
-}
-
 static int cap_socket_sendmsg(struct socket *sock, struct msghdr *msg, int size)
 {
        return 0;
@@ -883,6 +926,16 @@ void security_fixup_ops(struct security_operations *ops)
        set_to_cap_if_null(ops, inode_setsecurity);
        set_to_cap_if_null(ops, inode_listsecurity);
        set_to_cap_if_null(ops, inode_getsecid);
+#ifdef CONFIG_SECURITY_PATH
+       set_to_cap_if_null(ops, path_mknod);
+       set_to_cap_if_null(ops, path_mkdir);
+       set_to_cap_if_null(ops, path_rmdir);
+       set_to_cap_if_null(ops, path_unlink);
+       set_to_cap_if_null(ops, path_symlink);
+       set_to_cap_if_null(ops, path_link);
+       set_to_cap_if_null(ops, path_rename);
+       set_to_cap_if_null(ops, path_truncate);
+#endif
        set_to_cap_if_null(ops, file_permission);
        set_to_cap_if_null(ops, file_alloc_security);
        set_to_cap_if_null(ops, file_free_security);
@@ -957,7 +1010,6 @@ void security_fixup_ops(struct security_operations *ops)
        set_to_cap_if_null(ops, socket_connect);
        set_to_cap_if_null(ops, socket_listen);
        set_to_cap_if_null(ops, socket_accept);
-       set_to_cap_if_null(ops, socket_post_accept);
        set_to_cap_if_null(ops, socket_sendmsg);
        set_to_cap_if_null(ops, socket_recvmsg);
        set_to_cap_if_null(ops, socket_getsockname);