diff options
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/security/security.c b/security/security.c index 8c44a64f191d..d17e4a6d269c 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -302,7 +302,7 @@ int security_sb_statfs(struct dentry *dentry) | |||
302 | return call_int_hook(sb_statfs, 0, dentry); | 302 | return call_int_hook(sb_statfs, 0, dentry); |
303 | } | 303 | } |
304 | 304 | ||
305 | int security_sb_mount(const char *dev_name, struct path *path, | 305 | int security_sb_mount(const char *dev_name, const struct path *path, |
306 | const char *type, unsigned long flags, void *data) | 306 | const char *type, unsigned long flags, void *data) |
307 | { | 307 | { |
308 | return call_int_hook(sb_mount, 0, dev_name, path, type, flags, data); | 308 | return call_int_hook(sb_mount, 0, dev_name, path, type, flags, data); |
@@ -313,7 +313,7 @@ int security_sb_umount(struct vfsmount *mnt, int flags) | |||
313 | return call_int_hook(sb_umount, 0, mnt, flags); | 313 | return call_int_hook(sb_umount, 0, mnt, flags); |
314 | } | 314 | } |
315 | 315 | ||
316 | int security_sb_pivotroot(struct path *old_path, struct path *new_path) | 316 | int security_sb_pivotroot(const struct path *old_path, const struct path *new_path) |
317 | { | 317 | { |
318 | return call_int_hook(sb_pivotroot, 0, old_path, new_path); | 318 | return call_int_hook(sb_pivotroot, 0, old_path, new_path); |
319 | } | 319 | } |
@@ -410,7 +410,7 @@ int security_old_inode_init_security(struct inode *inode, struct inode *dir, | |||
410 | EXPORT_SYMBOL(security_old_inode_init_security); | 410 | EXPORT_SYMBOL(security_old_inode_init_security); |
411 | 411 | ||
412 | #ifdef CONFIG_SECURITY_PATH | 412 | #ifdef CONFIG_SECURITY_PATH |
413 | int security_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode, | 413 | int security_path_mknod(const struct path *dir, struct dentry *dentry, umode_t mode, |
414 | unsigned int dev) | 414 | unsigned int dev) |
415 | { | 415 | { |
416 | if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) | 416 | if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) |
@@ -419,7 +419,7 @@ int security_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode, | |||
419 | } | 419 | } |
420 | EXPORT_SYMBOL(security_path_mknod); | 420 | EXPORT_SYMBOL(security_path_mknod); |
421 | 421 | ||
422 | int security_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode) | 422 | int security_path_mkdir(const struct path *dir, struct dentry *dentry, umode_t mode) |
423 | { | 423 | { |
424 | if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) | 424 | if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) |
425 | return 0; | 425 | return 0; |
@@ -427,14 +427,14 @@ int security_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode) | |||
427 | } | 427 | } |
428 | EXPORT_SYMBOL(security_path_mkdir); | 428 | EXPORT_SYMBOL(security_path_mkdir); |
429 | 429 | ||
430 | int security_path_rmdir(struct path *dir, struct dentry *dentry) | 430 | int security_path_rmdir(const struct path *dir, struct dentry *dentry) |
431 | { | 431 | { |
432 | if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) | 432 | if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) |
433 | return 0; | 433 | return 0; |
434 | return call_int_hook(path_rmdir, 0, dir, dentry); | 434 | return call_int_hook(path_rmdir, 0, dir, dentry); |
435 | } | 435 | } |
436 | 436 | ||
437 | int security_path_unlink(struct path *dir, struct dentry *dentry) | 437 | int security_path_unlink(const struct path *dir, struct dentry *dentry) |
438 | { | 438 | { |
439 | if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) | 439 | if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) |
440 | return 0; | 440 | return 0; |
@@ -442,7 +442,7 @@ int security_path_unlink(struct path *dir, struct dentry *dentry) | |||
442 | } | 442 | } |
443 | EXPORT_SYMBOL(security_path_unlink); | 443 | EXPORT_SYMBOL(security_path_unlink); |
444 | 444 | ||
445 | int security_path_symlink(struct path *dir, struct dentry *dentry, | 445 | int security_path_symlink(const struct path *dir, struct dentry *dentry, |
446 | const char *old_name) | 446 | const char *old_name) |
447 | { | 447 | { |
448 | if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) | 448 | if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) |
@@ -450,7 +450,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry, | |||
450 | return call_int_hook(path_symlink, 0, dir, dentry, old_name); | 450 | return call_int_hook(path_symlink, 0, dir, dentry, old_name); |
451 | } | 451 | } |
452 | 452 | ||
453 | int security_path_link(struct dentry *old_dentry, struct path *new_dir, | 453 | int security_path_link(struct dentry *old_dentry, const struct path *new_dir, |
454 | struct dentry *new_dentry) | 454 | struct dentry *new_dentry) |
455 | { | 455 | { |
456 | if (unlikely(IS_PRIVATE(d_backing_inode(old_dentry)))) | 456 | if (unlikely(IS_PRIVATE(d_backing_inode(old_dentry)))) |
@@ -458,8 +458,8 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir, | |||
458 | return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry); | 458 | return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry); |
459 | } | 459 | } |
460 | 460 | ||
461 | int security_path_rename(struct path *old_dir, struct dentry *old_dentry, | 461 | int security_path_rename(const struct path *old_dir, struct dentry *old_dentry, |
462 | struct path *new_dir, struct dentry *new_dentry, | 462 | const struct path *new_dir, struct dentry *new_dentry, |
463 | unsigned int flags) | 463 | unsigned int flags) |
464 | { | 464 | { |
465 | if (unlikely(IS_PRIVATE(d_backing_inode(old_dentry)) || | 465 | if (unlikely(IS_PRIVATE(d_backing_inode(old_dentry)) || |
@@ -478,28 +478,28 @@ int security_path_rename(struct path *old_dir, struct dentry *old_dentry, | |||
478 | } | 478 | } |
479 | EXPORT_SYMBOL(security_path_rename); | 479 | EXPORT_SYMBOL(security_path_rename); |
480 | 480 | ||
481 | int security_path_truncate(struct path *path) | 481 | int security_path_truncate(const struct path *path) |
482 | { | 482 | { |
483 | if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry)))) | 483 | if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry)))) |
484 | return 0; | 484 | return 0; |
485 | return call_int_hook(path_truncate, 0, path); | 485 | return call_int_hook(path_truncate, 0, path); |
486 | } | 486 | } |
487 | 487 | ||
488 | int security_path_chmod(struct path *path, umode_t mode) | 488 | int security_path_chmod(const struct path *path, umode_t mode) |
489 | { | 489 | { |
490 | if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry)))) | 490 | if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry)))) |
491 | return 0; | 491 | return 0; |
492 | return call_int_hook(path_chmod, 0, path, mode); | 492 | return call_int_hook(path_chmod, 0, path, mode); |
493 | } | 493 | } |
494 | 494 | ||
495 | int security_path_chown(struct path *path, kuid_t uid, kgid_t gid) | 495 | int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) |
496 | { | 496 | { |
497 | if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry)))) | 497 | if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry)))) |
498 | return 0; | 498 | return 0; |
499 | return call_int_hook(path_chown, 0, path, uid, gid); | 499 | return call_int_hook(path_chown, 0, path, uid, gid); |
500 | } | 500 | } |
501 | 501 | ||
502 | int security_path_chroot(struct path *path) | 502 | int security_path_chroot(const struct path *path) |
503 | { | 503 | { |
504 | return call_int_hook(path_chroot, 0, path); | 504 | return call_int_hook(path_chroot, 0, path); |
505 | } | 505 | } |