Revert "ANDROID: umh: Enable usermode helper for required use cases"
This reverts commit c555553a40
.
Reason for revert: The binaries, and /sbin/ is not even present on Android systems. This patch was never tested :(
Bug: 202192667
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia1c35eba4a89a62ba678d8004742563372d3d920
This commit is contained in:
parent
43c339540b
commit
4a0a0fef25
30
kernel/umh.c
30
kernel/umh.c
|
@ -332,33 +332,6 @@ static void helper_unlock(void)
|
||||||
wake_up(&running_helpers_waitq);
|
wake_up(&running_helpers_waitq);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Android supported usermode helper executables.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
static const char * const usermode_executable_path[] = {
|
|
||||||
"/sbin/reboot",
|
|
||||||
"/sbin/poweroff"
|
|
||||||
};
|
|
||||||
|
|
||||||
static bool check_usermodehelper_supported_commands(const char *path)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (!strlen(path))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check path is part of ANDROID supported usermode helper executables or not.
|
|
||||||
* Googlge and OEMs can add supported executables to usermode_executable_path.
|
|
||||||
*/
|
|
||||||
for (i = 0; i < ARRAY_SIZE(usermode_executable_path); i++)
|
|
||||||
if (!strcmp(path, usermode_executable_path[i]))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call_usermodehelper_setup - prepare to call a usermode helper
|
* call_usermodehelper_setup - prepare to call a usermode helper
|
||||||
* @path: path to usermode executable
|
* @path: path to usermode executable
|
||||||
|
@ -400,9 +373,6 @@ struct subprocess_info *call_usermodehelper_setup(const char *path, char **argv,
|
||||||
#else
|
#else
|
||||||
sub_info->path = path;
|
sub_info->path = path;
|
||||||
#endif
|
#endif
|
||||||
if (check_usermodehelper_supported_commands(path))
|
|
||||||
sub_info->path = path;
|
|
||||||
|
|
||||||
sub_info->argv = argv;
|
sub_info->argv = argv;
|
||||||
sub_info->envp = envp;
|
sub_info->envp = envp;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue