Is it possible to use SecurityManager to control which classes can write to stdout/stderr?

74 views Asked by At

I'm curious if it's possible to restrict who can write to System.out/System.err using a SecurityManager. Looking at System.java this doesn't appear to be possible out of the box, but perhaps there's another layer I haven't looked at?

If it's not possible out of the box, is there a reasonable pattern for implementing a custom security check using System.setOut()/System.setErr()?

0

There are 0 answers