diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-22 17:48:24 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-04-21 23:13:23 -0400 |
commit | b5266eb4c8d1a2887a19aaec8144ee4ad1b054c3 (patch) | |
tree | 37105d0640169ad758d20847cf3effe77381f50f /include | |
parent | 1a60a280778ff90270fc7390d9ec102f713a5a29 (diff) |
[PATCH] switch a bunch of LSM hooks from nameidata to path
Namely, ones from namespace.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/security.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index fea1f4aa4dd5..53a34539382a 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -230,7 +230,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
230 | * loopback/bind mount (@flags & MS_BIND), @dev_name identifies the | 230 | * loopback/bind mount (@flags & MS_BIND), @dev_name identifies the |
231 | * pathname of the object being mounted. | 231 | * pathname of the object being mounted. |
232 | * @dev_name contains the name for object being mounted. | 232 | * @dev_name contains the name for object being mounted. |
233 | * @nd contains the nameidata structure for mount point object. | 233 | * @path contains the path for mount point object. |
234 | * @type contains the filesystem type. | 234 | * @type contains the filesystem type. |
235 | * @flags contains the mount flags. | 235 | * @flags contains the mount flags. |
236 | * @data contains the filesystem-specific data. | 236 | * @data contains the filesystem-specific data. |
@@ -249,7 +249,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
249 | * Check permission before the device with superblock @mnt->sb is mounted | 249 | * Check permission before the device with superblock @mnt->sb is mounted |
250 | * on the mount point named by @nd. | 250 | * on the mount point named by @nd. |
251 | * @mnt contains the vfsmount for device being mounted. | 251 | * @mnt contains the vfsmount for device being mounted. |
252 | * @nd contains the nameidata object for the mount point. | 252 | * @path contains the path for the mount point. |
253 | * Return 0 if permission is granted. | 253 | * Return 0 if permission is granted. |
254 | * @sb_umount: | 254 | * @sb_umount: |
255 | * Check permission before the @mnt file system is unmounted. | 255 | * Check permission before the @mnt file system is unmounted. |
@@ -278,16 +278,16 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
278 | * This hook is called any time a mount is successfully grafetd to | 278 | * This hook is called any time a mount is successfully grafetd to |
279 | * the tree. | 279 | * the tree. |
280 | * @mnt contains the mounted filesystem. | 280 | * @mnt contains the mounted filesystem. |
281 | * @mountpoint_nd contains the nameidata structure for the mount point. | 281 | * @mountpoint contains the path for the mount point. |
282 | * @sb_pivotroot: | 282 | * @sb_pivotroot: |
283 | * Check permission before pivoting the root filesystem. | 283 | * Check permission before pivoting the root filesystem. |
284 | * @old_nd contains the nameidata structure for the new location of the current root (put_old). | 284 | * @old_path contains the path for the new location of the current root (put_old). |
285 | * @new_nd contains the nameidata structure for the new root (new_root). | 285 | * @new_path contains the path for the new root (new_root). |
286 | * Return 0 if permission is granted. | 286 | * Return 0 if permission is granted. |
287 | * @sb_post_pivotroot: | 287 | * @sb_post_pivotroot: |
288 | * Update module state after a successful pivot. | 288 | * Update module state after a successful pivot. |
289 | * @old_nd contains the nameidata structure for the old root. | 289 | * @old_path contains the path for the old root. |
290 | * @new_nd contains the nameidata structure for the new root. | 290 | * @new_path contains the path for the new root. |
291 | * @sb_get_mnt_opts: | 291 | * @sb_get_mnt_opts: |
292 | * Get the security relevant mount options used for a superblock | 292 | * Get the security relevant mount options used for a superblock |
293 | * @sb the superblock to get security mount options from | 293 | * @sb the superblock to get security mount options from |
@@ -1315,20 +1315,20 @@ struct security_operations { | |||
1315 | int (*sb_copy_data)(char *orig, char *copy); | 1315 | int (*sb_copy_data)(char *orig, char *copy); |
1316 | int (*sb_kern_mount) (struct super_block *sb, void *data); | 1316 | int (*sb_kern_mount) (struct super_block *sb, void *data); |
1317 | int (*sb_statfs) (struct dentry *dentry); | 1317 | int (*sb_statfs) (struct dentry *dentry); |
1318 | int (*sb_mount) (char *dev_name, struct nameidata * nd, | 1318 | int (*sb_mount) (char *dev_name, struct path *path, |
1319 | char *type, unsigned long flags, void *data); | 1319 | char *type, unsigned long flags, void *data); |
1320 | int (*sb_check_sb) (struct vfsmount * mnt, struct nameidata * nd); | 1320 | int (*sb_check_sb) (struct vfsmount * mnt, struct path *path); |
1321 | int (*sb_umount) (struct vfsmount * mnt, int flags); | 1321 | int (*sb_umount) (struct vfsmount * mnt, int flags); |
1322 | void (*sb_umount_close) (struct vfsmount * mnt); | 1322 | void (*sb_umount_close) (struct vfsmount * mnt); |
1323 | void (*sb_umount_busy) (struct vfsmount * mnt); | 1323 | void (*sb_umount_busy) (struct vfsmount * mnt); |
1324 | void (*sb_post_remount) (struct vfsmount * mnt, | 1324 | void (*sb_post_remount) (struct vfsmount * mnt, |
1325 | unsigned long flags, void *data); | 1325 | unsigned long flags, void *data); |
1326 | void (*sb_post_addmount) (struct vfsmount * mnt, | 1326 | void (*sb_post_addmount) (struct vfsmount * mnt, |
1327 | struct nameidata * mountpoint_nd); | 1327 | struct path *mountpoint); |
1328 | int (*sb_pivotroot) (struct nameidata * old_nd, | 1328 | int (*sb_pivotroot) (struct path *old_path, |
1329 | struct nameidata * new_nd); | 1329 | struct path *new_path); |
1330 | void (*sb_post_pivotroot) (struct nameidata * old_nd, | 1330 | void (*sb_post_pivotroot) (struct path *old_path, |
1331 | struct nameidata * new_nd); | 1331 | struct path *new_path); |
1332 | int (*sb_get_mnt_opts) (const struct super_block *sb, | 1332 | int (*sb_get_mnt_opts) (const struct super_block *sb, |
1333 | struct security_mnt_opts *opts); | 1333 | struct security_mnt_opts *opts); |
1334 | int (*sb_set_mnt_opts) (struct super_block *sb, | 1334 | int (*sb_set_mnt_opts) (struct super_block *sb, |
@@ -1593,16 +1593,16 @@ void security_sb_free(struct super_block *sb); | |||
1593 | int security_sb_copy_data(char *orig, char *copy); | 1593 | int security_sb_copy_data(char *orig, char *copy); |
1594 | int security_sb_kern_mount(struct super_block *sb, void *data); | 1594 | int security_sb_kern_mount(struct super_block *sb, void *data); |
1595 | int security_sb_statfs(struct dentry *dentry); | 1595 | int security_sb_statfs(struct dentry *dentry); |
1596 | int security_sb_mount(char *dev_name, struct nameidata *nd, | 1596 | int security_sb_mount(char *dev_name, struct path *path, |
1597 | char *type, unsigned long flags, void *data); | 1597 | char *type, unsigned long flags, void *data); |
1598 | int security_sb_check_sb(struct vfsmount *mnt, struct nameidata *nd); | 1598 | int security_sb_check_sb(struct vfsmount *mnt, struct path *path); |
1599 | int security_sb_umount(struct vfsmount *mnt, int flags); | 1599 | int security_sb_umount(struct vfsmount *mnt, int flags); |
1600 | void security_sb_umount_close(struct vfsmount *mnt); | 1600 | void security_sb_umount_close(struct vfsmount *mnt); |
1601 | void security_sb_umount_busy(struct vfsmount *mnt); | 1601 | void security_sb_umount_busy(struct vfsmount *mnt); |
1602 | void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *data); | 1602 | void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *data); |
1603 | void security_sb_post_addmount(struct vfsmount *mnt, struct nameidata *mountpoint_nd); | 1603 | void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint); |
1604 | int security_sb_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd); | 1604 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); |
1605 | void security_sb_post_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd); | 1605 | void security_sb_post_pivotroot(struct path *old_path, struct path *new_path); |
1606 | int security_sb_get_mnt_opts(const struct super_block *sb, | 1606 | int security_sb_get_mnt_opts(const struct super_block *sb, |
1607 | struct security_mnt_opts *opts); | 1607 | struct security_mnt_opts *opts); |
1608 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); | 1608 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); |
@@ -1872,7 +1872,7 @@ static inline int security_sb_statfs (struct dentry *dentry) | |||
1872 | return 0; | 1872 | return 0; |
1873 | } | 1873 | } |
1874 | 1874 | ||
1875 | static inline int security_sb_mount (char *dev_name, struct nameidata *nd, | 1875 | static inline int security_sb_mount (char *dev_name, struct path *path, |
1876 | char *type, unsigned long flags, | 1876 | char *type, unsigned long flags, |
1877 | void *data) | 1877 | void *data) |
1878 | { | 1878 | { |
@@ -1880,7 +1880,7 @@ static inline int security_sb_mount (char *dev_name, struct nameidata *nd, | |||
1880 | } | 1880 | } |
1881 | 1881 | ||
1882 | static inline int security_sb_check_sb (struct vfsmount *mnt, | 1882 | static inline int security_sb_check_sb (struct vfsmount *mnt, |
1883 | struct nameidata *nd) | 1883 | struct path *path) |
1884 | { | 1884 | { |
1885 | return 0; | 1885 | return 0; |
1886 | } | 1886 | } |
@@ -1901,17 +1901,17 @@ static inline void security_sb_post_remount (struct vfsmount *mnt, | |||
1901 | { } | 1901 | { } |
1902 | 1902 | ||
1903 | static inline void security_sb_post_addmount (struct vfsmount *mnt, | 1903 | static inline void security_sb_post_addmount (struct vfsmount *mnt, |
1904 | struct nameidata *mountpoint_nd) | 1904 | struct path *mountpoint) |
1905 | { } | 1905 | { } |
1906 | 1906 | ||
1907 | static inline int security_sb_pivotroot (struct nameidata *old_nd, | 1907 | static inline int security_sb_pivotroot (struct path *old_path, |
1908 | struct nameidata *new_nd) | 1908 | struct path *new_path) |
1909 | { | 1909 | { |
1910 | return 0; | 1910 | return 0; |
1911 | } | 1911 | } |
1912 | 1912 | ||
1913 | static inline void security_sb_post_pivotroot (struct nameidata *old_nd, | 1913 | static inline void security_sb_post_pivotroot (struct path *old_path, |
1914 | struct nameidata *new_nd) | 1914 | struct path *new_path) |
1915 | { } | 1915 | { } |
1916 | static inline int security_sb_get_mnt_opts(const struct super_block *sb, | 1916 | static inline int security_sb_get_mnt_opts(const struct super_block *sb, |
1917 | struct security_mnt_opts *opts) | 1917 | struct security_mnt_opts *opts) |