mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
c/r: fcntl: add F_GETOWNER_UIDS option
When we restore file descriptors we would like them to look exactly as they were at dumping time. With help of fcntl it's almost possible, the missing snippet is file owners UIDs. To be able to read their values the F_GETOWNER_UIDS is introduced. This option is valid iif CONFIG_CHECKPOINT_RESTORE is turned on, otherwise returning -EINVAL. Signed-off-by: Cyrill Gorcunov <[email protected]> Acked-by: "Eric W. Biederman" <[email protected]> Cc: "Serge E. Hallyn" <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Pavel Emelyanov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
65fed8f6f2
commit
1d151c337d
3 changed files with 34 additions and 0 deletions
|
|
@ -3180,6 +3180,7 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd,
|
|||
case F_GETFL:
|
||||
case F_GETOWN:
|
||||
case F_GETSIG:
|
||||
case F_GETOWNER_UIDS:
|
||||
/* Just check FD__USE permission */
|
||||
err = file_has_perm(cred, file, 0);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue