QwtSetJuid()--Set Job User Identity


  Syntax
  #include <qwtjuid.h>

  int QwtSetJuid(void);

  Service Program Name: QWTJUID

  Default Public Authority: *EXCLUDE

  Threadsafe: Yes

TheQwtSetJuid() function sets the job user identity of the current job to the name of the current user profile of the thread in which the function is called.

The job user identity is the name of the user profile by which this job is known to other jobs. The job user identity is used for authorization checks when other jobs on the system attempt to operate against this job. Examples of functions that operate against another job include the Start Service Job (STRSRVJOB) command, the Retrieve Job Information (QUSRJOBI) API, the Change Job (QWTCHGJB) API, all job control commands, and functions that send signals from one job to another.

The job user identity is not used to make authorization checks from within this job. Authorization to perform a function is always based on the current user profile of the thread in which the function is called.

This API is intended to be used by either multithreaded servers or single threaded servers that want to establish a job user identity that remains constant, regardless of the user profile under which it processes individual client requests.

When a job user identity has not been explicitly set by an API, a job running single threaded will have a job user identity that is the same as the current user profile that the job is running under at the time. When a job user identity has not been explicitly set by an API, a job running multithreaded will have a job user identity that is the name of the user profile that the job was running under at the time it became multithreaded.


Parameters

None.


Authorities and Locks

If the job user identity is currently set, then either *USE authority to the user profile associated with the job user identity or all object (*ALLOBJ) special authority is required. If the job user identity is not already set, then no authorization is required.


Return Value

[EPERM]
Operation not permitted.

You must have appropriate privileges or be the owner of the object or other resource to do the requested operation.



API introduced: V4R3

[ Back to top | Security APIs | APIs by category ]