diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-06-01 18:14:19 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-09-21 06:13:25 -0400 |
commit | d2b31ca644fdc8704de3367a6a56a5c958c77f53 (patch) | |
tree | 70967aaec7a5a86ffdd6adf3a45d3b3cb8833678 /include/linux/security.h | |
parent | 8b94eea4bfb8df693c5b35d08b74f13cfb92f3de (diff) |
userns: Teach security_path_chown to take kuids and kgids
Don't make the security modules deal with raw user space uid and
gids instead pass in a kuid_t and a kgid_t so that security modules
only have to deal with internal kernel uids and gids.
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: James Morris <james.l.morris@oracle.com>
Cc: John Johansen <john.johansen@canonical.com>
Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/security.h')
-rw-r--r-- | include/linux/security.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index 4e5a73cdbbef..ebb92cb1fa28 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1437,7 +1437,7 @@ struct security_operations { | |||
1437 | int (*path_rename) (struct path *old_dir, struct dentry *old_dentry, | 1437 | int (*path_rename) (struct path *old_dir, struct dentry *old_dentry, |
1438 | struct path *new_dir, struct dentry *new_dentry); | 1438 | struct path *new_dir, struct dentry *new_dentry); |
1439 | int (*path_chmod) (struct path *path, umode_t mode); | 1439 | int (*path_chmod) (struct path *path, umode_t mode); |
1440 | int (*path_chown) (struct path *path, uid_t uid, gid_t gid); | 1440 | int (*path_chown) (struct path *path, kuid_t uid, kgid_t gid); |
1441 | int (*path_chroot) (struct path *path); | 1441 | int (*path_chroot) (struct path *path); |
1442 | #endif | 1442 | #endif |
1443 | 1443 | ||
@@ -2832,7 +2832,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir, | |||
2832 | int security_path_rename(struct path *old_dir, struct dentry *old_dentry, | 2832 | int security_path_rename(struct path *old_dir, struct dentry *old_dentry, |
2833 | struct path *new_dir, struct dentry *new_dentry); | 2833 | struct path *new_dir, struct dentry *new_dentry); |
2834 | int security_path_chmod(struct path *path, umode_t mode); | 2834 | int security_path_chmod(struct path *path, umode_t mode); |
2835 | int security_path_chown(struct path *path, uid_t uid, gid_t gid); | 2835 | int security_path_chown(struct path *path, kuid_t uid, kgid_t gid); |
2836 | int security_path_chroot(struct path *path); | 2836 | int security_path_chroot(struct path *path); |
2837 | #else /* CONFIG_SECURITY_PATH */ | 2837 | #else /* CONFIG_SECURITY_PATH */ |
2838 | static inline int security_path_unlink(struct path *dir, struct dentry *dentry) | 2838 | static inline int security_path_unlink(struct path *dir, struct dentry *dentry) |
@@ -2888,7 +2888,7 @@ static inline int security_path_chmod(struct path *path, umode_t mode) | |||
2888 | return 0; | 2888 | return 0; |
2889 | } | 2889 | } |
2890 | 2890 | ||
2891 | static inline int security_path_chown(struct path *path, uid_t uid, gid_t gid) | 2891 | static inline int security_path_chown(struct path *path, kuid_t uid, kgid_t gid) |
2892 | { | 2892 | { |
2893 | return 0; | 2893 | return 0; |
2894 | } | 2894 | } |