Skip to content

Commit

Permalink
LSM: Rename security_path_ functions argument names.
Browse files Browse the repository at this point in the history
include/linux/security.h and security/capability.c are using "struct path *dir"
but security/security.c was using "struct path *path" by error.
This patch renames "struct path *path" to "struct path *dir".

Signed-off-by: Tetsuo Handa <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
Tetsuo Handa authored and James Morris committed Dec 8, 2009
1 parent 9f59f90 commit 5d0901a
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions security/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,42 +389,42 @@ int security_inode_init_security(struct inode *inode, struct inode *dir,
EXPORT_SYMBOL(security_inode_init_security);

#ifdef CONFIG_SECURITY_PATH
int security_path_mknod(struct path *path, struct dentry *dentry, int mode,
int security_path_mknod(struct path *dir, struct dentry *dentry, int mode,
unsigned int dev)
{
if (unlikely(IS_PRIVATE(path->dentry->d_inode)))
if (unlikely(IS_PRIVATE(dir->dentry->d_inode)))
return 0;
return security_ops->path_mknod(path, dentry, mode, dev);
return security_ops->path_mknod(dir, dentry, mode, dev);
}
EXPORT_SYMBOL(security_path_mknod);

int security_path_mkdir(struct path *path, struct dentry *dentry, int mode)
int security_path_mkdir(struct path *dir, struct dentry *dentry, int mode)
{
if (unlikely(IS_PRIVATE(path->dentry->d_inode)))
if (unlikely(IS_PRIVATE(dir->dentry->d_inode)))
return 0;
return security_ops->path_mkdir(path, dentry, mode);
return security_ops->path_mkdir(dir, dentry, mode);
}

int security_path_rmdir(struct path *path, struct dentry *dentry)
int security_path_rmdir(struct path *dir, struct dentry *dentry)
{
if (unlikely(IS_PRIVATE(path->dentry->d_inode)))
if (unlikely(IS_PRIVATE(dir->dentry->d_inode)))
return 0;
return security_ops->path_rmdir(path, dentry);
return security_ops->path_rmdir(dir, dentry);
}

int security_path_unlink(struct path *path, struct dentry *dentry)
int security_path_unlink(struct path *dir, struct dentry *dentry)
{
if (unlikely(IS_PRIVATE(path->dentry->d_inode)))
if (unlikely(IS_PRIVATE(dir->dentry->d_inode)))
return 0;
return security_ops->path_unlink(path, dentry);
return security_ops->path_unlink(dir, dentry);
}

int security_path_symlink(struct path *path, struct dentry *dentry,
int security_path_symlink(struct path *dir, struct dentry *dentry,
const char *old_name)
{
if (unlikely(IS_PRIVATE(path->dentry->d_inode)))
if (unlikely(IS_PRIVATE(dir->dentry->d_inode)))
return 0;
return security_ops->path_symlink(path, dentry, old_name);
return security_ops->path_symlink(dir, dentry, old_name);
}

int security_path_link(struct dentry *old_dentry, struct path *new_dir,
Expand Down

0 comments on commit 5d0901a

Please sign in to comment.