In DC v. Heller, 554 U.S. 570 (2008), the Court ruled that the Second Amendment protects an individual's right to possess a firearm, unconnected to service in a militia and for traditionally lawful purposes, such as self-defense within the home. In McDonald v. Chicago, 561 U.S. 3025 (2010), the Court ruled that the protections of the Second Amendment also apply to the states.
What about the homeless?