diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-10 15:18:10 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-10 15:18:10 +0200 |
| commit | d330c5b27ba6318556007d16833bd7d3748723dc (patch) | |
| tree | 348e524486b51845bbc0d961ec7270b50d489955 /0001-kmod-make-usermodehelper-path-a-const-string.patch | |
| parent | 80110d83f22bdbff0a6973bec911f34eb433c428 (diff) | |
| download | patches-d330c5b27ba6318556007d16833bd7d3748723dc.tar.gz | |
patches refreshed
Diffstat (limited to '0001-kmod-make-usermodehelper-path-a-const-string.patch')
| -rw-r--r-- | 0001-kmod-make-usermodehelper-path-a-const-string.patch | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/0001-kmod-make-usermodehelper-path-a-const-string.patch b/0001-kmod-make-usermodehelper-path-a-const-string.patch deleted file mode 100644 index a9ce3a81000c75..00000000000000 --- a/0001-kmod-make-usermodehelper-path-a-const-string.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 6f5842372bb2438cdf3b37fa2727688033121b9e Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Sun, 11 Dec 2016 09:44:42 +0100 -Subject: [PATCH 1/5] 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> ---- - include/linux/kmod.h | 7 ++++--- - kernel/kmod.c | 4 ++-- - 2 files changed, 6 insertions(+), 5 deletions(-) - -diff --git a/include/linux/kmod.h b/include/linux/kmod.h -index fcfd2bf14d3f..c4e441e00db5 100644 ---- a/include/linux/kmod.h -+++ b/include/linux/kmod.h -@@ -56,7 +56,7 @@ struct file; - struct subprocess_info { - struct work_struct work; - struct completion *complete; -- char *path; -+ const char *path; - char **argv; - char **envp; - int wait; -@@ -67,10 +67,11 @@ struct subprocess_info { - }; - - extern int --call_usermodehelper(char *path, char **argv, char **envp, int wait); -+call_usermodehelper(const char *path, char **argv, char **envp, int wait); - - extern struct subprocess_info * --call_usermodehelper_setup(char *path, char **argv, char **envp, gfp_t gfp_mask, -+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 *), void *data); - -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; --- -2.11.0 - |
