diff options
author | David Howells <dhowells@redhat.com> | 2010-12-24 09:48:35 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-01-23 18:49:45 -0500 |
commit | 821404434f3324bf23f545050ff64055a149766e (patch) | |
tree | 619847c1b4c101da7eddee2cc920af329829847f /security | |
parent | ced3b93018a9633447ddeb12a96f25e08154cbe7 (diff) |
CacheFiles: Add calls to path-based security hooks
Add calls to path-based security hooks into CacheFiles as, unlike inode-based
security, these aren't implicit in the vfs_mkdir() and similar calls.
Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/security.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/security.c b/security/security.c index 739e40362f44..b84a89dd59c6 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -360,6 +360,7 @@ int security_path_mkdir(struct path *dir, struct dentry *dentry, int mode) | |||
360 | return 0; | 360 | return 0; |
361 | return security_ops->path_mkdir(dir, dentry, mode); | 361 | return security_ops->path_mkdir(dir, dentry, mode); |
362 | } | 362 | } |
363 | EXPORT_SYMBOL(security_path_mkdir); | ||
363 | 364 | ||
364 | int security_path_rmdir(struct path *dir, struct dentry *dentry) | 365 | int security_path_rmdir(struct path *dir, struct dentry *dentry) |
365 | { | 366 | { |
@@ -374,6 +375,7 @@ int security_path_unlink(struct path *dir, struct dentry *dentry) | |||
374 | return 0; | 375 | return 0; |
375 | return security_ops->path_unlink(dir, dentry); | 376 | return security_ops->path_unlink(dir, dentry); |
376 | } | 377 | } |
378 | EXPORT_SYMBOL(security_path_unlink); | ||
377 | 379 | ||
378 | int security_path_symlink(struct path *dir, struct dentry *dentry, | 380 | int security_path_symlink(struct path *dir, struct dentry *dentry, |
379 | const char *old_name) | 381 | const char *old_name) |
@@ -400,6 +402,7 @@ int security_path_rename(struct path *old_dir, struct dentry *old_dentry, | |||
400 | return security_ops->path_rename(old_dir, old_dentry, new_dir, | 402 | return security_ops->path_rename(old_dir, old_dentry, new_dir, |
401 | new_dentry); | 403 | new_dentry); |
402 | } | 404 | } |
405 | EXPORT_SYMBOL(security_path_rename); | ||
403 | 406 | ||
404 | int security_path_truncate(struct path *path) | 407 | int security_path_truncate(struct path *path) |
405 | { | 408 | { |