From 55ef3c34d98e2021b884f87f2d7dc683b3fbd6c2 Mon Sep 17 00:00:00 2001 From: Simon Ruderich <simon@ruderich.org> Date: Mon, 29 Aug 2016 22:50:51 +0200 Subject: [PATCH] slsm: fix build with 4.7 --- security/slsm/lsm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/security/slsm/lsm.c b/security/slsm/lsm.c index 1b8ef8d23f18..6f4c3f6a34bb 100644 --- a/security/slsm/lsm.c +++ b/security/slsm/lsm.c @@ -298,7 +298,7 @@ static int passt_file_open(struct file *file, const struct cred *cred) { return passt_path_common(&file->f_path, cred, perms_want); } -static int passt_path_link(struct dentry *old_dentry, struct path *new_dir, +static int passt_path_link(struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry) { const struct cred *cred = current_cred(); const struct passt_task *pt = cred->security; @@ -336,44 +336,44 @@ cleanup: return ret; } -static int passt_path_symlink(struct path *dir, struct dentry *dentry, +static int passt_path_symlink(const struct path *dir, struct dentry *dentry, const char *old_name) { /* Symlinks are always followed so there's no need to verify the * target here. */ return passt_path_common(dir, current_cred(), SLSM_PERMS_W); } -static int passt_path_unlink(struct path *dir, struct dentry *dentry) { +static int passt_path_unlink(const struct path *dir, struct dentry *dentry) { return passt_path_common(dir, current_cred(), SLSM_PERMS_W); } -static int passt_path_rename(struct path *old_dir, struct dentry *old_dentry, - struct path *new_dir, struct dentry *new_dentry) { +static int passt_path_rename(const struct path *old_dir, struct dentry *old_dentry, + const struct path *new_dir, struct dentry *new_dentry) { if (passt_path_common(old_dir, current_cred(), SLSM_PERMS_W) || passt_path_common(new_dir, current_cred(), SLSM_PERMS_W)) return -EACCES; return 0; } -static int passt_path_mkdir(struct path *dir, struct dentry *dentry, +static int passt_path_mkdir(const struct path *dir, struct dentry *dentry, umode_t mode) { return passt_path_common(dir, current_cred(), SLSM_PERMS_W); } -static int passt_path_rmdir(struct path *dir, struct dentry *dentry) { +static int passt_path_rmdir(const struct path *dir, struct dentry *dentry) { return passt_path_common(dir, current_cred(), SLSM_PERMS_W); } -static int passt_path_mknod(struct path *dir, struct dentry *dentry, +static int passt_path_mknod(const struct path *dir, struct dentry *dentry, umode_t mode, unsigned int dev) { return passt_path_common(dir, current_cred(), SLSM_PERMS_W); } -static int passt_path_chmod(struct path *path, umode_t mode) { +static int passt_path_chmod(const struct path *path, umode_t mode) { return passt_path_common(path, current_cred(), SLSM_PERMS_W); } -static int passt_path_chown(struct path *path, kuid_t uid, kgid_t gid) { +static int passt_path_chown(const struct path *path, kuid_t uid, kgid_t gid) { return passt_path_common(path, current_cred(), SLSM_PERMS_W); } -- GitLab