diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-17 17:41:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-17 17:41:03 -0400 |
commit | c52b76185b7a1b300e5f15ff871c8f45ced3dee9 (patch) | |
tree | 071bb551fb652d1e1b7e8e82e410d16630c0f2dc /include/linux/lsm_hooks.h | |
parent | 681750c0468185f92acb8080c13f26a19cb4ee0d (diff) | |
parent | 81cd8896a64cc34bd59f097fa619b11ab40ca7a6 (diff) |
Merge branch 'work.const-path' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull 'struct path' constification update from Al Viro:
"'struct path' is passed by reference to a bunch of Linux security
methods; in theory, there's nothing to stop them from modifying the
damn thing and LSM community being what it is, sooner or later some
enterprising soul is going to decide that it's a good idea.
Let's remove the temptation and constify all of those..."
* 'work.const-path' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
constify ima_d_path()
constify security_sb_pivotroot()
constify security_path_chroot()
constify security_path_{link,rename}
apparmor: remove useless checks for NULL ->mnt
constify security_path_{mkdir,mknod,symlink}
constify security_path_{unlink,rmdir}
apparmor: constify common_perm_...()
apparmor: constify aa_path_link()
apparmor: new helper - common_path_perm()
constify chmod_common/security_path_chmod
constify security_sb_mount()
constify chown_common/security_path_chown
tomoyo: constify assorted struct path *
apparmor_path_truncate(): path->mnt is never NULL
constify vfs_truncate()
constify security_path_truncate()
[apparmor] constify struct path * in a bunch of helpers
Diffstat (limited to 'include/linux/lsm_hooks.h')
-rw-r--r-- | include/linux/lsm_hooks.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h index 41ab4662f95c..512fd000562b 100644 --- a/include/linux/lsm_hooks.h +++ b/include/linux/lsm_hooks.h | |||
@@ -1344,10 +1344,10 @@ union security_list_options { | |||
1344 | int (*sb_kern_mount)(struct super_block *sb, int flags, void *data); | 1344 | int (*sb_kern_mount)(struct super_block *sb, int flags, void *data); |
1345 | int (*sb_show_options)(struct seq_file *m, struct super_block *sb); | 1345 | int (*sb_show_options)(struct seq_file *m, struct super_block *sb); |
1346 | int (*sb_statfs)(struct dentry *dentry); | 1346 | int (*sb_statfs)(struct dentry *dentry); |
1347 | int (*sb_mount)(const char *dev_name, struct path *path, | 1347 | int (*sb_mount)(const char *dev_name, const struct path *path, |
1348 | const char *type, unsigned long flags, void *data); | 1348 | const char *type, unsigned long flags, void *data); |
1349 | int (*sb_umount)(struct vfsmount *mnt, int flags); | 1349 | int (*sb_umount)(struct vfsmount *mnt, int flags); |
1350 | int (*sb_pivotroot)(struct path *old_path, struct path *new_path); | 1350 | int (*sb_pivotroot)(const struct path *old_path, const struct path *new_path); |
1351 | int (*sb_set_mnt_opts)(struct super_block *sb, | 1351 | int (*sb_set_mnt_opts)(struct super_block *sb, |
1352 | struct security_mnt_opts *opts, | 1352 | struct security_mnt_opts *opts, |
1353 | unsigned long kern_flags, | 1353 | unsigned long kern_flags, |
@@ -1361,23 +1361,23 @@ union security_list_options { | |||
1361 | 1361 | ||
1362 | 1362 | ||
1363 | #ifdef CONFIG_SECURITY_PATH | 1363 | #ifdef CONFIG_SECURITY_PATH |
1364 | int (*path_unlink)(struct path *dir, struct dentry *dentry); | 1364 | int (*path_unlink)(const struct path *dir, struct dentry *dentry); |
1365 | int (*path_mkdir)(struct path *dir, struct dentry *dentry, | 1365 | int (*path_mkdir)(const struct path *dir, struct dentry *dentry, |
1366 | umode_t mode); | 1366 | umode_t mode); |
1367 | int (*path_rmdir)(struct path *dir, struct dentry *dentry); | 1367 | int (*path_rmdir)(const struct path *dir, struct dentry *dentry); |
1368 | int (*path_mknod)(struct path *dir, struct dentry *dentry, | 1368 | int (*path_mknod)(const struct path *dir, struct dentry *dentry, |
1369 | umode_t mode, unsigned int dev); | 1369 | umode_t mode, unsigned int dev); |
1370 | int (*path_truncate)(struct path *path); | 1370 | int (*path_truncate)(const struct path *path); |
1371 | int (*path_symlink)(struct path *dir, struct dentry *dentry, | 1371 | int (*path_symlink)(const struct path *dir, struct dentry *dentry, |
1372 | const char *old_name); | 1372 | const char *old_name); |
1373 | int (*path_link)(struct dentry *old_dentry, struct path *new_dir, | 1373 | int (*path_link)(struct dentry *old_dentry, const struct path *new_dir, |
1374 | struct dentry *new_dentry); | 1374 | struct dentry *new_dentry); |
1375 | int (*path_rename)(struct path *old_dir, struct dentry *old_dentry, | 1375 | int (*path_rename)(const struct path *old_dir, struct dentry *old_dentry, |
1376 | struct path *new_dir, | 1376 | const struct path *new_dir, |
1377 | struct dentry *new_dentry); | 1377 | struct dentry *new_dentry); |
1378 | int (*path_chmod)(struct path *path, umode_t mode); | 1378 | int (*path_chmod)(const struct path *path, umode_t mode); |
1379 | int (*path_chown)(struct path *path, kuid_t uid, kgid_t gid); | 1379 | int (*path_chown)(const struct path *path, kuid_t uid, kgid_t gid); |
1380 | int (*path_chroot)(struct path *path); | 1380 | int (*path_chroot)(const struct path *path); |
1381 | #endif | 1381 | #endif |
1382 | 1382 | ||
1383 | int (*inode_alloc_security)(struct inode *inode); | 1383 | int (*inode_alloc_security)(struct inode *inode); |