Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Code to check for Security Package

43 views
Skip to first unread message

John Kalinich

unread,
Apr 22, 2002, 8:16:02 AM4/22/02
to
I have a rexx function (written in rexx) to run the SSCT's, find the ACF2 SSCT, and extract the ACF2 release number from the ACCVT.

Regards,
John Kalinich
CSC-St. Louis, MO


From: Lindy Mayfield [mailto:lindy.m...@EUR.SAS.COM]
Sent: Monday, April 22, 2002 6:34 AM

Does anyone have any code, or know how to do it, that will check to see
which security package is being used, i.e. RACF, ACF/2, or TopSecret.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Lindy Mayfield

unread,
Apr 22, 2002, 9:21:25 AM4/22/02
to
Hello,

Does anyone have any code, or know how to do it, that will check to see
which security package is being used, i.e. RACF, ACF/2, or TopSecret.

Also, for RACF, how can I check to see whether Program control is enabled?
I can see that Tasid shows this information. I put together the following
Rexx code (hacked from something I got from cbt), but since I don't have a
machine with program control turned on I cannot test it. And also I was
going on the fact that it is very clearly documented that a Rexx MAKEBUF
will cause a dirty address space. Will this work?

Thanks!
Lindy


/* Rexx */
Makebuf
Numeric Digits 256
TCB = GetStor(0, '21C'x)
FBYT3 = X2B(C2X(GetStor(TCB,'116'x,1)))
Say FBYT3
If Substr(FBYT3,2,1) = '1'
Then Say 'RACF Program Control is Enabled.'
Else Say 'RACF Program Control is NOT enabled.'
Exit 0

GetStor: PROCEDURE
Parse Arg Area,Offset,Length
If Arg(2,'O') Then Offset=0
If Arg(3,'O') Then Length=4
If DataType(Area) = 'CHAR' Then
Area = C2D(Area)
If DataType(Offset) = 'CHAR' Then
Offset = C2D(OFfset)
Return Storage((D2X(Area+Offset)),Length)

Sullivan, John

unread,
Apr 22, 2002, 11:53:22 AM4/22/02
to
Does anyone have any code, or know how to do it, that will check to see
which security package is being used, i.e. RACF, ACF/2, or TopSecret.

Here's an exec I wrote to invoke the ACF2 panel interface. You're probably
most interested in the FindSecuritySystem function, which returns the
security system name as a string.

I can't help you with the other 2 items. For the program control question,
you might post RACF-L.

HTH,
John Sullivan Phone: 1-866-COURION, x301
Software Engineer Fax: 1-508-879-8500
Courion Corporation
1881 Worcester Road Email:<mailto:jsul...@courion.com>
Framingham, Ma. 01701-5409 WWW: <http://www.courion.com>

/* rexx */
/*
trace i;
*/
Security_system=FindSecuritySystem();

if Security_system \= 'ACF2'
then do;
zedsmsg='Wrong system';
zedlmsg=Security_system||' is running on this system.';
address ISPEXEC 'SETMSG MSG(ISRZ001)';
exit(16);
end;

address ISPEXEC;

clib="'CAI.CAICLIB'"
mlib="'CAI.CAIISPM'"
plib="'CAI.CAIISPP'"
slib="'CAI.CAIISPS'"

/* issue altlib for the appl */
address TSO;

'ALTLIB ACT APPLICATION(CLIST) DATASET('clib') UNCOND';
altrc=rc;

address ISPEXEC;
'LIBDEF ISPPLIB DATASET ID('plib') STACK'
prc=rc;
'LIBDEF ISPMLIB DATASET ID('mlib') STACK'
mrc=rc;
'LIBDEF ISPSLIB DATASET ID('slib') STACK'
src=rc;

'SELECT PANEL(ACFOPTS)'

selrc=rc;
'ISPEXEC LIBDEF ISPPLIB'
'ISPEXEC LIBDEF ISPMLIB'
'ISPEXEC LIBDEF ISPSLIB'

/* drop altlib for the appl */
address TSO;

'ALTLIB DEACT APPLICATION(CLIST)';
altdrc=rc;

return 0;

FindSecuritySystem:

parse source . . macro_name .; /* 3rd field is the macro name */
macro_name=strip(macro_name);

CVT=c2d(storage(10,4)); /* X'10' -> CVT */
RCVT=c2d(storage(d2x(CVT+x2d('3e0')),4)); /* CVT -> RCVT */
/* Get acronym (1st 4 bytes) from the RCVT */
Secacr=storage(d2x(RCVT),4);
select
when Secacr='RCVT' then Secsys='RACF';
when Secacr='ACF2' then Secsys='ACF2';
when Secacr='RTSS' then Secsys='Top Secret';
otherwise Secsys='A big mystery';
end;

return(Secsys);

Glenn Walko

unread,
Apr 23, 2002, 11:35:50 AM4/23/02
to
You probably already got something like this to check the security package. As far as Program
control I tried your code but it didn't look like it worked as expected. You could try issuing the
following commands:
SR CLASS(PROGRAM) - will show what profiles are defined in the program class
RL PROGRAM profile ALL - will show how the profile is defined

This will not tell you that program control is turned on but we typically don't define
profiles for inactive classes. The only way to really know with RACF commands
is to issue a SETR LIST and you will see at the top of the display:
ATTRIBUTES = INITSTATS WHEN(PROGRAM) SAUDIT CMDVIOL OPERAUDIT


/* REXX */

TRACE OFF

