! ----- [LOMASKY.SYS]SPRIV.FUN ----- ! ----- External function to be used with NUSER.BAS to ----- ! ----- enable or disable process privileges. ----- ! ----- Last Change 07/02/93 by Brian Lomasky ----- FUNCTION LONG SPRIV OPTION INACTIVE = SETUP ! DO NOT CALL RTL FOR INIT EXTERNAL LONG CONSTANT SS$_NORMAL ! NORMAL FUNCTION RETURN STAT MAP (PRIV1) LONG PRV_ADR(1%) ! PRIVILEGE BIT SETTINGS MAP (PRIV2) LONG ENABLE_FLAG ! ENABLE/DISABLE PRIV FLAG DECLARE LONG SYS_STATUS ! RETURN STATUS FROM FUNCTIONS EXTERNAL LONG FUNCTION SYS$SETPRV ! SET PROCESS PRIVILEGES ! ----- CALL SYS$SETPRV TO ENABLE (IF ENABLE_FLAG = 1%) OR ----- ! ----- DISABLE (IF ENABLE_FLAG = 0%) PROCESS PRIVILEGES ----- ! ----- PASSED IN THE PRV_ADR ARRAY. ----- SYS_STATUS = SYS$SETPRV(ENABLE_FLAG BY VALUE, PRV_ADR() BY REF, ,) IF (SYS_STATUS AND 1%) = 0% THEN SPRIV = SYS_STATUS ELSE SPRIV = SS$_NORMAL END IF END FUNCTION