Psetauid()

LONG Psetauid(auid)

WORD auid;
Psetauid() sets the audit user id for the calling process.
Opcode326 (0x0146)
AvailabilityAvailable when a 'MiNT' cookie with a version of at least 1.11 exists.
Parametersauid specifies the new audit user id for the calling process.
Binding
move.w	auid,-(sp)
move.w	#$0146,-(sp)
trap	#1
addq.l	#4,sp
Return ValuePsetauid() returns new auid on success or a negative GEMDOS error code otherwise.
CommentsAudit id never changes once set to != 0 (because Psetauid() only allows to change the id when it is equal to 0) and can therefore be used to determine who the initially logged in user was.
See Also Pseteuid(), Pgetauid(), Psetuid(), Psetreuid()