In Snow Leopard (and probably older versions as well) you can disable the login window buttons for restarting or shutting down the computer. The following commands are pretty self explanatory:
sudo defaults write /Library/Preferences/com.apple.loginwindow RestartDisabled -bool true
sudo defaults write /Library/Preferences/com.apple.loginwindow ShutDownDisabled -bool false
sudo defaults write /Library/Preferences/com.apple.loginwindow SleepDisabled -bool true
This will disable the sleep and restart buttons and enable the shutdown button.