Apply patch for camera permissions

Change-Id: I9df1b906139df5dddbe590b0bd3e26cb2fa7f5c0
This commit is contained in:
Florian Leeber 2022-01-20 21:37:12 +01:00
parent 76ad1e02cd
commit 8ea678f101

View file

@ -160,6 +160,9 @@ static int binder_set_stop_on_user_error(const char *val,
module_param_call(stop_on_user_error, binder_set_stop_on_user_error, module_param_call(stop_on_user_error, binder_set_stop_on_user_error,
param_get_int, &binder_stop_on_user_error, 0644); param_get_int, &binder_stop_on_user_error, 0644);
static bool binder_global_pid_lookups = true;
module_param_named(global_pid_lookups, binder_global_pid_lookups, bool, S_IRUGO);
#define binder_debug(mask, x...) \ #define binder_debug(mask, x...) \
do { \ do { \
if (binder_debug_mask & mask) \ if (binder_debug_mask & mask) \
@ -4285,6 +4288,9 @@ retry:
tr.sender_pid = task_tgid_nr_ns(sender, tr.sender_pid = task_tgid_nr_ns(sender,
task_active_pid_ns(current)); task_active_pid_ns(current));
if (binder_global_pid_lookups && tr.sender_pid == 0)
tr.sender_pid = task_tgid_nr(sender);
} else { } else {
tr.sender_pid = 0; tr.sender_pid = 0;
} }