If there are no trees, hang food off of a rock face or a bridge, or store it out of a bear's sight off the trail and downwind of camp. Pack out all trash. Don't cause trouble for those who will follow you. Turn around and go back, or circle far around. Don't disturb it.
Attacks are rare.
Bears may approach or stand on their hind legs to get a better look at you. These are curious, not aggressive, bears. Stand tall, wave your arms, and speak in a loud and low voice. Stand your ground or back away slowly and diagonally. Almost all charges are 'bluff charges'.