diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 15:19:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 15:19:57 -0500 |
commit | 972b2c719990f91eb3b2310d44ef8a2d38955a14 (patch) | |
tree | b25a250ec5bec4b7b6355d214642d8b57c5cab32 /security/apparmor/lsm.c | |
parent | 02550d61f49266930e674286379d3601006b2893 (diff) | |
parent | c3aa077648e147783a7a53b409578234647db853 (diff) |
Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
reiserfs: Properly display mount options in /proc/mounts
vfs: prevent remount read-only if pending removes
vfs: count unlinked inodes
vfs: protect remounting superblock read-only
vfs: keep list of mounts for each superblock
vfs: switch ->show_options() to struct dentry *
vfs: switch ->show_path() to struct dentry *
vfs: switch ->show_devname() to struct dentry *
vfs: switch ->show_stats to struct dentry *
switch security_path_chmod() to struct path *
vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
vfs: trim includes a bit
switch mnt_namespace ->root to struct mount
vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
vfs: opencode mntget() mnt_set_mountpoint()
vfs: spread struct mount - remaining argument of next_mnt()
vfs: move fsnotify junk to struct mount
vfs: move mnt_devname
vfs: move mnt_list to struct mount
vfs: switch pnode.h macros to struct mount *
...
Diffstat (limited to 'security/apparmor/lsm.c')
-rw-r--r-- | security/apparmor/lsm.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 37832026e58a..2c0a0ff41399 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c | |||
@@ -262,7 +262,7 @@ static int apparmor_path_unlink(struct path *dir, struct dentry *dentry) | |||
262 | } | 262 | } |
263 | 263 | ||
264 | static int apparmor_path_mkdir(struct path *dir, struct dentry *dentry, | 264 | static int apparmor_path_mkdir(struct path *dir, struct dentry *dentry, |
265 | int mode) | 265 | umode_t mode) |
266 | { | 266 | { |
267 | return common_perm_create(OP_MKDIR, dir, dentry, AA_MAY_CREATE, | 267 | return common_perm_create(OP_MKDIR, dir, dentry, AA_MAY_CREATE, |
268 | S_IFDIR); | 268 | S_IFDIR); |
@@ -274,7 +274,7 @@ static int apparmor_path_rmdir(struct path *dir, struct dentry *dentry) | |||
274 | } | 274 | } |
275 | 275 | ||
276 | static int apparmor_path_mknod(struct path *dir, struct dentry *dentry, | 276 | static int apparmor_path_mknod(struct path *dir, struct dentry *dentry, |
277 | int mode, unsigned int dev) | 277 | umode_t mode, unsigned int dev) |
278 | { | 278 | { |
279 | return common_perm_create(OP_MKNOD, dir, dentry, AA_MAY_CREATE, mode); | 279 | return common_perm_create(OP_MKNOD, dir, dentry, AA_MAY_CREATE, mode); |
280 | } | 280 | } |
@@ -344,13 +344,12 @@ static int apparmor_path_rename(struct path *old_dir, struct dentry *old_dentry, | |||
344 | return error; | 344 | return error; |
345 | } | 345 | } |
346 | 346 | ||
347 | static int apparmor_path_chmod(struct dentry *dentry, struct vfsmount *mnt, | 347 | static int apparmor_path_chmod(struct path *path, umode_t mode) |
348 | mode_t mode) | ||
349 | { | 348 | { |
350 | if (!mediated_filesystem(dentry->d_inode)) | 349 | if (!mediated_filesystem(path->dentry->d_inode)) |
351 | return 0; | 350 | return 0; |
352 | 351 | ||
353 | return common_perm_mnt_dentry(OP_CHMOD, mnt, dentry, AA_MAY_CHMOD); | 352 | return common_perm_mnt_dentry(OP_CHMOD, path->mnt, path->dentry, AA_MAY_CHMOD); |
354 | } | 353 | } |
355 | 354 | ||
356 | static int apparmor_path_chown(struct path *path, uid_t uid, gid_t gid) | 355 | static int apparmor_path_chown(struct path *path, uid_t uid, gid_t gid) |