From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 17-NOV-1990 03:50:19.50
To:	MRGATE::"ARISIA::EVERHART"
CC:	
Subj:	Re: Processes holding identifiers

Received:  by crdgw1.ge.com (5.57/GE 1.78)
	 id AA21185; Sat, 17 Nov 90 03:44:18 EST
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Fri, 16 NOV 90 23:30:07 PST
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA25531; Fri, 16 Nov 90 23:17:05 -0800
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 17 Nov 90 00:32:14 GMT
From: gkn@ucsd.edu  (Gerard K. Newman)
Organization: San Diego Supercomputer Center
Subject: Re: Processes holding identifiers
Message-Id: <23136@ucsd.Edu>
References: <03FAF41EF5FF603082@UALR.BITNET>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

In article <03FAF41EF5FF603082@UALR.BITNET> DOMILLER@UALR.BITNET (Dale Miller) writes:
>Is there a way (supported or un-) to determine if a process currently holds an
>identifier?  The SYS$FIND_HELD and SYS$FIND_HOLDER seem only to check whether a
>username is AUTHORIZED to have an identifier, not whether a process owned by
>that user CURRENTLY holds it.  Any pointers would be appreciated.

Fake an ACE and use $CHKPRO ... a la

ACE:	.Byte	12		;ACE$B_SIZE	- ACE size
	.Byte	ACE$C_KEYID	;ACE$B_TYPE	- ACE type (identifier)
	.Word	0		;ACE$W_FLAGS	- Flags
	.Long	ACE$M_READ	;ACE$L_ACCESS	- Access mask (read)
IDENT:	.Blkl			;		- ID value (use $ASCTOID)

ITEMS:	.Word	8,CHP$_PRIV	;$CHKPRO item, privilege mask
	.Address NO_PRIVS	;Use this mask
	.Long	0		;unused
	.Word	12,CHP$_ACL	;$CHKPRO item, ACL
	.Address ACE		;here it is
	.Long	0		;unused
	.Long	0		;End of the item list

NO_PRIVS: .Long	0,0		;Empty privilege mask
IDNAME:	.Ascid	"FOOBAR"	;Identifier name


	$ASCTOID_S NAME=IDNAME,- ;Conver the id
		ID=IDENT	 ; to binary
	$CHKPRO_S ITMLST=ITEMS	 ;Check to see if we hold the ID
	BLBC	R0,YOU_LOSE	 ;Nope.



-- 
gkn	Gerard K. Newman		gkn@sds.sdsc.edu	619.534.5076
	San Diego Supercomputer Center	gkn@sdsc.bitnet		619.534.5152 FAX
	PO Box 85608			sdsc::gkn (27.1/span)
	San Diego, CA  92186-9784	ucsd!gkn

