I downloaded Shannon O'Donnell's SWAPUSRPRF source code (from
http://www.itjungle.com/mpo/mpo071703-story02.html -- thanks Shannon!), compiled it and ran into a minor problem -- the QSYGETPH api now (as of v5r3) requires the password length and ccsid. No problem, I added those and got it working.

When I use the program to swap from PDOW to ANOTHERID, DSPJOB option 1
shows:

Job:   PDOWS1         User:   PDOW           Number:   483728

Status of job . . . . . . . . . . . . . . . :   ACTIVE
Current user profile  . . . . . . . . . . . :   ANOTHERID
Job user identity . . . . . . . . . . . . . :   ANOTHERID
 Set by  . . . . . . . . . . . . . . . . . :     *DEFAULT


So far so good.  When I try to swap from PDOW to LIMITED, a user with
limited capability, DSPJOB option 1 shows:

Job:   PDOWS1         User:   PDOW           Number:   483728

Status of job . . . . . . . . . . . . . . . :   ACTIVE
Current user profile  . . . . . . . . . . . :   PDOW
Job user identity . . . . . . . . . . . . . :   PDOW
 Set by  . . . . . . . . . . . . . . . . . :     *DEFAULT


When I signon as LIMITED and call a program with a call to SWAPUSRPRF
(PDOW *NOPWDCHK), DSPJOB option 1 shows:

Job:   PDOWS1         User:   LIMITED       Number:   483763

Status of job . . . . . . . . . . . . . . . :   ACTIVE
Current user profile  . . . . . . . . . . . :   LIMITED
Job user identity . . . . . . . . . . . . . :   PDOW
  Set by  . . . . . . . . . . . . . . . . . :     *SYSTEM

From reading the help on "Set by", I understand that *SYSTEM means I'm
running a multi-threaded job (it's an RPGLE with calls to Java).

What I don't understand is

1) When I swapped to a user with limited capability, the DSPJOB doesn't
show any change, yet when I try to excecute commands from the command
line, I cannot, indicating I have indeed switched.

2) When signed on as LIMITED, and called a program which called
SWAPUSRPRF, the job's "Current user profile" did not change.  This is a
problem, because the intent was to swap to a user profile with access to
a PC via /QNTC; the "Job user identity" is only used for reverse
authority checks -- when another job wants access to this job.  Is all
this because of the LMTCPB(*YES) on LIMITED's user profile?  Or is it a
lack of some other authority?

Peter Dow
Dow Software Services, Inc.
909 793-9050




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.