Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

constify chmod_common/security_path_chmod

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro be01f9f2 8a04c43b

+7 -7
+1 -1
fs/open.c
··· 499 499 return error; 500 500 } 501 501 502 - static int chmod_common(struct path *path, umode_t mode) 502 + static int chmod_common(const struct path *path, umode_t mode) 503 503 { 504 504 struct inode *inode = path->dentry->d_inode; 505 505 struct inode *delegated_inode = NULL;
+1 -1
include/linux/lsm_hooks.h
··· 1374 1374 int (*path_rename)(struct path *old_dir, struct dentry *old_dentry, 1375 1375 struct path *new_dir, 1376 1376 struct dentry *new_dentry); 1377 - int (*path_chmod)(struct path *path, umode_t mode); 1377 + int (*path_chmod)(const struct path *path, umode_t mode); 1378 1378 int (*path_chown)(const struct path *path, kuid_t uid, kgid_t gid); 1379 1379 int (*path_chroot)(struct path *path); 1380 1380 #endif
+2 -2
include/linux/security.h
··· 1455 1455 int security_path_rename(struct path *old_dir, struct dentry *old_dentry, 1456 1456 struct path *new_dir, struct dentry *new_dentry, 1457 1457 unsigned int flags); 1458 - int security_path_chmod(struct path *path, umode_t mode); 1458 + int security_path_chmod(const struct path *path, umode_t mode); 1459 1459 int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid); 1460 1460 int security_path_chroot(struct path *path); 1461 1461 #else /* CONFIG_SECURITY_PATH */ ··· 1508 1508 return 0; 1509 1509 } 1510 1510 1511 - static inline int security_path_chmod(struct path *path, umode_t mode) 1511 + static inline int security_path_chmod(const struct path *path, umode_t mode) 1512 1512 { 1513 1513 return 0; 1514 1514 }
+1 -1
security/apparmor/lsm.c
··· 334 334 return error; 335 335 } 336 336 337 - static int apparmor_path_chmod(struct path *path, umode_t mode) 337 + static int apparmor_path_chmod(const struct path *path, umode_t mode) 338 338 { 339 339 if (!mediated_filesystem(path->dentry)) 340 340 return 0;
+1 -1
security/security.c
··· 485 485 return call_int_hook(path_truncate, 0, path); 486 486 } 487 487 488 - int security_path_chmod(struct path *path, umode_t mode) 488 + int security_path_chmod(const struct path *path, umode_t mode) 489 489 { 490 490 if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry)))) 491 491 return 0;
+1 -1
security/tomoyo/tomoyo.c
··· 351 351 * 352 352 * Returns 0 on success, negative value otherwise. 353 353 */ 354 - static int tomoyo_path_chmod(struct path *path, umode_t mode) 354 + static int tomoyo_path_chmod(const struct path *path, umode_t mode) 355 355 { 356 356 return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, path, 357 357 mode & S_IALLUGO);