diff options
Diffstat (limited to 'security/tomoyo/tomoyo.c')
-rw-r--r-- | security/tomoyo/tomoyo.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c index 4b327b691745..620d37c159a3 100644 --- a/security/tomoyo/tomoyo.c +++ b/security/tomoyo/tomoyo.c | |||
@@ -186,7 +186,7 @@ static int tomoyo_path_unlink(struct path *parent, struct dentry *dentry) | |||
186 | * Returns 0 on success, negative value otherwise. | 186 | * Returns 0 on success, negative value otherwise. |
187 | */ | 187 | */ |
188 | static int tomoyo_path_mkdir(struct path *parent, struct dentry *dentry, | 188 | static int tomoyo_path_mkdir(struct path *parent, struct dentry *dentry, |
189 | int mode) | 189 | umode_t mode) |
190 | { | 190 | { |
191 | struct path path = { parent->mnt, dentry }; | 191 | struct path path = { parent->mnt, dentry }; |
192 | return tomoyo_path_number_perm(TOMOYO_TYPE_MKDIR, &path, | 192 | return tomoyo_path_number_perm(TOMOYO_TYPE_MKDIR, &path, |
@@ -234,7 +234,7 @@ static int tomoyo_path_symlink(struct path *parent, struct dentry *dentry, | |||
234 | * Returns 0 on success, negative value otherwise. | 234 | * Returns 0 on success, negative value otherwise. |
235 | */ | 235 | */ |
236 | static int tomoyo_path_mknod(struct path *parent, struct dentry *dentry, | 236 | static int tomoyo_path_mknod(struct path *parent, struct dentry *dentry, |
237 | int mode, unsigned int dev) | 237 | umode_t mode, unsigned int dev) |
238 | { | 238 | { |
239 | struct path path = { parent->mnt, dentry }; | 239 | struct path path = { parent->mnt, dentry }; |
240 | int type = TOMOYO_TYPE_CREATE; | 240 | int type = TOMOYO_TYPE_CREATE; |
@@ -353,17 +353,14 @@ static int tomoyo_file_ioctl(struct file *file, unsigned int cmd, | |||
353 | /** | 353 | /** |
354 | * tomoyo_path_chmod - Target for security_path_chmod(). | 354 | * tomoyo_path_chmod - Target for security_path_chmod(). |
355 | * | 355 | * |
356 | * @dentry: Pointer to "struct dentry". | 356 | * @path: Pointer to "struct path". |
357 | * @mnt: Pointer to "struct vfsmount". | 357 | * @mode: DAC permission mode. |
358 | * @mode: DAC permission mode. | ||
359 | * | 358 | * |
360 | * Returns 0 on success, negative value otherwise. | 359 | * Returns 0 on success, negative value otherwise. |
361 | */ | 360 | */ |
362 | static int tomoyo_path_chmod(struct dentry *dentry, struct vfsmount *mnt, | 361 | static int tomoyo_path_chmod(struct path *path, umode_t mode) |
363 | mode_t mode) | ||
364 | { | 362 | { |
365 | struct path path = { mnt, dentry }; | 363 | return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, path, |
366 | return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, &path, | ||
367 | mode & S_IALLUGO); | 364 | mode & S_IALLUGO); |
368 | } | 365 | } |
369 | 366 | ||