]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - include/linux/security.h
security: remove sb_check_sb hooks
[linux-2.6.git] / include / linux / security.h
index 26eca85b2417505f5f1fced4107e622750940738..9ebd2e411d2df74319e997663fa9d06499dcba82 100644 (file)
@@ -76,7 +76,7 @@ extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3,
 extern int cap_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp);
 extern int cap_task_setioprio(struct task_struct *p, int ioprio);
 extern int cap_task_setnice(struct task_struct *p, int nice);
-extern int cap_syslog(int type);
+extern int cap_syslog(int type, bool from_file);
 extern int cap_vm_enough_memory(struct mm_struct *mm, long pages);
 
 struct msghdr;
@@ -95,6 +95,8 @@ struct seq_file;
 extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb);
 extern int cap_netlink_recv(struct sk_buff *skb, int cap);
 
+void reset_security_ops(void);
+
 #ifdef CONFIG_MMU
 extern unsigned long mmap_min_addr;
 extern unsigned long dac_mmap_min_addr;
@@ -265,12 +267,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
  *     @orig the original mount data copied from userspace.
  *     @copy copied data which will be passed to the security module.
  *     Returns 0 if the copy was successful.
- * @sb_check_sb:
- *     Check permission before the device with superblock @mnt->sb is mounted
- *     on the mount point named by @nd.
- *     @mnt contains the vfsmount for device being mounted.
- *     @path contains the path for the mount point.
- *     Return 0 if permission is granted.
  * @sb_umount:
  *     Check permission before the @mnt file system is unmounted.
  *     @mnt contains the mounted file system.
@@ -1349,6 +1345,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
  *     logging to the console.
  *     See the syslog(2) manual page for an explanation of the @type values.
  *     @type contains the type of action.
+ *     @from_file indicates the context of action (if it came from /proc).
  *     Return 0 if permission is granted.
  * @settime:
  *     Check permission to change the system time.
@@ -1463,7 +1460,7 @@ struct security_operations {
        int (*sysctl) (struct ctl_table *table, int op);
        int (*quotactl) (int cmds, int type, int id, struct super_block *sb);
        int (*quota_on) (struct dentry *dentry);
-       int (*syslog) (int type);
+       int (*syslog) (int type, bool from_file);
        int (*settime) (struct timespec *ts, struct timezone *tz);
        int (*vm_enough_memory) (struct mm_struct *mm, long pages);
 
@@ -1481,7 +1478,6 @@ struct security_operations {
        int (*sb_statfs) (struct dentry *dentry);
        int (*sb_mount) (char *dev_name, struct path *path,
                         char *type, unsigned long flags, void *data);
-       int (*sb_check_sb) (struct vfsmount *mnt, struct path *path);
        int (*sb_umount) (struct vfsmount *mnt, int flags);
        void (*sb_umount_close) (struct vfsmount *mnt);
        void (*sb_umount_busy) (struct vfsmount *mnt);
@@ -1762,7 +1758,7 @@ int security_acct(struct file *file);
 int security_sysctl(struct ctl_table *table, int op);
 int security_quotactl(int cmds, int type, int id, struct super_block *sb);
 int security_quota_on(struct dentry *dentry);
-int security_syslog(int type);
+int security_syslog(int type, bool from_file);
 int security_settime(struct timespec *ts, struct timezone *tz);
 int security_vm_enough_memory(long pages);
 int security_vm_enough_memory_mm(struct mm_struct *mm, long pages);
@@ -1780,7 +1776,6 @@ int security_sb_show_options(struct seq_file *m, struct super_block *sb);
 int security_sb_statfs(struct dentry *dentry);
 int security_sb_mount(char *dev_name, struct path *path,
                      char *type, unsigned long flags, void *data);
-int security_sb_check_sb(struct vfsmount *mnt, struct path *path);
 int security_sb_umount(struct vfsmount *mnt, int flags);
 void security_sb_umount_close(struct vfsmount *mnt);
 void security_sb_umount_busy(struct vfsmount *mnt);
@@ -2008,9 +2003,9 @@ static inline int security_quota_on(struct dentry *dentry)
        return 0;
 }
 
-static inline int security_syslog(int type)
+static inline int security_syslog(int type, bool from_file)
 {
-       return cap_syslog(type);
+       return cap_syslog(type, from_file);
 }
 
 static inline int security_settime(struct timespec *ts, struct timezone *tz)
@@ -2096,12 +2091,6 @@ static inline int security_sb_mount(char *dev_name, struct path *path,
        return 0;
 }
 
-static inline int security_sb_check_sb(struct vfsmount *mnt,
-                                      struct path *path)
-{
-       return 0;
-}
-
 static inline int security_sb_umount(struct vfsmount *mnt, int flags)
 {
        return 0;