Part of the 'culture' of Star Trek was that at any given time, with the appropriate means, anyone could control anything, from anywhere. It didn't matter how critical the system was.
The Enterprise-D and other starships were often (partially) controlled by enemies or other entities who weren't even phisically inside the ships =)
That being said, DS9 rox!