mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
Merge remote-tracking branch 'sm8350/lineage-20' into lineage-23.2
* sm8350/lineage-20: UPSTREAM: tty: allow TIOCSLCKTRMIOS with CAP_CHECKPOINT_RESTORE UPSTREAM: selftests: add clone3() CAP_CHECKPOINT_RESTORE test UPSTREAM: prctl: exe link permission error changed from -EINVAL to -EPERM UPSTREAM: prctl: Allow local CAP_CHECKPOINT_RESTORE to change /proc/self/exe UPSTREAM: proc: allow access in init userns for map_files with CAP_CHECKPOINT_RESTORE UPSTREAM: pid_namespace: use checkpoint_restore_ns_capable() for ns_last_pid UPSTREAM: pid: use checkpoint_restore_ns_capable() for set_tid UPSTREAM: capabilities: Introduce CAP_CHECKPOINT_RESTORE UPSTREAM: selftests: add tests for clone3() with *set_tid UPSTREAM: fork: extend clone3() to support setting a PID UPSTREAM: selftests: add tests for clone3() UPSTREAM: tests: test CLONE_CLEAR_SIGHAND UPSTREAM: clone3: add CLONE_CLEAR_SIGHAND Change-Id: I7890fb550e85b9fd4c0c3a27144d5bfd8963d496
This commit is contained in:
commit
5048089773
22 changed files with 1139 additions and 61 deletions
|
|
@ -2211,16 +2211,16 @@ struct map_files_info {
|
|||
};
|
||||
|
||||
/*
|
||||
* Only allow CAP_SYS_ADMIN to follow the links, due to concerns about how the
|
||||
* symlinks may be used to bypass permissions on ancestor directories in the
|
||||
* path to the file in question.
|
||||
* Only allow CAP_SYS_ADMIN and CAP_CHECKPOINT_RESTORE to follow the links, due
|
||||
* to concerns about how the symlinks may be used to bypass permissions on
|
||||
* ancestor directories in the path to the file in question.
|
||||
*/
|
||||
static const char *
|
||||
proc_map_files_get_link(struct dentry *dentry,
|
||||
struct inode *inode,
|
||||
struct delayed_call *done)
|
||||
{
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
if (!checkpoint_restore_ns_capable(&init_user_ns))
|
||||
return ERR_PTR(-EPERM);
|
||||
|
||||
return proc_pid_get_link(dentry, inode, done);
|
||||
|
|
|
|||
Loading…
Reference in a new issue