summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-16 17:50:02 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-19 12:45:33 +0100
commit6d2c5d6c46dd3d9924831efd6c913fdf4d484985 (patch)
treea17cc5bbce184be6d562e08432ae46b51ab21518 /kernel
parent5593edfbfa30a049fca9abbd70a834d2888a4d9d (diff)
downloadlinux-6d2c5d6c46dd3d9924831efd6c913fdf4d484985.tar.gz
linux-6d2c5d6c46dd3d9924831efd6c913fdf4d484985.tar.bz2
linux-6d2c5d6c46dd3d9924831efd6c913fdf4d484985.zip
kmod: make usermodehelper path a const string
This is in preparation for making it so that usermode helper programs can't be changed, if desired, by userspace. We will tackle the mess of cleaning up the write-ability of argv and env later, that's going to take more work, for much less gain... Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kmod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c
index d45c96073afb..426a614e97fe 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -516,7 +516,7 @@ static void helper_unlock(void)
* Function must be runnable in either a process context or the
* context in which call_usermodehelper_exec is called.
*/
-struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
+struct subprocess_info *call_usermodehelper_setup(const char *path, char **argv,
char **envp, gfp_t gfp_mask,
int (*init)(struct subprocess_info *info, struct cred *new),
void (*cleanup)(struct subprocess_info *info),
@@ -613,7 +613,7 @@ EXPORT_SYMBOL(call_usermodehelper_exec);
* This function is the equivalent to use call_usermodehelper_setup() and
* call_usermodehelper_exec().
*/
-int call_usermodehelper(char *path, char **argv, char **envp, int wait)
+int call_usermodehelper(const char *path, char **argv, char **envp, int wait)
{
struct subprocess_info *info;
gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL;