diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-16 16:43:19 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-16 16:43:19 +0100 |
commit | a0251ca8d4724c6407495ec9730f9add6d590cf6 (patch) | |
tree | 4dc396e432255008496a9238b0b4baee4e76e33f | |
parent | 137d9a2caad76b7ebfa137a3629e6ee2d77a006f (diff) | |
download | patches-a0251ca8d4724c6407495ec9730f9add6d590cf6.tar.gz |
updates
-rw-r--r-- | introduce-static_usermodehelper-to-mediate-call_usermodehelper.patch | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/introduce-static_usermodehelper-to-mediate-call_usermodehelper.patch b/introduce-static_usermodehelper-to-mediate-call_usermodehelper.patch index c4bec725e8279e..77d5e93bd9ac65 100644 --- a/introduce-static_usermodehelper-to-mediate-call_usermodehelper.patch +++ b/introduce-static_usermodehelper-to-mediate-call_usermodehelper.patch @@ -25,9 +25,41 @@ Cc: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- + kernel/kmod.c | 14 ++++++++++++++ security/Kconfig | 35 +++++++++++++++++++++++++++++++++++ - 1 file changed, 35 insertions(+) + 2 files changed, 49 insertions(+) +--- a/kernel/kmod.c ++++ b/kernel/kmod.c +@@ -528,7 +528,12 @@ struct subprocess_info *call_usermodehel + goto out; + + INIT_WORK(&sub_info->work, call_usermodehelper_exec_work); ++ ++#ifdef CONFIG_STATIC_USERMODEHELPER ++ sub_info->path = CONFIG_STATIC_USERMODEHELPER_PATH; ++#else + sub_info->path = path; ++#endif + sub_info->argv = argv; + sub_info->envp = envp; + +@@ -566,6 +571,15 @@ int call_usermodehelper_exec(struct subp + retval = -EBUSY; + goto out; + } ++ ++ /* ++ * If there is no binary for us to call, then just return and get out of ++ * here. This allows us to set STATIC_USERMODEHELPER_PATH to "" and ++ * disable all call_usermodehelper() calls. ++ */ ++ if (strlen(sub_info->path) == 0) ++ goto out; ++ + /* + * Set the completion pointer only if there is a waiter. + * This makes it possible to use umh_complete to free --- a/security/Kconfig +++ b/security/Kconfig @@ -158,6 +158,41 @@ config HARDENED_USERCOPY_PAGESPAN |