WALKING through the lobby of the Central Intelligence Agency headquarters in Langley, Va., after handing in his resignation on Friday, David H. Petraeus passed a bas-relief sculpture of Allen Dulles, who led the agency in the 1950s and early ’60s. Below it is the motto, “His Monument Is Around Us.”

Both men ran the C.I.A. during some of its most active years, Dulles during the early cold war and Mr. Petraeus during the era of drone strikes and counterinsurgency operations. And both, it turns out, had high-profile extramarital affairs.

But private life for a C.I.A. director today is apparently quite different from what it was in the Dulles era. Mr. Petraeus resigned after admitting to a single affair; Allen Dulles had, as his sister, Eleanor, wrote later, “at least a hundred.”

Indeed, the contrast between Dulles’s story and that of Mr. Petraeus reflects how fully the life of public servants has changed in the United States.