CVT = C2D(STORAGE(10,4)) /* POINT TO CVT */
CVTRAC = C2D(STORAGE(D2X(CVT + 992),4)) /* POINT TO RACF CVT */
RCVTID = STORAGE(D2X(CVTRAC),4) /* POINT TO RCVTID */
/* RCVT, ACF2, OR RTSS */
IF RCVTID = 'RCVT' THEN RCVTID = 'RACF' /* RCVT IS RACF */
IF RCVTID = 'RTSS' THEN RCVTID = 'TOP SECRET' /* RCVT IS TOP SECRET */
IF RCVTID = 'ACF2' THEN RCVTID = 'ACF2' /* RCVT IS ACF2 */
RACFVRM = STORAGE(D2X(CVTRAC + 616),4) /* RACF VER/REL/MOD */
RACFVER = SUBSTR(RACFVRM,1,1) /* RACF VERSION */
RACFREL = SUBSTR(RACFVRM,2,2) /* RACF RELEASE */
RACFREL = FORMAT(RACFREL) /* REMOVE LEADING 0 */
RACFMOD = SUBSTR(RACFVRM,4,1) /* RACF MOD LEVEL */
RACFLEV = RACFVER || '.' || RACFREL || '.' || RACFMOD
SAY 'THE SECURITY SOFTWARE IS 'RCVTID'.'
SAY 'THE RACF LEVEL IS 'RACFLEV'.'
EXIT

>>> lindy.m...@EUR.SAS.COM 04/22/2002 5:34:29 AM >>>
Hello,

Does anyone have any code, or know how to do it, that will check to see
which security package is being used, i.e. RACF, ACF/2, or TopSecret.

Also, for RACF, how can I check to see whether Program control is enabled?

Thanks!
Lindy

----------------------------------------------------------------------


For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

This electronic mail transmission may contain confidential information and is intended only for the person(s) named. Any use, copying or disclosure by any other person is strictly prohibited. If you have received this transmission in error, please notify the sender via e-mail.

Baker, Solomon

unread,
Apr 23, 2002, 1:41:26 PM4/23/02
to
Glenn,

When did this REXX exec run successfully last?

3 *-* CVT = C2D(STORAGE(10,4)) /* POINT TO CVT
*/
>L> "10"
>L> "4"
7 +++ IF RCVTID = ?
3 +++ CVT = C2D(STORAGE(10,4)) /* POINT TO CVT
*/
IRX0013I Error running RACFLEVL, line 7: Invalid character in program

Solomon Baker


/* REXX */

TRACE OFF

EXIT

Thanks!
Lindy


**********************************************************************
This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.
TIAA-CREF
**********************************************************************

Glenn Walko

unread,
Apr 23, 2002, 1:58:09 PM4/23/02
to
I just ran it, worked ok for me.

>>> sba...@TIAA-CREF.ORG 04/23/2002 11:03:10 AM >>>

Frank Schubert

unread,
Apr 23, 2002, 3:27:44 PM4/23/02
to
This works fine on my system also. Output is:

THE SECURITY SOFTWARE IS RACF.
THE RACF LEVEL IS 2.60.8.
***

What security system and version do you have?

Later

In <7CE0EC1FC2D0D411910...@msxnyusr01.msx.ops.tiaa-cref.org>, on 04/23/02

>Glenn,

>Solomon Baker


> /* REXX */

> TRACE OFF

> EXIT

> Thanks!
> Lindy

--
----------------------------------------------------------------
@ Triangle Systems INC. / IOF Tech Support - Frank V. Schubert @
@ IOF Web page: http://www.triangle-systems.com @
----------------------------------------------------------------

Hobart Spitz

unread,
Apr 23, 2002, 3:46:34 PM4/23/02
to
FYI: "Invalid character in program" usually means the source of the
program has a character that is not on of the valid REXX program characters.
It has nothing to do with the values of variables. I get this when I upload
and forget to convert not-signs and pipe-chars to the correct code-point.
If you uploaded, look for something like that. If you cut and pasted, be
sure that everything got copied correctly. From your trace, I would be
suspicious of the ?.

I hope this helps.

- Hobart

Baker, Solomon

unread,
Apr 23, 2002, 3:47:17 PM4/23/02
to
During the FTP to the mainframe, somehow quotes were stripped from some
values;

> IF RCVTID = 'RCVT' THEN RCVTID = 'RACF' /* RCVT IS
RACF*/

I looked at Mark's IPLINFO REXX exec, which I knew had RACF determination
code in it.
Lo and Behold, your code is exactly like Mark's!!!!!! Strange coincidence
isn't it?

Glenn Walko

unread,
Apr 23, 2002, 4:29:17 PM4/23/02
to
Not so strange since that's where the code came from. I just pulled out the part you asked for.
I never said it was my code but should have added this part at the end since RACF doesn't have
it own version and release anymore.

Output from my system
"The OS version is OS/390 02.10.00 - FMID HBB7703."
"The security software is OS/390 Security Server (RACF). The FMID is HRF7703."

RACFLEV = RACFVER || '.' || RACFREL || '.' || RACFMOD

IF RACFVRM < '2608' THEN DO

SAY 'THE SECURITY SOFTWARE IS 'RCVTID'.'
SAY 'THE RACF LEVEL IS 'RACFLEV'.'

END
ELSE DO
SAY 'THE SECURITY SOFTWARE IS OS/390 SECURITY SERVER (RACF).'
SAY 'THE FMID IS HRF' || RACFVRM || '.'
END
EXIT
>>> sba...@TIAA-CREF.ORG 04/23/2002 1:21:50 PM >>>

0 new messages