diff options
-rw-r--r-- | fs/open.c | 2 | ||||
-rw-r--r-- | include/linux/lsm_hooks.h | 2 | ||||
-rw-r--r-- | include/linux/security.h | 4 | ||||
-rw-r--r-- | security/apparmor/lsm.c | 2 | ||||
-rw-r--r-- | security/security.c | 2 | ||||
-rw-r--r-- | security/tomoyo/tomoyo.c | 2 |
6 files changed, 7 insertions, 7 deletions
@@ -499,7 +499,7 @@ out: | |||
499 | return error; | 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 | struct inode *inode = path->dentry->d_inode; | 504 | struct inode *inode = path->dentry->d_inode; |
505 | struct inode *delegated_inode = NULL; | 505 | struct inode *delegated_inode = NULL; |
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h index 47117751f4eb..294fdfe902bf 100644 --- a/include/linux/lsm_hooks.h +++ b/include/linux/lsm_hooks.h | |||
@@ -1374,7 +1374,7 @@ union security_list_options { | |||
1374 | int (*path_rename)(struct path *old_dir, struct dentry *old_dentry, | 1374 | int (*path_rename)(struct path *old_dir, struct dentry *old_dentry, |
1375 | struct path *new_dir, | 1375 | struct path *new_dir, |
1376 | struct dentry *new_dentry); | 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 | int (*path_chown)(const struct path *path, kuid_t uid, kgid_t gid); | 1378 | int (*path_chown)(const struct path *path, kuid_t uid, kgid_t gid); |
1379 | int (*path_chroot)(struct path *path); | 1379 | int (*path_chroot)(struct path *path); |
1380 | #endif | 1380 | #endif |
diff --git a/include/linux/security.h b/include/linux/security.h index 415a357efe4c..d6593ee2d0a9 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1455,7 +1455,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir, | |||
1455 | int security_path_rename(struct path *old_dir, struct dentry *old_dentry, | 1455 | int security_path_rename(struct path *old_dir, struct dentry *old_dentry, |
1456 | struct path *new_dir, struct dentry *new_dentry, | 1456 | struct path *new_dir, struct dentry *new_dentry, |
1457 | unsigned int flags); | 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 | int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid); | 1459 | int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid); |
1460 | int security_path_chroot(struct path *path); | 1460 | int security_path_chroot(struct path *path); |
1461 | #else /* CONFIG_SECURITY_PATH */ | 1461 | #else /* CONFIG_SECURITY_PATH */ |
@@ -1508,7 +1508,7 @@ static inline int security_path_rename(struct path *old_dir, | |||
1508 | return 0; | 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 | return 0; | 1513 | return 0; |
1514 | } | 1514 | } |
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 3adbff987b77..8d19615dcb73 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c | |||
@@ -334,7 +334,7 @@ static int apparmor_path_rename(struct path *old_dir, struct dentry *old_dentry, | |||
334 | return error; | 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 | if (!mediated_filesystem(path->dentry)) | 339 | if (!mediated_filesystem(path->dentry)) |
340 | return 0; | 340 | return 0; |
diff --git a/security/security.c b/security/security.c index fc567656b16f..b333429fe718 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -485,7 +485,7 @@ int security_path_truncate(const struct path *path) | |||
485 | return call_int_hook(path_truncate, 0, path); | 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 | if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry)))) | 490 | if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry)))) |
491 | return 0; | 491 | return 0; |
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c index c1177f885247..e48d0a4e4128 100644 --- a/security/tomoyo/tomoyo.c +++ b/security/tomoyo/tomoyo.c | |||
@@ -351,7 +351,7 @@ static int tomoyo_file_ioctl(struct file *file, unsigned int cmd, | |||
351 | * | 351 | * |
352 | * Returns 0 on success, negative value otherwise. | 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 | return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, path, | 356 | return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, path, |
357 | mode & S_IALLUGO); | 357 | mode & S_IALLUGO); |