It's rare for me to find a rack that offers any kind of security, if I find one at all. So I'll usually lock to any solidly rooted vertical structure I find by sliding a u-lock or heavy chain around it and around the stays and rear rim. A heavy cable then goes through the frame and front wheel.
If a punk wants my ride, they're gonna -work- for it.