What are my tenant rights in San Francisco when the building goes up for sale?

What are my tenant rights in San Francisco when the building goes up for sale?

The neighbor’s boyfriend smokes and drinks all day. My apartment stinks even though I keep the windows closed. What can I do?

Will Dufty Protect North Beach Seniors from Eviction?; TICs have lost that loving feeling; Ammiano Introduces Socially Responsible Investment Act; Backlash Hits Calpers Property Deals; Hedge Fund Moves on Stuyvesant Town and Peter Cooper Village; Mortgage crisis brings creeping decay to middle-class apartment buildings from Calif to NY

Landlord Faces Lawsuit for Harassment; Tenants’ Rights Proposal Passes Unanimously, Advocates Unhappy; Rent wars: Court says landlord must make poor tenants rich;N.Y. Housing Complex Is Turned Over to Creditors; Newsom vetoes eviction protection legislation