• Home
  • Raw
  • Download

Lines Matching refs:file

27 static bool new_idmap_permitted(const struct file *file,
857 static bool verify_root_map(const struct file *file, in verify_root_map() argument
862 const struct user_namespace *file_ns = file->f_cred->user_ns; in verify_root_map()
892 if (!file_ns_capable(file, map_ns->parent, CAP_SETFCAP)) in verify_root_map()
899 static ssize_t map_write(struct file *file, const char __user *buf, in map_write() argument
905 struct seq_file *seq = file->private_data; in map_write()
953 if (cap_valid(cap_setid) && !file_ns_capable(file, map_ns, CAP_SYS_ADMIN)) in map_write()
1023 if (!new_idmap_permitted(file, map_ns, cap_setid, &new_map)) in map_write()
1087 ssize_t proc_uid_map_write(struct file *file, const char __user *buf, in proc_uid_map_write() argument
1090 struct seq_file *seq = file->private_data; in proc_uid_map_write()
1100 return map_write(file, buf, size, ppos, CAP_SETUID, in proc_uid_map_write()
1104 ssize_t proc_gid_map_write(struct file *file, const char __user *buf, in proc_gid_map_write() argument
1107 struct seq_file *seq = file->private_data; in proc_gid_map_write()
1117 return map_write(file, buf, size, ppos, CAP_SETGID, in proc_gid_map_write()
1121 ssize_t proc_projid_map_write(struct file *file, const char __user *buf, in proc_projid_map_write() argument
1124 struct seq_file *seq = file->private_data; in proc_projid_map_write()
1135 return map_write(file, buf, size, ppos, -1, in proc_projid_map_write()
1139 static bool new_idmap_permitted(const struct file *file, in new_idmap_permitted() argument
1143 const struct cred *cred = file->f_cred; in new_idmap_permitted()
1145 if (cap_setid == CAP_SETUID && !verify_root_map(file, ns, new_map)) in new_idmap_permitted()
1175 file_ns_capable(file, ns->parent, cap_setid)) in new_idmap_permitted()
1192 ssize_t proc_setgroups_write(struct file *file, const char __user *buf, in proc_setgroups_write() argument
1195 struct seq_file *seq = file->private_data; in proc_setgroups_write()