• Home
  • Raw
  • Download

Lines Matching refs:file

28 static bool new_idmap_permitted(const struct file *file,
878 static bool verify_root_map(const struct file *file, in verify_root_map() argument
883 const struct user_namespace *file_ns = file->f_cred->user_ns; in verify_root_map()
913 if (!file_ns_capable(file, map_ns->parent, CAP_SETFCAP)) in verify_root_map()
920 static ssize_t map_write(struct file *file, const char __user *buf, in map_write() argument
926 struct seq_file *seq = file->private_data; in map_write()
974 if (cap_valid(cap_setid) && !file_ns_capable(file, map_ns, CAP_SYS_ADMIN)) in map_write()
1044 if (!new_idmap_permitted(file, map_ns, cap_setid, &new_map)) in map_write()
1108 ssize_t proc_uid_map_write(struct file *file, const char __user *buf, in proc_uid_map_write() argument
1111 struct seq_file *seq = file->private_data; in proc_uid_map_write()
1121 return map_write(file, buf, size, ppos, CAP_SETUID, in proc_uid_map_write()
1125 ssize_t proc_gid_map_write(struct file *file, const char __user *buf, in proc_gid_map_write() argument
1128 struct seq_file *seq = file->private_data; in proc_gid_map_write()
1138 return map_write(file, buf, size, ppos, CAP_SETGID, in proc_gid_map_write()
1142 ssize_t proc_projid_map_write(struct file *file, const char __user *buf, in proc_projid_map_write() argument
1145 struct seq_file *seq = file->private_data; in proc_projid_map_write()
1156 return map_write(file, buf, size, ppos, -1, in proc_projid_map_write()
1160 static bool new_idmap_permitted(const struct file *file, in new_idmap_permitted() argument
1164 const struct cred *cred = file->f_cred; in new_idmap_permitted()
1166 if (cap_setid == CAP_SETUID && !verify_root_map(file, ns, new_map)) in new_idmap_permitted()
1196 file_ns_capable(file, ns->parent, cap_setid)) in new_idmap_permitted()
1213 ssize_t proc_setgroups_write(struct file *file, const char __user *buf, in proc_setgroups_write() argument
1216 struct seq_file *seq = file->private_data; in proc_setgroups_write()