ONE OF THE intellectual gargoyles that has crawled out of Donald Trump’s brain is the idea that we should “open up” libel laws to make it easier to punish the media for negative or unfair stories. Trump also wants top officials to sign nondisclosure agreements, so they never write memoirs that upset the boss. Trump is so disdainful of free speech that he has even vowed to use the Espionage Act to imprison anyone who says or leaks anything to the media that displeases him.

Actually, that last bit is made up; Trump hasn’t talked about the Espionage Act. Instead, the Obama administration has used the draconian 1917 law to prosecute more leakers and whistleblowers than all previous administrations combined. Under the cover of the Espionage Act and other laws, the administration has secretly obtained the emails and phone records of various reporters, and declared one of them — James Rosen of Fox News — a potential “co-conspirator” with his government source. Another reporter, James Risen of the New York Times, faced a jail sentence unless he revealed a government source (which he refused to do).

Obama has warned of the imminent perils of a Trump presidency, but on the key issue of freedom of the press, which is intimately tied to the ability of officials to talk to journalists, his own administration has established a dangerous precedent for Trump — or any future occupant of the Oval Office — to use one of the most punitive laws of the land against some of the most courageous and necessary people we have. One section of the Espionage Act even allows for the death penalty.

Obama’s gift to Trump was unintentionally highlighted in a speech the president delivered last week at a ceremony to honor the winner of the Toner Prize for Excellence in Journalism. Obama lamented the financial challenges facing the journalism industry and lauded the assembled reporters and editors for the hard and vital work they do. He made no mention of the ways in which his administration is making that job even harder, however, and that omission prompted the winner of the prize, ProPublica’s Alec MacGillis, to gently note, “That does not get him off the hook for his administration taking so long to respond to our FOIAs.”

Two years ago, Eben Moglen, a law professor at Columbia University, gave a series of lectures in which he discussed the idea of “fastening the procedures of totalitarianism on the substance of democratic society.” Moglen’s lectures were mostly concerned with surveillance by the National Security Agency — the title of his talks was “Snowden and the Future” — but his idea applies to other procedures the U.S. government has recently become fond of. Few are more important than targeting whistleblowers and journalists, and Obama has begun the fastening process.