In areas without bears I bring the food-containing panniers into the tent when it's time to go to sleep. Have never had an issue with the raccoons and other critters invading the closed tent with me inside even in areas where they've been extremely aggressive while we were preparing dinner.
Regular campgrounds that I've stayed at where there is a bear issue have had food storage lockers. In more backcountry camps in bear country using either the hanging bag method or the bear-proof containers is advisable.