I have a multi-threaded Java file server that runs on z/OS. A file requestor 
passes a userid and password and is authenticated using JAAS successfully 
creating  a LogonContext.  I would like the thread to run with the authority of 
the requestor when accessing the file and I am trying to using 
ThreadSubject.doAs() to do so. However, the thread continues to run with the 
authority of the job that created the JVM.

The job userid has read access to BPX.SERVER.


                  LoginContext lc=authenticate();
                  ThreadSubject.doAs(lc.getSubject(), new 
PrivilegedAction<Object>() {
                    public Object run() {
                   try {
                     //file access code here
                    } catch (Exception e) {
                     e.printStackTrace();
                    }
                    return null;
                   }
                  });

Any idea where I've gone wrong, or what I've missed?

Thanks

-- 
This e-mail message has been scanned and cleared by Google Message Security 
and the UNICOM Global security systems. This message is for the named 
person's use only. If you receive this message in error, please delete it 
and notify the sender. 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to