IB/security: Restrict use of the write() interface