The House of Representatives has passed legislation that would curb electronic snooping. The measure would bar the National Security Agency…