× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I've got an odd behavior when switching user handles in a ILE RPG program.

My application is a CGI program running under the standard web server.

The program starts out running as current user = QTMHHTTP

I then switch the user id to the user profile specified in REMOTE_USER
environmental variable (for discussion, let's call this user "A") using the
standard API's QSYGETPH and QWTSETP.  This user profile switch is reflected
in job status.

The program then operates as this new user happily.  It calls various
programs, which call procedures in service programs, some of which use the
current user field in the system data structure.  The system data structures
'Current User' field accurately reflects the correct user profile ("A").

When the web application is done it returns to the main web cgi program, who
switches the user profile back to QTMHHTTP.

On the next invocation, the REMOTE_USER variable is "B".  Again I call the
appropriate API's and the user profile switch is successful.  Again the job
status reflects the correct user profile.

Once again the program operates as this new user ... and calls programs,
which call procedures in service programs.  HOWEVER, this time when the
program references the system data structure, the current user field does
not have the actual current user "B", but it has user "A".

This is obviously incorrect.

The programs operate in either the default activation group or QILE
activation group.

Any idea why this would happen?

Thanks!

david

--
David Gibbs
Sr. Software Engineer / R&D / MKS Inc., www.mks.com
Lombard, IL, USA; tel: 630-495-2108; fax: 630-495-3591
Build Better Software






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.