app/controllers/fiona7/sessions_controller.rb in infopark_fiona7-0.30.0.2 vs app/controllers/fiona7/sessions_controller.rb in infopark_fiona7-0.70.0.1
- old
+ new
@@ -37,13 +37,11 @@
raise "Invalid Fiona7.mode = #{Fiona7.mode}"
end
end
def valid_credentials?(login, password)
- current_login = rsession.user_name
- rsession.user_name = 'root'
- Reactor::Cm::User.new(login).has_password?(password)
- ensure
- rsession.user_name = current_login unless rsession.user_name == current_login
+ Reactor::Sudo.su(Fiona7.root) do
+ Reactor::Cm::User.new(login).has_password?(password)
+ end
end
end
end