diff options
author | David Howells <dhowells@redhat.com> | 2008-04-29 03:59:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:06 -0400 |
commit | 8f0cfa52a1d4ffacd8e7de906d19662f5da58d58 (patch) | |
tree | 2aa82e3682e75330d9b5d601855e3af3c57c03d8 /include | |
parent | 7ec02ef1596bb3c829a7e8b65ebf13b87faf1819 (diff) |
xattr: add missing consts to function arguments
Add missing consts to xattr function arguments.
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/security.h | 43 | ||||
-rw-r--r-- | include/linux/syscalls.h | 30 | ||||
-rw-r--r-- | include/linux/xattr.h | 6 |
3 files changed, 42 insertions, 37 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index d0a28fd1747a..3ebcdd00b17d 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -53,8 +53,9 @@ extern void cap_capset_set(struct task_struct *target, kernel_cap_t *effective, | |||
53 | extern int cap_bprm_set_security(struct linux_binprm *bprm); | 53 | extern int cap_bprm_set_security(struct linux_binprm *bprm); |
54 | extern void cap_bprm_apply_creds(struct linux_binprm *bprm, int unsafe); | 54 | extern void cap_bprm_apply_creds(struct linux_binprm *bprm, int unsafe); |
55 | extern int cap_bprm_secureexec(struct linux_binprm *bprm); | 55 | extern int cap_bprm_secureexec(struct linux_binprm *bprm); |
56 | extern int cap_inode_setxattr(struct dentry *dentry, char *name, void *value, size_t size, int flags); | 56 | extern int cap_inode_setxattr(struct dentry *dentry, const char *name, |
57 | extern int cap_inode_removexattr(struct dentry *dentry, char *name); | 57 | const void *value, size_t size, int flags); |
58 | extern int cap_inode_removexattr(struct dentry *dentry, const char *name); | ||
58 | extern int cap_inode_need_killpriv(struct dentry *dentry); | 59 | extern int cap_inode_need_killpriv(struct dentry *dentry); |
59 | extern int cap_inode_killpriv(struct dentry *dentry); | 60 | extern int cap_inode_killpriv(struct dentry *dentry); |
60 | extern int cap_task_post_setuid(uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags); | 61 | extern int cap_task_post_setuid(uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags); |
@@ -1362,13 +1363,13 @@ struct security_operations { | |||
1362 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); | 1363 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); |
1363 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); | 1364 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); |
1364 | void (*inode_delete) (struct inode *inode); | 1365 | void (*inode_delete) (struct inode *inode); |
1365 | int (*inode_setxattr) (struct dentry *dentry, char *name, void *value, | 1366 | int (*inode_setxattr) (struct dentry *dentry, const char *name, |
1366 | size_t size, int flags); | 1367 | const void *value, size_t size, int flags); |
1367 | void (*inode_post_setxattr) (struct dentry *dentry, char *name, void *value, | 1368 | void (*inode_post_setxattr) (struct dentry *dentry, const char *name, |
1368 | size_t size, int flags); | 1369 | const void *value, size_t size, int flags); |
1369 | int (*inode_getxattr) (struct dentry *dentry, char *name); | 1370 | int (*inode_getxattr) (struct dentry *dentry, const char *name); |
1370 | int (*inode_listxattr) (struct dentry *dentry); | 1371 | int (*inode_listxattr) (struct dentry *dentry); |
1371 | int (*inode_removexattr) (struct dentry *dentry, char *name); | 1372 | int (*inode_removexattr) (struct dentry *dentry, const char *name); |
1372 | int (*inode_need_killpriv) (struct dentry *dentry); | 1373 | int (*inode_need_killpriv) (struct dentry *dentry); |
1373 | int (*inode_killpriv) (struct dentry *dentry); | 1374 | int (*inode_killpriv) (struct dentry *dentry); |
1374 | int (*inode_getsecurity) (const struct inode *inode, const char *name, void **buffer, bool alloc); | 1375 | int (*inode_getsecurity) (const struct inode *inode, const char *name, void **buffer, bool alloc); |
@@ -1633,13 +1634,13 @@ int security_inode_permission(struct inode *inode, int mask, struct nameidata *n | |||
1633 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr); | 1634 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr); |
1634 | int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); | 1635 | int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); |
1635 | void security_inode_delete(struct inode *inode); | 1636 | void security_inode_delete(struct inode *inode); |
1636 | int security_inode_setxattr(struct dentry *dentry, char *name, | 1637 | int security_inode_setxattr(struct dentry *dentry, const char *name, |
1637 | void *value, size_t size, int flags); | 1638 | const void *value, size_t size, int flags); |
1638 | void security_inode_post_setxattr(struct dentry *dentry, char *name, | 1639 | void security_inode_post_setxattr(struct dentry *dentry, const char *name, |
1639 | void *value, size_t size, int flags); | 1640 | const void *value, size_t size, int flags); |
1640 | int security_inode_getxattr(struct dentry *dentry, char *name); | 1641 | int security_inode_getxattr(struct dentry *dentry, const char *name); |
1641 | int security_inode_listxattr(struct dentry *dentry); | 1642 | int security_inode_listxattr(struct dentry *dentry); |
1642 | int security_inode_removexattr(struct dentry *dentry, char *name); | 1643 | int security_inode_removexattr(struct dentry *dentry, const char *name); |
1643 | int security_inode_need_killpriv(struct dentry *dentry); | 1644 | int security_inode_need_killpriv(struct dentry *dentry); |
1644 | int security_inode_killpriv(struct dentry *dentry); | 1645 | int security_inode_killpriv(struct dentry *dentry); |
1645 | int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc); | 1646 | int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc); |
@@ -2041,17 +2042,18 @@ static inline int security_inode_getattr(struct vfsmount *mnt, | |||
2041 | static inline void security_inode_delete(struct inode *inode) | 2042 | static inline void security_inode_delete(struct inode *inode) |
2042 | { } | 2043 | { } |
2043 | 2044 | ||
2044 | static inline int security_inode_setxattr(struct dentry *dentry, char *name, | 2045 | static inline int security_inode_setxattr(struct dentry *dentry, |
2045 | void *value, size_t size, int flags) | 2046 | const char *name, const void *value, size_t size, int flags) |
2046 | { | 2047 | { |
2047 | return cap_inode_setxattr(dentry, name, value, size, flags); | 2048 | return cap_inode_setxattr(dentry, name, value, size, flags); |
2048 | } | 2049 | } |
2049 | 2050 | ||
2050 | static inline void security_inode_post_setxattr(struct dentry *dentry, char *name, | 2051 | static inline void security_inode_post_setxattr(struct dentry *dentry, |
2051 | void *value, size_t size, int flags) | 2052 | const char *name, const void *value, size_t size, int flags) |
2052 | { } | 2053 | { } |
2053 | 2054 | ||
2054 | static inline int security_inode_getxattr(struct dentry *dentry, char *name) | 2055 | static inline int security_inode_getxattr(struct dentry *dentry, |
2056 | const char *name) | ||
2055 | { | 2057 | { |
2056 | return 0; | 2058 | return 0; |
2057 | } | 2059 | } |
@@ -2061,7 +2063,8 @@ static inline int security_inode_listxattr(struct dentry *dentry) | |||
2061 | return 0; | 2063 | return 0; |
2062 | } | 2064 | } |
2063 | 2065 | ||
2064 | static inline int security_inode_removexattr(struct dentry *dentry, char *name) | 2066 | static inline int security_inode_removexattr(struct dentry *dentry, |
2067 | const char *name) | ||
2065 | { | 2068 | { |
2066 | return cap_inode_removexattr(dentry, name); | 2069 | return cap_inode_removexattr(dentry, name); |
2067 | } | 2070 | } |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 8df6d1382ac8..0522f368f9d7 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -240,26 +240,28 @@ asmlinkage long sys_truncate64(const char __user *path, loff_t length); | |||
240 | asmlinkage long sys_ftruncate64(unsigned int fd, loff_t length); | 240 | asmlinkage long sys_ftruncate64(unsigned int fd, loff_t length); |
241 | #endif | 241 | #endif |
242 | 242 | ||
243 | asmlinkage long sys_setxattr(char __user *path, char __user *name, | 243 | asmlinkage long sys_setxattr(const char __user *path, const char __user *name, |
244 | void __user *value, size_t size, int flags); | 244 | const void __user *value, size_t size, int flags); |
245 | asmlinkage long sys_lsetxattr(char __user *path, char __user *name, | 245 | asmlinkage long sys_lsetxattr(const char __user *path, const char __user *name, |
246 | void __user *value, size_t size, int flags); | 246 | const void __user *value, size_t size, int flags); |
247 | asmlinkage long sys_fsetxattr(int fd, char __user *name, void __user *value, | 247 | asmlinkage long sys_fsetxattr(int fd, const char __user *name, |
248 | size_t size, int flags); | 248 | const void __user *value, size_t size, int flags); |
249 | asmlinkage ssize_t sys_getxattr(char __user *path, char __user *name, | 249 | asmlinkage ssize_t sys_getxattr(const char __user *path, const char __user *name, |
250 | void __user *value, size_t size); | 250 | void __user *value, size_t size); |
251 | asmlinkage ssize_t sys_lgetxattr(char __user *path, char __user *name, | 251 | asmlinkage ssize_t sys_lgetxattr(const char __user *path, const char __user *name, |
252 | void __user *value, size_t size); | 252 | void __user *value, size_t size); |
253 | asmlinkage ssize_t sys_fgetxattr(int fd, char __user *name, | 253 | asmlinkage ssize_t sys_fgetxattr(int fd, const char __user *name, |
254 | void __user *value, size_t size); | 254 | void __user *value, size_t size); |
255 | asmlinkage ssize_t sys_listxattr(char __user *path, char __user *list, | 255 | asmlinkage ssize_t sys_listxattr(const char __user *path, char __user *list, |
256 | size_t size); | 256 | size_t size); |
257 | asmlinkage ssize_t sys_llistxattr(char __user *path, char __user *list, | 257 | asmlinkage ssize_t sys_llistxattr(const char __user *path, char __user *list, |
258 | size_t size); | 258 | size_t size); |
259 | asmlinkage ssize_t sys_flistxattr(int fd, char __user *list, size_t size); | 259 | asmlinkage ssize_t sys_flistxattr(int fd, char __user *list, size_t size); |
260 | asmlinkage long sys_removexattr(char __user *path, char __user *name); | 260 | asmlinkage long sys_removexattr(const char __user *path, |
261 | asmlinkage long sys_lremovexattr(char __user *path, char __user *name); | 261 | const char __user *name); |
262 | asmlinkage long sys_fremovexattr(int fd, char __user *name); | 262 | asmlinkage long sys_lremovexattr(const char __user *path, |
263 | const char __user *name); | ||
264 | asmlinkage long sys_fremovexattr(int fd, const char __user *name); | ||
263 | 265 | ||
264 | asmlinkage unsigned long sys_brk(unsigned long brk); | 266 | asmlinkage unsigned long sys_brk(unsigned long brk); |
265 | asmlinkage long sys_mprotect(unsigned long start, size_t len, | 267 | asmlinkage long sys_mprotect(unsigned long start, size_t len, |
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index df6b95d2218e..d131e352cfe1 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
@@ -47,10 +47,10 @@ struct xattr_handler { | |||
47 | }; | 47 | }; |
48 | 48 | ||
49 | ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t); | 49 | ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t); |
50 | ssize_t vfs_getxattr(struct dentry *, char *, void *, size_t); | 50 | ssize_t vfs_getxattr(struct dentry *, const char *, void *, size_t); |
51 | ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size); | 51 | ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size); |
52 | int vfs_setxattr(struct dentry *, char *, void *, size_t, int); | 52 | int vfs_setxattr(struct dentry *, const char *, const void *, size_t, int); |
53 | int vfs_removexattr(struct dentry *, char *); | 53 | int vfs_removexattr(struct dentry *, const char *); |
54 | 54 | ||
55 | ssize_t generic_getxattr(struct dentry *dentry, const char *name, void *buffer, size_t size); | 55 | ssize_t generic_getxattr(struct dentry *dentry, const char *name, void *buffer, size_t size); |
56 | ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size); | 56 | ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size); |