The US president has long been unhappy with inside information about his administration being leaked to the media.