Open topic with navigation
USupported on UNIX
VSupported on OpenVMS
xcall GTPPN(project, programmer, privilege)
The number of the project. (n)
The number of the programmer. (n)
Returned with one of the following values: (n)
1 = The current process has system privileges.
0 = The current process does not have system privileges.
The GTPPN subroutine checks whether the current process has system privileges and returns the project and programmer number of the current process.
On UNIX, project is the group ID and programmer is the user ID. Privilege is set to 1 if you have root privileges.
On OpenVMS, project is the group ID and programmer is the member ID from the current user’s UIC. Privilege is set to 1 if the current process has the SYSPRV privilege.
The following program displays the user identification code and either a 1 if the current process has system privileges or a 0 if the current process does not have system privileges.
.define TTCHN ,1 record output ,a*, "UIC = [" project ,d5 ,a*, ","
,a*, "], priv = " privilege ,d3
proc xcall flags(7004020, 1) open(TTCHN, o, "tt:")
xcall gtppn(project, programmer, privilege) writes(TTCHN, output) close TTCHN stop