Commit 55ef3c34 authored by Simon Ruderich's avatar Simon Ruderich
Browse files

slsm: fix build with 4.7

parent 53f9d273
......@@ -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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment